From e99c35806a36d54fd5641d9cf4d08cfb5f018b83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Mar 2024 13:44:41 +0000 Subject: [PATCH 0001/1325] chore: temporary commit (#388) --- api.md | 7 -- src/increase/_client.py | 4 - src/increase/resources/__init__.py | 3 - src/increase/resources/webhooks.py | 138 --------------------------- tests/api_resources/test_webhooks.py | 95 ------------------ 5 files changed, 247 deletions(-) delete mode 100644 src/increase/resources/webhooks.py delete mode 100644 tests/api_resources/test_webhooks.py diff --git a/api.md b/api.md index 96af7b92d..8711fd72e 100644 --- a/api.md +++ b/api.md @@ -778,13 +778,6 @@ Methods: - client.real_time_payments_request_for_payments.retrieve(request_for_payment_id) -> RealTimePaymentsRequestForPayment - client.real_time_payments_request_for_payments.list(\*\*params) -> SyncPage[RealTimePaymentsRequestForPayment] -# Webhooks - -Methods: - -- client.webhooks.unwrap(\*args) -> object -- client.webhooks.verify_signature(\*args) -> None - # OAuthTokens Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 8d21cea77..75f58772e 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -99,7 +99,6 @@ class Increase(SyncAPIClient): proof_of_authorization_request_submissions: resources.ProofOfAuthorizationRequestSubmissions intrafi: resources.Intrafi real_time_payments_request_for_payments: resources.RealTimePaymentsRequestForPayments - webhooks: resources.Webhooks oauth_tokens: resources.OAuthTokens inbound_wire_transfers: resources.InboundWireTransfers digital_card_profiles: resources.DigitalCardProfiles @@ -244,7 +243,6 @@ def __init__( self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissions(self) self.intrafi = resources.Intrafi(self) self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPayments(self) - self.webhooks = resources.Webhooks(self) self.oauth_tokens = resources.OAuthTokens(self) self.inbound_wire_transfers = resources.InboundWireTransfers(self) self.digital_card_profiles = resources.DigitalCardProfiles(self) @@ -468,7 +466,6 @@ class AsyncIncrease(AsyncAPIClient): proof_of_authorization_request_submissions: resources.AsyncProofOfAuthorizationRequestSubmissions intrafi: resources.AsyncIntrafi real_time_payments_request_for_payments: resources.AsyncRealTimePaymentsRequestForPayments - webhooks: resources.AsyncWebhooks oauth_tokens: resources.AsyncOAuthTokens inbound_wire_transfers: resources.AsyncInboundWireTransfers digital_card_profiles: resources.AsyncDigitalCardProfiles @@ -613,7 +610,6 @@ def __init__( self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissions(self) self.intrafi = resources.AsyncIntrafi(self) self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPayments(self) - self.webhooks = resources.AsyncWebhooks(self) self.oauth_tokens = resources.AsyncOAuthTokens(self) self.inbound_wire_transfers = resources.AsyncInboundWireTransfers(self) self.digital_card_profiles = resources.AsyncDigitalCardProfiles(self) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 4636f935c..cb0f386e3 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -72,7 +72,6 @@ ProgramsWithStreamingResponse, AsyncProgramsWithStreamingResponse, ) -from .webhooks import Webhooks, AsyncWebhooks from .documents import ( Documents, AsyncDocuments, @@ -623,8 +622,6 @@ "AsyncRealTimePaymentsRequestForPaymentsWithRawResponse", "RealTimePaymentsRequestForPaymentsWithStreamingResponse", "AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse", - "Webhooks", - "AsyncWebhooks", "OAuthTokens", "AsyncOAuthTokens", "OAuthTokensWithRawResponse", diff --git a/src/increase/resources/webhooks.py b/src/increase/resources/webhooks.py deleted file mode 100644 index dde3cbd70..000000000 --- a/src/increase/resources/webhooks.py +++ /dev/null @@ -1,138 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import hmac -import json -import hashlib -from typing import Dict - -from .._types import ( - HeadersLike, -) -from .._utils import ( - get_required_header, -) -from .._resource import SyncAPIResource, AsyncAPIResource - -__all__ = ["Webhooks", "AsyncWebhooks"] - - -class Webhooks(SyncAPIResource): - def unwrap( - self, - payload: str | bytes, - headers: HeadersLike, - *, - secret: str | None = None, - ) -> object: - """Validates that the given payload was sent by Increase and parses the payload.""" - if secret is not None: - self.verify_signature(payload=payload, headers=headers, secret=secret) - return json.loads(payload) - - def verify_signature( - self, - payload: str | bytes, - headers: HeadersLike, - *, - secret: str | None = None, - ) -> None: - """Validates whether or not the webhook payload was sent by Increase. - - An error will be raised if the webhook payload was not sent by Increase. - """ - if secret is None: - secret = self._client.webhook_secret - - if secret is None: - raise ValueError( - "The webhook secret must either be set using the env var, INCREASE_WEBHOOK_SECRET, on the client class, Increase(webhook_secret='123'), or passed to this function" - ) - - def parse_kv_pairs(text: str, item_sep: str = ",", value_sep: str = "=") -> Dict[str, str]: - return dict(t.split(value_sep) for t in text.split(item_sep)) - - raw_signature = get_required_header(headers, "Increase-Webhook-Signature") - try: - parsed_signature = parse_kv_pairs(raw_signature) - except ValueError as err: - raise ValueError("Unable to parse Increase-Webhook-Signature header.") from err - - timestamp, signature = parsed_signature["t"], parsed_signature["v1"] - - # create the signature - body = payload.decode("utf-8") if isinstance(payload, bytes) else payload - if not isinstance(body, str): # pyright: ignore[reportUnnecessaryIsInstance] - raise ValueError( - "Webhook body should be a string of JSON (or bytes which can be decoded to a utf-8 string), not a parsed dictionary." - ) - - to_sign = f"{timestamp}.{body}".encode() - expected_signature = hmac.new(secret.encode(), to_sign, hashlib.sha256).hexdigest() - - if hmac.compare_digest(expected_signature, signature): - # valid! - return None - - raise ValueError("None of the given webhook signatures match the expected signature.") - - -class AsyncWebhooks(AsyncAPIResource): - def unwrap( - self, - payload: str | bytes, - headers: HeadersLike, - *, - secret: str | None = None, - ) -> object: - """Validates that the given payload was sent by Increase and parses the payload.""" - if secret is not None: - self.verify_signature(payload=payload, headers=headers, secret=secret) - return json.loads(payload) - - def verify_signature( - self, - payload: str | bytes, - headers: HeadersLike, - *, - secret: str | None = None, - ) -> None: - """Validates whether or not the webhook payload was sent by Increase. - - An error will be raised if the webhook payload was not sent by Increase. - """ - if secret is None: - secret = self._client.webhook_secret - - if secret is None: - raise ValueError( - "The webhook secret must either be set using the env var, INCREASE_WEBHOOK_SECRET, on the client class, Increase(webhook_secret='123'), or passed to this function" - ) - - def parse_kv_pairs(text: str, item_sep: str = ",", value_sep: str = "=") -> Dict[str, str]: - return dict(t.split(value_sep) for t in text.split(item_sep)) - - raw_signature = get_required_header(headers, "Increase-Webhook-Signature") - try: - parsed_signature = parse_kv_pairs(raw_signature) - except ValueError as err: - raise ValueError("Unable to parse Increase-Webhook-Signature header.") from err - - timestamp, signature = parsed_signature["t"], parsed_signature["v1"] - - # create the signature - body = payload.decode("utf-8") if isinstance(payload, bytes) else payload - if not isinstance(body, str): # pyright: ignore[reportUnnecessaryIsInstance] - raise ValueError( - "Webhook body should be a string of JSON (or bytes which can be decoded to a utf-8 string), not a parsed dictionary." - ) - - to_sign = f"{timestamp}.{body}".encode() - expected_signature = hmac.new(secret.encode(), to_sign, hashlib.sha256).hexdigest() - - if hmac.compare_digest(expected_signature, signature): - # valid! - return None - - raise ValueError("None of the given webhook signatures match the expected signature.") diff --git a/tests/api_resources/test_webhooks.py b/tests/api_resources/test_webhooks.py deleted file mode 100644 index 1244ba189..000000000 --- a/tests/api_resources/test_webhooks.py +++ /dev/null @@ -1,95 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os - -import pytest - -from increase import Increase, AsyncIncrease - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestWebhooks: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - payload = '{"id":"event_123abc","created_at":"2020-01-31T23:59:59Z"}' - signature = "Dwa0AHInLL3XFo2sxcHamOQDrJNi7F654S3L6skMAOI=" - headers = { - "Increase-Webhook-Signature": f"t=2022-01-31T23:59:59Z,v1=3f9c3dcc820ca3adfae8e196d05b09dfef63b91db5ce5ac1407090f2aa424a6f", - } - secret = "whsec_zlFsbBZ8Xcodlpcu6NDTdSzZRLSdhkst" - - def test_unwrap_with_secret(self, client: Increase) -> None: - payload = self.payload - headers = self.headers - secret = self.secret - - expected = {"created_at": "2020-01-31T23:59:59Z", "id": "event_123abc"} - unwrapped = client.webhooks.unwrap(payload, headers, secret=secret) - - assert unwrapped == expected - - def test_unwrap_no_secret(self, client: Increase) -> None: - payload = self.payload - headers = self.headers - - expected = {"created_at": "2020-01-31T23:59:59Z", "id": "event_123abc"} - unwrapped = client.webhooks.unwrap(payload, headers) - - assert unwrapped == expected - - def test_verify_signature(self, client: Increase) -> None: - payload = self.payload - headers = self.headers - secret = self.secret - verify = client.webhooks.verify_signature - - assert verify(payload=payload, headers=headers, secret=secret) is None - - # wrong secret - with pytest.raises(ValueError, match=r"None of the given webhook signatures match the expected signature."): - verify(payload=payload, headers=headers, secret="invalid secret") - - -class TestAsyncWebhooks: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - payload = '{"id":"event_123abc","created_at":"2020-01-31T23:59:59Z"}' - signature = "Dwa0AHInLL3XFo2sxcHamOQDrJNi7F654S3L6skMAOI=" - headers = { - "Increase-Webhook-Signature": f"t=2022-01-31T23:59:59Z,v1=3f9c3dcc820ca3adfae8e196d05b09dfef63b91db5ce5ac1407090f2aa424a6f", - } - secret = "whsec_zlFsbBZ8Xcodlpcu6NDTdSzZRLSdhkst" - - def test_unwrap_with_secret(self, async_client: AsyncIncrease) -> None: - payload = self.payload - headers = self.headers - secret = self.secret - - expected = {"created_at": "2020-01-31T23:59:59Z", "id": "event_123abc"} - unwrapped = async_client.webhooks.unwrap(payload, headers, secret=secret) - - assert unwrapped == expected - - def test_unwrap_no_secret(self, async_client: AsyncIncrease) -> None: - payload = self.payload - headers = self.headers - - expected = {"created_at": "2020-01-31T23:59:59Z", "id": "event_123abc"} - unwrapped = async_client.webhooks.unwrap(payload, headers) - - assert unwrapped == expected - - def test_verify_signature(self, async_client: AsyncIncrease) -> None: - payload = self.payload - headers = self.headers - secret = self.secret - verify = async_client.webhooks.verify_signature - - assert verify(payload=payload, headers=headers, secret=secret) is None - - # wrong secret - with pytest.raises(ValueError, match=r"None of the given webhook signatures match the expected signature."): - verify(payload=payload, headers=headers, secret="invalid secret") From f3e50991ebcc310702329ef6711623f1f7ac29e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Mar 2024 15:31:40 +0000 Subject: [PATCH 0002/1325] feat(package): export default constants (#390) --- src/increase/__init__.py | 4 ++++ src/increase/_base_client.py | 6 +++--- src/increase/_client.py | 6 +++--- src/increase/_constants.py | 2 +- 4 files changed, 11 insertions(+), 7 deletions(-) diff --git a/src/increase/__init__.py b/src/increase/__init__.py index d6dfcf7e2..d8b77c6b1 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -18,6 +18,7 @@ from ._models import BaseModel from ._version import __title__, __version__ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse +from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS from ._exceptions import ( APIError, ConflictError, @@ -92,6 +93,9 @@ "ENVIRONMENTS", "file_from_path", "BaseModel", + "DEFAULT_TIMEOUT", + "DEFAULT_MAX_RETRIES", + "DEFAULT_CONNECTION_LIMITS", ] _setup_logging() diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index f431128ee..7a8595c17 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -71,13 +71,13 @@ extract_response_type, ) from ._constants import ( - DEFAULT_LIMITS, DEFAULT_TIMEOUT, MAX_RETRY_DELAY, DEFAULT_MAX_RETRIES, INITIAL_RETRY_DELAY, RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER, + DEFAULT_CONNECTION_LIMITS, ) from ._streaming import Stream, SSEDecoder, AsyncStream, SSEBytesDecoder from ._exceptions import ( @@ -747,7 +747,7 @@ def __init__( if http_client is not None: raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") else: - limits = DEFAULT_LIMITS + limits = DEFAULT_CONNECTION_LIMITS if transport is not None: warnings.warn( @@ -1294,7 +1294,7 @@ def __init__( if http_client is not None: raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") else: - limits = DEFAULT_LIMITS + limits = DEFAULT_CONNECTION_LIMITS if transport is not None: warnings.warn( diff --git a/src/increase/_client.py b/src/increase/_client.py index 75f58772e..86e2f8712 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -29,8 +29,8 @@ from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( - DEFAULT_LIMITS, DEFAULT_MAX_RETRIES, + DEFAULT_CONNECTION_LIMITS, SyncAPIClient, AsyncAPIClient, SyncHttpxClientWrapper, @@ -319,7 +319,7 @@ def copy( http_client = None else: - if self._limits is not DEFAULT_LIMITS: + if self._limits is not DEFAULT_CONNECTION_LIMITS: connection_pool_limits = self._limits else: connection_pool_limits = None @@ -686,7 +686,7 @@ def copy( http_client = None else: - if self._limits is not DEFAULT_LIMITS: + if self._limits is not DEFAULT_CONNECTION_LIMITS: connection_pool_limits = self._limits else: connection_pool_limits = None diff --git a/src/increase/_constants.py b/src/increase/_constants.py index 1d56f7fde..a2ac3b6f3 100644 --- a/src/increase/_constants.py +++ b/src/increase/_constants.py @@ -8,7 +8,7 @@ # default timeout is 1 minute DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0) DEFAULT_MAX_RETRIES = 2 -DEFAULT_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) +DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) INITIAL_RETRY_DELAY = 0.5 MAX_RETRY_DELAY = 8.0 From 305f593bdd916641c5edb182503e1f2ab1d2a125 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:08:43 +0000 Subject: [PATCH 0003/1325] feat(api): updates (#391) --- .stats.yml | 2 +- api.md | 1 + .../resources/simulations/ach_transfers.py | 242 +++++++++++++++++- src/increase/types/account.py | 3 +- src/increase/types/simulations/__init__.py | 3 + ..._transfer_notification_of_change_params.py | 73 ++++++ .../simulations/test_ach_transfers.py | 92 +++++++ 7 files changed, 413 insertions(+), 3 deletions(-) create mode 100644 src/increase/types/simulations/ach_transfer_notification_of_change_params.py diff --git a/.stats.yml b/.stats.yml index 83b7ea96b..e2365cb8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 183 +configured_endpoints: 184 diff --git a/api.md b/api.md index 8711fd72e..212bf7815 100644 --- a/api.md +++ b/api.md @@ -549,6 +549,7 @@ Methods: Methods: - client.simulations.ach_transfers.create_inbound(\*\*params) -> InboundACHTransfer +- client.simulations.ach_transfers.notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index c1e2a27a5..26a277fa1 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -21,7 +21,11 @@ from ..._base_client import ( make_request_options, ) -from ...types.simulations import ach_transfer_return_params, ach_transfer_create_inbound_params +from ...types.simulations import ( + ach_transfer_return_params, + ach_transfer_create_inbound_params, + ach_transfer_notification_of_change_params, +) __all__ = ["ACHTransfers", "AsyncACHTransfers"] @@ -130,6 +134,118 @@ def create_inbound( cast_to=InboundACHTransfer, ) + def notification_of_change( + self, + ach_transfer_id: str, + *, + change_code: Literal[ + "incorrect_account_number", + "incorrect_routing_number", + "incorrect_routing_number_and_account_number", + "incorrect_transaction_code", + "incorrect_account_number_and_transaction_code", + "incorrect_routing_number_account_number_and_transaction_code", + "incorrect_receiving_depository_financial_institution_identification", + "incorrect_individual_identification_number", + "addenda_format_error", + "incorrect_standard_entry_class_code_for_outbound_international_payment", + "misrouted_notification_of_change", + "incorrect_trace_number", + "incorrect_company_identification_number", + "incorrect_identification_number", + "incorrectly_formatted_corrected_data", + "incorrect_discretionary_data", + "routing_number_not_from_original_entry_detail_record", + "depository_financial_institution_account_number_not_from_original_entry_detail_record", + "incorrect_transaction_code_by_originating_depository_financial_institution", + ], + corrected_data: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> ACHTransfer: + """ + Simulates receiving a Notification of Change for an + [ACH Transfer](#ach-transfers). + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to create a notification of change + for. + + change_code: The reason for the notification of change. + + - `incorrect_account_number` - The account number was incorrect. + - `incorrect_routing_number` - The routing number was incorrect. + - `incorrect_routing_number_and_account_number` - Both the routing number and + the account number were incorrect. + - `incorrect_transaction_code` - The transaction code was incorrect. Try + changing the `funding` parameter from checking to savings or vice-versa. + - `incorrect_account_number_and_transaction_code` - The account number and the + transaction code were incorrect. + - `incorrect_routing_number_account_number_and_transaction_code` - The routing + number, account number, and transaction code were incorrect. + - `incorrect_receiving_depository_financial_institution_identification` - The + receiving depository financial institution identification was incorrect. + - `incorrect_individual_identification_number` - The individual identification + number was incorrect. + - `addenda_format_error` - The addenda had an incorrect format. + - `incorrect_standard_entry_class_code_for_outbound_international_payment` - The + standard entry class code was incorrect for an outbound international payment. + - `misrouted_notification_of_change` - The notification of change was misrouted. + - `incorrect_trace_number` - The trace number was incorrect. + - `incorrect_company_identification_number` - The company identification number + was incorrect. + - `incorrect_identification_number` - The individual identification number or + identification number was incorrect. + - `incorrectly_formatted_corrected_data` - The corrected data was incorrectly + formatted. + - `incorrect_discretionary_data` - The discretionary data was incorrect. + - `routing_number_not_from_original_entry_detail_record` - The routing number + was not from the original entry detail record. + - `depository_financial_institution_account_number_not_from_original_entry_detail_record` - + The depository financial institution account number was not from the original + entry detail record. + - `incorrect_transaction_code_by_originating_depository_financial_institution` - + The transaction code was incorrect, initiated by the originating depository + financial institution. + + corrected_data: The corrected data for the notification of change (e.g., a new routing number). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") + return self._post( + f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + body=maybe_transform( + { + "change_code": change_code, + "corrected_data": corrected_data, + }, + ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=ACHTransfer, + ) + def return_( self, ach_transfer_id: str, @@ -551,6 +667,118 @@ async def create_inbound( cast_to=InboundACHTransfer, ) + async def notification_of_change( + self, + ach_transfer_id: str, + *, + change_code: Literal[ + "incorrect_account_number", + "incorrect_routing_number", + "incorrect_routing_number_and_account_number", + "incorrect_transaction_code", + "incorrect_account_number_and_transaction_code", + "incorrect_routing_number_account_number_and_transaction_code", + "incorrect_receiving_depository_financial_institution_identification", + "incorrect_individual_identification_number", + "addenda_format_error", + "incorrect_standard_entry_class_code_for_outbound_international_payment", + "misrouted_notification_of_change", + "incorrect_trace_number", + "incorrect_company_identification_number", + "incorrect_identification_number", + "incorrectly_formatted_corrected_data", + "incorrect_discretionary_data", + "routing_number_not_from_original_entry_detail_record", + "depository_financial_institution_account_number_not_from_original_entry_detail_record", + "incorrect_transaction_code_by_originating_depository_financial_institution", + ], + corrected_data: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> ACHTransfer: + """ + Simulates receiving a Notification of Change for an + [ACH Transfer](#ach-transfers). + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to create a notification of change + for. + + change_code: The reason for the notification of change. + + - `incorrect_account_number` - The account number was incorrect. + - `incorrect_routing_number` - The routing number was incorrect. + - `incorrect_routing_number_and_account_number` - Both the routing number and + the account number were incorrect. + - `incorrect_transaction_code` - The transaction code was incorrect. Try + changing the `funding` parameter from checking to savings or vice-versa. + - `incorrect_account_number_and_transaction_code` - The account number and the + transaction code were incorrect. + - `incorrect_routing_number_account_number_and_transaction_code` - The routing + number, account number, and transaction code were incorrect. + - `incorrect_receiving_depository_financial_institution_identification` - The + receiving depository financial institution identification was incorrect. + - `incorrect_individual_identification_number` - The individual identification + number was incorrect. + - `addenda_format_error` - The addenda had an incorrect format. + - `incorrect_standard_entry_class_code_for_outbound_international_payment` - The + standard entry class code was incorrect for an outbound international payment. + - `misrouted_notification_of_change` - The notification of change was misrouted. + - `incorrect_trace_number` - The trace number was incorrect. + - `incorrect_company_identification_number` - The company identification number + was incorrect. + - `incorrect_identification_number` - The individual identification number or + identification number was incorrect. + - `incorrectly_formatted_corrected_data` - The corrected data was incorrectly + formatted. + - `incorrect_discretionary_data` - The discretionary data was incorrect. + - `routing_number_not_from_original_entry_detail_record` - The routing number + was not from the original entry detail record. + - `depository_financial_institution_account_number_not_from_original_entry_detail_record` - + The depository financial institution account number was not from the original + entry detail record. + - `incorrect_transaction_code_by_originating_depository_financial_institution` - + The transaction code was incorrect, initiated by the originating depository + financial institution. + + corrected_data: The corrected data for the notification of change (e.g., a new routing number). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") + return await self._post( + f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + body=await async_maybe_transform( + { + "change_code": change_code, + "corrected_data": corrected_data, + }, + ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=ACHTransfer, + ) + async def return_( self, ach_transfer_id: str, @@ -875,6 +1103,9 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: self.create_inbound = _legacy_response.to_raw_response_wrapper( ach_transfers.create_inbound, ) + self.notification_of_change = _legacy_response.to_raw_response_wrapper( + ach_transfers.notification_of_change, + ) self.return_ = _legacy_response.to_raw_response_wrapper( ach_transfers.return_, ) @@ -890,6 +1121,9 @@ def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self.create_inbound = _legacy_response.async_to_raw_response_wrapper( ach_transfers.create_inbound, ) + self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( + ach_transfers.notification_of_change, + ) self.return_ = _legacy_response.async_to_raw_response_wrapper( ach_transfers.return_, ) @@ -905,6 +1139,9 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: self.create_inbound = to_streamed_response_wrapper( ach_transfers.create_inbound, ) + self.notification_of_change = to_streamed_response_wrapper( + ach_transfers.notification_of_change, + ) self.return_ = to_streamed_response_wrapper( ach_transfers.return_, ) @@ -920,6 +1157,9 @@ def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self.create_inbound = async_to_streamed_response_wrapper( ach_transfers.create_inbound, ) + self.notification_of_change = async_to_streamed_response_wrapper( + ach_transfers.notification_of_change, + ) self.return_ = async_to_streamed_response_wrapper( ach_transfers.return_, ) diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 3c65e31cf..6d17ec589 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,11 +13,12 @@ class Account(BaseModel): id: str """The Account identifier.""" - bank: Literal["blue_ridge_bank", "first_internet_bank"] + bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] """The bank the Account is with. - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `first_internet_bank` - First Internet Bank of Indiana + - `grasshopper_bank` - Grasshopper Bank """ created_at: datetime diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index ae776ab53..5ba967ddb 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -18,6 +18,9 @@ from .physical_card_shipment_advance_params import ( PhysicalCardShipmentAdvanceParams as PhysicalCardShipmentAdvanceParams, ) +from .ach_transfer_notification_of_change_params import ( + ACHTransferNotificationOfChangeParams as ACHTransferNotificationOfChangeParams, +) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) diff --git a/src/increase/types/simulations/ach_transfer_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_notification_of_change_params.py new file mode 100644 index 000000000..c08626084 --- /dev/null +++ b/src/increase/types/simulations/ach_transfer_notification_of_change_params.py @@ -0,0 +1,73 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["ACHTransferNotificationOfChangeParams"] + + +class ACHTransferNotificationOfChangeParams(TypedDict, total=False): + change_code: Required[ + Literal[ + "incorrect_account_number", + "incorrect_routing_number", + "incorrect_routing_number_and_account_number", + "incorrect_transaction_code", + "incorrect_account_number_and_transaction_code", + "incorrect_routing_number_account_number_and_transaction_code", + "incorrect_receiving_depository_financial_institution_identification", + "incorrect_individual_identification_number", + "addenda_format_error", + "incorrect_standard_entry_class_code_for_outbound_international_payment", + "misrouted_notification_of_change", + "incorrect_trace_number", + "incorrect_company_identification_number", + "incorrect_identification_number", + "incorrectly_formatted_corrected_data", + "incorrect_discretionary_data", + "routing_number_not_from_original_entry_detail_record", + "depository_financial_institution_account_number_not_from_original_entry_detail_record", + "incorrect_transaction_code_by_originating_depository_financial_institution", + ] + ] + """The reason for the notification of change. + + - `incorrect_account_number` - The account number was incorrect. + - `incorrect_routing_number` - The routing number was incorrect. + - `incorrect_routing_number_and_account_number` - Both the routing number and + the account number were incorrect. + - `incorrect_transaction_code` - The transaction code was incorrect. Try + changing the `funding` parameter from checking to savings or vice-versa. + - `incorrect_account_number_and_transaction_code` - The account number and the + transaction code were incorrect. + - `incorrect_routing_number_account_number_and_transaction_code` - The routing + number, account number, and transaction code were incorrect. + - `incorrect_receiving_depository_financial_institution_identification` - The + receiving depository financial institution identification was incorrect. + - `incorrect_individual_identification_number` - The individual identification + number was incorrect. + - `addenda_format_error` - The addenda had an incorrect format. + - `incorrect_standard_entry_class_code_for_outbound_international_payment` - The + standard entry class code was incorrect for an outbound international payment. + - `misrouted_notification_of_change` - The notification of change was misrouted. + - `incorrect_trace_number` - The trace number was incorrect. + - `incorrect_company_identification_number` - The company identification number + was incorrect. + - `incorrect_identification_number` - The individual identification number or + identification number was incorrect. + - `incorrectly_formatted_corrected_data` - The corrected data was incorrectly + formatted. + - `incorrect_discretionary_data` - The discretionary data was incorrect. + - `routing_number_not_from_original_entry_detail_record` - The routing number + was not from the original entry detail record. + - `depository_financial_institution_account_number_not_from_original_entry_detail_record` - + The depository financial institution account number was not from the original + entry detail record. + - `incorrect_transaction_code_by_originating_depository_financial_institution` - + The transaction code was incorrect, initiated by the originating depository + financial institution. + """ + + corrected_data: Required[str] + """The corrected data for the notification of change (e.g., a new routing number).""" diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 471d9e1d0..42316a8c7 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -68,6 +68,52 @@ def test_streaming_response_create_inbound(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_notification_of_change(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_notification_of_change(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ach_transfer = response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_notification_of_change(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ach_transfer = response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_notification_of_change(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + client.simulations.ach_transfers.with_raw_response.notification_of_change( + "", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return(self, client: Increase) -> None: @@ -215,6 +261,52 @@ async def test_streaming_response_create_inbound(self, async_client: AsyncIncrea assert cast(Any, response.is_closed) is True + @parametrize + async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ach_transfer = response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.notification_of_change( + "string", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ach_transfer = await response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + "", + change_code="incorrect_routing_number", + corrected_data="123456789", + ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: From 21aef0846f50ba1f250310f5e5d932957a746268 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:11:01 +0000 Subject: [PATCH 0004/1325] fix(project): use absolute github links on PyPi (#392) --- pyproject.toml | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 426c5229f..849cf460e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -2,7 +2,7 @@ name = "increase" version = "0.46.0" description = "The official Python library for the increase API" -readme = "README.md" +dynamic = ["readme"] license = "Apache-2.0" authors = [ { name = "Increase", email = "dev-feedback@increase.com" }, @@ -88,7 +88,7 @@ typecheck = { chain = [ "typecheck:mypy" = "mypy ." [build-system] -requires = ["hatchling"] +requires = ["hatchling", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" [tool.hatch.build] @@ -99,6 +99,17 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/increase"] +[tool.hatch.metadata.hooks.fancy-pypi-readme] +content-type = "text/markdown" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.fragments]] +path = "README.md" + +[[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] +# replace relative links with absolute links +pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' +replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' + [tool.black] line-length = 120 target-version = ["py37"] From a7a346bc5478f680588e34f07039e4d9b56f0007 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 16:47:04 +0000 Subject: [PATCH 0005/1325] feat(api): remove check transfer intention (#394) --- src/increase/types/account.py | 9 +++- src/increase/types/check_transfer.py | 2 +- ...ime_payments_transfer_simulation_result.py | 52 +------------------ src/increase/types/transaction.py | 52 +------------------ src/increase/types/transaction_list_params.py | 1 - 5 files changed, 10 insertions(+), 106 deletions(-) diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 6d17ec589..911df2a31 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,12 +13,11 @@ class Account(BaseModel): id: str """The Account identifier.""" - bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] + bank: Literal["blue_ridge_bank", "first_internet_bank"] """The bank the Account is with. - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `first_internet_bank` - First Internet Bank of Indiana - - `grasshopper_bank` - Grasshopper Bank """ created_at: datetime @@ -79,6 +78,12 @@ class Account(BaseModel): name: str """The name you choose for the Account.""" + program_id: str + """ + The identifier of the Program determining the compliance and commercial terms of + this Account. + """ + status: Literal["open", "closed"] """The status of the Account. diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index d9b67727f..db7bd7e4e 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -74,7 +74,7 @@ class Deposit(BaseModel): transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" - transfer_id: str + transfer_id: Optional[str] = None """The identifier of the Check Transfer object that was deposited.""" type: Literal["check_transfer_deposit"] diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index f19b63f0e..c3363c76d 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -51,7 +51,6 @@ "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", - "TransactionSourceCheckTransferIntention", "TransactionSourceCheckTransferStopPaymentRequest", "TransactionSourceFeePayment", "TransactionSourceInboundACHTransfer", @@ -2539,7 +2538,7 @@ class TransactionSourceCheckTransferDeposit(BaseModel): transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" - transfer_id: str + transfer_id: Optional[str] = None """The identifier of the Check Transfer object that was deposited.""" type: Literal["check_transfer_deposit"] @@ -2549,45 +2548,6 @@ class TransactionSourceCheckTransferDeposit(BaseModel): """ -class TransactionSourceCheckTransferIntention(BaseModel): - address_city: Optional[str] = None - """The city of the check's destination.""" - - address_line1: Optional[str] = None - """The street address of the check's destination.""" - - address_line2: Optional[str] = None - """The second line of the address of the check's destination.""" - - address_state: Optional[str] = None - """The state of the check's destination.""" - - address_zip: Optional[str] = None - """The postal code of the check's destination.""" - - amount: int - """The transfer amount in USD cents.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - recipient_name: Optional[str] = None - """The name that will be printed on the check.""" - - transfer_id: str - """The identifier of the Check Transfer with which this is associated.""" - - class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] """The reason why this transfer was stopped. @@ -3471,7 +3431,6 @@ class TransactionSource(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_intention", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -3518,8 +3477,6 @@ class TransactionSource(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - - `check_transfer_intention` - Check Transfer Intention: details will be under - the `check_transfer_intention` object. - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. @@ -3583,13 +3540,6 @@ class TransactionSource(BaseModel): equal to `check_transfer_deposit`. """ - check_transfer_intention: Optional[TransactionSourceCheckTransferIntention] = None - """A Check Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_intention`. - """ - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] = None """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 378ac1c80..ed2cd6c50 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -36,7 +36,6 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", - "SourceCheckTransferIntention", "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", @@ -1575,7 +1574,7 @@ class SourceCheckTransferDeposit(BaseModel): transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" - transfer_id: str + transfer_id: Optional[str] = None """The identifier of the Check Transfer object that was deposited.""" type: Literal["check_transfer_deposit"] @@ -1585,45 +1584,6 @@ class SourceCheckTransferDeposit(BaseModel): """ -class SourceCheckTransferIntention(BaseModel): - address_city: Optional[str] = None - """The city of the check's destination.""" - - address_line1: Optional[str] = None - """The street address of the check's destination.""" - - address_line2: Optional[str] = None - """The second line of the address of the check's destination.""" - - address_state: Optional[str] = None - """The state of the check's destination.""" - - address_zip: Optional[str] = None - """The postal code of the check's destination.""" - - amount: int - """The transfer amount in USD cents.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - recipient_name: Optional[str] = None - """The name that will be printed on the check.""" - - transfer_id: str - """The identifier of the Check Transfer with which this is associated.""" - - class SourceCheckTransferStopPaymentRequest(BaseModel): reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] """The reason why this transfer was stopped. @@ -2507,7 +2467,6 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_intention", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", @@ -2554,8 +2513,6 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - - `check_transfer_intention` - Check Transfer Intention: details will be under - the `check_transfer_intention` object. - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. @@ -2619,13 +2576,6 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ - check_transfer_intention: Optional[SourceCheckTransferIntention] = None - """A Check Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_intention`. - """ - check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None """A Check Transfer Stop Payment Request object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 9c4cf7b0b..3a7b8db52 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -51,7 +51,6 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_intention", "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", From 1c1f304af4c84dcae6b83a7795b773cfc1c5abc3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 30 Mar 2024 20:45:01 +0000 Subject: [PATCH 0006/1325] docs(readme): change undocumented params wording (#396) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 3030bb79b..029d9523b 100644 --- a/README.md +++ b/README.md @@ -366,12 +366,12 @@ response = client.post( print(response.headers.get("x-foo")) ``` -#### Undocumented params +#### Undocumented request params If you want to explicitly send an extra param, you can do so with the `extra_query`, `extra_body`, and `extra_headers` request options. -#### Undocumented properties +#### Undocumented response properties To access undocumented response properties, you can access the extra fields like `response.unknown_prop`. You can also get all the extra fields on the Pydantic model as a dict with From c1b980768c16a506361eeac56e0b1e0f7417fbc9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 09:48:05 +0000 Subject: [PATCH 0007/1325] chore(client): validate that max_retries is not None (#397) --- src/increase/_base_client.py | 5 +++++ tests/test_client.py | 10 ++++++++++ 2 files changed, 15 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 7a8595c17..063597171 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -361,6 +361,11 @@ def __init__( self._strict_response_validation = _strict_response_validation self._idempotency_header = None + if max_retries is None: # pyright: ignore[reportUnnecessaryComparison] + raise TypeError( + "max_retries cannot be None. If you want to disable retries, pass `0`; if you want unlimited retries, pass `math.inf` or a very high number; if you want the default behavior, pass `increase.DEFAULT_MAX_RETRIES`" + ) + def _enforce_trailing_slash(self, url: URL) -> URL: if url.raw_path.endswith(b"/"): return url diff --git a/tests/test_client.py b/tests/test_client.py index fb6f4c721..e1470a983 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -784,6 +784,10 @@ class Model(BaseModel): assert isinstance(exc.value.__cause__, ValidationError) + def test_client_max_retries_validation(self) -> None: + with pytest.raises(TypeError, match=r"max_retries cannot be None"): + Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, max_retries=cast(Any, None)) + @pytest.mark.respx(base_url=base_url) def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: class Model(BaseModel): @@ -1609,6 +1613,12 @@ class Model(BaseModel): assert isinstance(exc.value.__cause__, ValidationError) + async def test_client_max_retries_validation(self) -> None: + with pytest.raises(TypeError, match=r"max_retries cannot be None"): + AsyncIncrease( + base_url=base_url, api_key=api_key, _strict_response_validation=True, max_retries=cast(Any, None) + ) + @pytest.mark.respx(base_url=base_url) @pytest.mark.asyncio async def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: From 1cae404088ac2db8aea0eee2c03975cb95e69bf0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:35:39 +0000 Subject: [PATCH 0008/1325] feat(api): filter OAuth connections by their status (#399) --- src/increase/resources/oauth_connections.py | 4 ++++ .../resources/simulations/ach_transfers.py | 4 ++-- src/increase/types/ach_transfer.py | 2 +- src/increase/types/declined_transaction.py | 2 +- src/increase/types/oauth_connection.py | 7 +++++++ .../types/oauth_connection_list_params.py | 20 +++++++++++++++++-- .../card_authorization_simulation.py | 2 +- ...ime_payments_transfer_simulation_result.py | 6 +++--- src/increase/types/transaction.py | 4 ++-- tests/api_resources/test_oauth_connections.py | 2 ++ 10 files changed, 41 insertions(+), 12 deletions(-) diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index df815c726..e1c266004 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -71,6 +71,7 @@ def list( *, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -107,6 +108,7 @@ def list( { "cursor": cursor, "limit": limit, + "status": status, }, oauth_connection_list_params.OAuthConnectionListParams, ), @@ -166,6 +168,7 @@ def list( *, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -202,6 +205,7 @@ def list( { "cursor": cursor, "limit": limit, + "status": status, }, oauth_connection_list_params.OAuthConnectionListParams, ), diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 26a277fa1..2a26db101 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -67,7 +67,7 @@ def create_inbound( transfer may be either a credit or a debit depending on if the `amount` is positive or negative. The result of calling this API will contain the created transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/inbound-ach-transfers#inbound-ach-transfers). + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). Alternatively, if you don't pass the `resolve_at` parameter the result will contain either a [Transaction](#transactions) or a [Declined Transaction](#declined-transactions) depending on whether or not the @@ -600,7 +600,7 @@ async def create_inbound( transfer may be either a credit or a debit depending on if the `amount` is positive or negative. The result of calling this API will contain the created transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/inbound-ach-transfers#inbound-ach-transfers). + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). Alternatively, if you don't pass the `resolve_at` parameter the result will contain either a [Transaction](#transactions) or a [Declined Transaction](#declined-transactions) depending on whether or not the diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index e474e2ae2..678d6b1fd 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -458,7 +458,7 @@ class Submission(BaseModel): bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at the receiving bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 09fa80678..7d155ec25 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -804,7 +804,7 @@ class SourceInternationalACHDecline(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ diff --git a/src/increase/types/oauth_connection.py b/src/increase/types/oauth_connection.py index 26f037b1f..0ced8bed6 100644 --- a/src/increase/types/oauth_connection.py +++ b/src/increase/types/oauth_connection.py @@ -1,5 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import Optional from datetime import datetime from typing_extensions import Literal @@ -18,6 +19,12 @@ class OAuthConnection(BaseModel): Connection was created. """ + deleted_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth + Connection was deleted. + """ + group_id: str """The identifier of the Group that has authorized your OAuth application.""" diff --git a/src/increase/types/oauth_connection_list_params.py b/src/increase/types/oauth_connection_list_params.py index d31e00bcf..2cd6a5ef1 100644 --- a/src/increase/types/oauth_connection_list_params.py +++ b/src/increase/types/oauth_connection_list_params.py @@ -2,9 +2,10 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import List +from typing_extensions import Literal, TypedDict -__all__ = ["OAuthConnectionListParams"] +__all__ = ["OAuthConnectionListParams", "Status"] class OAuthConnectionListParams(TypedDict, total=False): @@ -16,3 +17,18 @@ class OAuthConnectionListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + + status: Status + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "inactive"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 37f1bcfe6..70bd94bb7 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -821,7 +821,7 @@ class DeclinedTransactionSourceInternationalACHDecline(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index c3363c76d..ab6fb0b3a 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -853,7 +853,7 @@ class DeclinedTransactionSourceInternationalACHDecline(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ @@ -2661,7 +2661,7 @@ class TransactionSourceInboundACHTransfer(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ transfer_id: str @@ -2950,7 +2950,7 @@ class TransactionSourceInboundInternationalACHTransfer(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ed2cd6c50..2e61758d5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1697,7 +1697,7 @@ class SourceInboundACHTransfer(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ transfer_id: str @@ -1986,7 +1986,7 @@ class SourceInboundInternationalACHTransfer(BaseModel): originating and receiving bank. Along with the amount, date, and originating routing number, this can be used to identify the ACH transfer at either bank. ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach#returns). + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 13687a75c..8e798164d 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -66,6 +66,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list( cursor="string", limit=1, + status={"in": ["active", "inactive"]}, ) assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @@ -141,6 +142,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> oauth_connection = await async_client.oauth_connections.list( cursor="string", limit=1, + status={"in": ["active", "inactive"]}, ) assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) From 62c013ea8c787b921dff4afef24f7d39391fe9bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Apr 2024 14:01:32 +0000 Subject: [PATCH 0009/1325] chore(internal): defer model build for import latency (#400) --- src/increase/_models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 77c755b13..0f001150f 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import inspect from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast from datetime import date, datetime @@ -38,6 +39,7 @@ is_given, is_mapping, parse_date, + coerce_boolean, parse_datetime, strip_not_given, extract_type_arg, @@ -74,7 +76,9 @@ class _ConfigProtocol(Protocol): class BaseModel(pydantic.BaseModel): if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict(extra="allow") + model_config: ClassVar[ConfigDict] = ConfigDict( + extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) + ) else: @property From 85c36d9e6247c937165f7f51b4d369246e7e0690 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Apr 2024 13:38:05 +0000 Subject: [PATCH 0010/1325] chore(internal): streaming updates (#402) --- src/increase/_streaming.py | 73 ++++++---- tests/test_streaming.py | 268 ++++++++++++++++++++++++++++--------- 2 files changed, 253 insertions(+), 88 deletions(-) diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index c8398ad42..7b5fc6503 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -23,7 +23,7 @@ class Stream(Generic[_T]): response: httpx.Response - _decoder: SSEDecoder | SSEBytesDecoder + _decoder: SSEBytesDecoder def __init__( self, @@ -46,10 +46,7 @@ def __iter__(self) -> Iterator[_T]: yield item def _iter_events(self) -> Iterator[ServerSentEvent]: - if isinstance(self._decoder, SSEBytesDecoder): - yield from self._decoder.iter_bytes(self.response.iter_bytes()) - else: - yield from self._decoder.iter(self.response.iter_lines()) + yield from self._decoder.iter_bytes(self.response.iter_bytes()) def __stream__(self) -> Iterator[_T]: cast_to = cast(Any, self._cast_to) @@ -112,12 +109,8 @@ async def __aiter__(self) -> AsyncIterator[_T]: yield item async def _iter_events(self) -> AsyncIterator[ServerSentEvent]: - if isinstance(self._decoder, SSEBytesDecoder): - async for sse in self._decoder.aiter_bytes(self.response.aiter_bytes()): - yield sse - else: - async for sse in self._decoder.aiter(self.response.aiter_lines()): - yield sse + async for sse in self._decoder.aiter_bytes(self.response.aiter_bytes()): + yield sse async def __stream__(self) -> AsyncIterator[_T]: cast_to = cast(Any, self._cast_to) @@ -205,21 +198,49 @@ def __init__(self) -> None: self._last_event_id = None self._retry = None - def iter(self, iterator: Iterator[str]) -> Iterator[ServerSentEvent]: - """Given an iterator that yields lines, iterate over it & yield every event encountered""" - for line in iterator: - line = line.rstrip("\n") - sse = self.decode(line) - if sse is not None: - yield sse - - async def aiter(self, iterator: AsyncIterator[str]) -> AsyncIterator[ServerSentEvent]: - """Given an async iterator that yields lines, iterate over it & yield every event encountered""" - async for line in iterator: - line = line.rstrip("\n") - sse = self.decode(line) - if sse is not None: - yield sse + def iter_bytes(self, iterator: Iterator[bytes]) -> Iterator[ServerSentEvent]: + """Given an iterator that yields raw binary data, iterate over it & yield every event encountered""" + for chunk in self._iter_chunks(iterator): + # Split before decoding so splitlines() only uses \r and \n + for raw_line in chunk.splitlines(): + line = raw_line.decode("utf-8") + sse = self.decode(line) + if sse: + yield sse + + def _iter_chunks(self, iterator: Iterator[bytes]) -> Iterator[bytes]: + """Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks""" + data = b"" + for chunk in iterator: + for line in chunk.splitlines(keepends=True): + data += line + if data.endswith((b"\r\r", b"\n\n", b"\r\n\r\n")): + yield data + data = b"" + if data: + yield data + + async def aiter_bytes(self, iterator: AsyncIterator[bytes]) -> AsyncIterator[ServerSentEvent]: + """Given an iterator that yields raw binary data, iterate over it & yield every event encountered""" + async for chunk in self._aiter_chunks(iterator): + # Split before decoding so splitlines() only uses \r and \n + for raw_line in chunk.splitlines(): + line = raw_line.decode("utf-8") + sse = self.decode(line) + if sse: + yield sse + + async def _aiter_chunks(self, iterator: AsyncIterator[bytes]) -> AsyncIterator[bytes]: + """Given an iterator that yields raw binary data, iterate over it and yield individual SSE chunks""" + data = b"" + async for chunk in iterator: + for line in chunk.splitlines(keepends=True): + data += line + if data.endswith((b"\r\r", b"\n\n", b"\r\n\r\n")): + yield data + data = b"" + if data: + yield data def decode(self, line: str) -> ServerSentEvent | None: # See: https://html.spec.whatwg.org/multipage/server-sent-events.html#event-stream-interpretation # noqa: E501 diff --git a/tests/test_streaming.py b/tests/test_streaming.py index dca908dd3..4dd59699e 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -1,104 +1,248 @@ +from __future__ import annotations + from typing import Iterator, AsyncIterator +import httpx import pytest -from increase._streaming import SSEDecoder +from increase import Increase, AsyncIncrease +from increase._streaming import Stream, AsyncStream, ServerSentEvent @pytest.mark.asyncio -async def test_basic_async() -> None: - async def body() -> AsyncIterator[str]: - yield "event: completion" - yield 'data: {"foo":true}' - yield "" - - async for sse in SSEDecoder().aiter(body()): - assert sse.event == "completion" - assert sse.json() == {"foo": True} +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_basic(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: completion\n" + yield b'data: {"foo":true}\n' + yield b"\n" + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) -def test_basic() -> None: - def body() -> Iterator[str]: - yield "event: completion" - yield 'data: {"foo":true}' - yield "" - - it = SSEDecoder().iter(body()) - sse = next(it) + sse = await iter_next(iterator) assert sse.event == "completion" assert sse.json() == {"foo": True} - with pytest.raises(StopIteration): - next(it) + await assert_empty_iter(iterator) -def test_data_missing_event() -> None: - def body() -> Iterator[str]: - yield 'data: {"foo":true}' - yield "" +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b'data: {"foo":true}\n' + yield b"\n" - it = SSEDecoder().iter(body()) - sse = next(it) + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) assert sse.event is None assert sse.json() == {"foo": True} - with pytest.raises(StopIteration): - next(it) + await assert_empty_iter(iterator) + +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b"\n" -def test_event_missing_data() -> None: - def body() -> Iterator[str]: - yield "event: ping" - yield "" + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) - it = SSEDecoder().iter(body()) - sse = next(it) + sse = await iter_next(iterator) assert sse.event == "ping" assert sse.data == "" - with pytest.raises(StopIteration): - next(it) + await assert_empty_iter(iterator) -def test_multiple_events() -> None: - def body() -> Iterator[str]: - yield "event: ping" - yield "" - yield "event: completion" - yield "" +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b"\n" + yield b"event: completion\n" + yield b"\n" - it = SSEDecoder().iter(body()) + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) - sse = next(it) + sse = await iter_next(iterator) assert sse.event == "ping" assert sse.data == "" - sse = next(it) + sse = await iter_next(iterator) assert sse.event == "completion" assert sse.data == "" - with pytest.raises(StopIteration): - next(it) - - -def test_multiple_events_with_data() -> None: - def body() -> Iterator[str]: - yield "event: ping" - yield 'data: {"foo":true}' - yield "" - yield "event: completion" - yield 'data: {"bar":false}' - yield "" + await assert_empty_iter(iterator) - it = SSEDecoder().iter(body()) - sse = next(it) +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b'data: {"foo":true}\n' + yield b"\n" + yield b"event: completion\n" + yield b'data: {"bar":false}\n' + yield b"\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) assert sse.event == "ping" assert sse.json() == {"foo": True} - sse = next(it) + sse = await iter_next(iterator) assert sse.event == "completion" assert sse.json() == {"bar": False} - with pytest.raises(StopIteration): - next(it) + await assert_empty_iter(iterator) + + +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b"data: {\n" + yield b'data: "foo":\n' + yield b"data: \n" + yield b"data:\n" + yield b"data: true}\n" + yield b"\n\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) + assert sse.event == "ping" + assert sse.json() == {"foo": True} + assert sse.data == '{\n"foo":\n\n\ntrue}' + + await assert_empty_iter(iterator) + + +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b'data: {"foo": "my long\\n\\ncontent"}' + yield b"\n\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) + assert sse.event == "ping" + assert sse.json() == {"foo": "my long\n\ncontent"} + + await assert_empty_iter(iterator) + + +@pytest.mark.asyncio +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: + def body() -> Iterator[bytes]: + yield b"event: ping\n" + yield b"data: {\n" + yield b'data: "foo":\n' + yield b"data: true}\n" + yield b"\n\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) + assert sse.event == "ping" + assert sse.json() == {"foo": True} + + await assert_empty_iter(iterator) + + +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_special_new_line_character( + sync: bool, + client: Increase, + async_client: AsyncIncrease, +) -> None: + def body() -> Iterator[bytes]: + yield b'data: {"content":" culpa"}\n' + yield b"\n" + yield b'data: {"content":" \xe2\x80\xa8"}\n' + yield b"\n" + yield b'data: {"content":"foo"}\n' + yield b"\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) + assert sse.event is None + assert sse.json() == {"content": " culpa"} + + sse = await iter_next(iterator) + assert sse.event is None + assert sse.json() == {"content": " 
"} + + sse = await iter_next(iterator) + assert sse.event is None + assert sse.json() == {"content": "foo"} + + await assert_empty_iter(iterator) + + +@pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) +async def test_multi_byte_character_multiple_chunks( + sync: bool, + client: Increase, + async_client: AsyncIncrease, +) -> None: + def body() -> Iterator[bytes]: + yield b'data: {"content":"' + # bytes taken from the string 'известни' and arbitrarily split + # so that some multi-byte characters span multiple chunks + yield b"\xd0" + yield b"\xb8\xd0\xb7\xd0" + yield b"\xb2\xd0\xb5\xd1\x81\xd1\x82\xd0\xbd\xd0\xb8" + yield b'"}\n' + yield b"\n" + + iterator = make_event_iterator(content=body(), sync=sync, client=client, async_client=async_client) + + sse = await iter_next(iterator) + assert sse.event is None + assert sse.json() == {"content": "известни"} + + +async def to_aiter(iter: Iterator[bytes]) -> AsyncIterator[bytes]: + for chunk in iter: + yield chunk + + +async def iter_next(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]) -> ServerSentEvent: + if isinstance(iter, AsyncIterator): + return await iter.__anext__() + + return next(iter) + + +async def assert_empty_iter(iter: Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]) -> None: + with pytest.raises((StopAsyncIteration, RuntimeError)): + await iter_next(iter) + + +def make_event_iterator( + content: Iterator[bytes], + *, + sync: bool, + client: Increase, + async_client: AsyncIncrease, +) -> Iterator[ServerSentEvent] | AsyncIterator[ServerSentEvent]: + if sync: + return Stream(cast_to=object, client=client, response=httpx.Response(200, content=content))._iter_events() + + return AsyncStream( + cast_to=object, client=async_client, response=httpx.Response(200, content=to_aiter(content)) + )._iter_events() From 7ee3c5690d88b27a884b124415b034055b26c1d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Apr 2024 13:04:54 +0000 Subject: [PATCH 0011/1325] feat(api): remove inbound_check category, rename check_deposit_mail_item, add inbound_mail_item (#403) --- src/increase/resources/event_subscriptions.py | 18 +++++++ src/increase/types/entity.py | 11 +++- src/increase/types/event.py | 4 ++ src/increase/types/event_list_params.py | 2 + src/increase/types/event_subscription.py | 10 ++++ .../types/event_subscription_create_params.py | 10 ++++ src/increase/types/file.py | 5 +- src/increase/types/file_list_params.py | 2 +- ...ime_payments_transfer_simulation_result.py | 51 ------------------- src/increase/types/transaction.py | 51 ------------------- src/increase/types/transaction_list_params.py | 1 - .../api_resources/test_event_subscriptions.py | 2 + 12 files changed, 59 insertions(+), 108 deletions(-) diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index c6a96883f..98b73b330 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -43,6 +43,7 @@ def create( self, *, url: str, + oauth_connection_id: str | NotGiven = NOT_GIVEN, selected_event_category: Literal[ "account.created", "account.updated", @@ -91,6 +92,8 @@ def create( "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -139,6 +142,9 @@ def create( Args: url: The URL you'd like us to send webhooks to. + oauth_connection_id: If specified, this subscription will only receive webhooks for Events associated + with the specified OAuth Connection. + selected_event_category: If specified, this subscription will only receive webhooks for Events with the specified `category`. @@ -206,6 +212,8 @@ def create( Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is @@ -281,6 +289,7 @@ def create( body=maybe_transform( { "url": url, + "oauth_connection_id": oauth_connection_id, "selected_event_category": selected_event_category, "shared_secret": shared_secret, }, @@ -456,6 +465,7 @@ async def create( self, *, url: str, + oauth_connection_id: str | NotGiven = NOT_GIVEN, selected_event_category: Literal[ "account.created", "account.updated", @@ -504,6 +514,8 @@ async def create( "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -552,6 +564,9 @@ async def create( Args: url: The URL you'd like us to send webhooks to. + oauth_connection_id: If specified, this subscription will only receive webhooks for Events associated + with the specified OAuth Connection. + selected_event_category: If specified, this subscription will only receive webhooks for Events with the specified `category`. @@ -619,6 +634,8 @@ async def create( Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is @@ -694,6 +711,7 @@ async def create( body=await async_maybe_transform( { "url": url, + "oauth_connection_id": oauth_connection_id, "selected_event_category": selected_event_category, "shared_secret": shared_secret, }, diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 32418f475..814117179 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -491,11 +491,20 @@ class Entity(BaseModel): Will be present if `structure` is equal to `corporation`. """ + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Entity + was created. + """ + description: Optional[str] = None """The entity's description for display purposes.""" details_confirmed_at: Optional[datetime] = None - """The date and time at which the entity's details were most recently confirmed.""" + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the + Entity's details were most recently confirmed. + """ idempotency_key: Optional[str] = None """The idempotency key you chose for this object. diff --git a/src/increase/types/event.py b/src/increase/types/event.py index b0a440245..03620e33d 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -66,6 +66,8 @@ class Event(BaseModel): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -167,6 +169,8 @@ class Event(BaseModel): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index a00866882..09070eea4 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -81,6 +81,8 @@ class EventListParams(TypedDict, total=False): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 1984a41ea..593dcb962 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -24,6 +24,12 @@ class EventSubscription(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + oauth_connection_id: Optional[str] = None + """ + If specified, this subscription will only receive webhooks for Events associated + with this OAuth Connection. + """ + selected_event_category: Optional[ Literal[ "account.created", @@ -73,6 +79,8 @@ class EventSubscription(BaseModel): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -174,6 +182,8 @@ class EventSubscription(BaseModel): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index d4e06f72d..59efcddf6 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -11,6 +11,12 @@ class EventSubscriptionCreateParams(TypedDict, total=False): url: Required[str] """The URL you'd like us to send webhooks to.""" + oauth_connection_id: str + """ + If specified, this subscription will only receive webhooks for Events associated + with the specified OAuth Connection. + """ + selected_event_category: Literal[ "account.created", "account.updated", @@ -59,6 +65,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -159,6 +167,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 6e0c50ecf..0fcb3b7ab 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -50,7 +50,7 @@ class File(BaseModel): "check_image_front", "check_image_back", "mailed_check_image", - "check_deposit_mail_item", + "inbound_mail_item", "form_1099_int", "form_ss_4", "identity_document", @@ -76,8 +76,7 @@ class File(BaseModel): deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - - `check_deposit_mail_item` - A scanned mail item sent to Increase containing a - check to deposit. + - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 9987eb945..71df69a61 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -68,7 +68,7 @@ class CreatedAt(TypedDict, total=False): "check_image_front", "check_image_back", "mailed_check_image", - "check_deposit_mail_item", + "inbound_mail_item", "form_1099_int", "form_ss_4", "identity_document", diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index ab6fb0b3a..e065a4ad0 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -57,7 +57,6 @@ "TransactionSourceInboundACHTransferAddenda", "TransactionSourceInboundACHTransferAddendaFreeform", "TransactionSourceInboundACHTransferAddendaFreeformEntry", - "TransactionSourceInboundCheck", "TransactionSourceInboundInternationalACHTransfer", "TransactionSourceInboundRealTimePaymentsTransferConfirmation", "TransactionSourceInboundWireDrawdownPayment", @@ -2668,46 +2667,6 @@ class TransactionSourceInboundACHTransfer(BaseModel): """The inbound ach transfer's identifier.""" -class TransactionSourceInboundCheck(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - bank_of_first_deposit_routing_number: Optional[str] = None - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - bank depositing this check. In some rare cases, this is not transmitted via - Check21 and the value will be null. - """ - - check_front_image_file_id: Optional[str] = None - """The front image of the check. This is a black and white TIFF image file.""" - - check_number: Optional[str] = None - """The number of the check. - - This field is set by the depositing bank and can be unreliable. - """ - - check_rear_image_file_id: Optional[str] = None - """The rear image of the check. This is a black and white TIFF image file.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - class TransactionSourceInboundInternationalACHTransfer(BaseModel): amount: int """The amount in the minor unit of the destination account currency. @@ -3435,7 +3394,6 @@ class TransactionSource(BaseModel): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", - "inbound_check", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", @@ -3485,8 +3443,6 @@ class TransactionSource(BaseModel): - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return Intention: details will be under the `inbound_ach_transfer_return_intention` object. - - `inbound_check` - Inbound Check: details will be under the `inbound_check` - object. - `inbound_international_ach_transfer` - Inbound International ACH Transfer: details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time @@ -3561,13 +3517,6 @@ class TransactionSource(BaseModel): equal to `inbound_ach_transfer`. """ - inbound_check: Optional[TransactionSourceInboundCheck] = None - """An Inbound Check object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_check`. - """ - inbound_international_ach_transfer: Optional[TransactionSourceInboundInternationalACHTransfer] = None """An Inbound International ACH Transfer object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 2e61758d5..43aefdef4 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -42,7 +42,6 @@ "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", - "SourceInboundCheck", "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", @@ -1704,46 +1703,6 @@ class SourceInboundACHTransfer(BaseModel): """The inbound ach transfer's identifier.""" -class SourceInboundCheck(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - bank_of_first_deposit_routing_number: Optional[str] = None - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - bank depositing this check. In some rare cases, this is not transmitted via - Check21 and the value will be null. - """ - - check_front_image_file_id: Optional[str] = None - """The front image of the check. This is a black and white TIFF image file.""" - - check_number: Optional[str] = None - """The number of the check. - - This field is set by the depositing bank and can be unreliable. - """ - - check_rear_image_file_id: Optional[str] = None - """The rear image of the check. This is a black and white TIFF image file.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - class SourceInboundInternationalACHTransfer(BaseModel): amount: int """The amount in the minor unit of the destination account currency. @@ -2471,7 +2430,6 @@ class Source(BaseModel): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", - "inbound_check", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", @@ -2521,8 +2479,6 @@ class Source(BaseModel): - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return Intention: details will be under the `inbound_ach_transfer_return_intention` object. - - `inbound_check` - Inbound Check: details will be under the `inbound_check` - object. - `inbound_international_ach_transfer` - Inbound International ACH Transfer: details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time @@ -2597,13 +2553,6 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ - inbound_check: Optional[SourceInboundCheck] = None - """An Inbound Check object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_check`. - """ - inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None """An Inbound International ACH Transfer object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 3a7b8db52..43da672d8 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -55,7 +55,6 @@ class TransactionListParams(TypedDict, total=False): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", - "inbound_check", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index f239a179f..9eb61f1e2 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -31,6 +31,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.create( url="https://website.com/webhooks", + oauth_connection_id="string", selected_event_category="account.created", shared_secret="x", ) @@ -193,6 +194,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.create( url="https://website.com/webhooks", + oauth_connection_id="string", selected_event_category="account.created", shared_secret="x", ) From 05165dc5d9730d567dd7cd9abe24e3880b0735fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Apr 2024 17:38:10 +0000 Subject: [PATCH 0012/1325] feat(api): add inbound check deposit return intention (#404) --- .../inbound_real_time_payments_transfer_simulation_result.py | 4 ++++ src/increase/types/transaction.py | 4 ++++ src/increase/types/transaction_list_params.py | 1 + 3 files changed, 9 insertions(+) diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index e065a4ad0..4b3977631 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -3394,6 +3394,7 @@ class TransactionSource(BaseModel): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", + "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", @@ -3443,6 +3444,9 @@ class TransactionSource(BaseModel): - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return Intention: details will be under the `inbound_ach_transfer_return_intention` object. + - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return + Intention: details will be under the `inbound_check_deposit_return_intention` + object. - `inbound_international_ach_transfer` - Inbound International ACH Transfer: details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 43aefdef4..9ac4c3df8 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2430,6 +2430,7 @@ class Source(BaseModel): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", + "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", @@ -2479,6 +2480,9 @@ class Source(BaseModel): - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return Intention: details will be under the `inbound_ach_transfer_return_intention` object. + - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return + Intention: details will be under the `inbound_check_deposit_return_intention` + object. - `inbound_international_ach_transfer` - Inbound International ACH Transfer: details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 43da672d8..ffdbc2eb8 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -55,6 +55,7 @@ class TransactionListParams(TypedDict, total=False): "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", + "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment_reversal", From 29344240681126e0ac3bf94bd88b579bb1e14735 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 10:50:17 +0000 Subject: [PATCH 0013/1325] feat(client): add DefaultHttpxClient and DefaultAsyncHttpxClient (#406) --- README.md | 5 ++-- src/increase/__init__.py | 3 +++ src/increase/_base_client.py | 44 ++++++++++++++++++++++++++++++++++-- src/increase/_client.py | 8 +++++-- 4 files changed, 53 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 029d9523b..d6d7de87a 100644 --- a/README.md +++ b/README.md @@ -386,13 +386,12 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c - Additional [advanced](https://www.python-httpx.org/advanced/#client-instances) functionality ```python -import httpx -from increase import Increase +from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=httpx.Client( + http_client=DefaultHttpxClient( proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0"), ), diff --git a/src/increase/__init__.py b/src/increase/__init__.py index d8b77c6b1..519cb0b5a 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -46,6 +46,7 @@ InsufficientPermissionsError, IdempotencyKeyAlreadyUsedError, ) +from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging __all__ = [ @@ -96,6 +97,8 @@ "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", + "DefaultHttpxClient", + "DefaultAsyncHttpxClient", ] _setup_logging() diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 063597171..e963d0c05 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -716,7 +716,27 @@ def _idempotency_key(self) -> str: return f"stainless-python-retry-{uuid.uuid4()}" -class SyncHttpxClientWrapper(httpx.Client): +class _DefaultHttpxClient(httpx.Client): + 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: + DefaultHttpxClient = httpx.Client + """An alias to `httpx.Client` that provides the same defaults that this SDK + uses internally. + + This is useful because overriding the `http_client` with your own instance of + `httpx.Client` will result in httpx's defaults being used, not ours. + """ +else: + DefaultHttpxClient = _DefaultHttpxClient + + +class SyncHttpxClientWrapper(DefaultHttpxClient): def __del__(self) -> None: try: self.close() @@ -1262,7 +1282,27 @@ def get_api_list( return self._request_api_list(model, page, opts) -class AsyncHttpxClientWrapper(httpx.AsyncClient): +class _DefaultAsyncHttpxClient(httpx.AsyncClient): + 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 + uses internally. + + 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. + """ +else: + DefaultAsyncHttpxClient = _DefaultAsyncHttpxClient + + +class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): def __del__(self) -> None: try: # TODO(someday): support non asyncio runtimes here diff --git a/src/increase/_client.py b/src/increase/_client.py index 86e2f8712..b7735bbc4 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -123,7 +123,9 @@ def __init__( max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. http_client: httpx.Client | None = None, # See httpx documentation for [custom transports](https://www.python-httpx.org/advanced/#custom-transports) transport: Transport | None = None, @@ -490,7 +492,9 @@ def __init__( max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. http_client: httpx.AsyncClient | None = None, # See httpx documentation for [custom transports](https://www.python-httpx.org/advanced/#custom-transports) transport: AsyncTransport | None = None, From 852739bee084238366810caa7fb80a09bb43d60a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Apr 2024 11:17:58 +0000 Subject: [PATCH 0014/1325] docs(api): update links to NAICS classification codes (#408) --- src/increase/resources/entities/industry_code.py | 8 ++++---- .../types/entities/industry_code_create_params.py | 4 ++-- src/increase/types/entity_create_params.py | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py index 93255bbd1..d5126e8fb 100644 --- a/src/increase/resources/entities/industry_code.py +++ b/src/increase/resources/entities/industry_code.py @@ -53,8 +53,8 @@ def create( industry_code: The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available at - https://www.naics.com. + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). extra_headers: Send extra headers @@ -115,8 +115,8 @@ async def create( industry_code: The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available at - https://www.naics.com. + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). extra_headers: Send extra headers diff --git a/src/increase/types/entities/industry_code_create_params.py b/src/increase/types/entities/industry_code_create_params.py index 033976c3a..254bbbf3e 100644 --- a/src/increase/types/entities/industry_code_create_params.py +++ b/src/increase/types/entities/industry_code_create_params.py @@ -12,6 +12,6 @@ class IndustryCodeCreateParams(TypedDict, total=False): """ The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available at - https://www.naics.com. + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 01e1afd82..dda06bf3f 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -305,8 +305,8 @@ class Corporation(TypedDict, total=False): """ The North American Industry Classification System (NAICS) code for the corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available at - https://www.naics.com. + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). """ website: str From 99716848031c61bcd8124c30b3c671b425f71dda Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Apr 2024 12:21:44 +0000 Subject: [PATCH 0015/1325] feat(models): add to_dict & to_json helper methods (#409) --- README.md | 6 ++-- src/increase/_models.py | 73 +++++++++++++++++++++++++++++++++++++++++ tests/test_models.py | 64 ++++++++++++++++++++++++++++++++++++ 3 files changed, 140 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index d6d7de87a..e54130bd5 100644 --- a/README.md +++ b/README.md @@ -74,10 +74,10 @@ Functionality between the synchronous and asynchronous clients is otherwise iden ## 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 provide helper methods for things like: +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: -- Serializing back into JSON, `model.model_dump_json(indent=2, exclude_unset=True)` -- Converting to a dictionary, `model.model_dump(exclude_unset=True)` +- Serializing back into JSON, `model.to_json()` +- Converting to a dictionary, `model.to_dict()` Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. diff --git a/src/increase/_models.py b/src/increase/_models.py index 0f001150f..80ab51256 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -90,6 +90,79 @@ def model_fields_set(self) -> set[str]: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] extra: Any = pydantic.Extra.allow # type: ignore + def to_dict( + self, + *, + mode: Literal["json", "python"] = "python", + use_api_names: bool = True, + exclude_unset: bool = True, + exclude_defaults: bool = False, + exclude_none: bool = False, + warnings: bool = True, + ) -> dict[str, object]: + """Recursively generate a dictionary representation of the model, optionally specifying which fields to include or exclude. + + By default, fields that were not set by the API will not be included, + and keys will match the API response, *not* the property names from the model. + + For example, if the API responds with `"fooBar": true` but we've defined a `foo_bar: bool` property, + the output will use the `"fooBar"` key (unless `use_api_names=False` is passed). + + Args: + mode: + If mode is 'json', the dictionary will only contain JSON serializable types. e.g. `datetime` will be turned into a string, `"2024-3-22T18:11:19.117000Z"`. + If mode is 'python', the dictionary may contain any Python objects. e.g. `datetime(2024, 3, 22)` + + use_api_names: Whether to use the key that the API responded with or the property name. Defaults to `True`. + exclude_unset: Whether to exclude fields that have not been explicitly set. + exclude_defaults: Whether to exclude fields that are set to their default value from the output. + exclude_none: Whether to exclude fields that have a value of `None` from the output. + warnings: Whether to log warnings when invalid fields are encountered. This is only supported in Pydantic v2. + """ + return self.model_dump( + mode=mode, + by_alias=use_api_names, + exclude_unset=exclude_unset, + exclude_defaults=exclude_defaults, + exclude_none=exclude_none, + warnings=warnings, + ) + + def to_json( + self, + *, + indent: int | None = 2, + use_api_names: bool = True, + exclude_unset: bool = True, + exclude_defaults: bool = False, + exclude_none: bool = False, + warnings: bool = True, + ) -> str: + """Generates a JSON string representing this model as it would be received from or sent to the API (but with indentation). + + By default, fields that were not set by the API will not be included, + and keys will match the API response, *not* the property names from the model. + + For example, if the API responds with `"fooBar": true` but we've defined a `foo_bar: bool` property, + the output will use the `"fooBar"` key (unless `use_api_names=False` is passed). + + Args: + indent: Indentation to use in the JSON output. If `None` is passed, the output will be compact. Defaults to `2` + use_api_names: Whether to use the key that the API responded with or the property name. Defaults to `True`. + exclude_unset: Whether to exclude fields that have not been explicitly set. + exclude_defaults: Whether to exclude fields that have the default value. + exclude_none: Whether to exclude fields that have a value of `None`. + warnings: Whether to show any warnings that occurred during serialization. This is only supported in Pydantic v2. + """ + return self.model_dump_json( + indent=indent, + by_alias=use_api_names, + exclude_unset=exclude_unset, + exclude_defaults=exclude_defaults, + exclude_none=exclude_none, + warnings=warnings, + ) + @override def __str__(self) -> str: # mypy complains about an invalid self arg diff --git a/tests/test_models.py b/tests/test_models.py index 00dd71bcd..bea66f805 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -501,6 +501,42 @@ class Model(BaseModel): assert "resource_id" in m.model_fields_set +def test_to_dict() -> None: + class Model(BaseModel): + foo: Optional[str] = Field(alias="FOO", default=None) + + m = Model(FOO="hello") + assert m.to_dict() == {"FOO": "hello"} + assert m.to_dict(use_api_names=False) == {"foo": "hello"} + + m2 = Model() + assert m2.to_dict() == {} + assert m2.to_dict(exclude_unset=False) == {"FOO": None} + assert m2.to_dict(exclude_unset=False, exclude_none=True) == {} + assert m2.to_dict(exclude_unset=False, exclude_defaults=True) == {} + + m3 = Model(FOO=None) + assert m3.to_dict() == {"FOO": None} + assert m3.to_dict(exclude_none=True) == {} + assert m3.to_dict(exclude_defaults=True) == {} + + if PYDANTIC_V2: + + class Model2(BaseModel): + created_at: datetime + + time_str = "2024-03-21T11:39:01.275859" + m4 = Model2.construct(created_at=time_str) + assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} + assert m4.to_dict(mode="json") == {"created_at": time_str} + else: + with pytest.raises(ValueError, match="mode is only supported in Pydantic v2"): + m.to_dict(mode="json") + + with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): + m.to_dict(warnings=False) + + def test_forwards_compat_model_dump_method() -> None: class Model(BaseModel): foo: Optional[str] = Field(alias="FOO", default=None) @@ -532,6 +568,34 @@ class Model(BaseModel): m.model_dump(warnings=False) +def test_to_json() -> None: + class Model(BaseModel): + foo: Optional[str] = Field(alias="FOO", default=None) + + m = Model(FOO="hello") + assert json.loads(m.to_json()) == {"FOO": "hello"} + assert json.loads(m.to_json(use_api_names=False)) == {"foo": "hello"} + + if PYDANTIC_V2: + assert m.to_json(indent=None) == '{"FOO":"hello"}' + else: + assert m.to_json(indent=None) == '{"FOO": "hello"}' + + m2 = Model() + assert json.loads(m2.to_json()) == {} + assert json.loads(m2.to_json(exclude_unset=False)) == {"FOO": None} + assert json.loads(m2.to_json(exclude_unset=False, exclude_none=True)) == {} + assert json.loads(m2.to_json(exclude_unset=False, exclude_defaults=True)) == {} + + m3 = Model(FOO=None) + assert json.loads(m3.to_json()) == {"FOO": None} + assert json.loads(m3.to_json(exclude_none=True)) == {} + + if not PYDANTIC_V2: + with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): + m.to_json(warnings=False) + + def test_forwards_compat_model_dump_json_method() -> None: class Model(BaseModel): foo: Optional[str] = Field(alias="FOO", default=None) From af78560d648ff1a3728e0847f11417cf80ded850 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 10:31:15 +0000 Subject: [PATCH 0016/1325] chore: fix typo (#410) --- src/increase/_utils/_proxy.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index b9c12dc3f..c46a62a69 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -10,7 +10,7 @@ class LazyProxy(Generic[T], ABC): """Implements data methods to pretend that an instance is another instance. - This includes forwarding attribute access and othe methods. + This includes forwarding attribute access and other methods. """ # Note: we have to special case proxies that themselves return proxies From cb45b71f990c60aa71292df720e17f59842d545d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Apr 2024 15:04:44 +0000 Subject: [PATCH 0017/1325] feat(api): updates (#411) --- ...ime_payments_transfer_simulation_result.py | 41 +++++++++++++++++++ src/increase/types/transaction.py | 41 +++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 3 files changed, 83 insertions(+) diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 4b3977631..8fca3a093 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -48,6 +48,7 @@ "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", + "TransactionSourceCashbackPayment", "TransactionSourceCheckDepositAcceptance", "TransactionSourceCheckDepositReturn", "TransactionSourceCheckTransferDeposit", @@ -2369,6 +2370,36 @@ class TransactionSourceCardSettlement(BaseModel): """ +class TransactionSourceCashbackPayment(BaseModel): + accrued_on_card_id: str + """The card on which the cashback was accrued.""" + + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + period_end: datetime + """The end of the period for which this transaction paid cashback.""" + + period_start: datetime + """The start of the period for which this transaction paid cashback.""" + + class TransactionSourceCheckDepositAcceptance(BaseModel): account_number: str """The account number printed on the check.""" @@ -3378,11 +3409,19 @@ class TransactionSource(BaseModel): equal to `card_settlement`. """ + cashback_payment: Optional[TransactionSourceCashbackPayment] = None + """A Cashback Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `cashback_payment`. + """ + category: Literal[ "account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection", "ach_transfer_return", + "cashback_payment", "card_dispute_acceptance", "card_refund", "card_settlement", @@ -3423,6 +3462,8 @@ class TransactionSource(BaseModel): `ach_transfer_rejection` object. - `ach_transfer_return` - ACH Transfer Return: details will be under the `ach_transfer_return` object. + - `cashback_payment` - Cashback Payment: details will be under the + `cashback_payment` object. - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 9ac4c3df8..feaa8400d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -33,6 +33,7 @@ "SourceCardSettlementPurchaseDetailsTravelAncillary", "SourceCardSettlementPurchaseDetailsTravelAncillaryService", "SourceCardSettlementPurchaseDetailsTravelTripLeg", + "SourceCashbackPayment", "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", @@ -1405,6 +1406,36 @@ class SourceCardSettlement(BaseModel): """ +class SourceCashbackPayment(BaseModel): + accrued_on_card_id: str + """The card on which the cashback was accrued.""" + + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + period_end: datetime + """The end of the period for which this transaction paid cashback.""" + + period_start: datetime + """The start of the period for which this transaction paid cashback.""" + + class SourceCheckDepositAcceptance(BaseModel): account_number: str """The account number printed on the check.""" @@ -2414,11 +2445,19 @@ class Source(BaseModel): equal to `card_settlement`. """ + cashback_payment: Optional[SourceCashbackPayment] = None + """A Cashback Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `cashback_payment`. + """ + category: Literal[ "account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection", "ach_transfer_return", + "cashback_payment", "card_dispute_acceptance", "card_refund", "card_settlement", @@ -2459,6 +2498,8 @@ class Source(BaseModel): `ach_transfer_rejection` object. - `ach_transfer_return` - ACH Transfer Return: details will be under the `ach_transfer_return` object. + - `cashback_payment` - Cashback Payment: details will be under the + `cashback_payment` object. - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index ffdbc2eb8..9d67c9f9c 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -44,6 +44,7 @@ class TransactionListParams(TypedDict, total=False): "ach_transfer_intention", "ach_transfer_rejection", "ach_transfer_return", + "cashback_payment", "card_dispute_acceptance", "card_refund", "card_settlement", From e37f1d8b3d046334c151ed7abcf5a96b568a9d17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Apr 2024 13:00:34 +0000 Subject: [PATCH 0018/1325] fix(types): mark physical card cardholder as required (#412) --- src/increase/types/physical_card.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 9772051ea..5d6acf95c 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -97,7 +97,7 @@ class PhysicalCard(BaseModel): card_id: str """The identifier for the Card this Physical Card represents.""" - cardholder: Optional[Cardholder] = None + cardholder: Cardholder """Details about the cardholder, as it appears on the printed card.""" created_at: datetime From 33fcb1952a5cd5e1c438f5cb91db99287d0df5ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Apr 2024 16:53:16 +0000 Subject: [PATCH 0019/1325] chore(internal): formatting (#414) --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5072ba654..c1a601296 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,7 +22,7 @@ jobs: echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 - RYE_INSTALL_OPTION: "--yes" + RYE_INSTALL_OPTION: '--yes' - name: Install dependencies run: | @@ -39,3 +39,5 @@ jobs: - name: Ensure importable run: | rye run python -c 'import increase' + + From 03a1c1d13dec625ddd51ecf6e14fce5c0d4784d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 06:04:36 +0000 Subject: [PATCH 0020/1325] feat(api): add /inbound_check_deposits endpoints (#416) --- .stats.yml | 2 +- api.md | 20 +- src/increase/_client.py | 10 + src/increase/resources/__init__.py | 14 + src/increase/resources/exports.py | 26 ++ .../resources/inbound_check_deposits.py | 270 ++++++++++++++++++ .../resources/simulations/__init__.py | 14 + .../resources/simulations/check_transfers.py | 100 ------- .../simulations/inbound_check_deposits.py | 198 +++++++++++++ .../resources/simulations/simulations.py | 32 +++ .../resources/wire_drawdown_requests.py | 38 +++ src/increase/types/__init__.py | 2 + src/increase/types/check_transfer.py | 6 + src/increase/types/declined_transaction.py | 11 + src/increase/types/export_list_params.py | 82 +++++- src/increase/types/inbound_check_deposit.py | 91 ++++++ .../inbound_check_deposit_list_params.py | 53 ++++ src/increase/types/simulations/__init__.py | 1 + .../card_authorization_simulation.py | 11 + .../inbound_check_deposit_create_params.py | 18 ++ ...ime_payments_transfer_simulation_result.py | 19 +- src/increase/types/transaction.py | 8 +- .../wire_drawdown_request_list_params.py | 21 +- .../simulations/test_check_transfers.py | 76 ----- .../test_inbound_check_deposits.py | 96 +++++++ tests/api_resources/test_exports.py | 18 ++ .../test_inbound_check_deposits.py | 184 ++++++++++++ .../test_wire_drawdown_requests.py | 4 + 28 files changed, 1242 insertions(+), 183 deletions(-) create mode 100644 src/increase/resources/inbound_check_deposits.py create mode 100644 src/increase/resources/simulations/inbound_check_deposits.py create mode 100644 src/increase/types/inbound_check_deposit.py create mode 100644 src/increase/types/inbound_check_deposit_list_params.py create mode 100644 src/increase/types/simulations/inbound_check_deposit_create_params.py create mode 100644 tests/api_resources/simulations/test_inbound_check_deposits.py create mode 100644 tests/api_resources/test_inbound_check_deposits.py diff --git a/.stats.yml b/.stats.yml index e2365cb8d..b1d0d6491 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 184 +configured_endpoints: 186 diff --git a/api.md b/api.md index 212bf7815..8d8910595 100644 --- a/api.md +++ b/api.md @@ -569,7 +569,6 @@ Methods: Methods: -- client.simulations.check_transfers.deposit(check_transfer_id) -> CheckTransfer - client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer ## Documents @@ -666,6 +665,12 @@ Methods: - client.simulations.physical_cards.shipment_advance(physical_card_id, \*\*params) -> PhysicalCard +## InboundCheckDeposits + +Methods: + +- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit + # PhysicalCards Types: @@ -835,3 +840,16 @@ Methods: - client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] - client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile - client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile + +# InboundCheckDeposits + +Types: + +```python +from increase.types import InboundCheckDeposit +``` + +Methods: + +- client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit +- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] diff --git a/src/increase/_client.py b/src/increase/_client.py index b7735bbc4..25a97da7e 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -103,6 +103,7 @@ class Increase(SyncAPIClient): inbound_wire_transfers: resources.InboundWireTransfers digital_card_profiles: resources.DigitalCardProfiles physical_card_profiles: resources.PhysicalCardProfiles + inbound_check_deposits: resources.InboundCheckDeposits with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -249,6 +250,7 @@ def __init__( self.inbound_wire_transfers = resources.InboundWireTransfers(self) self.digital_card_profiles = resources.DigitalCardProfiles(self) self.physical_card_profiles = resources.PhysicalCardProfiles(self) + self.inbound_check_deposits = resources.InboundCheckDeposits(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -472,6 +474,7 @@ class AsyncIncrease(AsyncAPIClient): inbound_wire_transfers: resources.AsyncInboundWireTransfers digital_card_profiles: resources.AsyncDigitalCardProfiles physical_card_profiles: resources.AsyncPhysicalCardProfiles + inbound_check_deposits: resources.AsyncInboundCheckDeposits with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -618,6 +621,7 @@ def __init__( self.inbound_wire_transfers = resources.AsyncInboundWireTransfers(self) self.digital_card_profiles = resources.AsyncDigitalCardProfiles(self) self.physical_card_profiles = resources.AsyncPhysicalCardProfiles(self) + self.inbound_check_deposits = resources.AsyncInboundCheckDeposits(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -856,6 +860,7 @@ def __init__(self, client: Increase) -> None: self.inbound_wire_transfers = resources.InboundWireTransfersWithRawResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.DigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithRawResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.InboundCheckDepositsWithRawResponse(client.inbound_check_deposits) class AsyncIncreaseWithRawResponse: @@ -920,6 +925,7 @@ def __init__(self, client: AsyncIncrease) -> None: self.inbound_wire_transfers = resources.AsyncInboundWireTransfersWithRawResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.AsyncDigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithRawResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithRawResponse(client.inbound_check_deposits) class IncreaseWithStreamedResponse: @@ -986,6 +992,7 @@ def __init__(self, client: Increase) -> None: self.inbound_wire_transfers = resources.InboundWireTransfersWithStreamingResponse(client.inbound_wire_transfers) self.digital_card_profiles = resources.DigitalCardProfilesWithStreamingResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithStreamingResponse(client.physical_card_profiles) + self.inbound_check_deposits = resources.InboundCheckDepositsWithStreamingResponse(client.inbound_check_deposits) class AsyncIncreaseWithStreamedResponse: @@ -1068,6 +1075,9 @@ def __init__(self, client: AsyncIncrease) -> None: self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithStreamingResponse( client.physical_card_profiles ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithStreamingResponse( + client.inbound_check_deposits + ) Client = Increase diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index cb0f386e3..19d6e2f27 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -296,6 +296,14 @@ BookkeepingEntrySetsWithStreamingResponse, AsyncBookkeepingEntrySetsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .inbound_wire_transfers import ( InboundWireTransfers, AsyncInboundWireTransfers, @@ -646,4 +654,10 @@ "AsyncPhysicalCardProfilesWithRawResponse", "PhysicalCardProfilesWithStreamingResponse", "AsyncPhysicalCardProfilesWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", ] diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 5383ac398..f9994bb78 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -153,8 +153,12 @@ def retrieve( def list( self, *, + category: export_list_params.Category | NotGiven = NOT_GIVEN, + created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: export_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -168,6 +172,11 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -189,8 +198,12 @@ def list( timeout=timeout, query=maybe_transform( { + "category": category, + "created_at": created_at, "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, export_list_params.ExportListParams, ), @@ -327,8 +340,12 @@ async def retrieve( def list( self, *, + category: export_list_params.Category | NotGiven = NOT_GIVEN, + created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: export_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -342,6 +359,11 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -363,8 +385,12 @@ def list( timeout=timeout, query=maybe_transform( { + "category": category, + "created_at": created_at, "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, export_list_params.ExportListParams, ), diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py new file mode 100644 index 000000000..ad1862689 --- /dev/null +++ b/src/increase/resources/inbound_check_deposits.py @@ -0,0 +1,270 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from .. import _legacy_response +from ..types import InboundCheckDeposit, inbound_check_deposit_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..pagination import SyncPage, AsyncPage +from .._base_client import ( + AsyncPaginator, + make_request_options, +) + +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] + + +class InboundCheckDeposits(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) + + def retrieve( + self, + inbound_check_deposit_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundCheckDeposit: + """ + Retrieve an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._get( + f"/inbound_check_deposits/{inbound_check_deposit_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundCheckDeposit, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[InboundCheckDeposit]: + """ + List Inbound Check Deposits + + Args: + account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_check_deposits", + page=SyncPage[InboundCheckDeposit], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_check_deposit_list_params.InboundCheckDepositListParams, + ), + ), + model=InboundCheckDeposit, + ) + + +class AsyncInboundCheckDeposits(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) + + async def retrieve( + self, + inbound_check_deposit_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundCheckDeposit: + """ + Retrieve an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._get( + f"/inbound_check_deposits/{inbound_check_deposit_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundCheckDeposit, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[InboundCheckDeposit, AsyncPage[InboundCheckDeposit]]: + """ + List Inbound Check Deposits + + Args: + account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_check_deposits", + page=AsyncPage[InboundCheckDeposit], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_check_deposit_list_params.InboundCheckDepositListParams, + ), + ), + model=InboundCheckDeposit, + ) + + +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.list, + ) + + +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.list, + ) + + +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = to_streamed_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = to_streamed_response_wrapper( + inbound_check_deposits.list, + ) + + +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.retrieve = async_to_streamed_response_wrapper( + inbound_check_deposits.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + inbound_check_deposits.list, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index a5b69dad3..7fa844bf6 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -120,6 +120,14 @@ InboundFundsHoldsWithStreamingResponse, AsyncInboundFundsHoldsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfers, AsyncRealTimePaymentsTransfers, @@ -248,6 +256,12 @@ "AsyncPhysicalCardsWithRawResponse", "PhysicalCardsWithStreamingResponse", "AsyncPhysicalCardsWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", "Simulations", "AsyncSimulations", "SimulationsWithRawResponse", diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index f04195670..481cad4ef 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -26,50 +26,6 @@ def with_raw_response(self) -> CheckTransfersWithRawResponse: def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: return CheckTransfersWithStreamingResponse(self) - def deposit( - self, - check_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CheckTransfer: - """Simulates a [Check Transfer](#check-transfers) being deposited at a bank. - - This - transfer must first have a `status` of `mailed`. - - Args: - check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not check_transfer_id: - raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") - return self._post( - f"/simulations/check_transfers/{check_transfer_id}/deposit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CheckTransfer, - ) - def mail( self, check_transfer_id: str, @@ -124,50 +80,6 @@ def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: return AsyncCheckTransfersWithStreamingResponse(self) - async def deposit( - self, - check_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CheckTransfer: - """Simulates a [Check Transfer](#check-transfers) being deposited at a bank. - - This - transfer must first have a `status` of `mailed`. - - Args: - check_transfer_id: The identifier of the Check Transfer you wish to mark deposited. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not check_transfer_id: - raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") - return await self._post( - f"/simulations/check_transfers/{check_transfer_id}/deposit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CheckTransfer, - ) - async def mail( self, check_transfer_id: str, @@ -217,9 +129,6 @@ class CheckTransfersWithRawResponse: def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = _legacy_response.to_raw_response_wrapper( - check_transfers.deposit, - ) self.mail = _legacy_response.to_raw_response_wrapper( check_transfers.mail, ) @@ -229,9 +138,6 @@ class AsyncCheckTransfersWithRawResponse: def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = _legacy_response.async_to_raw_response_wrapper( - check_transfers.deposit, - ) self.mail = _legacy_response.async_to_raw_response_wrapper( check_transfers.mail, ) @@ -241,9 +147,6 @@ class CheckTransfersWithStreamingResponse: def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = to_streamed_response_wrapper( - check_transfers.deposit, - ) self.mail = to_streamed_response_wrapper( check_transfers.mail, ) @@ -253,9 +156,6 @@ class AsyncCheckTransfersWithStreamingResponse: def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.deposit = async_to_streamed_response_wrapper( - check_transfers.deposit, - ) self.mail = async_to_streamed_response_wrapper( check_transfers.mail, ) diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py new file mode 100644 index 000000000..dd3585461 --- /dev/null +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -0,0 +1,198 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ...types import InboundCheckDeposit +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import ( + make_request_options, +) +from ...types.simulations import inbound_check_deposit_create_params + +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] + + +class InboundCheckDeposits(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + check_number: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """Simulates an Inbound Check Deposit against your account. + + This imitates someone + depositing a check at their bank that was issued from your account. It may or + may not be associated with a Check Transfer. Increase will evaluate the Check + Deposit as we would in production and either create a Transaction or a Declined + Transaction as a result. You can inspect the resulting Inbound Check Deposit + object to see the result. + + Args: + account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. + + amount: The check amount in cents. + + check_number: The check number on the check to be deposited. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_check_deposits", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "check_number": check_number, + }, + inbound_check_deposit_create_params.InboundCheckDepositCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class AsyncInboundCheckDeposits(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + check_number: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """Simulates an Inbound Check Deposit against your account. + + This imitates someone + depositing a check at their bank that was issued from your account. It may or + may not be associated with a Check Transfer. Increase will evaluate the Check + Deposit as we would in production and either create a Transaction or a Declined + Transaction as a result. You can inspect the resulting Inbound Check Deposit + object to see the result. + + Args: + account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. + + amount: The check amount in cents. + + check_number: The check number on the check to be deposited. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_check_deposits", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "check_number": check_number, + }, + inbound_check_deposit_create_params.InboundCheckDepositCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.create, + ) + + +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.create, + ) + + +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = to_streamed_response_wrapper( + inbound_check_deposits.create, + ) + + +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: + self._inbound_check_deposits = inbound_check_deposits + + self.create = async_to_streamed_response_wrapper( + inbound_check_deposits.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4e37f18ec..6bbff3948 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -135,6 +135,14 @@ InboundFundsHoldsWithStreamingResponse, AsyncInboundFundsHoldsWithStreamingResponse, ) +from .inbound_check_deposits import ( + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfers, AsyncRealTimePaymentsTransfers, @@ -232,6 +240,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfers: def physical_cards(self) -> PhysicalCards: return PhysicalCards(self._client) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDeposits: + return InboundCheckDeposits(self._client) + @cached_property def with_raw_response(self) -> SimulationsWithRawResponse: return SimulationsWithRawResponse(self) @@ -522,6 +534,10 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfers: def physical_cards(self) -> AsyncPhysicalCards: return AsyncPhysicalCards(self._client) + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: + return AsyncInboundCheckDeposits(self._client) + @cached_property def with_raw_response(self) -> AsyncSimulationsWithRawResponse: return AsyncSimulationsWithRawResponse(self) @@ -828,6 +844,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithRawRespon def physical_cards(self) -> PhysicalCardsWithRawResponse: return PhysicalCardsWithRawResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + class AsyncSimulationsWithRawResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -914,6 +934,10 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithRawR def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: return AsyncPhysicalCardsWithRawResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + class SimulationsWithStreamingResponse: def __init__(self, simulations: Simulations) -> None: @@ -1000,6 +1024,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithStreaming def physical_cards(self) -> PhysicalCardsWithStreamingResponse: return PhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + @cached_property + def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + class AsyncSimulationsWithStreamingResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -1085,3 +1113,7 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithStre @cached_property def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: return AsyncPhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 3b683ae24..6beda6b88 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from .. import _legacy_response @@ -179,7 +181,9 @@ def list( self, *, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -193,9 +197,23 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -215,7 +233,9 @@ def list( query=maybe_transform( { "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), @@ -376,7 +396,9 @@ def list( self, *, cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -390,9 +412,23 @@ def list( Args: cursor: Return the page of entries after this one. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -412,7 +448,9 @@ def list( query=maybe_transform( { "cursor": cursor, + "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c495ff163..00b72e203 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -55,6 +55,7 @@ from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams +from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest @@ -110,6 +111,7 @@ from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams +from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams from .simulation_card_increments_params import SimulationCardIncrementsParams as SimulationCardIncrementsParams diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index db7bd7e4e..94db3574c 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -71,6 +71,12 @@ class Deposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 7d155ec25..a6625de3b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -34,6 +34,9 @@ class SourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -458,12 +461,20 @@ class SourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index e918fdaf4..7943d4dad 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -2,17 +2,95 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict -__all__ = ["ExportListParams"] +from .._utils import PropertyInfo + +__all__ = ["ExportListParams", "Category", "CreatedAt", "Status"] class ExportListParams(TypedDict, total=False): + category: Category + + created_at: CreatedAt + cursor: str """Return the page of entries after this one.""" + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + limit: int """Limit the size of the list that is returned. The default (and maximum) is 100 objects. """ + + status: Status + + +_CategoryReservedKeywords = TypedDict( + "_CategoryReservedKeywords", + { + "in": List[ + Literal[ + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + ] + ], + }, + total=False, +) + + +class Category(_CategoryReservedKeywords, total=False): + pass + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "complete", "failed"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py new file mode 100644 index 000000000..d9f2e8a79 --- /dev/null +++ b/src/increase/types/inbound_check_deposit.py @@ -0,0 +1,91 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["InboundCheckDeposit"] + + +class InboundCheckDeposit(BaseModel): + id: str + """The deposit's identifier.""" + + account_id: str + """The Account the check is being deposited against.""" + + account_number_id: str + """The Account Number the check is being deposited against.""" + + amount: int + """The deposited amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + back_image_file_id: Optional[str] = None + """The ID for the File containing the image of the back of the check.""" + + bank_of_first_deposit_routing_number: Optional[str] = None + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + bank depositing this check. In some rare cases, this is not transmitted via + Check21 and the value will be null. + """ + + check_number: Optional[str] = None + """The check number printed on the check being deposited.""" + + check_transfer_id: Optional[str] = None + """ + If this deposit is for an existing Check Transfer, the identifier of that Check + Transfer. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the deposit was attempted. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the deposit. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + declined_transaction_id: Optional[str] = None + """ + If the deposit attempt has been rejected, the identifier of the Declined + Transaction object created as a result of the failed deposit. + """ + + front_image_file_id: Optional[str] = None + """The ID for the File containing the image of the front of the check.""" + + status: Literal["pending", "accepted", "rejected"] + """The status of the Inbound Check Deposit. + + - `pending` - The Inbound Check Deposit is pending. + - `accepted` - The Inbound Check Deposit was accepted. + - `rejected` - The Inbound Check Deposit was rejected. + """ + + transaction_id: Optional[str] = None + """ + If the deposit attempt has been accepted, the identifier of the Transaction + object created as a result of the successful deposit. + """ + + type: Literal["inbound_check_deposit"] + """A constant representing the object's type. + + For this resource it will always be `inbound_check_deposit`. + """ diff --git a/src/increase/types/inbound_check_deposit_list_params.py b/src/increase/types/inbound_check_deposit_list_params.py new file mode 100644 index 000000000..2cb5292f2 --- /dev/null +++ b/src/increase/types/inbound_check_deposit_list_params.py @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["InboundCheckDepositListParams", "CreatedAt"] + + +class InboundCheckDepositListParams(TypedDict, total=False): + account_id: str + """Filter Inbound Check Deposits to those belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 5ba967ddb..a30c73409 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -13,6 +13,7 @@ from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams +from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams from .physical_card_shipment_advance_params import ( diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 70bd94bb7..308d99b0e 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -51,6 +51,9 @@ class DeclinedTransactionSourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -475,12 +478,20 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", diff --git a/src/increase/types/simulations/inbound_check_deposit_create_params.py b/src/increase/types/simulations/inbound_check_deposit_create_params.py new file mode 100644 index 000000000..8d7e7b0aa --- /dev/null +++ b/src/increase/types/simulations/inbound_check_deposit_create_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundCheckDepositCreateParams"] + + +class InboundCheckDepositCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the Inbound Check Deposit will be against.""" + + amount: Required[int] + """The check amount in cents.""" + + check_number: Required[str] + """The check number on the check to be deposited.""" diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 8fca3a093..8753b47dc 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -83,6 +83,9 @@ class DeclinedTransactionSourceACHDecline(BaseModel): For dollars, for example, this is cents. """ + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + originator_company_descriptive_date: Optional[str] = None """The descriptive date of the transfer.""" @@ -507,12 +510,20 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): declined check. """ + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + front_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the front of the declined check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + reason: Literal[ "ach_route_disabled", "ach_route_canceled", @@ -2565,6 +2576,12 @@ class TransactionSourceCheckTransferDeposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" @@ -2695,7 +2712,7 @@ class TransactionSourceInboundACHTransfer(BaseModel): """ transfer_id: str - """The inbound ach transfer's identifier.""" + """The Inbound ACH Transfer's identifier.""" class TransactionSourceInboundInternationalACHTransfer(BaseModel): diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index feaa8400d..f919631b5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1601,6 +1601,12 @@ class SourceCheckTransferDeposit(BaseModel): deposited check. """ + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + transaction_id: Optional[str] = None """The identifier of the Transaction object created when the check was deposited.""" @@ -1731,7 +1737,7 @@ class SourceInboundACHTransfer(BaseModel): """ transfer_id: str - """The inbound ach transfer's identifier.""" + """The Inbound ACH Transfer's identifier.""" class SourceInboundInternationalACHTransfer(BaseModel): diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index 0552d1801..e36ed2aea 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Literal, TypedDict __all__ = ["WireDrawdownRequestListParams"] @@ -11,8 +11,27 @@ class WireDrawdownRequestListParams(TypedDict, total=False): cursor: str """Return the page of entries after this one.""" + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + limit: int """Limit the size of the list that is returned. The default (and maximum) is 100 objects. """ + + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] + """Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + """ diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 45fad5096..14d3b4075 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -17,44 +17,6 @@ class TestCheckTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @parametrize - def test_method_deposit(self, client: Increase) -> None: - check_transfer = client.simulations.check_transfers.deposit( - "string", - ) - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - def test_raw_response_deposit(self, client: Increase) -> None: - response = client.simulations.check_transfers.with_raw_response.deposit( - "string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - def test_streaming_response_deposit(self, client: Increase) -> None: - with client.simulations.check_transfers.with_streaming_response.deposit( - "string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_deposit(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): - client.simulations.check_transfers.with_raw_response.deposit( - "", - ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_mail(self, client: Increase) -> None: @@ -101,44 +63,6 @@ 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 - async def test_method_deposit(self, async_client: AsyncIncrease) -> None: - check_transfer = await async_client.simulations.check_transfers.deposit( - "string", - ) - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - async def test_raw_response_deposit(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.check_transfers.with_raw_response.deposit( - "string", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_deposit(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.check_transfers.with_streaming_response.deposit( - "string", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - check_transfer = await response.parse() - assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_deposit(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): - await async_client.simulations.check_transfers.with_raw_response.deposit( - "", - ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_mail(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 new file mode 100644 index 000000000..48760003f --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -0,0 +1,96 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundCheckDeposit + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundCheckDeposits: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_check_deposit = client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_check_deposits.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_check_deposits.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundCheckDeposits: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_check_deposits.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_check_deposits.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index ccb95eb23..c95473d10 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -140,8 +140,17 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: export = client.exports.list( + category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="string", + idempotency_key="x", limit=1, + status={"in": ["pending", "complete", "failed"]}, ) assert_matches_type(SyncPage[Export], export, path=["response"]) @@ -290,8 +299,17 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list( + category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="string", + idempotency_key="x", limit=1, + status={"in": ["pending", "complete", "failed"]}, ) assert_matches_type(AsyncPage[Export], export, path=["response"]) diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py new file mode 100644 index 000000000..a77e3c9a0 --- /dev/null +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -0,0 +1,184 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundCheckDeposit +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundCheckDeposits: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.retrieve( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.list() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + ) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundCheckDeposits: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.retrieve( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.list() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + ) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 7705d8059..b03363374 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -136,7 +136,9 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.list( cursor="string", + idempotency_key="x", limit=1, + status="pending_submission", ) assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @@ -282,7 +284,9 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.list( cursor="string", + idempotency_key="x", limit=1, + status="pending_submission", ) assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) From a852cc2a82da517b6e46f6fc3d9bb0513037bbbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Apr 2024 18:55:52 +0000 Subject: [PATCH 0021/1325] feat(api): remove deposit field from check transfer (#417) --- src/increase/types/check_transfer.py | 52 +++---------------- src/increase/types/inbound_check_deposit.py | 2 +- ...ime_payments_transfer_simulation_result.py | 4 +- src/increase/types/transaction.py | 4 +- 4 files changed, 9 insertions(+), 53 deletions(-) diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 94db3574c..3685f1963 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -10,7 +10,6 @@ "CheckTransfer", "Approval", "Cancellation", - "Deposit", "Mailing", "PhysicalCheck", "PhysicalCheckMailingAddress", @@ -48,48 +47,6 @@ class Cancellation(BaseModel): """ -class Deposit(BaseModel): - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - deposited check. - """ - - bank_of_first_deposit_routing_number: Optional[str] = None - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - bank depositing this check. In some rare cases, this is not transmitted via - Check21 and the value will be null. - """ - - deposited_at: datetime - """When the check was deposited.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - deposited check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this - transaction. - """ - - transaction_id: Optional[str] = None - """The identifier of the Transaction object created when the check was deposited.""" - - transfer_id: Optional[str] = None - """The identifier of the Check Transfer object that was deposited.""" - - type: Literal["check_transfer_deposit"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_deposit`. - """ - - class Mailing(BaseModel): image_id: Optional[str] = None """ @@ -209,6 +166,12 @@ class CheckTransfer(BaseModel): this will contain details of the approval. """ + approved_inbound_check_deposit_id: Optional[str] = None + """ + If the Check Transfer was successfully deposited, this will contain the + identifier of the Inbound Check Deposit object with details of the deposit. + """ + cancellation: Optional[Cancellation] = None """ If your account requires approvals for transfers and the transfer was not @@ -237,9 +200,6 @@ class CheckTransfer(BaseModel): - `USD` - US Dollar (USD) """ - deposit: Optional[Deposit] = None - """After a check transfer is deposited, this will contain supplemental details.""" - fulfillment_method: Literal["physical_check", "third_party"] """Whether Increase will print and mail the check or if you will do it yourself. diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index d9f2e8a79..00c8dac03 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,7 +16,7 @@ class InboundCheckDeposit(BaseModel): account_id: str """The Account the check is being deposited against.""" - account_number_id: str + account_number_id: Optional[str] = None """The Account Number the check is being deposited against.""" amount: int diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 8753b47dc..54d588a09 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -2382,7 +2382,7 @@ class TransactionSourceCardSettlement(BaseModel): class TransactionSourceCashbackPayment(BaseModel): - accrued_on_card_id: str + accrued_on_card_id: Optional[str] = None """The card on which the cashback was accrued.""" amount: int @@ -3291,7 +3291,6 @@ class TransactionSourceInternalSource(BaseModel): reason: Literal[ "account_closure", "bank_migration", - "cashback", "check_adjustment", "collection_payment", "collection_receivable", @@ -3310,7 +3309,6 @@ class TransactionSourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - - `cashback` - Cashback - `check_adjustment` - Check adjustment - `collection_payment` - Collection payment - `collection_receivable` - Collection receivable diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index f919631b5..0298485bb 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1407,7 +1407,7 @@ class SourceCardSettlement(BaseModel): class SourceCashbackPayment(BaseModel): - accrued_on_card_id: str + accrued_on_card_id: Optional[str] = None """The card on which the cashback was accrued.""" amount: int @@ -2316,7 +2316,6 @@ class SourceInternalSource(BaseModel): reason: Literal[ "account_closure", "bank_migration", - "cashback", "check_adjustment", "collection_payment", "collection_receivable", @@ -2335,7 +2334,6 @@ class SourceInternalSource(BaseModel): - `account_closure` - Account closure - `bank_migration` - Bank migration - - `cashback` - Cashback - `check_adjustment` - Check adjustment - `collection_payment` - Collection payment - `collection_receivable` - Collection receivable From ccb1b3a3197418dfbd35e5f32721dfa73070a33f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:27:51 +0000 Subject: [PATCH 0022/1325] feat(api): add altered_or_fictitious check decline reason (#419) --- src/increase/resources/event_subscriptions.py | 12 ++++++++++++ src/increase/types/declined_transaction.py | 2 ++ src/increase/types/event.py | 6 ++++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 6 ++++++ .../types/event_subscription_create_params.py | 6 ++++++ src/increase/types/inbound_wire_drawdown_request.py | 7 +++++++ .../simulations/card_authorization_simulation.py | 2 ++ ..._real_time_payments_transfer_simulation_result.py | 2 ++ 9 files changed, 45 insertions(+) diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 98b73b330..657f66cf3 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -92,6 +92,8 @@ def create( "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", @@ -212,6 +214,10 @@ def create( Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire @@ -514,6 +520,8 @@ async def create( "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", @@ -634,6 +642,10 @@ async def create( Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index a6625de3b..bc3d6c438 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -478,6 +478,7 @@ class SourceCheckDecline(BaseModel): reason: Literal[ "ach_route_disabled", "ach_route_canceled", + "altered_or_fictitious", "breaches_limit", "entity_not_active", "group_locked", @@ -495,6 +496,7 @@ class SourceCheckDecline(BaseModel): - `ach_route_disabled` - The account number is disabled. - `ach_route_canceled` - The account number is canceled. + - `altered_or_fictitious` - The deposited check was altered or fictitious. - `breaches_limit` - The transaction would cause a limit to be exceeded. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 03620e33d..a109a2792 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -66,6 +66,8 @@ class Event(BaseModel): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", @@ -169,6 +171,10 @@ class Event(BaseModel): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 09070eea4..f8ae7cb90 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -81,6 +81,8 @@ class EventListParams(TypedDict, total=False): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 593dcb962..ab3bfb1e4 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -79,6 +79,8 @@ class EventSubscription(BaseModel): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", @@ -182,6 +184,10 @@ class EventSubscription(BaseModel): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 59efcddf6..19061d15c 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -65,6 +65,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "inbound_ach_transfer.updated", "inbound_ach_transfer_return.created", "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_wire_drawdown_request.created", @@ -167,6 +169,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Transfer Return is created. - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index 9c7e650e4..4a1af3d82 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from typing_extensions import Literal from .._models import BaseModel @@ -33,6 +34,12 @@ class InboundWireDrawdownRequest(BaseModel): beneficiary_routing_number: str """The drawdown request's beneficiary's routing number.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the inbound wire drawdown requested was created. + """ + currency: str """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 308d99b0e..99d7f0827 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -495,6 +495,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): reason: Literal[ "ach_route_disabled", "ach_route_canceled", + "altered_or_fictitious", "breaches_limit", "entity_not_active", "group_locked", @@ -512,6 +513,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): - `ach_route_disabled` - The account number is disabled. - `ach_route_canceled` - The account number is canceled. + - `altered_or_fictitious` - The deposited check was altered or fictitious. - `breaches_limit` - The transaction would cause a limit to be exceeded. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 54d588a09..ffdd5f9a6 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -527,6 +527,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): reason: Literal[ "ach_route_disabled", "ach_route_canceled", + "altered_or_fictitious", "breaches_limit", "entity_not_active", "group_locked", @@ -544,6 +545,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): - `ach_route_disabled` - The account number is disabled. - `ach_route_canceled` - The account number is canceled. + - `altered_or_fictitious` - The deposited check was altered or fictitious. - `breaches_limit` - The transaction would cause a limit to be exceeded. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. From da5e5b1e86a3db5dbe876b1e2b7521b1de6e221c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 20:46:47 +0000 Subject: [PATCH 0023/1325] chore(internal): add lru_cache helper function (#421) --- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_utils.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index 569789419..31b5b2279 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -6,6 +6,7 @@ is_list as is_list, is_given as is_given, is_tuple as is_tuple, + lru_cache as lru_cache, is_mapping as is_mapping, is_tuple_t as is_tuple_t, parse_date as parse_date, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 93c95517a..5123a230f 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -389,3 +389,11 @@ def get_async_library() -> str: return sniffio.current_async_library() except Exception: return "false" + + +def lru_cache(*, maxsize: int | None = 128) -> Callable[[CallableT], CallableT]: + """A version of functools.lru_cache that retains the type signature + for the wrapped function arguments. + """ + wrapper = functools.lru_cache(maxsize=maxsize) + return cast(Any, wrapper) # type: ignore[no-any-return] From af5491b9d36b699eb75dc4fd7fe41965cf50b493 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Apr 2024 22:51:15 +0000 Subject: [PATCH 0024/1325] chore(internal): ban usage of lru_cache (#423) --- pyproject.toml | 7 ++++++- src/increase/_base_client.py | 3 +-- src/increase/_models.py | 2 +- src/increase/_utils/_utils.py | 4 +++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 849cf460e..1b9b30fc2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -161,7 +161,9 @@ select = [ "T201", "T203", # misuse of typing.TYPE_CHECKING - "TCH004" + "TCH004", + # import rules + "TID251", ] ignore = [ # mutable defaults @@ -177,6 +179,9 @@ ignore-init-module-imports = true [tool.ruff.format] docstring-code-format = true +[tool.ruff.lint.flake8-tidy-imports.banned-api] +"functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" + [tool.ruff.lint.isort] length-sort = true length-sort-straight = true diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index e963d0c05..e4961e147 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -29,7 +29,6 @@ cast, overload, ) -from functools import lru_cache from typing_extensions import Literal, override, get_origin import anyio @@ -61,7 +60,7 @@ RequestOptions, ModelBuilderProtocol, ) -from ._utils import is_dict, is_list, is_given, is_mapping +from ._utils import is_dict, is_list, is_given, lru_cache, is_mapping from ._compat import model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( diff --git a/src/increase/_models.py b/src/increase/_models.py index 80ab51256..ff93fbd84 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -4,7 +4,6 @@ import inspect from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast from datetime import date, datetime -from functools import lru_cache from typing_extensions import ( Unpack, Literal, @@ -37,6 +36,7 @@ PropertyInfo, is_list, is_given, + lru_cache, is_mapping, parse_date, coerce_boolean, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 5123a230f..fd3a8a4d1 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -395,5 +395,7 @@ def lru_cache(*, maxsize: int | None = 128) -> Callable[[CallableT], CallableT]: """A version of functools.lru_cache that retains the type signature for the wrapped function arguments. """ - wrapper = functools.lru_cache(maxsize=maxsize) + wrapper = functools.lru_cache( # noqa: TID251 + maxsize=maxsize, + ) return cast(Any, wrapper) # type: ignore[no-any-return] From c052fec3ccec76a54397666d8b0d20dd80574d9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 12:21:23 +0000 Subject: [PATCH 0025/1325] feat(api): add inbound_check_deposits decline endpoint (#424) --- .stats.yml | 2 +- api.md | 1 + .../resources/inbound_check_deposits.py | 100 ++++++++++++++++++ src/increase/types/declined_transaction.py | 4 +- src/increase/types/inbound_ach_transfer.py | 2 +- .../card_authorization_simulation.py | 4 +- ...ime_payments_transfer_simulation_result.py | 4 +- .../test_inbound_check_deposits.py | 80 ++++++++++++++ 8 files changed, 192 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index b1d0d6491..a789b2a49 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1 @@ -configured_endpoints: 186 +configured_endpoints: 187 diff --git a/api.md b/api.md index 8d8910595..3d1d5d33a 100644 --- a/api.md +++ b/api.md @@ -853,3 +853,4 @@ Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] +- client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index ad1862689..f59dec8b8 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -120,6 +120,50 @@ def list( model=InboundCheckDeposit, ) + def decline( + self, + inbound_check_deposit_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Decline an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to decline. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/decline", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class AsyncInboundCheckDeposits(AsyncAPIResource): @cached_property @@ -221,6 +265,50 @@ def list( model=InboundCheckDeposit, ) + async def decline( + self, + inbound_check_deposit_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Decline an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to decline. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/decline", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class InboundCheckDepositsWithRawResponse: def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: @@ -232,6 +320,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self.list = _legacy_response.to_raw_response_wrapper( inbound_check_deposits.list, ) + self.decline = _legacy_response.to_raw_response_wrapper( + inbound_check_deposits.decline, + ) class AsyncInboundCheckDepositsWithRawResponse: @@ -244,6 +335,9 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self.list = _legacy_response.async_to_raw_response_wrapper( inbound_check_deposits.list, ) + self.decline = _legacy_response.async_to_raw_response_wrapper( + inbound_check_deposits.decline, + ) class InboundCheckDepositsWithStreamingResponse: @@ -256,6 +350,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self.list = to_streamed_response_wrapper( inbound_check_deposits.list, ) + self.decline = to_streamed_response_wrapper( + inbound_check_deposits.decline, + ) class AsyncInboundCheckDepositsWithStreamingResponse: @@ -268,3 +365,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self.list = async_to_streamed_response_wrapper( inbound_check_deposits.list, ) + self.decline = async_to_streamed_response_wrapper( + inbound_check_deposits.decline, + ) diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index bc3d6c438..1f40bcab3 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -87,7 +87,7 @@ class SourceACHDecline(BaseModel): transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - The user initiated the decline. + - `user_initiated` - Your integration declined this transfer via the API. """ receiver_id_number: Optional[str] = None @@ -491,6 +491,7 @@ class SourceCheckDecline(BaseModel): "no_account_number_found", "refer_to_image", "unable_to_process", + "user_initiated", ] """Why the check was declined. @@ -513,6 +514,7 @@ class SourceCheckDecline(BaseModel): - `refer_to_image` - The check is not readable. Please refer to the image. - `unable_to_process` - The check cannot be processed. This is rare: please contact support. + - `user_initiated` - Your integration declined this check via the API. """ diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index f4bba8747..3bd6b820f 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -92,7 +92,7 @@ class Decline(BaseModel): transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - The user initiated the decline. + - `user_initiated` - Your integration declined this transfer via the API. """ diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 99d7f0827..0353e5fec 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -104,7 +104,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - The user initiated the decline. + - `user_initiated` - Your integration declined this transfer via the API. """ receiver_id_number: Optional[str] = None @@ -508,6 +508,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): "no_account_number_found", "refer_to_image", "unable_to_process", + "user_initiated", ] """Why the check was declined. @@ -530,6 +531,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): - `refer_to_image` - The check is not readable. Please refer to the image. - `unable_to_process` - The check cannot be processed. This is rare: please contact support. + - `user_initiated` - Your integration declined this check via the API. """ diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index ffdd5f9a6..214d9818f 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -136,7 +136,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - The user initiated the decline. + - `user_initiated` - Your integration declined this transfer via the API. """ receiver_id_number: Optional[str] = None @@ -540,6 +540,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): "no_account_number_found", "refer_to_image", "unable_to_process", + "user_initiated", ] """Why the check was declined. @@ -562,6 +563,7 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): - `refer_to_image` - The check is not readable. Please refer to the image. - `unable_to_process` - The check cannot be processed. This is rare: please contact support. + - `user_initiated` - Your integration declined this check via the API. """ diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index a77e3c9a0..92d46b2e1 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -99,6 +99,46 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_decline(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.decline( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_decline(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.decline( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_decline(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.decline( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_decline(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.decline( + "", + ) + class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -182,3 +222,43 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_decline(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.decline( + "string", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.decline( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.decline( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.decline( + "", + ) From e047c34e0396239976aa24f8dbdc64f3176ee0a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Apr 2024 14:43:05 +0000 Subject: [PATCH 0026/1325] chore(internal): bump pyright to 1.1.359 (#425) --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- src/increase/_models.py | 2 +- src/increase/_utils/_utils.py | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1b9b30fc2..6c26ebbf7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -48,7 +48,7 @@ Repository = "https://github.com/increase/increase-python" managed = true # version pins are in requirements-dev.lock dev-dependencies = [ - "pyright", + "pyright>=1.1.359", "mypy", "respx", "pytest", diff --git a/requirements-dev.lock b/requirements-dev.lock index be54931ea..40191aed5 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -63,7 +63,7 @@ pydantic==2.4.2 # via increase pydantic-core==2.10.1 # via pydantic -pyright==1.1.353 +pyright==1.1.359 pytest==7.1.1 # via pytest-asyncio pytest-asyncio==0.21.1 diff --git a/src/increase/_models.py b/src/increase/_models.py index ff93fbd84..ff3f54e2c 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -378,7 +378,7 @@ def construct_type(*, value: object, type_: object) -> object: # unwrap `Annotated[T, ...]` -> `T` if is_annotated_type(type_): - meta = get_args(type_)[1:] + meta: tuple[Any, ...] = get_args(type_)[1:] type_ = extract_type_arg(type_, 0) else: meta = tuple() diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index fd3a8a4d1..17904ce60 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -265,6 +265,8 @@ def wrapper(*args: object, **kwargs: object) -> object: ) msg = f"Missing required arguments; Expected either {variations} arguments to be given" else: + assert len(variants) > 0 + # TODO: this error message is not deterministic missing = list(set(variants[0]) - given_params) if len(missing) > 1: From b614b748f8e6e7acee10a4663c9cf41636713b93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Apr 2024 23:20:31 +0000 Subject: [PATCH 0027/1325] feat(api): add account_id param to ach_prenotification and third_party to check_transfer (#427) --- .../resources/ach_prenotifications.py | 8 ++++++ src/increase/resources/check_transfers.py | 12 +++++++++ src/increase/resources/entities/entities.py | 18 ------------- .../resources/inbound_check_deposits.py | 10 ++++++++ .../ach_prenotification_create_params.py | 3 +++ src/increase/types/check_transfer.py | 12 +++++++++ .../types/check_transfer_create_params.py | 25 ++++++++++++++++++- src/increase/types/entity_create_params.py | 9 ------- src/increase/types/inbound_check_deposit.py | 18 +++++++++++-- .../inbound_check_deposit_list_params.py | 6 +++++ .../test_ach_prenotifications.py | 2 ++ tests/api_resources/test_check_transfers.py | 2 ++ tests/api_resources/test_entities.py | 2 -- .../test_inbound_check_deposits.py | 2 ++ 14 files changed, 97 insertions(+), 32 deletions(-) diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 14805fdca..846851649 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -45,6 +45,7 @@ def create( *, account_number: str, routing_number: str, + account_id: str | NotGiven = NOT_GIVEN, addendum: str | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, @@ -78,6 +79,8 @@ def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. + account_id: The Increase identifier for the account that will send the transfer. + addendum: Additional information that will be sent to the recipient. company_descriptive_date: The description of the date of the transfer. @@ -124,6 +127,7 @@ def create( { "account_number": account_number, "routing_number": routing_number, + "account_id": account_id, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, @@ -256,6 +260,7 @@ async def create( *, account_number: str, routing_number: str, + account_id: str | NotGiven = NOT_GIVEN, addendum: str | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, @@ -289,6 +294,8 @@ async def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. + account_id: The Increase identifier for the account that will send the transfer. + addendum: Additional information that will be sent to the recipient. company_descriptive_date: The description of the date of the transfer. @@ -335,6 +342,7 @@ async def create( { "account_number": account_number, "routing_number": routing_number, + "account_id": account_id, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 58ab41c2d..701750da6 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -48,6 +48,7 @@ def create( fulfillment_method: Literal["physical_check", "third_party"] | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, + third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -80,6 +81,10 @@ def create( require_approval: Whether the transfer requires explicit approval via the dashboard or API. + third_party: Details relating to the custom fulfillment you will perform. This is required if + `fulfillment_method` is equal to `third_party`. It must not be included if any + other `fulfillment_method` is provided. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -100,6 +105,7 @@ def create( "fulfillment_method": fulfillment_method, "physical_check": physical_check, "require_approval": require_approval, + "third_party": third_party, }, check_transfer_create_params.CheckTransferCreateParams, ), @@ -362,6 +368,7 @@ async def create( fulfillment_method: Literal["physical_check", "third_party"] | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, + third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -394,6 +401,10 @@ async def create( require_approval: Whether the transfer requires explicit approval via the dashboard or API. + third_party: Details relating to the custom fulfillment you will perform. This is required if + `fulfillment_method` is equal to `third_party`. It must not be included if any + other `fulfillment_method` is provided. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -414,6 +425,7 @@ async def create( "fulfillment_method": fulfillment_method, "physical_check": physical_check, "require_approval": require_approval, + "third_party": third_party, }, check_transfer_create_params.CheckTransferCreateParams, ), diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index 9c9f37dfb..c1e99b3f7 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -86,7 +86,6 @@ def create( description: str | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, - relationship: Literal["affiliated", "informational", "unaffiliated"] | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -121,13 +120,6 @@ def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. - relationship: The relationship between your group and the entity. - - - `affiliated` - The entity is controlled by your group. - - `informational` - The entity is for informational purposes only. - - `unaffiliated` - The entity is not controlled by your group, but can still - directly open accounts. - supplemental_documents: Additional documentation associated with the entity. trust: Details of the trust entity to create. Required if `structure` is equal to @@ -152,7 +144,6 @@ def create( "description": description, "joint": joint, "natural_person": natural_person, - "relationship": relationship, "supplemental_documents": supplemental_documents, "trust": trust, }, @@ -432,7 +423,6 @@ async def create( description: str | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, - relationship: Literal["affiliated", "informational", "unaffiliated"] | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -467,13 +457,6 @@ async def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. - relationship: The relationship between your group and the entity. - - - `affiliated` - The entity is controlled by your group. - - `informational` - The entity is for informational purposes only. - - `unaffiliated` - The entity is not controlled by your group, but can still - directly open accounts. - supplemental_documents: Additional documentation associated with the entity. trust: Details of the trust entity to create. Required if `structure` is equal to @@ -498,7 +481,6 @@ async def create( "description": description, "joint": joint, "natural_person": natural_person, - "relationship": relationship, "supplemental_documents": supplemental_documents, "trust": trust, }, diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index f59dec8b8..5b6ff7cf9 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -70,6 +70,7 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, + check_transfer_id: str | NotGiven = NOT_GIVEN, created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -86,6 +87,9 @@ def list( Args: account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + check_transfer_id: Filter Inbound Check Deposits to those belonging to the specified Check + Transfer. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -110,6 +114,7 @@ def list( query=maybe_transform( { "account_id": account_id, + "check_transfer_id": check_transfer_id, "created_at": created_at, "cursor": cursor, "limit": limit, @@ -215,6 +220,7 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, + check_transfer_id: str | NotGiven = NOT_GIVEN, created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, @@ -231,6 +237,9 @@ def list( Args: account_id: Filter Inbound Check Deposits to those belonging to the specified Account. + check_transfer_id: Filter Inbound Check Deposits to those belonging to the specified Check + Transfer. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -255,6 +264,7 @@ def list( query=maybe_transform( { "account_id": account_id, + "check_transfer_id": check_transfer_id, "created_at": created_at, "cursor": cursor, "limit": limit, diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py index 9a01bc5a3..070a36e88 100644 --- a/src/increase/types/ach_prenotification_create_params.py +++ b/src/increase/types/ach_prenotification_create_params.py @@ -21,6 +21,9 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): destination account. """ + account_id: str + """The Increase identifier for the account that will send the transfer.""" + addendum: str """Additional information that will be sent to the recipient.""" diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 3685f1963..261435795 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -16,6 +16,7 @@ "PhysicalCheckReturnAddress", "StopPaymentRequest", "Submission", + "ThirdParty", ] @@ -147,6 +148,11 @@ class Submission(BaseModel): """When this check transfer was submitted to our check printer.""" +class ThirdParty(BaseModel): + check_number: Optional[str] = None + """The check number that will be printed on the check.""" + + class CheckTransfer(BaseModel): id: str """The Check transfer's identifier.""" @@ -283,6 +289,12 @@ class CheckTransfer(BaseModel): submission: Optional[Submission] = None """After the transfer is submitted, this will contain supplemental details.""" + third_party: Optional[ThirdParty] = None + """Details relating to the custom fulfillment you will perform. + + Will be present if and only if `fulfillment_method` is equal to `third_party`. + """ + type: Literal["check_transfer"] """A constant representing the object's type. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 983ac5b77..7f1ed05a8 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -4,7 +4,13 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CheckTransferCreateParams", "PhysicalCheck", "PhysicalCheckMailingAddress", "PhysicalCheckReturnAddress"] +__all__ = [ + "CheckTransferCreateParams", + "PhysicalCheck", + "PhysicalCheckMailingAddress", + "PhysicalCheckReturnAddress", + "ThirdParty", +] class CheckTransferCreateParams(TypedDict, total=False): @@ -39,6 +45,13 @@ class CheckTransferCreateParams(TypedDict, total=False): require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" + third_party: ThirdParty + """Details relating to the custom fulfillment you will perform. + + This is required if `fulfillment_method` is equal to `third_party`. It must not + be included if any other `fulfillment_method` is provided. + """ + class PhysicalCheckMailingAddress(TypedDict, total=False): city: Required[str] @@ -102,3 +115,13 @@ class PhysicalCheck(TypedDict, total=False): If omitted this will default to the address of the Entity of the Account used to make the Check Transfer. """ + + +class ThirdParty(TypedDict, total=False): + check_number: str + """The check number you will print on the check. + + This should not contain leading zeroes. If this is omitted, Increase will + generate a check number for you; you should inspect the response and use that + check number. + """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index dda06bf3f..432ebbc51 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -84,15 +84,6 @@ class EntityCreateParams(TypedDict, total=False): `individual_taxpayer_identification_number` identification methods. """ - relationship: Literal["affiliated", "informational", "unaffiliated"] - """The relationship between your group and the entity. - - - `affiliated` - The entity is controlled by your group. - - `informational` - The entity is for informational purposes only. - - `unaffiliated` - The entity is not controlled by your group, but can still - directly open accounts. - """ - supplemental_documents: Iterable[SupplementalDocument] """Additional documentation associated with the entity.""" diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 00c8dac03..eee2bc10b 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -13,6 +13,13 @@ class InboundCheckDeposit(BaseModel): id: str """The deposit's identifier.""" + accepted_at: Optional[datetime] = None + """ + If the Inbound Check Deposit was accepted, the + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which this + took place. + """ + account_id: str """The Account the check is being deposited against.""" @@ -61,6 +68,13 @@ class InboundCheckDeposit(BaseModel): - `USD` - US Dollar (USD) """ + declined_at: Optional[datetime] = None + """ + If the Inbound Check Deposit was declined, the + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which this + took place. + """ + declined_transaction_id: Optional[str] = None """ If the deposit attempt has been rejected, the identifier of the Declined @@ -70,12 +84,12 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "rejected"] + status: Literal["pending", "accepted", "declined"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - - `rejected` - The Inbound Check Deposit was rejected. + - `declined` - The Inbound Check Deposit was rejected. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_list_params.py b/src/increase/types/inbound_check_deposit_list_params.py index 2cb5292f2..29c5792d2 100644 --- a/src/increase/types/inbound_check_deposit_list_params.py +++ b/src/increase/types/inbound_check_deposit_list_params.py @@ -15,6 +15,12 @@ class InboundCheckDepositListParams(TypedDict, total=False): account_id: str """Filter Inbound Check Deposits to those belonging to the specified Account.""" + check_transfer_id: str + """ + Filter Inbound Check Deposits to those belonging to the specified Check + Transfer. + """ + created_at: CreatedAt cursor: str diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 5924cdcd1..8b018c345 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -32,6 +32,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.create( account_number="987654321", routing_number="101050001", + account_id="string", addendum="x", company_descriptive_date="x", company_discretionary_data="x", @@ -168,6 +169,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ach_prenotification = await async_client.ach_prenotifications.create( account_number="987654321", routing_number="101050001", + account_id="string", addendum="x", company_descriptive_date="x", company_discretionary_data="x", diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 672206f70..f30144cfc 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -59,6 +59,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, require_approval=True, + third_party={"check_number": "x"}, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -338,6 +339,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, require_approval=True, + third_party={"check_number": "x"}, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 90de64872..a24776d53 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -228,7 +228,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, }, - relationship="affiliated", supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ "name": "x", @@ -868,7 +867,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, }, - relationship="affiliated", supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ "name": "x", diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 92d46b2e1..d60cb59fd 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -68,6 +68,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.list( account_id="string", + check_transfer_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -192,6 +193,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.list( account_id="string", + check_transfer_id="string", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), From 528e5b88e46b8c28c68a5ada3f19546e762258da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 18:29:12 +0000 Subject: [PATCH 0028/1325] feat(api): remove inbound_wire_drawdown_payment_reversal (#428) --- ...ime_payments_transfer_simulation_result.py | 50 ------------------- src/increase/types/transaction.py | 50 ------------------- src/increase/types/transaction_list_params.py | 1 - 3 files changed, 101 deletions(-) diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 214d9818f..bb00a142d 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -61,7 +61,6 @@ "TransactionSourceInboundInternationalACHTransfer", "TransactionSourceInboundRealTimePaymentsTransferConfirmation", "TransactionSourceInboundWireDrawdownPayment", - "TransactionSourceInboundWireDrawdownPaymentReversal", "TransactionSourceInboundWireReversal", "TransactionSourceInboundWireTransfer", "TransactionSourceInterestPayment", @@ -3070,44 +3069,6 @@ class TransactionSourceInboundWireDrawdownPayment(BaseModel): """A free-form message set by the wire originator.""" -class TransactionSourceInboundWireDrawdownPaymentReversal(BaseModel): - amount: int - """The amount that was reversed.""" - - description: str - """The description on the reversal message from Fedwire.""" - - input_cycle_date: date - """The Fedwire cycle date for the wire reversal.""" - - input_message_accountability_data: str - """The Fedwire transaction identifier.""" - - input_sequence_number: str - """The Fedwire sequence number.""" - - input_source: str - """The Fedwire input source identifier.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - previous_message_input_cycle_date: date - """The Fedwire cycle date for the wire transfer that was reversed.""" - - previous_message_input_message_accountability_data: str - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: str - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - class TransactionSourceInboundWireReversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" @@ -3455,7 +3416,6 @@ class TransactionSource(BaseModel): "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment_reversal", "inbound_wire_drawdown_payment", "inbound_wire_reversal", "inbound_wire_transfer", @@ -3512,9 +3472,6 @@ class TransactionSource(BaseModel): - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_drawdown_payment_reversal` - Inbound Wire Drawdown Payment - Reversal: details will be under the `inbound_wire_drawdown_payment_reversal` - object. - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will be under the `inbound_wire_drawdown_payment` object. - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the @@ -3604,13 +3561,6 @@ class TransactionSource(BaseModel): equal to `inbound_wire_drawdown_payment`. """ - inbound_wire_drawdown_payment_reversal: Optional[TransactionSourceInboundWireDrawdownPaymentReversal] = None - """An Inbound Wire Drawdown Payment Reversal object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_drawdown_payment_reversal`. - """ - inbound_wire_reversal: Optional[TransactionSourceInboundWireReversal] = None """An Inbound Wire Reversal object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 0298485bb..4ed5a4ce0 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -46,7 +46,6 @@ "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", - "SourceInboundWireDrawdownPaymentReversal", "SourceInboundWireReversal", "SourceInboundWireTransfer", "SourceInterestPayment", @@ -2091,44 +2090,6 @@ class SourceInboundWireDrawdownPayment(BaseModel): """A free-form message set by the wire originator.""" -class SourceInboundWireDrawdownPaymentReversal(BaseModel): - amount: int - """The amount that was reversed.""" - - description: str - """The description on the reversal message from Fedwire.""" - - input_cycle_date: date - """The Fedwire cycle date for the wire reversal.""" - - input_message_accountability_data: str - """The Fedwire transaction identifier.""" - - input_sequence_number: str - """The Fedwire sequence number.""" - - input_source: str - """The Fedwire input source identifier.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - previous_message_input_cycle_date: date - """The Fedwire cycle date for the wire transfer that was reversed.""" - - previous_message_input_message_accountability_data: str - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: str - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - class SourceInboundWireReversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" @@ -2476,7 +2437,6 @@ class Source(BaseModel): "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment_reversal", "inbound_wire_drawdown_payment", "inbound_wire_reversal", "inbound_wire_transfer", @@ -2533,9 +2493,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_drawdown_payment_reversal` - Inbound Wire Drawdown Payment - Reversal: details will be under the `inbound_wire_drawdown_payment_reversal` - object. - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will be under the `inbound_wire_drawdown_payment` object. - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the @@ -2623,13 +2580,6 @@ class Source(BaseModel): equal to `inbound_wire_drawdown_payment`. """ - inbound_wire_drawdown_payment_reversal: Optional[SourceInboundWireDrawdownPaymentReversal] = None - """An Inbound Wire Drawdown Payment Reversal object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_drawdown_payment_reversal`. - """ - inbound_wire_reversal: Optional[SourceInboundWireReversal] = None """An Inbound Wire Reversal object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 9d67c9f9c..18ee5b148 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -59,7 +59,6 @@ class TransactionListParams(TypedDict, total=False): "inbound_check_deposit_return_intention", "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment_reversal", "inbound_wire_drawdown_payment", "inbound_wire_reversal", "inbound_wire_transfer", From 6b1c175e052193d129a9339dddec1344103952f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Apr 2024 22:02:33 +0000 Subject: [PATCH 0029/1325] chore(internal): restructure imports (#430) --- src/increase/resources/account_numbers.py | 2 +- src/increase/resources/account_statements.py | 3 ++- src/increase/resources/account_transfers.py | 3 ++- src/increase/resources/accounts.py | 4 ++-- src/increase/resources/ach_prenotifications.py | 7 ++----- src/increase/resources/ach_transfers.py | 3 ++- src/increase/resources/bookkeeping_accounts.py | 4 ++-- src/increase/resources/bookkeeping_entries.py | 3 ++- src/increase/resources/bookkeeping_entry_sets.py | 7 ++----- src/increase/resources/card_disputes.py | 3 ++- src/increase/resources/card_payments.py | 3 ++- src/increase/resources/card_purchase_supplements.py | 3 ++- src/increase/resources/cards.py | 4 +++- src/increase/resources/check_deposits.py | 3 ++- src/increase/resources/check_transfers.py | 2 +- src/increase/resources/declined_transactions.py | 3 ++- src/increase/resources/digital_card_profiles.py | 2 +- src/increase/resources/digital_wallet_tokens.py | 3 ++- src/increase/resources/documents.py | 3 ++- src/increase/resources/entities/beneficial_owners.py | 2 +- src/increase/resources/entities/entities.py | 2 +- src/increase/resources/entities/industry_code.py | 2 +- .../resources/entities/supplemental_documents.py | 9 +++------ src/increase/resources/event_subscriptions.py | 2 +- src/increase/resources/events.py | 3 ++- src/increase/resources/exports.py | 3 ++- src/increase/resources/external_accounts.py | 2 +- src/increase/resources/files.py | 3 ++- src/increase/resources/groups.py | 2 +- src/increase/resources/inbound_ach_transfers.py | 2 +- src/increase/resources/inbound_check_deposits.py | 3 ++- src/increase/resources/inbound_wire_drawdown_requests.py | 3 ++- src/increase/resources/inbound_wire_transfers.py | 3 ++- src/increase/resources/intrafi/account_enrollments.py | 3 ++- src/increase/resources/intrafi/balances.py | 2 +- src/increase/resources/intrafi/exclusions.py | 3 ++- src/increase/resources/oauth_connections.py | 3 ++- src/increase/resources/oauth_tokens.py | 3 ++- src/increase/resources/pending_transactions.py | 3 ++- src/increase/resources/physical_card_profiles.py | 2 +- src/increase/resources/physical_cards.py | 8 ++------ src/increase/resources/programs.py | 3 ++- .../proof_of_authorization_request_submissions.py | 2 +- .../resources/proof_of_authorization_requests.py | 3 ++- src/increase/resources/real_time_decisions.py | 3 ++- .../resources/real_time_payments_request_for_payments.py | 2 +- src/increase/resources/real_time_payments_transfers.py | 7 ++----- src/increase/resources/routing_numbers.py | 3 ++- src/increase/resources/simulations/account_statements.py | 2 +- src/increase/resources/simulations/account_transfers.py | 2 +- src/increase/resources/simulations/ach_transfers.py | 3 ++- src/increase/resources/simulations/card_disputes.py | 2 +- src/increase/resources/simulations/card_refunds.py | 2 +- src/increase/resources/simulations/cards.py | 5 +++-- src/increase/resources/simulations/check_deposits.py | 2 +- src/increase/resources/simulations/check_transfers.py | 2 +- .../simulations/digital_wallet_token_requests.py | 3 ++- src/increase/resources/simulations/documents.py | 2 +- .../resources/simulations/inbound_check_deposits.py | 2 +- .../resources/simulations/inbound_funds_holds.py | 2 +- .../simulations/inbound_wire_drawdown_requests.py | 2 +- src/increase/resources/simulations/interest_payments.py | 2 +- src/increase/resources/simulations/physical_cards.py | 2 +- src/increase/resources/simulations/programs.py | 2 +- .../simulations/real_time_payments_transfers.py | 6 ++++-- src/increase/resources/simulations/simulations.py | 2 +- src/increase/resources/simulations/wire_transfers.py | 2 +- src/increase/resources/transactions.py | 3 ++- src/increase/resources/wire_drawdown_requests.py | 7 ++----- src/increase/resources/wire_transfers.py | 3 ++- tests/api_resources/entities/test_beneficial_owners.py | 2 +- tests/api_resources/entities/test_industry_code.py | 2 +- .../entities/test_supplemental_documents.py | 6 ++---- tests/api_resources/intrafi/test_account_enrollments.py | 4 +--- tests/api_resources/intrafi/test_balances.py | 2 +- tests/api_resources/intrafi/test_exclusions.py | 2 +- .../api_resources/simulations/test_account_statements.py | 2 +- .../api_resources/simulations/test_account_transfers.py | 2 +- tests/api_resources/simulations/test_ach_transfers.py | 3 ++- tests/api_resources/simulations/test_card_disputes.py | 2 +- tests/api_resources/simulations/test_card_refunds.py | 2 +- tests/api_resources/simulations/test_cards.py | 4 ++-- tests/api_resources/simulations/test_check_deposits.py | 2 +- tests/api_resources/simulations/test_check_transfers.py | 2 +- .../simulations/test_digital_wallet_token_requests.py | 2 +- tests/api_resources/simulations/test_documents.py | 2 +- .../simulations/test_inbound_check_deposits.py | 2 +- .../simulations/test_inbound_funds_holds.py | 2 +- .../simulations/test_inbound_wire_drawdown_requests.py | 2 +- .../api_resources/simulations/test_interest_payments.py | 2 +- tests/api_resources/simulations/test_physical_cards.py | 2 +- tests/api_resources/simulations/test_programs.py | 2 +- .../simulations/test_real_time_payments_transfers.py | 4 ++-- tests/api_resources/simulations/test_wire_transfers.py | 2 +- tests/api_resources/test_account_numbers.py | 4 +--- tests/api_resources/test_account_statements.py | 2 +- tests/api_resources/test_account_transfers.py | 2 +- tests/api_resources/test_accounts.py | 6 ++---- tests/api_resources/test_ach_prenotifications.py | 2 +- tests/api_resources/test_ach_transfers.py | 2 +- tests/api_resources/test_bookkeeping_accounts.py | 6 ++---- tests/api_resources/test_bookkeeping_entries.py | 2 +- tests/api_resources/test_bookkeeping_entry_sets.py | 2 +- tests/api_resources/test_card_disputes.py | 2 +- tests/api_resources/test_card_payments.py | 2 +- tests/api_resources/test_card_purchase_supplements.py | 2 +- tests/api_resources/test_cards.py | 3 ++- tests/api_resources/test_check_deposits.py | 2 +- tests/api_resources/test_check_transfers.py | 4 +--- tests/api_resources/test_declined_transactions.py | 2 +- tests/api_resources/test_digital_card_profiles.py | 4 +--- tests/api_resources/test_digital_wallet_tokens.py | 2 +- tests/api_resources/test_documents.py | 2 +- tests/api_resources/test_entities.py | 4 +--- tests/api_resources/test_event_subscriptions.py | 4 +--- tests/api_resources/test_events.py | 2 +- tests/api_resources/test_exports.py | 2 +- tests/api_resources/test_external_accounts.py | 4 +--- tests/api_resources/test_files.py | 2 +- tests/api_resources/test_groups.py | 2 +- tests/api_resources/test_inbound_ach_transfers.py | 4 +--- tests/api_resources/test_inbound_check_deposits.py | 2 +- .../api_resources/test_inbound_wire_drawdown_requests.py | 2 +- tests/api_resources/test_inbound_wire_transfers.py | 2 +- tests/api_resources/test_oauth_connections.py | 2 +- tests/api_resources/test_oauth_tokens.py | 2 +- tests/api_resources/test_pending_transactions.py | 2 +- tests/api_resources/test_physical_card_profiles.py | 4 +--- tests/api_resources/test_physical_cards.py | 4 +--- tests/api_resources/test_programs.py | 2 +- .../test_proof_of_authorization_request_submissions.py | 4 +--- .../test_proof_of_authorization_requests.py | 2 +- tests/api_resources/test_real_time_decisions.py | 2 +- .../test_real_time_payments_request_for_payments.py | 4 +--- tests/api_resources/test_real_time_payments_transfers.py | 4 +--- tests/api_resources/test_routing_numbers.py | 2 +- tests/api_resources/test_simulations.py | 4 +--- tests/api_resources/test_transactions.py | 2 +- tests/api_resources/test_wire_drawdown_requests.py | 2 +- tests/api_resources/test_wire_transfers.py | 2 +- 140 files changed, 193 insertions(+), 209 deletions(-) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index f41750fc9..2bda64b11 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -8,7 +8,6 @@ from .. import _legacy_response from ..types import ( - AccountNumber, account_number_list_params, account_number_create_params, account_number_update_params, @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.account_number import AccountNumber __all__ = ["AccountNumbers", "AsyncAccountNumbers"] diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 73ca0f415..43e93e6f9 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import AccountStatement, account_statement_list_params +from ..types import account_statement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.account_statement import AccountStatement __all__ = ["AccountStatements", "AsyncAccountStatements"] diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 1669dbcdb..87b0a236d 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import AccountTransfer, account_transfer_list_params, account_transfer_create_params +from ..types import account_transfer_list_params, account_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,6 +19,7 @@ AsyncPaginator, make_request_options, ) +from ..types.account_transfer import AccountTransfer __all__ = ["AccountTransfers", "AsyncAccountTransfers"] diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 37b68a129..ee4a9a2b9 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -10,8 +10,6 @@ from .. import _legacy_response from ..types import ( - Account, - BalanceLookup, account_list_params, account_create_params, account_update_params, @@ -30,6 +28,8 @@ AsyncPaginator, make_request_options, ) +from ..types.account import Account +from ..types.balance_lookup import BalanceLookup __all__ = ["Accounts", "AsyncAccounts"] diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 846851649..8bed0cd5b 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -9,11 +9,7 @@ import httpx from .. import _legacy_response -from ..types import ( - ACHPrenotification, - ach_prenotification_list_params, - ach_prenotification_create_params, -) +from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -27,6 +23,7 @@ AsyncPaginator, make_request_options, ) +from ..types.ach_prenotification import ACHPrenotification __all__ = ["ACHPrenotifications", "AsyncACHPrenotifications"] diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 129e5704a..8f955d5fb 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -9,7 +9,7 @@ import httpx from .. import _legacy_response -from ..types import ACHTransfer, ach_transfer_list_params, ach_transfer_create_params +from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -23,6 +23,7 @@ AsyncPaginator, make_request_options, ) +from ..types.ach_transfer import ACHTransfer __all__ = ["ACHTransfers", "AsyncACHTransfers"] diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index cfefef979..fe332fe6b 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -10,8 +10,6 @@ from .. import _legacy_response from ..types import ( - BookkeepingAccount, - BookkeepingBalanceLookup, bookkeeping_account_list_params, bookkeeping_account_create_params, bookkeeping_account_update_params, @@ -30,6 +28,8 @@ AsyncPaginator, make_request_options, ) +from ..types.bookkeeping_account import BookkeepingAccount +from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup __all__ = ["BookkeepingAccounts", "AsyncBookkeepingAccounts"] diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index a0fd52f97..94ddf07b6 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import BookkeepingEntry, bookkeeping_entry_list_params +from ..types import bookkeeping_entry_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.bookkeeping_entry import BookkeepingEntry __all__ = ["BookkeepingEntries", "AsyncBookkeepingEntries"] diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index 6931eba74..a68c6bea3 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -8,11 +8,7 @@ import httpx from .. import _legacy_response -from ..types import ( - BookkeepingEntrySet, - bookkeeping_entry_set_list_params, - bookkeeping_entry_set_create_params, -) +from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -26,6 +22,7 @@ AsyncPaginator, make_request_options, ) +from ..types.bookkeeping_entry_set import BookkeepingEntrySet __all__ = ["BookkeepingEntrySets", "AsyncBookkeepingEntrySets"] diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index c32a38669..9456f03e1 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import CardDispute, card_dispute_list_params, card_dispute_create_params +from ..types import card_dispute_list_params, card_dispute_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,6 +19,7 @@ AsyncPaginator, make_request_options, ) +from ..types.card_dispute import CardDispute __all__ = ["CardDisputes", "AsyncCardDisputes"] diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 0b9eb221f..e14b63561 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import CardPayment, card_payment_list_params +from ..types import card_payment_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.card_payment import CardPayment __all__ = ["CardPayments", "AsyncCardPayments"] diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 3cffd4666..513a7d5a0 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import CardPurchaseSupplement, card_purchase_supplement_list_params +from ..types import card_purchase_supplement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.card_purchase_supplement import CardPurchaseSupplement __all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 36a7597ce..3135570a9 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -7,7 +7,7 @@ import httpx from .. import _legacy_response -from ..types import Card, CardDetails, card_list_params, card_create_params, card_update_params +from ..types import card_list_params, card_create_params, card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -17,10 +17,12 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage +from ..types.card import Card from .._base_client import ( AsyncPaginator, make_request_options, ) +from ..types.card_details import CardDetails __all__ = ["Cards", "AsyncCards"] diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index a3c2e1899..22fb6692b 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import CheckDeposit, check_deposit_list_params, check_deposit_create_params +from ..types import check_deposit_list_params, check_deposit_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,6 +19,7 @@ AsyncPaginator, make_request_options, ) +from ..types.check_deposit import CheckDeposit __all__ = ["CheckDeposits", "AsyncCheckDeposits"] diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 701750da6..cbec696c5 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -8,7 +8,6 @@ from .. import _legacy_response from ..types import ( - CheckTransfer, check_transfer_list_params, check_transfer_create_params, check_transfer_stop_payment_params, @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.check_transfer import CheckTransfer __all__ = ["CheckTransfers", "AsyncCheckTransfers"] diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 74e54e963..cf41ce219 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import DeclinedTransaction, declined_transaction_list_params +from ..types import declined_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.declined_transaction import DeclinedTransaction __all__ = ["DeclinedTransactions", "AsyncDeclinedTransactions"] diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 7dffaaaaf..1bb8492e2 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -6,7 +6,6 @@ from .. import _legacy_response from ..types import ( - DigitalCardProfile, digital_card_profile_list_params, digital_card_profile_clone_params, digital_card_profile_create_params, @@ -24,6 +23,7 @@ AsyncPaginator, make_request_options, ) +from ..types.digital_card_profile import DigitalCardProfile __all__ = ["DigitalCardProfiles", "AsyncDigitalCardProfiles"] diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index dff9d7e1f..0748fa69a 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import DigitalWalletToken, digital_wallet_token_list_params +from ..types import digital_wallet_token_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.digital_wallet_token import DigitalWalletToken __all__ = ["DigitalWalletTokens", "AsyncDigitalWalletTokens"] diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 8405fcb01..d832060c6 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import Document, document_list_params +from ..types import document_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.document import Document __all__ = ["Documents", "AsyncDocuments"] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py index c31714ab3..6eb727474 100644 --- a/src/increase/resources/entities/beneficial_owners.py +++ b/src/increase/resources/entities/beneficial_owners.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Entity from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -17,6 +16,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.entity import Entity from ...types.entities import ( beneficial_owner_create_params, beneficial_owner_archive_params, diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index c1e99b3f7..11151bf36 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -10,7 +10,6 @@ from ... import _legacy_response from ...types import ( - Entity, entity_list_params, entity_create_params, entity_confirm_params, @@ -37,6 +36,7 @@ AsyncPaginator, make_request_options, ) +from ...types.entity import Entity from .beneficial_owners import ( BeneficialOwners, AsyncBeneficialOwners, diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py index d5126e8fb..087e92c60 100644 --- a/src/increase/resources/entities/industry_code.py +++ b/src/increase/resources/entities/industry_code.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Entity from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -17,6 +16,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.entity import Entity from ...types.entities import industry_code_create_params __all__ = ["IndustryCode", "AsyncIndustryCode"] diff --git a/src/increase/resources/entities/supplemental_documents.py b/src/increase/resources/entities/supplemental_documents.py index fb78b6ab1..4bc6dd45e 100644 --- a/src/increase/resources/entities/supplemental_documents.py +++ b/src/increase/resources/entities/supplemental_documents.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Entity from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -19,11 +18,9 @@ AsyncPaginator, make_request_options, ) -from ...types.entities import ( - SupplementalDocument, - supplemental_document_list_params, - supplemental_document_create_params, -) +from ...types.entity import Entity +from ...types.entities import supplemental_document_list_params, supplemental_document_create_params +from ...types.entities.supplemental_document import SupplementalDocument __all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments"] diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 657f66cf3..930ee63fd 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -8,7 +8,6 @@ from .. import _legacy_response from ..types import ( - EventSubscription, event_subscription_list_params, event_subscription_create_params, event_subscription_update_params, @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.event_subscription import EventSubscription __all__ = ["EventSubscriptions", "AsyncEventSubscriptions"] diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 29094afcc..d7956ea0c 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -5,13 +5,14 @@ import httpx from .. import _legacy_response -from ..types import Event, event_list_params +from ..types import event_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage +from ..types.event import Event from .._base_client import ( AsyncPaginator, make_request_options, diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index f9994bb78..ff86ed981 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -7,7 +7,7 @@ import httpx from .. import _legacy_response -from ..types import Export, export_list_params, export_create_params +from ..types import export_list_params, export_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -21,6 +21,7 @@ AsyncPaginator, make_request_options, ) +from ..types.export import Export __all__ = ["Exports", "AsyncExports"] diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index c0166a489..50c7a8979 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -8,7 +8,6 @@ from .. import _legacy_response from ..types import ( - ExternalAccount, external_account_list_params, external_account_create_params, external_account_update_params, @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.external_account import ExternalAccount __all__ = ["ExternalAccounts", "AsyncExternalAccounts"] diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index cd1ddfae0..4519f7fe9 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -8,7 +8,7 @@ import httpx from .. import _legacy_response -from ..types import File, file_list_params, file_create_params +from ..types import file_list_params, file_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import ( extract_files, @@ -20,6 +20,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage +from ..types.file import File from .._base_client import ( AsyncPaginator, make_request_options, diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 0db2c3e14..6fda4cdb4 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -5,11 +5,11 @@ import httpx from .. import _legacy_response -from ..types import Group from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..types.group import Group from .._base_client import ( make_request_options, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 11bce0c43..0cf3977b7 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -8,7 +8,6 @@ from .. import _legacy_response from ..types import ( - InboundACHTransfer, inbound_ach_transfer_list_params, inbound_ach_transfer_transfer_return_params, inbound_ach_transfer_notification_of_change_params, @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.inbound_ach_transfer import InboundACHTransfer __all__ = ["InboundACHTransfers", "AsyncInboundACHTransfers"] diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 5b6ff7cf9..2bb31dacb 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import InboundCheckDeposit, inbound_check_deposit_list_params +from ..types import inbound_check_deposit_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.inbound_check_deposit import InboundCheckDeposit __all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index 3287e17b9..d11796ff1 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import InboundWireDrawdownRequest, inbound_wire_drawdown_request_list_params +from ..types import inbound_wire_drawdown_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest __all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 3196f9788..d8299439a 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -7,7 +7,7 @@ import httpx from .. import _legacy_response -from ..types import InboundWireTransfer, inbound_wire_transfer_list_params +from ..types import inbound_wire_transfer_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -18,6 +18,7 @@ AsyncPaginator, make_request_options, ) +from ..types.inbound_wire_transfer import InboundWireTransfer __all__ = ["InboundWireTransfers", "AsyncInboundWireTransfers"] diff --git a/src/increase/resources/intrafi/account_enrollments.py b/src/increase/resources/intrafi/account_enrollments.py index 454c1f63b..01e54069e 100644 --- a/src/increase/resources/intrafi/account_enrollments.py +++ b/src/increase/resources/intrafi/account_enrollments.py @@ -18,7 +18,8 @@ AsyncPaginator, make_request_options, ) -from ...types.intrafi import IntrafiAccountEnrollment, account_enrollment_list_params, account_enrollment_create_params +from ...types.intrafi import account_enrollment_list_params, account_enrollment_create_params +from ...types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment __all__ = ["AccountEnrollments", "AsyncAccountEnrollments"] diff --git a/src/increase/resources/intrafi/balances.py b/src/increase/resources/intrafi/balances.py index f59b3842d..1ad1baddf 100644 --- a/src/increase/resources/intrafi/balances.py +++ b/src/increase/resources/intrafi/balances.py @@ -12,7 +12,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.intrafi import IntrafiBalance +from ...types.intrafi.intrafi_balance import IntrafiBalance __all__ = ["Balances", "AsyncBalances"] diff --git a/src/increase/resources/intrafi/exclusions.py b/src/increase/resources/intrafi/exclusions.py index 0cd802fe5..98a8a0789 100644 --- a/src/increase/resources/intrafi/exclusions.py +++ b/src/increase/resources/intrafi/exclusions.py @@ -18,7 +18,8 @@ AsyncPaginator, make_request_options, ) -from ...types.intrafi import IntrafiExclusion, exclusion_list_params, exclusion_create_params +from ...types.intrafi import exclusion_list_params, exclusion_create_params +from ...types.intrafi.intrafi_exclusion import IntrafiExclusion __all__ = ["Exclusions", "AsyncExclusions"] diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index e1c266004..92b68cf72 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import OAuthConnection, oauth_connection_list_params +from ..types import oauth_connection_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.oauth_connection import OAuthConnection __all__ = ["OAuthConnections", "AsyncOAuthConnections"] diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index 304bee468..89e2ce110 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -7,7 +7,7 @@ import httpx from .. import _legacy_response -from ..types import OAuthToken, oauth_token_create_params +from ..types import oauth_token_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,6 +19,7 @@ from .._base_client import ( make_request_options, ) +from ..types.oauth_token import OAuthToken __all__ = ["OAuthTokens", "AsyncOAuthTokens"] diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 4a6658573..fc9ee77f5 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import PendingTransaction, pending_transaction_list_params +from ..types import pending_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.pending_transaction import PendingTransaction __all__ = ["PendingTransactions", "AsyncPendingTransactions"] diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 78c0a37bc..eac8d457f 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -6,7 +6,6 @@ from .. import _legacy_response from ..types import ( - PhysicalCardProfile, physical_card_profile_list_params, physical_card_profile_clone_params, physical_card_profile_create_params, @@ -24,6 +23,7 @@ AsyncPaginator, make_request_options, ) +from ..types.physical_card_profile import PhysicalCardProfile __all__ = ["PhysicalCardProfiles", "AsyncPhysicalCardProfiles"] diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 906bd56ed..000d0f442 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -7,12 +7,7 @@ import httpx from .. import _legacy_response -from ..types import ( - PhysicalCard, - physical_card_list_params, - physical_card_create_params, - physical_card_update_params, -) +from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -26,6 +21,7 @@ AsyncPaginator, make_request_options, ) +from ..types.physical_card import PhysicalCard __all__ = ["PhysicalCards", "AsyncPhysicalCards"] diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index c9f6c7afc..a3ebf5a09 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import Program, program_list_params +from ..types import program_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.program import Program __all__ = ["Programs", "AsyncPrograms"] diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index 1026a6727..a44783a21 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -9,7 +9,6 @@ from .. import _legacy_response from ..types import ( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission_list_params, proof_of_authorization_request_submission_create_params, ) @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission __all__ = ["ProofOfAuthorizationRequestSubmissions", "AsyncProofOfAuthorizationRequestSubmissions"] diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index 4177a0a8f..e1d13f832 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import ProofOfAuthorizationRequest, proof_of_authorization_request_list_params +from ..types import proof_of_authorization_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest __all__ = ["ProofOfAuthorizationRequests", "AsyncProofOfAuthorizationRequests"] diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index ecf877efb..32472334d 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import RealTimeDecision, real_time_decision_action_params +from ..types import real_time_decision_action_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -17,6 +17,7 @@ from .._base_client import ( make_request_options, ) +from ..types.real_time_decision import RealTimeDecision __all__ = ["RealTimeDecisions", "AsyncRealTimeDecisions"] diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index af69ee11f..679559f1d 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -9,7 +9,6 @@ from .. import _legacy_response from ..types import ( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment_list_params, real_time_payments_request_for_payment_create_params, ) @@ -26,6 +25,7 @@ AsyncPaginator, make_request_options, ) +from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment __all__ = ["RealTimePaymentsRequestForPayments", "AsyncRealTimePaymentsRequestForPayments"] diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 2553ccaef..bee151de6 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -5,11 +5,7 @@ import httpx from .. import _legacy_response -from ..types import ( - RealTimePaymentsTransfer, - real_time_payments_transfer_list_params, - real_time_payments_transfer_create_params, -) +from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -23,6 +19,7 @@ AsyncPaginator, make_request_options, ) +from ..types.real_time_payments_transfer import RealTimePaymentsTransfer __all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 59d017a62..9836696ce 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import RoutingNumber, routing_number_list_params +from ..types import routing_number_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.routing_number import RoutingNumber __all__ = ["RoutingNumbers", "AsyncRoutingNumbers"] diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index e30c2b3db..d4041a286 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import AccountStatement from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,6 +17,7 @@ make_request_options, ) from ...types.simulations import account_statement_create_params +from ...types.account_statement import AccountStatement __all__ = ["AccountStatements", "AsyncAccountStatements"] diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 0bd6c2793..418b9b4d8 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import AccountTransfer from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -13,6 +12,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.account_transfer import AccountTransfer __all__ = ["AccountTransfers", "AsyncAccountTransfers"] diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 2a26db101..bdbb15dad 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -9,7 +9,6 @@ import httpx from ... import _legacy_response -from ...types import ACHTransfer, InboundACHTransfer from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -26,6 +25,8 @@ ach_transfer_create_inbound_params, ach_transfer_notification_of_change_params, ) +from ...types.ach_transfer import ACHTransfer +from ...types.inbound_ach_transfer import InboundACHTransfer __all__ = ["ACHTransfers", "AsyncACHTransfers"] diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 3b4c26c0e..3d828507e 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -7,7 +7,6 @@ import httpx from ... import _legacy_response -from ...types import CardDispute from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -20,6 +19,7 @@ make_request_options, ) from ...types.simulations import card_dispute_action_params +from ...types.card_dispute import CardDispute __all__ = ["CardDisputes", "AsyncCardDisputes"] diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 4e32c21ee..ad703bc6d 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Transaction from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,6 +17,7 @@ make_request_options, ) from ...types.simulations import card_refund_create_params +from ...types.transaction import Transaction __all__ = ["CardRefunds", "AsyncCardRefunds"] diff --git a/src/increase/resources/simulations/cards.py b/src/increase/resources/simulations/cards.py index 27ca9cb8e..0eb9f6379 100644 --- a/src/increase/resources/simulations/cards.py +++ b/src/increase/resources/simulations/cards.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Transaction from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -17,7 +16,9 @@ from ..._base_client import ( make_request_options, ) -from ...types.simulations import CardAuthorizationSimulation, card_authorize_params, card_settlement_params +from ...types.simulations import card_authorize_params, card_settlement_params +from ...types.transaction import Transaction +from ...types.simulations.card_authorization_simulation import CardAuthorizationSimulation __all__ = ["Cards", "AsyncCards"] diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 66e77f8c4..5d5a80efd 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import CheckDeposit from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -13,6 +12,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.check_deposit import CheckDeposit __all__ = ["CheckDeposits", "AsyncCheckDeposits"] diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index 481cad4ef..a6a9599f0 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import CheckTransfer from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -13,6 +12,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.check_transfer import CheckTransfer __all__ = ["CheckTransfers", "AsyncCheckTransfers"] diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 77b883baf..ce6d61dd5 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -16,7 +16,8 @@ from ..._base_client import ( make_request_options, ) -from ...types.simulations import DigitalWalletTokenRequestCreateResponse, digital_wallet_token_request_create_params +from ...types.simulations import digital_wallet_token_request_create_params +from ...types.simulations.digital_wallet_token_request_create_response import DigitalWalletTokenRequestCreateResponse __all__ = ["DigitalWalletTokenRequests", "AsyncDigitalWalletTokenRequests"] diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 08f239992..913423a15 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Document from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -17,6 +16,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.document import Document from ...types.simulations import document_create_params __all__ = ["Documents", "AsyncDocuments"] diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index dd3585461..bd9f60b0e 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import InboundCheckDeposit from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,6 +17,7 @@ make_request_options, ) from ...types.simulations import inbound_check_deposit_create_params +from ...types.inbound_check_deposit import InboundCheckDeposit __all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index 8a245107d..a38c4c9bf 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -12,7 +12,7 @@ from ..._base_client import ( make_request_options, ) -from ...types.simulations import InboundFundsHoldReleaseResponse +from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse __all__ = ["InboundFundsHolds", "AsyncInboundFundsHolds"] diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 457dc4051..48fae7831 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import InboundWireDrawdownRequest from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,6 +17,7 @@ make_request_options, ) from ...types.simulations import inbound_wire_drawdown_request_create_params +from ...types.inbound_wire_drawdown_request import InboundWireDrawdownRequest __all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index c3c7aff2f..ce542d511 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -8,7 +8,6 @@ import httpx from ... import _legacy_response -from ...types import Transaction from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -21,6 +20,7 @@ make_request_options, ) from ...types.simulations import interest_payment_create_params +from ...types.transaction import Transaction __all__ = ["InterestPayments", "AsyncInterestPayments"] diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 06585b4eb..1bee21695 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -7,7 +7,6 @@ import httpx from ... import _legacy_response -from ...types import PhysicalCard from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -20,6 +19,7 @@ make_request_options, ) from ...types.simulations import physical_card_shipment_advance_params +from ...types.physical_card import PhysicalCard __all__ = ["PhysicalCards", "AsyncPhysicalCards"] diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index bece6693e..840b9422f 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import Program from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -17,6 +16,7 @@ from ..._base_client import ( make_request_options, ) +from ...types.program import Program from ...types.simulations import program_create_params __all__ = ["Programs", "AsyncPrograms"] diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 5dac2857d..b80d2957d 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import RealTimePaymentsTransfer from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,10 +17,13 @@ make_request_options, ) from ...types.simulations import ( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer_complete_params, real_time_payments_transfer_create_inbound_params, ) +from ...types.real_time_payments_transfer import RealTimePaymentsTransfer +from ...types.simulations.inbound_real_time_payments_transfer_simulation_result import ( + InboundRealTimePaymentsTransferSimulationResult, +) __all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 6bbff3948..26128b476 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -14,7 +14,6 @@ AsyncCardsWithStreamingResponse, ) from ...types import ( - CardPayment, simulation_card_reversals_params, simulation_card_increments_params, simulation_card_fuel_confirmations_params, @@ -135,6 +134,7 @@ InboundFundsHoldsWithStreamingResponse, AsyncInboundFundsHoldsWithStreamingResponse, ) +from ...types.card_payment import CardPayment from .inbound_check_deposits import ( InboundCheckDeposits, AsyncInboundCheckDeposits, diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index fda534dfc..4f5e832bf 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -5,7 +5,6 @@ import httpx from ... import _legacy_response -from ...types import InboundWireTransfer from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -18,6 +17,7 @@ make_request_options, ) from ...types.simulations import wire_transfer_create_inbound_params +from ...types.inbound_wire_transfer import InboundWireTransfer __all__ = ["WireTransfers", "AsyncWireTransfers"] diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index c761f7b58..940db913b 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import Transaction, transaction_list_params +from ..types import transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property @@ -16,6 +16,7 @@ AsyncPaginator, make_request_options, ) +from ..types.transaction import Transaction __all__ = ["Transactions", "AsyncTransactions"] diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 6beda6b88..95732ed4b 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -7,11 +7,7 @@ import httpx from .. import _legacy_response -from ..types import ( - WireDrawdownRequest, - wire_drawdown_request_list_params, - wire_drawdown_request_create_params, -) +from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -25,6 +21,7 @@ AsyncPaginator, make_request_options, ) +from ..types.wire_drawdown_request import WireDrawdownRequest __all__ = ["WireDrawdownRequests", "AsyncWireDrawdownRequests"] diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 97610f00f..421673300 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -5,7 +5,7 @@ import httpx from .. import _legacy_response -from ..types import WireTransfer, wire_transfer_list_params, wire_transfer_create_params +from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -19,6 +19,7 @@ AsyncPaginator, make_request_options, ) +from ..types.wire_transfer import WireTransfer __all__ = ["WireTransfers", "AsyncWireTransfers"] diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py index 6511d6691..187573e55 100644 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Entity from increase._utils import parse_date +from increase.types.entity import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py index 2c3b6ab41..2e11d62ce 100644 --- a/tests/api_resources/entities/test_industry_code.py +++ b/tests/api_resources/entities/test_industry_code.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Entity +from increase.types.entity import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/entities/test_supplemental_documents.py index 7779b3ea3..5ad31ad9a 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/entities/test_supplemental_documents.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Entity from increase.pagination import SyncPage, AsyncPage -from increase.types.entities import ( - SupplementalDocument, -) +from increase.types.entity import Entity +from increase.types.entities.supplemental_document import SupplementalDocument base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_account_enrollments.py b/tests/api_resources/intrafi/test_account_enrollments.py index 6e120c600..8cbba5883 100644 --- a/tests/api_resources/intrafi/test_account_enrollments.py +++ b/tests/api_resources/intrafi/test_account_enrollments.py @@ -10,9 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import ( - IntrafiAccountEnrollment, -) +from increase.types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_balances.py b/tests/api_resources/intrafi/test_balances.py index 19f5cef5b..e433b37c7 100644 --- a/tests/api_resources/intrafi/test_balances.py +++ b/tests/api_resources/intrafi/test_balances.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.intrafi import IntrafiBalance +from increase.types.intrafi.intrafi_balance import IntrafiBalance base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_exclusions.py b/tests/api_resources/intrafi/test_exclusions.py index 53629bd42..f0c4bc456 100644 --- a/tests/api_resources/intrafi/test_exclusions.py +++ b/tests/api_resources/intrafi/test_exclusions.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import IntrafiExclusion +from increase.types.intrafi.intrafi_exclusion import IntrafiExclusion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index 619881fcb..ace7f99e6 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountStatement +from increase.types.account_statement import AccountStatement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index 6df6e1ad0..d807a8c40 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountTransfer +from increase.types.account_transfer import AccountTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 42316a8c7..ef3645c31 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer, InboundACHTransfer from increase._utils import parse_datetime +from increase.types.ach_transfer import ACHTransfer +from increase.types.inbound_ach_transfer import InboundACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 8c89036e3..ee48a6590 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardDispute +from increase.types.card_dispute import CardDispute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index 979ddd02c..d2cdc0e34 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction +from increase.types.transaction import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py index eef528851..26b55750f 100644 --- a/tests/api_resources/simulations/test_cards.py +++ b/tests/api_resources/simulations/test_cards.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction -from increase.types.simulations import CardAuthorizationSimulation +from increase.types.transaction import Transaction +from increase.types.simulations.card_authorization_simulation import CardAuthorizationSimulation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 395655e01..0e5f46d7f 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CheckDeposit +from increase.types.check_deposit import CheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 14d3b4075..9b9951b79 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CheckTransfer +from increase.types.check_transfer import CheckTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 7d4d8cb36..5ebcecd46 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.simulations import ( +from increase.types.simulations.digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse, ) diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 3eedf06da..8d71a3653 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Document +from increase.types.document import Document base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index 48760003f..0b21225c2 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundCheckDeposit +from increase.types.inbound_check_deposit import InboundCheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index 6645d9fdc..43816fba7 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.simulations import InboundFundsHoldReleaseResponse +from increase.types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 e03b70c12..dafd62668 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireDrawdownRequest +from increase.types.inbound_wire_drawdown_request import InboundWireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index d755d9a81..a5a60e11d 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction from increase._utils import parse_datetime +from increase.types.transaction import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 191a470b8..05359b5e6 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import PhysicalCard +from increase.types.physical_card import PhysicalCard base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 348c8bdf6..5e8dfcbac 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Program +from increase.types.program import Program base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 de09f21ae..de46613c8 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RealTimePaymentsTransfer -from increase.types.simulations import ( +from increase.types.real_time_payments_transfer import RealTimePaymentsTransfer +from increase.types.simulations.inbound_real_time_payments_transfer_simulation_result import ( InboundRealTimePaymentsTransferSimulationResult, ) diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index 8a699bc38..5f109e299 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer +from increase.types.inbound_wire_transfer import InboundWireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 514c878fa..df44aba85 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - AccountNumber, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.account_number import AccountNumber base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index d548cc5be..680d65d21 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountStatement from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.account_statement import AccountStatement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index e4f7e540f..cbb48067d 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.account_transfer import AccountTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d4d7ccfe8..6c8a1bc8b 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -9,12 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - Account, - BalanceLookup, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.account import Account +from increase.types.balance_lookup import BalanceLookup base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 8b018c345..121fb9000 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHPrenotification from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.ach_prenotification import ACHPrenotification base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index d2aef2a9e..d90a5e452 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.ach_transfer import ACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 7ebf4c3bc..550fb3f4e 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -9,12 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - BookkeepingAccount, - BookkeepingBalanceLookup, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.bookkeeping_account import BookkeepingAccount +from increase.types.bookkeeping_balance_lookup import BookkeepingBalanceLookup base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index d129ae9dc..a59ab8382 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import BookkeepingEntry from increase.pagination import SyncPage, AsyncPage +from increase.types.bookkeeping_entry import BookkeepingEntry base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 0edd3fdab..0d26ad21f 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import BookkeepingEntrySet from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.bookkeeping_entry_set import BookkeepingEntrySet base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 55be0d43b..0a30e2258 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardDispute from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.card_dispute import CardDispute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 0291ae1d4..3687e40db 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPayment from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.card_payment import CardPayment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 8cd3e7906..523696dda 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPurchaseSupplement from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.card_purchase_supplement import CardPurchaseSupplement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index d05ab4c3f..8598d71d7 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -9,9 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Card, CardDetails from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.card import Card +from increase.types.card_details import CardDetails base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index f17078a6c..b624918f2 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CheckDeposit from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.check_deposit import CheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index f30144cfc..0074813bd 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CheckTransfer, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.check_transfer import CheckTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index be25b92b2..2ceb652b5 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DeclinedTransaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.declined_transaction import DeclinedTransaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 1a9a7c31c..e83d45f50 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - DigitalCardProfile, -) from increase.pagination import SyncPage, AsyncPage +from increase.types.digital_card_profile import DigitalCardProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index aefac4490..f371f517c 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DigitalWalletToken from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.digital_wallet_token import DigitalWalletToken base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index f7f67b6d0..ba47cafc4 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Document from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.document import Document base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index a24776d53..2a61cc4c3 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - Entity, -) from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.entity import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 9eb61f1e2..288bb5370 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - EventSubscription, -) from increase.pagination import SyncPage, AsyncPage +from increase.types.event_subscription import EventSubscription base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 619b5e2d6..ce0f3089d 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Event from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.event import Event base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index c95473d10..e2630663f 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Export from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.export import Export base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 9a7b7e476..6bdcee2ee 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - ExternalAccount, -) from increase.pagination import SyncPage, AsyncPage +from increase.types.external_account import ExternalAccount base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 550cb6824..0b2a660b0 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import File from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.file import File base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index f0b1a4e4d..0ddea0bc3 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Group +from increase.types.group import Group base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index b774a19ee..9824d2d77 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundACHTransfer, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.inbound_ach_transfer import InboundACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index d60cb59fd..8663b208c 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundCheckDeposit from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.inbound_check_deposit import InboundCheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 9e642f50a..3a70c9950 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireDrawdownRequest from increase.pagination import SyncPage, AsyncPage +from increase.types.inbound_wire_drawdown_request import InboundWireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 30427a1ee..e8692d307 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.inbound_wire_transfer import InboundWireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 8e798164d..957491721 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthConnection from increase.pagination import SyncPage, AsyncPage +from increase.types.oauth_connection import OAuthConnection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index fac339dc0..f6254704e 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthToken +from increase.types.oauth_token import OAuthToken base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 39f895c98..4b03bd687 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import PendingTransaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.pending_transaction import PendingTransaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 81461ff7a..0fa416c54 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - PhysicalCardProfile, -) from increase.pagination import SyncPage, AsyncPage +from increase.types.physical_card_profile import PhysicalCardProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 6dc37a131..905f23462 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - PhysicalCard, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.physical_card import PhysicalCard base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index cff094a4a..01155b1b9 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Program from increase.pagination import SyncPage, AsyncPage +from increase.types.program import Program base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index ca49929c7..6ebaf6a44 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - ProofOfAuthorizationRequestSubmission, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index e5ec2bdbb..ad96e2df9 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ProofOfAuthorizationRequest from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.proof_of_authorization_request import ProofOfAuthorizationRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index fc58c2572..0e120a621 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RealTimeDecision +from increase.types.real_time_decision import RealTimeDecision base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index 300f42449..bf68309a8 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - RealTimePaymentsRequestForPayment, -) from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index e48d2c0a2..5231ac275 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - RealTimePaymentsTransfer, -) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.real_time_payments_transfer import RealTimePaymentsTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 2b73295fa..935fd08da 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RoutingNumber from increase.pagination import SyncPage, AsyncPage +from increase.types.routing_number import RoutingNumber base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py index c519f0130..a39f0c772 100644 --- a/tests/api_resources/test_simulations.py +++ b/tests/api_resources/test_simulations.py @@ -9,9 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CardPayment, -) +from increase.types.card_payment import CardPayment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 1c66c4a7a..ed58ab3aa 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.transaction import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index b03363374..6477e79ef 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import WireDrawdownRequest from increase.pagination import SyncPage, AsyncPage +from increase.types.wire_drawdown_request import WireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 4d10cc88d..5293c0aa2 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import WireTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage +from increase.types.wire_transfer import WireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") From eb205e122efe8d13aed328fa6dc12b1f86d41fb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 15:59:17 +0000 Subject: [PATCH 0030/1325] fix(docs): doc improvements (#432) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index e54130bd5..d1d11a64c 100644 --- a/README.md +++ b/README.md @@ -344,7 +344,7 @@ The context manager is required so that the response will reliably be closed. ### Making custom/undocumented requests -This library is typed for convenient access the documented API. +This library is typed for convenient access to the documented API. If you need to access undocumented endpoints, params, or response properties, the library can still be used. From 4927330b4fe21c45711107f625d0cd5014e17c78 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Apr 2024 20:42:48 +0000 Subject: [PATCH 0031/1325] chore(internal): use actions/checkout@v4 for codeflow (#433) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 845d40ba8..79c13c081 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Install Rye run: | diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index e5a4ce85a..bc5fe84b9 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -10,7 +10,7 @@ jobs: if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Check release environment run: | From f0d29db63f6ff021ff677707c0ef377d1065b7d7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 03:38:26 +0000 Subject: [PATCH 0032/1325] chore(internal): update test helper function (#434) --- tests/utils.py | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/tests/utils.py b/tests/utils.py index 13184e3e0..2dd14f018 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -97,7 +97,22 @@ def assert_matches_type( assert_matches_type(key_type, key, path=[*path, ""]) assert_matches_type(items_type, item, path=[*path, ""]) elif is_union_type(type_): - for i, variant in enumerate(get_args(type_)): + variants = get_args(type_) + + try: + none_index = variants.index(type(None)) + except ValueError: + pass + else: + # special case Optional[T] for better error messages + if len(variants) == 2: + if value is None: + # valid + return + + return assert_matches_type(type_=variants[not none_index], value=value, path=path) + + for i, variant in enumerate(variants): try: assert_matches_type(variant, value, path=[*path, f"variant {i}"]) return From 387540c575d985f6bdbc87ba34c21d7cb515916d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Apr 2024 22:54:38 +0000 Subject: [PATCH 0033/1325] fix!: require account ID for creating an ACH prenotification (#435) --- src/increase/resources/ach_prenotifications.py | 16 ++++++++-------- .../types/ach_prenotification_create_params.py | 6 +++--- tests/api_resources/test_ach_prenotifications.py | 10 ++++++++-- 3 files changed, 19 insertions(+), 13 deletions(-) diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 8bed0cd5b..d8f17b74b 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -40,9 +40,9 @@ def with_streaming_response(self) -> ACHPrenotificationsWithStreamingResponse: def create( self, *, + account_id: str, account_number: str, routing_number: str, - account_id: str | NotGiven = NOT_GIVEN, addendum: str | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, @@ -71,13 +71,13 @@ def create( Create an ACH Prenotification Args: + account_id: The Increase identifier for the account that will send the transfer. + account_number: The account number for the destination account. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. - account_id: The Increase identifier for the account that will send the transfer. - addendum: Additional information that will be sent to the recipient. company_descriptive_date: The description of the date of the transfer. @@ -122,9 +122,9 @@ def create( "/ach_prenotifications", body=maybe_transform( { + "account_id": account_id, "account_number": account_number, "routing_number": routing_number, - "account_id": account_id, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, @@ -255,9 +255,9 @@ def with_streaming_response(self) -> AsyncACHPrenotificationsWithStreamingRespon async def create( self, *, + account_id: str, account_number: str, routing_number: str, - account_id: str | NotGiven = NOT_GIVEN, addendum: str | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, @@ -286,13 +286,13 @@ async def create( Create an ACH Prenotification Args: + account_id: The Increase identifier for the account that will send the transfer. + account_number: The account number for the destination account. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. - account_id: The Increase identifier for the account that will send the transfer. - addendum: Additional information that will be sent to the recipient. company_descriptive_date: The description of the date of the transfer. @@ -337,9 +337,9 @@ async def create( "/ach_prenotifications", body=await async_maybe_transform( { + "account_id": account_id, "account_number": account_number, "routing_number": routing_number, - "account_id": account_id, "addendum": addendum, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py index 070a36e88..0ed052895 100644 --- a/src/increase/types/ach_prenotification_create_params.py +++ b/src/increase/types/ach_prenotification_create_params.py @@ -12,6 +12,9 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): + account_id: Required[str] + """The Increase identifier for the account that will send the transfer.""" + account_number: Required[str] """The account number for the destination account.""" @@ -21,9 +24,6 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): destination account. """ - account_id: str - """The Increase identifier for the account that will send the transfer.""" - addendum: str """Additional information that will be sent to the recipient.""" diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 121fb9000..2cdf73543 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -22,6 +22,7 @@ class TestACHPrenotifications: @parametrize def test_method_create(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) @@ -30,9 +31,9 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", - account_id="string", addendum="x", company_descriptive_date="x", company_discretionary_data="x", @@ -49,6 +50,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.ach_prenotifications.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) @@ -61,6 +63,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.ach_prenotifications.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) as response: @@ -159,6 +162,7 @@ class TestAsyncACHPrenotifications: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) @@ -167,9 +171,9 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", - account_id="string", addendum="x", company_descriptive_date="x", company_discretionary_data="x", @@ -186,6 +190,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_prenotifications.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) @@ -198,6 +203,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.ach_prenotifications.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", account_number="987654321", routing_number="101050001", ) as response: From 3d0621b08b21072827593c0c3f0b46163f2656c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 13:50:10 +0000 Subject: [PATCH 0034/1325] chore(internal): reformat imports (#437) --- tests/api_resources/entities/test_beneficial_owners.py | 2 +- tests/api_resources/entities/test_industry_code.py | 2 +- tests/api_resources/entities/test_supplemental_documents.py | 6 ++++-- tests/api_resources/intrafi/test_account_enrollments.py | 4 +++- tests/api_resources/intrafi/test_balances.py | 2 +- tests/api_resources/intrafi/test_exclusions.py | 2 +- tests/api_resources/simulations/test_account_statements.py | 2 +- tests/api_resources/simulations/test_account_transfers.py | 2 +- tests/api_resources/simulations/test_ach_transfers.py | 3 +-- tests/api_resources/simulations/test_card_disputes.py | 2 +- tests/api_resources/simulations/test_card_refunds.py | 2 +- tests/api_resources/simulations/test_cards.py | 4 ++-- tests/api_resources/simulations/test_check_deposits.py | 2 +- tests/api_resources/simulations/test_check_transfers.py | 2 +- .../simulations/test_digital_wallet_token_requests.py | 2 +- tests/api_resources/simulations/test_documents.py | 2 +- .../simulations/test_inbound_check_deposits.py | 2 +- tests/api_resources/simulations/test_inbound_funds_holds.py | 2 +- .../simulations/test_inbound_wire_drawdown_requests.py | 2 +- tests/api_resources/simulations/test_interest_payments.py | 2 +- tests/api_resources/simulations/test_physical_cards.py | 2 +- tests/api_resources/simulations/test_programs.py | 2 +- .../simulations/test_real_time_payments_transfers.py | 4 ++-- tests/api_resources/simulations/test_wire_transfers.py | 2 +- tests/api_resources/test_account_numbers.py | 4 +++- tests/api_resources/test_account_statements.py | 2 +- tests/api_resources/test_account_transfers.py | 2 +- tests/api_resources/test_accounts.py | 6 ++++-- tests/api_resources/test_ach_prenotifications.py | 2 +- tests/api_resources/test_ach_transfers.py | 2 +- tests/api_resources/test_bookkeeping_accounts.py | 6 ++++-- tests/api_resources/test_bookkeeping_entries.py | 2 +- tests/api_resources/test_bookkeeping_entry_sets.py | 2 +- tests/api_resources/test_card_disputes.py | 2 +- tests/api_resources/test_card_payments.py | 2 +- tests/api_resources/test_card_purchase_supplements.py | 2 +- tests/api_resources/test_cards.py | 3 +-- tests/api_resources/test_check_deposits.py | 2 +- tests/api_resources/test_check_transfers.py | 4 +++- tests/api_resources/test_declined_transactions.py | 2 +- tests/api_resources/test_digital_card_profiles.py | 4 +++- tests/api_resources/test_digital_wallet_tokens.py | 2 +- tests/api_resources/test_documents.py | 2 +- tests/api_resources/test_entities.py | 4 +++- tests/api_resources/test_event_subscriptions.py | 4 +++- tests/api_resources/test_events.py | 2 +- tests/api_resources/test_exports.py | 2 +- tests/api_resources/test_external_accounts.py | 4 +++- tests/api_resources/test_files.py | 2 +- tests/api_resources/test_groups.py | 2 +- tests/api_resources/test_inbound_ach_transfers.py | 4 +++- tests/api_resources/test_inbound_check_deposits.py | 2 +- tests/api_resources/test_inbound_wire_drawdown_requests.py | 2 +- tests/api_resources/test_inbound_wire_transfers.py | 2 +- tests/api_resources/test_oauth_connections.py | 2 +- tests/api_resources/test_oauth_tokens.py | 2 +- tests/api_resources/test_pending_transactions.py | 2 +- tests/api_resources/test_physical_card_profiles.py | 4 +++- tests/api_resources/test_physical_cards.py | 4 +++- tests/api_resources/test_programs.py | 2 +- .../test_proof_of_authorization_request_submissions.py | 4 +++- tests/api_resources/test_proof_of_authorization_requests.py | 2 +- tests/api_resources/test_real_time_decisions.py | 2 +- .../test_real_time_payments_request_for_payments.py | 4 +++- tests/api_resources/test_real_time_payments_transfers.py | 4 +++- tests/api_resources/test_routing_numbers.py | 2 +- tests/api_resources/test_simulations.py | 4 +++- tests/api_resources/test_transactions.py | 2 +- tests/api_resources/test_wire_drawdown_requests.py | 2 +- tests/api_resources/test_wire_transfers.py | 2 +- 70 files changed, 109 insertions(+), 77 deletions(-) diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py index 187573e55..6511d6691 100644 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Entity from increase._utils import parse_date -from increase.types.entity import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py index 2e11d62ce..2c3b6ab41 100644 --- a/tests/api_resources/entities/test_industry_code.py +++ b/tests/api_resources/entities/test_industry_code.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.entity import Entity +from increase.types import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/entities/test_supplemental_documents.py index 5ad31ad9a..7779b3ea3 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/entities/test_supplemental_documents.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Entity from increase.pagination import SyncPage, AsyncPage -from increase.types.entity import Entity -from increase.types.entities.supplemental_document import SupplementalDocument +from increase.types.entities import ( + SupplementalDocument, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_account_enrollments.py b/tests/api_resources/intrafi/test_account_enrollments.py index 8cbba5883..6e120c600 100644 --- a/tests/api_resources/intrafi/test_account_enrollments.py +++ b/tests/api_resources/intrafi/test_account_enrollments.py @@ -10,7 +10,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment +from increase.types.intrafi import ( + IntrafiAccountEnrollment, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_balances.py b/tests/api_resources/intrafi/test_balances.py index e433b37c7..19f5cef5b 100644 --- a/tests/api_resources/intrafi/test_balances.py +++ b/tests/api_resources/intrafi/test_balances.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.intrafi.intrafi_balance import IntrafiBalance +from increase.types.intrafi import IntrafiBalance base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/intrafi/test_exclusions.py b/tests/api_resources/intrafi/test_exclusions.py index f0c4bc456..53629bd42 100644 --- a/tests/api_resources/intrafi/test_exclusions.py +++ b/tests/api_resources/intrafi/test_exclusions.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi.intrafi_exclusion import IntrafiExclusion +from increase.types.intrafi import IntrafiExclusion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index ace7f99e6..619881fcb 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.account_statement import AccountStatement +from increase.types import AccountStatement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index d807a8c40..6df6e1ad0 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.account_transfer import AccountTransfer +from increase.types import AccountTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index ef3645c31..42316a8c7 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ACHTransfer, InboundACHTransfer from increase._utils import parse_datetime -from increase.types.ach_transfer import ACHTransfer -from increase.types.inbound_ach_transfer import InboundACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index ee48a6590..8c89036e3 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.card_dispute import CardDispute +from increase.types import CardDispute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index d2cdc0e34..979ddd02c 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.transaction import Transaction +from increase.types import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py index 26b55750f..eef528851 100644 --- a/tests/api_resources/simulations/test_cards.py +++ b/tests/api_resources/simulations/test_cards.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.transaction import Transaction -from increase.types.simulations.card_authorization_simulation import CardAuthorizationSimulation +from increase.types import Transaction +from increase.types.simulations import CardAuthorizationSimulation base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 0e5f46d7f..395655e01 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.check_deposit import CheckDeposit +from increase.types import CheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 9b9951b79..14d3b4075 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.check_transfer import CheckTransfer +from increase.types import CheckTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 5ebcecd46..7d4d8cb36 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.simulations.digital_wallet_token_request_create_response import ( +from increase.types.simulations import ( DigitalWalletTokenRequestCreateResponse, ) diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 8d71a3653..3eedf06da 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.document import Document +from increase.types import Document base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index 0b21225c2..48760003f 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.inbound_check_deposit import InboundCheckDeposit +from increase.types import InboundCheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index 43816fba7..6645d9fdc 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse +from increase.types.simulations import InboundFundsHoldReleaseResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 dafd62668..e03b70c12 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.inbound_wire_drawdown_request import InboundWireDrawdownRequest +from increase.types import InboundWireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index a5a60e11d..d755d9a81 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Transaction from increase._utils import parse_datetime -from increase.types.transaction import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 05359b5e6..191a470b8 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.physical_card import PhysicalCard +from increase.types import PhysicalCard base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 5e8dfcbac..348c8bdf6 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.program import Program +from increase.types import Program base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") 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 de46613c8..de09f21ae 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.real_time_payments_transfer import RealTimePaymentsTransfer -from increase.types.simulations.inbound_real_time_payments_transfer_simulation_result import ( +from increase.types import RealTimePaymentsTransfer +from increase.types.simulations import ( InboundRealTimePaymentsTransferSimulationResult, ) diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index 5f109e299..8a699bc38 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.inbound_wire_transfer import InboundWireTransfer +from increase.types import InboundWireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index df44aba85..514c878fa 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + AccountNumber, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.account_number import AccountNumber base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index 680d65d21..d548cc5be 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import AccountStatement from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.account_statement import AccountStatement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index cbb48067d..e4f7e540f 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import AccountTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.account_transfer import AccountTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 6c8a1bc8b..d4d7ccfe8 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -9,10 +9,12 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + Account, + BalanceLookup, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.account import Account -from increase.types.balance_lookup import BalanceLookup base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 2cdf73543..5f281494e 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ACHPrenotification from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.ach_prenotification import ACHPrenotification base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index d90a5e452..d2aef2a9e 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ACHTransfer from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.ach_transfer import ACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 550fb3f4e..7ebf4c3bc 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -9,10 +9,12 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + BookkeepingAccount, + BookkeepingBalanceLookup, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.bookkeeping_account import BookkeepingAccount -from increase.types.bookkeeping_balance_lookup import BookkeepingBalanceLookup base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index a59ab8382..d129ae9dc 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import BookkeepingEntry from increase.pagination import SyncPage, AsyncPage -from increase.types.bookkeeping_entry import BookkeepingEntry base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 0d26ad21f..0edd3fdab 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import BookkeepingEntrySet from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.bookkeeping_entry_set import BookkeepingEntrySet base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 0a30e2258..55be0d43b 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import CardDispute from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.card_dispute import CardDispute base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 3687e40db..0291ae1d4 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import CardPayment from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.card_payment import CardPayment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 523696dda..8cd3e7906 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import CardPurchaseSupplement from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.card_purchase_supplement import CardPurchaseSupplement base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 8598d71d7..d05ab4c3f 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -9,10 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Card, CardDetails from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.card import Card -from increase.types.card_details import CardDetails base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index b624918f2..f17078a6c 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import CheckDeposit from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.check_deposit import CheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 0074813bd..f30144cfc 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + CheckTransfer, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.check_transfer import CheckTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 2ceb652b5..be25b92b2 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import DeclinedTransaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.declined_transaction import DeclinedTransaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index e83d45f50..1a9a7c31c 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + DigitalCardProfile, +) from increase.pagination import SyncPage, AsyncPage -from increase.types.digital_card_profile import DigitalCardProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index f371f517c..aefac4490 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import DigitalWalletToken from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.digital_wallet_token import DigitalWalletToken base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index ba47cafc4..f7f67b6d0 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Document from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.document import Document base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 2a61cc4c3..a24776d53 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + Entity, +) from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.entity import Entity base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 288bb5370..9eb61f1e2 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + EventSubscription, +) from increase.pagination import SyncPage, AsyncPage -from increase.types.event_subscription import EventSubscription base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index ce0f3089d..619b5e2d6 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Event from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.event import Event base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index e2630663f..c95473d10 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Export from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.export import Export base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 6bdcee2ee..9a7b7e476 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + ExternalAccount, +) from increase.pagination import SyncPage, AsyncPage -from increase.types.external_account import ExternalAccount base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 0b2a660b0..550cb6824 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import File from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.file import File base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index 0ddea0bc3..f0b1a4e4d 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.group import Group +from increase.types import Group base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 9824d2d77..b774a19ee 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + InboundACHTransfer, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.inbound_ach_transfer import InboundACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 8663b208c..d60cb59fd 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import InboundCheckDeposit from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.inbound_check_deposit import InboundCheckDeposit base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 3a70c9950..9e642f50a 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import InboundWireDrawdownRequest from increase.pagination import SyncPage, AsyncPage -from increase.types.inbound_wire_drawdown_request import InboundWireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index e8692d307..30427a1ee 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import InboundWireTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.inbound_wire_transfer import InboundWireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 957491721..8e798164d 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import OAuthConnection from increase.pagination import SyncPage, AsyncPage -from increase.types.oauth_connection import OAuthConnection base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index f6254704e..fac339dc0 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.oauth_token import OAuthToken +from increase.types import OAuthToken base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 4b03bd687..39f895c98 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import PendingTransaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.pending_transaction import PendingTransaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 0fa416c54..81461ff7a 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + PhysicalCardProfile, +) from increase.pagination import SyncPage, AsyncPage -from increase.types.physical_card_profile import PhysicalCardProfile base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 905f23462..6dc37a131 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + PhysicalCard, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.physical_card import PhysicalCard base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 01155b1b9..cff094a4a 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Program from increase.pagination import SyncPage, AsyncPage -from increase.types.program import Program base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index 6ebaf6a44..ca49929c7 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + ProofOfAuthorizationRequestSubmission, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index ad96e2df9..e5ec2bdbb 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ProofOfAuthorizationRequest from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.proof_of_authorization_request import ProofOfAuthorizationRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 0e120a621..fc58c2572 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.real_time_decision import RealTimeDecision +from increase.types import RealTimeDecision base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index bf68309a8..300f42449 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + RealTimePaymentsRequestForPayment, +) from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 5231ac275..e48d2c0a2 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import ( + RealTimePaymentsTransfer, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.real_time_payments_transfer import RealTimePaymentsTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 935fd08da..2b73295fa 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import RoutingNumber from increase.pagination import SyncPage, AsyncPage -from increase.types.routing_number import RoutingNumber base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py index a39f0c772..c519f0130 100644 --- a/tests/api_resources/test_simulations.py +++ b/tests/api_resources/test_simulations.py @@ -9,7 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.card_payment import CardPayment +from increase.types import ( + CardPayment, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index ed58ab3aa..1c66c4a7a 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import Transaction from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.transaction import Transaction base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 6477e79ef..b03363374 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -9,8 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import WireDrawdownRequest from increase.pagination import SyncPage, AsyncPage -from increase.types.wire_drawdown_request import WireDrawdownRequest base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 5293c0aa2..4d10cc88d 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -9,9 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import WireTransfer from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage -from increase.types.wire_transfer import WireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") From 6f576c3abdf1a47a2963e6162a801f4b1db5e000 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Apr 2024 17:50:17 +0000 Subject: [PATCH 0035/1325] chore(internal): minor reformatting (#439) --- tests/test_client.py | 1 - 1 file changed, 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index e1470a983..230905c3f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -17,7 +17,6 @@ from pydantic import ValidationError from increase import Increase, AsyncIncrease, APIResponseValidationError -from increase._client import Increase, AsyncIncrease from increase._models import BaseModel, FinalRequestOptions from increase._constants import RAW_RESPONSE_HEADER from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError From a3d826e38ae23384d61db40c999761ce7db93095 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Apr 2024 17:33:12 +0000 Subject: [PATCH 0036/1325] chore(client): log response headers in debug mode (#440) --- src/increase/_base_client.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index e4961e147..8731c7202 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -946,6 +946,8 @@ def _request( if self.custom_auth is not None: kwargs["auth"] = self.custom_auth + log.debug("Sending HTTP Request: %s %s", request.method, request.url) + try: response = self._client.send( request, @@ -984,7 +986,12 @@ def _request( raise APIConnectionError(request=request) from err log.debug( - 'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase + 'HTTP Response: %s %s "%i %s" %s', + request.method, + request.url, + response.status_code, + response.reason_phrase, + response.headers, ) try: From 3c66f94ebdf5927c1272d8bfadd895e20699b3b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 17:07:04 +0000 Subject: [PATCH 0037/1325] chore(internal): add link to openapi spec (#441) --- .stats.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.stats.yml b/.stats.yml index a789b2a49..5dd4a4abe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1 +1,2 @@ configured_endpoints: 187 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-26f9289ffb3a23c0074e170543dc34d2b6244427a7e4c0a039645f77714e0182.yml From 4dbe23c25b5eb24ce56bf7d58933f8da72fad700 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Apr 2024 22:18:56 +0000 Subject: [PATCH 0038/1325] chore(internal): add scripts/test, scripts/mock and add ci job (#442) --- .github/workflows/ci.yml | 22 ++++++++++- .gitignore | 1 + Brewfile | 2 + bin/check-env-state.py | 40 ------------------- bin/check-test-server | 50 ----------------------- bin/test | 3 -- pyproject.toml | 3 +- scripts/bootstrap | 19 +++++++++ scripts/format | 8 ++++ scripts/lint | 8 ++++ scripts/mock | 41 +++++++++++++++++++ scripts/test | 57 +++++++++++++++++++++++++++ {bin => scripts/utils}/ruffen-docs.py | 0 13 files changed, 159 insertions(+), 95 deletions(-) create mode 100644 Brewfile delete mode 100644 bin/check-env-state.py delete mode 100755 bin/check-test-server delete mode 100755 bin/test create mode 100755 scripts/bootstrap create mode 100755 scripts/format create mode 100755 scripts/lint create mode 100755 scripts/mock create mode 100755 scripts/test rename {bin => scripts/utils}/ruffen-docs.py (100%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c1a601296..c5f55e0cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,5 +39,25 @@ jobs: - name: Ensure importable run: | rye run python -c 'import increase' + test: + name: test + runs-on: ubuntu-latest + if: github.repository == 'increase/increase-python' + + steps: + - uses: actions/checkout@v4 + + - name: Install Rye + run: | + curl -sSf https://rye-up.com/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: 0.24.0 + RYE_INSTALL_OPTION: '--yes' + + - name: Bootstrap + run: ./scripts/bootstrap + + - name: Run tests + run: ./scripts/test - diff --git a/.gitignore b/.gitignore index a4b2f8c0b..0f9a66a97 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ dist .env .envrc codegen.log +Brewfile.lock.json diff --git a/Brewfile b/Brewfile new file mode 100644 index 000000000..492ca37bb --- /dev/null +++ b/Brewfile @@ -0,0 +1,2 @@ +brew "rye" + diff --git a/bin/check-env-state.py b/bin/check-env-state.py deleted file mode 100644 index e1b8b6cb3..000000000 --- a/bin/check-env-state.py +++ /dev/null @@ -1,40 +0,0 @@ -"""Script that exits 1 if the current environment is not -in sync with the `requirements-dev.lock` file. -""" - -from pathlib import Path - -import importlib_metadata - - -def should_run_sync() -> bool: - dev_lock = Path(__file__).parent.parent.joinpath("requirements-dev.lock") - - for line in dev_lock.read_text().splitlines(): - if not line or line.startswith("#") or line.startswith("-e"): - continue - - dep, lock_version = line.split("==") - - try: - version = importlib_metadata.version(dep) - - if lock_version != version: - print(f"mismatch for {dep} current={version} lock={lock_version}") - return True - except Exception: - print(f"could not import {dep}") - return True - - return False - - -def main() -> None: - if should_run_sync(): - exit(1) - else: - exit(0) - - -if __name__ == "__main__": - main() diff --git a/bin/check-test-server b/bin/check-test-server deleted file mode 100755 index a6fa34950..000000000 --- a/bin/check-test-server +++ /dev/null @@ -1,50 +0,0 @@ -#!/usr/bin/env bash - -RED='\033[0;31m' -GREEN='\033[0;32m' -YELLOW='\033[0;33m' -NC='\033[0m' # No Color - -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 -} - -function is_overriding_api_base_url() { - [ -n "$TEST_API_BASE_URL" ] -} - -if is_overriding_api_base_url ; then - # If someone is running the tests against the live API, we can trust they know - # what they're doing and exit early. - echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" - - exit 0 -elif prism_is_running ; then - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" - echo - - exit 0 -else - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" - echo -e "running against your OpenAPI spec." - echo - echo -e "${YELLOW}To fix:${NC}" - echo - echo -e "1. Install Prism (requires Node 16+):" - echo - echo -e " With npm:" - echo -e " \$ ${YELLOW}npm install -g @stoplight/prism-cli${NC}" - echo - echo -e " With yarn:" - echo -e " \$ ${YELLOW}yarn global add @stoplight/prism-cli${NC}" - echo - echo -e "2. Run the mock server" - echo - echo -e " To run the server, pass in the path of your OpenAPI" - echo -e " spec to the prism command:" - echo - echo -e " \$ ${YELLOW}prism mock path/to/your.openapi.yml${NC}" - echo - - exit 1 -fi diff --git a/bin/test b/bin/test deleted file mode 100755 index 60ede7a84..000000000 --- a/bin/test +++ /dev/null @@ -1,3 +0,0 @@ -#!/usr/bin/env bash - -bin/check-test-server && rye run pytest "$@" diff --git a/pyproject.toml b/pyproject.toml index 6c26ebbf7..c74344683 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -68,7 +68,7 @@ format = { chain = [ "fix:ruff", ]} "format:black" = "black ." -"format:docs" = "python bin/ruffen-docs.py README.md api.md" +"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" "format:ruff" = "ruff format" "format:isort" = "isort ." @@ -191,5 +191,6 @@ known-first-party = ["increase", "tests"] [tool.ruff.per-file-ignores] "bin/**.py" = ["T201", "T203"] +"scripts/**.py" = ["T201", "T203"] "tests/**.py" = ["T201", "T203"] "examples/**.py" = ["T201", "T203"] diff --git a/scripts/bootstrap b/scripts/bootstrap new file mode 100755 index 000000000..29df07e77 --- /dev/null +++ b/scripts/bootstrap @@ -0,0 +1,19 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then + brew bundle check >/dev/null 2>&1 || { + echo "==> Installing Homebrew dependencies…" + brew bundle + } +fi + +echo "==> Installing Python dependencies…" + +# experimental uv support makes installations significantly faster +rye config --set-bool behavior.use-uv=true + +rye sync diff --git a/scripts/format b/scripts/format new file mode 100755 index 000000000..2a9ea4664 --- /dev/null +++ b/scripts/format @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +rye run format + diff --git a/scripts/lint b/scripts/lint new file mode 100755 index 000000000..0cc68b515 --- /dev/null +++ b/scripts/lint @@ -0,0 +1,8 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +rye run lint + diff --git a/scripts/mock b/scripts/mock new file mode 100755 index 000000000..5a8c35b72 --- /dev/null +++ b/scripts/mock @@ -0,0 +1,41 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +if [[ -n "$1" && "$1" != '--'* ]]; then + URL="$1" + shift +else + URL="$(grep 'openapi_spec_url' .stats.yml | cut -d' ' -f2)" +fi + +# Check if the URL is empty +if [ -z "$URL" ]; then + echo "Error: No OpenAPI spec path/url provided or found in .stats.yml" + exit 1 +fi + +echo "==> Starting mock server with URL ${URL}" + +# Run prism mock on the given spec +if [ "$1" == "--daemon" ]; then + npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" &> .prism.log & + + # Wait for server to come online + echo -n "Waiting for server" + while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + echo -n "." + sleep 0.1 + done + + if grep -q "✖ fatal" ".prism.log"; then + cat .prism.log + exit 1 + fi + + echo +else + npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" +fi diff --git a/scripts/test b/scripts/test new file mode 100755 index 000000000..be01d0447 --- /dev/null +++ b/scripts/test @@ -0,0 +1,57 @@ +#!/usr/bin/env bash + +set -e + +cd "$(dirname "$0")/.." + +RED='\033[0;31m' +GREEN='\033[0;32m' +YELLOW='\033[0;33m' +NC='\033[0m' # No Color + +function prism_is_running() { + curl --silent "http://localhost:4010" >/dev/null 2>&1 +} + +kill_server_on_port() { + pids=$(lsof -t -i tcp:"$1" || echo "") + if [ "$pids" != "" ]; then + kill "$pids" + echo "Stopped $pids." + fi +} + +function is_overriding_api_base_url() { + [ -n "$TEST_API_BASE_URL" ] +} + +if ! is_overriding_api_base_url && ! prism_is_running ; then + # When we exit this script, make sure to kill the background mock server process + trap 'kill_server_on_port 4010' EXIT + + # Start the dev server + ./scripts/mock --daemon +fi + +if is_overriding_api_base_url ; then + echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" + echo +elif ! prism_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" + echo -e "running against your OpenAPI spec." + echo + echo -e "To run the server, pass in the path or url of your OpenAPI" + echo -e "spec to the prism command:" + echo + echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo + + exit 1 +else + echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo +fi + +# Run tests +echo "==> Running tests" +rye run pytest "$@" diff --git a/bin/ruffen-docs.py b/scripts/utils/ruffen-docs.py similarity index 100% rename from bin/ruffen-docs.py rename to scripts/utils/ruffen-docs.py From 40794b7ac9a685323af91dc75a156ba68d2cc837 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 17:49:48 +0000 Subject: [PATCH 0039/1325] chore(internal): bump mock server version to ~5.8.0 (#443) --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index 5a8c35b72..fe89a1d08 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock "$URL" + npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" fi From 33ac495bf2f48490da51558615e4679997e86ab2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 May 2024 20:28:53 +0000 Subject: [PATCH 0040/1325] feat(api): updates (#444) --- .stats.yml | 2 +- src/increase/resources/inbound_ach_transfers.py | 6 ++++++ src/increase/types/inbound_ach_transfer.py | 3 +++ .../types/inbound_ach_transfer_transfer_return_params.py | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5dd4a4abe..d035af429 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-26f9289ffb3a23c0074e170543dc34d2b6244427a7e4c0a039645f77714e0182.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-141a8471be919f7864e2305bd6d930271b782bf44b52db042cae9c4a9e545dfd.yml diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 0cf3977b7..5a42052a7 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -251,6 +251,7 @@ def transfer_return( inbound_ach_transfer_id: str, *, reason: Literal[ + "insufficient_funds", "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", @@ -279,6 +280,8 @@ def transfer_return( reason: The reason why this transfer will be returned. The most usual return codes are `payment_stopped` for debits and `credit_entry_refused_by_receiver` for credits. + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. The Nacha return code is R06. @@ -551,6 +554,7 @@ async def transfer_return( inbound_ach_transfer_id: str, *, reason: Literal[ + "insufficient_funds", "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", @@ -579,6 +583,8 @@ async def transfer_return( reason: The reason why this transfer will be returned. The most usual return codes are `payment_stopped` for debits and `credit_entry_refused_by_receiver` for credits. + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. The Nacha return code is R06. diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 3bd6b820f..5e3bb1d34 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -106,6 +106,7 @@ class NotificationOfChange(BaseModel): class TransferReturn(BaseModel): reason: Literal[ + "insufficient_funds", "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", @@ -118,6 +119,8 @@ class TransferReturn(BaseModel): ] """The reason for the transfer return. + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. The Nacha return code is R06. diff --git a/src/increase/types/inbound_ach_transfer_transfer_return_params.py b/src/increase/types/inbound_ach_transfer_transfer_return_params.py index 979e434f1..79742df96 100644 --- a/src/increase/types/inbound_ach_transfer_transfer_return_params.py +++ b/src/increase/types/inbound_ach_transfer_transfer_return_params.py @@ -10,6 +10,7 @@ class InboundACHTransferTransferReturnParams(TypedDict, total=False): reason: Required[ Literal[ + "insufficient_funds", "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", @@ -26,6 +27,8 @@ class InboundACHTransferTransferReturnParams(TypedDict, total=False): The most usual return codes are `payment_stopped` for debits and `credit_entry_refused_by_receiver` for credits. + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. The Nacha return code is R06. From 51e0619ae5490ad12f3521200d644688f3ecfb50 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 May 2024 16:03:22 +0000 Subject: [PATCH 0041/1325] docs(readme): fix misleading timeout example value (#445) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index d1d11a64c..895a27b8d 100644 --- a/README.md +++ b/README.md @@ -263,7 +263,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout=5 * 1000).accounts.list( +client.with_options(timeout=5.0).accounts.list( status="open", ) ``` From 0358a0bacedf86a227ee17e54c423709cd78f5b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 May 2024 14:22:16 +0000 Subject: [PATCH 0042/1325] chore(internal): fix generated version numbers (#447) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 563004f25..284ce936c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.46.0" + ".": "0.60.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c74344683..c448cce8c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.46.0" +version = "0.60.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6c46a5847..942ca8445 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.46.0" # x-release-please-version +__version__ = "0.60.0" # x-release-please-version From 57ac1b7ef7e1a19611c97577a5dbf41680f4fef3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 18:33:07 +0000 Subject: [PATCH 0043/1325] feat(api): enhance API with extended transaction details and new entity types (#448) 1. Extended the `maxLength` of transaction dispute explanations from 200 to 2000 characters to accommodate more detailed descriptions. 2. Introduced new transaction attributes `presentment_amount` and `presentment_currency` to support dual-currency scenarios, enhancing the API's flexibility in handling international transactions. 3. Added support for government authorities as a new entity type within the API, including detailed attributes for managing governmental transactions and entities. 4. Improved documentation descriptions to include government authorities as recognized legal entities, ensuring the API descriptions are comprehensive and up-to-date. --- .stats.yml | 2 +- src/increase/resources/entities/entities.py | 16 ++++- src/increase/types/account.py | 6 ++ src/increase/types/card_payment.py | 20 ++++++ src/increase/types/declined_transaction.py | 11 ++++ src/increase/types/entity.py | 63 ++++++++++++++++++- src/increase/types/entity_create_params.py | 63 ++++++++++++++++++- src/increase/types/pending_transaction.py | 9 +++ src/increase/types/real_time_decision.py | 3 + .../card_authorization_simulation.py | 20 ++++++ ...ime_payments_transfer_simulation_result.py | 11 ++++ tests/api_resources/test_entities.py | 28 +++++++++ 12 files changed, 247 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index d035af429..6d3433e26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-141a8471be919f7864e2305bd6d930271b782bf44b52db042cae9c4a9e545dfd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8cad4b12ccec8743315d493d3d32556a74a4c78d26d81a78b43be8a0fcb68a19.yml diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index 11151bf36..0b6862238 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -81,9 +81,10 @@ def with_streaming_response(self) -> EntitiesWithStreamingResponse: def create( self, *, - structure: Literal["corporation", "natural_person", "joint", "trust"], + structure: Literal["corporation", "natural_person", "joint", "trust", "government_authority"], corporation: entity_create_params.Corporation | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, + government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, @@ -106,12 +107,16 @@ def create( - `natural_person` - An individual person. - `joint` - Multiple individual people. - `trust` - A trust. + - `government_authority` - A government authority. corporation: Details of the corporation entity to create. Required if `structure` is equal to `corporation`. description: The description you choose to give the entity. + government_authority: Details of the Government Authority entity to create. Required if `structure` is + equal to `Government Authority`. + joint: Details of the joint entity to create. Required if `structure` is equal to `joint`. @@ -142,6 +147,7 @@ def create( "structure": structure, "corporation": corporation, "description": description, + "government_authority": government_authority, "joint": joint, "natural_person": natural_person, "supplemental_documents": supplemental_documents, @@ -418,9 +424,10 @@ def with_streaming_response(self) -> AsyncEntitiesWithStreamingResponse: async def create( self, *, - structure: Literal["corporation", "natural_person", "joint", "trust"], + structure: Literal["corporation", "natural_person", "joint", "trust", "government_authority"], corporation: entity_create_params.Corporation | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, + government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, @@ -443,12 +450,16 @@ async def create( - `natural_person` - An individual person. - `joint` - Multiple individual people. - `trust` - A trust. + - `government_authority` - A government authority. corporation: Details of the corporation entity to create. Required if `structure` is equal to `corporation`. description: The description you choose to give the entity. + government_authority: Details of the Government Authority entity to create. Required if `structure` is + equal to `Government Authority`. + joint: Details of the joint entity to create. Required if `structure` is equal to `joint`. @@ -479,6 +490,7 @@ async def create( "structure": structure, "corporation": corporation, "description": description, + "government_authority": government_authority, "joint": joint, "natural_person": natural_person, "supplemental_documents": supplemental_documents, diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 911df2a31..d59fe0bf1 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -20,6 +20,12 @@ class Account(BaseModel): - `first_internet_bank` - First Internet Bank of Indiana """ + closed_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Account + was closed. + """ + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Account diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 316bd7bb8..81c3d0b30 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -340,6 +340,15 @@ class ElementCardAuthorization(BaseModel): that was used. """ + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] @@ -680,6 +689,17 @@ class ElementCardDecline(BaseModel): that was used. """ + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 1f40bcab3..45bfaadef 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -370,6 +370,17 @@ class SourceCardDecline(BaseModel): that was used. """ + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 814117179..7f0974807 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -14,6 +14,9 @@ "CorporationBeneficialOwnerIndividual", "CorporationBeneficialOwnerIndividualAddress", "CorporationBeneficialOwnerIndividualIdentification", + "GovernmentAuthority", + "GovernmentAuthorityAddress", + "GovernmentAuthorityAuthorizedPerson", "Joint", "JointIndividual", "JointIndividualAddress", @@ -161,6 +164,57 @@ class Corporation(BaseModel): """The website of the corporation.""" +class GovernmentAuthorityAddress(BaseModel): + city: str + """The city of the address.""" + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: str + """The ZIP code of the address.""" + + +class GovernmentAuthorityAuthorizedPerson(BaseModel): + authorized_person_id: str + """The identifier of this authorized person.""" + + name: str + """The person's legal name.""" + + +class GovernmentAuthority(BaseModel): + address: GovernmentAuthorityAddress + """The government authority's address.""" + + authorized_persons: List[GovernmentAuthorityAuthorizedPerson] + """The identifying details of authorized persons of the government authority.""" + + category: Literal["municipality"] + """The category of the government authority. + + - `municipality` - The Public Entity is a Municipality. + """ + + name: str + """The government authority's name.""" + + tax_identifier: Optional[str] = None + """The Employer Identification Number (EIN) of the government authority.""" + + website: Optional[str] = None + """The government authority's website.""" + + class JointIndividualAddress(BaseModel): city: str """The city of the address.""" @@ -506,6 +560,12 @@ class Entity(BaseModel): Entity's details were most recently confirmed. """ + government_authority: Optional[GovernmentAuthority] = None + """Details of the government authority entity. + + Will be present if `structure` is equal to `government_authority`. + """ + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. @@ -536,13 +596,14 @@ class Entity(BaseModel): financial activity. """ - structure: Literal["corporation", "natural_person", "joint", "trust"] + structure: Literal["corporation", "natural_person", "joint", "trust", "government_authority"] """The entity's legal structure. - `corporation` - A corporation. - `natural_person` - An individual person. - `joint` - Multiple individual people. - `trust` - A trust. + - `government_authority` - A government authority. """ supplemental_documents: List[SupplementalDocument] diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 432ebbc51..a93805212 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -19,6 +19,9 @@ "CorporationBeneficialOwnerIndividualIdentificationDriversLicense", "CorporationBeneficialOwnerIndividualIdentificationOther", "CorporationBeneficialOwnerIndividualIdentificationPassport", + "GovernmentAuthority", + "GovernmentAuthorityAddress", + "GovernmentAuthorityAuthorizedPerson", "Joint", "JointIndividual", "JointIndividualAddress", @@ -52,13 +55,14 @@ class EntityCreateParams(TypedDict, total=False): - structure: Required[Literal["corporation", "natural_person", "joint", "trust"]] + structure: Required[Literal["corporation", "natural_person", "joint", "trust", "government_authority"]] """The type of Entity to create. - `corporation` - A corporation. - `natural_person` - An individual person. - `joint` - Multiple individual people. - `trust` - A trust. + - `government_authority` - A government authority. """ corporation: Corporation @@ -70,6 +74,12 @@ class EntityCreateParams(TypedDict, total=False): description: str """The description you choose to give the entity.""" + government_authority: GovernmentAuthority + """Details of the Government Authority entity to create. + + Required if `structure` is equal to `Government Authority`. + """ + joint: Joint """Details of the joint entity to create. @@ -304,6 +314,57 @@ class Corporation(TypedDict, total=False): """The website of the corporation.""" +class GovernmentAuthorityAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + +class GovernmentAuthorityAuthorizedPerson(TypedDict, total=False): + name: Required[str] + """The person's legal name.""" + + +class GovernmentAuthority(TypedDict, total=False): + address: Required[GovernmentAuthorityAddress] + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + + authorized_persons: Required[Iterable[GovernmentAuthorityAuthorizedPerson]] + """The identifying details of authorized officials acting on the entity's behalf.""" + + category: Required[Literal["municipality"]] + """The category of the government authority. + + - `municipality` - The Public Entity is a Municipality. + """ + + name: Required[str] + """The legal name of the government authority.""" + + tax_identifier: Required[str] + """The Employer Identification Number (EIN) for the government authority.""" + + website: str + """The website of the government authority.""" + + class JointIndividualAddress(TypedDict, total=False): city: Required[str] """The city of the address.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 3ea94a711..1e7eabfe1 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -342,6 +342,15 @@ class SourceCardAuthorization(BaseModel): that was used. """ + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 539fa5d0d..2d9db1c0b 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -236,6 +236,9 @@ class CardAuthorization(BaseModel): card_id: str """The identifier of the Card that is being authorized.""" + card_payment_id: str + """The identifier of the Card Payment this authorization belongs to.""" + decision: Optional[Literal["approve", "decline"]] = None """Whether or not the authorization was approved. diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 0353e5fec..d0df78a58 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -387,6 +387,17 @@ class DeclinedTransactionSourceCardDecline(BaseModel): that was used. """ + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] @@ -1321,6 +1332,15 @@ class PendingTransactionSourceCardAuthorization(BaseModel): that was used. """ + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index bb00a142d..9a71ab5c2 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -418,6 +418,17 @@ class DeclinedTransactionSourceCardDecline(BaseModel): that was used. """ + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + processing_category: Literal[ "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" ] diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index a24776d53..ef929ff75 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -87,6 +87,20 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ], }, description="x", + government_authority={ + "name": "x", + "website": "string", + "category": "municipality", + "tax_identifier": "x", + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + }, joint={ "name": "x", "individuals": [ @@ -726,6 +740,20 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ], }, description="x", + government_authority={ + "name": "x", + "website": "string", + "category": "municipality", + "tax_identifier": "x", + "address": { + "line1": "x", + "line2": "x", + "city": "x", + "state": "x", + "zip": "x", + }, + "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + }, joint={ "name": "x", "individuals": [ From f9b8b2b26b972f2ce4e60057a7b90c91dce43697 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 May 2024 19:35:04 +0000 Subject: [PATCH 0044/1325] chore(docs): add SECURITY.md (#449) --- .release-please-manifest.json | 2 +- SECURITY.md | 27 +++++++++++++++++++++++++++ pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 30 insertions(+), 3 deletions(-) create mode 100644 SECURITY.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 284ce936c..f7e971ead 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.60.0" + ".": "0.61.0" } \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 000000000..c0967acc5 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,27 @@ +# Security Policy + +## Reporting Security Issues + +This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. + +To report a security issue, please contact the Stainless team at security@stainlessapi.com. + +## Responsible Disclosure + +We appreciate the efforts of security researchers and individuals who help us maintain the security of +SDKs we generate. If you believe you have found a security vulnerability, please adhere to responsible +disclosure practices by allowing us a reasonable amount of time to investigate and address the issue +before making any information public. + +## Reporting Non-SDK Related Security Issues + +If you encounter security issues that are not directly related to SDKs but pertain to the services +or products provided by Increase please follow the respective company's security reporting guidelines. + +### Increase Terms and Policies + +Please contact dev-feedback@increase.com for any questions or concerns regarding security of our services. + +--- + +Thank you for helping us keep the SDKs and systems they interact with secure. diff --git a/pyproject.toml b/pyproject.toml index c448cce8c..050e9df6b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.60.0" +version = "0.61.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 942ca8445..9b493dcb2 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.60.0" # x-release-please-version +__version__ = "0.61.0" # x-release-please-version From facc41ea68d1b44e90497ef73931802e352fd9c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 13 May 2024 12:08:54 +0000 Subject: [PATCH 0045/1325] chore(internal): bump pydantic dependency (#451) --- requirements-dev.lock | 4 ++-- requirements.lock | 4 ++-- src/increase/_models.py | 20 ++++++++++++++++---- tests/test_models.py | 8 ++++---- tests/test_transform.py | 22 ++++++++++++---------- 5 files changed, 36 insertions(+), 22 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 40191aed5..c0743d2b1 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -59,9 +59,9 @@ pluggy==1.3.0 # via pytest py==1.11.0 # via pytest -pydantic==2.4.2 +pydantic==2.7.1 # via increase -pydantic-core==2.10.1 +pydantic-core==2.18.2 # via pydantic pyright==1.1.359 pytest==7.1.1 diff --git a/requirements.lock b/requirements.lock index f2450c2bf..3597082a9 100644 --- a/requirements.lock +++ b/requirements.lock @@ -29,9 +29,9 @@ httpx==0.25.2 idna==3.4 # via anyio # via httpx -pydantic==2.4.2 +pydantic==2.7.1 # via increase -pydantic-core==2.10.1 +pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio diff --git a/src/increase/_models.py b/src/increase/_models.py index ff3f54e2c..75c68cc73 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -62,7 +62,7 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: - from pydantic_core.core_schema import ModelField, ModelFieldsSchema + from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema __all__ = ["BaseModel", "GenericModel"] @@ -251,7 +251,9 @@ def model_dump( exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, - warnings: bool = True, + warnings: bool | Literal["none", "warn", "error"] = True, + context: dict[str, Any] | None = None, + serialize_as_any: bool = False, ) -> dict[str, Any]: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump @@ -279,6 +281,10 @@ def model_dump( raise ValueError("round_trip is only supported in Pydantic v2") if warnings != True: raise ValueError("warnings is only supported in Pydantic v2") + if context is not None: + raise ValueError("context is only supported in Pydantic v2") + if serialize_as_any != False: + raise ValueError("serialize_as_any is only supported in Pydantic v2") return super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, @@ -300,7 +306,9 @@ def model_dump_json( exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, - warnings: bool = True, + warnings: bool | Literal["none", "warn", "error"] = True, + context: dict[str, Any] | None = None, + serialize_as_any: bool = False, ) -> str: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json @@ -324,6 +332,10 @@ def model_dump_json( raise ValueError("round_trip is only supported in Pydantic v2") if warnings != True: raise ValueError("warnings is only supported in Pydantic v2") + if context is not None: + raise ValueError("context is only supported in Pydantic v2") + if serialize_as_any != False: + raise ValueError("serialize_as_any is only supported in Pydantic v2") return super().json( # type: ignore[reportDeprecated] indent=indent, include=include, @@ -550,7 +562,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, field_schema = field["schema"] if field_schema["type"] == "literal": - for entry in field_schema["expected"]: + for entry in cast("LiteralSchema", field_schema)["expected"]: if isinstance(entry, str): mapping[entry] = variant else: diff --git a/tests/test_models.py b/tests/test_models.py index bea66f805..9d9fe50ae 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -31,7 +31,7 @@ class NestedModel(BaseModel): # mismatched types m = NestedModel.construct(nested="hello!") - assert m.nested == "hello!" + assert cast(Any, m.nested) == "hello!" def test_optional_nested_model() -> None: @@ -48,7 +48,7 @@ class NestedModel(BaseModel): # mismatched types m3 = NestedModel.construct(nested={"foo"}) assert isinstance(cast(Any, m3.nested), set) - assert m3.nested == {"foo"} + assert cast(Any, m3.nested) == {"foo"} def test_list_nested_model() -> None: @@ -323,7 +323,7 @@ class Model(BaseModel): assert len(m.items) == 2 assert isinstance(m.items[0], Submodel1) assert m.items[0].level == -1 - assert m.items[1] == 156 + assert cast(Any, m.items[1]) == 156 def test_union_of_lists() -> None: @@ -355,7 +355,7 @@ class Model(BaseModel): assert len(m.items) == 2 assert isinstance(m.items[0], SubModel1) assert m.items[0].level == -1 - assert m.items[1] == 156 + assert cast(Any, m.items[1]) == 156 def test_dict_of_union() -> None: diff --git a/tests/test_transform.py b/tests/test_transform.py index 866780653..e04aa1fe6 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -260,20 +260,22 @@ class MyModel(BaseModel): @parametrize @pytest.mark.asyncio async def test_pydantic_model_to_dictionary(use_async: bool) -> None: - assert await transform(MyModel(foo="hi!"), Any, use_async) == {"foo": "hi!"} - assert await transform(MyModel.construct(foo="hi!"), Any, use_async) == {"foo": "hi!"} + assert cast(Any, await transform(MyModel(foo="hi!"), Any, use_async)) == {"foo": "hi!"} + assert cast(Any, await transform(MyModel.construct(foo="hi!"), Any, use_async)) == {"foo": "hi!"} @parametrize @pytest.mark.asyncio async def test_pydantic_empty_model(use_async: bool) -> None: - assert await transform(MyModel.construct(), Any, use_async) == {} + assert cast(Any, await transform(MyModel.construct(), Any, use_async)) == {} @parametrize @pytest.mark.asyncio async def test_pydantic_unknown_field(use_async: bool) -> None: - assert await transform(MyModel.construct(my_untyped_field=True), Any, use_async) == {"my_untyped_field": True} + assert cast(Any, await transform(MyModel.construct(my_untyped_field=True), Any, use_async)) == { + "my_untyped_field": True + } @parametrize @@ -285,7 +287,7 @@ async def test_pydantic_mismatched_types(use_async: bool) -> None: params = await transform(model, Any, use_async) else: params = await transform(model, Any, use_async) - assert params == {"foo": True} + assert cast(Any, params) == {"foo": True} @parametrize @@ -297,7 +299,7 @@ async def test_pydantic_mismatched_object_type(use_async: bool) -> None: params = await transform(model, Any, use_async) else: params = await transform(model, Any, use_async) - assert params == {"foo": {"hello": "world"}} + assert cast(Any, params) == {"foo": {"hello": "world"}} class ModelNestedObjects(BaseModel): @@ -309,7 +311,7 @@ class ModelNestedObjects(BaseModel): async def test_pydantic_nested_objects(use_async: bool) -> None: model = ModelNestedObjects.construct(nested={"foo": "stainless"}) assert isinstance(model.nested, MyModel) - assert await transform(model, Any, use_async) == {"nested": {"foo": "stainless"}} + assert cast(Any, await transform(model, Any, use_async)) == {"nested": {"foo": "stainless"}} class ModelWithDefaultField(BaseModel): @@ -325,19 +327,19 @@ async def test_pydantic_default_field(use_async: bool) -> None: model = ModelWithDefaultField.construct() assert model.with_none_default is None assert model.with_str_default == "foo" - assert await transform(model, Any, use_async) == {} + assert cast(Any, await transform(model, Any, use_async)) == {} # should be included when the default value is explicitly given model = ModelWithDefaultField.construct(with_none_default=None, with_str_default="foo") assert model.with_none_default is None assert model.with_str_default == "foo" - assert await transform(model, Any, use_async) == {"with_none_default": None, "with_str_default": "foo"} + assert cast(Any, await transform(model, Any, use_async)) == {"with_none_default": None, "with_str_default": "foo"} # should be included when a non-default value is explicitly given model = ModelWithDefaultField.construct(with_none_default="bar", with_str_default="baz") assert model.with_none_default == "bar" assert model.with_str_default == "baz" - assert await transform(model, Any, use_async) == {"with_none_default": "bar", "with_str_default": "baz"} + assert cast(Any, await transform(model, Any, use_async)) == {"with_none_default": "bar", "with_str_default": "baz"} class TypedDictIterableUnion(TypedDict): From dfa1626c36d3c8cb71453d1ea4f32556f97f8235 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 13:39:25 +0000 Subject: [PATCH 0046/1325] docs(api): update examples & docstrings (#452) --- .stats.yml | 2 +- .../resources/real_time_payments_transfers.py | 20 +- .../types/real_time_payments_transfer.py | 19 +- ...al_time_payments_transfer_create_params.py | 14 +- .../entities/test_beneficial_owners.py | 104 +-- tests/api_resources/test_cards.py | 24 +- tests/api_resources/test_check_transfers.py | 36 +- .../test_digital_card_profiles.py | 16 +- tests/api_resources/test_entities.py | 632 +++++++++--------- tests/api_resources/test_physical_cards.py | 64 +- .../api_resources/test_real_time_decisions.py | 4 +- ...real_time_payments_request_for_payments.py | 12 +- 12 files changed, 483 insertions(+), 464 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d3433e26..909c3af1b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8cad4b12ccec8743315d493d3d32556a74a4c78d26d81a78b43be8a0fcb68a19.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-362c60a9c12da2ac428e003edcd825a4d2fc71a3762b6c920a5fa1b26243b21b.yml diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index bee151de6..935b52514 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -68,8 +68,8 @@ def create( source_account_number_id: The identifier of the Account Number from which to send the transfer. - debtor_name: The name of the transfer's sender. If not provided, the account's entity name - will be used. + debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the + account's entity. destination_account_number: The destination account number. @@ -82,9 +82,11 @@ def create( require_approval: Whether the transfer requires explicit approval via the dashboard or API. - ultimate_creditor_name: The name of the party on whose behalf the creditor is receiving the payment. + ultimate_creditor_name: The name of the ultimate recipient of the transfer. Set this if the creditor is + an intermediary receiving the payment for someone else. - ultimate_debtor_name: The name of the the party on whose behalf the debtor is instructing the payment. + ultimate_debtor_name: The name of the ultimate sender of the transfer. Set this if the funds are being + sent on behalf of someone who is not the account holder at Increase. extra_headers: Send extra headers @@ -272,8 +274,8 @@ async def create( source_account_number_id: The identifier of the Account Number from which to send the transfer. - debtor_name: The name of the transfer's sender. If not provided, the account's entity name - will be used. + debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the + account's entity. destination_account_number: The destination account number. @@ -286,9 +288,11 @@ async def create( require_approval: Whether the transfer requires explicit approval via the dashboard or API. - ultimate_creditor_name: The name of the party on whose behalf the creditor is receiving the payment. + ultimate_creditor_name: The name of the ultimate recipient of the transfer. Set this if the creditor is + an intermediary receiving the payment for someone else. - ultimate_debtor_name: The name of the the party on whose behalf the debtor is instructing the payment. + ultimate_debtor_name: The name of the ultimate sender of the transfer. Set this if the funds are being + sent on behalf of someone who is not the account holder at Increase. extra_headers: Send extra headers diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 2506a356f..b0f50812f 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -168,7 +168,10 @@ class RealTimePaymentsTransfer(BaseModel): """ creditor_name: str - """The name of the transfer's recipient as provided by the sender.""" + """The name of the transfer's recipient. + + This is set by the sender when creating the transfer. + """ currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ @@ -186,7 +189,7 @@ class RealTimePaymentsTransfer(BaseModel): debtor_name: Optional[str] = None """The name of the transfer's sender. - If not provided, the account's entity name will be used. + If not provided, defaults to the name of the account's entity. """ destination_account_number: str @@ -270,9 +273,15 @@ class RealTimePaymentsTransfer(BaseModel): """ ultimate_creditor_name: Optional[str] = None - """The name of the party on whose behalf the creditor is receiving the payment.""" + """The name of the ultimate recipient of the transfer. - ultimate_debtor_name: Optional[str] = None + Set this if the creditor is an intermediary receiving the payment for someone + else. """ - The name of the the party on whose behalf the debtor is instructing the payment. + + ultimate_debtor_name: Optional[str] = None + """The name of the ultimate sender of the transfer. + + Set this if the funds are being sent on behalf of someone who is not the account + holder at Increase. """ diff --git a/src/increase/types/real_time_payments_transfer_create_params.py b/src/increase/types/real_time_payments_transfer_create_params.py index a6171438b..9d9c61605 100644 --- a/src/increase/types/real_time_payments_transfer_create_params.py +++ b/src/increase/types/real_time_payments_transfer_create_params.py @@ -26,7 +26,7 @@ class RealTimePaymentsTransferCreateParams(TypedDict, total=False): debtor_name: str """The name of the transfer's sender. - If not provided, the account's entity name will be used. + If not provided, defaults to the name of the account's entity. """ destination_account_number: str @@ -49,9 +49,15 @@ class RealTimePaymentsTransferCreateParams(TypedDict, total=False): """Whether the transfer requires explicit approval via the dashboard or API.""" ultimate_creditor_name: str - """The name of the party on whose behalf the creditor is receiving the payment.""" + """The name of the ultimate recipient of the transfer. - ultimate_debtor_name: str + Set this if the creditor is an intermediary receiving the payment for someone + else. """ - The name of the the party on whose behalf the debtor is instructing the payment. + + ultimate_debtor_name: str + """The name of the ultimate sender of the transfer. + + Set this if the funds are being sent on behalf of someone who is not the account + holder at Increase. """ diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py index 6511d6691..2a923e505 100644 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -23,18 +23,18 @@ def test_method_create(self, client: Increase) -> None: beneficial_owner = client.entities.beneficial_owners.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -46,41 +46,41 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: beneficial_owner = client.entities.beneficial_owners.create( beneficial_owner={ + "company_title": "CEO", "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), "identification": { - "method": "social_security_number", - "number": "078051120", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "078051120", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "Ian Crease", }, - "company_title": "CEO", "prongs": ["control"], }, entity_id="entity_n8y8tnk2p9339ti393yi", @@ -92,18 +92,18 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.entities.beneficial_owners.with_raw_response.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -120,18 +120,18 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.entities.beneficial_owners.with_streaming_response.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -183,8 +183,8 @@ def test_streaming_response_archive(self, client: Increase) -> None: def test_method_update_address(self, client: Increase) -> None: beneficial_owner = client.entities.beneficial_owners.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -197,9 +197,9 @@ def test_method_update_address(self, client: Increase) -> None: def test_method_update_address_with_all_params(self, client: Increase) -> None: beneficial_owner = client.entities.beneficial_owners.update_address( address={ + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", - "city": "New York", "state": "NY", "zip": "10045", }, @@ -212,8 +212,8 @@ def test_method_update_address_with_all_params(self, client: Increase) -> None: def test_raw_response_update_address(self, client: Increase) -> None: response = client.entities.beneficial_owners.with_raw_response.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -230,8 +230,8 @@ def test_raw_response_update_address(self, client: Increase) -> None: def test_streaming_response_update_address(self, client: Increase) -> None: with client.entities.beneficial_owners.with_streaming_response.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -255,18 +255,18 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.entities.beneficial_owners.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -278,41 +278,41 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.entities.beneficial_owners.create( beneficial_owner={ + "company_title": "CEO", "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), "identification": { - "method": "social_security_number", - "number": "078051120", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "078051120", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "Ian Crease", }, - "company_title": "CEO", "prongs": ["control"], }, entity_id="entity_n8y8tnk2p9339ti393yi", @@ -324,18 +324,18 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.beneficial_owners.with_raw_response.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -352,18 +352,18 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.entities.beneficial_owners.with_streaming_response.create( beneficial_owner={ "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, + "date_of_birth": parse_date("1970-01-31"), "identification": { "method": "social_security_number", "number": "078051120", }, + "name": "Ian Crease", }, "prongs": ["control"], }, @@ -415,8 +415,8 @@ async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> async def test_method_update_address(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.entities.beneficial_owners.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -429,9 +429,9 @@ async def test_method_update_address(self, async_client: AsyncIncrease) -> None: async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.entities.beneficial_owners.update_address( address={ + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", - "city": "New York", "state": "NY", "zip": "10045", }, @@ -444,8 +444,8 @@ async def test_method_update_address_with_all_params(self, async_client: AsyncIn async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.beneficial_owners.with_raw_response.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -462,8 +462,8 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: async with async_client.entities.beneficial_owners.with_streaming_response.update_address( address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index d05ab4c3f..54702b53f 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -31,17 +31,17 @@ def test_method_create_with_all_params(self, client: Increase) -> None: card = client.cards.create( account_id="account_in71c4amph0vgo2qllky", billing_address={ + "city": "x", "line1": "x", "line2": "x", - "city": "x", - "state": "x", "postal_code": "x", + "state": "x", }, description="Card for Ian Crease", digital_wallet={ + "digital_card_profile_id": "string", "email": "x", "phone": "x", - "digital_card_profile_id": "string", }, entity_id="string", ) @@ -121,17 +121,17 @@ def test_method_update_with_all_params(self, client: Increase) -> None: card = client.cards.update( "string", billing_address={ + "city": "x", "line1": "x", "line2": "x", - "city": "x", - "state": "x", "postal_code": "x", + "state": "x", }, description="New description", digital_wallet={ + "digital_card_profile_id": "string", "email": "x", "phone": "x", - "digital_card_profile_id": "string", }, entity_id="string", status="active", @@ -264,17 +264,17 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) card = await async_client.cards.create( account_id="account_in71c4amph0vgo2qllky", billing_address={ + "city": "x", "line1": "x", "line2": "x", - "city": "x", - "state": "x", "postal_code": "x", + "state": "x", }, description="Card for Ian Crease", digital_wallet={ + "digital_card_profile_id": "string", "email": "x", "phone": "x", - "digital_card_profile_id": "string", }, entity_id="string", ) @@ -354,17 +354,17 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) card = await async_client.cards.update( "string", billing_address={ + "city": "x", "line1": "x", "line2": "x", - "city": "x", - "state": "x", "postal_code": "x", + "state": "x", }, description="New description", digital_wallet={ + "digital_card_profile_id": "string", "email": "x", "phone": "x", - "digital_card_profile_id": "string", }, entity_id="string", status="active", diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index f30144cfc..c3fb21dea 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -38,24 +38,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", fulfillment_method="physical_check", physical_check={ - "memo": "Check payment", - "note": "x", - "recipient_name": "Ian Crease", "mailing_address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", - "state": "NY", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "memo": "Check payment", + "note": "x", + "recipient_name": "Ian Crease", "return_address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", - "state": "NY", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, }, require_approval=True, @@ -318,24 +318,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", fulfillment_method="physical_check", physical_check={ - "memo": "Check payment", - "note": "x", - "recipient_name": "Ian Crease", "mailing_address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", - "state": "NY", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "memo": "Check payment", + "note": "x", + "recipient_name": "Ian Crease", "return_address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", - "state": "NY", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, }, require_approval=True, diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 1a9a7c31c..cc1861299 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -43,9 +43,9 @@ def test_method_create_with_all_params(self, client: Increase) -> None: contact_phone="+18885551212", contact_website="https://example.com", text_color={ - "red": 26, - "green": 43, "blue": 59, + "green": 43, + "red": 26, }, ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @@ -217,9 +217,9 @@ def test_method_clone_with_all_params(self, client: Increase) -> None: description="x", issuer_name="x", text_color={ - "red": 0, - "green": 0, "blue": 0, + "green": 0, + "red": 0, }, ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @@ -284,9 +284,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) contact_phone="+18885551212", contact_website="https://example.com", text_color={ - "red": 26, - "green": 43, "blue": 59, + "green": 43, + "red": 26, }, ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @@ -458,9 +458,9 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) - description="x", issuer_name="x", text_color={ - "red": 0, - "green": 0, "blue": 0, + "green": 0, + "red": 0, }, ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index ef929ff75..ed795a9a3 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -33,376 +33,376 @@ def test_method_create_with_all_params(self, client: Increase) -> None: entity = client.entities.create( structure="corporation", corporation={ - "name": "National Phonograph Company", - "website": "https://example.com", - "tax_identifier": "602214076", - "incorporation_state": "NY", - "industry_code": "x", "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "beneficial_owners": [ { + "company_title": "CEO", "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), "identification": { - "method": "social_security_number", - "number": "078051120", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "078051120", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "Ian Crease", }, - "company_title": "CEO", "prongs": ["control"], } ], + "incorporation_state": "NY", + "industry_code": "x", + "name": "National Phonograph Company", + "tax_identifier": "602214076", + "website": "https://example.com", }, description="x", government_authority={ - "name": "x", - "website": "string", - "category": "municipality", - "tax_identifier": "x", "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + "category": "municipality", + "name": "x", + "tax_identifier": "x", + "website": "string", }, joint={ - "name": "x", "individuals": [ { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, ], + "name": "x", }, natural_person={ - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ - "name": "x", - "category": "revocable", - "tax_identifier": "x", - "formation_state": "x", "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, + "category": "revocable", "formation_document_file_id": "string", + "formation_state": "x", + "grantor": { + "address": { + "city": "x", + "line1": "x", + "line2": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), + "identification": { + "drivers_license": { + "back_file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + "state": "x", + }, + "method": "social_security_number", + "number": "xxxx", + "other": { + "back_file_id": "string", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + }, + "name": "x", + }, + "name": "x", + "tax_identifier": "x", "trustees": [ { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, ], - "grantor": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), - "address": { - "line1": "x", - "line2": "x", - "city": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, - "drivers_license": { - "file_id": "string", - "back_file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "state": "x", - }, - "other": { - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "string", - "back_file_id": "string", - }, - }, - }, }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -599,8 +599,8 @@ def test_method_update_address(self, client: Increase) -> None: entity = client.entities.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -612,9 +612,9 @@ def test_method_update_address_with_all_params(self, client: Increase) -> None: entity = client.entities.update_address( "string", address={ + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", - "city": "New York", "state": "NY", "zip": "10045", }, @@ -626,8 +626,8 @@ def test_raw_response_update_address(self, client: Increase) -> None: response = client.entities.with_raw_response.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -643,8 +643,8 @@ def test_streaming_response_update_address(self, client: Increase) -> None: with client.entities.with_streaming_response.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -663,8 +663,8 @@ def test_path_params_update_address(self, client: Increase) -> None: client.entities.with_raw_response.update_address( "", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -686,376 +686,376 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) entity = await async_client.entities.create( structure="corporation", corporation={ - "name": "National Phonograph Company", - "website": "https://example.com", - "tax_identifier": "602214076", - "incorporation_state": "NY", - "industry_code": "x", "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "beneficial_owners": [ { + "company_title": "CEO", "individual": { - "name": "Ian Crease", - "date_of_birth": parse_date("1970-01-31"), "address": { + "city": "New York", "line1": "33 Liberty Street", "line2": "x", - "city": "New York", "state": "NY", "zip": "10045", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), "identification": { - "method": "social_security_number", - "number": "078051120", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "078051120", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "Ian Crease", }, - "company_title": "CEO", "prongs": ["control"], } ], + "incorporation_state": "NY", + "industry_code": "x", + "name": "National Phonograph Company", + "tax_identifier": "602214076", + "website": "https://example.com", }, description="x", government_authority={ - "name": "x", - "website": "string", - "category": "municipality", - "tax_identifier": "x", "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + "category": "municipality", + "name": "x", + "tax_identifier": "x", + "website": "string", }, joint={ - "name": "x", "individuals": [ { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), + "identification": { "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, ], + "name": "x", }, natural_person={ - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ - "name": "x", - "category": "revocable", - "tax_identifier": "x", - "formation_state": "x", "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, + "category": "revocable", "formation_document_file_id": "string", + "formation_state": "x", + "grantor": { + "address": { + "city": "x", + "line1": "x", + "line2": "x", + "state": "x", + "zip": "x", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), + "identification": { + "drivers_license": { + "back_file_id": "string", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + "state": "x", + }, + "method": "social_security_number", + "number": "xxxx", + "other": { + "back_file_id": "string", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", + }, + }, + "name": "x", + }, + "name": "x", + "tax_identifier": "x", "trustees": [ { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, { - "structure": "individual", "individual": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), "address": { + "city": "x", "line1": "x", "line2": "x", - "city": "x", "state": "x", "zip": "x", }, "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("2019-12-27"), "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, "drivers_license": { - "file_id": "string", "back_file_id": "string", "expiration_date": parse_date("2019-12-27"), + "file_id": "string", "state": "x", }, + "method": "social_security_number", + "number": "xxxx", "other": { + "back_file_id": "string", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), "file_id": "string", - "back_file_id": "string", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "string", }, }, + "name": "x", }, + "structure": "individual", }, ], - "grantor": { - "name": "x", - "date_of_birth": parse_date("2019-12-27"), - "address": { - "line1": "x", - "line2": "x", - "city": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "identification": { - "method": "social_security_number", - "number": "xxxx", - "passport": { - "file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "country": "x", - }, - "drivers_license": { - "file_id": "string", - "back_file_id": "string", - "expiration_date": parse_date("2019-12-27"), - "state": "x", - }, - "other": { - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "string", - "back_file_id": "string", - }, - }, - }, }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1252,8 +1252,8 @@ async def test_method_update_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -1265,9 +1265,9 @@ async def test_method_update_address_with_all_params(self, async_client: AsyncIn entity = await async_client.entities.update_address( "string", address={ + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", - "city": "New York", "state": "NY", "zip": "10045", }, @@ -1279,8 +1279,8 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> response = await async_client.entities.with_raw_response.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -1296,8 +1296,8 @@ async def test_streaming_response_update_address(self, async_client: AsyncIncrea async with async_client.entities.with_streaming_response.update_address( "string", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, @@ -1316,8 +1316,8 @@ async def test_path_params_update_address(self, async_client: AsyncIncrease) -> await async_client.entities.with_raw_response.update_address( "", address={ - "line1": "33 Liberty Street", "city": "New York", + "line1": "33 Liberty Street", "state": "NY", "zip": "10045", }, diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 6dc37a131..57ed78e97 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -30,14 +30,14 @@ def test_method_create(self, client: Increase) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -51,17 +51,17 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", "line3": "x", + "name": "Ian Crease", "phone_number": "x", - "city": "New York", - "state": "NY", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, physical_card_profile_id="string", ) @@ -76,14 +76,14 @@ def test_raw_response_create(self, client: Increase) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) @@ -101,14 +101,14 @@ def test_streaming_response_create(self, client: Increase) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) as response: assert not response.is_closed @@ -253,14 +253,14 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -274,17 +274,17 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", + "city": "New York", "line1": "33 Liberty Street", "line2": "Unit 2", "line3": "x", + "name": "Ian Crease", "phone_number": "x", - "city": "New York", - "state": "NY", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, physical_card_profile_id="string", ) @@ -299,14 +299,14 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) @@ -324,14 +324,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N "last_name": "Crease", }, shipment={ - "method": "usps", "address": { - "name": "Ian Crease", - "line1": "33 Liberty Street", "city": "New York", - "state": "NY", + "line1": "33 Liberty Street", + "name": "Ian Crease", "postal_code": "10045", + "state": "NY", }, + "method": "usps", }, ) as response: assert not response.is_closed diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index fc58c2572..7a6ea901d 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -70,8 +70,8 @@ def test_method_action_with_all_params(self, client: Increase) -> None: digital_wallet_authentication={"result": "success"}, digital_wallet_token={ "approval": { - "phone": "x", "email": "x", + "phone": "x", }, "decline": {"reason": "x"}, }, @@ -166,8 +166,8 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) digital_wallet_authentication={"result": "success"}, digital_wallet_token={ "approval": { - "phone": "x", "email": "x", + "phone": "x", }, "decline": {"reason": "x"}, }, diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index 300f42449..156bfa5c4 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -26,8 +26,8 @@ def test_method_create(self, client: Increase) -> None: real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), @@ -44,8 +44,8 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.real_time_payments_request_for_payments.with_raw_response.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), @@ -66,8 +66,8 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.real_time_payments_request_for_payments.with_streaming_response.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), @@ -189,8 +189,8 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), @@ -207,8 +207,8 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_request_for_payments.with_raw_response.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), @@ -229,8 +229,8 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.real_time_payments_request_for_payments.with_streaming_response.create( amount=100, debtor={ - "name": "Ian Crease", "address": {"country": "US"}, + "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", expires_at=parse_date("2025-12-31"), From cefabdd07fc9a873ac446eeaba8e62d32274c196 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 May 2024 14:50:02 +0000 Subject: [PATCH 0047/1325] chore(internal): add slightly better logging to scripts (#453) --- .github/workflows/ci.yml | 16 +++------------- scripts/format | 2 +- scripts/lint | 4 ++++ scripts/test | 1 - 4 files changed, 8 insertions(+), 15 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c5f55e0cb..13dc66ff4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,20 +25,10 @@ jobs: RYE_INSTALL_OPTION: '--yes' - name: Install dependencies - run: | - rye sync --all-features - - - name: Run ruff - run: | - rye run check:ruff + run: rye sync --all-features - - name: Run type checking - run: | - rye run typecheck - - - name: Ensure importable - run: | - rye run python -c 'import increase' + - name: Run lints + run: ./scripts/lint test: name: test runs-on: ubuntu-latest diff --git a/scripts/format b/scripts/format index 2a9ea4664..667ec2d7a 100755 --- a/scripts/format +++ b/scripts/format @@ -4,5 +4,5 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running formatters" rye run format - diff --git a/scripts/lint b/scripts/lint index 0cc68b515..a36d33cc6 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,5 +4,9 @@ set -e cd "$(dirname "$0")/.." +echo "==> Running lints" rye run lint +echo "==> Making sure it imports" +rye run python -c 'import increase' + diff --git a/scripts/test b/scripts/test index be01d0447..b3ace9013 100755 --- a/scripts/test +++ b/scripts/test @@ -52,6 +52,5 @@ else echo fi -# Run tests echo "==> Running tests" rye run pytest "$@" From 8a93800cf0880c92f2b721061d3a32d933042d8f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 May 2024 13:12:13 +0000 Subject: [PATCH 0048/1325] feat(api): updates (#454) --- .stats.yml | 2 +- src/increase/types/account_transfer.py | 49 ++++++++++++- src/increase/types/ach_transfer.py | 43 ++++++++++++ src/increase/types/check_deposit.py | 3 + src/increase/types/check_transfer.py | 43 ++++++++++++ src/increase/types/declined_transaction.py | 70 +++++++++++++++++++ .../types/declined_transaction_list_params.py | 1 + .../types/real_time_payments_transfer.py | 51 +++++++++++++- .../card_authorization_simulation.py | 70 +++++++++++++++++++ ...ime_payments_transfer_simulation_result.py | 70 +++++++++++++++++++ src/increase/types/wire_transfer.py | 51 +++++++++++++- 11 files changed, 449 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 909c3af1b..260fc184e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-362c60a9c12da2ac428e003edcd825a4d2fc71a3762b6c920a5fa1b26243b21b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-209b98893834bbf33c398d61e6d2eadd6f1f75f05db8edcea55236834705551c.yml diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index 952efdc36..e838a26d6 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -6,7 +6,15 @@ from .._models import BaseModel -__all__ = ["AccountTransfer", "Approval", "Cancellation"] +__all__ = [ + "AccountTransfer", + "Approval", + "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", +] class Approval(BaseModel): @@ -37,6 +45,42 @@ class Cancellation(BaseModel): """ +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + class AccountTransfer(BaseModel): id: str """The account transfer's identifier.""" @@ -68,6 +112,9 @@ class AccountTransfer(BaseModel): the transfer was created. """ + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 678d6b1fd..30e4fbb55 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -18,6 +18,10 @@ "AddendaPaymentOrderRemittanceAdviceInvoice", "Approval", "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", "NotificationsOfChange", "Return", "Submission", @@ -112,6 +116,42 @@ class Cancellation(BaseModel): """ +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + class NotificationsOfChange(BaseModel): change_code: Literal[ "incorrect_account_number", @@ -520,6 +560,9 @@ class ACHTransfer(BaseModel): the transfer was created. """ + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 12c28cf9f..c629c7166 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -59,6 +59,9 @@ class DepositRejection(BaseModel): For dollars, for example, this is cents. """ + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 261435795..9aab03353 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -10,6 +10,10 @@ "CheckTransfer", "Approval", "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", "Mailing", "PhysicalCheck", "PhysicalCheckMailingAddress", @@ -48,6 +52,42 @@ class Cancellation(BaseModel): """ +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + class Mailing(BaseModel): image_id: Optional[str] = None """ @@ -193,6 +233,9 @@ class CheckTransfer(BaseModel): the transfer was created. """ + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 45bfaadef..667e94ca4 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -18,6 +18,7 @@ "SourceCardDeclineVerificationCardVerificationCode", "SourceCardDeclineVerificationCardholderAddress", "SourceCheckDecline", + "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", "SourceInternationalACHDecline", "SourceWireDecline", @@ -529,6 +530,65 @@ class SourceCheckDecline(BaseModel): """ +class SourceCheckDepositRejection(BaseModel): + amount: int + """The rejected amount in the minor unit of check's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "incomplete_image", + "duplicate", + "poor_image_quality", + "incorrect_amount", + "incorrect_recipient", + "not_eligible_for_mobile_deposit", + "missing_required_data_elements", + "suspected_fraud", + "deposit_window_expired", + "unknown", + ] + """Why the check deposit was rejected. + + - `incomplete_image` - The check's image is incomplete. + - `duplicate` - This is a duplicate check submission. + - `poor_image_quality` - This check has poor image quality. + - `incorrect_amount` - The check was deposited with the incorrect amount. + - `incorrect_recipient` - The check is made out to someone other than the + account holder. + - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile + deposit. + - `missing_required_data_elements` - This check is missing at least one required + field. + - `suspected_fraud` - This check is suspected to be fraudulent. + - `deposit_window_expired` - This check's deposit window has expired. + - `unknown` - The check was rejected for an unknown reason. + """ + + rejected_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was rejected. + """ + + class SourceInboundRealTimePaymentsTransferDecline(BaseModel): amount: int """The declined amount in the minor unit of the destination account currency. @@ -880,6 +940,7 @@ class Source(BaseModel): "inbound_real_time_payments_transfer_decline", "international_ach_decline", "wire_decline", + "check_deposit_rejection", "other", ] """The type of the resource. @@ -899,6 +960,8 @@ class Source(BaseModel): the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. + - `check_deposit_rejection` - Check Deposit Rejection: details will be under the + `check_deposit_rejection` object. - `other` - The Declined Transaction was made for an undocumented or deprecated reason. """ @@ -910,6 +973,13 @@ class Source(BaseModel): equal to `check_decline`. """ + check_deposit_rejection: Optional[SourceCheckDepositRejection] = None + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_rejection`. + """ + inbound_real_time_payments_transfer_decline: Optional[SourceInboundRealTimePaymentsTransferDecline] = None """An Inbound Real-Time Payments Transfer Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index 53321d6c5..e79abff89 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -43,6 +43,7 @@ class DeclinedTransactionListParams(TypedDict, total=False): "inbound_real_time_payments_transfer_decline", "international_ach_decline", "wire_decline", + "check_deposit_rejection", "other", ] ], diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index b0f50812f..ae2b7266a 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -6,7 +6,17 @@ from .._models import BaseModel -__all__ = ["RealTimePaymentsTransfer", "Approval", "Cancellation", "Rejection", "Submission"] +__all__ = [ + "RealTimePaymentsTransfer", + "Approval", + "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "Rejection", + "Submission", +] class Approval(BaseModel): @@ -37,6 +47,42 @@ class Cancellation(BaseModel): """ +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + class Rejection(BaseModel): reject_reason_additional_information: Optional[str] = None """ @@ -167,6 +213,9 @@ class RealTimePaymentsTransfer(BaseModel): the transfer was created. """ + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + creditor_name: str """The name of the transfer's recipient. diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index d0df78a58..03d8393ec 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -19,6 +19,7 @@ "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", "DeclinedTransactionSourceCheckDecline", + "DeclinedTransactionSourceCheckDepositRejection", "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", "DeclinedTransactionSourceInternationalACHDecline", "DeclinedTransactionSourceWireDecline", @@ -546,6 +547,65 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): """ +class DeclinedTransactionSourceCheckDepositRejection(BaseModel): + amount: int + """The rejected amount in the minor unit of check's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "incomplete_image", + "duplicate", + "poor_image_quality", + "incorrect_amount", + "incorrect_recipient", + "not_eligible_for_mobile_deposit", + "missing_required_data_elements", + "suspected_fraud", + "deposit_window_expired", + "unknown", + ] + """Why the check deposit was rejected. + + - `incomplete_image` - The check's image is incomplete. + - `duplicate` - This is a duplicate check submission. + - `poor_image_quality` - This check has poor image quality. + - `incorrect_amount` - The check was deposited with the incorrect amount. + - `incorrect_recipient` - The check is made out to someone other than the + account holder. + - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile + deposit. + - `missing_required_data_elements` - This check is missing at least one required + field. + - `suspected_fraud` - This check is suspected to be fraudulent. + - `deposit_window_expired` - This check's deposit window has expired. + - `unknown` - The check was rejected for an unknown reason. + """ + + rejected_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was rejected. + """ + + class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): amount: int """The declined amount in the minor unit of the destination account currency. @@ -897,6 +957,7 @@ class DeclinedTransactionSource(BaseModel): "inbound_real_time_payments_transfer_decline", "international_ach_decline", "wire_decline", + "check_deposit_rejection", "other", ] """The type of the resource. @@ -916,6 +977,8 @@ class DeclinedTransactionSource(BaseModel): the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. + - `check_deposit_rejection` - Check Deposit Rejection: details will be under the + `check_deposit_rejection` object. - `other` - The Declined Transaction was made for an undocumented or deprecated reason. """ @@ -927,6 +990,13 @@ class DeclinedTransactionSource(BaseModel): equal to `check_decline`. """ + check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_rejection`. + """ + inbound_real_time_payments_transfer_decline: Optional[ DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline ] = None diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index 9a71ab5c2..fdc181235 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -19,6 +19,7 @@ "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", "DeclinedTransactionSourceCheckDecline", + "DeclinedTransactionSourceCheckDepositRejection", "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", "DeclinedTransactionSourceInternationalACHDecline", "DeclinedTransactionSourceWireDecline", @@ -577,6 +578,65 @@ class DeclinedTransactionSourceCheckDecline(BaseModel): """ +class DeclinedTransactionSourceCheckDepositRejection(BaseModel): + amount: int + """The rejected amount in the minor unit of check's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "incomplete_image", + "duplicate", + "poor_image_quality", + "incorrect_amount", + "incorrect_recipient", + "not_eligible_for_mobile_deposit", + "missing_required_data_elements", + "suspected_fraud", + "deposit_window_expired", + "unknown", + ] + """Why the check deposit was rejected. + + - `incomplete_image` - The check's image is incomplete. + - `duplicate` - This is a duplicate check submission. + - `poor_image_quality` - This check has poor image quality. + - `incorrect_amount` - The check was deposited with the incorrect amount. + - `incorrect_recipient` - The check is made out to someone other than the + account holder. + - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile + deposit. + - `missing_required_data_elements` - This check is missing at least one required + field. + - `suspected_fraud` - This check is suspected to be fraudulent. + - `deposit_window_expired` - This check's deposit window has expired. + - `unknown` - The check was rejected for an unknown reason. + """ + + rejected_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was rejected. + """ + + class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): amount: int """The declined amount in the minor unit of the destination account currency. @@ -928,6 +988,7 @@ class DeclinedTransactionSource(BaseModel): "inbound_real_time_payments_transfer_decline", "international_ach_decline", "wire_decline", + "check_deposit_rejection", "other", ] """The type of the resource. @@ -947,6 +1008,8 @@ class DeclinedTransactionSource(BaseModel): the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. + - `check_deposit_rejection` - Check Deposit Rejection: details will be under the + `check_deposit_rejection` object. - `other` - The Declined Transaction was made for an undocumented or deprecated reason. """ @@ -958,6 +1021,13 @@ class DeclinedTransactionSource(BaseModel): equal to `check_decline`. """ + check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_rejection`. + """ + inbound_real_time_payments_transfer_decline: Optional[ DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline ] = None diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index a8b2eff12..0d17f1364 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -6,7 +6,17 @@ from .._models import BaseModel -__all__ = ["WireTransfer", "Approval", "Cancellation", "Reversal", "Submission"] +__all__ = [ + "WireTransfer", + "Approval", + "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "Reversal", + "Submission", +] class Approval(BaseModel): @@ -37,6 +47,42 @@ class Cancellation(BaseModel): """ +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + class Reversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" @@ -156,6 +202,9 @@ class WireTransfer(BaseModel): the transfer was created. """ + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's From 88a029080fc18a4cf780a19f111c2d515e453752 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 09:50:51 +0000 Subject: [PATCH 0049/1325] chore(ci): update rye install location (#455) the site is currently down due to DNS issues --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-pypi.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index dd9396201..e9841a168 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://rye-up.com/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 13dc66ff4..3c897581e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://rye-up.com/get | bash + curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 @@ -39,7 +39,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://rye-up.com/get | bash + curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 79c13c081..f9a40de6b 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -18,7 +18,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://rye-up.com/get | bash + curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 From 8f3e2b9a732ef9715fad5fdf6bfe70b80e0380c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 19:04:16 +0000 Subject: [PATCH 0050/1325] chore(ci): update rye install location (#457) --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-pypi.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index e9841a168..83bca8f71 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3c897581e..fef45531b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,7 +18,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash + curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 @@ -39,7 +39,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash + curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index f9a40de6b..62c5f4a8d 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -18,7 +18,7 @@ jobs: - name: Install Rye run: | - curl -sSf https://raw.githubusercontent.com/astral-sh/rye/main/scripts/install.sh | bash + curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: RYE_VERSION: 0.24.0 From 5c1e893642a4d11251d214f4eed9fd512e0c5878 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 May 2024 19:58:51 +0000 Subject: [PATCH 0051/1325] feat(api): realtime decision updates (#458) --- .stats.yml | 2 +- src/increase/types/real_time_decision.py | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 260fc184e..7dcc7e583 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-209b98893834bbf33c398d61e6d2eadd6f1f75f05db8edcea55236834705551c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-9078500c83f203168a040b83f641f9f5199a649c7660fde0a1c0c5b3c3b13ddf.yml diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 2d9db1c0b..e64439ffc 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -236,9 +236,6 @@ class CardAuthorization(BaseModel): card_id: str """The identifier of the Card that is being authorized.""" - card_payment_id: str - """The identifier of the Card Payment this authorization belongs to.""" - decision: Optional[Literal["approve", "decline"]] = None """Whether or not the authorization was approved. @@ -341,6 +338,12 @@ class CardAuthorization(BaseModel): transaction will be settled in. """ + upcoming_card_payment_id: str + """The identifier of the Card Payment this authorization will belong to. + + Available in the API once the card authorization has completed. + """ + verification: CardAuthorizationVerification """Fields related to verification of cardholder-provided values.""" From 3ae85bf9cae895263320e605077358b335bfe682 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 08:07:38 +0000 Subject: [PATCH 0052/1325] chore(internal): bump pyright (#459) --- requirements-dev.lock | 2 +- src/increase/_utils/_utils.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index c0743d2b1..71efaa6e2 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -63,7 +63,7 @@ pydantic==2.7.1 # via increase pydantic-core==2.18.2 # via pydantic -pyright==1.1.359 +pyright==1.1.364 pytest==7.1.1 # via pytest-asyncio pytest-asyncio==0.21.1 diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 17904ce60..34797c290 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -20,7 +20,7 @@ import sniffio -from .._types import Headers, NotGiven, FileTypes, NotGivenOr, HeadersLike +from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike from .._compat import parse_date as parse_date, parse_datetime as parse_datetime _T = TypeVar("_T") @@ -370,7 +370,6 @@ def file_from_path(path: str) -> FileTypes: def get_required_header(headers: HeadersLike, header: str) -> str: lower_header = header.lower() if isinstance(headers, Mapping): - headers = cast(Headers, headers) for k, v in headers.items(): if k.lower() == lower_header and isinstance(v, str): return v From 720069bfed88b669107e4ca3d6bdb6ec4beed2e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 May 2024 14:54:22 +0000 Subject: [PATCH 0053/1325] docs(contributing): update references to rye-up.com (#461) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 18ff545e0..546ed3883 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,7 +2,7 @@ ### With Rye -We use [Rye](https://rye-up.com/) to manage dependencies so we highly recommend [installing it](https://rye-up.com/guide/installation/) as it will automatically provision a Python environment with the expected Python version. +We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version. After installing Rye, you'll just have to run this command: From 6971c4d38fb9abffb2c32a4f67b1f446f0f01ed5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 May 2024 18:57:30 +0000 Subject: [PATCH 0054/1325] chore(internal): update bootstrap script (#462) --- scripts/bootstrap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index 29df07e77..8c5c60eba 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -16,4 +16,4 @@ echo "==> Installing Python dependencies…" # experimental uv support makes installations significantly faster rye config --set-bool behavior.use-uv=true -rye sync +rye sync --all-features From 49f323152469e64d882c73badc6717c376b3e40a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 May 2024 13:51:28 +0000 Subject: [PATCH 0055/1325] feat(api): add trace number to ach transfer returns (#463) --- .stats.yml | 2 +- src/increase/types/ach_transfer.py | 8 ++++++++ ...bound_real_time_payments_transfer_simulation_result.py | 8 ++++++++ src/increase/types/transaction.py | 8 ++++++++ 4 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7dcc7e583..16d814200 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-9078500c83f203168a040b83f641f9f5199a649c7660fde0a1c0c5b3c3b13ddf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8f6666db43428da831b8b2ba0f162246d20657011dedcca4e67ff269bd781126.yml diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 30e4fbb55..2fc40e5c2 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -465,6 +465,14 @@ class Return(BaseModel): late. """ + trace_number: str + """A 15 digit number that was generated by the bank that initiated the return. + + The trace number of the return is different than that of the original transfer. + ACH trace numbers are not unique, but along with the amount and date this number + can be used to identify the ACH return at the bank that initiated it. + """ + transaction_id: str """The identifier of the Transaction associated with this return.""" diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index fdc181235..bdb236f85 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -1413,6 +1413,14 @@ class TransactionSourceACHTransferReturn(BaseModel): late. """ + trace_number: str + """A 15 digit number that was generated by the bank that initiated the return. + + The trace number of the return is different than that of the original transfer. + ACH trace numbers are not unique, but along with the amount and date this number + can be used to identify the ACH return at the bank that initiated it. + """ + transaction_id: str """The identifier of the Transaction associated with this return.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 4ed5a4ce0..da0df5035 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -353,6 +353,14 @@ class SourceACHTransferReturn(BaseModel): late. """ + trace_number: str + """A 15 digit number that was generated by the bank that initiated the return. + + The trace number of the return is different than that of the original transfer. + ACH trace numbers are not unique, but along with the amount and date this number + can be used to identify the ACH return at the bank that initiated it. + """ + transaction_id: str """The identifier of the Transaction associated with this return.""" From a6170bb7bce3a0a625c75dab494626ecf13d6cf7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Jun 2024 21:36:12 +0000 Subject: [PATCH 0056/1325] feat(api): updates (#464) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 16d814200..74f382587 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8f6666db43428da831b8b2ba0f162246d20657011dedcca4e67ff269bd781126.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-f86da4eee3effca84ab6ebffa53ac4abae919128c88f4cd8a8ad3ff37a5948a6.yml From 64e0e7dae04286b491a9593695f652cb99da4c0d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Jun 2024 17:51:15 +0000 Subject: [PATCH 0057/1325] feat(api): add `default_digital_card_profile_id` property (#466) --- .stats.yml | 2 +- src/increase/types/digital_card_profile.py | 6 ------ src/increase/types/program.py | 3 +++ 3 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 74f382587..30db7210a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-f86da4eee3effca84ab6ebffa53ac4abae919128c88f4cd8a8ad3ff37a5948a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-313b105e56a987f7cec2472124dc400ae16436b51d68de6041d298835472c474.yml diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py index 042f27cfd..338be2d3b 100644 --- a/src/increase/types/digital_card_profile.py +++ b/src/increase/types/digital_card_profile.py @@ -59,12 +59,6 @@ class DigitalCardProfile(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - is_default: bool - """ - Whether this Digital Card Profile is the default for all cards in its Increase - group. - """ - issuer_name: str """A user-facing description for whoever is issuing the card.""" diff --git a/src/increase/types/program.py b/src/increase/types/program.py index 41ec837f3..19d355de6 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -22,6 +22,9 @@ class Program(BaseModel): was created. """ + default_digital_card_profile_id: Optional[str] = None + """The default configuration for digital cards attached to this Program.""" + name: str """The name of the Program.""" From ce7be1251b796974258bc6eba0b28c6f098858df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Jun 2024 15:27:16 +0000 Subject: [PATCH 0058/1325] chore(internal): add a `default_query` method (#468) --- src/increase/_base_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 8731c7202..6d0848466 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -457,7 +457,7 @@ def _build_request( raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") headers = self._build_headers(options) - params = _merge_mappings(self._custom_query, options.params) + params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") # If the given Content-Type header is multipart/form-data then it @@ -593,6 +593,12 @@ def default_headers(self) -> dict[str, str | Omit]: **self._custom_headers, } + @property + def default_query(self) -> dict[str, object]: + return { + **self._custom_query, + } + def _validate_headers( self, headers: Headers, # noqa: ARG002 From 281020f9263804f3d2889dd252b6699015b211a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Jun 2024 11:19:06 +0000 Subject: [PATCH 0059/1325] fix(client/async): avoid blocking io call for platform headers (#470) --- src/increase/_base_client.py | 17 +++++++++++++---- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_reflection.py | 8 ++++++++ src/increase/_utils/_sync.py | 19 ++++++++++++++++++- 4 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 src/increase/_utils/_reflection.py diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 6d0848466..fa9dbde30 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -60,7 +60,7 @@ RequestOptions, ModelBuilderProtocol, ) -from ._utils import is_dict, is_list, is_given, lru_cache, is_mapping +from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( @@ -359,6 +359,7 @@ def __init__( self._custom_query = custom_query or {} self._strict_response_validation = _strict_response_validation self._idempotency_header = None + self._platform: Platform | None = None if max_retries is None: # pyright: ignore[reportUnnecessaryComparison] raise TypeError( @@ -623,7 +624,10 @@ def base_url(self, url: URL | str) -> None: self._base_url = self._enforce_trailing_slash(url if isinstance(url, URL) else URL(url)) def platform_headers(self) -> Dict[str, str]: - return platform_headers(self._version) + # the actual implementation is in a separate `lru_cache` decorated + # function because adding `lru_cache` to methods will leak memory + # https://github.com/python/cpython/issues/88476 + return platform_headers(self._version, platform=self._platform) def _parse_retry_after_header(self, response_headers: Optional[httpx.Headers] = None) -> float | None: """Returns a float of the number of seconds (not milliseconds) to wait after retrying, or None if unspecified. @@ -1512,6 +1516,11 @@ async def _request( stream_cls: type[_AsyncStreamT] | None, remaining_retries: int | None, ) -> ResponseT | _AsyncStreamT: + if self._platform is None: + # `get_platform` can make blocking IO calls so we + # execute it earlier while we are in an async context + self._platform = await asyncify(get_platform)() + cast_to = self._maybe_override_cast_to(cast_to, options) await self._prepare_options(options) @@ -1948,11 +1957,11 @@ def get_platform() -> Platform: @lru_cache(maxsize=None) -def platform_headers(version: str) -> Dict[str, str]: +def platform_headers(version: str, *, platform: Platform | None) -> Dict[str, str]: return { "X-Stainless-Lang": "python", "X-Stainless-Package-Version": version, - "X-Stainless-OS": str(get_platform()), + "X-Stainless-OS": str(platform or get_platform()), "X-Stainless-Arch": str(get_architecture()), "X-Stainless-Runtime": get_python_runtime(), "X-Stainless-Runtime-Version": get_python_version(), diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index 31b5b2279..667e2473f 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -49,3 +49,4 @@ maybe_transform as maybe_transform, async_maybe_transform as async_maybe_transform, ) +from ._reflection import function_has_argument as function_has_argument diff --git a/src/increase/_utils/_reflection.py b/src/increase/_utils/_reflection.py new file mode 100644 index 000000000..e134f58e0 --- /dev/null +++ b/src/increase/_utils/_reflection.py @@ -0,0 +1,8 @@ +import inspect +from typing import Any, Callable + + +def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool: + """Returns whether or not the given function has a specific parameter""" + sig = inspect.signature(func) + return arg_name in sig.parameters diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index 595924e5b..d0d810337 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -7,6 +7,8 @@ import anyio import anyio.to_thread +from ._reflection import function_has_argument + T_Retval = TypeVar("T_Retval") T_ParamSpec = ParamSpec("T_ParamSpec") @@ -59,6 +61,21 @@ def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str: async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Retval: partial_f = functools.partial(function, *args, **kwargs) - return await anyio.to_thread.run_sync(partial_f, cancellable=cancellable, limiter=limiter) + + # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old + # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid + # surfacing deprecation warnings. + if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): + return await anyio.to_thread.run_sync( + partial_f, + abandon_on_cancel=cancellable, + limiter=limiter, + ) + + return await anyio.to_thread.run_sync( + partial_f, + cancellable=cancellable, + limiter=limiter, + ) return wrapper From 227f8721ec3405506cbbb0e6e197c42a8c3d6617 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Jun 2024 13:58:15 +0000 Subject: [PATCH 0060/1325] fix(docs): fix link to advanced python httpx docs (#471) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 895a27b8d..445862067 100644 --- a/README.md +++ b/README.md @@ -383,7 +383,7 @@ You can directly override the [httpx client](https://www.python-httpx.org/api/#c - Support for proxies - Custom transports -- Additional [advanced](https://www.python-httpx.org/advanced/#client-instances) functionality +- Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality ```python from increase import Increase, DefaultHttpxClient From 6d2423b90c25a497399889efb9534bcea26f37e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Jun 2024 01:13:07 +0000 Subject: [PATCH 0061/1325] fix: temporarily patch upstream version to fix broken release flow (#473) --- bin/publish-pypi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bin/publish-pypi b/bin/publish-pypi index 826054e92..05bfccbb7 100644 --- a/bin/publish-pypi +++ b/bin/publish-pypi @@ -3,4 +3,7 @@ set -eux mkdir -p dist rye build --clean +# Patching importlib-metadata version until upstream library version is updated +# https://github.com/pypa/twine/issues/977#issuecomment-2189800841 +"$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1' rye publish --yes --token=$PYPI_TOKEN From 7b81ec3a9fc351458c2612db510801f691618c6a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 16:33:32 +0000 Subject: [PATCH 0062/1325] fix(build): include more files in sdist builds (#475) --- pyproject.toml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 050e9df6b..9df0728d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -99,6 +99,21 @@ include = [ [tool.hatch.build.targets.wheel] packages = ["src/increase"] +[tool.hatch.build.targets.sdist] +# Basically everything except hidden files/directories (such as .github, .devcontainers, .python-version, etc) +include = [ + "/*.toml", + "/*.json", + "/*.lock", + "/*.md", + "/mypy.ini", + "/noxfile.py", + "bin/*", + "examples/*", + "src/*", + "tests/*", +] + [tool.hatch.metadata.hooks.fancy-pypi-readme] content-type = "text/markdown" From a763ff78379c05ca196b743c464dde23b4ad021e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Jun 2024 19:12:23 +0000 Subject: [PATCH 0063/1325] chore(deps): bump anyio to v4.4.0 (#477) --- requirements-dev.lock | 3 ++- requirements.lock | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 71efaa6e2..cb8d4c65e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -10,7 +10,7 @@ -e file:. annotated-types==0.6.0 # via pydantic -anyio==4.1.0 +anyio==4.4.0 # via httpx # via increase argcomplete==3.1.2 @@ -86,6 +86,7 @@ tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 + # via anyio # via increase # via mypy # via pydantic diff --git a/requirements.lock b/requirements.lock index 3597082a9..20b910517 100644 --- a/requirements.lock +++ b/requirements.lock @@ -10,7 +10,7 @@ -e file:. annotated-types==0.6.0 # via pydantic -anyio==4.1.0 +anyio==4.4.0 # via httpx # via increase certifi==2023.7.22 @@ -38,6 +38,7 @@ sniffio==1.3.0 # via httpx # via increase typing-extensions==4.8.0 + # via anyio # via increase # via pydantic # via pydantic-core From 5f11fc16cedb1684933b19c55d36c79ed742dd35 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 12:42:36 +0000 Subject: [PATCH 0064/1325] chore(internal): add reflection helper function (#479) --- src/increase/_utils/__init__.py | 5 ++++- src/increase/_utils/_reflection.py | 34 ++++++++++++++++++++++++++++++ 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index 667e2473f..3efe66c8e 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -49,4 +49,7 @@ maybe_transform as maybe_transform, async_maybe_transform as async_maybe_transform, ) -from ._reflection import function_has_argument as function_has_argument +from ._reflection import ( + function_has_argument as function_has_argument, + assert_signatures_in_sync as assert_signatures_in_sync, +) diff --git a/src/increase/_utils/_reflection.py b/src/increase/_utils/_reflection.py index e134f58e0..9a53c7bd2 100644 --- a/src/increase/_utils/_reflection.py +++ b/src/increase/_utils/_reflection.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import inspect from typing import Any, Callable @@ -6,3 +8,35 @@ def function_has_argument(func: Callable[..., Any], arg_name: str) -> bool: """Returns whether or not the given function has a specific parameter""" sig = inspect.signature(func) return arg_name in sig.parameters + + +def assert_signatures_in_sync( + source_func: Callable[..., Any], + check_func: Callable[..., Any], + *, + exclude_params: set[str] = set(), +) -> None: + """Ensure that the signature of the second function matches the first.""" + + check_sig = inspect.signature(check_func) + source_sig = inspect.signature(source_func) + + errors: list[str] = [] + + for name, source_param in source_sig.parameters.items(): + if name in exclude_params: + continue + + custom_param = check_sig.parameters.get(name) + if not custom_param: + errors.append(f"the `{name}` param is missing") + continue + + if custom_param.annotation != source_param.annotation: + errors.append( + f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(source_param.annotation)}" + ) + continue + + if errors: + raise AssertionError(f"{len(errors)} errors encountered when comparing signatures:\n\n" + "\n\n".join(errors)) From a25e7f343d73c8c80ebc032b31fed06939d73af4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 14:13:35 +0000 Subject: [PATCH 0065/1325] chore: gitignore test server logs (#480) --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 0f9a66a97..877974080 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ +.prism.log .vscode _dev From d053ccfc3c2812432296fe15795fc74c3effa8ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Jun 2024 17:10:35 +0000 Subject: [PATCH 0066/1325] feat(api): updates (#481) --- .stats.yml | 4 +- api.md | 28 + src/increase/_client.py | 16 + src/increase/resources/__init__.py | 28 + src/increase/resources/ach_transfers.py | 14 + src/increase/resources/check_deposits.py | 16 +- src/increase/resources/event_subscriptions.py | 8 + src/increase/resources/exports.py | 26 +- src/increase/resources/inbound_mail_items.py | 271 +++++++++ src/increase/resources/lockboxes.py | 530 ++++++++++++++++++ .../resources/simulations/card_disputes.py | 16 +- src/increase/types/__init__.py | 8 + src/increase/types/ach_transfer.py | 73 ++- .../types/ach_transfer_create_params.py | 33 +- src/increase/types/card_dispute.py | 53 +- .../types/card_dispute_list_params.py | 2 +- src/increase/types/card_payment.py | 35 +- .../types/card_purchase_supplement.py | 3 + src/increase/types/check_deposit.py | 41 +- .../types/check_deposit_create_params.py | 8 +- src/increase/types/check_transfer.py | 6 + .../types/check_transfer_create_params.py | 6 + src/increase/types/declined_transaction.py | 16 +- src/increase/types/event.py | 4 + src/increase/types/event_list_params.py | 2 + src/increase/types/event_subscription.py | 4 + .../types/event_subscription_create_params.py | 4 + src/increase/types/export.py | 9 +- src/increase/types/export_create_params.py | 15 +- src/increase/types/export_list_params.py | 1 + src/increase/types/file.py | 6 + src/increase/types/file_list_params.py | 2 + src/increase/types/inbound_ach_transfer.py | 38 ++ src/increase/types/inbound_mail_item.py | 78 +++ src/increase/types/inbound_mail_item_list.py | 16 + .../types/inbound_mail_item_list_params.py | 53 ++ src/increase/types/intrafi/intrafi_balance.py | 6 + src/increase/types/lockbox.py | 75 +++ src/increase/types/lockbox_create_params.py | 15 + src/increase/types/lockbox_list.py | 16 + src/increase/types/lockbox_list_params.py | 61 ++ src/increase/types/lockbox_update_params.py | 21 + src/increase/types/pending_transaction.py | 5 +- src/increase/types/program.py | 7 + .../card_authorization_simulation.py | 21 +- .../simulations/card_dispute_action_params.py | 8 +- ...ime_payments_transfer_simulation_result.py | 67 ++- src/increase/types/transaction.py | 51 +- src/increase/types/transaction_list_params.py | 1 + tests/api_resources/test_ach_transfers.py | 8 + tests/api_resources/test_check_deposits.py | 28 +- tests/api_resources/test_check_transfers.py | 2 + tests/api_resources/test_exports.py | 2 + tests/api_resources/test_files.py | 4 +- .../api_resources/test_inbound_mail_items.py | 180 ++++++ tests/api_resources/test_lockboxes.py | 354 ++++++++++++ 56 files changed, 2310 insertions(+), 95 deletions(-) create mode 100644 src/increase/resources/inbound_mail_items.py create mode 100644 src/increase/resources/lockboxes.py create mode 100644 src/increase/types/inbound_mail_item.py create mode 100644 src/increase/types/inbound_mail_item_list.py create mode 100644 src/increase/types/inbound_mail_item_list_params.py create mode 100644 src/increase/types/lockbox.py create mode 100644 src/increase/types/lockbox_create_params.py create mode 100644 src/increase/types/lockbox_list.py create mode 100644 src/increase/types/lockbox_list_params.py create mode 100644 src/increase/types/lockbox_update_params.py create mode 100644 tests/api_resources/test_inbound_mail_items.py create mode 100644 tests/api_resources/test_lockboxes.py diff --git a/.stats.yml b/.stats.yml index 30db7210a..920d34e6c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 187 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-313b105e56a987f7cec2472124dc400ae16436b51d68de6041d298835472c474.yml +configured_endpoints: 193 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8a351597b273fbaca02efd91a8c09df3a38a8846a68e2eac382ee99dbd6f2f46.yml diff --git a/api.md b/api.md index 3d1d5d33a..fe0957332 100644 --- a/api.md +++ b/api.md @@ -854,3 +854,31 @@ Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] - client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit + +# InboundMailItems + +Types: + +```python +from increase.types import InboundMailItem, InboundMailItemList +``` + +Methods: + +- client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem +- client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] + +# Lockboxes + +Types: + +```python +from increase.types import Lockbox, LockboxList +``` + +Methods: + +- client.lockboxes.create(\*\*params) -> Lockbox +- client.lockboxes.retrieve(lockbox_id) -> Lockbox +- client.lockboxes.update(lockbox_id, \*\*params) -> Lockbox +- client.lockboxes.list(\*\*params) -> SyncPage[Lockbox] diff --git a/src/increase/_client.py b/src/increase/_client.py index 25a97da7e..9a489efef 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -104,6 +104,8 @@ class Increase(SyncAPIClient): digital_card_profiles: resources.DigitalCardProfiles physical_card_profiles: resources.PhysicalCardProfiles inbound_check_deposits: resources.InboundCheckDeposits + inbound_mail_items: resources.InboundMailItems + lockboxes: resources.Lockboxes with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -251,6 +253,8 @@ def __init__( self.digital_card_profiles = resources.DigitalCardProfiles(self) self.physical_card_profiles = resources.PhysicalCardProfiles(self) self.inbound_check_deposits = resources.InboundCheckDeposits(self) + self.inbound_mail_items = resources.InboundMailItems(self) + self.lockboxes = resources.Lockboxes(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -475,6 +479,8 @@ class AsyncIncrease(AsyncAPIClient): digital_card_profiles: resources.AsyncDigitalCardProfiles physical_card_profiles: resources.AsyncPhysicalCardProfiles inbound_check_deposits: resources.AsyncInboundCheckDeposits + inbound_mail_items: resources.AsyncInboundMailItems + lockboxes: resources.AsyncLockboxes with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -622,6 +628,8 @@ def __init__( self.digital_card_profiles = resources.AsyncDigitalCardProfiles(self) self.physical_card_profiles = resources.AsyncPhysicalCardProfiles(self) self.inbound_check_deposits = resources.AsyncInboundCheckDeposits(self) + self.inbound_mail_items = resources.AsyncInboundMailItems(self) + self.lockboxes = resources.AsyncLockboxes(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -861,6 +869,8 @@ def __init__(self, client: Increase) -> None: self.digital_card_profiles = resources.DigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithRawResponse(client.physical_card_profiles) self.inbound_check_deposits = resources.InboundCheckDepositsWithRawResponse(client.inbound_check_deposits) + self.inbound_mail_items = resources.InboundMailItemsWithRawResponse(client.inbound_mail_items) + self.lockboxes = resources.LockboxesWithRawResponse(client.lockboxes) class AsyncIncreaseWithRawResponse: @@ -926,6 +936,8 @@ def __init__(self, client: AsyncIncrease) -> None: self.digital_card_profiles = resources.AsyncDigitalCardProfilesWithRawResponse(client.digital_card_profiles) self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithRawResponse(client.physical_card_profiles) self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithRawResponse(client.inbound_check_deposits) + self.inbound_mail_items = resources.AsyncInboundMailItemsWithRawResponse(client.inbound_mail_items) + self.lockboxes = resources.AsyncLockboxesWithRawResponse(client.lockboxes) class IncreaseWithStreamedResponse: @@ -993,6 +1005,8 @@ def __init__(self, client: Increase) -> None: self.digital_card_profiles = resources.DigitalCardProfilesWithStreamingResponse(client.digital_card_profiles) self.physical_card_profiles = resources.PhysicalCardProfilesWithStreamingResponse(client.physical_card_profiles) self.inbound_check_deposits = resources.InboundCheckDepositsWithStreamingResponse(client.inbound_check_deposits) + self.inbound_mail_items = resources.InboundMailItemsWithStreamingResponse(client.inbound_mail_items) + self.lockboxes = resources.LockboxesWithStreamingResponse(client.lockboxes) class AsyncIncreaseWithStreamedResponse: @@ -1078,6 +1092,8 @@ def __init__(self, client: AsyncIncrease) -> None: self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithStreamingResponse( client.inbound_check_deposits ) + self.inbound_mail_items = resources.AsyncInboundMailItemsWithStreamingResponse(client.inbound_mail_items) + self.lockboxes = resources.AsyncLockboxesWithStreamingResponse(client.lockboxes) Client = Increase diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 19d6e2f27..62201c0bc 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -80,6 +80,14 @@ DocumentsWithStreamingResponse, AsyncDocumentsWithStreamingResponse, ) +from .lockboxes import ( + Lockboxes, + AsyncLockboxes, + LockboxesWithRawResponse, + AsyncLockboxesWithRawResponse, + LockboxesWithStreamingResponse, + AsyncLockboxesWithStreamingResponse, +) from .simulations import ( Simulations, AsyncSimulations, @@ -208,6 +216,14 @@ AccountStatementsWithStreamingResponse, AsyncAccountStatementsWithStreamingResponse, ) +from .inbound_mail_items import ( + InboundMailItems, + AsyncInboundMailItems, + InboundMailItemsWithRawResponse, + AsyncInboundMailItemsWithRawResponse, + InboundMailItemsWithStreamingResponse, + AsyncInboundMailItemsWithStreamingResponse, +) from .bookkeeping_entries import ( BookkeepingEntries, AsyncBookkeepingEntries, @@ -660,4 +676,16 @@ "AsyncInboundCheckDepositsWithRawResponse", "InboundCheckDepositsWithStreamingResponse", "AsyncInboundCheckDepositsWithStreamingResponse", + "InboundMailItems", + "AsyncInboundMailItems", + "InboundMailItemsWithRawResponse", + "AsyncInboundMailItemsWithRawResponse", + "InboundMailItemsWithStreamingResponse", + "AsyncInboundMailItemsWithStreamingResponse", + "Lockboxes", + "AsyncLockboxes", + "LockboxesWithRawResponse", + "AsyncLockboxesWithRawResponse", + "LockboxesWithStreamingResponse", + "AsyncLockboxesWithStreamingResponse", ] diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 8f955d5fb..de3e4c36b 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -55,6 +55,7 @@ def create( funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, individual_name: str | NotGiven = NOT_GIVEN, + preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, standard_entry_class_code: Literal[ @@ -129,6 +130,11 @@ def create( individual_name: The name of the transfer recipient. This value is informational and not verified by the recipient's bank. + preferred_effective_date: Configuration for how the effective date of the transfer will be set. This + determines same-day vs future-dated settlement timing. If not set, defaults to a + `settlement_schedule` of `same_day`. If set, exactly one of the child atributes + must be set. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -170,6 +176,7 @@ def create( "funding": funding, "individual_id": individual_id, "individual_name": individual_name, + "preferred_effective_date": preferred_effective_date, "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, @@ -398,6 +405,7 @@ async def create( funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, individual_name: str | NotGiven = NOT_GIVEN, + preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, standard_entry_class_code: Literal[ @@ -472,6 +480,11 @@ async def create( individual_name: The name of the transfer recipient. This value is informational and not verified by the recipient's bank. + preferred_effective_date: Configuration for how the effective date of the transfer will be set. This + determines same-day vs future-dated settlement timing. If not set, defaults to a + `settlement_schedule` of `same_day`. If set, exactly one of the child atributes + must be set. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -513,6 +526,7 @@ async def create( "funding": funding, "individual_id": individual_id, "individual_name": individual_name, + "preferred_effective_date": preferred_effective_date, "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 22fb6692b..9026cf2df 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -39,8 +39,8 @@ def create( account_id: str, amount: int, back_image_file_id: str, - currency: str, front_image_file_id: str, + description: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -60,10 +60,10 @@ def create( back_image_file_id: The File containing the check's back image. - currency: The currency to use for the deposit. - front_image_file_id: The File containing the check's front image. + description: The description you choose to give the Check Deposit, for display purposes only. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -81,8 +81,8 @@ def create( "account_id": account_id, "amount": amount, "back_image_file_id": back_image_file_id, - "currency": currency, "front_image_file_id": front_image_file_id, + "description": description, }, check_deposit_create_params.CheckDepositCreateParams, ), @@ -208,8 +208,8 @@ async def create( account_id: str, amount: int, back_image_file_id: str, - currency: str, front_image_file_id: str, + description: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -229,10 +229,10 @@ async def create( back_image_file_id: The File containing the check's back image. - currency: The currency to use for the deposit. - front_image_file_id: The File containing the check's front image. + description: The description you choose to give the Check Deposit, for display purposes only. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -250,8 +250,8 @@ async def create( "account_id": account_id, "amount": amount, "back_image_file_id": back_image_file_id, - "currency": currency, "front_image_file_id": front_image_file_id, + "description": description, }, check_deposit_create_params.CheckDepositCreateParams, ), diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 930ee63fd..951b59091 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -103,6 +103,8 @@ def create( "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", @@ -232,6 +234,8 @@ def create( Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. @@ -531,6 +535,8 @@ async def create( "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", @@ -660,6 +666,8 @@ async def create( Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index ff86ed981..da0169ca7 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -39,13 +39,19 @@ def create( self, *, category: Literal[ - "account_statement_ofx", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv" + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", ], account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, entity_csv: export_create_params.EntityCsv | NotGiven = NOT_GIVEN, transaction_csv: export_create_params.TransactionCsv | NotGiven = NOT_GIVEN, + vendor_csv: object | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -68,6 +74,8 @@ def create( - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account balances for the dates in a given range. - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. @@ -83,6 +91,8 @@ def create( transaction_csv: Options for the created export. Required if `category` is equal to `transaction_csv`. + vendor_csv: Options for the created export. Required if `category` is equal to `vendor_csv`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -103,6 +113,7 @@ def create( "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "entity_csv": entity_csv, "transaction_csv": transaction_csv, + "vendor_csv": vendor_csv, }, export_create_params.ExportCreateParams, ), @@ -226,13 +237,19 @@ async def create( self, *, category: Literal[ - "account_statement_ofx", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv" + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", ], account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, entity_csv: export_create_params.EntityCsv | NotGiven = NOT_GIVEN, transaction_csv: export_create_params.TransactionCsv | NotGiven = NOT_GIVEN, + vendor_csv: object | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -255,6 +272,8 @@ async def create( - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account balances for the dates in a given range. - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. @@ -270,6 +289,8 @@ async def create( transaction_csv: Options for the created export. Required if `category` is equal to `transaction_csv`. + vendor_csv: Options for the created export. Required if `category` is equal to `vendor_csv`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -290,6 +311,7 @@ async def create( "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "entity_csv": entity_csv, "transaction_csv": transaction_csv, + "vendor_csv": vendor_csv, }, export_create_params.ExportCreateParams, ), diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py new file mode 100644 index 000000000..835e57001 --- /dev/null +++ b/src/increase/resources/inbound_mail_items.py @@ -0,0 +1,271 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from .. import _legacy_response +from ..types import inbound_mail_item_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..pagination import SyncPage, AsyncPage +from .._base_client import ( + AsyncPaginator, + make_request_options, +) +from ..types.inbound_mail_item import InboundMailItem + +__all__ = ["InboundMailItems", "AsyncInboundMailItems"] + + +class InboundMailItems(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundMailItemsWithRawResponse: + return InboundMailItemsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundMailItemsWithStreamingResponse: + return InboundMailItemsWithStreamingResponse(self) + + def retrieve( + self, + inbound_mail_item_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundMailItem: + """ + Retrieve an Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return self._get( + f"/inbound_mail_items/{inbound_mail_item_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundMailItem, + ) + + def list( + self, + *, + created_at: inbound_mail_item_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + lockbox_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[InboundMailItem]: + """ + List Inbound Mail Items + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + lockbox_id: Filter Inbound Mail Items to ones sent to the provided Lockbox. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_mail_items", + page=SyncPage[InboundMailItem], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "limit": limit, + "lockbox_id": lockbox_id, + }, + inbound_mail_item_list_params.InboundMailItemListParams, + ), + ), + model=InboundMailItem, + ) + + +class AsyncInboundMailItems(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundMailItemsWithRawResponse: + return AsyncInboundMailItemsWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundMailItemsWithStreamingResponse: + return AsyncInboundMailItemsWithStreamingResponse(self) + + async def retrieve( + self, + inbound_mail_item_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundMailItem: + """ + Retrieve an Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return await self._get( + f"/inbound_mail_items/{inbound_mail_item_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundMailItem, + ) + + def list( + self, + *, + created_at: inbound_mail_item_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + lockbox_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[InboundMailItem, AsyncPage[InboundMailItem]]: + """ + List Inbound Mail Items + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + lockbox_id: Filter Inbound Mail Items to ones sent to the provided Lockbox. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_mail_items", + page=AsyncPage[InboundMailItem], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "limit": limit, + "lockbox_id": lockbox_id, + }, + inbound_mail_item_list_params.InboundMailItemListParams, + ), + ), + model=InboundMailItem, + ) + + +class InboundMailItemsWithRawResponse: + def __init__(self, inbound_mail_items: InboundMailItems) -> None: + self._inbound_mail_items = inbound_mail_items + + self.retrieve = _legacy_response.to_raw_response_wrapper( + inbound_mail_items.retrieve, + ) + self.list = _legacy_response.to_raw_response_wrapper( + inbound_mail_items.list, + ) + + +class AsyncInboundMailItemsWithRawResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: + self._inbound_mail_items = inbound_mail_items + + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + inbound_mail_items.retrieve, + ) + self.list = _legacy_response.async_to_raw_response_wrapper( + inbound_mail_items.list, + ) + + +class InboundMailItemsWithStreamingResponse: + def __init__(self, inbound_mail_items: InboundMailItems) -> None: + self._inbound_mail_items = inbound_mail_items + + self.retrieve = to_streamed_response_wrapper( + inbound_mail_items.retrieve, + ) + self.list = to_streamed_response_wrapper( + inbound_mail_items.list, + ) + + +class AsyncInboundMailItemsWithStreamingResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: + self._inbound_mail_items = inbound_mail_items + + self.retrieve = async_to_streamed_response_wrapper( + inbound_mail_items.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + inbound_mail_items.list, + ) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py new file mode 100644 index 000000000..ba97d01ad --- /dev/null +++ b/src/increase/resources/lockboxes.py @@ -0,0 +1,530 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from .. import _legacy_response +from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( + maybe_transform, + async_maybe_transform, +) +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..pagination import SyncPage, AsyncPage +from .._base_client import ( + AsyncPaginator, + make_request_options, +) +from ..types.lockbox import Lockbox + +__all__ = ["Lockboxes", "AsyncLockboxes"] + + +class Lockboxes(SyncAPIResource): + @cached_property + def with_raw_response(self) -> LockboxesWithRawResponse: + return LockboxesWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> LockboxesWithStreamingResponse: + return LockboxesWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + description: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Lockbox: + """ + Create a Lockbox + + Args: + account_id: The Account checks sent to this Lockbox should be deposited into. + + description: The description you choose for the Lockbox, for display purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/lockboxes", + body=maybe_transform( + { + "account_id": account_id, + "description": description, + }, + lockbox_create_params.LockboxCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Lockbox, + ) + + def retrieve( + self, + lockbox_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Lockbox: + """ + Retrieve a Lockbox + + Args: + lockbox_id: The identifier of the Lockbox to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not lockbox_id: + raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") + return self._get( + f"/lockboxes/{lockbox_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=Lockbox, + ) + + def update( + self, + lockbox_id: str, + *, + description: str | NotGiven = NOT_GIVEN, + status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Lockbox: + """ + Update a Lockbox + + Args: + lockbox_id: The identifier of the Lockbox. + + description: The description you choose for the Lockbox. + + status: This indicates if checks can be sent to the Lockbox. + + - `active` - This Lockbox is active. Checks mailed to it will be deposited + automatically. + - `inactive` - This Lockbox is inactive. Checks mailed to it will not be + deposited. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not lockbox_id: + raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") + return self._patch( + f"/lockboxes/{lockbox_id}", + body=maybe_transform( + { + "description": description, + "status": status, + }, + lockbox_update_params.LockboxUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Lockbox, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: lockbox_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[Lockbox]: + """ + List Lockboxes + + Args: + account_id: Filter Lockboxes to those associated with the provided Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/lockboxes", + page=SyncPage[Lockbox], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + lockbox_list_params.LockboxListParams, + ), + ), + model=Lockbox, + ) + + +class AsyncLockboxes(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncLockboxesWithRawResponse: + return AsyncLockboxesWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncLockboxesWithStreamingResponse: + return AsyncLockboxesWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + description: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Lockbox: + """ + Create a Lockbox + + Args: + account_id: The Account checks sent to this Lockbox should be deposited into. + + description: The description you choose for the Lockbox, for display purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/lockboxes", + body=await async_maybe_transform( + { + "account_id": account_id, + "description": description, + }, + lockbox_create_params.LockboxCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Lockbox, + ) + + async def retrieve( + self, + lockbox_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> Lockbox: + """ + Retrieve a Lockbox + + Args: + lockbox_id: The identifier of the Lockbox to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not lockbox_id: + raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") + return await self._get( + f"/lockboxes/{lockbox_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=Lockbox, + ) + + async def update( + self, + lockbox_id: str, + *, + description: str | NotGiven = NOT_GIVEN, + status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Lockbox: + """ + Update a Lockbox + + Args: + lockbox_id: The identifier of the Lockbox. + + description: The description you choose for the Lockbox. + + status: This indicates if checks can be sent to the Lockbox. + + - `active` - This Lockbox is active. Checks mailed to it will be deposited + automatically. + - `inactive` - This Lockbox is inactive. Checks mailed to it will not be + deposited. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not lockbox_id: + raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") + return await self._patch( + f"/lockboxes/{lockbox_id}", + body=await async_maybe_transform( + { + "description": description, + "status": status, + }, + lockbox_update_params.LockboxUpdateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Lockbox, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: lockbox_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[Lockbox, AsyncPage[Lockbox]]: + """ + List Lockboxes + + Args: + account_id: Filter Lockboxes to those associated with the provided Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/lockboxes", + page=AsyncPage[Lockbox], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + lockbox_list_params.LockboxListParams, + ), + ), + model=Lockbox, + ) + + +class LockboxesWithRawResponse: + def __init__(self, lockboxes: Lockboxes) -> None: + self._lockboxes = lockboxes + + self.create = _legacy_response.to_raw_response_wrapper( + lockboxes.create, + ) + self.retrieve = _legacy_response.to_raw_response_wrapper( + lockboxes.retrieve, + ) + self.update = _legacy_response.to_raw_response_wrapper( + lockboxes.update, + ) + self.list = _legacy_response.to_raw_response_wrapper( + lockboxes.list, + ) + + +class AsyncLockboxesWithRawResponse: + def __init__(self, lockboxes: AsyncLockboxes) -> None: + self._lockboxes = lockboxes + + self.create = _legacy_response.async_to_raw_response_wrapper( + lockboxes.create, + ) + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + lockboxes.retrieve, + ) + self.update = _legacy_response.async_to_raw_response_wrapper( + lockboxes.update, + ) + self.list = _legacy_response.async_to_raw_response_wrapper( + lockboxes.list, + ) + + +class LockboxesWithStreamingResponse: + def __init__(self, lockboxes: Lockboxes) -> None: + self._lockboxes = lockboxes + + self.create = to_streamed_response_wrapper( + lockboxes.create, + ) + self.retrieve = to_streamed_response_wrapper( + lockboxes.retrieve, + ) + self.update = to_streamed_response_wrapper( + lockboxes.update, + ) + self.list = to_streamed_response_wrapper( + lockboxes.list, + ) + + +class AsyncLockboxesWithStreamingResponse: + def __init__(self, lockboxes: AsyncLockboxes) -> None: + self._lockboxes = lockboxes + + self.create = async_to_streamed_response_wrapper( + lockboxes.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + lockboxes.retrieve, + ) + self.update = async_to_streamed_response_wrapper( + lockboxes.update, + ) + self.list = async_to_streamed_response_wrapper( + lockboxes.list, + ) diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 3d828507e..666c0159e 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -37,7 +37,7 @@ def action( self, card_dispute_id: str, *, - status: Literal["accepted", "rejected"], + status: Literal["accepted", "rejected", "lost", "won"], explanation: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -59,8 +59,12 @@ def action( status: The status to move the dispute to. - `accepted` - The Card Dispute has been accepted and your funds have been - returned. + returned. The card dispute will eventually transition into `won` or `lost` + depending on the outcome. - `rejected` - The Card Dispute has been rejected. + - `lost` - The Card Dispute has been lost and funds previously credited from the + acceptance have been debited. + - `won` - The Card Dispute has been won and no further action can be taken. explanation: Why the dispute was rejected. Not required for accepting disputes. @@ -109,7 +113,7 @@ async def action( self, card_dispute_id: str, *, - status: Literal["accepted", "rejected"], + status: Literal["accepted", "rejected", "lost", "won"], explanation: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -131,8 +135,12 @@ async def action( status: The status to move the dispute to. - `accepted` - The Card Dispute has been accepted and your funds have been - returned. + returned. The card dispute will eventually transition into `won` or `lost` + depending on the outcome. - `rejected` - The Card Dispute has been rejected. + - `lost` - The Card Dispute has been lost and funds previously credited from the + acceptance have been debited. + - `won` - The Card Dispute has been won and no further action can be taken. explanation: Why the dispute was rejected. Not required for accepting disputes. diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 00b72e203..c643cfabc 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -9,6 +9,7 @@ from .entity import Entity as Entity from .export import Export as Export from .account import Account as Account +from .lockbox import Lockbox as Lockbox from .program import Program as Program from .document import Document as Document from .oauth_token import OAuthToken as OAuthToken @@ -17,6 +18,7 @@ from .card_details import CardDetails as CardDetails from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment +from .lockbox_list import LockboxList as LockboxList from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard from .wire_transfer import WireTransfer as WireTransfer @@ -32,6 +34,7 @@ from .account_statement import AccountStatement as AccountStatement from .bookkeeping_entry import BookkeepingEntry as BookkeepingEntry from .event_list_params import EventListParams as EventListParams +from .inbound_mail_item import InboundMailItem as InboundMailItem from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams @@ -42,6 +45,7 @@ from .account_list_params import AccountListParams as AccountListParams from .ach_prenotification import ACHPrenotification as ACHPrenotification from .bookkeeping_account import BookkeepingAccount as BookkeepingAccount +from .lockbox_list_params import LockboxListParams as LockboxListParams from .pending_transaction import PendingTransaction as PendingTransaction from .program_list_params import ProgramListParams as ProgramListParams from .declined_transaction import DeclinedTransaction as DeclinedTransaction @@ -57,9 +61,12 @@ from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer +from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams +from .lockbox_update_params import LockboxUpdateParams as LockboxUpdateParams from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams +from .inbound_mail_item_list import InboundMailItemList as InboundMailItemList from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams @@ -89,6 +96,7 @@ from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams +from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 2fc40e5c2..63ab72614 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import datetime from typing import List, Optional -from datetime import date, datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -23,6 +23,7 @@ "CreatedByOAuthApplication", "CreatedByUser", "NotificationsOfChange", + "PreferredEffectiveDate", "Return", "Submission", ] @@ -89,7 +90,7 @@ class Addenda(BaseModel): class Approval(BaseModel): - approved_at: datetime + approved_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was approved. @@ -103,7 +104,7 @@ class Approval(BaseModel): class Cancellation(BaseModel): - canceled_at: datetime + canceled_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Transfer was canceled. @@ -223,15 +224,35 @@ class NotificationsOfChange(BaseModel): checking; numbers starting with a 3 encourage changing to savings. """ - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the notification occurred. """ +class PreferredEffectiveDate(BaseModel): + date: Optional[datetime.date] = None + """ + A specific date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format to + use as the effective date when submitting this transfer. + """ + + settlement_schedule: Optional[Literal["same_day", "future_dated"]] = None + """A schedule by which Increase whill choose an effective date for the transfer. + + - `same_day` - The chosen effective date will be the same as the ACH processing + date on which the transfer is submitted. This is necessary, but not sufficient + for the transfer to be settled same-day: it must also be submitted before the + last same-day cutoff and be less than or equal to $1,000.000.00. + - `future_dated` - The chosen effective date will be the business day following + the ACH processing date on which the transfer is submitted. The transfer will + be settled on that future day. + """ + + class Return(BaseModel): - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created. @@ -481,23 +502,33 @@ class Return(BaseModel): class Submission(BaseModel): - effective_date: date - """The ACH's effective date sent to the receiving bank. + effective_date: datetime.date + """The ACH transfer's effective date as sent to the Federal Reserve. - If `effective_date` is configured in the ACH transfer, this will match the value - there. Otherwise, it will the date that the ACH transfer was processed, which is - usually the current or subsequent business day. + If a specific date was configured using `preferred_effective_date`, this will + match that value. Otherwise, it will be the date selected (following the + specified settlement schedule) at the time the transfer was submitted. """ - expected_funds_settlement_at: datetime - """When the funds transfer is expected to settle in the recipient's account. + expected_funds_settlement_at: datetime.datetime + """When the transfer is expected to settle in the recipient's account. Credits may be available sooner, at the receiving banks discretion. The FedACH schedule is published [here](https://www.frbservices.org/resources/resource-centers/same-day-ach/fedach-processing-schedule.html). """ - submitted_at: datetime + expected_settlement_schedule: Literal["same_day", "future_dated"] + """The settlement schedule the transfer is expected to follow. + + This expectation takes into account the `effective_date`, `submitted_at`, and + the amount of the transfer. + + - `same_day` - The transfer is expected to settle same-day. + - `future_dated` - The transfer is expected to settle on a future date. + """ + + submitted_at: datetime.datetime """When the ACH transfer was sent to FedACH.""" trace_number: str @@ -562,7 +593,7 @@ class ACHTransfer(BaseModel): company_name: Optional[str] = None """The name by which the recipient knows you.""" - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created. @@ -594,12 +625,6 @@ class ACHTransfer(BaseModel): - `unknown` - It's unknown what kind of entity owns the External Account. """ - effective_date: Optional[date] = None - """ - The transfer effective date in - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - """ - external_account_id: Optional[str] = None """The identifier of the External Account the transfer was made to, if any.""" @@ -644,6 +669,14 @@ class ACHTransfer(BaseModel): by someone else in your organization. """ + preferred_effective_date: PreferredEffectiveDate + """Configuration for how the effective date of the transfer will be set. + + This determines same-day vs future-dated settlement timing. If not set, defaults + to a `settlement_schedule` of `same_day`. If set, exactly one of the child + atributes must be set. + """ + return_: Optional[Return] = FieldInfo(alias="return", default=None) """If your transfer is returned, this will contain details of the return.""" diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index 8863bd89d..d8da14766 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -2,8 +2,8 @@ from __future__ import annotations +import datetime from typing import Union, Iterable -from datetime import date from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -15,6 +15,7 @@ "AddendaFreeformEntry", "AddendaPaymentOrderRemittanceAdvice", "AddendaPaymentOrderRemittanceAdviceInvoice", + "PreferredEffectiveDate", ] @@ -84,7 +85,7 @@ class ACHTransferCreateParams(TypedDict, total=False): - `unknown` - It's unknown what kind of entity owns the External Account. """ - effective_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + effective_date: Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")] """ The transfer effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. @@ -113,6 +114,14 @@ class ACHTransferCreateParams(TypedDict, total=False): This value is informational and not verified by the recipient's bank. """ + preferred_effective_date: PreferredEffectiveDate + """Configuration for how the effective date of the transfer will be set. + + This determines same-day vs future-dated settlement timing. If not set, defaults + to a `settlement_schedule` of `same_day`. If set, exactly one of the child + atributes must be set. + """ + require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" @@ -187,3 +196,23 @@ class Addenda(TypedDict, total=False): Please reach out to [support@increase.com](mailto:support@increase.com) for more information. """ + + +class PreferredEffectiveDate(TypedDict, total=False): + date: Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")] + """ + A specific date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format to + use as the effective date when submitting this transfer. + """ + + settlement_schedule: Literal["same_day", "future_dated"] + """A schedule by which Increase whill choose an effective date for the transfer. + + - `same_day` - The chosen effective date will be the same as the ACH processing + date on which the transfer is submitted. This is necessary, but not sufficient + for the transfer to be settled same-day: it must also be submitted before the + last same-day cutoff and be less than or equal to $1,000.000.00. + - `future_dated` - The chosen effective date will be the business day following + the ACH processing date on which the transfer is submitted. The transfer will + be settled on that future day. + """ diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 996d62f38..ba7cf7009 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["CardDispute", "Acceptance", "Rejection"] +__all__ = ["CardDispute", "Acceptance", "Loss", "Rejection", "Win"] class Acceptance(BaseModel): @@ -26,6 +26,26 @@ class Acceptance(BaseModel): """ +class Loss(BaseModel): + card_dispute_id: str + """The identifier of the Card Dispute that was lost.""" + + explanation: str + """Why the Card Dispute was lost.""" + + lost_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was lost. + """ + + transaction_id: str + """ + The identifier of the Transaction that was created to debit the disputed funds + from your account. + """ + + class Rejection(BaseModel): card_dispute_id: str """The identifier of the Card Dispute that was rejected.""" @@ -40,6 +60,17 @@ class Rejection(BaseModel): """ +class Win(BaseModel): + card_dispute_id: str + """The identifier of the Card Dispute that was won.""" + + won_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was won. + """ + + class CardDispute(BaseModel): id: str """The Card Dispute identifier.""" @@ -70,19 +101,29 @@ class CardDispute(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + loss: Optional[Loss] = None + """ + If the Card Dispute's status is `lost`, this will contain details of the lost + dispute. + """ + rejection: Optional[Rejection] = None """ If the Card Dispute's status is `rejected`, this will contain details of the unsuccessful dispute. """ - status: Literal["pending_reviewing", "accepted", "rejected"] + status: Literal["pending_reviewing", "accepted", "rejected", "lost", "won"] """The results of the Dispute investigation. - `pending_reviewing` - The Card Dispute is pending review. - `accepted` - The Card Dispute has been accepted and your funds have been - returned. + returned. The card dispute will eventually transition into `won` or `lost` + depending on the outcome. - `rejected` - The Card Dispute has been rejected. + - `lost` - The Card Dispute has been lost and funds previously credited from the + acceptance have been debited. + - `won` - The Card Dispute has been won and no further action can be taken. """ type: Literal["card_dispute"] @@ -90,3 +131,9 @@ class CardDispute(BaseModel): For this resource it will always be `card_dispute`. """ + + win: Optional[Win] = None + """ + If the Card Dispute's status is `won`, this will contain details of the won + dispute. + """ diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py index dbd7d93d9..8901f8d42 100644 --- a/src/increase/types/card_dispute_list_params.py +++ b/src/increase/types/card_dispute_list_params.py @@ -63,7 +63,7 @@ class CreatedAt(TypedDict, total=False): _StatusReservedKeywords = TypedDict( "_StatusReservedKeywords", { - "in": List[Literal["pending_reviewing", "accepted", "rejected"]], + "in": List[Literal["pending_reviewing", "accepted", "rejected", "lost", "won"]], }, total=False, ) diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 81c3d0b30..0f9f6a9a3 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -258,7 +258,7 @@ class ElementCardAuthorization(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -624,7 +624,7 @@ class ElementCardDecline(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -640,6 +640,9 @@ class ElementCardDecline(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + digital_wallet_token_id: Optional[str] = None """ If the authorization was made via a Digital Wallet Token (such as an Apple Pay @@ -734,6 +737,7 @@ class ElementCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", "webhook_declined", @@ -752,6 +756,8 @@ class ElementCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per Increase's terms. - `breaches_limit` - The transaction was blocked by a Limit. @@ -1365,18 +1371,18 @@ class ElementCardRefund(BaseModel): """The Card Refund identifier.""" amount: int - """The pending amount in the minor unit of the transaction's currency. + """The amount in the minor unit of the transaction's settlement currency. For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. + transaction's settlement currency. - `CAD` - Canadian Dollar (CAD) - `CHF` - Swiss Franc (CHF) @@ -1410,6 +1416,15 @@ class ElementCardRefund(BaseModel): network_identifiers: ElementCardRefundNetworkIdentifiers """Network-specific identifiers for this refund.""" + presentment_amount: int + """The amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + purchase_details: Optional[ElementCardRefundPurchaseDetails] = None """ Additional details about the card purchase, such as tax and industry-specific @@ -1938,7 +1953,7 @@ class ElementCardSettlement(BaseModel): exists. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -2199,7 +2214,7 @@ class ElementCardValidation(BaseModel): processing. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -2433,9 +2448,15 @@ class CardPayment(BaseModel): Payment was created. """ + digital_wallet_token_id: Optional[str] = None + """The Digital Wallet Token identifier for this payment.""" + elements: List[Element] """The interactions related to this card payment.""" + physical_card_id: Optional[str] = None + """The Physical Card identifier for this payment.""" + state: State """The summarized state of this card payment.""" diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py index 42e6ce258..85d9f60ed 100644 --- a/src/increase/types/card_purchase_supplement.py +++ b/src/increase/types/card_purchase_supplement.py @@ -94,6 +94,9 @@ class Invoice(BaseModel): class LineItem(BaseModel): + id: str + """The Card Purchase Supplement Line Item identifier.""" + detail_indicator: Optional[Literal["normal", "credit", "payment"]] = None """Indicates the type of line item. diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index c629c7166..b0c65be31 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -86,6 +86,7 @@ class DepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", + "operator", ] """Why the check deposit was rejected. @@ -102,6 +103,8 @@ class DepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. + - `operator` - The check was rejected by an operator who will provide details + out-of-band. """ rejected_at: datetime @@ -211,6 +214,18 @@ class DepositReturn(BaseModel): class DepositSubmission(BaseModel): + back_file_id: str + """ + The ID for the File containing the check back image that was submitted to the + Check21 network. + """ + + front_file_id: str + """ + The ID for the File containing the check front image that was submitted to the + Check21 network. + """ + submitted_at: datetime """When the check deposit was submitted to the Check21 network for processing. @@ -241,17 +256,6 @@ class CheckDeposit(BaseModel): the transfer was created. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the deposit. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - deposit_acceptance: Optional[DepositAcceptance] = None """ If your deposit is successfully parsed and accepted by Increase, this will @@ -277,6 +281,9 @@ class CheckDeposit(BaseModel): This will contain details of the submission. """ + description: Optional[str] = None + """The description of the Check Deposit, for display purposes only.""" + front_image_file_id: str """The ID for the File containing the image of the front of the check.""" @@ -288,6 +295,18 @@ class CheckDeposit(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + inbound_mail_item_id: Optional[str] = None + """ + If the Check Deposit was the result of an Inbound Mail Item, this will contain + the identifier of the Inbound Mail Item. + """ + + lockbox_id: Optional[str] = None + """ + If the Check Deposit was the result of an Inbound Mail Item, this will contain + the identifier of the Lockbox that received it. + """ + status: Literal["pending", "submitted", "rejected", "returned"] """The status of the Check Deposit. diff --git a/src/increase/types/check_deposit_create_params.py b/src/increase/types/check_deposit_create_params.py index 2de3c062e..0483b05e5 100644 --- a/src/increase/types/check_deposit_create_params.py +++ b/src/increase/types/check_deposit_create_params.py @@ -20,8 +20,10 @@ class CheckDepositCreateParams(TypedDict, total=False): back_image_file_id: Required[str] """The File containing the check's back image.""" - currency: Required[str] - """The currency to use for the deposit.""" - front_image_file_id: Required[str] """The File containing the check's front image.""" + + description: str + """ + The description you choose to give the Check Deposit, for display purposes only. + """ diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 9aab03353..727c5a618 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -158,6 +158,12 @@ class PhysicalCheck(BaseModel): return_address: Optional[PhysicalCheckReturnAddress] = None """The return address to be printed on the check.""" + signature_text: Optional[str] = None + """The text that will appear as the signature on the check in cursive font. + + If blank, the check will be printed with 'No signature required'. + """ + class StopPaymentRequest(BaseModel): reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 7f1ed05a8..4a3560f86 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -116,6 +116,12 @@ class PhysicalCheck(TypedDict, total=False): make the Check Transfer. """ + signature_text: str + """The text that will appear as the signature on the check in cursive font. + + If not provided, the check will be printed with 'No signature required'. + """ + class ThirdParty(TypedDict, total=False): check_number: str diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 667e94ca4..e6e7d1265 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -57,6 +57,7 @@ class SourceACHDecline(BaseModel): "credit_entry_refused_by_receiver", "duplicate_return", "entity_not_active", + "field_error", "group_locked", "insufficient_funds", "misrouted_return", @@ -77,6 +78,7 @@ class SourceACHDecline(BaseModel): - `duplicate_return` - A rare return reason. The return this message refers to was a duplicate. - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - `misrouted_return` - A rare return reason. The return this message refers to @@ -306,7 +308,7 @@ class SourceCardDecline(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -322,6 +324,9 @@ class SourceCardDecline(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + digital_wallet_token_id: Optional[str] = None """ If the authorization was made via a Digital Wallet Token (such as an Apple Pay @@ -416,6 +421,7 @@ class SourceCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", "webhook_declined", @@ -434,6 +440,8 @@ class SourceCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per Increase's terms. - `breaches_limit` - The transaction was blocked by a Limit. @@ -564,6 +572,7 @@ class SourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", + "operator", ] """Why the check deposit was rejected. @@ -580,6 +589,8 @@ class SourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. + - `operator` - The check was rejected by an operator who will provide details + out-of-band. """ rejected_at: datetime @@ -1044,11 +1055,12 @@ class DeclinedTransaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Declined Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: Source diff --git a/src/increase/types/event.py b/src/increase/types/event.py index a109a2792..33fc17af2 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -77,6 +77,8 @@ class Event(BaseModel): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", @@ -189,6 +191,8 @@ class Event(BaseModel): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index f8ae7cb90..9006fa168 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -92,6 +92,8 @@ class EventListParams(TypedDict, total=False): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index ab3bfb1e4..3fe5ff1cd 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -90,6 +90,8 @@ class EventSubscription(BaseModel): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", @@ -202,6 +204,8 @@ class EventSubscription(BaseModel): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 19061d15c..f5b015bd6 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -76,6 +76,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "lockbox.created", + "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", "pending_transaction.created", @@ -187,6 +189,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is deactivated. diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 3c7c9796b..e6cb343c4 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -14,7 +14,12 @@ class Export(BaseModel): """The Export identifier.""" category: Literal[ - "account_statement_ofx", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv" + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", ] """The category of the Export. @@ -29,6 +34,8 @@ class Export(BaseModel): - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account balances for the dates in a given range. - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. """ created_at: datetime diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index bd7f2ed35..2c91909a5 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -26,7 +26,12 @@ class ExportCreateParams(TypedDict, total=False): category: Required[ Literal[ - "account_statement_ofx", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv" + "account_statement_ofx", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", ] ] """The type of Export to create. @@ -39,6 +44,8 @@ class ExportCreateParams(TypedDict, total=False): - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account balances for the dates in a given range. - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. """ account_statement_ofx: AccountStatementOfx @@ -71,6 +78,12 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `transaction_csv`. """ + vendor_csv: object + """Options for the created export. + + Required if `category` is equal to `vendor_csv`. + """ + class AccountStatementOfxCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index 7943d4dad..0f42349be 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -46,6 +46,7 @@ class ExportListParams(TypedDict, total=False): "balance_csv", "bookkeeping_account_balance_csv", "entity_csv", + "vendor_csv", ] ], }, diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 0fcb3b7ab..149079768 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -49,6 +49,8 @@ class File(BaseModel): purpose: Literal[ "check_image_front", "check_image_back", + "processed_check_image_front", + "processed_check_image_back", "mailed_check_image", "inbound_mail_item", "form_1099_int", @@ -75,6 +77,10 @@ class File(BaseModel): - `check_image_front` - An image of the front of a check, used for check deposits. - `check_image_back` - An image of the back of a check, used for check deposits. + - `processed_check_image_front` - An image of the front of a deposited check + after processing by Increase and submission to the Federal Reserve. + - `processed_check_image_back` - An image of the back of a deposited check after + processing by Increase and submission to the Federal Reserve. - `mailed_check_image` - An image of a check that was mailed to a recipient. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 71df69a61..bf16df275 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -67,6 +67,8 @@ class CreatedAt(TypedDict, total=False): Literal[ "check_image_front", "check_image_back", + "processed_check_image_front", + "processed_check_image_back", "mailed_check_image", "inbound_mail_item", "form_1099_int", diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 5e3bb1d34..237b1b61a 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -61,6 +61,7 @@ class Decline(BaseModel): "credit_entry_refused_by_receiver", "duplicate_return", "entity_not_active", + "field_error", "group_locked", "insufficient_funds", "misrouted_return", @@ -81,6 +82,7 @@ class Decline(BaseModel): - `duplicate_return` - A rare return reason. The return this message refers to was a duplicate. - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - `misrouted_return` - A rare return reason. The return this message refers to @@ -215,6 +217,42 @@ class InboundACHTransfer(BaseModel): receiver_name: Optional[str] = None """The name of the receiver of the transfer.""" + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + ] + """The Standard Entry Class (SEC) code of the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + """ + status: Literal["pending", "declined", "accepted", "returned"] """The status of the transfer. diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py new file mode 100644 index 000000000..b8f592258 --- /dev/null +++ b/src/increase/types/inbound_mail_item.py @@ -0,0 +1,78 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["InboundMailItem", "ReturnAddress"] + + +class ReturnAddress(BaseModel): + city: Optional[str] = None + """The return address city.""" + + line1: Optional[str] = None + """The return address line1.""" + + line2: Optional[str] = None + """The return address line2.""" + + name: Optional[str] = None + """The return address name.""" + + postal_code: Optional[str] = None + """The return address postal code.""" + + state: Optional[str] = None + """The return address state.""" + + +class InboundMailItem(BaseModel): + id: str + """The Inbound Mail Item identifier.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Inbound + Mail Item was created. + """ + + file_id: str + """The identifier for the File containing the scanned contents of the mail item.""" + + lockbox_id: Optional[str] = None + """The identifier for the Lockbox that received this mail item. + + For mail items that could not be processed due to an invalid address, this will + be null. + """ + + recipient_name: Optional[str] = None + """The recipient name as written on the mail item.""" + + rejection_reason: Optional[Literal["no_matching_lockbox", "no_check", "lockbox_not_active"]] = None + """If the mail item has been rejected, why it was rejected. + + - `no_matching_lockbox` - The mail item does not match any lockbox. + - `no_check` - The mail item does not contain a check. + - `lockbox_not_active` - The Lockbox or its associataed Account is not active. + """ + + return_address: Optional[ReturnAddress] = None + """The return address as written on the mail item.""" + + status: Literal["pending", "processed", "rejected"] + """If the mail item has been processed. + + - `pending` - The mail item is pending processing. + - `processed` - The mail item has been processed. + - `rejected` - The mail item has been rejected. + """ + + type: Literal["inbound_mail_item"] + """A constant representing the object's type. + + For this resource it will always be `inbound_mail_item`. + """ diff --git a/src/increase/types/inbound_mail_item_list.py b/src/increase/types/inbound_mail_item_list.py new file mode 100644 index 000000000..5831477ec --- /dev/null +++ b/src/increase/types/inbound_mail_item_list.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .inbound_mail_item import InboundMailItem + +__all__ = ["InboundMailItemList"] + + +class InboundMailItemList(BaseModel): + data: List[InboundMailItem] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" diff --git a/src/increase/types/inbound_mail_item_list_params.py b/src/increase/types/inbound_mail_item_list_params.py new file mode 100644 index 000000000..403b80cec --- /dev/null +++ b/src/increase/types/inbound_mail_item_list_params.py @@ -0,0 +1,53 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["InboundMailItemListParams", "CreatedAt"] + + +class InboundMailItemListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + lockbox_id: str + """Filter Inbound Mail Items to ones sent to the provided Lockbox.""" + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/intrafi/intrafi_balance.py b/src/increase/types/intrafi/intrafi_balance.py index dfab5414f..e93235731 100644 --- a/src/increase/types/intrafi/intrafi_balance.py +++ b/src/increase/types/intrafi/intrafi_balance.py @@ -18,6 +18,9 @@ class BalanceBankLocation(BaseModel): class Balance(BaseModel): + id: str + """The identifier of this balance.""" + balance: int """The balance, in minor units of `currency`, held with this bank.""" @@ -36,6 +39,9 @@ class Balance(BaseModel): class IntrafiBalance(BaseModel): + id: str + """The identifier of this balance.""" + balances: List[Balance] """Each entry represents a balance held at a different bank. diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py new file mode 100644 index 000000000..d2e3aa71b --- /dev/null +++ b/src/increase/types/lockbox.py @@ -0,0 +1,75 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["Lockbox", "Address"] + + +class Address(BaseModel): + city: str + """The city of the address.""" + + line1: str + """The first line of the address.""" + + line2: str + """The second line of the address.""" + + postal_code: str + """The postal code of the address.""" + + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + +class Lockbox(BaseModel): + id: str + """The Lockbox identifier.""" + + account_id: str + """ + The identifier for the Account checks sent to this lockbox will be deposited + into. + """ + + address: Address + """The mailing address for the Lockbox.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox + was created. + """ + + description: Optional[str] = None + """The description you choose for the Lockbox.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + status: Literal["active", "inactive"] + """This indicates if mail can be sent to this address. + + - `active` - This Lockbox is active. Checks mailed to it will be deposited + automatically. + - `inactive` - This Lockbox is inactive. Checks mailed to it will not be + deposited. + """ + + type: Literal["lockbox"] + """A constant representing the object's type. + + For this resource it will always be `lockbox`. + """ diff --git a/src/increase/types/lockbox_create_params.py b/src/increase/types/lockbox_create_params.py new file mode 100644 index 000000000..17aadac13 --- /dev/null +++ b/src/increase/types/lockbox_create_params.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["LockboxCreateParams"] + + +class LockboxCreateParams(TypedDict, total=False): + account_id: Required[str] + """The Account checks sent to this Lockbox should be deposited into.""" + + description: str + """The description you choose for the Lockbox, for display purposes.""" diff --git a/src/increase/types/lockbox_list.py b/src/increase/types/lockbox_list.py new file mode 100644 index 000000000..52bb1ef89 --- /dev/null +++ b/src/increase/types/lockbox_list.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .lockbox import Lockbox +from .._models import BaseModel + +__all__ = ["LockboxList"] + + +class LockboxList(BaseModel): + data: List[Lockbox] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" diff --git a/src/increase/types/lockbox_list_params.py b/src/increase/types/lockbox_list_params.py new file mode 100644 index 000000000..4cf817765 --- /dev/null +++ b/src/increase/types/lockbox_list_params.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["LockboxListParams", "CreatedAt"] + + +class LockboxListParams(TypedDict, total=False): + account_id: str + """Filter Lockboxes to those associated with the provided Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py new file mode 100644 index 000000000..90ad3709e --- /dev/null +++ b/src/increase/types/lockbox_update_params.py @@ -0,0 +1,21 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["LockboxUpdateParams"] + + +class LockboxUpdateParams(TypedDict, total=False): + description: str + """The description you choose for the Lockbox.""" + + status: Literal["active", "inactive"] + """This indicates if checks can be sent to the Lockbox. + + - `active` - This Lockbox is active. Checks mailed to it will be deposited + automatically. + - `inactive` - This Lockbox is inactive. Checks mailed to it will not be + deposited. + """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 1e7eabfe1..7b403a5ad 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -260,7 +260,7 @@ class SourceCardAuthorization(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -690,11 +690,12 @@ class PendingTransaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Pending Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: Source diff --git a/src/increase/types/program.py b/src/increase/types/program.py index 19d355de6..f040684a4 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -25,6 +25,13 @@ class Program(BaseModel): default_digital_card_profile_id: Optional[str] = None """The default configuration for digital cards attached to this Program.""" + interest_rate: str + """ + The Interest Rate currently being earned on the accounts in this program, as a + string containing a decimal number. For example, a 1% interest rate would be + represented as "0.01". + """ + name: str """The name of the Program.""" diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index 03d8393ec..b2cdd86d8 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -74,6 +74,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): "credit_entry_refused_by_receiver", "duplicate_return", "entity_not_active", + "field_error", "group_locked", "insufficient_funds", "misrouted_return", @@ -94,6 +95,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): - `duplicate_return` - A rare return reason. The return this message refers to was a duplicate. - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - `misrouted_return` - A rare return reason. The return this message refers to @@ -323,7 +325,7 @@ class DeclinedTransactionSourceCardDecline(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -339,6 +341,9 @@ class DeclinedTransactionSourceCardDecline(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + digital_wallet_token_id: Optional[str] = None """ If the authorization was made via a Digital Wallet Token (such as an Apple Pay @@ -433,6 +438,7 @@ class DeclinedTransactionSourceCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", "webhook_declined", @@ -451,6 +457,8 @@ class DeclinedTransactionSourceCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per Increase's terms. - `breaches_limit` - The transaction was blocked by a Limit. @@ -581,6 +589,7 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", + "operator", ] """Why the check deposit was rejected. @@ -597,6 +606,8 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. + - `operator` - The check was rejected by an operator who will provide details + out-of-band. """ rejected_at: datetime @@ -1063,11 +1074,12 @@ class DeclinedTransaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Declined Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: DeclinedTransactionSource @@ -1320,7 +1332,7 @@ class PendingTransactionSourceCardAuthorization(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -1752,11 +1764,12 @@ class PendingTransaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Pending Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: PendingTransactionSource diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py index e9b818ee7..4c7375f24 100644 --- a/src/increase/types/simulations/card_dispute_action_params.py +++ b/src/increase/types/simulations/card_dispute_action_params.py @@ -8,12 +8,16 @@ class CardDisputeActionParams(TypedDict, total=False): - status: Required[Literal["accepted", "rejected"]] + status: Required[Literal["accepted", "rejected", "lost", "won"]] """The status to move the dispute to. - `accepted` - The Card Dispute has been accepted and your funds have been - returned. + returned. The card dispute will eventually transition into `won` or `lost` + depending on the outcome. - `rejected` - The Card Dispute has been rejected. + - `lost` - The Card Dispute has been lost and funds previously credited from the + acceptance have been debited. + - `won` - The Card Dispute has been won and no further action can be taken. """ explanation: str diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index bdb236f85..da5f8c023 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -30,6 +30,7 @@ "TransactionSourceACHTransferRejection", "TransactionSourceACHTransferReturn", "TransactionSourceCardDisputeAcceptance", + "TransactionSourceCardDisputeLoss", "TransactionSourceCardRefund", "TransactionSourceCardRefundNetworkIdentifiers", "TransactionSourceCardRefundPurchaseDetails", @@ -105,6 +106,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): "credit_entry_refused_by_receiver", "duplicate_return", "entity_not_active", + "field_error", "group_locked", "insufficient_funds", "misrouted_return", @@ -125,6 +127,7 @@ class DeclinedTransactionSourceACHDecline(BaseModel): - `duplicate_return` - A rare return reason. The return this message refers to was a duplicate. - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - `misrouted_return` - A rare return reason. The return this message refers to @@ -354,7 +357,7 @@ class DeclinedTransactionSourceCardDecline(BaseModel): For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -370,6 +373,9 @@ class DeclinedTransactionSourceCardDecline(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + digital_wallet_token_id: Optional[str] = None """ If the authorization was made via a Digital Wallet Token (such as an Apple Pay @@ -464,6 +470,7 @@ class DeclinedTransactionSourceCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", "webhook_declined", @@ -482,6 +489,8 @@ class DeclinedTransactionSourceCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per Increase's terms. - `breaches_limit` - The transaction was blocked by a Limit. @@ -612,6 +621,7 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", + "operator", ] """Why the check deposit was rejected. @@ -628,6 +638,8 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. + - `operator` - The check was rejected by an operator who will provide details + out-of-band. """ rejected_at: datetime @@ -1094,11 +1106,12 @@ class DeclinedTransaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Declined Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: DeclinedTransactionSource @@ -1445,6 +1458,26 @@ class TransactionSourceCardDisputeAcceptance(BaseModel): """ +class TransactionSourceCardDisputeLoss(BaseModel): + card_dispute_id: str + """The identifier of the Card Dispute that was lost.""" + + explanation: str + """Why the Card Dispute was lost.""" + + lost_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was lost. + """ + + transaction_id: str + """ + The identifier of the Transaction that was created to debit the disputed funds + from your account. + """ + + class TransactionSourceCardRefundNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -1874,18 +1907,18 @@ class TransactionSourceCardRefund(BaseModel): """The Card Refund identifier.""" amount: int - """The pending amount in the minor unit of the transaction's currency. + """The amount in the minor unit of the transaction's settlement currency. For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. + transaction's settlement currency. - `CAD` - Canadian Dollar (CAD) - `CHF` - Swiss Franc (CHF) @@ -1919,6 +1952,15 @@ class TransactionSourceCardRefund(BaseModel): network_identifiers: TransactionSourceCardRefundNetworkIdentifiers """Network-specific identifiers for this refund.""" + presentment_amount: int + """The amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] = None """ Additional details about the card purchase, such as tax and industry-specific @@ -2405,7 +2447,7 @@ class TransactionSourceCardSettlement(BaseModel): exists. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -3457,6 +3499,13 @@ class TransactionSource(BaseModel): equal to `card_dispute_acceptance`. """ + card_dispute_loss: Optional[TransactionSourceCardDisputeLoss] = None + """A Card Dispute Loss object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_dispute_loss`. + """ + card_refund: Optional[TransactionSourceCardRefund] = None """A Card Refund object. @@ -3492,6 +3541,7 @@ class TransactionSource(BaseModel): "ach_transfer_return", "cashback_payment", "card_dispute_acceptance", + "card_dispute_loss", "card_refund", "card_settlement", "card_revenue_payment", @@ -3534,6 +3584,8 @@ class TransactionSource(BaseModel): `cashback_payment` object. - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object. + - `card_dispute_loss` - Card Dispute Loss: details will be under the + `card_dispute_loss` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_settlement` - Card Settlement: details will be under the `card_settlement` object. @@ -3755,11 +3807,12 @@ class Transaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: TransactionSource diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index da0df5035..06d6d982d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -14,6 +14,7 @@ "SourceACHTransferRejection", "SourceACHTransferReturn", "SourceCardDisputeAcceptance", + "SourceCardDisputeLoss", "SourceCardRefund", "SourceCardRefundNetworkIdentifiers", "SourceCardRefundPurchaseDetails", @@ -385,6 +386,26 @@ class SourceCardDisputeAcceptance(BaseModel): """ +class SourceCardDisputeLoss(BaseModel): + card_dispute_id: str + """The identifier of the Card Dispute that was lost.""" + + explanation: str + """Why the Card Dispute was lost.""" + + lost_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was lost. + """ + + transaction_id: str + """ + The identifier of the Transaction that was created to debit the disputed funds + from your account. + """ + + class SourceCardRefundNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -814,18 +835,18 @@ class SourceCardRefund(BaseModel): """The Card Refund identifier.""" amount: int - """The pending amount in the minor unit of the transaction's currency. + """The amount in the minor unit of the transaction's settlement currency. For dollars, for example, this is cents. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. + transaction's settlement currency. - `CAD` - Canadian Dollar (CAD) - `CHF` - Swiss Franc (CHF) @@ -859,6 +880,15 @@ class SourceCardRefund(BaseModel): network_identifiers: SourceCardRefundNetworkIdentifiers """Network-specific identifiers for this refund.""" + presentment_amount: int + """The amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + purchase_details: Optional[SourceCardRefundPurchaseDetails] = None """ Additional details about the card purchase, such as tax and industry-specific @@ -1345,7 +1375,7 @@ class SourceCardSettlement(BaseModel): exists. """ - card_payment_id: Optional[str] = None + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] @@ -2397,6 +2427,13 @@ class Source(BaseModel): equal to `card_dispute_acceptance`. """ + card_dispute_loss: Optional[SourceCardDisputeLoss] = None + """A Card Dispute Loss object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_dispute_loss`. + """ + card_refund: Optional[SourceCardRefund] = None """A Card Refund object. @@ -2432,6 +2469,7 @@ class Source(BaseModel): "ach_transfer_return", "cashback_payment", "card_dispute_acceptance", + "card_dispute_loss", "card_refund", "card_settlement", "card_revenue_payment", @@ -2474,6 +2512,8 @@ class Source(BaseModel): `cashback_payment` object. - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object. + - `card_dispute_loss` - Card Dispute Loss: details will be under the + `card_dispute_loss` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_settlement` - Card Settlement: details will be under the `card_settlement` object. @@ -2691,11 +2731,12 @@ class Transaction(BaseModel): Routes are things like cards and ACH details. """ - route_type: Optional[Literal["account_number", "card"]] = None + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None """The type of the route this Transaction came through. - `account_number` - An Account Number. - `card` - A Card. + - `lockbox` - A Lockbox. """ source: Source diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 18ee5b148..78e79eec1 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -46,6 +46,7 @@ class TransactionListParams(TypedDict, total=False): "ach_transfer_return", "cashback_payment", "card_dispute_acceptance", + "card_dispute_loss", "card_refund", "card_settlement", "card_revenue_payment", diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index d2aef2a9e..ca4473da1 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -71,6 +71,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: funding="checking", individual_id="x", individual_name="x", + preferred_effective_date={ + "date": parse_date("2019-12-27"), + "settlement_schedule": "same_day", + }, require_approval=True, routing_number="101050001", standard_entry_class_code="corporate_credit_or_debit", @@ -317,6 +321,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) funding="checking", individual_id="x", individual_name="x", + preferred_effective_date={ + "date": parse_date("2019-12-27"), + "settlement_schedule": "same_day", + }, require_approval=True, routing_number="101050001", standard_entry_class_code="corporate_credit_or_debit", diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index f17078a6c..43d335b42 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -25,18 +25,27 @@ def test_method_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + check_deposit = client.check_deposits.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + back_image_file_id="file_26khfk98mzfz90a11oqx", + front_image_file_id="file_hkv175ovmc2tb2v2zbrm", + description="Vendor payment", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.check_deposits.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) @@ -51,7 +60,6 @@ def test_streaming_response_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) as response: assert not response.is_closed @@ -151,18 +159,27 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + check_deposit = await async_client.check_deposits.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + back_image_file_id="file_26khfk98mzfz90a11oqx", + front_image_file_id="file_hkv175ovmc2tb2v2zbrm", + description="Vendor payment", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.check_deposits.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) @@ -177,7 +194,6 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N account_id="account_in71c4amph0vgo2qllky", amount=1000, back_image_file_id="file_26khfk98mzfz90a11oqx", - currency="USD", front_image_file_id="file_hkv175ovmc2tb2v2zbrm", ) as response: assert not response.is_closed diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index c3fb21dea..5fa07d0e2 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -57,6 +57,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "postal_code": "10045", "state": "NY", }, + "signature_text": "Ian Crease", }, require_approval=True, third_party={"check_number": "x"}, @@ -337,6 +338,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "postal_code": "10045", "state": "NY", }, + "signature_text": "Ian Crease", }, require_approval=True, third_party={"check_number": "x"}, diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index c95473d10..595f2f441 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -67,6 +67,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + vendor_csv={}, ) assert_matches_type(Export, export, path=["response"]) @@ -226,6 +227,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + vendor_csv={}, ) assert_matches_type(Export, export, path=["response"]) diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 550cb6824..4b551e15a 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="string", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front", "check_image_back", "mailed_check_image"]}, + purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, ) assert_matches_type(SyncPage[File], file, path=["response"]) @@ -243,7 +243,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="string", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front", "check_image_back", "mailed_check_image"]}, + purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, ) assert_matches_type(AsyncPage[File], file, path=["response"]) diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py new file mode 100644 index 000000000..4723a67a1 --- /dev/null +++ b/tests/api_resources/test_inbound_mail_items.py @@ -0,0 +1,180 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundMailItem +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundMailItems: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + inbound_mail_item = client.inbound_mail_items.retrieve( + "string", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.inbound_mail_items.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.inbound_mail_items.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + client.inbound_mail_items.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + inbound_mail_item = client.inbound_mail_items.list() + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + inbound_mail_item = client.inbound_mail_items.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + lockbox_id="string", + ) + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.inbound_mail_items.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.inbound_mail_items.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = response.parse() + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundMailItems: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.inbound_mail_items.retrieve( + "string", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_mail_items.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_mail_items.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + await async_client.inbound_mail_items.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.inbound_mail_items.list() + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.inbound_mail_items.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + limit=1, + lockbox_id="string", + ) + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_mail_items.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_mail_items.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = await response.parse() + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py new file mode 100644 index 000000000..e4a1c1f69 --- /dev/null +++ b/tests/api_resources/test_lockboxes.py @@ -0,0 +1,354 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Lockbox +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestLockboxes: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + lockbox = client.lockboxes.create( + account_id="account_in71c4amph0vgo2qllky", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + lockbox = client.lockboxes.create( + account_id="account_in71c4amph0vgo2qllky", + description="Rent payments", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.lockboxes.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.lockboxes.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + lockbox = client.lockboxes.retrieve( + "string", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.lockboxes.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.lockboxes.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): + client.lockboxes.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_update(self, client: Increase) -> None: + lockbox = client.lockboxes.update( + "string", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Increase) -> None: + lockbox = client.lockboxes.update( + "string", + description="x", + status="inactive", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Increase) -> None: + response = client.lockboxes.with_raw_response.update( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Increase) -> None: + with client.lockboxes.with_streaming_response.update( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): + client.lockboxes.with_raw_response.update( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + lockbox = client.lockboxes.list() + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + lockbox = client.lockboxes.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + idempotency_key="x", + limit=1, + ) + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.lockboxes.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.lockboxes.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = response.parse() + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncLockboxes: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.create( + account_id="account_in71c4amph0vgo2qllky", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.create( + account_id="account_in71c4amph0vgo2qllky", + description="Rent payments", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.lockboxes.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.lockboxes.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = await response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.retrieve( + "string", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.lockboxes.with_raw_response.retrieve( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.lockboxes.with_streaming_response.retrieve( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = await response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): + await async_client.lockboxes.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_update(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.update( + "string", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.update( + "string", + description="x", + status="inactive", + ) + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: + response = await async_client.lockboxes.with_raw_response.update( + "string", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: + async with async_client.lockboxes.with_streaming_response.update( + "string", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = await response.parse() + assert_matches_type(Lockbox, lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): + await async_client.lockboxes.with_raw_response.update( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.list() + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + lockbox = await async_client.lockboxes.list( + account_id="string", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="string", + idempotency_key="x", + limit=1, + ) + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.lockboxes.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + lockbox = response.parse() + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.lockboxes.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + lockbox = await response.parse() + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + + assert cast(Any, response.is_closed) is True From 6cf2bc560f3e6b35dd2396502e69c629a22a2f60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 13:38:41 +0000 Subject: [PATCH 0067/1325] chore(internal): add rich as a dev dependency (#482) it's often very helpful when writing demo scripts --- pyproject.toml | 1 + requirements-dev.lock | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 9df0728d0..aafcb7c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -58,6 +58,7 @@ dev-dependencies = [ "nox", "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", + "rich>=13.7.1", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index cb8d4c65e..57656a6a7 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -44,6 +44,10 @@ idna==3.4 importlib-metadata==7.0.0 iniconfig==2.0.0 # via pytest +markdown-it-py==3.0.0 + # via rich +mdurl==0.1.2 + # via markdown-it-py mypy==1.7.1 mypy-extensions==1.0.0 # via mypy @@ -63,6 +67,8 @@ pydantic==2.7.1 # via increase pydantic-core==2.18.2 # via pydantic +pygments==2.18.0 + # via rich pyright==1.1.364 pytest==7.1.1 # via pytest-asyncio @@ -72,6 +78,7 @@ python-dateutil==2.8.2 pytz==2023.3.post1 # via dirty-equals respx==0.20.2 +rich==13.7.1 ruff==0.1.9 setuptools==68.2.2 # via nodeenv From 6abc61eacc1cf8211942c2fff5f0cb27bc1d383a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Jul 2024 18:33:26 +0000 Subject: [PATCH 0068/1325] feat(api): add method to simulate international ACH transfers (#484) --- .stats.yml | 4 +- api.md | 12 + .../resources/simulations/__init__.py | 14 + .../inbound_international_ach_transfers.py | 238 ++++++++++++++++ .../resources/simulations/simulations.py | 38 +++ src/increase/types/check_deposit.py | 3 - src/increase/types/declined_transaction.py | 3 - src/increase/types/simulations/__init__.py | 4 + .../card_authorization_simulation.py | 3 - .../inbound_international_ach_transfer.py | 260 ++++++++++++++++++ ...nternational_ach_transfer_create_params.py | 44 +++ ...ime_payments_transfer_simulation_result.py | 9 +- src/increase/types/transaction.py | 6 + ...est_inbound_international_ach_transfers.py | 128 +++++++++ 14 files changed, 752 insertions(+), 14 deletions(-) create mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py create mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py diff --git a/.stats.yml b/.stats.yml index 920d34e6c..d954ea821 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 193 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-8a351597b273fbaca02efd91a8c09df3a38a8846a68e2eac382ee99dbd6f2f46.yml +configured_endpoints: 194 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-60b630905a182614bb96c51dca73313717bd832c5e8a09ea4b76b50c6cf5ddee.yml diff --git a/api.md b/api.md index fe0957332..25ad965b1 100644 --- a/api.md +++ b/api.md @@ -671,6 +671,18 @@ Methods: - client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit +## InboundInternationalACHTransfers + +Types: + +```python +from increase.types.simulations import InboundInternationalACHTransfer +``` + +Methods: + +- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransfer + # PhysicalCards Types: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 7fa844bf6..ce4ec0a36 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -152,6 +152,14 @@ InboundWireDrawdownRequestsWithStreamingResponse, AsyncInboundWireDrawdownRequestsWithStreamingResponse, ) +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfers, + AsyncInboundInternationalACHTransfers, + InboundInternationalACHTransfersWithRawResponse, + AsyncInboundInternationalACHTransfersWithRawResponse, + InboundInternationalACHTransfersWithStreamingResponse, + AsyncInboundInternationalACHTransfersWithStreamingResponse, +) __all__ = [ "AccountTransfers", @@ -262,6 +270,12 @@ "AsyncInboundCheckDepositsWithRawResponse", "InboundCheckDepositsWithStreamingResponse", "AsyncInboundCheckDepositsWithStreamingResponse", + "InboundInternationalACHTransfers", + "AsyncInboundInternationalACHTransfers", + "InboundInternationalACHTransfersWithRawResponse", + "AsyncInboundInternationalACHTransfersWithRawResponse", + "InboundInternationalACHTransfersWithStreamingResponse", + "AsyncInboundInternationalACHTransfersWithStreamingResponse", "Simulations", "AsyncSimulations", "SimulationsWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py new file mode 100644 index 000000000..ceade4102 --- /dev/null +++ b/src/increase/resources/simulations/inbound_international_ach_transfers.py @@ -0,0 +1,238 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import ( + make_request_options, +) +from ...types.simulations import inbound_international_ach_transfer_create_params +from ...types.simulations.inbound_international_ach_transfer import InboundInternationalACHTransfer + +__all__ = ["InboundInternationalACHTransfers", "AsyncInboundInternationalACHTransfers"] + + +class InboundInternationalACHTransfers(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundInternationalACHTransfersWithRawResponse: + return InboundInternationalACHTransfersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundInternationalACHTransfersWithStreamingResponse: + return InboundInternationalACHTransfersWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransfer: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_international_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransfer, + ) + + +class AsyncInboundInternationalACHTransfers(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: + return AsyncInboundInternationalACHTransfersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: + return AsyncInboundInternationalACHTransfersWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransfer: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_international_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransfer, + ) + + +class InboundInternationalACHTransfersWithRawResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = _legacy_response.to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersWithRawResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = _legacy_response.async_to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class InboundInternationalACHTransfersWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 26128b476..9e23f3cf8 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -167,6 +167,14 @@ InboundWireDrawdownRequestsWithStreamingResponse, AsyncInboundWireDrawdownRequestsWithStreamingResponse, ) +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfers, + AsyncInboundInternationalACHTransfers, + InboundInternationalACHTransfersWithRawResponse, + AsyncInboundInternationalACHTransfersWithRawResponse, + InboundInternationalACHTransfersWithStreamingResponse, + AsyncInboundInternationalACHTransfersWithStreamingResponse, +) __all__ = ["Simulations", "AsyncSimulations"] @@ -244,6 +252,10 @@ def physical_cards(self) -> PhysicalCards: def inbound_check_deposits(self) -> InboundCheckDeposits: return InboundCheckDeposits(self._client) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfers: + return InboundInternationalACHTransfers(self._client) + @cached_property def with_raw_response(self) -> SimulationsWithRawResponse: return SimulationsWithRawResponse(self) @@ -538,6 +550,10 @@ def physical_cards(self) -> AsyncPhysicalCards: def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: return AsyncInboundCheckDeposits(self._client) + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfers: + return AsyncInboundInternationalACHTransfers(self._client) + @cached_property def with_raw_response(self) -> AsyncSimulationsWithRawResponse: return AsyncSimulationsWithRawResponse(self) @@ -848,6 +864,10 @@ def physical_cards(self) -> PhysicalCardsWithRawResponse: def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithRawResponse: + return InboundInternationalACHTransfersWithRawResponse(self._simulations.inbound_international_ach_transfers) + class AsyncSimulationsWithRawResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -938,6 +958,12 @@ def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: + return AsyncInboundInternationalACHTransfersWithRawResponse( + self._simulations.inbound_international_ach_transfers + ) + class SimulationsWithStreamingResponse: def __init__(self, simulations: Simulations) -> None: @@ -1028,6 +1054,12 @@ def physical_cards(self) -> PhysicalCardsWithStreamingResponse: def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithStreamingResponse: + return InboundInternationalACHTransfersWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) + class AsyncSimulationsWithStreamingResponse: def __init__(self, simulations: AsyncSimulations) -> None: @@ -1117,3 +1149,9 @@ def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: @cached_property def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: + return AsyncInboundInternationalACHTransfersWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index b0c65be31..4469facb4 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -86,7 +86,6 @@ class DepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", - "operator", ] """Why the check deposit was rejected. @@ -103,8 +102,6 @@ class DepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. - - `operator` - The check was rejected by an operator who will provide details - out-of-band. """ rejected_at: datetime diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index e6e7d1265..9fe9fc08b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -572,7 +572,6 @@ class SourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", - "operator", ] """Why the check deposit was rejected. @@ -589,8 +588,6 @@ class SourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. - - `operator` - The check was rejected by an operator who will provide details - out-of-band. """ rejected_at: datetime diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index a30c73409..ccd925666 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -13,6 +13,7 @@ from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams +from .inbound_international_ach_transfer import InboundInternationalACHTransfer as InboundInternationalACHTransfer from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams @@ -34,6 +35,9 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) +from .inbound_international_ach_transfer_create_params import ( + InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, +) from .real_time_payments_transfer_create_inbound_params import ( RealTimePaymentsTransferCreateInboundParams as RealTimePaymentsTransferCreateInboundParams, ) diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py index b2cdd86d8..7676b2b33 100644 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -589,7 +589,6 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", - "operator", ] """Why the check deposit was rejected. @@ -606,8 +605,6 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. - - `operator` - The check was rejected by an operator who will provide details - out-of-band. """ rejected_at: datetime diff --git a/src/increase/types/simulations/inbound_international_ach_transfer.py b/src/increase/types/simulations/inbound_international_ach_transfer.py new file mode 100644 index 000000000..f7ccb3353 --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer.py @@ -0,0 +1,260 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["InboundInternationalACHTransfer"] + + +class InboundInternationalACHTransfer(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py new file mode 100644 index 000000000..e7e8640ff --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py @@ -0,0 +1,44 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundInternationalACHTransferCreateParams"] + + +class InboundInternationalACHTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """ + The identifier of the Account Number the inbound international ACH Transfer is + for. + """ + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + foreign_payment_amount: Required[int] + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + originating_currency_code: Required[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py index da5f8c023..f1f43a1e5 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -621,7 +621,6 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "unknown", - "operator", ] """Why the check deposit was rejected. @@ -638,8 +637,6 @@ class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `unknown` - The check was rejected for an unknown reason. - - `operator` - The check was rejected by an operator who will provide details - out-of-band. """ rejected_at: datetime @@ -3094,6 +3091,12 @@ class TransactionSourceInboundInternationalACHTransfer(BaseModel): [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ + class TransactionSourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 06d6d982d..6da2ae804 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2022,6 +2022,12 @@ class SourceInboundInternationalACHTransfer(BaseModel): [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). """ + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py new file mode 100644 index 000000000..8b5fc67b7 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py @@ -0,0 +1,128 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import InboundInternationalACHTransfer + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = await response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True From 6da78749c612bf3acfdb67ba1dd0aecf56cd1b9a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 10:30:35 +0000 Subject: [PATCH 0069/1325] chore(internal): add helper method for constructing `BaseModel`s (#485) --- src/increase/_models.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/src/increase/_models.py b/src/increase/_models.py index 75c68cc73..5d95bb4b2 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -10,6 +10,7 @@ ClassVar, Protocol, Required, + ParamSpec, TypedDict, TypeGuard, final, @@ -67,6 +68,9 @@ __all__ = ["BaseModel", "GenericModel"] _T = TypeVar("_T") +_BaseModelT = TypeVar("_BaseModelT", bound="BaseModel") + +P = ParamSpec("P") @runtime_checkable @@ -379,6 +383,29 @@ def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericMo return issubclass(origin, BaseModel) or issubclass(origin, GenericModel) +def build( + base_model_cls: Callable[P, _BaseModelT], + *args: P.args, + **kwargs: P.kwargs, +) -> _BaseModelT: + """Construct a BaseModel class without validation. + + This is useful for cases where you need to instantiate a `BaseModel` + from an API response as this provides type-safe params which isn't supported + by helpers like `construct_type()`. + + ```py + build(MyModel, my_field_a="foo", my_field_b=123) + ``` + """ + if args: + raise TypeError( + "Received positional arguments which are not supported; Keyword arguments must be used instead", + ) + + return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs)) + + def construct_type(*, value: object, type_: object) -> object: """Loose coercion to the expected type with construction of nested values. From db5f90a6d8604dec3cfc5ca6baead2f1b71f5a3c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 12:20:20 +0000 Subject: [PATCH 0070/1325] feat(api): add deposit return property to inbound check deposit model (#487) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d954ea821..614bb0f0b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-60b630905a182614bb96c51dca73313717bd832c5e8a09ea4b76b50c6cf5ddee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-c9c2f72456788e983122a78208317ae162f4ac9035d45fd6e9304d614f798f2e.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index eee2bc10b..44ae731ff 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -6,7 +6,15 @@ from .._models import BaseModel -__all__ = ["InboundCheckDeposit"] +__all__ = ["InboundCheckDeposit", "DepositReturn"] + + +class DepositReturn(BaseModel): + returned_at: datetime + """The time at which the deposit was returned.""" + + transaction_id: str + """The id of the transaction for the returned deposit.""" class InboundCheckDeposit(BaseModel): @@ -81,6 +89,12 @@ class InboundCheckDeposit(BaseModel): Transaction object created as a result of the failed deposit. """ + deposit_return: Optional[DepositReturn] = None + """ + If you requested a return of this deposit, this will contain details of the + return. + """ + front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" From b1b0274a53276a5a033170af45069388a1d1ee63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Jul 2024 19:16:44 +0000 Subject: [PATCH 0071/1325] fix(client): always respect content-type multipart/form-data if provided (#488) --- src/increase/_base_client.py | 20 ++++++++++++++++++-- src/increase/resources/files.py | 18 ++++++++---------- 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index fa9dbde30..1094ca453 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -58,6 +58,7 @@ HttpxSendArgs, AsyncTransport, RequestOptions, + HttpxRequestFiles, ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping @@ -460,6 +461,7 @@ def _build_request( headers = self._build_headers(options) params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") + files = options.files # If the given Content-Type header is multipart/form-data then it # has to be removed so that httpx can generate the header with @@ -473,7 +475,7 @@ def _build_request( headers.pop("Content-Type") # As we are now sending multipart/form-data instead of application/json - # we need to tell httpx to use it, https://www.python-httpx.org/advanced/#multipart-file-encoding + # we need to tell httpx to use it, https://www.python-httpx.org/advanced/clients/#multipart-file-encoding if json_data: if not is_dict(json_data): raise TypeError( @@ -481,6 +483,15 @@ def _build_request( ) kwargs["data"] = self._serialize_multipartform(json_data) + # httpx determines whether or not to send a "multipart/form-data" + # request based on the truthiness of the "files" argument. + # This gets around that issue by generating a dict value that + # evaluates to true. + # + # https://github.com/encode/httpx/discussions/2399#discussioncomment-3814186 + if not files: + files = cast(HttpxRequestFiles, ForceMultipartDict()) + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, @@ -493,7 +504,7 @@ def _build_request( # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, json=json_data, - files=options.files, + files=files, **kwargs, ) @@ -1890,6 +1901,11 @@ def make_request_options( return options +class ForceMultipartDict(Dict[str, None]): + def __bool__(self) -> bool: + return True + + class OtherPlatform: def __init__(self, name: str) -> None: self.name = name diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 4519f7fe9..1fc8ef8c6 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -122,11 +122,10 @@ def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return self._post( "/files", body=maybe_transform(body, file_create_params.FileCreateParams), @@ -329,11 +328,10 @@ async def create( } ) files = extract_files(cast(Mapping[str, object], body), paths=[["file"]]) - if files: - # It should be noted that the actual Content-Type header that will be - # sent to the server will contain a `boundary` parameter, e.g. - # multipart/form-data; boundary=---abc-- - extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} + # It should be noted that the actual Content-Type header that will be + # sent to the server will contain a `boundary` parameter, e.g. + # multipart/form-data; boundary=---abc-- + extra_headers = {"Content-Type": "multipart/form-data", **(extra_headers or {})} return await self._post( "/files", body=await async_maybe_transform(body, file_create_params.FileCreateParams), From 66e762022606df400d957deb34cfd54b1624b7ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Jul 2024 17:37:49 +0000 Subject: [PATCH 0072/1325] chore(ci): update rye to v0.35.0 (#490) --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-pypi.yml | 4 ++-- requirements-dev.lock | 1 + requirements.lock | 1 + 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 83bca8f71..ac9a2e752 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.24.0" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fef45531b..fdb3c6385 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 + RYE_VERSION: '0.35.0' RYE_INSTALL_OPTION: '--yes' - name: Install dependencies @@ -42,7 +42,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 + RYE_VERSION: '0.35.0' RYE_INSTALL_OPTION: '--yes' - name: Bootstrap diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 62c5f4a8d..ab7493a35 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -21,8 +21,8 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: 0.24.0 - RYE_INSTALL_OPTION: "--yes" + RYE_VERSION: '0.35.0' + RYE_INSTALL_OPTION: '--yes' - name: Publish to PyPI run: | diff --git a/requirements-dev.lock b/requirements-dev.lock index 57656a6a7..5350e1a9b 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -6,6 +6,7 @@ # features: [] # all-features: true # with-sources: false +# generate-hashes: false -e file:. annotated-types==0.6.0 diff --git a/requirements.lock b/requirements.lock index 20b910517..daa54a31b 100644 --- a/requirements.lock +++ b/requirements.lock @@ -6,6 +6,7 @@ # features: [] # all-features: true # with-sources: false +# generate-hashes: false -e file:. annotated-types==0.6.0 From 4c20e93a9df9754b80e8e45f6d83ca5bde4a01aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Jul 2024 15:19:53 +0000 Subject: [PATCH 0073/1325] feat(api): add property 'receiver identification number' to 'originator company entry description' (#492) --- .stats.yml | 2 +- .../simulations/inbound_international_ach_transfers.py | 8 ++++++++ .../inbound_international_ach_transfer_create_params.py | 3 +++ .../test_inbound_international_ach_transfers.py | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 614bb0f0b..02fa5f3d4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-c9c2f72456788e983122a78208317ae162f4ac9035d45fd6e9304d614f798f2e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-51d2bd4f5857a9202f84a0ee96ba6a5ef6869f054084ec71820a1b38d6155073.yml diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py index ceade4102..dad9bd589 100644 --- a/src/increase/resources/simulations/inbound_international_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_international_ach_transfers.py @@ -40,6 +40,7 @@ def create( originating_currency_code: str, originator_company_entry_description: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -75,6 +76,8 @@ def create( originator_name: Either the name of the originator or an intermediary money transmitter. + receiver_identification_number: An identification number the originator uses for the receiver. + receiving_company_or_individual_name: The name of the receiver of the transfer. extra_headers: Send extra headers @@ -97,6 +100,7 @@ def create( "originating_currency_code": originating_currency_code, "originator_company_entry_description": originator_company_entry_description, "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, "receiving_company_or_individual_name": receiving_company_or_individual_name, }, inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, @@ -130,6 +134,7 @@ async def create( originating_currency_code: str, originator_company_entry_description: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -165,6 +170,8 @@ async def create( originator_name: Either the name of the originator or an intermediary money transmitter. + receiver_identification_number: An identification number the originator uses for the receiver. + receiving_company_or_individual_name: The name of the receiver of the transfer. extra_headers: Send extra headers @@ -187,6 +194,7 @@ async def create( "originating_currency_code": originating_currency_code, "originator_company_entry_description": originator_company_entry_description, "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, "receiving_company_or_individual_name": receiving_company_or_individual_name, }, inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py index e7e8640ff..3cf052e3b 100644 --- a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py @@ -40,5 +40,8 @@ class InboundInternationalACHTransferCreateParams(TypedDict, total=False): originator_name: str """Either the name of the originator or an intermediary money transmitter.""" + receiver_identification_number: str + """An identification number the originator uses for the receiver.""" + receiving_company_or_individual_name: str """The name of the receiver of the transfer.""" diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py index 8b5fc67b7..c54b501f5 100644 --- a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py +++ b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py @@ -36,6 +36,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originating_currency_code="NOK", originator_company_entry_description="x", originator_name="x", + receiver_identification_number="x", receiving_company_or_individual_name="x", ) assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) @@ -93,6 +94,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originating_currency_code="NOK", originator_company_entry_description="x", originator_name="x", + receiver_identification_number="x", receiving_company_or_individual_name="x", ) assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) From 304e1f85f7d2cbf946ffe75069e32f3c8a0298d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Jul 2024 15:54:14 +0000 Subject: [PATCH 0074/1325] chore(internal): minor request options handling changes (#493) --- src/increase/_base_client.py | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 1094ca453..c20c94519 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -956,6 +956,11 @@ def _request( stream: bool, stream_cls: type[_StreamT] | None, ) -> ResponseT | _StreamT: + # create a copy of the options we were given so that if the + # options are mutated later & we then retry, the retries are + # given the original options + input_options = model_copy(options) + cast_to = self._maybe_override_cast_to(cast_to, options) self._prepare_options(options) @@ -980,7 +985,7 @@ def _request( if retries > 0: return self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -995,7 +1000,7 @@ def _request( if retries > 0: return self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1023,7 +1028,7 @@ def _request( if retries > 0 and self._should_retry(err.response): err.response.close() return self._retry_request( - options, + input_options, cast_to, retries, err.response.headers, @@ -1532,6 +1537,11 @@ async def _request( # execute it earlier while we are in an async context self._platform = await asyncify(get_platform)() + # create a copy of the options we were given so that if the + # options are mutated later & we then retry, the retries are + # given the original options + input_options = model_copy(options) + cast_to = self._maybe_override_cast_to(cast_to, options) await self._prepare_options(options) @@ -1554,7 +1564,7 @@ async def _request( if retries > 0: return await self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1569,7 +1579,7 @@ async def _request( if retries > 0: return await self._retry_request( - options, + input_options, cast_to, retries, stream=stream, @@ -1592,7 +1602,7 @@ async def _request( if retries > 0 and self._should_retry(err.response): await err.response.aclose() return await self._retry_request( - options, + input_options, cast_to, retries, err.response.headers, From 23b44a424581d1fb7c477bb1360572dcccddb006 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:39:54 +0000 Subject: [PATCH 0075/1325] chore(internal): add helper function (#496) --- src/increase/_models.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/increase/_models.py b/src/increase/_models.py index 5d95bb4b2..eb7ce3bde 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -643,6 +643,14 @@ def validate_type(*, type_: type[_T], value: object) -> _T: return cast(_T, _validate_non_model_type(type_=type_, value=value)) +def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None: + """Add a pydantic config for the given type. + + Note: this is a no-op on Pydantic v1. + """ + setattr(typ, "__pydantic_config__", config) # noqa: B010 + + # our use of subclasssing here causes weirdness for type checkers, # so we just pretend that we don't subclass if TYPE_CHECKING: From 65caa6037388db23e385c00b76bc73cec3ee2acb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 10 Jul 2024 15:23:30 +0000 Subject: [PATCH 0076/1325] chore(internal): update mypy (#497) --- requirements-dev.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 5350e1a9b..f6f54a23d 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -49,7 +49,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.7.1 +mypy==1.10.1 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 From 2be6abec7e341b321b45e273bc6cafcb131bd30b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 10:23:01 +0000 Subject: [PATCH 0077/1325] chore(ci): also run workflows for PRs targeting `next` (#498) --- .github/workflows/ci.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fdb3c6385..d185b57d4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: pull_request: branches: - main + - next jobs: lint: From 6f5acb39f5284d453220b7042a3446d8060ac84d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 12:09:58 +0000 Subject: [PATCH 0078/1325] chore(internal): minor import restructuring (#499) --- src/increase/resources/account_numbers.py | 5 +---- src/increase/resources/account_statements.py | 5 +---- src/increase/resources/account_transfers.py | 5 +---- src/increase/resources/accounts.py | 5 +---- src/increase/resources/ach_prenotifications.py | 5 +---- src/increase/resources/ach_transfers.py | 5 +---- src/increase/resources/bookkeeping_accounts.py | 5 +---- src/increase/resources/bookkeeping_entries.py | 5 +---- src/increase/resources/bookkeeping_entry_sets.py | 5 +---- src/increase/resources/card_disputes.py | 5 +---- src/increase/resources/card_payments.py | 5 +---- src/increase/resources/card_purchase_supplements.py | 5 +---- src/increase/resources/cards.py | 5 +---- src/increase/resources/check_deposits.py | 5 +---- src/increase/resources/check_transfers.py | 5 +---- src/increase/resources/declined_transactions.py | 5 +---- src/increase/resources/digital_card_profiles.py | 5 +---- src/increase/resources/digital_wallet_tokens.py | 5 +---- src/increase/resources/documents.py | 5 +---- src/increase/resources/entities/beneficial_owners.py | 4 +--- src/increase/resources/entities/entities.py | 5 +---- src/increase/resources/entities/industry_code.py | 4 +--- src/increase/resources/entities/supplemental_documents.py | 5 +---- src/increase/resources/event_subscriptions.py | 5 +---- src/increase/resources/events.py | 5 +---- src/increase/resources/exports.py | 5 +---- src/increase/resources/external_accounts.py | 5 +---- src/increase/resources/files.py | 5 +---- src/increase/resources/groups.py | 4 +--- src/increase/resources/inbound_ach_transfers.py | 5 +---- src/increase/resources/inbound_check_deposits.py | 5 +---- src/increase/resources/inbound_mail_items.py | 5 +---- src/increase/resources/inbound_wire_drawdown_requests.py | 5 +---- src/increase/resources/inbound_wire_transfers.py | 5 +---- src/increase/resources/intrafi/account_enrollments.py | 5 +---- src/increase/resources/intrafi/balances.py | 4 +--- src/increase/resources/intrafi/exclusions.py | 5 +---- src/increase/resources/lockboxes.py | 5 +---- src/increase/resources/oauth_connections.py | 5 +---- src/increase/resources/oauth_tokens.py | 4 +--- src/increase/resources/pending_transactions.py | 5 +---- src/increase/resources/physical_card_profiles.py | 5 +---- src/increase/resources/physical_cards.py | 5 +---- src/increase/resources/programs.py | 5 +---- .../resources/proof_of_authorization_request_submissions.py | 5 +---- src/increase/resources/proof_of_authorization_requests.py | 5 +---- src/increase/resources/real_time_decisions.py | 4 +--- .../resources/real_time_payments_request_for_payments.py | 5 +---- src/increase/resources/real_time_payments_transfers.py | 5 +---- src/increase/resources/routing_numbers.py | 5 +---- src/increase/resources/simulations/account_statements.py | 4 +--- src/increase/resources/simulations/account_transfers.py | 4 +--- src/increase/resources/simulations/ach_transfers.py | 4 +--- src/increase/resources/simulations/card_disputes.py | 4 +--- src/increase/resources/simulations/card_refunds.py | 4 +--- src/increase/resources/simulations/cards.py | 4 +--- src/increase/resources/simulations/check_deposits.py | 4 +--- src/increase/resources/simulations/check_transfers.py | 4 +--- .../resources/simulations/digital_wallet_token_requests.py | 4 +--- src/increase/resources/simulations/documents.py | 4 +--- src/increase/resources/simulations/inbound_check_deposits.py | 4 +--- src/increase/resources/simulations/inbound_funds_holds.py | 4 +--- .../simulations/inbound_international_ach_transfers.py | 4 +--- .../resources/simulations/inbound_wire_drawdown_requests.py | 4 +--- src/increase/resources/simulations/interest_payments.py | 4 +--- src/increase/resources/simulations/physical_cards.py | 4 +--- src/increase/resources/simulations/programs.py | 4 +--- .../resources/simulations/real_time_payments_transfers.py | 4 +--- src/increase/resources/simulations/simulations.py | 4 +--- src/increase/resources/simulations/wire_transfers.py | 4 +--- src/increase/resources/transactions.py | 5 +---- src/increase/resources/wire_drawdown_requests.py | 5 +---- src/increase/resources/wire_transfers.py | 5 +---- 73 files changed, 73 insertions(+), 266 deletions(-) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 2bda64b11..6823bc66c 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.account_number import AccountNumber __all__ = ["AccountNumbers", "AsyncAccountNumbers"] diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 43e93e6f9..1a21e706a 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.account_statement import AccountStatement __all__ = ["AccountStatements", "AsyncAccountStatements"] diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 87b0a236d..8b2c357b6 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -15,10 +15,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.account_transfer import AccountTransfer __all__ = ["AccountTransfers", "AsyncAccountTransfers"] diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index ee4a9a2b9..19efac5de 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -24,10 +24,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index d8f17b74b..8e0e1332f 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -19,10 +19,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.ach_prenotification import ACHPrenotification __all__ = ["ACHPrenotifications", "AsyncACHPrenotifications"] diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index de3e4c36b..b1b178175 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -19,10 +19,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.ach_transfer import ACHTransfer __all__ = ["ACHTransfers", "AsyncACHTransfers"] diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index fe332fe6b..558af0946 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -24,10 +24,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index 94ddf07b6..dacbd168e 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry import BookkeepingEntry __all__ = ["BookkeepingEntries", "AsyncBookkeepingEntries"] diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index a68c6bea3..d264d675b 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -18,10 +18,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet __all__ = ["BookkeepingEntrySets", "AsyncBookkeepingEntrySets"] diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 9456f03e1..d34070755 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -15,10 +15,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.card_dispute import CardDispute __all__ = ["CardDisputes", "AsyncCardDisputes"] diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index e14b63561..1cc066da6 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.card_payment import CardPayment __all__ = ["CardPayments", "AsyncCardPayments"] diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 513a7d5a0..8c5cc6aa3 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement __all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 3135570a9..687b5df75 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -18,10 +18,7 @@ from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.card import Card -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails __all__ = ["Cards", "AsyncCards"] diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 9026cf2df..407a36a92 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -15,10 +15,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.check_deposit import CheckDeposit __all__ = ["CheckDeposits", "AsyncCheckDeposits"] diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index cbec696c5..ef39c4a2b 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.check_transfer import CheckTransfer __all__ = ["CheckTransfers", "AsyncCheckTransfers"] diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index cf41ce219..b02bbb8c2 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.declined_transaction import DeclinedTransaction __all__ = ["DeclinedTransactions", "AsyncDeclinedTransactions"] diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 1bb8492e2..e93543736 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -19,10 +19,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.digital_card_profile import DigitalCardProfile __all__ = ["DigitalCardProfiles", "AsyncDigitalCardProfiles"] diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 0748fa69a..6e4cd775a 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.digital_wallet_token import DigitalWalletToken __all__ = ["DigitalWalletTokens", "AsyncDigitalWalletTokens"] diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index d832060c6..412db0c0f 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.document import Document __all__ = ["Documents", "AsyncDocuments"] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py index 6eb727474..bd3924c8a 100644 --- a/src/increase/resources/entities/beneficial_owners.py +++ b/src/increase/resources/entities/beneficial_owners.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.entity import Entity from ...types.entities import ( beneficial_owner_create_params, diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities/entities.py index 0b6862238..4477c84e9 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities/entities.py @@ -32,10 +32,7 @@ IndustryCodeWithStreamingResponse, AsyncIndustryCodeWithStreamingResponse, ) -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.entity import Entity from .beneficial_owners import ( BeneficialOwners, diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py index 087e92c60..056389eb2 100644 --- a/src/increase/resources/entities/industry_code.py +++ b/src/increase/resources/entities/industry_code.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.entity import Entity from ...types.entities import industry_code_create_params diff --git a/src/increase/resources/entities/supplemental_documents.py b/src/increase/resources/entities/supplemental_documents.py index 4bc6dd45e..8cadca695 100644 --- a/src/increase/resources/entities/supplemental_documents.py +++ b/src/increase/resources/entities/supplemental_documents.py @@ -14,10 +14,7 @@ from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.entity import Entity from ...types.entities import supplemental_document_list_params, supplemental_document_create_params from ...types.entities.supplemental_document import SupplementalDocument diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 951b59091..4bf474533 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.event_subscription import EventSubscription __all__ = ["EventSubscriptions", "AsyncEventSubscriptions"] diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index d7956ea0c..9d8f7b794 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -13,10 +13,7 @@ from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.event import Event -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options __all__ = ["Events", "AsyncEvents"] diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index da0169ca7..d446f23f6 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -17,10 +17,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.export import Export __all__ = ["Exports", "AsyncExports"] diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 50c7a8979..8e7cde5af 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.external_account import ExternalAccount __all__ = ["ExternalAccounts", "AsyncExternalAccounts"] diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 1fc8ef8c6..e74d6ee4d 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -21,10 +21,7 @@ from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.file import File -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options __all__ = ["Files", "AsyncFiles"] diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 6fda4cdb4..839d988d7 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -10,9 +10,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..types.group import Group -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options __all__ = ["Groups", "AsyncGroups"] diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 5a42052a7..f76ea1972 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer __all__ = ["InboundACHTransfers", "AsyncInboundACHTransfers"] diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 2bb31dacb..e6ed2844a 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit __all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 835e57001..878f4b57b 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_mail_item import InboundMailItem __all__ = ["InboundMailItems", "AsyncInboundMailItems"] diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index d11796ff1..e61b99d06 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest __all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index d8299439a..c02112989 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -14,10 +14,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer __all__ = ["InboundWireTransfers", "AsyncInboundWireTransfers"] diff --git a/src/increase/resources/intrafi/account_enrollments.py b/src/increase/resources/intrafi/account_enrollments.py index 01e54069e..00a03d615 100644 --- a/src/increase/resources/intrafi/account_enrollments.py +++ b/src/increase/resources/intrafi/account_enrollments.py @@ -14,10 +14,7 @@ from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.intrafi import account_enrollment_list_params, account_enrollment_create_params from ...types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment diff --git a/src/increase/resources/intrafi/balances.py b/src/increase/resources/intrafi/balances.py index 1ad1baddf..0a6f3c141 100644 --- a/src/increase/resources/intrafi/balances.py +++ b/src/increase/resources/intrafi/balances.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.intrafi.intrafi_balance import IntrafiBalance __all__ = ["Balances", "AsyncBalances"] diff --git a/src/increase/resources/intrafi/exclusions.py b/src/increase/resources/intrafi/exclusions.py index 98a8a0789..872227889 100644 --- a/src/increase/resources/intrafi/exclusions.py +++ b/src/increase/resources/intrafi/exclusions.py @@ -14,10 +14,7 @@ from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ...pagination import SyncPage, AsyncPage -from ..._base_client import ( - AsyncPaginator, - make_request_options, -) +from ..._base_client import AsyncPaginator, make_request_options from ...types.intrafi import exclusion_list_params, exclusion_create_params from ...types.intrafi.intrafi_exclusion import IntrafiExclusion diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index ba97d01ad..de190d725 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -17,10 +17,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.lockbox import Lockbox __all__ = ["Lockboxes", "AsyncLockboxes"] diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index 92b68cf72..4098d669b 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_connection import OAuthConnection __all__ = ["OAuthConnections", "AsyncOAuthConnections"] diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index 89e2ce110..d0d7e3c02 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -16,9 +16,7 @@ from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.oauth_token import OAuthToken __all__ = ["OAuthTokens", "AsyncOAuthTokens"] diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index fc9ee77f5..b09b09a05 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.pending_transaction import PendingTransaction __all__ = ["PendingTransactions", "AsyncPendingTransactions"] diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index eac8d457f..09ea6c423 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -19,10 +19,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card_profile import PhysicalCardProfile __all__ = ["PhysicalCardProfiles", "AsyncPhysicalCardProfiles"] diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 000d0f442..17fad6e6e 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -17,10 +17,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card import PhysicalCard __all__ = ["PhysicalCards", "AsyncPhysicalCards"] diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index a3ebf5a09..c91affa1f 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.program import Program __all__ = ["Programs", "AsyncPrograms"] diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index a44783a21..044777f16 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission __all__ = ["ProofOfAuthorizationRequestSubmissions", "AsyncProofOfAuthorizationRequestSubmissions"] diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index e1d13f832..1b0d14c54 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest __all__ = ["ProofOfAuthorizationRequests", "AsyncProofOfAuthorizationRequests"] diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 32472334d..9f8d2bb0c 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -14,9 +14,7 @@ from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from .._base_client import ( - make_request_options, -) +from .._base_client import make_request_options from ..types.real_time_decision import RealTimeDecision __all__ = ["RealTimeDecisions", "AsyncRealTimeDecisions"] diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index 679559f1d..3cef6e5ec 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -21,10 +21,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment __all__ = ["RealTimePaymentsRequestForPayments", "AsyncRealTimePaymentsRequestForPayments"] diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 935b52514..5294ce28d 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -15,10 +15,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer __all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 9836696ce..d31389f3b 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.routing_number import RoutingNumber __all__ = ["RoutingNumbers", "AsyncRoutingNumbers"] diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index d4041a286..5e682e3fd 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import account_statement_create_params from ...types.account_statement import AccountStatement diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 418b9b4d8..ef347df1c 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.account_transfer import AccountTransfer __all__ = ["AccountTransfers", "AsyncAccountTransfers"] diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index bdbb15dad..c0247fa89 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -17,9 +17,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import ( ach_transfer_return_params, ach_transfer_create_inbound_params, diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 666c0159e..27f373762 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import card_dispute_action_params from ...types.card_dispute import CardDispute diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index ad703bc6d..6c01e48c6 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import card_refund_create_params from ...types.transaction import Transaction diff --git a/src/increase/resources/simulations/cards.py b/src/increase/resources/simulations/cards.py index 0eb9f6379..b4e6e7186 100644 --- a/src/increase/resources/simulations/cards.py +++ b/src/increase/resources/simulations/cards.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import card_authorize_params, card_settlement_params from ...types.transaction import Transaction from ...types.simulations.card_authorization_simulation import CardAuthorizationSimulation diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 5d5a80efd..76230a77c 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.check_deposit import CheckDeposit __all__ = ["CheckDeposits", "AsyncCheckDeposits"] diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index a6a9599f0..8f3ac9af3 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.check_transfer import CheckTransfer __all__ = ["CheckTransfers", "AsyncCheckTransfers"] diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index ce6d61dd5..6a7407aa9 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import digital_wallet_token_request_create_params from ...types.simulations.digital_wallet_token_request_create_response import DigitalWalletTokenRequestCreateResponse diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 913423a15..3228ade65 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.document import Document from ...types.simulations import document_create_params diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index bd9f60b0e..2d37d6f23 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import inbound_check_deposit_create_params from ...types.inbound_check_deposit import InboundCheckDeposit diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index a38c4c9bf..ff7d43726 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -9,9 +9,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse __all__ = ["InboundFundsHolds", "AsyncInboundFundsHolds"] diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py index dad9bd589..6c0109920 100644 --- a/src/increase/resources/simulations/inbound_international_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_international_ach_transfers.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import inbound_international_ach_transfer_create_params from ...types.simulations.inbound_international_ach_transfer import InboundInternationalACHTransfer diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 48fae7831..90dae10a0 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import inbound_wire_drawdown_request_create_params from ...types.inbound_wire_drawdown_request import InboundWireDrawdownRequest diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index ce542d511..b7bd0a17f 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -16,9 +16,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import interest_payment_create_params from ...types.transaction import Transaction diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 1bee21695..02c7f6459 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -15,9 +15,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import physical_card_shipment_advance_params from ...types.physical_card import PhysicalCard diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 840b9422f..f5877f8bd 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.program import Program from ...types.simulations import program_create_params diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index b80d2957d..4759f543c 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import ( real_time_payments_transfer_complete_params, real_time_payments_transfer_create_inbound_params, diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 9e23f3cf8..cbf003d01 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -67,9 +67,7 @@ CardDisputesWithStreamingResponse, AsyncCardDisputesWithStreamingResponse, ) -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from .check_deposits import ( CheckDeposits, AsyncCheckDeposits, diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 4f5e832bf..66fcba3dc 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -13,9 +13,7 @@ from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import ( - make_request_options, -) +from ..._base_client import make_request_options from ...types.simulations import wire_transfer_create_inbound_params from ...types.inbound_wire_transfer import InboundWireTransfer diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index 940db913b..cba7da871 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -12,10 +12,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.transaction import Transaction __all__ = ["Transactions", "AsyncTransactions"] diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 95732ed4b..473aeb874 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -17,10 +17,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest __all__ = ["WireDrawdownRequests", "AsyncWireDrawdownRequests"] diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 421673300..2e90dd06f 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -15,10 +15,7 @@ from .._resource import SyncAPIResource, AsyncAPIResource from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage -from .._base_client import ( - AsyncPaginator, - make_request_options, -) +from .._base_client import AsyncPaginator, make_request_options from ..types.wire_transfer import WireTransfer __all__ = ["WireTransfers", "AsyncWireTransfers"] From 2cc65fc56125e5d85c4aaaa19bf8d6a389b30884 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Jul 2024 14:31:34 +0000 Subject: [PATCH 0079/1325] docs(examples): use named params more (#500) --- .../entities/test_beneficial_owners.py | 20 +- .../entities/test_industry_code.py | 16 +- .../entities/test_supplemental_documents.py | 36 +-- .../intrafi/test_account_enrollments.py | 32 +-- tests/api_resources/intrafi/test_balances.py | 12 +- .../api_resources/intrafi/test_exclusions.py | 32 +-- .../simulations/test_account_transfers.py | 12 +- .../simulations/test_ach_transfers.py | 48 ++-- .../simulations/test_card_disputes.py | 20 +- tests/api_resources/simulations/test_cards.py | 8 +- .../simulations/test_check_deposits.py | 36 +-- .../simulations/test_check_transfers.py | 12 +- .../simulations/test_inbound_funds_holds.py | 12 +- .../simulations/test_physical_cards.py | 16 +- .../test_real_time_payments_transfers.py | 20 +- tests/api_resources/test_account_numbers.py | 40 +-- .../api_resources/test_account_statements.py | 20 +- tests/api_resources/test_account_transfers.py | 44 +-- tests/api_resources/test_accounts.py | 80 +++--- .../test_ach_prenotifications.py | 16 +- tests/api_resources/test_ach_transfers.py | 52 ++-- .../test_bookkeeping_accounts.py | 48 ++-- .../api_resources/test_bookkeeping_entries.py | 16 +- .../test_bookkeeping_entry_sets.py | 20 +- tests/api_resources/test_card_disputes.py | 16 +- tests/api_resources/test_card_payments.py | 24 +- .../test_card_purchase_supplements.py | 20 +- tests/api_resources/test_cards.py | 68 ++--- tests/api_resources/test_check_deposits.py | 20 +- tests/api_resources/test_check_transfers.py | 64 ++--- .../test_declined_transactions.py | 24 +- .../test_digital_card_profiles.py | 56 ++-- .../test_digital_wallet_tokens.py | 20 +- tests/api_resources/test_documents.py | 20 +- tests/api_resources/test_entities.py | 256 +++++++++--------- .../api_resources/test_event_subscriptions.py | 40 +-- tests/api_resources/test_events.py | 20 +- tests/api_resources/test_exports.py | 28 +- tests/api_resources/test_external_accounts.py | 36 +-- tests/api_resources/test_files.py | 16 +- .../test_inbound_ach_transfers.py | 72 ++--- .../test_inbound_check_deposits.py | 36 +-- .../api_resources/test_inbound_mail_items.py | 20 +- .../test_inbound_wire_drawdown_requests.py | 16 +- .../test_inbound_wire_transfers.py | 24 +- tests/api_resources/test_lockboxes.py | 40 +-- tests/api_resources/test_oauth_connections.py | 16 +- .../test_pending_transactions.py | 28 +- .../test_physical_card_profiles.py | 52 ++-- tests/api_resources/test_physical_cards.py | 40 +-- tests/api_resources/test_programs.py | 16 +- ...of_of_authorization_request_submissions.py | 20 +- .../test_proof_of_authorization_requests.py | 16 +- .../api_resources/test_real_time_decisions.py | 32 +-- ...real_time_payments_request_for_payments.py | 20 +- .../test_real_time_payments_transfers.py | 28 +- tests/api_resources/test_routing_numbers.py | 4 +- tests/api_resources/test_simulations.py | 4 +- tests/api_resources/test_transactions.py | 24 +- .../test_wire_drawdown_requests.py | 16 +- tests/api_resources/test_wire_transfers.py | 76 +++--- 61 files changed, 998 insertions(+), 998 deletions(-) diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py index 2a923e505..e62f68ade 100644 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -59,24 +59,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("1970-01-31"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "078051120", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "Ian Crease", @@ -291,24 +291,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("1970-01-31"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "078051120", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "Ian Crease", diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py index 2c3b6ab41..c4589caa8 100644 --- a/tests/api_resources/entities/test_industry_code.py +++ b/tests/api_resources/entities/test_industry_code.py @@ -20,7 +20,7 @@ class TestIndustryCode: @parametrize def test_method_create(self, client: Increase) -> None: industry_code = client.entities.industry_code.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) assert_matches_type(Entity, industry_code, path=["response"]) @@ -28,7 +28,7 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.entities.industry_code.with_raw_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) @@ -40,7 +40,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.entities.industry_code.with_streaming_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_create(self, client: Increase) -> None: def test_path_params_create(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): client.entities.industry_code.with_raw_response.create( - "", + entity_id="", industry_code="5132", ) @@ -66,7 +66,7 @@ class TestAsyncIndustryCode: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: industry_code = await async_client.entities.industry_code.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) assert_matches_type(Entity, industry_code, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.industry_code.with_raw_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) @@ -86,7 +86,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.entities.industry_code.with_streaming_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", industry_code="5132", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async def test_path_params_create(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): await async_client.entities.industry_code.with_raw_response.create( - "", + entity_id="", industry_code="5132", ) diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/entities/test_supplemental_documents.py index 7779b3ea3..4b97f4110 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/entities/test_supplemental_documents.py @@ -24,7 +24,7 @@ class TestSupplementalDocuments: @parametrize def test_method_create(self, client: Increase) -> None: supplemental_document = client.entities.supplemental_documents.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) assert_matches_type(Entity, supplemental_document, path=["response"]) @@ -32,7 +32,7 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.entities.supplemental_documents.with_raw_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) @@ -44,7 +44,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.entities.supplemental_documents.with_streaming_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: assert not response.is_closed @@ -59,22 +59,22 @@ def test_streaming_response_create(self, client: Increase) -> None: def test_path_params_create(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): client.entities.supplemental_documents.with_raw_response.create( - "", + entity_id="", file_id="file_makxrc67oh9l6sg7w9yc", ) @parametrize def test_method_list(self, client: Increase) -> None: supplemental_document = client.entities.supplemental_documents.list( - entity_id="string", + entity_id="entity_id", ) assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: supplemental_document = client.entities.supplemental_documents.list( - entity_id="string", - cursor="string", + entity_id="entity_id", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -83,7 +83,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_list(self, client: Increase) -> None: response = client.entities.supplemental_documents.with_raw_response.list( - entity_id="string", + entity_id="entity_id", ) assert response.is_closed is True @@ -94,7 +94,7 @@ def test_raw_response_list(self, client: Increase) -> None: @parametrize def test_streaming_response_list(self, client: Increase) -> None: with client.entities.supplemental_documents.with_streaming_response.list( - entity_id="string", + entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -111,7 +111,7 @@ class TestAsyncSupplementalDocuments: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: supplemental_document = await async_client.entities.supplemental_documents.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) assert_matches_type(Entity, supplemental_document, path=["response"]) @@ -119,7 +119,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.supplemental_documents.with_raw_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) @@ -131,7 +131,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.entities.supplemental_documents.with_streaming_response.create( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: assert not response.is_closed @@ -146,22 +146,22 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async def test_path_params_create(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): await async_client.entities.supplemental_documents.with_raw_response.create( - "", + entity_id="", file_id="file_makxrc67oh9l6sg7w9yc", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: supplemental_document = await async_client.entities.supplemental_documents.list( - entity_id="string", + entity_id="entity_id", ) assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: supplemental_document = await async_client.entities.supplemental_documents.list( - entity_id="string", - cursor="string", + entity_id="entity_id", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -170,7 +170,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.supplemental_documents.with_raw_response.list( - entity_id="string", + entity_id="entity_id", ) assert response.is_closed is True @@ -181,7 +181,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: async with async_client.entities.supplemental_documents.with_streaming_response.list( - entity_id="string", + entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/intrafi/test_account_enrollments.py b/tests/api_resources/intrafi/test_account_enrollments.py index 6e120c600..1b37f1c5a 100644 --- a/tests/api_resources/intrafi/test_account_enrollments.py +++ b/tests/api_resources/intrafi/test_account_enrollments.py @@ -57,14 +57,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_enrollment = client.intrafi.account_enrollments.retrieve( - "string", + "intrafi_account_enrollment_id", ) assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.intrafi.account_enrollments.with_raw_response.retrieve( - "string", + "intrafi_account_enrollment_id", ) assert response.is_closed is True @@ -75,7 +75,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.intrafi.account_enrollments.with_streaming_response.retrieve( - "string", + "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,8 +102,8 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_enrollment = client.intrafi.account_enrollments.list( - account_id="string", - cursor="string", + account_id="account_id", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, @@ -133,14 +133,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_unenroll(self, client: Increase) -> None: account_enrollment = client.intrafi.account_enrollments.unenroll( - "string", + "intrafi_account_enrollment_id", ) assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_raw_response_unenroll(self, client: Increase) -> None: response = client.intrafi.account_enrollments.with_raw_response.unenroll( - "string", + "intrafi_account_enrollment_id", ) assert response.is_closed is True @@ -151,7 +151,7 @@ def test_raw_response_unenroll(self, client: Increase) -> None: @parametrize def test_streaming_response_unenroll(self, client: Increase) -> None: with client.intrafi.account_enrollments.with_streaming_response.unenroll( - "string", + "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -211,14 +211,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_enrollment = await async_client.intrafi.account_enrollments.retrieve( - "string", + "intrafi_account_enrollment_id", ) assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi.account_enrollments.with_raw_response.retrieve( - "string", + "intrafi_account_enrollment_id", ) assert response.is_closed is True @@ -229,7 +229,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi.account_enrollments.with_streaming_response.retrieve( - "string", + "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -256,8 +256,8 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_enrollment = await async_client.intrafi.account_enrollments.list( - account_id="string", - cursor="string", + account_id="account_id", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, @@ -287,14 +287,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_unenroll(self, async_client: AsyncIncrease) -> None: account_enrollment = await async_client.intrafi.account_enrollments.unenroll( - "string", + "intrafi_account_enrollment_id", ) assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi.account_enrollments.with_raw_response.unenroll( - "string", + "intrafi_account_enrollment_id", ) assert response.is_closed is True @@ -305,7 +305,7 @@ async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_unenroll(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi.account_enrollments.with_streaming_response.unenroll( - "string", + "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/intrafi/test_balances.py b/tests/api_resources/intrafi/test_balances.py index 19f5cef5b..72d34bcdc 100644 --- a/tests/api_resources/intrafi/test_balances.py +++ b/tests/api_resources/intrafi/test_balances.py @@ -20,14 +20,14 @@ class TestBalances: @parametrize def test_method_retrieve(self, client: Increase) -> None: balance = client.intrafi.balances.retrieve( - "string", + "account_id", ) assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.intrafi.balances.with_raw_response.retrieve( - "string", + "account_id", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.intrafi.balances.with_streaming_response.retrieve( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,14 +62,14 @@ class TestAsyncBalances: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: balance = await async_client.intrafi.balances.retrieve( - "string", + "account_id", ) assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi.balances.with_raw_response.retrieve( - "string", + "account_id", ) assert response.is_closed is True @@ -80,7 +80,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi.balances.with_streaming_response.retrieve( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/intrafi/test_exclusions.py b/tests/api_resources/intrafi/test_exclusions.py index 53629bd42..ff29e3655 100644 --- a/tests/api_resources/intrafi/test_exclusions.py +++ b/tests/api_resources/intrafi/test_exclusions.py @@ -55,14 +55,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: exclusion = client.intrafi.exclusions.retrieve( - "string", + "intrafi_exclusion_id", ) assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.intrafi.exclusions.with_raw_response.retrieve( - "string", + "intrafi_exclusion_id", ) assert response.is_closed is True @@ -73,7 +73,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.intrafi.exclusions.with_streaming_response.retrieve( - "string", + "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,8 +98,8 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: exclusion = client.intrafi.exclusions.list( - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", idempotency_key="x", limit=1, ) @@ -128,14 +128,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: exclusion = client.intrafi.exclusions.archive( - "string", + "intrafi_exclusion_id", ) assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.intrafi.exclusions.with_raw_response.archive( - "string", + "intrafi_exclusion_id", ) assert response.is_closed is True @@ -146,7 +146,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.intrafi.exclusions.with_streaming_response.archive( - "string", + "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: exclusion = await async_client.intrafi.exclusions.retrieve( - "string", + "intrafi_exclusion_id", ) assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi.exclusions.with_raw_response.retrieve( - "string", + "intrafi_exclusion_id", ) assert response.is_closed is True @@ -222,7 +222,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi.exclusions.with_streaming_response.retrieve( - "string", + "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -247,8 +247,8 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: exclusion = await async_client.intrafi.exclusions.list( - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", idempotency_key="x", limit=1, ) @@ -277,14 +277,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: exclusion = await async_client.intrafi.exclusions.archive( - "string", + "intrafi_exclusion_id", ) assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi.exclusions.with_raw_response.archive( - "string", + "intrafi_exclusion_id", ) assert response.is_closed is True @@ -295,7 +295,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi.exclusions.with_streaming_response.archive( - "string", + "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index 6df6e1ad0..fa6cf3101 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -21,7 +21,7 @@ class TestAccountTransfers: @parametrize def test_method_complete(self, client: Increase) -> None: account_transfer = client.simulations.account_transfers.complete( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @@ -29,7 +29,7 @@ def test_method_complete(self, client: Increase) -> None: @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.account_transfers.with_raw_response.complete( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_complete(self, client: Increase) -> None: @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.account_transfers.with_streaming_response.complete( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ class TestAsyncAccountTransfers: @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.simulations.account_transfers.complete( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @@ -75,7 +75,7 @@ async def test_method_complete(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.account_transfers.with_raw_response.complete( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -87,7 +87,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.account_transfers.with_streaming_response.complete( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 42316a8c7..221370a67 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -71,7 +71,7 @@ def test_streaming_response_create_inbound(self, client: Increase) -> None: @parametrize def test_method_notification_of_change(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -80,7 +80,7 @@ def test_method_notification_of_change(self, client: Increase) -> None: @parametrize def test_raw_response_notification_of_change(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -93,7 +93,7 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: @parametrize def test_streaming_response_notification_of_change(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) as response: @@ -109,7 +109,7 @@ def test_streaming_response_notification_of_change(self, client: Increase) -> No def test_path_params_notification_of_change(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.notification_of_change( - "", + ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -118,7 +118,7 @@ def test_path_params_notification_of_change(self, client: Increase) -> None: @parametrize def test_method_return(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -126,7 +126,7 @@ def test_method_return(self, client: Increase) -> None: @parametrize def test_method_return_with_all_params(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", reason="insufficient_fund", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -135,7 +135,7 @@ def test_method_return_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -147,7 +147,7 @@ def test_raw_response_return(self, client: Increase) -> None: @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -162,14 +162,14 @@ def test_streaming_response_return(self, client: Increase) -> None: def test_path_params_return(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.return_( - "", + ach_transfer_id="", ) @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -177,7 +177,7 @@ def test_method_submit(self, client: Increase) -> None: @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.submit( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -189,7 +189,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.submit( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -264,7 +264,7 @@ async def test_streaming_response_create_inbound(self, async_client: AsyncIncrea @parametrize async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -273,7 +273,7 @@ async def test_method_notification_of_change(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -286,7 +286,7 @@ async def test_raw_response_notification_of_change(self, async_client: AsyncIncr @parametrize async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.notification_of_change( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", ) as response: @@ -302,7 +302,7 @@ async def test_streaming_response_notification_of_change(self, async_client: Asy async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( - "", + ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -311,7 +311,7 @@ async def test_path_params_notification_of_change(self, async_client: AsyncIncre @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -319,7 +319,7 @@ async def test_method_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_return_with_all_params(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", reason="insufficient_fund", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -328,7 +328,7 @@ async def test_method_return_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -340,7 +340,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.return_( - "string", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -355,14 +355,14 @@ async def test_streaming_response_return(self, async_client: AsyncIncrease) -> N async def test_path_params_return(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.return_( - "", + ach_transfer_id="", ) @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -370,7 +370,7 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.submit( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -382,7 +382,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.submit( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 8c89036e3..05c9c8271 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -20,7 +20,7 @@ class TestCardDisputes: @parametrize def test_method_action(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -28,7 +28,7 @@ def test_method_action(self, client: Increase) -> None: @parametrize def test_method_action_with_all_params(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", explanation="This was a valid recurring transaction", ) @@ -37,7 +37,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_action(self, client: Increase) -> None: response = client.simulations.card_disputes.with_raw_response.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) @@ -49,7 +49,7 @@ def test_raw_response_action(self, client: Increase) -> None: @parametrize def test_streaming_response_action(self, client: Increase) -> None: with client.simulations.card_disputes.with_streaming_response.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) as response: assert not response.is_closed @@ -64,7 +64,7 @@ def test_streaming_response_action(self, client: Increase) -> None: def test_path_params_action(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): client.simulations.card_disputes.with_raw_response.action( - "", + card_dispute_id="", status="rejected", ) @@ -75,7 +75,7 @@ class TestAsyncCardDisputes: @parametrize async def test_method_action(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -83,7 +83,7 @@ async def test_method_action(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", explanation="This was a valid recurring transaction", ) @@ -92,7 +92,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.card_disputes.with_raw_response.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) @@ -104,7 +104,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.card_disputes.with_streaming_response.action( - "string", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", status="rejected", ) as response: assert not response.is_closed @@ -119,6 +119,6 @@ async def test_streaming_response_action(self, async_client: AsyncIncrease) -> N async def test_path_params_action(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): await async_client.simulations.card_disputes.with_raw_response.action( - "", + card_dispute_id="", status="rejected", ) diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py index eef528851..0510f563f 100644 --- a/tests/api_resources/simulations/test_cards.py +++ b/tests/api_resources/simulations/test_cards.py @@ -30,14 +30,14 @@ def test_method_authorize_with_all_params(self, client: Increase) -> None: card = client.simulations.cards.authorize( amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="string", + digital_wallet_token_id="digital_wallet_token_id", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", merchant_city="New York", merchant_country="US", merchant_descriptor="AMAZON.COM", - physical_card_id="string", + physical_card_id="physical_card_id", ) assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) @@ -124,14 +124,14 @@ async def test_method_authorize_with_all_params(self, async_client: AsyncIncreas card = await async_client.simulations.cards.authorize( amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="string", + digital_wallet_token_id="digital_wallet_token_id", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", merchant_city="New York", merchant_country="US", merchant_descriptor="AMAZON.COM", - physical_card_id="string", + physical_card_id="physical_card_id", ) assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 395655e01..0dc091c92 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -21,7 +21,7 @@ class TestCheckDeposits: @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -29,7 +29,7 @@ def test_method_reject(self, client: Increase) -> None: @parametrize def test_raw_response_reject(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.reject( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_reject(self, client: Increase) -> None: @parametrize def test_streaming_response_reject(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.reject( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,14 +62,14 @@ def test_path_params_reject(self, client: Increase) -> None: @parametrize def test_method_return(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.return_( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.return_( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -80,7 +80,7 @@ def test_raw_response_return(self, client: Increase) -> None: @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.return_( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -101,7 +101,7 @@ def test_path_params_return(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -109,7 +109,7 @@ def test_method_submit(self, client: Increase) -> None: @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,7 +147,7 @@ class TestAsyncCheckDeposits: @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -155,7 +155,7 @@ async def test_method_reject(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.reject( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -167,7 +167,7 @@ async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.reject( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -188,14 +188,14 @@ async def test_path_params_reject(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.return_( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.return_( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -206,7 +206,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.return_( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -227,7 +227,7 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @@ -235,7 +235,7 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -247,7 +247,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 14d3b4075..93834eb5e 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -21,7 +21,7 @@ class TestCheckTransfers: @parametrize def test_method_mail(self, client: Increase) -> None: check_transfer = client.simulations.check_transfers.mail( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -29,7 +29,7 @@ def test_method_mail(self, client: Increase) -> None: @parametrize def test_raw_response_mail(self, client: Increase) -> None: response = client.simulations.check_transfers.with_raw_response.mail( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_mail(self, client: Increase) -> None: @parametrize def test_streaming_response_mail(self, client: Increase) -> None: with client.simulations.check_transfers.with_streaming_response.mail( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ class TestAsyncCheckTransfers: @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.simulations.check_transfers.mail( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -75,7 +75,7 @@ async def test_method_mail(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_transfers.with_raw_response.mail( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -87,7 +87,7 @@ async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_transfers.with_streaming_response.mail( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index 6645d9fdc..aa7a859dc 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -20,14 +20,14 @@ class TestInboundFundsHolds: @parametrize def test_method_release(self, client: Increase) -> None: inbound_funds_hold = client.simulations.inbound_funds_holds.release( - "string", + "inbound_funds_hold_id", ) assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) @parametrize def test_raw_response_release(self, client: Increase) -> None: response = client.simulations.inbound_funds_holds.with_raw_response.release( - "string", + "inbound_funds_hold_id", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_release(self, client: Increase) -> None: @parametrize def test_streaming_response_release(self, client: Increase) -> None: with client.simulations.inbound_funds_holds.with_streaming_response.release( - "string", + "inbound_funds_hold_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -62,14 +62,14 @@ class TestAsyncInboundFundsHolds: @parametrize async def test_method_release(self, async_client: AsyncIncrease) -> None: inbound_funds_hold = await async_client.simulations.inbound_funds_holds.release( - "string", + "inbound_funds_hold_id", ) assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) @parametrize async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.inbound_funds_holds.with_raw_response.release( - "string", + "inbound_funds_hold_id", ) assert response.is_closed is True @@ -80,7 +80,7 @@ async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_release(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.inbound_funds_holds.with_streaming_response.release( - "string", + "inbound_funds_hold_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 191a470b8..9762d794f 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -20,7 +20,7 @@ class TestPhysicalCards: @parametrize def test_method_shipment_advance(self, client: Increase) -> None: physical_card = client.simulations.physical_cards.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -28,7 +28,7 @@ def test_method_shipment_advance(self, client: Increase) -> None: @parametrize def test_raw_response_shipment_advance(self, client: Increase) -> None: response = client.simulations.physical_cards.with_raw_response.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) @@ -40,7 +40,7 @@ def test_raw_response_shipment_advance(self, client: Increase) -> None: @parametrize def test_streaming_response_shipment_advance(self, client: Increase) -> None: with client.simulations.physical_cards.with_streaming_response.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: assert not response.is_closed @@ -55,7 +55,7 @@ def test_streaming_response_shipment_advance(self, client: Increase) -> None: def test_path_params_shipment_advance(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.simulations.physical_cards.with_raw_response.shipment_advance( - "", + physical_card_id="", shipment_status="shipped", ) @@ -66,7 +66,7 @@ class TestAsyncPhysicalCards: @parametrize async def test_method_shipment_advance(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.simulations.physical_cards.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -74,7 +74,7 @@ async def test_method_shipment_advance(self, async_client: AsyncIncrease) -> Non @parametrize async def test_raw_response_shipment_advance(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.physical_cards.with_raw_response.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) @@ -86,7 +86,7 @@ async def test_raw_response_shipment_advance(self, async_client: AsyncIncrease) @parametrize async def test_streaming_response_shipment_advance(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.physical_cards.with_streaming_response.shipment_advance( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: assert not response.is_closed @@ -101,6 +101,6 @@ async def test_streaming_response_shipment_advance(self, async_client: AsyncIncr async def test_path_params_shipment_advance(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.simulations.physical_cards.with_raw_response.shipment_advance( - "", + physical_card_id="", shipment_status="shipped", ) 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 de09f21ae..7835c8efc 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -23,14 +23,14 @@ class TestRealTimePaymentsTransfers: @parametrize def test_method_complete(self, client: Increase) -> None: real_time_payments_transfer = client.simulations.real_time_payments_transfers.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_method_complete_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.simulations.real_time_payments_transfers.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", rejection={"reject_reason_code": "account_closed"}, ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -38,7 +38,7 @@ def test_method_complete_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.real_time_payments_transfers.with_raw_response.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -49,7 +49,7 @@ def test_raw_response_complete(self, client: Increase) -> None: @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.real_time_payments_transfers.with_streaming_response.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_path_params_complete(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" ): client.simulations.real_time_payments_transfers.with_raw_response.complete( - "", + real_time_payments_transfer_id="", ) @parametrize @@ -130,14 +130,14 @@ class TestAsyncRealTimePaymentsTransfers: @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_method_complete_with_all_params(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", rejection={"reject_reason_code": "account_closed"}, ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -145,7 +145,7 @@ async def test_method_complete_with_all_params(self, async_client: AsyncIncrease @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.real_time_payments_transfers.with_raw_response.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -156,7 +156,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.real_time_payments_transfers.with_streaming_response.complete( - "string", + real_time_payments_transfer_id="real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,7 +172,7 @@ async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" ): await async_client.simulations.real_time_payments_transfers.with_raw_response.complete( - "", + real_time_payments_transfer_id="", ) @parametrize diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 514c878fa..831a7d63d 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -68,14 +68,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_number = client.account_numbers.retrieve( - "string", + "account_number_id", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_numbers.with_raw_response.retrieve( - "string", + "account_number_id", ) assert response.is_closed is True @@ -86,7 +86,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_numbers.with_streaming_response.retrieve( - "string", + "account_number_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: account_number = client.account_numbers.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", inbound_ach={"debit_status": "blocked"}, inbound_checks={"status": "allowed"}, name="x", @@ -124,7 +124,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.account_numbers.with_raw_response.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert response.is_closed is True @@ -135,7 +135,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.account_numbers.with_streaming_response.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,7 +149,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_number_id` but received ''"): client.account_numbers.with_raw_response.update( - "", + account_number_id="", ) @parametrize @@ -160,7 +160,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.list( - account_id="string", + account_id="account_id", ach_debit_status="allowed", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -168,7 +168,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status="active", @@ -246,14 +246,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.retrieve( - "string", + "account_number_id", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_numbers.with_raw_response.retrieve( - "string", + "account_number_id", ) assert response.is_closed is True @@ -264,7 +264,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_numbers.with_streaming_response.retrieve( - "string", + "account_number_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -284,14 +284,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", inbound_ach={"debit_status": "blocked"}, inbound_checks={"status": "allowed"}, name="x", @@ -302,7 +302,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.account_numbers.with_raw_response.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert response.is_closed is True @@ -313,7 +313,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.account_numbers.with_streaming_response.update( - "string", + account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -327,7 +327,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_number_id` but received ''"): await async_client.account_numbers.with_raw_response.update( - "", + account_number_id="", ) @parametrize @@ -338,7 +338,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list( - account_id="string", + account_id="account_id", ach_debit_status="allowed", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -346,7 +346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status="active", diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index d548cc5be..3e10525b4 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -22,14 +22,14 @@ class TestAccountStatements: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_statement = client.account_statements.retrieve( - "string", + "account_statement_id", ) assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_statements.with_raw_response.retrieve( - "string", + "account_statement_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_statements.with_streaming_response.retrieve( - "string", + "account_statement_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,8 +65,8 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_statement = client.account_statements.list( - account_id="string", - cursor="string", + account_id="account_id", + cursor="cursor", limit=1, statement_period_start={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -104,14 +104,14 @@ class TestAsyncAccountStatements: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_statement = await async_client.account_statements.retrieve( - "string", + "account_statement_id", ) assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_statements.with_raw_response.retrieve( - "string", + "account_statement_id", ) assert response.is_closed is True @@ -122,7 +122,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_statements.with_streaming_response.retrieve( - "string", + "account_statement_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,8 +147,8 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_statement = await async_client.account_statements.list( - account_id="string", - cursor="string", + account_id="account_id", + cursor="cursor", limit=1, statement_period_start={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index e4f7e540f..583d3bb1a 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -73,14 +73,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_transfer = client.account_transfers.retrieve( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.retrieve( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -91,7 +91,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.retrieve( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,14 +116,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: account_transfer = client.account_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -152,14 +152,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: account_transfer = client.account_transfers.approve( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.approve( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -170,7 +170,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.approve( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -190,14 +190,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: account_transfer = client.account_transfers.cancel( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.cancel( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -208,7 +208,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.cancel( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -283,14 +283,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.retrieve( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.retrieve( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -301,7 +301,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.retrieve( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,14 +326,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -362,14 +362,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.approve( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.approve( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -380,7 +380,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.approve( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -400,14 +400,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.cancel( - "string", + "account_transfer_id", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.cancel( - "string", + "account_transfer_id", ) assert response.is_closed is True @@ -418,7 +418,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.cancel( - "string", + "account_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d4d7ccfe8..fd8212eb7 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -34,7 +34,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account = client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - informational_entity_id="string", + informational_entity_id="informational_entity_id", program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Account, account, path=["response"]) @@ -66,14 +66,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account = client.accounts.retrieve( - "string", + "account_id", ) assert_matches_type(Account, account, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.accounts.with_raw_response.retrieve( - "string", + "account_id", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.accounts.with_streaming_response.retrieve( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -104,14 +104,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: account = client.accounts.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: account = client.accounts.update( - "string", + account_id="account_in71c4amph0vgo2qllky", name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -119,7 +119,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.accounts.with_raw_response.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -130,7 +130,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.accounts.with_streaming_response.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,7 +144,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.with_raw_response.update( - "", + account_id="", ) @parametrize @@ -161,10 +161,10 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", idempotency_key="x", - informational_entity_id="string", + informational_entity_id="informational_entity_id", limit=1, status="open", ) @@ -193,14 +193,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_balance(self, client: Increase) -> None: account = client.accounts.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert_matches_type(BalanceLookup, account, path=["response"]) @parametrize def test_method_balance_with_all_params(self, client: Increase) -> None: account = client.accounts.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", at_time=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(BalanceLookup, account, path=["response"]) @@ -208,7 +208,7 @@ def test_method_balance_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_balance(self, client: Increase) -> None: response = client.accounts.with_raw_response.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -219,7 +219,7 @@ def test_raw_response_balance(self, client: Increase) -> None: @parametrize def test_streaming_response_balance(self, client: Increase) -> None: with client.accounts.with_streaming_response.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,14 +233,14 @@ def test_streaming_response_balance(self, client: Increase) -> None: def test_path_params_balance(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): client.accounts.with_raw_response.balance( - "", + account_id="", ) @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_close(self, client: Increase) -> None: account = client.accounts.close( - "string", + "account_id", ) assert_matches_type(Account, account, path=["response"]) @@ -248,7 +248,7 @@ def test_method_close(self, client: Increase) -> None: @parametrize def test_raw_response_close(self, client: Increase) -> None: response = client.accounts.with_raw_response.close( - "string", + "account_id", ) assert response.is_closed is True @@ -260,7 +260,7 @@ def test_raw_response_close(self, client: Increase) -> None: @parametrize def test_streaming_response_close(self, client: Increase) -> None: with client.accounts.with_streaming_response.close( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -294,7 +294,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account = await async_client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - informational_entity_id="string", + informational_entity_id="informational_entity_id", program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Account, account, path=["response"]) @@ -326,14 +326,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.retrieve( - "string", + "account_id", ) assert_matches_type(Account, account, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.retrieve( - "string", + "account_id", ) assert response.is_closed is True @@ -344,7 +344,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.retrieve( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -364,14 +364,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( - "string", + account_id="account_in71c4amph0vgo2qllky", name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -379,7 +379,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -390,7 +390,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.update( - "string", + account_id="account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -404,7 +404,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.with_raw_response.update( - "", + account_id="", ) @parametrize @@ -421,10 +421,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", idempotency_key="x", - informational_entity_id="string", + informational_entity_id="informational_entity_id", limit=1, status="open", ) @@ -453,14 +453,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_balance(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert_matches_type(BalanceLookup, account, path=["response"]) @parametrize async def test_method_balance_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", at_time=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(BalanceLookup, account, path=["response"]) @@ -468,7 +468,7 @@ async def test_method_balance_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -479,7 +479,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_balance(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.balance( - "string", + account_id="account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -493,14 +493,14 @@ async def test_streaming_response_balance(self, async_client: AsyncIncrease) -> async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): await async_client.accounts.with_raw_response.balance( - "", + account_id="", ) @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_close(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.close( - "string", + "account_id", ) assert_matches_type(Account, account, path=["response"]) @@ -508,7 +508,7 @@ async def test_method_close(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.close( - "string", + "account_id", ) assert response.is_closed is True @@ -520,7 +520,7 @@ async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_close(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.close( - "string", + "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 5f281494e..00305a15f 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -78,14 +78,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.retrieve( - "string", + "ach_prenotification_id", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.ach_prenotifications.with_raw_response.retrieve( - "string", + "ach_prenotification_id", ) assert response.is_closed is True @@ -96,7 +96,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.ach_prenotifications.with_streaming_response.retrieve( - "string", + "ach_prenotification_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -129,7 +129,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -218,14 +218,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.retrieve( - "string", + "ach_prenotification_id", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_prenotifications.with_raw_response.retrieve( - "string", + "ach_prenotification_id", ) assert response.is_closed is True @@ -236,7 +236,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_prenotifications.with_streaming_response.retrieve( - "string", + "ach_prenotification_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -269,7 +269,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index ca4473da1..847819f0a 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -67,7 +67,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: company_name="x", destination_account_holder="business", effective_date=parse_date("2019-12-27"), - external_account_id="string", + external_account_id="external_account_id", funding="checking", individual_id="x", individual_name="x", @@ -112,14 +112,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: ach_transfer = client.ach_transfers.retrieve( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.retrieve( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -130,7 +130,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.retrieve( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,15 +155,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: ach_transfer = client.ach_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) @@ -192,14 +192,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: ach_transfer = client.ach_transfers.approve( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.approve( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -210,7 +210,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.approve( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -230,14 +230,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: ach_transfer = client.ach_transfers.cancel( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.cancel( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -248,7 +248,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.cancel( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -317,7 +317,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) company_name="x", destination_account_holder="business", effective_date=parse_date("2019-12-27"), - external_account_id="string", + external_account_id="external_account_id", funding="checking", individual_id="x", individual_name="x", @@ -362,14 +362,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.retrieve( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.retrieve( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -380,7 +380,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.retrieve( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -405,15 +405,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) @@ -442,14 +442,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.approve( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.approve( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -460,7 +460,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.approve( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -480,14 +480,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.cancel( - "string", + "ach_transfer_id", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.cancel( - "string", + "ach_transfer_id", ) assert response.is_closed is True @@ -498,7 +498,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.cancel( - "string", + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 7ebf4c3bc..aae5586f5 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -33,9 +33,9 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.create( name="New Account!", - account_id="string", + account_id="account_id", compliance_category="commingled_cash", - entity_id="string", + entity_id="entity_id", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @@ -66,7 +66,7 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @@ -74,7 +74,7 @@ def test_method_update(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.bookkeeping_accounts.with_raw_response.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) @@ -86,7 +86,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.bookkeeping_accounts.with_streaming_response.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) as response: assert not response.is_closed @@ -103,7 +103,7 @@ def test_path_params_update(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `bookkeeping_account_id` but received ''" ): client.bookkeeping_accounts.with_raw_response.update( - "", + bookkeeping_account_id="", name="Deprecated Account", ) @@ -115,7 +115,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -144,14 +144,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_balance(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @parametrize def test_method_balance_with_all_params(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", at_time=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @@ -159,7 +159,7 @@ def test_method_balance_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_balance(self, client: Increase) -> None: response = client.bookkeeping_accounts.with_raw_response.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) assert response.is_closed is True @@ -170,7 +170,7 @@ def test_raw_response_balance(self, client: Increase) -> None: @parametrize def test_streaming_response_balance(self, client: Increase) -> None: with client.bookkeeping_accounts.with_streaming_response.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -186,7 +186,7 @@ def test_path_params_balance(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `bookkeeping_account_id` but received ''" ): client.bookkeeping_accounts.with_raw_response.balance( - "", + bookkeeping_account_id="", ) @@ -204,9 +204,9 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.create( name="New Account!", - account_id="string", + account_id="account_id", compliance_category="commingled_cash", - entity_id="string", + entity_id="entity_id", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @@ -237,7 +237,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @@ -245,7 +245,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_accounts.with_raw_response.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) @@ -257,7 +257,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_accounts.with_streaming_response.update( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", name="Deprecated Account", ) as response: assert not response.is_closed @@ -274,7 +274,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `bookkeeping_account_id` but received ''" ): await async_client.bookkeeping_accounts.with_raw_response.update( - "", + bookkeeping_account_id="", name="Deprecated Account", ) @@ -286,7 +286,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -315,14 +315,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_balance(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @parametrize async def test_method_balance_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", at_time=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @@ -330,7 +330,7 @@ async def test_method_balance_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_accounts.with_raw_response.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) assert response.is_closed is True @@ -341,7 +341,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_balance(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_accounts.with_streaming_response.balance( - "string", + bookkeeping_account_id="bookkeeping_account_e37p1f1iuocw5intf35v", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -357,5 +357,5 @@ async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `bookkeeping_account_id` but received ''" ): await async_client.bookkeeping_accounts.with_raw_response.balance( - "", + bookkeeping_account_id="", ) diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index d129ae9dc..b6385c70e 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -21,14 +21,14 @@ class TestBookkeepingEntries: @parametrize def test_method_retrieve(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.retrieve( - "string", + "bookkeeping_entry_id", ) assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.bookkeeping_entries.with_raw_response.retrieve( - "string", + "bookkeeping_entry_id", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.bookkeeping_entries.with_streaming_response.retrieve( - "string", + "bookkeeping_entry_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @@ -96,14 +96,14 @@ class TestAsyncBookkeepingEntries: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.retrieve( - "string", + "bookkeeping_entry_id", ) assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_entries.with_raw_response.retrieve( - "string", + "bookkeeping_entry_id", ) assert response.is_closed is True @@ -114,7 +114,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_entries.with_streaming_response.retrieve( - "string", + "bookkeeping_entry_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 0edd3fdab..1fab3a87d 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -98,14 +98,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.retrieve( - "string", + "bookkeeping_entry_set_id", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.bookkeeping_entry_sets.with_raw_response.retrieve( - "string", + "bookkeeping_entry_set_id", ) assert response.is_closed is True @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.bookkeeping_entry_sets.with_streaming_response.retrieve( - "string", + "bookkeeping_entry_set_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,10 +143,10 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, - transaction_id="string", + transaction_id="transaction_id", ) assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @@ -253,14 +253,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: bookkeeping_entry_set = await async_client.bookkeeping_entry_sets.retrieve( - "string", + "bookkeeping_entry_set_id", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_entry_sets.with_raw_response.retrieve( - "string", + "bookkeeping_entry_set_id", ) assert response.is_closed is True @@ -271,7 +271,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_entry_sets.with_streaming_response.retrieve( - "string", + "bookkeeping_entry_set_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -298,10 +298,10 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_entry_set = await async_client.bookkeeping_entry_sets.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, - transaction_id="string", + transaction_id="transaction_id", ) assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 55be0d43b..2cb7b1d91 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -56,14 +56,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_dispute = client.card_disputes.retrieve( - "string", + "card_dispute_id", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_disputes.with_raw_response.retrieve( - "string", + "card_dispute_id", ) assert response.is_closed is True @@ -74,7 +74,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_disputes.with_streaming_response.retrieve( - "string", + "card_dispute_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -105,7 +105,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_reviewing", "accepted", "rejected"]}, @@ -173,14 +173,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.card_disputes.retrieve( - "string", + "card_dispute_id", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_disputes.with_raw_response.retrieve( - "string", + "card_dispute_id", ) assert response.is_closed is True @@ -191,7 +191,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_disputes.with_streaming_response.retrieve( - "string", + "card_dispute_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -222,7 +222,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_reviewing", "accepted", "rejected"]}, diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 0291ae1d4..b18e4bac9 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -22,14 +22,14 @@ class TestCardPayments: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_payment = client.card_payments.retrieve( - "string", + "card_payment_id", ) assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_payments.with_raw_response.retrieve( - "string", + "card_payment_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_payments.with_streaming_response.retrieve( - "string", + "card_payment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,15 +65,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: card_payment = client.card_payments.list( - account_id="string", - card_id="string", + account_id="account_id", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) @@ -105,14 +105,14 @@ class TestAsyncCardPayments: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_payment = await async_client.card_payments.retrieve( - "string", + "card_payment_id", ) assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_payments.with_raw_response.retrieve( - "string", + "card_payment_id", ) assert response.is_closed is True @@ -123,7 +123,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_payments.with_streaming_response.retrieve( - "string", + "card_payment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,15 +148,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: card_payment = await async_client.card_payments.list( - account_id="string", - card_id="string", + account_id="account_id", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 8cd3e7906..7483ce1f7 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -22,14 +22,14 @@ class TestCardPurchaseSupplements: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_purchase_supplement = client.card_purchase_supplements.retrieve( - "string", + "card_purchase_supplement_id", ) assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_purchase_supplements.with_raw_response.retrieve( - "string", + "card_purchase_supplement_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_purchase_supplements.with_streaming_response.retrieve( - "string", + "card_purchase_supplement_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,14 +67,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: card_purchase_supplement = client.card_purchase_supplements.list( - card_payment_id="string", + card_payment_id="card_payment_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @@ -106,14 +106,14 @@ class TestAsyncCardPurchaseSupplements: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_purchase_supplement = await async_client.card_purchase_supplements.retrieve( - "string", + "card_purchase_supplement_id", ) assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_purchase_supplements.with_raw_response.retrieve( - "string", + "card_purchase_supplement_id", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_purchase_supplements.with_streaming_response.retrieve( - "string", + "card_purchase_supplement_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -151,14 +151,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: card_purchase_supplement = await async_client.card_purchase_supplements.list( - card_payment_id="string", + card_payment_id="card_payment_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 54702b53f..45b5abd5d 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -39,11 +39,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, description="Card for Ian Crease", digital_wallet={ - "digital_card_profile_id": "string", + "digital_card_profile_id": "digital_card_profile_id", "email": "x", "phone": "x", }, - entity_id="string", + entity_id="entity_id", ) assert_matches_type(Card, card, path=["response"]) @@ -74,14 +74,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: card = client.cards.retrieve( - "string", + "card_id", ) assert_matches_type(Card, card, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.cards.with_raw_response.retrieve( - "string", + "card_id", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.cards.with_streaming_response.retrieve( - "string", + "card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -112,14 +112,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: card = client.cards.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(Card, card, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: card = client.cards.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", billing_address={ "city": "x", "line1": "x", @@ -129,11 +129,11 @@ def test_method_update_with_all_params(self, client: Increase) -> None: }, description="New description", digital_wallet={ - "digital_card_profile_id": "string", + "digital_card_profile_id": "digital_card_profile_id", "email": "x", "phone": "x", }, - entity_id="string", + entity_id="entity_id", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -141,7 +141,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.cards.with_raw_response.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -152,7 +152,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.cards.with_streaming_response.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -166,7 +166,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): client.cards.with_raw_response.update( - "", + card_id="", ) @parametrize @@ -177,14 +177,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: card = client.cards.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -213,14 +213,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_retrieve_sensitive_details(self, client: Increase) -> None: card = client.cards.retrieve_sensitive_details( - "string", + "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None: response = client.cards.with_raw_response.retrieve_sensitive_details( - "string", + "card_id", ) assert response.is_closed is True @@ -231,7 +231,7 @@ def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None @parametrize def test_streaming_response_retrieve_sensitive_details(self, client: Increase) -> None: with client.cards.with_streaming_response.retrieve_sensitive_details( - "string", + "card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -272,11 +272,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, description="Card for Ian Crease", digital_wallet={ - "digital_card_profile_id": "string", + "digital_card_profile_id": "digital_card_profile_id", "email": "x", "phone": "x", }, - entity_id="string", + entity_id="entity_id", ) assert_matches_type(Card, card, path=["response"]) @@ -307,14 +307,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.retrieve( - "string", + "card_id", ) assert_matches_type(Card, card, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.cards.with_raw_response.retrieve( - "string", + "card_id", ) assert response.is_closed is True @@ -325,7 +325,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.cards.with_streaming_response.retrieve( - "string", + "card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -345,14 +345,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(Card, card, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", billing_address={ "city": "x", "line1": "x", @@ -362,11 +362,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) }, description="New description", digital_wallet={ - "digital_card_profile_id": "string", + "digital_card_profile_id": "digital_card_profile_id", "email": "x", "phone": "x", }, - entity_id="string", + entity_id="entity_id", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -374,7 +374,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.cards.with_raw_response.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -385,7 +385,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.cards.with_streaming_response.update( - "string", + card_id="card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -399,7 +399,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): await async_client.cards.with_raw_response.update( - "", + card_id="", ) @parametrize @@ -410,14 +410,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -446,14 +446,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.retrieve_sensitive_details( - "string", + "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize async def test_raw_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: response = await async_client.cards.with_raw_response.retrieve_sensitive_details( - "string", + "card_id", ) assert response.is_closed is True @@ -464,7 +464,7 @@ async def test_raw_response_retrieve_sensitive_details(self, async_client: Async @parametrize async def test_streaming_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: async with async_client.cards.with_streaming_response.retrieve_sensitive_details( - "string", + "card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index 43d335b42..1ec22ea43 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -73,14 +73,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: check_deposit = client.check_deposits.retrieve( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.check_deposits.with_raw_response.retrieve( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -91,7 +91,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.check_deposits.with_streaming_response.retrieve( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -116,14 +116,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: check_deposit = client.check_deposits.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -207,14 +207,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.check_deposits.retrieve( - "string", + "check_deposit_id", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_deposits.with_raw_response.retrieve( - "string", + "check_deposit_id", ) assert response.is_closed is True @@ -225,7 +225,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.check_deposits.with_streaming_response.retrieve( - "string", + "check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,14 +250,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.check_deposits.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 5fa07d0e2..efb753353 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -95,14 +95,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: check_transfer = client.check_transfers.retrieve( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.retrieve( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -113,7 +113,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.retrieve( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -138,14 +138,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -174,14 +174,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: check_transfer = client.check_transfers.approve( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.approve( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -192,7 +192,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.approve( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -212,14 +212,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: check_transfer = client.check_transfers.cancel( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.cancel( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -230,7 +230,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.cancel( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -251,7 +251,7 @@ def test_path_params_cancel(self, client: Increase) -> None: @parametrize def test_method_stop_payment(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -259,7 +259,7 @@ def test_method_stop_payment(self, client: Increase) -> None: @parametrize def test_method_stop_payment_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", reason="mail_delivery_failed", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -268,7 +268,7 @@ def test_method_stop_payment_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_stop_payment(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -280,7 +280,7 @@ def test_raw_response_stop_payment(self, client: Increase) -> None: @parametrize def test_streaming_response_stop_payment(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -295,7 +295,7 @@ def test_streaming_response_stop_payment(self, client: Increase) -> None: def test_path_params_stop_payment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): client.check_transfers.with_raw_response.stop_payment( - "", + check_transfer_id="", ) @@ -376,14 +376,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.retrieve( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.retrieve( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -394,7 +394,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.retrieve( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -419,14 +419,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -455,14 +455,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.approve( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.approve( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -473,7 +473,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.approve( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -493,14 +493,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.cancel( - "string", + "check_transfer_id", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.cancel( - "string", + "check_transfer_id", ) assert response.is_closed is True @@ -511,7 +511,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.cancel( - "string", + "check_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -532,7 +532,7 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -540,7 +540,7 @@ async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", reason="mail_delivery_failed", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -549,7 +549,7 @@ async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncr @parametrize async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -561,7 +561,7 @@ async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> N @parametrize async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.stop_payment( - "string", + check_transfer_id="check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -576,5 +576,5 @@ async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease async def test_path_params_stop_payment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): await async_client.check_transfers.with_raw_response.stop_payment( - "", + check_transfer_id="", ) diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index be25b92b2..91eb1f8e4 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -22,14 +22,14 @@ class TestDeclinedTransactions: @parametrize def test_method_retrieve(self, client: Increase) -> None: declined_transaction = client.declined_transactions.retrieve( - "string", + "declined_transaction_id", ) assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.declined_transactions.with_raw_response.retrieve( - "string", + "declined_transaction_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.declined_transactions.with_streaming_response.retrieve( - "string", + "declined_transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: declined_transaction = client.declined_transactions.list( - account_id="string", + account_id="account_id", category={"in": ["ach_decline", "card_decline", "check_decline"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -75,9 +75,9 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", + route_id="route_id", ) assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @@ -108,14 +108,14 @@ class TestAsyncDeclinedTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.retrieve( - "string", + "declined_transaction_id", ) assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.declined_transactions.with_raw_response.retrieve( - "string", + "declined_transaction_id", ) assert response.is_closed is True @@ -126,7 +126,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.declined_transactions.with_streaming_response.retrieve( - "string", + "declined_transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -153,7 +153,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.list( - account_id="string", + account_id="account_id", category={"in": ["ach_decline", "card_decline", "check_decline"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -161,9 +161,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", + route_id="route_id", ) assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index cc1861299..d1e2e7e37 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.retrieve( - "string", + "digital_card_profile_id", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.digital_card_profiles.with_raw_response.retrieve( - "string", + "digital_card_profile_id", ) assert response.is_closed is True @@ -103,7 +103,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.digital_card_profiles.with_streaming_response.retrieve( - "string", + "digital_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -130,7 +130,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending", "rejected", "active"]}, @@ -160,14 +160,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.archive( - "string", + "digital_card_profile_id", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.digital_card_profiles.with_raw_response.archive( - "string", + "digital_card_profile_id", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.digital_card_profiles.with_streaming_response.archive( - "string", + "digital_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -200,20 +200,20 @@ def test_path_params_archive(self, client: Increase) -> None: @parametrize def test_method_clone(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize def test_method_clone_with_all_params(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.clone( - "string", - app_icon_file_id="string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", + app_icon_file_id="app_icon_file_id", background_image_file_id="file_1ai913suu1zfn1pdetru", card_description="x", contact_email="x", contact_phone="x", - contact_website="string", + contact_website="contact_website", description="x", issuer_name="x", text_color={ @@ -227,7 +227,7 @@ def test_method_clone_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_clone(self, client: Increase) -> None: response = client.digital_card_profiles.with_raw_response.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -238,7 +238,7 @@ def test_raw_response_clone(self, client: Increase) -> None: @parametrize def test_streaming_response_clone(self, client: Increase) -> None: with client.digital_card_profiles.with_streaming_response.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,7 +254,7 @@ def test_path_params_clone(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `digital_card_profile_id` but received ''" ): client.digital_card_profiles.with_raw_response.clone( - "", + digital_card_profile_id="", ) @@ -326,14 +326,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.retrieve( - "string", + "digital_card_profile_id", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_card_profiles.with_raw_response.retrieve( - "string", + "digital_card_profile_id", ) assert response.is_closed is True @@ -344,7 +344,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.digital_card_profiles.with_streaming_response.retrieve( - "string", + "digital_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -371,7 +371,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending", "rejected", "active"]}, @@ -401,14 +401,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.archive( - "string", + "digital_card_profile_id", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_card_profiles.with_raw_response.archive( - "string", + "digital_card_profile_id", ) assert response.is_closed is True @@ -419,7 +419,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.digital_card_profiles.with_streaming_response.archive( - "string", + "digital_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -441,20 +441,20 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_clone(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.clone( - "string", - app_icon_file_id="string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", + app_icon_file_id="app_icon_file_id", background_image_file_id="file_1ai913suu1zfn1pdetru", card_description="x", contact_email="x", contact_phone="x", - contact_website="string", + contact_website="contact_website", description="x", issuer_name="x", text_color={ @@ -468,7 +468,7 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) - @parametrize async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_card_profiles.with_raw_response.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -479,7 +479,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_clone(self, async_client: AsyncIncrease) -> None: async with async_client.digital_card_profiles.with_streaming_response.clone( - "string", + digital_card_profile_id="digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -495,5 +495,5 @@ async def test_path_params_clone(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `digital_card_profile_id` but received ''" ): await async_client.digital_card_profiles.with_raw_response.clone( - "", + digital_card_profile_id="", ) diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index aefac4490..13d3eb9e8 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -22,14 +22,14 @@ class TestDigitalWalletTokens: @parametrize def test_method_retrieve(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.retrieve( - "string", + "digital_wallet_token_id", ) assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.digital_wallet_tokens.with_raw_response.retrieve( - "string", + "digital_wallet_token_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.digital_wallet_tokens.with_streaming_response.retrieve( - "string", + "digital_wallet_token_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,14 +67,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.list( - card_id="string", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @@ -106,14 +106,14 @@ class TestAsyncDigitalWalletTokens: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: digital_wallet_token = await async_client.digital_wallet_tokens.retrieve( - "string", + "digital_wallet_token_id", ) assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_wallet_tokens.with_raw_response.retrieve( - "string", + "digital_wallet_token_id", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.digital_wallet_tokens.with_streaming_response.retrieve( - "string", + "digital_wallet_token_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -151,14 +151,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: digital_wallet_token = await async_client.digital_wallet_tokens.list( - card_id="string", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index f7f67b6d0..d8eedd34e 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -22,14 +22,14 @@ class TestDocuments: @parametrize def test_method_retrieve(self, client: Increase) -> None: document = client.documents.retrieve( - "string", + "document_id", ) assert_matches_type(Document, document, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.documents.with_raw_response.retrieve( - "string", + "document_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.documents.with_streaming_response.retrieve( - "string", + "document_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -72,8 +72,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", limit=1, ) assert_matches_type(SyncPage[Document], document, path=["response"]) @@ -105,14 +105,14 @@ class TestAsyncDocuments: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.retrieve( - "string", + "document_id", ) assert_matches_type(Document, document, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.documents.with_raw_response.retrieve( - "string", + "document_id", ) assert response.is_closed is True @@ -123,7 +123,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.documents.with_streaming_response.retrieve( - "string", + "document_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,8 +155,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - entity_id="string", + cursor="cursor", + entity_id="entity_id", limit=1, ) assert_matches_type(AsyncPage[Document], document, path=["response"]) diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index ed795a9a3..05589eafa 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -55,24 +55,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("1970-01-31"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "078051120", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "Ian Crease", @@ -99,7 +99,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "category": "municipality", "name": "x", "tax_identifier": "x", - "website": "string", + "website": "website", }, joint={ "individuals": [ @@ -115,24 +115,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -149,24 +149,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -183,24 +183,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -220,24 +220,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -252,7 +252,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "zip": "x", }, "category": "revocable", - "formation_document_file_id": "string", + "formation_document_file_id": "formation_document_file_id", "formation_state": "x", "grantor": { "address": { @@ -266,24 +266,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -304,24 +304,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -341,24 +341,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -378,24 +378,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -434,14 +434,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: entity = client.entities.retrieve( - "string", + "entity_id", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.entities.with_raw_response.retrieve( - "string", + "entity_id", ) assert response.is_closed is True @@ -452,7 +452,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.entities.with_streaming_response.retrieve( - "string", + "entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -483,7 +483,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["active", "archived", "disabled"]}, @@ -513,14 +513,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: entity = client.entities.archive( - "string", + "entity_id", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.entities.with_raw_response.archive( - "string", + "entity_id", ) assert response.is_closed is True @@ -531,7 +531,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.entities.with_streaming_response.archive( - "string", + "entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -551,14 +551,14 @@ def test_path_params_archive(self, client: Increase) -> None: @parametrize def test_method_confirm(self, client: Increase) -> None: entity = client.entities.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_method_confirm_with_all_params(self, client: Increase) -> None: entity = client.entities.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(Entity, entity, path=["response"]) @@ -566,7 +566,7 @@ def test_method_confirm_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_confirm(self, client: Increase) -> None: response = client.entities.with_raw_response.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -577,7 +577,7 @@ def test_raw_response_confirm(self, client: Increase) -> None: @parametrize def test_streaming_response_confirm(self, client: Increase) -> None: with client.entities.with_streaming_response.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -591,13 +591,13 @@ def test_streaming_response_confirm(self, client: Increase) -> None: def test_path_params_confirm(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): client.entities.with_raw_response.confirm( - "", + entity_id="", ) @parametrize def test_method_update_address(self, client: Increase) -> None: entity = client.entities.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -610,7 +610,7 @@ def test_method_update_address(self, client: Increase) -> None: @parametrize def test_method_update_address_with_all_params(self, client: Increase) -> None: entity = client.entities.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -624,7 +624,7 @@ def test_method_update_address_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update_address(self, client: Increase) -> None: response = client.entities.with_raw_response.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -641,7 +641,7 @@ def test_raw_response_update_address(self, client: Increase) -> None: @parametrize def test_streaming_response_update_address(self, client: Increase) -> None: with client.entities.with_streaming_response.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -661,7 +661,7 @@ def test_streaming_response_update_address(self, client: Increase) -> None: def test_path_params_update_address(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): client.entities.with_raw_response.update_address( - "", + entity_id="", address={ "city": "New York", "line1": "33 Liberty Street", @@ -708,24 +708,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("1970-01-31"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "078051120", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "Ian Crease", @@ -752,7 +752,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "category": "municipality", "name": "x", "tax_identifier": "x", - "website": "string", + "website": "website", }, joint={ "individuals": [ @@ -768,24 +768,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -802,24 +802,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -836,24 +836,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -873,24 +873,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -905,7 +905,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "zip": "x", }, "category": "revocable", - "formation_document_file_id": "string", + "formation_document_file_id": "formation_document_file_id", "formation_state": "x", "grantor": { "address": { @@ -919,24 +919,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -957,24 +957,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -994,24 +994,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -1031,24 +1031,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "date_of_birth": parse_date("2019-12-27"), "identification": { "drivers_license": { - "back_file_id": "string", + "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", "state": "x", }, "method": "social_security_number", "number": "xxxx", "other": { - "back_file_id": "string", + "back_file_id": "back_file_id", "country": "x", "description": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, "passport": { "country": "x", "expiration_date": parse_date("2019-12-27"), - "file_id": "string", + "file_id": "file_id", }, }, "name": "x", @@ -1087,14 +1087,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.retrieve( - "string", + "entity_id", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.retrieve( - "string", + "entity_id", ) assert response.is_closed is True @@ -1105,7 +1105,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.retrieve( - "string", + "entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1136,7 +1136,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["active", "archived", "disabled"]}, @@ -1166,14 +1166,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.archive( - "string", + "entity_id", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.archive( - "string", + "entity_id", ) assert response.is_closed is True @@ -1184,7 +1184,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.archive( - "string", + "entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1204,14 +1204,14 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_confirm(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_method_confirm_with_all_params(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), ) assert_matches_type(Entity, entity, path=["response"]) @@ -1219,7 +1219,7 @@ async def test_method_confirm_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -1230,7 +1230,7 @@ async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_confirm(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.confirm( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1244,13 +1244,13 @@ async def test_streaming_response_confirm(self, async_client: AsyncIncrease) -> async def test_path_params_confirm(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): await async_client.entities.with_raw_response.confirm( - "", + entity_id="", ) @parametrize async def test_method_update_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -1263,7 +1263,7 @@ async def test_method_update_address(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -1277,7 +1277,7 @@ async def test_method_update_address_with_all_params(self, async_client: AsyncIn @parametrize async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -1294,7 +1294,7 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> @parametrize async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.update_address( - "string", + entity_id="entity_n8y8tnk2p9339ti393yi", address={ "city": "New York", "line1": "33 Liberty Street", @@ -1314,7 +1314,7 @@ async def test_streaming_response_update_address(self, async_client: AsyncIncrea async def test_path_params_update_address(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): await async_client.entities.with_raw_response.update_address( - "", + entity_id="", address={ "city": "New York", "line1": "33 Liberty Street", diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 9eb61f1e2..1106f1fdf 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.create( url="https://website.com/webhooks", - oauth_connection_id="string", + oauth_connection_id="oauth_connection_id", selected_event_category="account.created", shared_secret="x", ) @@ -64,14 +64,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: event_subscription = client.event_subscriptions.retrieve( - "string", + "event_subscription_id", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.event_subscriptions.with_raw_response.retrieve( - "string", + "event_subscription_id", ) assert response.is_closed is True @@ -82,7 +82,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.event_subscriptions.with_streaming_response.retrieve( - "string", + "event_subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,14 +102,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: event_subscription = client.event_subscriptions.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", status="active", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @@ -117,7 +117,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.event_subscriptions.with_raw_response.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert response.is_closed is True @@ -128,7 +128,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.event_subscriptions.with_streaming_response.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -142,7 +142,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_subscription_id` but received ''"): client.event_subscriptions.with_raw_response.update( - "", + event_subscription_id="", ) @parametrize @@ -153,7 +153,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -194,7 +194,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.create( url="https://website.com/webhooks", - oauth_connection_id="string", + oauth_connection_id="oauth_connection_id", selected_event_category="account.created", shared_secret="x", ) @@ -227,14 +227,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.retrieve( - "string", + "event_subscription_id", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.event_subscriptions.with_raw_response.retrieve( - "string", + "event_subscription_id", ) assert response.is_closed is True @@ -245,7 +245,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.event_subscriptions.with_streaming_response.retrieve( - "string", + "event_subscription_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -265,14 +265,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", status="active", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @@ -280,7 +280,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.event_subscriptions.with_raw_response.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert response.is_closed is True @@ -291,7 +291,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.event_subscriptions.with_streaming_response.update( - "string", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -305,7 +305,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `event_subscription_id` but received ''"): await async_client.event_subscriptions.with_raw_response.update( - "", + event_subscription_id="", ) @parametrize @@ -316,7 +316,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 619b5e2d6..4a4ffb2e0 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -22,14 +22,14 @@ class TestEvents: @parametrize def test_method_retrieve(self, client: Increase) -> None: event = client.events.retrieve( - "string", + "event_id", ) assert_matches_type(Event, event, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.events.with_raw_response.retrieve( - "string", + "event_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.events.with_streaming_response.retrieve( - "string", + "event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: event = client.events.list( - associated_object_id="string", + associated_object_id="associated_object_id", category={"in": ["account.created", "account.updated", "account_number.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -73,7 +73,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Event], event, path=["response"]) @@ -105,14 +105,14 @@ class TestAsyncEvents: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: event = await async_client.events.retrieve( - "string", + "event_id", ) assert_matches_type(Event, event, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.events.with_raw_response.retrieve( - "string", + "event_id", ) assert response.is_closed is True @@ -123,7 +123,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.events.with_streaming_response.retrieve( - "string", + "event_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,7 +148,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: event = await async_client.events.list( - associated_object_id="string", + associated_object_id="associated_object_id", category={"in": ["account.created", "account.updated", "account_number.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -156,7 +156,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Event], event, path=["response"]) diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 595f2f441..c51bc3931 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -31,7 +31,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: export = client.exports.create( category="transaction_csv", account_statement_ofx={ - "account_id": "string", + "account_id": "account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, balance_csv={ - "account_id": "string", + "account_id": "account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -49,7 +49,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, bookkeeping_account_balance_csv={ - "bookkeeping_account_id": "string", + "bookkeeping_account_id": "bookkeeping_account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -98,14 +98,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: export = client.exports.retrieve( - "string", + "export_id", ) assert_matches_type(Export, export, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.exports.with_raw_response.retrieve( - "string", + "export_id", ) assert response.is_closed is True @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.exports.with_streaming_response.retrieve( - "string", + "export_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,7 +148,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending", "complete", "failed"]}, @@ -191,7 +191,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) export = await async_client.exports.create( category="transaction_csv", account_statement_ofx={ - "account_id": "string", + "account_id": "account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -200,7 +200,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, balance_csv={ - "account_id": "string", + "account_id": "account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -209,7 +209,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, bookkeeping_account_balance_csv={ - "bookkeeping_account_id": "string", + "bookkeeping_account_id": "bookkeeping_account_id", "created_at": { "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -258,14 +258,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.retrieve( - "string", + "export_id", ) assert_matches_type(Export, export, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.exports.with_raw_response.retrieve( - "string", + "export_id", ) assert response.is_closed is True @@ -276,7 +276,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.exports.with_streaming_response.retrieve( - "string", + "export_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -308,7 +308,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending", "complete", "failed"]}, diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 9a7b7e476..8a7d82b66 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -71,14 +71,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: external_account = client.external_accounts.retrieve( - "string", + "external_account_id", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.external_accounts.with_raw_response.retrieve( - "string", + "external_account_id", ) assert response.is_closed is True @@ -89,7 +89,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.external_accounts.with_streaming_response.retrieve( - "string", + "external_account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -109,14 +109,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: external_account = client.external_accounts.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: external_account = client.external_accounts.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", account_holder="business", description="New description", funding="checking", @@ -127,7 +127,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.external_accounts.with_raw_response.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) assert response.is_closed is True @@ -138,7 +138,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.external_accounts.with_streaming_response.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -152,7 +152,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_account_id` but received ''"): client.external_accounts.with_raw_response.update( - "", + external_account_id="", ) @parametrize @@ -163,7 +163,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: external_account = client.external_accounts.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, routing_number="xxxxxxxxx", @@ -246,14 +246,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.retrieve( - "string", + "external_account_id", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.external_accounts.with_raw_response.retrieve( - "string", + "external_account_id", ) assert response.is_closed is True @@ -264,7 +264,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.external_accounts.with_streaming_response.retrieve( - "string", + "external_account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -284,14 +284,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", account_holder="business", description="New description", funding="checking", @@ -302,7 +302,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.external_accounts.with_raw_response.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) assert response.is_closed is True @@ -313,7 +313,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.external_accounts.with_streaming_response.update( - "string", + external_account_id="external_account_ukk55lr923a3ac0pp7iv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -327,7 +327,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `external_account_id` but received ''"): await async_client.external_accounts.with_raw_response.update( - "", + external_account_id="", ) @parametrize @@ -338,7 +338,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, routing_number="xxxxxxxxx", diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 4b551e15a..44d842d97 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -65,14 +65,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: file = client.files.retrieve( - "string", + "file_id", ) assert_matches_type(File, file, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.files.with_raw_response.retrieve( - "string", + "file_id", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.files.with_streaming_response.retrieve( - "string", + "file_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -114,7 +114,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, @@ -191,14 +191,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: file = await async_client.files.retrieve( - "string", + "file_id", ) assert_matches_type(File, file, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.files.with_raw_response.retrieve( - "string", + "file_id", ) assert response.is_closed is True @@ -209,7 +209,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.files.with_streaming_response.retrieve( - "string", + "file_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,7 +240,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index b774a19ee..d82fcb32d 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -24,14 +24,14 @@ class TestInboundACHTransfers: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.retrieve( - "string", + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.retrieve( - "string", + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -42,7 +42,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.retrieve( - "string", + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -69,15 +69,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.list( - account_id="string", - account_number_id="string", + account_id="account_id", + account_number_id="account_number_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, status="pending", ) @@ -106,14 +106,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_decline(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.decline( - "string", + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_decline(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.decline( - "string", + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -124,7 +124,7 @@ def test_raw_response_decline(self, client: Increase) -> None: @parametrize def test_streaming_response_decline(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.decline( - "string", + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,14 +146,14 @@ def test_path_params_decline(self, client: Increase) -> None: @parametrize def test_method_notification_of_change(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize def test_method_notification_of_change_with_all_params(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", updated_account_number="987654321", updated_routing_number="101050001", ) @@ -162,7 +162,7 @@ def test_method_notification_of_change_with_all_params(self, client: Increase) - @parametrize def test_raw_response_notification_of_change(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -173,7 +173,7 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: @parametrize def test_streaming_response_notification_of_change(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,13 +189,13 @@ def test_path_params_notification_of_change(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): client.inbound_ach_transfers.with_raw_response.notification_of_change( - "", + inbound_ach_transfer_id="", ) @parametrize def test_method_transfer_return(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -203,7 +203,7 @@ def test_method_transfer_return(self, client: Increase) -> None: @parametrize def test_raw_response_transfer_return(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) @@ -215,7 +215,7 @@ def test_raw_response_transfer_return(self, client: Increase) -> None: @parametrize def test_streaming_response_transfer_return(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) as response: assert not response.is_closed @@ -232,7 +232,7 @@ def test_path_params_transfer_return(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): client.inbound_ach_transfers.with_raw_response.transfer_return( - "", + inbound_ach_transfer_id="", reason="payment_stopped", ) @@ -243,14 +243,14 @@ class TestAsyncInboundACHTransfers: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.retrieve( - "string", + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.retrieve( - "string", + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -261,7 +261,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.retrieve( - "string", + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -288,15 +288,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.list( - account_id="string", - account_number_id="string", + account_id="account_id", + account_number_id="account_number_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, status="pending", ) @@ -325,14 +325,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_decline(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( - "string", + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.decline( - "string", + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -343,7 +343,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.decline( - "string", + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -365,14 +365,14 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize async def test_method_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", updated_account_number="987654321", updated_routing_number="101050001", ) @@ -381,7 +381,7 @@ async def test_method_notification_of_change_with_all_params(self, async_client: @parametrize async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -392,7 +392,7 @@ async def test_raw_response_notification_of_change(self, async_client: AsyncIncr @parametrize async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.notification_of_change( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -408,13 +408,13 @@ async def test_path_params_notification_of_change(self, async_client: AsyncIncre ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - "", + inbound_ach_transfer_id="", ) @parametrize async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -422,7 +422,7 @@ async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None @parametrize async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) @@ -434,7 +434,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - @parametrize async def test_streaming_response_transfer_return(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.transfer_return( - "string", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", reason="payment_stopped", ) as response: assert not response.is_closed @@ -451,6 +451,6 @@ async def test_path_params_transfer_return(self, async_client: AsyncIncrease) -> ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): await async_client.inbound_ach_transfers.with_raw_response.transfer_return( - "", + inbound_ach_transfer_id="", reason="payment_stopped", ) diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index d60cb59fd..c723a8457 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -22,14 +22,14 @@ class TestInboundCheckDeposits: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.retrieve( - "string", + "inbound_check_deposit_id", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_check_deposits.with_raw_response.retrieve( - "string", + "inbound_check_deposit_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_check_deposits.with_streaming_response.retrieve( - "string", + "inbound_check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,15 +67,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.list( - account_id="string", - check_transfer_id="string", + account_id="account_id", + check_transfer_id="check_transfer_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @@ -103,14 +103,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_decline(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.decline( - "string", + "inbound_check_deposit_id", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_decline(self, client: Increase) -> None: response = client.inbound_check_deposits.with_raw_response.decline( - "string", + "inbound_check_deposit_id", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_raw_response_decline(self, client: Increase) -> None: @parametrize def test_streaming_response_decline(self, client: Increase) -> None: with client.inbound_check_deposits.with_streaming_response.decline( - "string", + "inbound_check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -147,14 +147,14 @@ class TestAsyncInboundCheckDeposits: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.retrieve( - "string", + "inbound_check_deposit_id", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_check_deposits.with_raw_response.retrieve( - "string", + "inbound_check_deposit_id", ) assert response.is_closed is True @@ -165,7 +165,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_check_deposits.with_streaming_response.retrieve( - "string", + "inbound_check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -192,15 +192,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.list( - account_id="string", - check_transfer_id="string", + account_id="account_id", + check_transfer_id="check_transfer_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @@ -228,14 +228,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_decline(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.decline( - "string", + "inbound_check_deposit_id", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_check_deposits.with_raw_response.decline( - "string", + "inbound_check_deposit_id", ) assert response.is_closed is True @@ -246,7 +246,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_check_deposits.with_streaming_response.decline( - "string", + "inbound_check_deposit_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 4723a67a1..37b399b81 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -22,14 +22,14 @@ class TestInboundMailItems: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_mail_item = client.inbound_mail_items.retrieve( - "string", + "inbound_mail_item_id", ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_mail_items.with_raw_response.retrieve( - "string", + "inbound_mail_item_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_mail_items.with_streaming_response.retrieve( - "string", + "inbound_mail_item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -71,9 +71,9 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - lockbox_id="string", + lockbox_id="lockbox_id", ) assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @@ -104,14 +104,14 @@ class TestAsyncInboundMailItems: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_mail_item = await async_client.inbound_mail_items.retrieve( - "string", + "inbound_mail_item_id", ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_mail_items.with_raw_response.retrieve( - "string", + "inbound_mail_item_id", ) assert response.is_closed is True @@ -122,7 +122,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_mail_items.with_streaming_response.retrieve( - "string", + "inbound_mail_item_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -153,9 +153,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - lockbox_id="string", + lockbox_id="lockbox_id", ) assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 9e642f50a..48ec873d2 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -21,14 +21,14 @@ class TestInboundWireDrawdownRequests: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_wire_drawdown_request = client.inbound_wire_drawdown_requests.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_wire_drawdown_requests.with_raw_response.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_wire_drawdown_requests.with_streaming_response.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,7 +66,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: inbound_wire_drawdown_request = client.inbound_wire_drawdown_requests.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @@ -98,14 +98,14 @@ class TestAsyncInboundWireDrawdownRequests: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.inbound_wire_drawdown_requests.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_wire_drawdown_requests.with_raw_response.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) assert response.is_closed is True @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_wire_drawdown_requests.with_streaming_response.retrieve( - "string", + "inbound_wire_drawdown_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,7 +143,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.inbound_wire_drawdown_requests.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 30427a1ee..99f2454cc 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -22,14 +22,14 @@ class TestInboundWireTransfers: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_wire_transfer = client.inbound_wire_transfers.retrieve( - "string", + "inbound_wire_transfer_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_wire_transfers.with_raw_response.retrieve( - "string", + "inbound_wire_transfer_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_wire_transfers.with_streaming_response.retrieve( - "string", + "inbound_wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,15 +67,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: inbound_wire_transfer = client.inbound_wire_transfers.list( - account_id="string", - account_number_id="string", + account_id="account_id", + account_number_id="account_number_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, status="pending", ) @@ -108,14 +108,14 @@ class TestAsyncInboundWireTransfers: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_wire_transfer = await async_client.inbound_wire_transfers.retrieve( - "string", + "inbound_wire_transfer_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_wire_transfers.with_raw_response.retrieve( - "string", + "inbound_wire_transfer_id", ) assert response.is_closed is True @@ -126,7 +126,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_wire_transfers.with_streaming_response.retrieve( - "string", + "inbound_wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -153,15 +153,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_wire_transfer = await async_client.inbound_wire_transfers.list( - account_id="string", - account_number_id="string", + account_id="account_id", + account_number_id="account_number_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, status="pending", ) diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index e4a1c1f69..f2080a6f8 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -61,14 +61,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: lockbox = client.lockboxes.retrieve( - "string", + "lockbox_id", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.lockboxes.with_raw_response.retrieve( - "string", + "lockbox_id", ) assert response.is_closed is True @@ -79,7 +79,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.lockboxes.with_streaming_response.retrieve( - "string", + "lockbox_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,14 +99,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: lockbox = client.lockboxes.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: lockbox = client.lockboxes.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", status="inactive", ) @@ -115,7 +115,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.lockboxes.with_raw_response.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) assert response.is_closed is True @@ -126,7 +126,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.lockboxes.with_streaming_response.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,7 +140,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): client.lockboxes.with_raw_response.update( - "", + lockbox_id="", ) @parametrize @@ -151,14 +151,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: lockbox = client.lockboxes.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -230,14 +230,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.retrieve( - "string", + "lockbox_id", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.lockboxes.with_raw_response.retrieve( - "string", + "lockbox_id", ) assert response.is_closed is True @@ -248,7 +248,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.lockboxes.with_streaming_response.retrieve( - "string", + "lockbox_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -268,14 +268,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", status="inactive", ) @@ -284,7 +284,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.lockboxes.with_raw_response.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) assert response.is_closed is True @@ -295,7 +295,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.lockboxes.with_streaming_response.update( - "string", + lockbox_id="lockbox_3xt21ok13q19advds4t5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -309,7 +309,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `lockbox_id` but received ''"): await async_client.lockboxes.with_raw_response.update( - "", + lockbox_id="", ) @parametrize @@ -320,14 +320,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 8e798164d..2de34e5ea 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -21,14 +21,14 @@ class TestOAuthConnections: @parametrize def test_method_retrieve(self, client: Increase) -> None: oauth_connection = client.oauth_connections.retrieve( - "string", + "oauth_connection_id", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.oauth_connections.with_raw_response.retrieve( - "string", + "oauth_connection_id", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.oauth_connections.with_streaming_response.retrieve( - "string", + "oauth_connection_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list( - cursor="string", + cursor="cursor", limit=1, status={"in": ["active", "inactive"]}, ) @@ -97,14 +97,14 @@ class TestAsyncOAuthConnections: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.retrieve( - "string", + "oauth_connection_id", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.oauth_connections.with_raw_response.retrieve( - "string", + "oauth_connection_id", ) assert response.is_closed is True @@ -115,7 +115,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.oauth_connections.with_streaming_response.retrieve( - "string", + "oauth_connection_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,7 +140,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.list( - cursor="string", + cursor="cursor", limit=1, status={"in": ["active", "inactive"]}, ) diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 39f895c98..ee91ef1e2 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -22,14 +22,14 @@ class TestPendingTransactions: @parametrize def test_method_retrieve(self, client: Increase) -> None: pending_transaction = client.pending_transactions.retrieve( - "string", + "pending_transaction_id", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.pending_transactions.with_raw_response.retrieve( - "string", + "pending_transaction_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.pending_transactions.with_streaming_response.retrieve( - "string", + "pending_transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -67,7 +67,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: pending_transaction = client.pending_transactions.list( - account_id="string", + account_id="account_id", category={"in": ["account_transfer_instruction", "ach_transfer_instruction", "card_authorization"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -75,10 +75,10 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", - source_id="string", + route_id="route_id", + source_id="source_id", status={"in": ["pending", "complete"]}, ) assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @@ -110,14 +110,14 @@ class TestAsyncPendingTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.retrieve( - "string", + "pending_transaction_id", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.pending_transactions.with_raw_response.retrieve( - "string", + "pending_transaction_id", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.pending_transactions.with_streaming_response.retrieve( - "string", + "pending_transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,7 +155,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.list( - account_id="string", + account_id="account_id", category={"in": ["account_transfer_instruction", "ach_transfer_instruction", "card_authorization"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -163,10 +163,10 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", - source_id="string", + route_id="route_id", + source_id="source_id", status={"in": ["pending", "complete"]}, ) assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 81461ff7a..8208a1991 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -63,14 +63,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.retrieve( - "string", + "physical_card_profile_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.retrieve( - "string", + "physical_card_profile_id", ) assert response.is_closed is True @@ -81,7 +81,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.physical_card_profiles.with_streaming_response.retrieve( - "string", + "physical_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,7 +108,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_creating", "pending_reviewing", "rejected"]}, @@ -138,14 +138,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.archive( - "string", + "physical_card_profile_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.archive( - "string", + "physical_card_profile_id", ) assert response.is_closed is True @@ -156,7 +156,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.physical_card_profiles.with_streaming_response.archive( - "string", + "physical_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,15 +178,15 @@ def test_path_params_archive(self, client: Increase) -> None: @parametrize def test_method_clone(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize def test_method_clone_with_all_params(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.clone( - "string", - carrier_image_file_id="string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", + carrier_image_file_id="carrier_image_file_id", contact_phone="x", description="x", front_image_file_id="file_o6aex13wm1jcc36sgcj1", @@ -200,7 +200,7 @@ def test_method_clone_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_clone(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -211,7 +211,7 @@ def test_raw_response_clone(self, client: Increase) -> None: @parametrize def test_streaming_response_clone(self, client: Increase) -> None: with client.physical_card_profiles.with_streaming_response.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -227,7 +227,7 @@ def test_path_params_clone(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `physical_card_profile_id` but received ''" ): client.physical_card_profiles.with_raw_response.clone( - "", + physical_card_profile_id="", ) @@ -277,14 +277,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.retrieve( - "string", + "physical_card_profile_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.retrieve( - "string", + "physical_card_profile_id", ) assert response.is_closed is True @@ -295,7 +295,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.physical_card_profiles.with_streaming_response.retrieve( - "string", + "physical_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -322,7 +322,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_creating", "pending_reviewing", "rejected"]}, @@ -352,14 +352,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.archive( - "string", + "physical_card_profile_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.archive( - "string", + "physical_card_profile_id", ) assert response.is_closed is True @@ -370,7 +370,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.physical_card_profiles.with_streaming_response.archive( - "string", + "physical_card_profile_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -392,15 +392,15 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_clone(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.clone( - "string", - carrier_image_file_id="string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", + carrier_image_file_id="carrier_image_file_id", contact_phone="x", description="x", front_image_file_id="file_o6aex13wm1jcc36sgcj1", @@ -414,7 +414,7 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) - @parametrize async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -425,7 +425,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_clone(self, async_client: AsyncIncrease) -> None: async with async_client.physical_card_profiles.with_streaming_response.clone( - "string", + physical_card_profile_id="physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -441,5 +441,5 @@ async def test_path_params_clone(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `physical_card_profile_id` but received ''" ): await async_client.physical_card_profiles.with_raw_response.clone( - "", + physical_card_profile_id="", ) diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 57ed78e97..fd97f23b7 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -63,7 +63,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, "method": "usps", }, - physical_card_profile_id="string", + physical_card_profile_id="physical_card_profile_id", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -122,14 +122,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: physical_card = client.physical_cards.retrieve( - "string", + "physical_card_id", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.physical_cards.with_raw_response.retrieve( - "string", + "physical_card_id", ) assert response.is_closed is True @@ -140,7 +140,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.physical_cards.with_streaming_response.retrieve( - "string", + "physical_card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,7 +160,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: physical_card = client.physical_cards.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -168,7 +168,7 @@ def test_method_update(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.physical_cards.with_raw_response.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) @@ -180,7 +180,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.physical_cards.with_streaming_response.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) as response: assert not response.is_closed @@ -195,7 +195,7 @@ def test_streaming_response_update(self, client: Increase) -> None: def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.physical_cards.with_raw_response.update( - "", + physical_card_id="", status="disabled", ) @@ -207,14 +207,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: physical_card = client.physical_cards.list( - card_id="string", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -286,7 +286,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, "method": "usps", }, - physical_card_profile_id="string", + physical_card_profile_id="physical_card_profile_id", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -345,14 +345,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.retrieve( - "string", + "physical_card_id", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_cards.with_raw_response.retrieve( - "string", + "physical_card_id", ) assert response.is_closed is True @@ -363,7 +363,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.physical_cards.with_streaming_response.retrieve( - "string", + "physical_card_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -383,7 +383,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -391,7 +391,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_cards.with_raw_response.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) @@ -403,7 +403,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.physical_cards.with_streaming_response.update( - "string", + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", status="disabled", ) as response: assert not response.is_closed @@ -418,7 +418,7 @@ async def test_streaming_response_update(self, async_client: AsyncIncrease) -> N async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.physical_cards.with_raw_response.update( - "", + physical_card_id="", status="disabled", ) @@ -430,14 +430,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.list( - card_id="string", + card_id="card_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index cff094a4a..92f6d417f 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -21,14 +21,14 @@ class TestPrograms: @parametrize def test_method_retrieve(self, client: Increase) -> None: program = client.programs.retrieve( - "string", + "program_id", ) assert_matches_type(Program, program, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.programs.with_raw_response.retrieve( - "string", + "program_id", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.programs.with_streaming_response.retrieve( - "string", + "program_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,7 +64,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: program = client.programs.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[Program], program, path=["response"]) @@ -96,14 +96,14 @@ class TestAsyncPrograms: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: program = await async_client.programs.retrieve( - "string", + "program_id", ) assert_matches_type(Program, program, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.programs.with_raw_response.retrieve( - "string", + "program_id", ) assert response.is_closed is True @@ -114,7 +114,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.programs.with_streaming_response.retrieve( - "string", + "program_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -139,7 +139,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: program = await async_client.programs.list( - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[Program], program, path=["response"]) diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index ca49929c7..edd1d1c1c 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -104,7 +104,7 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] @@ -113,7 +113,7 @@ def test_method_retrieve(self, client: Increase) -> None: @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) assert response.is_closed is True @@ -126,7 +126,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.proof_of_authorization_request_submissions.with_streaming_response.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,10 +160,10 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, - proof_of_authorization_request_id="string", + proof_of_authorization_request_id="proof_of_authorization_request_id", ) assert_matches_type( SyncPage[ProofOfAuthorizationRequestSubmission], @@ -291,7 +291,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: proof_of_authorization_request_submission = ( await async_client.proof_of_authorization_request_submissions.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) ) assert_matches_type( @@ -301,7 +301,7 @@ async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) assert response.is_closed is True @@ -314,7 +314,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.proof_of_authorization_request_submissions.with_streaming_response.retrieve( - "string", + "proof_of_authorization_request_submission_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -348,10 +348,10 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: proof_of_authorization_request_submission = await async_client.proof_of_authorization_request_submissions.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, - proof_of_authorization_request_id="string", + proof_of_authorization_request_id="proof_of_authorization_request_id", ) assert_matches_type( AsyncPage[ProofOfAuthorizationRequestSubmission], diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index e5ec2bdbb..3ea91f58e 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -22,14 +22,14 @@ class TestProofOfAuthorizationRequests: @parametrize def test_method_retrieve(self, client: Increase) -> None: proof_of_authorization_request = client.proof_of_authorization_requests.retrieve( - "string", + "proof_of_authorization_request_id", ) assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.proof_of_authorization_requests.with_raw_response.retrieve( - "string", + "proof_of_authorization_request_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.proof_of_authorization_requests.with_streaming_response.retrieve( - "string", + "proof_of_authorization_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -73,7 +73,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) @@ -107,14 +107,14 @@ class TestAsyncProofOfAuthorizationRequests: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: proof_of_authorization_request = await async_client.proof_of_authorization_requests.retrieve( - "string", + "proof_of_authorization_request_id", ) assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.proof_of_authorization_requests.with_raw_response.retrieve( - "string", + "proof_of_authorization_request_id", ) assert response.is_closed is True @@ -125,7 +125,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.proof_of_authorization_requests.with_streaming_response.retrieve( - "string", + "proof_of_authorization_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -158,7 +158,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 7a6ea901d..3fb14837f 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -20,14 +20,14 @@ class TestRealTimeDecisions: @parametrize def test_method_retrieve(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.retrieve( - "string", + "real_time_decision_id", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.real_time_decisions.with_raw_response.retrieve( - "string", + "real_time_decision_id", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.real_time_decisions.with_streaming_response.retrieve( - "string", + "real_time_decision_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -58,14 +58,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_action(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ @@ -81,7 +81,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_action(self, client: Increase) -> None: response = client.real_time_decisions.with_raw_response.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_action(self, client: Increase) -> None: @parametrize def test_streaming_response_action(self, client: Increase) -> None: with client.real_time_decisions.with_streaming_response.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,7 +106,7 @@ def test_streaming_response_action(self, client: Increase) -> None: def test_path_params_action(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `real_time_decision_id` but received ''"): client.real_time_decisions.with_raw_response.action( - "", + real_time_decision_id="", ) @@ -116,14 +116,14 @@ class TestAsyncRealTimeDecisions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: real_time_decision = await async_client.real_time_decisions.retrieve( - "string", + "real_time_decision_id", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_decisions.with_raw_response.retrieve( - "string", + "real_time_decision_id", ) assert response.is_closed is True @@ -134,7 +134,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_decisions.with_streaming_response.retrieve( - "string", + "real_time_decision_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -154,14 +154,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_action(self, async_client: AsyncIncrease) -> None: real_time_decision = await async_client.real_time_decisions.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: real_time_decision = await async_client.real_time_decisions.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ @@ -177,7 +177,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_decisions.with_raw_response.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) assert response.is_closed is True @@ -188,7 +188,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_decisions.with_streaming_response.action( - "string", + real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -202,5 +202,5 @@ async def test_streaming_response_action(self, async_client: AsyncIncrease) -> N async def test_path_params_action(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `real_time_decision_id` but received ''"): await async_client.real_time_decisions.with_raw_response.action( - "", + real_time_decision_id="", ) diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index 156bfa5c4..5d719a69c 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -88,7 +88,7 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.retrieve( - "string", + "request_for_payment_id", ) assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] @@ -97,7 +97,7 @@ def test_method_retrieve(self, client: Increase) -> None: @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "string", + "request_for_payment_id", ) assert response.is_closed is True @@ -110,7 +110,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.real_time_payments_request_for_payments.with_streaming_response.retrieve( - "string", + "request_for_payment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -141,14 +141,14 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) @@ -251,7 +251,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.retrieve( - "string", + "request_for_payment_id", ) assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] @@ -260,7 +260,7 @@ async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "string", + "request_for_payment_id", ) assert response.is_closed is True @@ -273,7 +273,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_payments_request_for_payments.with_streaming_response.retrieve( - "string", + "request_for_payment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -304,14 +304,14 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index e48d2c0a2..1e84a5648 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -41,7 +41,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: debtor_name="x", destination_account_number="987654321", destination_routing_number="101050001", - external_account_id="string", + external_account_id="external_account_id", require_approval=True, ultimate_creditor_name="x", ultimate_debtor_name="x", @@ -81,14 +81,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.retrieve( - "string", + "real_time_payments_transfer_id", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.real_time_payments_transfers.with_raw_response.retrieve( - "string", + "real_time_payments_transfer_id", ) assert response.is_closed is True @@ -99,7 +99,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.real_time_payments_transfers.with_streaming_response.retrieve( - "string", + "real_time_payments_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -126,15 +126,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) @@ -184,7 +184,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) debtor_name="x", destination_account_number="987654321", destination_routing_number="101050001", - external_account_id="string", + external_account_id="external_account_id", require_approval=True, ultimate_creditor_name="x", ultimate_debtor_name="x", @@ -224,14 +224,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.retrieve( - "string", + "real_time_payments_transfer_id", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_transfers.with_raw_response.retrieve( - "string", + "real_time_payments_transfer_id", ) assert response.is_closed is True @@ -242,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_payments_transfers.with_streaming_response.retrieve( - "string", + "real_time_payments_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -269,15 +269,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 2b73295fa..c0896e7cd 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -29,7 +29,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) @@ -73,7 +73,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", - cursor="string", + cursor="cursor", limit=1, ) assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py index c519f0130..0e4ff50ae 100644 --- a/tests/api_resources/test_simulations.py +++ b/tests/api_resources/test_simulations.py @@ -97,7 +97,7 @@ def test_method_card_increments_with_all_params(self, client: Increase) -> None: simulation = client.simulations.card_increments( amount=500, card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="string", + event_subscription_id="event_subscription_id", ) assert_matches_type(CardPayment, simulation, path=["response"]) @@ -248,7 +248,7 @@ async def test_method_card_increments_with_all_params(self, async_client: AsyncI simulation = await async_client.simulations.card_increments( amount=500, card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="string", + event_subscription_id="event_subscription_id", ) assert_matches_type(CardPayment, simulation, path=["response"]) diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 1c66c4a7a..2f1f3522e 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -22,14 +22,14 @@ class TestTransactions: @parametrize def test_method_retrieve(self, client: Increase) -> None: transaction = client.transactions.retrieve( - "string", + "transaction_id", ) assert_matches_type(Transaction, transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.transactions.with_raw_response.retrieve( - "string", + "transaction_id", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.transactions.with_streaming_response.retrieve( - "string", + "transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: transaction = client.transactions.list( - account_id="string", + account_id="account_id", category={"in": ["account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -73,9 +73,9 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", + route_id="route_id", ) assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) @@ -106,14 +106,14 @@ class TestAsyncTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.retrieve( - "string", + "transaction_id", ) assert_matches_type(Transaction, transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.transactions.with_raw_response.retrieve( - "string", + "transaction_id", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.transactions.with_streaming_response.retrieve( - "string", + "transaction_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -149,7 +149,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.list( - account_id="string", + account_id="account_id", category={"in": ["account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -157,9 +157,9 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", + cursor="cursor", limit=1, - route_id="string", + route_id="route_id", ) assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index b03363374..4ed4db948 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -90,14 +90,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.retrieve( - "string", + "wire_drawdown_request_id", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.retrieve( - "string", + "wire_drawdown_request_id", ) assert response.is_closed is True @@ -108,7 +108,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.retrieve( - "string", + "wire_drawdown_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -135,7 +135,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status="pending_submission", @@ -238,14 +238,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.retrieve( - "string", + "wire_drawdown_request_id", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.retrieve( - "string", + "wire_drawdown_request_id", ) assert response.is_closed is True @@ -256,7 +256,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_drawdown_requests.with_streaming_response.retrieve( - "string", + "wire_drawdown_request_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -283,7 +283,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.list( - cursor="string", + cursor="cursor", idempotency_key="x", limit=1, status="pending_submission", diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 4d10cc88d..98d7c85e6 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -40,7 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", beneficiary_address_line3="NY 10045", - external_account_id="string", + external_account_id="external_account_id", originator_address_line1="x", originator_address_line2="x", originator_address_line3="x", @@ -83,14 +83,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: wire_transfer = client.wire_transfers.retrieve( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.retrieve( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -101,7 +101,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.retrieve( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -126,15 +126,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: wire_transfer = client.wire_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) @@ -163,14 +163,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: wire_transfer = client.wire_transfers.approve( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.approve( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -181,7 +181,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.approve( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,14 +201,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: wire_transfer = client.wire_transfers.cancel( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.cancel( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -219,7 +219,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.cancel( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,7 +240,7 @@ def test_path_params_cancel(self, client: Increase) -> None: @parametrize def test_method_reverse(self, client: Increase) -> None: wire_transfer = client.wire_transfers.reverse( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -248,7 +248,7 @@ def test_method_reverse(self, client: Increase) -> None: @parametrize def test_raw_response_reverse(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.reverse( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -260,7 +260,7 @@ def test_raw_response_reverse(self, client: Increase) -> None: @parametrize def test_streaming_response_reverse(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.reverse( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -282,7 +282,7 @@ def test_path_params_reverse(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: wire_transfer = client.wire_transfers.submit( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -290,7 +290,7 @@ def test_method_submit(self, client: Increase) -> None: @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.submit( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -302,7 +302,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.submit( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -345,7 +345,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", beneficiary_address_line3="NY 10045", - external_account_id="string", + external_account_id="external_account_id", originator_address_line1="x", originator_address_line2="x", originator_address_line3="x", @@ -388,14 +388,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.retrieve( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.retrieve( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -406,7 +406,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.retrieve( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -431,15 +431,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.list( - account_id="string", + account_id="account_id", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - cursor="string", - external_account_id="string", + cursor="cursor", + external_account_id="external_account_id", idempotency_key="x", limit=1, ) @@ -468,14 +468,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.approve( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.approve( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -486,7 +486,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.approve( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -506,14 +506,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.cancel( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.cancel( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -524,7 +524,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.cancel( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -545,7 +545,7 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_reverse(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.reverse( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -553,7 +553,7 @@ async def test_method_reverse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.reverse( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -565,7 +565,7 @@ async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.reverse( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -587,7 +587,7 @@ async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.submit( - "string", + "wire_transfer_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -595,7 +595,7 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.submit( - "string", + "wire_transfer_id", ) assert response.is_closed is True @@ -607,7 +607,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.submit( - "string", + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From c0eddf3aefc6fcec2440e860d2fa047640f73135 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:15:08 +0000 Subject: [PATCH 0080/1325] feat(api): OpenAPI spec update via Stainless API (#501) --- .github/workflows/ci.yml | 3 +- .stats.yml | 4 +- README.md | 66 +- api.md | 689 +++++++++-------- pyproject.toml | 2 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 +-- src/increase/_base_client.py | 92 +-- src/increase/_client.py | 1375 ++++++++++++++------------------- src/increase/_qs.py | 26 +- src/increase/_response.py | 16 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 +- src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- tests/conftest.py | 22 +- tests/test_files.py | 11 +- tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 22 files changed, 1107 insertions(+), 1402 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d185b57d4..40293964f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: lint: name: lint runs-on: ubuntu-latest - if: github.repository == 'increase/increase-python' + steps: - uses: actions/checkout@v4 @@ -33,7 +33,6 @@ jobs: test: name: test runs-on: ubuntu-latest - if: github.repository == 'increase/increase-python' steps: - uses: actions/checkout@v4 diff --git a/.stats.yml b/.stats.yml index 02fa5f3d4..44258ef8a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase-51d2bd4f5857a9202f84a0ee96ba6a5ef6869f054084ec71820a1b38d6155073.yml +configured_endpoints: 196 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b58060b11c0db380a4466825744fafd8109f35332142fa44e9637726f065688c.yml diff --git a/README.md b/README.md index 445862067..2dc0b9cba 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,9 @@ client = Increase( ) account = client.accounts.create( - name="My First Increase Account", + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) ``` @@ -59,13 +61,13 @@ client = AsyncIncrease( environment="sandbox", ) - async def main() -> None: - account = await client.accounts.create( - name="My First Increase Account", - ) - print(account.id) - + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) asyncio.run(main()) ``` @@ -108,7 +110,6 @@ import increase client = AsyncIncrease() - async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -116,7 +117,6 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) - asyncio.run(main()) ``` @@ -137,7 +137,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -171,7 +171,7 @@ client = Increase() client.files.create( file=Path("my/file.txt"), - purpose="other", + purpose="check_image_front", ) ``` @@ -198,7 +198,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -238,8 +238,10 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries=5).accounts.create( - name="Jack", +client.with_options(max_retries = 5).accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -263,8 +265,10 @@ client = Increase( ) # Override per-request: -client.with_options(timeout=5.0).accounts.list( - status="open", +client.with_options(timeout = 5.0).accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -305,7 +309,9 @@ from increase import Increase client = Increase() response = client.accounts.with_raw_response.create( - name="My First Increase Account", + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(response.headers.get('X-My-Header')) @@ -313,14 +319,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`LegacyAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_legacy_response.py) object. This is a legacy class as we're changing it slightly in the next major version. +These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. -For the sync client this will mostly be the same with the exception -of `content` & `text` will be methods instead of properties. In the -async client, all methods will be async. - -A migration script will be provided & the migration in general should -be smooth. +The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -328,16 +329,16 @@ The above interface eagerly reads the full response body when you make the reque To stream the response body, use `.with_streaming_response` instead, which requires a context manager and only reads the response body once you call `.read()`, `.text()`, `.json()`, `.iter_bytes()`, `.iter_text()`, `.iter_lines()` or `.parse()`. In the async client, these are async methods. -As such, `.with_streaming_response` methods return a different [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object, and the async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. - ```python with client.accounts.with_streaming_response.create( - name="My First Increase Account", -) as response: - print(response.headers.get("X-My-Header")) + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", +) as response : + print(response.headers.get('X-My-Header')) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -391,10 +392,7 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient( - proxies="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), + http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), ) ``` diff --git a/api.md b/api.md index 25ad965b1..35d52ad09 100644 --- a/api.md +++ b/api.md @@ -30,90 +30,47 @@ Methods: - client.account_numbers.update(account_number_id, \*\*params) -> AccountNumber - client.account_numbers.list(\*\*params) -> SyncPage[AccountNumber] -# BookkeepingAccounts - -Types: - -```python -from increase.types import BookkeepingAccount, BookkeepingBalanceLookup -``` - -Methods: - -- client.bookkeeping_accounts.create(\*\*params) -> BookkeepingAccount -- client.bookkeeping_accounts.update(bookkeeping_account_id, \*\*params) -> BookkeepingAccount -- client.bookkeeping_accounts.list(\*\*params) -> SyncPage[BookkeepingAccount] -- client.bookkeeping_accounts.balance(bookkeeping_account_id, \*\*params) -> BookkeepingBalanceLookup - -# BookkeepingEntrySets - -Types: - -```python -from increase.types import BookkeepingEntrySet -``` - -Methods: - -- client.bookkeeping_entry_sets.create(\*\*params) -> BookkeepingEntrySet -- client.bookkeeping_entry_sets.retrieve(bookkeeping_entry_set_id) -> BookkeepingEntrySet -- client.bookkeeping_entry_sets.list(\*\*params) -> SyncPage[BookkeepingEntrySet] - -# BookkeepingEntries - -Types: - -```python -from increase.types import BookkeepingEntry -``` - -Methods: - -- client.bookkeeping_entries.retrieve(bookkeeping_entry_id) -> BookkeepingEntry -- client.bookkeeping_entries.list(\*\*params) -> SyncPage[BookkeepingEntry] - -# RealTimeDecisions +# Cards Types: ```python -from increase.types import RealTimeDecision +from increase.types import Card, CardDetails ``` Methods: -- client.real_time_decisions.retrieve(real_time_decision_id) -> RealTimeDecision -- client.real_time_decisions.action(real_time_decision_id, \*\*params) -> RealTimeDecision +- client.cards.create(\*\*params) -> Card +- client.cards.retrieve(card_id) -> Card +- client.cards.update(card_id, \*\*params) -> Card +- client.cards.list(\*\*params) -> SyncPage[Card] +- client.cards.details(card_id) -> CardDetails -# RealTimePaymentsTransfers +# CardPayments Types: ```python -from increase.types import RealTimePaymentsTransfer +from increase.types import CardPayment ``` Methods: -- client.real_time_payments_transfers.create(\*\*params) -> RealTimePaymentsTransfer -- client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer -- client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] +- client.card_payments.retrieve(card_payment_id) -> CardPayment +- client.card_payments.list(\*\*params) -> SyncPage[CardPayment] -# Cards +# CardPurchaseSupplements Types: ```python -from increase.types import Card, CardDetails +from increase.types import CardPurchaseSupplement ``` Methods: -- client.cards.create(\*\*params) -> Card -- client.cards.retrieve(card_id) -> Card -- client.cards.update(card_id, \*\*params) -> Card -- client.cards.list(\*\*params) -> SyncPage[Card] -- client.cards.retrieve_sensitive_details(card_id) -> CardDetails +- client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement +- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] # CardDisputes @@ -129,47 +86,52 @@ Methods: - client.card_disputes.retrieve(card_dispute_id) -> CardDispute - client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] -# CardPurchaseSupplements +# PhysicalCards Types: ```python -from increase.types import CardPurchaseSupplement +from increase.types import PhysicalCard ``` Methods: -- client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement -- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] +- client.physical_cards.create(\*\*params) -> PhysicalCard +- client.physical_cards.retrieve(physical_card_id) -> PhysicalCard +- client.physical_cards.update(physical_card_id, \*\*params) -> PhysicalCard +- client.physical_cards.list(\*\*params) -> SyncPage[PhysicalCard] -# ExternalAccounts +# DigitalCardProfiles Types: ```python -from increase.types import ExternalAccount +from increase.types import DigitalCardProfile ``` Methods: -- client.external_accounts.create(\*\*params) -> ExternalAccount -- client.external_accounts.retrieve(external_account_id) -> ExternalAccount -- client.external_accounts.update(external_account_id, \*\*params) -> ExternalAccount -- client.external_accounts.list(\*\*params) -> SyncPage[ExternalAccount] +- client.digital_card_profiles.create(\*\*params) -> DigitalCardProfile +- client.digital_card_profiles.retrieve(digital_card_profile_id) -> DigitalCardProfile +- client.digital_card_profiles.list(\*\*params) -> SyncPage[DigitalCardProfile] +- client.digital_card_profiles.archive(digital_card_profile_id) -> DigitalCardProfile +- client.digital_card_profiles.clone(digital_card_profile_id, \*\*params) -> DigitalCardProfile -# Exports +# PhysicalCardProfiles Types: ```python -from increase.types import Export +from increase.types import PhysicalCardProfile ``` Methods: -- client.exports.create(\*\*params) -> Export -- client.exports.retrieve(export_id) -> Export -- client.exports.list(\*\*params) -> SyncPage[Export] +- client.physical_card_profiles.create(\*\*params) -> PhysicalCardProfile +- client.physical_card_profiles.retrieve(physical_card_profile_id) -> PhysicalCardProfile +- client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] +- client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile +- client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile # DigitalWalletTokens @@ -210,19 +172,6 @@ Methods: - client.pending_transactions.retrieve(pending_transaction_id) -> PendingTransaction - client.pending_transactions.list(\*\*params) -> SyncPage[PendingTransaction] -# Programs - -Types: - -```python -from increase.types import Program -``` - -Methods: - -- client.programs.retrieve(program_id) -> Program -- client.programs.list(\*\*params) -> SyncPage[Program] - # DeclinedTransactions Types: @@ -282,18 +231,21 @@ Methods: - client.ach_prenotifications.retrieve(ach_prenotification_id) -> ACHPrenotification - client.ach_prenotifications.list(\*\*params) -> SyncPage[ACHPrenotification] -# Documents +# InboundACHTransfers Types: ```python -from increase.types import Document +from increase.types import InboundACHTransfer ``` Methods: -- client.documents.retrieve(document_id) -> Document -- client.documents.list(\*\*params) -> SyncPage[Document] +- client.inbound_ach_transfers.retrieve(inbound_ach_transfer_id) -> InboundACHTransfer +- client.inbound_ach_transfers.list(\*\*params) -> SyncPage[InboundACHTransfer] +- client.inbound_ach_transfers.create_notification_of_change(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer +- client.inbound_ach_transfers.decline(inbound_ach_transfer_id) -> InboundACHTransfer +- client.inbound_ach_transfers.transfer_return(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer # WireTransfers @@ -310,587 +262,662 @@ Methods: - client.wire_transfers.list(\*\*params) -> SyncPage[WireTransfer] - client.wire_transfers.approve(wire_transfer_id) -> WireTransfer - client.wire_transfers.cancel(wire_transfer_id) -> WireTransfer -- client.wire_transfers.reverse(wire_transfer_id) -> WireTransfer -- client.wire_transfers.submit(wire_transfer_id) -> WireTransfer -# CheckTransfers +# InboundWireTransfers Types: ```python -from increase.types import CheckTransfer +from increase.types import InboundWireTransfer ``` Methods: -- client.check_transfers.create(\*\*params) -> CheckTransfer -- client.check_transfers.retrieve(check_transfer_id) -> CheckTransfer -- client.check_transfers.list(\*\*params) -> SyncPage[CheckTransfer] -- client.check_transfers.approve(check_transfer_id) -> CheckTransfer -- client.check_transfers.cancel(check_transfer_id) -> CheckTransfer -- client.check_transfers.stop_payment(check_transfer_id, \*\*params) -> CheckTransfer +- client.inbound_wire_transfers.retrieve(inbound_wire_transfer_id) -> InboundWireTransfer +- client.inbound_wire_transfers.list(\*\*params) -> SyncPage[InboundWireTransfer] -# Entities +# WireDrawdownRequests Types: ```python -from increase.types import Entity +from increase.types import WireDrawdownRequest ``` Methods: -- client.entities.create(\*\*params) -> Entity -- client.entities.retrieve(entity_id) -> Entity -- client.entities.list(\*\*params) -> SyncPage[Entity] -- client.entities.archive(entity_id) -> Entity -- client.entities.confirm(entity_id, \*\*params) -> Entity -- client.entities.update_address(entity_id, \*\*params) -> Entity +- client.wire_drawdown_requests.create(\*\*params) -> WireDrawdownRequest +- client.wire_drawdown_requests.retrieve(wire_drawdown_request_id) -> WireDrawdownRequest +- client.wire_drawdown_requests.list(\*\*params) -> SyncPage[WireDrawdownRequest] + +# InboundWireDrawdownRequests + +Types: -## BeneficialOwners +```python +from increase.types import InboundWireDrawdownRequest +``` Methods: -- client.entities.beneficial_owners.create(\*\*params) -> Entity -- client.entities.beneficial_owners.archive(\*\*params) -> Entity -- client.entities.beneficial_owners.update_address(\*\*params) -> Entity +- client.inbound_wire_drawdown_requests.retrieve(inbound_wire_drawdown_request_id) -> InboundWireDrawdownRequest +- client.inbound_wire_drawdown_requests.list(\*\*params) -> SyncPage[InboundWireDrawdownRequest] -## SupplementalDocuments +# CheckTransfers Types: ```python -from increase.types.entities import SupplementalDocument +from increase.types import CheckTransfer ``` Methods: -- client.entities.supplemental_documents.create(entity_id, \*\*params) -> Entity -- client.entities.supplemental_documents.list(\*\*params) -> SyncPage[SupplementalDocument] +- client.check_transfers.create(\*\*params) -> CheckTransfer +- client.check_transfers.retrieve(check_transfer_id) -> CheckTransfer +- client.check_transfers.list(\*\*params) -> SyncPage[CheckTransfer] +- client.check_transfers.approve(check_transfer_id) -> CheckTransfer +- client.check_transfers.cancel(check_transfer_id) -> CheckTransfer +- client.check_transfers.stop_payment(check_transfer_id, \*\*params) -> CheckTransfer + +# InboundCheckDeposits + +Types: -## IndustryCode +```python +from increase.types import InboundCheckDeposit +``` Methods: -- client.entities.industry_code.create(entity_id, \*\*params) -> Entity +- client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit +- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] +- client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit +- client.inbound*check_deposits.return*(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit -# InboundACHTransfers +# RealTimePaymentsTransfers Types: ```python -from increase.types import InboundACHTransfer +from increase.types import RealTimePaymentsTransfer ``` Methods: -- client.inbound_ach_transfers.retrieve(inbound_ach_transfer_id) -> InboundACHTransfer -- client.inbound_ach_transfers.list(\*\*params) -> SyncPage[InboundACHTransfer] -- client.inbound_ach_transfers.decline(inbound_ach_transfer_id) -> InboundACHTransfer -- client.inbound_ach_transfers.notification_of_change(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer -- client.inbound_ach_transfers.transfer_return(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer +- client.real_time_payments_transfers.create(\*\*params) -> RealTimePaymentsTransfer +- client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer +- client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] -# InboundWireDrawdownRequests +# CheckDeposits Types: ```python -from increase.types import InboundWireDrawdownRequest +from increase.types import CheckDeposit ``` Methods: -- client.inbound_wire_drawdown_requests.retrieve(inbound_wire_drawdown_request_id) -> InboundWireDrawdownRequest -- client.inbound_wire_drawdown_requests.list(\*\*params) -> SyncPage[InboundWireDrawdownRequest] +- client.check_deposits.create(\*\*params) -> CheckDeposit +- client.check_deposits.retrieve(check_deposit_id) -> CheckDeposit +- client.check_deposits.list(\*\*params) -> SyncPage[CheckDeposit] -# WireDrawdownRequests +# Lockboxes Types: ```python -from increase.types import WireDrawdownRequest +from increase.types import Lockbox ``` Methods: -- client.wire_drawdown_requests.create(\*\*params) -> WireDrawdownRequest -- client.wire_drawdown_requests.retrieve(wire_drawdown_request_id) -> WireDrawdownRequest -- client.wire_drawdown_requests.list(\*\*params) -> SyncPage[WireDrawdownRequest] +- client.lockboxes.create(\*\*params) -> Lockbox +- client.lockboxes.retrieve(lockbox_id) -> Lockbox +- client.lockboxes.update(lockbox_id, \*\*params) -> Lockbox +- client.lockboxes.list(\*\*params) -> SyncPage[Lockbox] -# Events +# InboundMailItems Types: ```python -from increase.types import Event +from increase.types import InboundMailItem ``` Methods: -- client.events.retrieve(event_id) -> Event -- client.events.list(\*\*params) -> SyncPage[Event] +- client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem +- client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] -# EventSubscriptions +# RoutingNumbers Types: ```python -from increase.types import EventSubscription +from increase.types import RoutingNumberListResponse ``` Methods: -- client.event_subscriptions.create(\*\*params) -> EventSubscription -- client.event_subscriptions.retrieve(event_subscription_id) -> EventSubscription -- client.event_subscriptions.update(event_subscription_id, \*\*params) -> EventSubscription -- client.event_subscriptions.list(\*\*params) -> SyncPage[EventSubscription] +- client.routing_numbers.list(\*\*params) -> SyncPage[RoutingNumberListResponse] -# Files +# ExternalAccounts Types: ```python -from increase.types import File +from increase.types import ExternalAccount ``` Methods: -- client.files.create(\*\*params) -> File -- client.files.retrieve(file_id) -> File -- client.files.list(\*\*params) -> SyncPage[File] +- client.external_accounts.create(\*\*params) -> ExternalAccount +- client.external_accounts.retrieve(external_account_id) -> ExternalAccount +- client.external_accounts.update(external_account_id, \*\*params) -> ExternalAccount +- client.external_accounts.list(\*\*params) -> SyncPage[ExternalAccount] -# Groups +# Entities Types: ```python -from increase.types import Group +from increase.types import Entity ``` Methods: -- client.groups.retrieve_details() -> Group +- client.entities.create(\*\*params) -> Entity +- client.entities.retrieve(entity_id) -> Entity +- client.entities.list(\*\*params) -> SyncPage[Entity] +- client.entities.archive(entity_id) -> Entity +- client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity +- client.entities.confirm(entity_id, \*\*params) -> Entity +- client.entities.create_beneficial_owner(entity_id, \*\*params) -> Entity +- client.entities.update_address(entity_id, \*\*params) -> Entity +- client.entities.update_beneficial_owner_address(entity_id, \*\*params) -> Entity +- client.entities.update_industry_code(entity_id, \*\*params) -> Entity -# OAuthConnections +# SupplementalDocuments Types: ```python -from increase.types import OAuthConnection +from increase.types import EntitySupplementalDocument ``` Methods: -- client.oauth_connections.retrieve(oauth_connection_id) -> OAuthConnection -- client.oauth_connections.list(\*\*params) -> SyncPage[OAuthConnection] +- client.supplemental_documents.create(\*\*params) -> EntitySupplementalDocument +- client.supplemental_documents.list(\*\*params) -> SyncPage[EntitySupplementalDocument] -# CheckDeposits +# Programs Types: ```python -from increase.types import CheckDeposit +from increase.types import Program ``` Methods: -- client.check_deposits.create(\*\*params) -> CheckDeposit -- client.check_deposits.retrieve(check_deposit_id) -> CheckDeposit -- client.check_deposits.list(\*\*params) -> SyncPage[CheckDeposit] +- client.programs.retrieve(program_id) -> Program +- client.programs.list(\*\*params) -> SyncPage[Program] -# RoutingNumbers +# ProofOfAuthorizationRequests Types: ```python -from increase.types import RoutingNumber +from increase.types import ProofOfAuthorizationRequest ``` Methods: -- client.routing_numbers.list(\*\*params) -> SyncPage[RoutingNumber] +- client.proof_of_authorization_requests.retrieve(proof_of_authorization_request_id) -> ProofOfAuthorizationRequest +- client.proof_of_authorization_requests.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequest] -# AccountStatements +# ProofOfAuthorizationRequestSubmissions Types: ```python -from increase.types import AccountStatement +from increase.types import ProofOfAuthorizationRequestSubmission ``` Methods: -- client.account_statements.retrieve(account_statement_id) -> AccountStatement -- client.account_statements.list(\*\*params) -> SyncPage[AccountStatement] - -# Simulations +- client.proof_of_authorization_request_submissions.create(\*\*params) -> ProofOfAuthorizationRequestSubmission +- client.proof_of_authorization_request_submissions.retrieve(proof_of_authorization_request_submission_id) -> ProofOfAuthorizationRequestSubmission +- client.proof_of_authorization_request_submissions.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequestSubmission] -Methods: +# AccountStatements -- client.simulations.card_authorization_expirations(\*\*params) -> CardPayment -- client.simulations.card_fuel_confirmations(\*\*params) -> CardPayment -- client.simulations.card_increments(\*\*params) -> CardPayment -- client.simulations.card_reversals(\*\*params) -> CardPayment +Types: -## AccountTransfers +```python +from increase.types import AccountStatement +``` Methods: -- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer - -## AccountStatements +- client.account_statements.retrieve(account_statement_id) -> AccountStatement +- client.account_statements.list(\*\*params) -> SyncPage[AccountStatement] -Methods: +# Files -- client.simulations.account_statements.create(\*\*params) -> AccountStatement +Types: -## ACHTransfers +```python +from increase.types import File +``` Methods: -- client.simulations.ach_transfers.create_inbound(\*\*params) -> InboundACHTransfer -- client.simulations.ach_transfers.notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer - -## CardDisputes +- client.files.create(\*\*params) -> File +- client.files.retrieve(file_id) -> File +- client.files.list(\*\*params) -> SyncPage[File] -Methods: +# Documents -- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute +Types: -## CardRefunds +```python +from increase.types import Document +``` Methods: -- client.simulations.card_refunds.create(\*\*params) -> Transaction - -## CheckTransfers +- client.documents.retrieve(document_id) -> Document +- client.documents.list(\*\*params) -> SyncPage[Document] -Methods: +# Exports -- client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer +Types: -## Documents +```python +from increase.types import Export +``` Methods: -- client.simulations.documents.create(\*\*params) -> Document +- client.exports.create(\*\*params) -> Export +- client.exports.retrieve(export_id) -> Export +- client.exports.list(\*\*params) -> SyncPage[Export] -## DigitalWalletTokenRequests +# Events Types: ```python -from increase.types.simulations import DigitalWalletTokenRequestCreateResponse +from increase.types import Event ``` Methods: -- client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse - -## CheckDeposits +- client.events.retrieve(event_id) -> Event +- client.events.list(\*\*params) -> SyncPage[Event] -Methods: +# EventSubscriptions -- client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit -- client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit -- client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit +Types: -## Programs +```python +from increase.types import EventSubscription +``` Methods: -- client.simulations.programs.create(\*\*params) -> Program +- client.event_subscriptions.create(\*\*params) -> EventSubscription +- client.event_subscriptions.retrieve(event_subscription_id) -> EventSubscription +- client.event_subscriptions.update(event_subscription_id, \*\*params) -> EventSubscription +- client.event_subscriptions.list(\*\*params) -> SyncPage[EventSubscription] -## InboundWireDrawdownRequests +# RealTimeDecisions + +Types: + +```python +from increase.types import RealTimeDecision +``` Methods: -- client.simulations.inbound_wire_drawdown_requests.create(\*\*params) -> InboundWireDrawdownRequest +- client.real_time_decisions.retrieve(real_time_decision_id) -> RealTimeDecision +- client.real_time_decisions.action(real_time_decision_id, \*\*params) -> RealTimeDecision -## InboundFundsHolds +# BookkeepingAccounts Types: ```python -from increase.types.simulations import InboundFundsHoldReleaseResponse +from increase.types import BookkeepingAccount, BookkeepingBalanceLookup ``` Methods: -- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse - -## InterestPayments +- client.bookkeeping_accounts.create(\*\*params) -> BookkeepingAccount +- client.bookkeeping_accounts.update(bookkeeping_account_id, \*\*params) -> BookkeepingAccount +- client.bookkeeping_accounts.list(\*\*params) -> SyncPage[BookkeepingAccount] +- client.bookkeeping_accounts.balance(bookkeeping_account_id, \*\*params) -> BookkeepingBalanceLookup -Methods: +# BookkeepingEntrySets -- client.simulations.interest_payments.create(\*\*params) -> Transaction +Types: -## WireTransfers +```python +from increase.types import BookkeepingEntrySet +``` Methods: -- client.simulations.wire_transfers.create_inbound(\*\*params) -> InboundWireTransfer +- client.bookkeeping_entry_sets.create(\*\*params) -> BookkeepingEntrySet +- client.bookkeeping_entry_sets.retrieve(bookkeeping_entry_set_id) -> BookkeepingEntrySet +- client.bookkeeping_entry_sets.list(\*\*params) -> SyncPage[BookkeepingEntrySet] -## Cards +# BookkeepingEntries Types: ```python -from increase.types.simulations import CardAuthorizationSimulation +from increase.types import BookkeepingEntry ``` Methods: -- client.simulations.cards.authorize(\*\*params) -> CardAuthorizationSimulation -- client.simulations.cards.settlement(\*\*params) -> Transaction +- client.bookkeeping_entries.retrieve(bookkeeping_entry_id) -> BookkeepingEntry +- client.bookkeeping_entries.list(\*\*params) -> SyncPage[BookkeepingEntry] -## RealTimePaymentsTransfers +# Groups Types: ```python -from increase.types.simulations import InboundRealTimePaymentsTransferSimulationResult +from increase.types import Group ``` Methods: -- client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer -- client.simulations.real_time_payments_transfers.create_inbound(\*\*params) -> InboundRealTimePaymentsTransferSimulationResult - -## PhysicalCards +- client.groups.retrieve() -> Group -Methods: +# OAuthConnections -- client.simulations.physical_cards.shipment_advance(physical_card_id, \*\*params) -> PhysicalCard +Types: -## InboundCheckDeposits +```python +from increase.types import OAuthConnection +``` Methods: -- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit +- client.oauth_connections.retrieve(oauth_connection_id) -> OAuthConnection +- client.oauth_connections.list(\*\*params) -> SyncPage[OAuthConnection] -## InboundInternationalACHTransfers +# OAuthTokens Types: ```python -from increase.types.simulations import InboundInternationalACHTransfer +from increase.types import OAuthToken ``` Methods: -- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransfer +- client.oauth_tokens.create(\*\*params) -> OAuthToken -# PhysicalCards +# IntrafiAccountEnrollments Types: ```python -from increase.types import PhysicalCard +from increase.types import IntrafiAccountEnrollment ``` Methods: -- client.physical_cards.create(\*\*params) -> PhysicalCard -- client.physical_cards.retrieve(physical_card_id) -> PhysicalCard -- client.physical_cards.update(physical_card_id, \*\*params) -> PhysicalCard -- client.physical_cards.list(\*\*params) -> SyncPage[PhysicalCard] +- client.intrafi_account_enrollments.create(\*\*params) -> IntrafiAccountEnrollment +- client.intrafi_account_enrollments.retrieve(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment +- client.intrafi_account_enrollments.list(\*\*params) -> SyncPage[IntrafiAccountEnrollment] +- client.intrafi_account_enrollments.unenroll(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment -# CardPayments +# IntrafiBalances Types: ```python -from increase.types import CardPayment +from increase.types import IntrafiBalance ``` Methods: -- client.card_payments.retrieve(card_payment_id) -> CardPayment -- client.card_payments.list(\*\*params) -> SyncPage[CardPayment] +- client.intrafi_balances.retrieve(account_id) -> IntrafiBalance -# ProofOfAuthorizationRequests +# IntrafiExclusions Types: ```python -from increase.types import ProofOfAuthorizationRequest +from increase.types import IntrafiExclusion ``` Methods: -- client.proof_of_authorization_requests.retrieve(proof_of_authorization_request_id) -> ProofOfAuthorizationRequest -- client.proof_of_authorization_requests.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequest] +- client.intrafi_exclusions.create(\*\*params) -> IntrafiExclusion +- client.intrafi_exclusions.retrieve(intrafi_exclusion_id) -> IntrafiExclusion +- client.intrafi_exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] +- client.intrafi_exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion -# ProofOfAuthorizationRequestSubmissions +# RealTimePaymentsRequestForPayments Types: ```python -from increase.types import ProofOfAuthorizationRequestSubmission +from increase.types import RealTimePaymentsRequestForPayment ``` Methods: -- client.proof_of_authorization_request_submissions.create(\*\*params) -> ProofOfAuthorizationRequestSubmission -- client.proof_of_authorization_request_submissions.retrieve(proof_of_authorization_request_submission_id) -> ProofOfAuthorizationRequestSubmission -- client.proof_of_authorization_request_submissions.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequestSubmission] +- client.real_time_payments_request_for_payments.create(\*\*params) -> RealTimePaymentsRequestForPayment +- client.real_time_payments_request_for_payments.retrieve(request_for_payment_id) -> RealTimePaymentsRequestForPayment +- client.real_time_payments_request_for_payments.list(\*\*params) -> SyncPage[RealTimePaymentsRequestForPayment] + +# Simulations -# Intrafi +## AccountTransfers -## AccountEnrollments +Methods: -Types: +- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer -```python -from increase.types.intrafi import IntrafiAccountEnrollment -``` +## InboundACHTransfers Methods: -- client.intrafi.account_enrollments.create(\*\*params) -> IntrafiAccountEnrollment -- client.intrafi.account_enrollments.retrieve(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment -- client.intrafi.account_enrollments.list(\*\*params) -> SyncPage[IntrafiAccountEnrollment] -- client.intrafi.account_enrollments.unenroll(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment +- client.simulations.inbound_ach_transfers.create(\*\*params) -> InboundACHTransfer -## Balances +## ACHTransfers -Types: +Methods: -```python -from increase.types.intrafi import IntrafiBalance -``` +- client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer +- client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer +- client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer +- client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer + +## CheckTransfers Methods: -- client.intrafi.balances.retrieve(account_id) -> IntrafiBalance +- client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer -## Exclusions +## InboundCheckDeposits -Types: +Methods: -```python -from increase.types.intrafi import IntrafiExclusion -``` +- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit + +## CheckDeposits Methods: -- client.intrafi.exclusions.create(\*\*params) -> IntrafiExclusion -- client.intrafi.exclusions.retrieve(intrafi_exclusion_id) -> IntrafiExclusion -- client.intrafi.exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] -- client.intrafi.exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion +- client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit +- client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit +- client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit -# RealTimePaymentsRequestForPayments +## InboundWireTransfers -Types: +Methods: -```python -from increase.types import RealTimePaymentsRequestForPayment -``` +- client.simulations.inbound_wire_transfers.create(\*\*params) -> InboundWireTransfer + +## WireTransfers Methods: -- client.real_time_payments_request_for_payments.create(\*\*params) -> RealTimePaymentsRequestForPayment -- client.real_time_payments_request_for_payments.retrieve(request_for_payment_id) -> RealTimePaymentsRequestForPayment -- client.real_time_payments_request_for_payments.list(\*\*params) -> SyncPage[RealTimePaymentsRequestForPayment] +- client.simulations.wire_transfers.reverse(wire_transfer_id) -> WireTransfer +- client.simulations.wire_transfers.submit(wire_transfer_id) -> WireTransfer -# OAuthTokens +## InboundWireDrawdownRequests + +Methods: + +- client.simulations.inbound_wire_drawdown_requests.create(\*\*params) -> InboundWireDrawdownRequest + +## InboundRealTimePaymentsTransfers Types: ```python -from increase.types import OAuthToken +from increase.types.simulations import InboundRealTimePaymentsTransferCreateResponse ``` Methods: -- client.oauth_tokens.create(\*\*params) -> OAuthToken +- client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransferCreateResponse -# InboundWireTransfers +## InboundFundsHolds Types: ```python -from increase.types import InboundWireTransfer +from increase.types.simulations import InboundFundsHoldReleaseResponse ``` Methods: -- client.inbound_wire_transfers.retrieve(inbound_wire_transfer_id) -> InboundWireTransfer -- client.inbound_wire_transfers.list(\*\*params) -> SyncPage[InboundWireTransfer] +- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse -# DigitalCardProfiles +## RealTimePaymentsTransfers + +Methods: + +- client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer + +## InboundInternationalACHTransfers Types: ```python -from increase.types import DigitalCardProfile +from increase.types.simulations import InboundInternationalACHTransferCreateResponse ``` Methods: -- client.digital_card_profiles.create(\*\*params) -> DigitalCardProfile -- client.digital_card_profiles.retrieve(digital_card_profile_id) -> DigitalCardProfile -- client.digital_card_profiles.list(\*\*params) -> SyncPage[DigitalCardProfile] -- client.digital_card_profiles.archive(digital_card_profile_id) -> DigitalCardProfile -- client.digital_card_profiles.clone(digital_card_profile_id, \*\*params) -> DigitalCardProfile +- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransferCreateResponse -# PhysicalCardProfiles +## CardAuthorizations Types: ```python -from increase.types import PhysicalCardProfile +from increase.types.simulations import CardAuthorizationCreateResponse ``` Methods: -- client.physical_card_profiles.create(\*\*params) -> PhysicalCardProfile -- client.physical_card_profiles.retrieve(physical_card_profile_id) -> PhysicalCardProfile -- client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] -- client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile -- client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile +- client.simulations.card_authorizations.create(\*\*params) -> CardAuthorizationCreateResponse -# InboundCheckDeposits +## CardSettlements -Types: +Methods: -```python -from increase.types import InboundCheckDeposit -``` +- client.simulations.card_settlements.create(\*\*params) -> Transaction + +## CardReversals Methods: -- client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit -- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] -- client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit +- client.simulations.card_reversals.create(\*\*params) -> CardPayment -# InboundMailItems +## CardIncrements -Types: +Methods: -```python -from increase.types import InboundMailItem, InboundMailItemList -``` +- client.simulations.card_increments.create(\*\*params) -> CardPayment + +## CardAuthorizationExpirations Methods: -- client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem -- client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] +- client.simulations.card_authorization_expirations.create(\*\*params) -> CardPayment -# Lockboxes +## CardFuelConfirmations + +Methods: + +- client.simulations.card_fuel_confirmations.create(\*\*params) -> CardPayment + +## CardRefunds + +Methods: + +- client.simulations.card_refunds.create(\*\*params) -> Transaction + +## CardDisputes + +Methods: + +- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute + +## DigitalWalletTokenRequests Types: ```python -from increase.types import Lockbox, LockboxList +from increase.types.simulations import DigitalWalletTokenRequestCreateResponse ``` Methods: -- client.lockboxes.create(\*\*params) -> Lockbox -- client.lockboxes.retrieve(lockbox_id) -> Lockbox -- client.lockboxes.update(lockbox_id, \*\*params) -> Lockbox -- client.lockboxes.list(\*\*params) -> SyncPage[Lockbox] +- client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse + +## PhysicalCards + +Methods: + +- client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard + +## InterestPayments + +Methods: + +- client.simulations.interest_payments.create(\*\*params) -> Transaction + +## AccountStatements + +Methods: + +- client.simulations.account_statements.create(\*\*params) -> AccountStatement + +## Documents + +Methods: + +- client.simulations.documents.create(\*\*params) -> Document + +## Programs + +Methods: + +- client.simulations.programs.create(\*\*params) -> Program diff --git a/pyproject.toml b/pyproject.toml index aafcb7c39..0fa3c2f23 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.61.0" +version = "0.70.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/requirements-dev.lock b/requirements-dev.lock index f6f54a23d..33440059e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase # via respx + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio - # via increase # via mypy # via pydantic # via pydantic-core + # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index daa54a31b..094dd754e 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename typing-extensions==4.8.0 # via anyio - # via increase # via pydantic # via pydantic-core + # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 519cb0b5a..238f453e6 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,105 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes +from ._version import __version__, __title__ +from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS +from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError +from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN from ._utils import file_from_path -from ._client import ( - ENVIRONMENTS, - Client, - Stream, - Timeout, - Increase, - Transport, - AsyncClient, - AsyncStream, - AsyncIncrease, - RequestOptions, -) from ._models import BaseModel -from ._version import __title__, __version__ -from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS -from ._exceptions import ( - APIError, - ConflictError, - IncreaseError, - NotFoundError, - APIStatusError, - RateLimitError, - APITimeoutError, - BadRequestError, - RateLimitedError, - APIConnectionError, - InvalidAPIKeyError, - AuthenticationError, - InternalServerError, - ObjectNotFoundError, - PrivateFeatureError, - InvalidOperationError, - MalformedRequestError, - PermissionDeniedError, - APIMethodNotFoundError, - InvalidParametersError, - EnvironmentMismatchError, - UnprocessableEntityError, - APIResponseValidationError, - InsufficientPermissionsError, - IdempotencyKeyAlreadyUsedError, -) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS +from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging +from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -__all__ = [ - "types", - "__version__", - "__title__", - "NoneType", - "Transport", - "ProxiesTypes", - "NotGiven", - "NOT_GIVEN", - "IncreaseError", - "APIError", - "APIStatusError", - "APITimeoutError", - "APIConnectionError", - "APIResponseValidationError", - "BadRequestError", - "AuthenticationError", - "PermissionDeniedError", - "NotFoundError", - "ConflictError", - "UnprocessableEntityError", - "RateLimitError", - "InternalServerError", - "APIMethodNotFoundError", - "EnvironmentMismatchError", - "IdempotencyKeyAlreadyUsedError", - "InsufficientPermissionsError", - "InvalidAPIKeyError", - "InvalidOperationError", - "InvalidParametersError", - "MalformedRequestError", - "ObjectNotFoundError", - "PrivateFeatureError", - "RateLimitedError", - "Timeout", - "RequestOptions", - "Client", - "AsyncClient", - "Stream", - "AsyncStream", - "Increase", - "AsyncIncrease", - "ENVIRONMENTS", - "file_from_path", - "BaseModel", - "DEFAULT_TIMEOUT", - "DEFAULT_MAX_RETRIES", - "DEFAULT_CONNECTION_LIMITS", - "DefaultHttpxClient", - "DefaultAsyncHttpxClient", -] +__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] _setup_logging() @@ -111,7 +24,7 @@ for __name in __all__: if not __name.startswith("__"): try: - __locals[__name].__module__ = "increase" + setattr(__locals[__name], "__module__", "increase") except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass + pass \ No newline at end of file diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index c20c94519..73f141e55 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -125,16 +125,14 @@ def __init__( self, *, url: URL, - ) -> None: - ... + ) -> None: ... @overload def __init__( self, *, params: Query, - ) -> None: - ... + ) -> None: ... def __init__( self, @@ -167,8 +165,7 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: - ... + def next_page_info(self) -> Optional[PageInfo]: ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -600,7 +597,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, - **self.platform_headers(), +**self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -904,8 +901,7 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def request( @@ -915,8 +911,7 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def request( @@ -927,8 +922,7 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def request( self, @@ -1019,6 +1013,7 @@ def _request( response.reason_phrase, response.headers, ) + try: response.raise_for_status() @@ -1092,18 +1087,7 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - if response.request.headers.get(RAW_RESPONSE_HEADER) == "true": - return cast( - ResponseT, - LegacyAPIResponse( - raw=response, - client=self, - cast_to=cast_to, - stream=stream, - stream_cls=stream_cls, - options=options, - ), - ) + origin = get_origin(cast_to) or cast_to @@ -1166,8 +1150,7 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def get( @@ -1178,8 +1161,7 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def get( @@ -1190,8 +1172,7 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def get( self, @@ -1217,8 +1198,7 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def post( @@ -1231,8 +1211,7 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def post( @@ -1245,8 +1224,7 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def post( self, @@ -1479,8 +1457,7 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def request( @@ -1491,8 +1468,7 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def request( @@ -1503,8 +1479,7 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def request( self, @@ -1664,18 +1639,7 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - if response.request.headers.get(RAW_RESPONSE_HEADER) == "true": - return cast( - ResponseT, - LegacyAPIResponse( - raw=response, - client=self, - cast_to=cast_to, - stream=stream, - stream_cls=stream_cls, - options=options, - ), - ) + origin = get_origin(cast_to) or cast_to @@ -1728,8 +1692,7 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def get( @@ -1740,8 +1703,7 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def get( @@ -1752,8 +1714,7 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def get( self, @@ -1777,8 +1738,7 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def post( @@ -1791,8 +1751,7 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def post( @@ -1805,8 +1764,7 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index 9a489efef..d3f890574 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,110 +2,108 @@ from __future__ import annotations +import httpx + import os -from typing import Any, Dict, Union, Mapping, cast -from typing_extensions import Self, Literal, override + +from ._streaming import AsyncStream as AsyncStream, Stream as Stream + +from ._exceptions import IncreaseError, APIStatusError + +from typing_extensions import override, Self + +from typing import Any + +from ._utils import is_mapping, get_async_library + +from . import _exceptions + +import os +import asyncio +import warnings +from typing import Optional, Union, Dict, Any, Mapping, overload, cast +from typing_extensions import Literal import httpx -from . import resources, _exceptions -from ._qs import Querystring -from ._types import ( - NOT_GIVEN, - Omit, - Timeout, - NotGiven, - Transport, - ProxiesTypes, - AsyncTransport, - RequestOptions, -) -from ._utils import ( - is_given, - is_mapping, - get_async_library, -) from ._version import __version__ -from ._streaming import Stream as Stream, AsyncStream as AsyncStream -from ._exceptions import IncreaseError, APIStatusError +from ._qs import Querystring +from .types import shared_params +from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given +from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN from ._base_client import ( - DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS, - SyncAPIClient, - AsyncAPIClient, + DEFAULT_TIMEOUT, + DEFAULT_MAX_RETRIES, + ResponseT, SyncHttpxClientWrapper, AsyncHttpxClientWrapper, + SyncAPIClient, + AsyncAPIClient, + make_request_options, ) +from . import resources -__all__ = [ - "ENVIRONMENTS", - "Timeout", - "Transport", - "ProxiesTypes", - "RequestOptions", - "resources", - "Increase", - "AsyncIncrease", - "Client", - "AsyncClient", -] +__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } - class Increase(SyncAPIClient): - accounts: resources.Accounts - account_numbers: resources.AccountNumbers - bookkeeping_accounts: resources.BookkeepingAccounts - bookkeeping_entry_sets: resources.BookkeepingEntrySets - bookkeeping_entries: resources.BookkeepingEntries - real_time_decisions: resources.RealTimeDecisions - real_time_payments_transfers: resources.RealTimePaymentsTransfers - cards: resources.Cards - card_disputes: resources.CardDisputes - card_purchase_supplements: resources.CardPurchaseSupplements - external_accounts: resources.ExternalAccounts - exports: resources.Exports - digital_wallet_tokens: resources.DigitalWalletTokens - transactions: resources.Transactions - pending_transactions: resources.PendingTransactions - programs: resources.Programs - declined_transactions: resources.DeclinedTransactions - account_transfers: resources.AccountTransfers - ach_transfers: resources.ACHTransfers - ach_prenotifications: resources.ACHPrenotifications - documents: resources.Documents - wire_transfers: resources.WireTransfers - check_transfers: resources.CheckTransfers - entities: resources.Entities - inbound_ach_transfers: resources.InboundACHTransfers - inbound_wire_drawdown_requests: resources.InboundWireDrawdownRequests - wire_drawdown_requests: resources.WireDrawdownRequests - events: resources.Events - event_subscriptions: resources.EventSubscriptions - files: resources.Files - groups: resources.Groups - oauth_connections: resources.OAuthConnections - check_deposits: resources.CheckDeposits - routing_numbers: resources.RoutingNumbers - account_statements: resources.AccountStatements - simulations: resources.Simulations - physical_cards: resources.PhysicalCards - card_payments: resources.CardPayments - proof_of_authorization_requests: resources.ProofOfAuthorizationRequests - proof_of_authorization_request_submissions: resources.ProofOfAuthorizationRequestSubmissions - intrafi: resources.Intrafi - real_time_payments_request_for_payments: resources.RealTimePaymentsRequestForPayments - oauth_tokens: resources.OAuthTokens - inbound_wire_transfers: resources.InboundWireTransfers - digital_card_profiles: resources.DigitalCardProfiles - physical_card_profiles: resources.PhysicalCardProfiles - inbound_check_deposits: resources.InboundCheckDeposits - inbound_mail_items: resources.InboundMailItems - lockboxes: resources.Lockboxes + accounts: resources.AccountsResource + account_numbers: resources.AccountNumbersResource + cards: resources.CardsResource + card_payments: resources.CardPaymentsResource + card_purchase_supplements: resources.CardPurchaseSupplementsResource + card_disputes: resources.CardDisputesResource + physical_cards: resources.PhysicalCardsResource + digital_card_profiles: resources.DigitalCardProfilesResource + physical_card_profiles: resources.PhysicalCardProfilesResource + digital_wallet_tokens: resources.DigitalWalletTokensResource + transactions: resources.TransactionsResource + pending_transactions: resources.PendingTransactionsResource + declined_transactions: resources.DeclinedTransactionsResource + account_transfers: resources.AccountTransfersResource + ach_transfers: resources.ACHTransfersResource + ach_prenotifications: resources.ACHPrenotificationsResource + inbound_ach_transfers: resources.InboundACHTransfersResource + wire_transfers: resources.WireTransfersResource + inbound_wire_transfers: resources.InboundWireTransfersResource + wire_drawdown_requests: resources.WireDrawdownRequestsResource + inbound_wire_drawdown_requests: resources.InboundWireDrawdownRequestsResource + check_transfers: resources.CheckTransfersResource + inbound_check_deposits: resources.InboundCheckDepositsResource + real_time_payments_transfers: resources.RealTimePaymentsTransfersResource + check_deposits: resources.CheckDepositsResource + lockboxes: resources.LockboxesResource + inbound_mail_items: resources.InboundMailItemsResource + routing_numbers: resources.RoutingNumbersResource + external_accounts: resources.ExternalAccountsResource + entities: resources.EntitiesResource + supplemental_documents: resources.SupplementalDocumentsResource + programs: resources.ProgramsResource + proof_of_authorization_requests: resources.ProofOfAuthorizationRequestsResource + proof_of_authorization_request_submissions: resources.ProofOfAuthorizationRequestSubmissionsResource + account_statements: resources.AccountStatementsResource + files: resources.FilesResource + documents: resources.DocumentsResource + exports: resources.ExportsResource + events: resources.EventsResource + event_subscriptions: resources.EventSubscriptionsResource + real_time_decisions: resources.RealTimeDecisionsResource + bookkeeping_accounts: resources.BookkeepingAccountsResource + bookkeeping_entry_sets: resources.BookkeepingEntrySetsResource + bookkeeping_entries: resources.BookkeepingEntriesResource + groups: resources.GroupsResource + oauth_connections: resources.OAuthConnectionsResource + oauth_tokens: resources.OAuthTokensResource + intrafi_account_enrollments: resources.IntrafiAccountEnrollmentsResource + intrafi_balances: resources.IntrafiBalancesResource + intrafi_exclusions: resources.IntrafiExclusionsResource + real_time_payments_request_for_payments: resources.RealTimePaymentsRequestForPaymentsResource + simulations: resources.SimulationsResource with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -113,39 +111,22 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # See httpx documentation for [custom transports](https://www.python-httpx.org/advanced/#custom-transports) - transport: Transport | None = None, - # See httpx documentation for [proxies](https://www.python-httpx.org/advanced/#http-proxying) - proxies: ProxiesTypes | None = None, - # See httpx documentation for [limits](https://www.python-httpx.org/advanced/#pool-limit-configuration) - connection_pool_limits: httpx.Limits | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -153,108 +134,99 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - transport=transport, - proxies=proxies, - limits=connection_pool_limits, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" - self.accounts = resources.Accounts(self) - self.account_numbers = resources.AccountNumbers(self) - self.bookkeeping_accounts = resources.BookkeepingAccounts(self) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySets(self) - self.bookkeeping_entries = resources.BookkeepingEntries(self) - self.real_time_decisions = resources.RealTimeDecisions(self) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfers(self) - self.cards = resources.Cards(self) - self.card_disputes = resources.CardDisputes(self) - self.card_purchase_supplements = resources.CardPurchaseSupplements(self) - self.external_accounts = resources.ExternalAccounts(self) - self.exports = resources.Exports(self) - self.digital_wallet_tokens = resources.DigitalWalletTokens(self) - self.transactions = resources.Transactions(self) - self.pending_transactions = resources.PendingTransactions(self) - self.programs = resources.Programs(self) - self.declined_transactions = resources.DeclinedTransactions(self) - self.account_transfers = resources.AccountTransfers(self) - self.ach_transfers = resources.ACHTransfers(self) - self.ach_prenotifications = resources.ACHPrenotifications(self) - self.documents = resources.Documents(self) - self.wire_transfers = resources.WireTransfers(self) - self.check_transfers = resources.CheckTransfers(self) - self.entities = resources.Entities(self) - self.inbound_ach_transfers = resources.InboundACHTransfers(self) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequests(self) - self.wire_drawdown_requests = resources.WireDrawdownRequests(self) - self.events = resources.Events(self) - self.event_subscriptions = resources.EventSubscriptions(self) - self.files = resources.Files(self) - self.groups = resources.Groups(self) - self.oauth_connections = resources.OAuthConnections(self) - self.check_deposits = resources.CheckDeposits(self) - self.routing_numbers = resources.RoutingNumbers(self) - self.account_statements = resources.AccountStatements(self) - self.simulations = resources.Simulations(self) - self.physical_cards = resources.PhysicalCards(self) - self.card_payments = resources.CardPayments(self) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequests(self) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissions(self) - self.intrafi = resources.Intrafi(self) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPayments(self) - self.oauth_tokens = resources.OAuthTokens(self) - self.inbound_wire_transfers = resources.InboundWireTransfers(self) - self.digital_card_profiles = resources.DigitalCardProfiles(self) - self.physical_card_profiles = resources.PhysicalCardProfiles(self) - self.inbound_check_deposits = resources.InboundCheckDeposits(self) - self.inbound_mail_items = resources.InboundMailItems(self) - self.lockboxes = resources.Lockboxes(self) + self.accounts = resources.AccountsResource(self) + self.account_numbers = resources.AccountNumbersResource(self) + self.cards = resources.CardsResource(self) + self.card_payments = resources.CardPaymentsResource(self) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResource(self) + self.card_disputes = resources.CardDisputesResource(self) + self.physical_cards = resources.PhysicalCardsResource(self) + self.digital_card_profiles = resources.DigitalCardProfilesResource(self) + self.physical_card_profiles = resources.PhysicalCardProfilesResource(self) + self.digital_wallet_tokens = resources.DigitalWalletTokensResource(self) + self.transactions = resources.TransactionsResource(self) + self.pending_transactions = resources.PendingTransactionsResource(self) + self.declined_transactions = resources.DeclinedTransactionsResource(self) + self.account_transfers = resources.AccountTransfersResource(self) + self.ach_transfers = resources.ACHTransfersResource(self) + self.ach_prenotifications = resources.ACHPrenotificationsResource(self) + self.inbound_ach_transfers = resources.InboundACHTransfersResource(self) + self.wire_transfers = resources.WireTransfersResource(self) + self.inbound_wire_transfers = resources.InboundWireTransfersResource(self) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResource(self) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResource(self) + self.check_transfers = resources.CheckTransfersResource(self) + self.inbound_check_deposits = resources.InboundCheckDepositsResource(self) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResource(self) + self.check_deposits = resources.CheckDepositsResource(self) + self.lockboxes = resources.LockboxesResource(self) + self.inbound_mail_items = resources.InboundMailItemsResource(self) + self.routing_numbers = resources.RoutingNumbersResource(self) + self.external_accounts = resources.ExternalAccountsResource(self) + self.entities = resources.EntitiesResource(self) + self.supplemental_documents = resources.SupplementalDocumentsResource(self) + self.programs = resources.ProgramsResource(self) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResource(self) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResource(self) + self.account_statements = resources.AccountStatementsResource(self) + self.files = resources.FilesResource(self) + self.documents = resources.DocumentsResource(self) + self.exports = resources.ExportsResource(self) + self.events = resources.EventsResource(self) + self.event_subscriptions = resources.EventSubscriptionsResource(self) + self.real_time_decisions = resources.RealTimeDecisionsResource(self) + self.bookkeeping_accounts = resources.BookkeepingAccountsResource(self) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResource(self) + self.bookkeeping_entries = resources.BookkeepingEntriesResource(self) + self.groups = resources.GroupsResource(self) + self.oauth_connections = resources.OAuthConnectionsResource(self) + self.oauth_tokens = resources.OAuthTokensResource(self) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResource(self) + self.intrafi_balances = resources.IntrafiBalancesResource(self) + self.intrafi_exclusions = resources.IntrafiExclusionsResource(self) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResource(self) + self.simulations = resources.SimulationsResource(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -267,42 +239,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.Client | None = None, - connection_pool_limits: httpx.Limits | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -316,50 +278,15 @@ def copy( elif set_default_query is not None: params = set_default_query - if connection_pool_limits is not None: - if http_client is not None: - raise ValueError("The 'http_client' argument is mutually exclusive with 'connection_pool_limits'") - - if not isinstance(self._client, SyncHttpxClientWrapper): - raise ValueError( - "A custom HTTP client has been set and is mutually exclusive with the 'connection_pool_limits' argument" - ) - - http_client = None - else: - if self._limits is not DEFAULT_CONNECTION_LIMITS: - connection_pool_limits = self._limits - else: - connection_pool_limits = None - - http_client = http_client or self._client - - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - connection_pool_limits=connection_pool_limits, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + http_client = http_client or self._client + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -396,17 +323,13 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) - if response.status_code == 500 or response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + if response.status_code >= 500: + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -430,57 +353,59 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class AsyncIncrease(AsyncAPIClient): - accounts: resources.AsyncAccounts - account_numbers: resources.AsyncAccountNumbers - bookkeeping_accounts: resources.AsyncBookkeepingAccounts - bookkeeping_entry_sets: resources.AsyncBookkeepingEntrySets - bookkeeping_entries: resources.AsyncBookkeepingEntries - real_time_decisions: resources.AsyncRealTimeDecisions - real_time_payments_transfers: resources.AsyncRealTimePaymentsTransfers - cards: resources.AsyncCards - card_disputes: resources.AsyncCardDisputes - card_purchase_supplements: resources.AsyncCardPurchaseSupplements - external_accounts: resources.AsyncExternalAccounts - exports: resources.AsyncExports - digital_wallet_tokens: resources.AsyncDigitalWalletTokens - transactions: resources.AsyncTransactions - pending_transactions: resources.AsyncPendingTransactions - programs: resources.AsyncPrograms - declined_transactions: resources.AsyncDeclinedTransactions - account_transfers: resources.AsyncAccountTransfers - ach_transfers: resources.AsyncACHTransfers - ach_prenotifications: resources.AsyncACHPrenotifications - documents: resources.AsyncDocuments - wire_transfers: resources.AsyncWireTransfers - check_transfers: resources.AsyncCheckTransfers - entities: resources.AsyncEntities - inbound_ach_transfers: resources.AsyncInboundACHTransfers - inbound_wire_drawdown_requests: resources.AsyncInboundWireDrawdownRequests - wire_drawdown_requests: resources.AsyncWireDrawdownRequests - events: resources.AsyncEvents - event_subscriptions: resources.AsyncEventSubscriptions - files: resources.AsyncFiles - groups: resources.AsyncGroups - oauth_connections: resources.AsyncOAuthConnections - check_deposits: resources.AsyncCheckDeposits - routing_numbers: resources.AsyncRoutingNumbers - account_statements: resources.AsyncAccountStatements - simulations: resources.AsyncSimulations - physical_cards: resources.AsyncPhysicalCards - card_payments: resources.AsyncCardPayments - proof_of_authorization_requests: resources.AsyncProofOfAuthorizationRequests - proof_of_authorization_request_submissions: resources.AsyncProofOfAuthorizationRequestSubmissions - intrafi: resources.AsyncIntrafi - real_time_payments_request_for_payments: resources.AsyncRealTimePaymentsRequestForPayments - oauth_tokens: resources.AsyncOAuthTokens - inbound_wire_transfers: resources.AsyncInboundWireTransfers - digital_card_profiles: resources.AsyncDigitalCardProfiles - physical_card_profiles: resources.AsyncPhysicalCardProfiles - inbound_check_deposits: resources.AsyncInboundCheckDeposits - inbound_mail_items: resources.AsyncInboundMailItems - lockboxes: resources.AsyncLockboxes + accounts: resources.AsyncAccountsResource + account_numbers: resources.AsyncAccountNumbersResource + cards: resources.AsyncCardsResource + card_payments: resources.AsyncCardPaymentsResource + card_purchase_supplements: resources.AsyncCardPurchaseSupplementsResource + card_disputes: resources.AsyncCardDisputesResource + physical_cards: resources.AsyncPhysicalCardsResource + digital_card_profiles: resources.AsyncDigitalCardProfilesResource + physical_card_profiles: resources.AsyncPhysicalCardProfilesResource + digital_wallet_tokens: resources.AsyncDigitalWalletTokensResource + transactions: resources.AsyncTransactionsResource + pending_transactions: resources.AsyncPendingTransactionsResource + declined_transactions: resources.AsyncDeclinedTransactionsResource + account_transfers: resources.AsyncAccountTransfersResource + ach_transfers: resources.AsyncACHTransfersResource + ach_prenotifications: resources.AsyncACHPrenotificationsResource + inbound_ach_transfers: resources.AsyncInboundACHTransfersResource + wire_transfers: resources.AsyncWireTransfersResource + inbound_wire_transfers: resources.AsyncInboundWireTransfersResource + wire_drawdown_requests: resources.AsyncWireDrawdownRequestsResource + inbound_wire_drawdown_requests: resources.AsyncInboundWireDrawdownRequestsResource + check_transfers: resources.AsyncCheckTransfersResource + inbound_check_deposits: resources.AsyncInboundCheckDepositsResource + real_time_payments_transfers: resources.AsyncRealTimePaymentsTransfersResource + check_deposits: resources.AsyncCheckDepositsResource + lockboxes: resources.AsyncLockboxesResource + inbound_mail_items: resources.AsyncInboundMailItemsResource + routing_numbers: resources.AsyncRoutingNumbersResource + external_accounts: resources.AsyncExternalAccountsResource + entities: resources.AsyncEntitiesResource + supplemental_documents: resources.AsyncSupplementalDocumentsResource + programs: resources.AsyncProgramsResource + proof_of_authorization_requests: resources.AsyncProofOfAuthorizationRequestsResource + proof_of_authorization_request_submissions: resources.AsyncProofOfAuthorizationRequestSubmissionsResource + account_statements: resources.AsyncAccountStatementsResource + files: resources.AsyncFilesResource + documents: resources.AsyncDocumentsResource + exports: resources.AsyncExportsResource + events: resources.AsyncEventsResource + event_subscriptions: resources.AsyncEventSubscriptionsResource + real_time_decisions: resources.AsyncRealTimeDecisionsResource + bookkeeping_accounts: resources.AsyncBookkeepingAccountsResource + bookkeeping_entry_sets: resources.AsyncBookkeepingEntrySetsResource + bookkeeping_entries: resources.AsyncBookkeepingEntriesResource + groups: resources.AsyncGroupsResource + oauth_connections: resources.AsyncOAuthConnectionsResource + oauth_tokens: resources.AsyncOAuthTokensResource + intrafi_account_enrollments: resources.AsyncIntrafiAccountEnrollmentsResource + intrafi_balances: resources.AsyncIntrafiBalancesResource + intrafi_exclusions: resources.AsyncIntrafiExclusionsResource + real_time_payments_request_for_payments: resources.AsyncRealTimePaymentsRequestForPaymentsResource + simulations: resources.AsyncSimulationsResource with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -488,39 +413,22 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # See httpx documentation for [custom transports](https://www.python-httpx.org/advanced/#custom-transports) - transport: AsyncTransport | None = None, - # See httpx documentation for [proxies](https://www.python-httpx.org/advanced/#http-proxying) - proxies: ProxiesTypes | None = None, - # See httpx documentation for [limits](https://www.python-httpx.org/advanced/#pool-limit-configuration) - connection_pool_limits: httpx.Limits | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -528,108 +436,99 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - transport=transport, - proxies=proxies, - limits=connection_pool_limits, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" - self.accounts = resources.AsyncAccounts(self) - self.account_numbers = resources.AsyncAccountNumbers(self) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccounts(self) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySets(self) - self.bookkeeping_entries = resources.AsyncBookkeepingEntries(self) - self.real_time_decisions = resources.AsyncRealTimeDecisions(self) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfers(self) - self.cards = resources.AsyncCards(self) - self.card_disputes = resources.AsyncCardDisputes(self) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplements(self) - self.external_accounts = resources.AsyncExternalAccounts(self) - self.exports = resources.AsyncExports(self) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokens(self) - self.transactions = resources.AsyncTransactions(self) - self.pending_transactions = resources.AsyncPendingTransactions(self) - self.programs = resources.AsyncPrograms(self) - self.declined_transactions = resources.AsyncDeclinedTransactions(self) - self.account_transfers = resources.AsyncAccountTransfers(self) - self.ach_transfers = resources.AsyncACHTransfers(self) - self.ach_prenotifications = resources.AsyncACHPrenotifications(self) - self.documents = resources.AsyncDocuments(self) - self.wire_transfers = resources.AsyncWireTransfers(self) - self.check_transfers = resources.AsyncCheckTransfers(self) - self.entities = resources.AsyncEntities(self) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfers(self) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequests(self) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequests(self) - self.events = resources.AsyncEvents(self) - self.event_subscriptions = resources.AsyncEventSubscriptions(self) - self.files = resources.AsyncFiles(self) - self.groups = resources.AsyncGroups(self) - self.oauth_connections = resources.AsyncOAuthConnections(self) - self.check_deposits = resources.AsyncCheckDeposits(self) - self.routing_numbers = resources.AsyncRoutingNumbers(self) - self.account_statements = resources.AsyncAccountStatements(self) - self.simulations = resources.AsyncSimulations(self) - self.physical_cards = resources.AsyncPhysicalCards(self) - self.card_payments = resources.AsyncCardPayments(self) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequests(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissions(self) - self.intrafi = resources.AsyncIntrafi(self) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPayments(self) - self.oauth_tokens = resources.AsyncOAuthTokens(self) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfers(self) - self.digital_card_profiles = resources.AsyncDigitalCardProfiles(self) - self.physical_card_profiles = resources.AsyncPhysicalCardProfiles(self) - self.inbound_check_deposits = resources.AsyncInboundCheckDeposits(self) - self.inbound_mail_items = resources.AsyncInboundMailItems(self) - self.lockboxes = resources.AsyncLockboxes(self) + self.accounts = resources.AsyncAccountsResource(self) + self.account_numbers = resources.AsyncAccountNumbersResource(self) + self.cards = resources.AsyncCardsResource(self) + self.card_payments = resources.AsyncCardPaymentsResource(self) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResource(self) + self.card_disputes = resources.AsyncCardDisputesResource(self) + self.physical_cards = resources.AsyncPhysicalCardsResource(self) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResource(self) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResource(self) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResource(self) + self.transactions = resources.AsyncTransactionsResource(self) + self.pending_transactions = resources.AsyncPendingTransactionsResource(self) + self.declined_transactions = resources.AsyncDeclinedTransactionsResource(self) + self.account_transfers = resources.AsyncAccountTransfersResource(self) + self.ach_transfers = resources.AsyncACHTransfersResource(self) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResource(self) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResource(self) + self.wire_transfers = resources.AsyncWireTransfersResource(self) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResource(self) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResource(self) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResource(self) + self.check_transfers = resources.AsyncCheckTransfersResource(self) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResource(self) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResource(self) + self.check_deposits = resources.AsyncCheckDepositsResource(self) + self.lockboxes = resources.AsyncLockboxesResource(self) + self.inbound_mail_items = resources.AsyncInboundMailItemsResource(self) + self.routing_numbers = resources.AsyncRoutingNumbersResource(self) + self.external_accounts = resources.AsyncExternalAccountsResource(self) + self.entities = resources.AsyncEntitiesResource(self) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) + self.programs = resources.AsyncProgramsResource(self) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) + self.account_statements = resources.AsyncAccountStatementsResource(self) + self.files = resources.AsyncFilesResource(self) + self.documents = resources.AsyncDocumentsResource(self) + self.exports = resources.AsyncExportsResource(self) + self.events = resources.AsyncEventsResource(self) + self.event_subscriptions = resources.AsyncEventSubscriptionsResource(self) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResource(self) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResource(self) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResource(self) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResource(self) + self.groups = resources.AsyncGroupsResource(self) + self.oauth_connections = resources.AsyncOAuthConnectionsResource(self) + self.oauth_tokens = resources.AsyncOAuthTokensResource(self) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResource(self) + self.intrafi_balances = resources.AsyncIntrafiBalancesResource(self) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResource(self) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResource(self) + self.simulations = resources.AsyncSimulationsResource(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -642,42 +541,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f"async:{get_async_library()}", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f'async:{get_async_library()}', + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.AsyncClient | None = None, - connection_pool_limits: httpx.Limits | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -691,50 +580,15 @@ def copy( elif set_default_query is not None: params = set_default_query - if connection_pool_limits is not None: - if http_client is not None: - raise ValueError("The 'http_client' argument is mutually exclusive with 'connection_pool_limits'") - - if not isinstance(self._client, AsyncHttpxClientWrapper): - raise ValueError( - "A custom HTTP client has been set and is mutually exclusive with the 'connection_pool_limits' argument" - ) - - http_client = None - else: - if self._limits is not DEFAULT_CONNECTION_LIMITS: - connection_pool_limits = self._limits - else: - connection_pool_limits = None - - http_client = http_client or self._client - - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - connection_pool_limits=connection_pool_limits, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + http_client = http_client or self._client + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -771,17 +625,13 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) - if response.status_code == 500 or response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + if response.status_code >= 500: + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -805,297 +655,226 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: - self.accounts = resources.AccountsWithRawResponse(client.accounts) - self.account_numbers = resources.AccountNumbersWithRawResponse(client.account_numbers) - self.bookkeeping_accounts = resources.BookkeepingAccountsWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsWithRawResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.BookkeepingEntriesWithRawResponse(client.bookkeeping_entries) - self.real_time_decisions = resources.RealTimeDecisionsWithRawResponse(client.real_time_decisions) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersWithRawResponse( - client.real_time_payments_transfers - ) - self.cards = resources.CardsWithRawResponse(client.cards) - self.card_disputes = resources.CardDisputesWithRawResponse(client.card_disputes) - self.card_purchase_supplements = resources.CardPurchaseSupplementsWithRawResponse( - client.card_purchase_supplements - ) - self.external_accounts = resources.ExternalAccountsWithRawResponse(client.external_accounts) - self.exports = resources.ExportsWithRawResponse(client.exports) - self.digital_wallet_tokens = resources.DigitalWalletTokensWithRawResponse(client.digital_wallet_tokens) - self.transactions = resources.TransactionsWithRawResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsWithRawResponse(client.pending_transactions) - self.programs = resources.ProgramsWithRawResponse(client.programs) - self.declined_transactions = resources.DeclinedTransactionsWithRawResponse(client.declined_transactions) - self.account_transfers = resources.AccountTransfersWithRawResponse(client.account_transfers) - self.ach_transfers = resources.ACHTransfersWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsWithRawResponse(client.ach_prenotifications) - self.documents = resources.DocumentsWithRawResponse(client.documents) - self.wire_transfers = resources.WireTransfersWithRawResponse(client.wire_transfers) - self.check_transfers = resources.CheckTransfersWithRawResponse(client.check_transfers) - self.entities = resources.EntitiesWithRawResponse(client.entities) - self.inbound_ach_transfers = resources.InboundACHTransfersWithRawResponse(client.inbound_ach_transfers) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsWithRawResponse( - client.inbound_wire_drawdown_requests - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsWithRawResponse(client.wire_drawdown_requests) - self.events = resources.EventsWithRawResponse(client.events) - self.event_subscriptions = resources.EventSubscriptionsWithRawResponse(client.event_subscriptions) - self.files = resources.FilesWithRawResponse(client.files) - self.groups = resources.GroupsWithRawResponse(client.groups) - self.oauth_connections = resources.OAuthConnectionsWithRawResponse(client.oauth_connections) - self.check_deposits = resources.CheckDepositsWithRawResponse(client.check_deposits) - self.routing_numbers = resources.RoutingNumbersWithRawResponse(client.routing_numbers) - self.account_statements = resources.AccountStatementsWithRawResponse(client.account_statements) - self.simulations = resources.SimulationsWithRawResponse(client.simulations) - self.physical_cards = resources.PhysicalCardsWithRawResponse(client.physical_cards) - self.card_payments = resources.CardPaymentsWithRawResponse(client.card_payments) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.intrafi = resources.IntrafiWithRawResponse(client.intrafi) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsWithRawResponse( - client.real_time_payments_request_for_payments - ) - self.oauth_tokens = resources.OAuthTokensWithRawResponse(client.oauth_tokens) - self.inbound_wire_transfers = resources.InboundWireTransfersWithRawResponse(client.inbound_wire_transfers) - self.digital_card_profiles = resources.DigitalCardProfilesWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesWithRawResponse(client.physical_card_profiles) - self.inbound_check_deposits = resources.InboundCheckDepositsWithRawResponse(client.inbound_check_deposits) - self.inbound_mail_items = resources.InboundMailItemsWithRawResponse(client.inbound_mail_items) - self.lockboxes = resources.LockboxesWithRawResponse(client.lockboxes) - + self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) + self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) + self.cards = resources.CardsResourceWithRawResponse(client.cards) + self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) + self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) + self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) + self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) + self.declined_transactions = resources.DeclinedTransactionsResourceWithRawResponse(client.declined_transactions) + self.account_transfers = resources.AccountTransfersResourceWithRawResponse(client.account_transfers) + self.ach_transfers = resources.ACHTransfersResourceWithRawResponse(client.ach_transfers) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) + self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) + self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) + self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) + self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) + self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) + self.entities = resources.EntitiesResourceWithRawResponse(client.entities) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.programs = resources.ProgramsResourceWithRawResponse(client.programs) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) + self.files = resources.FilesResourceWithRawResponse(client.files) + self.documents = resources.DocumentsResourceWithRawResponse(client.documents) + self.exports = resources.ExportsResourceWithRawResponse(client.exports) + self.events = resources.EventsResourceWithRawResponse(client.events) + self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) + self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) + self.groups = resources.GroupsResourceWithRawResponse(client.groups) + self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) + self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) + self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: - self.accounts = resources.AsyncAccountsWithRawResponse(client.accounts) - self.account_numbers = resources.AsyncAccountNumbersWithRawResponse(client.account_numbers) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsWithRawResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesWithRawResponse(client.bookkeeping_entries) - self.real_time_decisions = resources.AsyncRealTimeDecisionsWithRawResponse(client.real_time_decisions) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersWithRawResponse( - client.real_time_payments_transfers - ) - self.cards = resources.AsyncCardsWithRawResponse(client.cards) - self.card_disputes = resources.AsyncCardDisputesWithRawResponse(client.card_disputes) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsWithRawResponse( - client.card_purchase_supplements - ) - self.external_accounts = resources.AsyncExternalAccountsWithRawResponse(client.external_accounts) - self.exports = resources.AsyncExportsWithRawResponse(client.exports) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensWithRawResponse(client.digital_wallet_tokens) - self.transactions = resources.AsyncTransactionsWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsWithRawResponse(client.pending_transactions) - self.programs = resources.AsyncProgramsWithRawResponse(client.programs) - self.declined_transactions = resources.AsyncDeclinedTransactionsWithRawResponse(client.declined_transactions) - self.account_transfers = resources.AsyncAccountTransfersWithRawResponse(client.account_transfers) - self.ach_transfers = resources.AsyncACHTransfersWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsWithRawResponse(client.ach_prenotifications) - self.documents = resources.AsyncDocumentsWithRawResponse(client.documents) - self.wire_transfers = resources.AsyncWireTransfersWithRawResponse(client.wire_transfers) - self.check_transfers = resources.AsyncCheckTransfersWithRawResponse(client.check_transfers) - self.entities = resources.AsyncEntitiesWithRawResponse(client.entities) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersWithRawResponse(client.inbound_ach_transfers) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsWithRawResponse( - client.inbound_wire_drawdown_requests - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsWithRawResponse(client.wire_drawdown_requests) - self.events = resources.AsyncEventsWithRawResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsWithRawResponse(client.event_subscriptions) - self.files = resources.AsyncFilesWithRawResponse(client.files) - self.groups = resources.AsyncGroupsWithRawResponse(client.groups) - self.oauth_connections = resources.AsyncOAuthConnectionsWithRawResponse(client.oauth_connections) - self.check_deposits = resources.AsyncCheckDepositsWithRawResponse(client.check_deposits) - self.routing_numbers = resources.AsyncRoutingNumbersWithRawResponse(client.routing_numbers) - self.account_statements = resources.AsyncAccountStatementsWithRawResponse(client.account_statements) - self.simulations = resources.AsyncSimulationsWithRawResponse(client.simulations) - self.physical_cards = resources.AsyncPhysicalCardsWithRawResponse(client.physical_cards) - self.card_payments = resources.AsyncCardPaymentsWithRawResponse(client.card_payments) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.intrafi = resources.AsyncIntrafiWithRawResponse(client.intrafi) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsWithRawResponse( - client.real_time_payments_request_for_payments - ) - self.oauth_tokens = resources.AsyncOAuthTokensWithRawResponse(client.oauth_tokens) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersWithRawResponse(client.inbound_wire_transfers) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithRawResponse(client.physical_card_profiles) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithRawResponse(client.inbound_check_deposits) - self.inbound_mail_items = resources.AsyncInboundMailItemsWithRawResponse(client.inbound_mail_items) - self.lockboxes = resources.AsyncLockboxesWithRawResponse(client.lockboxes) - + self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) + self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) + self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) + self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) + self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) + self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) + self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) + self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) + self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) + self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) + self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) + self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) + self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) + self.files = resources.AsyncFilesResourceWithRawResponse(client.files) + self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) + self.exports = resources.AsyncExportsResourceWithRawResponse(client.exports) + self.events = resources.AsyncEventsResourceWithRawResponse(client.events) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) + self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) + self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) + self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: - self.accounts = resources.AccountsWithStreamingResponse(client.accounts) - self.account_numbers = resources.AccountNumbersWithStreamingResponse(client.account_numbers) - self.bookkeeping_accounts = resources.BookkeepingAccountsWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsWithStreamingResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.BookkeepingEntriesWithStreamingResponse(client.bookkeeping_entries) - self.real_time_decisions = resources.RealTimeDecisionsWithStreamingResponse(client.real_time_decisions) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersWithStreamingResponse( - client.real_time_payments_transfers - ) - self.cards = resources.CardsWithStreamingResponse(client.cards) - self.card_disputes = resources.CardDisputesWithStreamingResponse(client.card_disputes) - self.card_purchase_supplements = resources.CardPurchaseSupplementsWithStreamingResponse( - client.card_purchase_supplements - ) - self.external_accounts = resources.ExternalAccountsWithStreamingResponse(client.external_accounts) - self.exports = resources.ExportsWithStreamingResponse(client.exports) - self.digital_wallet_tokens = resources.DigitalWalletTokensWithStreamingResponse(client.digital_wallet_tokens) - self.transactions = resources.TransactionsWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsWithStreamingResponse(client.pending_transactions) - self.programs = resources.ProgramsWithStreamingResponse(client.programs) - self.declined_transactions = resources.DeclinedTransactionsWithStreamingResponse(client.declined_transactions) - self.account_transfers = resources.AccountTransfersWithStreamingResponse(client.account_transfers) - self.ach_transfers = resources.ACHTransfersWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsWithStreamingResponse(client.ach_prenotifications) - self.documents = resources.DocumentsWithStreamingResponse(client.documents) - self.wire_transfers = resources.WireTransfersWithStreamingResponse(client.wire_transfers) - self.check_transfers = resources.CheckTransfersWithStreamingResponse(client.check_transfers) - self.entities = resources.EntitiesWithStreamingResponse(client.entities) - self.inbound_ach_transfers = resources.InboundACHTransfersWithStreamingResponse(client.inbound_ach_transfers) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsWithStreamingResponse(client.wire_drawdown_requests) - self.events = resources.EventsWithStreamingResponse(client.events) - self.event_subscriptions = resources.EventSubscriptionsWithStreamingResponse(client.event_subscriptions) - self.files = resources.FilesWithStreamingResponse(client.files) - self.groups = resources.GroupsWithStreamingResponse(client.groups) - self.oauth_connections = resources.OAuthConnectionsWithStreamingResponse(client.oauth_connections) - self.check_deposits = resources.CheckDepositsWithStreamingResponse(client.check_deposits) - self.routing_numbers = resources.RoutingNumbersWithStreamingResponse(client.routing_numbers) - self.account_statements = resources.AccountStatementsWithStreamingResponse(client.account_statements) - self.simulations = resources.SimulationsWithStreamingResponse(client.simulations) - self.physical_cards = resources.PhysicalCardsWithStreamingResponse(client.physical_cards) - self.card_payments = resources.CardPaymentsWithStreamingResponse(client.card_payments) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.intrafi = resources.IntrafiWithStreamingResponse(client.intrafi) - self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) - self.oauth_tokens = resources.OAuthTokensWithStreamingResponse(client.oauth_tokens) - self.inbound_wire_transfers = resources.InboundWireTransfersWithStreamingResponse(client.inbound_wire_transfers) - self.digital_card_profiles = resources.DigitalCardProfilesWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesWithStreamingResponse(client.physical_card_profiles) - self.inbound_check_deposits = resources.InboundCheckDepositsWithStreamingResponse(client.inbound_check_deposits) - self.inbound_mail_items = resources.InboundMailItemsWithStreamingResponse(client.inbound_mail_items) - self.lockboxes = resources.LockboxesWithStreamingResponse(client.lockboxes) - + self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) + self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.cards = resources.CardsResourceWithStreamingResponse(client.cards) + self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) + self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) + self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) + self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) + self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) + self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) + self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) + self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) + self.files = resources.FilesResourceWithStreamingResponse(client.files) + self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) + self.exports = resources.ExportsResourceWithStreamingResponse(client.exports) + self.events = resources.EventsResourceWithStreamingResponse(client.events) + self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) + self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) + self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) + self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) + self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) + self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: - self.accounts = resources.AsyncAccountsWithStreamingResponse(client.accounts) - self.account_numbers = resources.AsyncAccountNumbersWithStreamingResponse(client.account_numbers) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsWithStreamingResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesWithStreamingResponse(client.bookkeeping_entries) - self.real_time_decisions = resources.AsyncRealTimeDecisionsWithStreamingResponse(client.real_time_decisions) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersWithStreamingResponse( - client.real_time_payments_transfers - ) - self.cards = resources.AsyncCardsWithStreamingResponse(client.cards) - self.card_disputes = resources.AsyncCardDisputesWithStreamingResponse(client.card_disputes) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsWithStreamingResponse( - client.card_purchase_supplements - ) - self.external_accounts = resources.AsyncExternalAccountsWithStreamingResponse(client.external_accounts) - self.exports = resources.AsyncExportsWithStreamingResponse(client.exports) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensWithStreamingResponse( - client.digital_wallet_tokens - ) - self.transactions = resources.AsyncTransactionsWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsWithStreamingResponse(client.pending_transactions) - self.programs = resources.AsyncProgramsWithStreamingResponse(client.programs) - self.declined_transactions = resources.AsyncDeclinedTransactionsWithStreamingResponse( - client.declined_transactions - ) - self.account_transfers = resources.AsyncAccountTransfersWithStreamingResponse(client.account_transfers) - self.ach_transfers = resources.AsyncACHTransfersWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsWithStreamingResponse(client.ach_prenotifications) - self.documents = resources.AsyncDocumentsWithStreamingResponse(client.documents) - self.wire_transfers = resources.AsyncWireTransfersWithStreamingResponse(client.wire_transfers) - self.check_transfers = resources.AsyncCheckTransfersWithStreamingResponse(client.check_transfers) - self.entities = resources.AsyncEntitiesWithStreamingResponse(client.entities) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersWithStreamingResponse( - client.inbound_ach_transfers - ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsWithStreamingResponse( - client.wire_drawdown_requests - ) - self.events = resources.AsyncEventsWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsWithStreamingResponse(client.event_subscriptions) - self.files = resources.AsyncFilesWithStreamingResponse(client.files) - self.groups = resources.AsyncGroupsWithStreamingResponse(client.groups) - self.oauth_connections = resources.AsyncOAuthConnectionsWithStreamingResponse(client.oauth_connections) - self.check_deposits = resources.AsyncCheckDepositsWithStreamingResponse(client.check_deposits) - self.routing_numbers = resources.AsyncRoutingNumbersWithStreamingResponse(client.routing_numbers) - self.account_statements = resources.AsyncAccountStatementsWithStreamingResponse(client.account_statements) - self.simulations = resources.AsyncSimulationsWithStreamingResponse(client.simulations) - self.physical_cards = resources.AsyncPhysicalCardsWithStreamingResponse(client.physical_cards) - self.card_payments = resources.AsyncCardPaymentsWithStreamingResponse(client.card_payments) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.intrafi = resources.AsyncIntrafiWithStreamingResponse(client.intrafi) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) - self.oauth_tokens = resources.AsyncOAuthTokensWithStreamingResponse(client.oauth_tokens) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersWithStreamingResponse( - client.inbound_wire_transfers - ) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesWithStreamingResponse( - client.physical_card_profiles - ) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsWithStreamingResponse( - client.inbound_check_deposits - ) - self.inbound_mail_items = resources.AsyncInboundMailItemsWithStreamingResponse(client.inbound_mail_items) - self.lockboxes = resources.AsyncLockboxesWithStreamingResponse(client.lockboxes) - + self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) + self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) + self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) + self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) + self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) + self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) + self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) + self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) + self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) + self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) + self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) + self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) + self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) + self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) + self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) + self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) Client = Increase -AsyncClient = AsyncIncrease +AsyncClient = AsyncIncrease \ No newline at end of file diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 274320ca5..54a98364f 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,7 +64,9 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) + return flatten( + [self._stringify_item(key, value, opts) for key, value in params.items()] + ) def _stringify_item( self, @@ -79,7 +81,9 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", + f"{key}.{subkey}" + if nested_format == "dots" + else f"{key}[{subkey}]", subvalue, opts, ) @@ -92,7 +96,11 @@ def _stringify_item( return [ ( key, - ",".join(self._primitive_value_to_str(item) for item in value if item is not None), + ",".join( + self._primitive_value_to_str(item) + for item in value + if item is not None + ), ), ] elif array_format == "repeat": @@ -101,7 +109,9 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + raise NotImplementedError( + "The array indices format is not supported yet" + ) elif array_format == "brackets": items = [] key = key + "[]" @@ -146,5 +156,9 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format - self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + self.array_format = ( + qs.array_format if isinstance(array_format, NotGiven) else array_format + ) + self.nested_format = ( + qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + ) diff --git a/src/increase/_response.py b/src/increase/_response.py index 9cb0a9769..5d4268a31 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, override, get_origin +from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin import anyio import httpx @@ -26,6 +26,7 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base +from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -189,10 +190,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to - # handle the legacy binary response case - if inspect.isclass(cast_to) and cast_to.__name__ == "HttpxBinaryResponseContent": - return cast(R, cast_to(response)) # type: ignore - + if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -207,7 +205,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") + raise TypeError( + "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" + ) if ( cast_to is not object @@ -258,6 +258,8 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): + + @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -362,6 +364,8 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): + + @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 7b5fc6503..357b42be0 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,7 +9,9 @@ import httpx -from ._utils import extract_type_var_from_base +from ._utils import is_mapping, is_dict, extract_type_var_from_base +from ._exceptions import APIError +from ._response import APIResponse, AsyncAPIResponse if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -53,10 +55,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -117,10 +119,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index e85f284ea..0efc60a5e 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,6 +1,7 @@ from __future__ import annotations from os import PathLike +from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -13,8 +14,10 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, + AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -190,7 +193,7 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", - "HttpxBinaryResponseContent", + ], ) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index c46a62a69..ffd883e9d 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,5 +59,4 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: - ... + def __load__(self) -> T: ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index d0d810337..238e54ada 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): + if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 34797c290..2fc5a1c65 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,20 +211,17 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: - ... + def foo(*, a: str) -> str: ... @overload - def foo(*, b: bool) -> str: - ... + def foo(*, b: bool) -> str: ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: - ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: ... ``` """ @@ -286,18 +283,15 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: - ... +def strip_not_given(obj: None) -> None: ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: - ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... @overload -def strip_not_given(obj: object) -> object: - ... +def strip_not_given(obj: object) -> object: ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index 9b493dcb2..a0044459f 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.61.0" # x-release-please-version +__version__ = "0.70.0" # x-release-please-version \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 120908a4c..731a67982 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,16 +1,18 @@ from __future__ import annotations -import os import asyncio import logging -from typing import TYPE_CHECKING, Iterator, AsyncIterator +from typing import Iterator import pytest +import os +from typing import TYPE_CHECKING, AsyncIterator + from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -28,22 +30,20 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" - @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") + raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client - @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {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: + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client diff --git a/tests/test_files.py b/tests/test_files.py index f46618d02..42fa7ae0a 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path = Path(__file__).parent.parent.joinpath("README.md") +readme_path =Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([("file", readme_path)]) + result = to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([("file", readme_path)]) + result = await async_to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) def test_string_not_allowed() -> None: @@ -49,3 +49,4 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) + diff --git a/tests/test_response.py b/tests/test_response.py index 7da95c19c..e743d69e2 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import Increase, BaseModel, AsyncIncrease +from increase import BaseModel, Increase, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 4dd59699e..ac4693911 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,7 +28,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_missing_event( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -44,7 +46,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_event_missing_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -60,7 +64,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -82,7 +88,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events_with_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -106,7 +114,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines_with_empty_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -128,7 +138,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_json_escaped_double_new_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -145,7 +157,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From b94d3b500787e83965915a474360348b363aaa70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Jul 2024 00:32:44 +0000 Subject: [PATCH 0081/1325] feat(api): OpenAPI spec update via Stainless API (#503) --- .stats.yml | 4 ++-- api.md | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 44258ef8a..b6f120e3b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b58060b11c0db380a4466825744fafd8109f35332142fa44e9637726f065688c.yml +configured_endpoints: 195 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d808b85bc3bcedbad41a5061fc6c190b984bc1bc1e9882da0229f9388d6ffa0.yml diff --git a/api.md b/api.md index 35d52ad09..db4588dba 100644 --- a/api.md +++ b/api.md @@ -814,18 +814,6 @@ Methods: - client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer -## InboundInternationalACHTransfers - -Types: - -```python -from increase.types.simulations import InboundInternationalACHTransferCreateResponse -``` - -Methods: - -- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransferCreateResponse - ## CardAuthorizations Types: From c6148f116123c30330aab06318017696c45858e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 00:26:58 +0000 Subject: [PATCH 0082/1325] feat(api): OpenAPI spec update via Stainless API (#504) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b6f120e3b..0ff1831d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d808b85bc3bcedbad41a5061fc6c190b984bc1bc1e9882da0229f9388d6ffa0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-09dea1f9e0a51ed01cfe1c38084fe1e05580726ad007e3acecc9cc98d6c5e4bc.yml From f5b6b9d1f84f2aa966e8141a57880958c20d015e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 13 Jul 2024 00:48:05 +0000 Subject: [PATCH 0083/1325] feat(api): OpenAPI spec update via Stainless API (#505) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0ff1831d0..ad8610176 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-09dea1f9e0a51ed01cfe1c38084fe1e05580726ad007e3acecc9cc98d6c5e4bc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d46b5e681753c28aae95c4ad2c754ede4cc9c06092dd8cb22b7f6ddd39adf630.yml From c376f18abd99b1c156fe402cfd81bf1ca58ee6d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 00:24:57 +0000 Subject: [PATCH 0084/1325] feat(api): OpenAPI spec update via Stainless API (#506) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ad8610176..4a604f8ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d46b5e681753c28aae95c4ad2c754ede4cc9c06092dd8cb22b7f6ddd39adf630.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-be8e4bb2cfe01863200591fca9cdf7d0e99f58d2780f4f9874d123bb9e0e7ee5.yml From 6d750e515a3b6549f8c95d6f2d2f1e86286853b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 01:54:36 +0000 Subject: [PATCH 0085/1325] feat(api): OpenAPI spec update via Stainless API (#507) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4a604f8ee..97075707a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-be8e4bb2cfe01863200591fca9cdf7d0e99f58d2780f4f9874d123bb9e0e7ee5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-425f6ed67cd1ce367e761ce06208e2053c6aecf90c53c42660c103d8d558c2c7.yml From cb7706b3a54bd6e657046a97d2ae2d36250ab7a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 14 Jul 2024 16:58:51 +0000 Subject: [PATCH 0086/1325] chore(internal): version bump (#508) --- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 0fa3c2f23..842183124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.70.0" +version = "0.71.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a0044459f..e880ca207 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.70.0" # x-release-please-version \ No newline at end of file +__version__ = "0.71.0" # x-release-please-version \ No newline at end of file From 6efd6ec136218f7e08d30694063a388a66b76932 Mon Sep 17 00:00:00 2001 From: Robert Craigie Date: Mon, 15 Jul 2024 16:22:08 +0100 Subject: [PATCH 0087/1325] chore: fixes --- .release-please-manifest.json | 2 +- README.md | 35 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 +- src/increase/_base_client.py | 83 +- src/increase/_client.py | 757 +++- src/increase/_compat.py | 6 +- src/increase/_legacy_response.py | 456 -- src/increase/_qs.py | 26 +- src/increase/_response.py | 12 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 - src/increase/_utils/_data.py | 56 + src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- src/increase/resources/__init__.py | 1222 +++--- src/increase/resources/account_numbers.py | 62 +- src/increase/resources/account_statements.py | 54 +- src/increase/resources/account_transfers.py | 66 +- src/increase/resources/accounts.py | 70 +- .../resources/ach_prenotifications.py | 58 +- src/increase/resources/ach_transfers.py | 66 +- .../resources/bookkeeping_accounts.py | 62 +- src/increase/resources/bookkeeping_entries.py | 54 +- .../resources/bookkeeping_entry_sets.py | 58 +- src/increase/resources/card_disputes.py | 58 +- src/increase/resources/card_payments.py | 54 +- .../resources/card_purchase_supplements.py | 54 +- src/increase/resources/cards.py | 82 +- src/increase/resources/check_deposits.py | 58 +- src/increase/resources/check_transfers.py | 70 +- .../resources/declined_transactions.py | 54 +- .../resources/digital_card_profiles.py | 66 +- .../resources/digital_wallet_tokens.py | 54 +- src/increase/resources/documents.py | 54 +- .../resources/{entities => }/entities.py | 656 ++- src/increase/resources/entities/__init__.py | 61 - .../resources/entities/beneficial_owners.py | 420 -- .../resources/entities/industry_code.py | 180 - src/increase/resources/event_subscriptions.py | 62 +- src/increase/resources/events.py | 54 +- src/increase/resources/exports.py | 58 +- src/increase/resources/external_accounts.py | 62 +- src/increase/resources/files.py | 58 +- src/increase/resources/groups.py | 66 +- .../resources/inbound_ach_transfers.py | 176 +- .../resources/inbound_check_deposits.py | 187 +- src/increase/resources/inbound_mail_items.py | 54 +- .../inbound_wire_drawdown_requests.py | 54 +- .../resources/inbound_wire_transfers.py | 54 +- src/increase/resources/intrafi/__init__.py | 61 - src/increase/resources/intrafi/intrafi.py | 144 - ...ents.py => intrafi_account_enrollments.py} | 130 +- .../balances.py => intrafi_balances.py} | 82 +- .../exclusions.py => intrafi_exclusions.py} | 126 +- src/increase/resources/lockboxes.py | 62 +- src/increase/resources/oauth_connections.py | 54 +- src/increase/resources/oauth_tokens.py | 50 +- .../resources/pending_transactions.py | 54 +- .../resources/physical_card_profiles.py | 66 +- src/increase/resources/physical_cards.py | 62 +- src/increase/resources/programs.py | 54 +- ...of_of_authorization_request_submissions.py | 66 +- .../proof_of_authorization_requests.py | 54 +- src/increase/resources/real_time_decisions.py | 54 +- ...real_time_payments_request_for_payments.py | 62 +- .../resources/real_time_payments_transfers.py | 58 +- src/increase/resources/routing_numbers.py | 64 +- .../resources/simulations/__init__.py | 584 +-- .../simulations/account_statements.py | 50 +- .../simulations/account_transfers.py | 50 +- .../resources/simulations/ach_transfers.py | 263 +- .../card_authorization_expirations.py | 168 + .../{cards.py => card_authorizations.py} | 225 +- .../resources/simulations/card_disputes.py | 50 +- .../simulations/card_fuel_confirmations.py | 188 + .../resources/simulations/card_increments.py | 198 + .../resources/simulations/card_refunds.py | 50 +- .../resources/simulations/card_reversals.py | 190 + .../resources/simulations/card_settlements.py | 202 + .../resources/simulations/check_deposits.py | 58 +- .../resources/simulations/check_transfers.py | 50 +- .../digital_wallet_token_requests.py | 50 +- .../resources/simulations/documents.py | 50 +- .../simulations/inbound_ach_transfers.py | 352 ++ .../simulations/inbound_check_deposits.py | 50 +- .../simulations/inbound_funds_holds.py | 50 +- .../inbound_international_ach_transfers.py | 244 -- .../inbound_real_time_payments_transfers.py | 228 + .../inbound_wire_drawdown_requests.py | 50 +- .../simulations/inbound_wire_transfers.py | 330 ++ .../simulations/interest_payments.py | 54 +- .../resources/simulations/physical_cards.py | 76 +- .../resources/simulations/programs.py | 50 +- .../real_time_payments_transfers.py | 216 +- .../resources/simulations/simulations.py | 1449 +++---- .../resources/simulations/wire_transfers.py | 339 +- .../{entities => }/supplemental_documents.py | 115 +- src/increase/resources/transactions.py | 54 +- .../resources/wire_drawdown_requests.py | 58 +- src/increase/resources/wire_transfers.py | 268 +- src/increase/types/__init__.py | 41 +- src/increase/types/declined_transaction.py | 257 -- .../types/declined_transaction_list_params.py | 1 - src/increase/types/entities/__init__.py | 13 - src/increase/types/entity.py | 29 +- ...entity_archive_beneficial_owner_params.py} | 7 +- ... entity_create_beneficial_owner_params.py} | 9 +- ...ent.py => entity_supplemental_document.py} | 9 +- ...update_beneficial_owner_address_params.py} | 7 +- ... => entity_update_industry_code_params.py} | 4 +- src/increase/types/inbound_ach_transfer.py | 237 + ...r_create_notification_of_change_params.py} | 4 +- src/increase/types/inbound_check_deposit.py | 11 +- .../inbound_check_deposit_return_params.py | 17 + src/increase/types/inbound_mail_item_list.py | 16 - src/increase/types/inbound_wire_transfer.py | 3 + src/increase/types/intrafi/__init__.py | 11 - .../intrafi_account_enrollment.py | 2 +- ...trafi_account_enrollment_create_params.py} | 4 +- ...intrafi_account_enrollment_list_params.py} | 4 +- .../types/{intrafi => }/intrafi_balance.py | 2 +- .../types/{intrafi => }/intrafi_exclusion.py | 2 +- ....py => intrafi_exclusion_create_params.py} | 4 +- ...ms.py => intrafi_exclusion_list_params.py} | 4 +- src/increase/types/lockbox_list.py | 16 - ...ber.py => routing_number_list_response.py} | 4 +- src/increase/types/simulations/__init__.py | 36 +- .../ach_transfer_create_inbound_params.py | 51 - ...r_create_notification_of_change_params.py} | 4 +- ...py => card_authorization_create_params.py} | 4 +- .../card_authorization_create_response.py | 33 + ...authorization_expiration_create_params.py} | 4 +- .../card_authorization_simulation.py | 1817 -------- .../card_fuel_confirmation_create_params.py} | 4 +- .../card_increment_create_params.py} | 4 +- .../card_reversal_create_params.py} | 4 +- ...ms.py => card_settlement_create_params.py} | 4 +- .../inbound_ach_transfer_create_params.py | 89 + .../inbound_international_ach_transfer.py | 260 -- ...nternational_ach_transfer_create_params.py | 47 - ...l_time_payments_transfer_create_params.py} | 4 +- ..._time_payments_transfer_create_response.py | 34 + ...ime_payments_transfer_simulation_result.py | 3857 ----------------- ...=> inbound_wire_transfer_create_params.py} | 10 +- ... physical_card_advance_shipment_params.py} | 4 +- .../supplemental_document_create_params.py | 3 + .../supplemental_document_list_params.py | 0 src/increase/types/transaction.py | 301 +- src/increase/types/transaction_list_params.py | 2 - src/increase/types/wire_transfer.py | 3 + tests/api_resources/entities/__init__.py | 1 - .../entities/test_beneficial_owners.py | 479 -- .../entities/test_industry_code.py | 106 - tests/api_resources/intrafi/__init__.py | 1 - .../simulations/test_account_statements.py | 2 +- .../simulations/test_account_transfers.py | 10 +- .../simulations/test_ach_transfers.py | 161 +- .../test_card_authorization_expirations.py | 84 + .../simulations/test_card_authorizations.py | 116 + .../simulations/test_card_disputes.py | 2 +- .../test_card_fuel_confirmations.py | 90 + .../simulations/test_card_increments.py | 108 + .../simulations/test_card_refunds.py | 2 +- .../simulations/test_card_reversals.py | 100 + .../simulations/test_card_settlements.py | 108 + tests/api_resources/simulations/test_cards.py | 203 - .../simulations/test_check_deposits.py | 22 +- .../simulations/test_check_transfers.py | 10 +- .../test_digital_wallet_token_requests.py | 2 +- .../simulations/test_documents.py | 2 +- .../simulations/test_inbound_ach_transfers.py | 125 + .../test_inbound_check_deposits.py | 2 +- .../simulations/test_inbound_funds_holds.py | 2 +- ...est_inbound_international_ach_transfers.py | 130 - ...st_inbound_real_time_payments_transfers.py | 138 + .../test_inbound_wire_drawdown_requests.py | 2 +- .../test_inbound_wire_transfers.py | 136 + .../simulations/test_interest_payments.py | 2 +- .../simulations/test_physical_cards.py | 34 +- .../simulations/test_programs.py | 2 +- .../test_real_time_payments_transfers.py | 115 +- .../simulations/test_wire_transfers.py | 188 +- tests/api_resources/test_account_numbers.py | 8 +- .../api_resources/test_account_statements.py | 4 +- tests/api_resources/test_account_transfers.py | 10 +- tests/api_resources/test_accounts.py | 20 +- .../test_ach_prenotifications.py | 6 +- tests/api_resources/test_ach_transfers.py | 10 +- .../test_bookkeeping_accounts.py | 8 +- .../api_resources/test_bookkeeping_entries.py | 4 +- .../test_bookkeeping_entry_sets.py | 6 +- tests/api_resources/test_card_disputes.py | 6 +- tests/api_resources/test_card_payments.py | 4 +- .../test_card_purchase_supplements.py | 4 +- tests/api_resources/test_cards.py | 42 +- tests/api_resources/test_check_deposits.py | 6 +- tests/api_resources/test_check_transfers.py | 22 +- .../test_declined_transactions.py | 4 +- .../test_digital_card_profiles.py | 10 +- .../test_digital_wallet_tokens.py | 4 +- tests/api_resources/test_documents.py | 4 +- tests/api_resources/test_entities.py | 644 ++- .../api_resources/test_event_subscriptions.py | 8 +- tests/api_resources/test_events.py | 4 +- tests/api_resources/test_exports.py | 6 +- tests/api_resources/test_external_accounts.py | 8 +- tests/api_resources/test_files.py | 6 +- tests/api_resources/test_groups.py | 26 +- .../test_inbound_ach_transfers.py | 142 +- .../test_inbound_check_deposits.py | 94 +- .../api_resources/test_inbound_mail_items.py | 4 +- .../test_inbound_wire_drawdown_requests.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- ...py => test_intrafi_account_enrollments.py} | 152 +- ...t_balances.py => test_intrafi_balances.py} | 42 +- ...clusions.py => test_intrafi_exclusions.py} | 150 +- tests/api_resources/test_lockboxes.py | 8 +- tests/api_resources/test_oauth_connections.py | 4 +- tests/api_resources/test_oauth_tokens.py | 2 +- .../test_pending_transactions.py | 4 +- .../test_physical_card_profiles.py | 10 +- tests/api_resources/test_physical_cards.py | 8 +- tests/api_resources/test_programs.py | 4 +- ...of_of_authorization_request_submissions.py | 6 +- .../test_proof_of_authorization_requests.py | 4 +- .../api_resources/test_real_time_decisions.py | 4 +- ...real_time_payments_request_for_payments.py | 6 +- .../test_real_time_payments_transfers.py | 6 +- tests/api_resources/test_routing_numbers.py | 20 +- tests/api_resources/test_simulations.py | 318 -- .../test_supplemental_documents.py | 83 +- tests/api_resources/test_transactions.py | 4 +- .../test_wire_drawdown_requests.py | 14 +- tests/api_resources/test_wire_transfers.py | 178 +- tests/conftest.py | 22 +- tests/test_client.py | 222 +- tests/test_files.py | 11 +- tests/test_legacy_response.py | 84 - tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 244 files changed, 10297 insertions(+), 15909 deletions(-) delete mode 100644 src/increase/_legacy_response.py create mode 100644 src/increase/_utils/_data.py rename src/increase/resources/{entities => }/entities.py (56%) delete mode 100644 src/increase/resources/entities/__init__.py delete mode 100644 src/increase/resources/entities/beneficial_owners.py delete mode 100644 src/increase/resources/entities/industry_code.py delete mode 100644 src/increase/resources/intrafi/__init__.py delete mode 100644 src/increase/resources/intrafi/intrafi.py rename src/increase/resources/{intrafi/account_enrollments.py => intrafi_account_enrollments.py} (79%) rename src/increase/resources/{intrafi/balances.py => intrafi_balances.py} (59%) rename src/increase/resources/{intrafi/exclusions.py => intrafi_exclusions.py} (81%) create mode 100644 src/increase/resources/simulations/card_authorization_expirations.py rename src/increase/resources/simulations/{cards.py => card_authorizations.py} (54%) create mode 100644 src/increase/resources/simulations/card_fuel_confirmations.py create mode 100644 src/increase/resources/simulations/card_increments.py create mode 100644 src/increase/resources/simulations/card_reversals.py create mode 100644 src/increase/resources/simulations/card_settlements.py create mode 100644 src/increase/resources/simulations/inbound_ach_transfers.py delete mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py create mode 100644 src/increase/resources/simulations/inbound_real_time_payments_transfers.py create mode 100644 src/increase/resources/simulations/inbound_wire_transfers.py rename src/increase/resources/{entities => }/supplemental_documents.py (75%) delete mode 100644 src/increase/types/entities/__init__.py rename src/increase/types/{entities/beneficial_owner_archive_params.py => entity_archive_beneficial_owner_params.py} (63%) rename src/increase/types/{entities/beneficial_owner_create_params.py => entity_create_beneficial_owner_params.py} (95%) rename src/increase/types/{entities/supplemental_document.py => entity_supplemental_document.py} (81%) rename src/increase/types/{entities/beneficial_owner_update_address_params.py => entity_update_beneficial_owner_address_params.py} (82%) rename src/increase/types/{entities/industry_code_create_params.py => entity_update_industry_code_params.py} (84%) rename src/increase/types/{inbound_ach_transfer_notification_of_change_params.py => inbound_ach_transfer_create_notification_of_change_params.py} (72%) create mode 100644 src/increase/types/inbound_check_deposit_return_params.py delete mode 100644 src/increase/types/inbound_mail_item_list.py delete mode 100644 src/increase/types/intrafi/__init__.py rename src/increase/types/{intrafi => }/intrafi_account_enrollment.py (98%) rename src/increase/types/{intrafi/account_enrollment_create_params.py => intrafi_account_enrollment_create_params.py} (76%) rename src/increase/types/{intrafi/account_enrollment_list_params.py => intrafi_account_enrollment_list_params.py} (90%) rename src/increase/types/{intrafi => }/intrafi_balance.py (98%) rename src/increase/types/{intrafi => }/intrafi_exclusion.py (98%) rename src/increase/types/{intrafi/exclusion_create_params.py => intrafi_exclusion_create_params.py} (78%) rename src/increase/types/{intrafi/exclusion_list_params.py => intrafi_exclusion_list_params.py} (88%) delete mode 100644 src/increase/types/lockbox_list.py rename src/increase/types/{routing_number.py => routing_number_list_response.py} (94%) delete mode 100644 src/increase/types/simulations/ach_transfer_create_inbound_params.py rename src/increase/types/simulations/{ach_transfer_notification_of_change_params.py => ach_transfer_create_notification_of_change_params.py} (96%) rename src/increase/types/simulations/{card_authorize_params.py => card_authorization_create_params.py} (93%) create mode 100644 src/increase/types/simulations/card_authorization_create_response.py rename src/increase/types/{simulation_card_authorization_expirations_params.py => simulations/card_authorization_expiration_create_params.py} (66%) delete mode 100644 src/increase/types/simulations/card_authorization_simulation.py rename src/increase/types/{simulation_card_fuel_confirmations_params.py => simulations/card_fuel_confirmation_create_params.py} (78%) rename src/increase/types/{simulation_card_increments_params.py => simulations/card_increment_create_params.py} (87%) rename src/increase/types/{simulation_card_reversals_params.py => simulations/card_reversal_create_params.py} (80%) rename src/increase/types/simulations/{card_settlement_params.py => card_settlement_create_params.py} (84%) create mode 100644 src/increase/types/simulations/inbound_ach_transfer_create_params.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py rename src/increase/types/simulations/{real_time_payments_transfer_create_inbound_params.py => inbound_real_time_payments_transfer_create_params.py} (88%) create mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py delete mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py rename src/increase/types/simulations/{wire_transfer_create_inbound_params.py => inbound_wire_transfer_create_params.py} (91%) rename src/increase/types/simulations/{physical_card_shipment_advance_params.py => physical_card_advance_shipment_params.py} (90%) rename src/increase/types/{entities => }/supplemental_document_create_params.py (76%) rename src/increase/types/{entities => }/supplemental_document_list_params.py (100%) delete mode 100644 tests/api_resources/entities/__init__.py delete mode 100644 tests/api_resources/entities/test_beneficial_owners.py delete mode 100644 tests/api_resources/entities/test_industry_code.py delete mode 100644 tests/api_resources/intrafi/__init__.py create mode 100644 tests/api_resources/simulations/test_card_authorization_expirations.py create mode 100644 tests/api_resources/simulations/test_card_authorizations.py create mode 100644 tests/api_resources/simulations/test_card_fuel_confirmations.py create mode 100644 tests/api_resources/simulations/test_card_increments.py create mode 100644 tests/api_resources/simulations/test_card_reversals.py create mode 100644 tests/api_resources/simulations/test_card_settlements.py delete mode 100644 tests/api_resources/simulations/test_cards.py create mode 100644 tests/api_resources/simulations/test_inbound_ach_transfers.py delete mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py create mode 100644 tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py create mode 100644 tests/api_resources/simulations/test_inbound_wire_transfers.py rename tests/api_resources/{intrafi/test_account_enrollments.py => test_intrafi_account_enrollments.py} (63%) rename tests/api_resources/{intrafi/test_balances.py => test_intrafi_balances.py} (66%) rename tests/api_resources/{intrafi/test_exclusions.py => test_intrafi_exclusions.py} (61%) delete mode 100644 tests/api_resources/test_simulations.py rename tests/api_resources/{entities => }/test_supplemental_documents.py (58%) delete mode 100644 tests/test_legacy_response.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7e971ead..6772f01dc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.61.0" + ".": "0.71.0" } \ No newline at end of file diff --git a/README.md b/README.md index 2dc0b9cba..1f137aa0e 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,15 @@ client = AsyncIncrease( environment="sandbox", ) + async def main() -> None: - account = await client.accounts.create( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ) - print(account.id) + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) + asyncio.run(main()) ``` @@ -110,6 +112,7 @@ import increase client = AsyncIncrease() + async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -117,6 +120,7 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) + asyncio.run(main()) ``` @@ -137,7 +141,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -198,7 +202,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -238,7 +242,7 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries = 5).accounts.create( +client.with_options(max_retries=5).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -265,7 +269,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout = 5.0).accounts.create( +client.with_options(timeout=5.0).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -334,11 +338,11 @@ with client.accounts.with_streaming_response.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", -) as response : - print(response.headers.get('X-My-Header')) +) as response: + print(response.headers.get("X-My-Header")) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -392,7 +396,10 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), + http_client=DefaultHttpxClient( + proxies="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), ) ``` diff --git a/requirements-dev.lock b/requirements-dev.lock index 33440059e..f6f54a23d 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 + # via increase # via respx - # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio + # via increase # via mypy # via pydantic # via pydantic-core - # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index 094dd754e..daa54a31b 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via sdk-pythonpackagename + # via increase idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase typing-extensions==4.8.0 # via anyio + # via increase # via pydantic # via pydantic-core - # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 238f453e6..519cb0b5a 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,18 +1,105 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._version import __version__, __title__ -from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS -from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError -from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN +from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes from ._utils import file_from_path +from ._client import ( + ENVIRONMENTS, + Client, + Stream, + Timeout, + Increase, + Transport, + AsyncClient, + AsyncStream, + AsyncIncrease, + RequestOptions, +) from ._models import BaseModel -from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS -from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient -from ._utils._logs import setup_logging as _setup_logging +from ._version import __title__, __version__ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse +from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS +from ._exceptions import ( + APIError, + ConflictError, + IncreaseError, + NotFoundError, + APIStatusError, + RateLimitError, + APITimeoutError, + BadRequestError, + RateLimitedError, + APIConnectionError, + InvalidAPIKeyError, + AuthenticationError, + InternalServerError, + ObjectNotFoundError, + PrivateFeatureError, + InvalidOperationError, + MalformedRequestError, + PermissionDeniedError, + APIMethodNotFoundError, + InvalidParametersError, + EnvironmentMismatchError, + UnprocessableEntityError, + APIResponseValidationError, + InsufficientPermissionsError, + IdempotencyKeyAlreadyUsedError, +) +from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._utils._logs import setup_logging as _setup_logging -__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] +__all__ = [ + "types", + "__version__", + "__title__", + "NoneType", + "Transport", + "ProxiesTypes", + "NotGiven", + "NOT_GIVEN", + "IncreaseError", + "APIError", + "APIStatusError", + "APITimeoutError", + "APIConnectionError", + "APIResponseValidationError", + "BadRequestError", + "AuthenticationError", + "PermissionDeniedError", + "NotFoundError", + "ConflictError", + "UnprocessableEntityError", + "RateLimitError", + "InternalServerError", + "APIMethodNotFoundError", + "EnvironmentMismatchError", + "IdempotencyKeyAlreadyUsedError", + "InsufficientPermissionsError", + "InvalidAPIKeyError", + "InvalidOperationError", + "InvalidParametersError", + "MalformedRequestError", + "ObjectNotFoundError", + "PrivateFeatureError", + "RateLimitedError", + "Timeout", + "RequestOptions", + "Client", + "AsyncClient", + "Stream", + "AsyncStream", + "Increase", + "AsyncIncrease", + "ENVIRONMENTS", + "file_from_path", + "BaseModel", + "DEFAULT_TIMEOUT", + "DEFAULT_MAX_RETRIES", + "DEFAULT_CONNECTION_LIMITS", + "DefaultHttpxClient", + "DefaultAsyncHttpxClient", +] _setup_logging() @@ -24,7 +111,7 @@ for __name in __all__: if not __name.startswith("__"): try: - setattr(__locals[__name], "__module__", "increase") + __locals[__name].__module__ = "increase" except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass \ No newline at end of file + pass diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 73f141e55..fe3c6e1d8 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,7 +86,6 @@ APIConnectionError, APIResponseValidationError, ) -from ._legacy_response import LegacyAPIResponse log: logging.Logger = logging.getLogger(__name__) @@ -125,14 +124,16 @@ def __init__( self, *, url: URL, - ) -> None: ... + ) -> None: + ... @overload def __init__( self, *, params: Query, - ) -> None: ... + ) -> None: + ... def __init__( self, @@ -165,7 +166,8 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: ... + def next_page_info(self) -> Optional[PageInfo]: + ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -597,7 +599,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, -**self.platform_headers(), + **self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -877,9 +879,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -901,7 +903,8 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def request( @@ -911,7 +914,8 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def request( @@ -922,7 +926,8 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def request( self, @@ -956,7 +961,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1013,7 +1018,6 @@ def _request( response.reason_phrase, response.headers, ) - try: response.raise_for_status() @@ -1087,8 +1091,6 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1150,7 +1152,8 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def get( @@ -1161,7 +1164,8 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def get( @@ -1172,7 +1176,8 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def get( self, @@ -1198,7 +1203,8 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def post( @@ -1211,7 +1217,8 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def post( @@ -1224,7 +1231,8 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def post( self, @@ -1434,9 +1442,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1457,7 +1465,8 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def request( @@ -1468,7 +1477,8 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def request( @@ -1479,7 +1489,8 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def request( self, @@ -1518,7 +1529,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1639,8 +1650,6 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1692,7 +1701,8 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def get( @@ -1703,7 +1713,8 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def get( @@ -1714,7 +1725,8 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def get( self, @@ -1738,7 +1750,8 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def post( @@ -1751,7 +1764,8 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def post( @@ -1764,7 +1778,8 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index d3f890574..311788c4f 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,55 +2,56 @@ from __future__ import annotations -import httpx - -import os - -from ._streaming import AsyncStream as AsyncStream, Stream as Stream - -from ._exceptions import IncreaseError, APIStatusError - -from typing_extensions import override, Self - -from typing import Any - -from ._utils import is_mapping, get_async_library - -from . import _exceptions - import os -import asyncio -import warnings -from typing import Optional, Union, Dict, Any, Mapping, overload, cast -from typing_extensions import Literal +from typing import Any, Dict, Union, Mapping, cast +from typing_extensions import Self, Literal, override import httpx -from ._version import __version__ +from . import resources, _exceptions from ._qs import Querystring -from .types import shared_params -from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given -from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN +from ._types import ( + NOT_GIVEN, + Omit, + Timeout, + NotGiven, + Transport, + ProxiesTypes, + RequestOptions, +) +from ._utils import ( + is_given, + is_mapping, + get_async_library, +) +from ._version import __version__ +from ._streaming import Stream as Stream, AsyncStream as AsyncStream +from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( - DEFAULT_CONNECTION_LIMITS, - DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, - ResponseT, - SyncHttpxClientWrapper, - AsyncHttpxClientWrapper, SyncAPIClient, AsyncAPIClient, - make_request_options, ) -from . import resources -__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] +__all__ = [ + "ENVIRONMENTS", + "Timeout", + "Transport", + "ProxiesTypes", + "RequestOptions", + "resources", + "Increase", + "AsyncIncrease", + "Client", + "AsyncClient", +] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } + class Increase(SyncAPIClient): accounts: resources.AccountsResource account_numbers: resources.AccountNumbersResource @@ -111,22 +112,33 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -134,44 +146,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -239,32 +260,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.Client | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -279,14 +309,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -324,12 +371,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -353,6 +404,7 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class AsyncIncrease(AsyncAPIClient): accounts: resources.AsyncAccountsResource account_numbers: resources.AsyncAccountNumbersResource @@ -413,22 +465,33 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -436,44 +499,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -510,7 +582,9 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) self.programs = resources.AsyncProgramsResource(self) self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( + self + ) self.account_statements = resources.AsyncAccountStatementsResource(self) self.files = resources.AsyncFilesResource(self) self.documents = resources.AsyncDocumentsResource(self) @@ -541,32 +615,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f'async:{get_async_library()}', - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f"async:{get_async_library()}", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.AsyncClient | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -581,14 +664,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -626,12 +726,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -655,17 +759,22 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.CardsResourceWithRawResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) @@ -675,22 +784,40 @@ def __init__(self, client: Increase) -> None: self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.FilesResourceWithRawResponse(client.files) self.documents = resources.DocumentsResourceWithRawResponse(client.documents) @@ -699,53 +826,96 @@ def __init__(self, client: Increase) -> None: self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) + class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithRawResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) @@ -753,54 +923,99 @@ def __init__(self, client: AsyncIncrease) -> None: self.events = resources.AsyncEventsResourceWithRawResponse(client.events) self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) + class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.CardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.FilesResourceWithStreamingResponse(client.files) self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) @@ -808,73 +1023,141 @@ def __init__(self, client: Increase) -> None: self.events = resources.EventsResourceWithStreamingResponse(client.events) self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) + class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( + client.inbound_mail_items + ) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( + client.account_statements + ) self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( + client.event_subscriptions + ) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( + client.bookkeeping_entries + ) self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( + client.intrafi_exclusions + ) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) + Client = Increase -AsyncClient = AsyncIncrease \ No newline at end of file +AsyncClient = AsyncIncrease diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 74c7639b4..c919b5adb 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: diff --git a/src/increase/_legacy_response.py b/src/increase/_legacy_response.py deleted file mode 100644 index fecb9b503..000000000 --- a/src/increase/_legacy_response.py +++ /dev/null @@ -1,456 +0,0 @@ -from __future__ import annotations - -import os -import inspect -import logging -import datetime -import functools -from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, Iterator, AsyncIterator, cast, overload -from typing_extensions import Awaitable, ParamSpec, override, deprecated, get_origin - -import anyio -import httpx -import pydantic - -from ._types import NoneType -from ._utils import is_given, extract_type_arg, is_annotated_type -from ._models import BaseModel, is_basemodel -from ._constants import RAW_RESPONSE_HEADER -from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type -from ._exceptions import APIResponseValidationError - -if TYPE_CHECKING: - from ._models import FinalRequestOptions - from ._base_client import BaseClient - - -P = ParamSpec("P") -R = TypeVar("R") -_T = TypeVar("_T") - -log: logging.Logger = logging.getLogger(__name__) - - -class LegacyAPIResponse(Generic[R]): - """This is a legacy class as it will be replaced by `APIResponse` - and `AsyncAPIResponse` in the `_response.py` file in the next major - release. - - For the sync client this will mostly be the same with the exception - of `content` & `text` will be methods instead of properties. In the - async client, all methods will be async. - - A migration script will be provided & the migration in general should - be smooth. - """ - - _cast_to: type[R] - _client: BaseClient[Any, Any] - _parsed_by_type: dict[type[Any], Any] - _stream: bool - _stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None - _options: FinalRequestOptions - - http_response: httpx.Response - - def __init__( - self, - *, - raw: httpx.Response, - cast_to: type[R], - client: BaseClient[Any, Any], - stream: bool, - stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, - options: FinalRequestOptions, - ) -> None: - self._cast_to = cast_to - self._client = client - self._parsed_by_type = {} - self._stream = stream - self._stream_cls = stream_cls - self._options = options - self.http_response = raw - - @overload - def parse(self, *, to: type[_T]) -> _T: - ... - - @overload - def parse(self) -> R: - ... - - def parse(self, *, to: type[_T] | None = None) -> R | _T: - """Returns the rich python representation of this response's data. - - NOTE: For the async client: this will become a coroutine in the next major version. - - For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`. - - You can customise the type that the response is parsed into through - the `to` argument, e.g. - - ```py - from increase import BaseModel - - - class MyModel(BaseModel): - foo: str - - - obj = response.parse(to=MyModel) - print(obj.foo) - ``` - - We support parsing: - - `BaseModel` - - `dict` - - `list` - - `Union` - - `str` - - `int` - - `float` - - `httpx.Response` - """ - cache_key = to if to is not None else self._cast_to - cached = self._parsed_by_type.get(cache_key) - if cached is not None: - return cached # type: ignore[no-any-return] - - parsed = self._parse(to=to) - if is_given(self._options.post_parser): - parsed = self._options.post_parser(parsed) - - self._parsed_by_type[cache_key] = parsed - return parsed - - @property - def headers(self) -> httpx.Headers: - return self.http_response.headers - - @property - def http_request(self) -> httpx.Request: - return self.http_response.request - - @property - def status_code(self) -> int: - return self.http_response.status_code - - @property - def url(self) -> httpx.URL: - return self.http_response.url - - @property - def method(self) -> str: - return self.http_request.method - - @property - def content(self) -> bytes: - """Return the binary response content. - - NOTE: this will be removed in favour of `.read()` in the - next major version. - """ - return self.http_response.content - - @property - def text(self) -> str: - """Return the decoded response content. - - NOTE: this will be turned into a method in the next major version. - """ - return self.http_response.text - - @property - def http_version(self) -> str: - return self.http_response.http_version - - @property - def is_closed(self) -> bool: - return self.http_response.is_closed - - @property - def elapsed(self) -> datetime.timedelta: - """The time taken for the complete request/response cycle to complete.""" - return self.http_response.elapsed - - def _parse(self, *, to: type[_T] | None = None) -> R | _T: - # unwrap `Annotated[T, ...]` -> `T` - if to and is_annotated_type(to): - to = extract_type_arg(to, 0) - - if self._stream: - if to: - if not is_stream_class_type(to): - raise TypeError(f"Expected custom parse type to be a subclass of {Stream} or {AsyncStream}") - - return cast( - _T, - to( - cast_to=extract_stream_chunk_type( - to, - failure_message="Expected custom stream type to be passed with a type argument, e.g. Stream[ChunkType]", - ), - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - if self._stream_cls: - return cast( - R, - self._stream_cls( - cast_to=extract_stream_chunk_type(self._stream_cls), - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - stream_cls = cast("type[Stream[Any]] | type[AsyncStream[Any]] | None", self._client._default_stream_cls) - if stream_cls is None: - raise MissingStreamClassError() - - return cast( - R, - stream_cls( - cast_to=self._cast_to, - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - cast_to = to if to is not None else self._cast_to - - # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(cast_to): - cast_to = extract_type_arg(cast_to, 0) - - if cast_to is NoneType: - return cast(R, None) - - response = self.http_response - if cast_to == str: - return cast(R, response.text) - - if cast_to == int: - return cast(R, int(response.text)) - - if cast_to == float: - return cast(R, float(response.text)) - - origin = get_origin(cast_to) or cast_to - - if inspect.isclass(origin) and issubclass(origin, HttpxBinaryResponseContent): - return cast(R, cast_to(response)) # type: ignore - - if origin == LegacyAPIResponse: - raise RuntimeError("Unexpected state - cast_to is `APIResponse`") - - if inspect.isclass(origin) and issubclass(origin, httpx.Response): - # Because of the invariance of our ResponseT TypeVar, users can subclass httpx.Response - # and pass that class to our request functions. We cannot change the variance to be either - # covariant or contravariant as that makes our usage of ResponseT illegal. We could construct - # the response class ourselves but that is something that should be supported directly in httpx - # as it would be easy to incorrectly construct the Response object due to the multitude of arguments. - if cast_to != httpx.Response: - raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`") - return cast(R, response) - - if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") - - if ( - cast_to is not object - and not origin is list - and not origin is dict - and not origin is Union - and not issubclass(origin, BaseModel) - ): - raise RuntimeError( - f"Unsupported type, expected {cast_to} to be a subclass of {BaseModel}, {dict}, {list}, {Union}, {NoneType}, {str} or {httpx.Response}." - ) - - # split is required to handle cases where additional information is included - # in the response, e.g. application/json; charset=utf-8 - content_type, *_ = response.headers.get("content-type", "*").split(";") - if content_type != "application/json": - if is_basemodel(cast_to): - try: - data = response.json() - except Exception as exc: - log.debug("Could not read JSON from response data due to %s - %s", type(exc), exc) - else: - return self._client._process_response_data( - data=data, - cast_to=cast_to, # type: ignore - response=response, - ) - - if self._client._strict_response_validation: - raise APIResponseValidationError( - response=response, - message=f"Expected Content-Type response header to be `application/json` but received `{content_type}` instead.", - body=response.text, - ) - - # If the API responds with content that isn't JSON then we just return - # the (decoded) text without performing any parsing so that you can still - # handle the response however you need to. - return response.text # type: ignore - - data = response.json() - - return self._client._process_response_data( - data=data, - cast_to=cast_to, # type: ignore - response=response, - ) - - @override - def __repr__(self) -> str: - return f"" - - -class MissingStreamClassError(TypeError): - def __init__(self) -> None: - super().__init__( - "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `increase._streaming` for reference", - ) - - -def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, LegacyAPIResponse[R]]: - """Higher order function that takes one of our bound API methods and wraps it - to support returning the raw `APIResponse` object directly. - """ - - @functools.wraps(func) - def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: - extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} - extra_headers[RAW_RESPONSE_HEADER] = "true" - - kwargs["extra_headers"] = extra_headers - - return cast(LegacyAPIResponse[R], func(*args, **kwargs)) - - return wrapped - - -def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P, Awaitable[LegacyAPIResponse[R]]]: - """Higher order function that takes one of our bound API methods and wraps it - to support returning the raw `APIResponse` object directly. - """ - - @functools.wraps(func) - async def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: - extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} - extra_headers[RAW_RESPONSE_HEADER] = "true" - - kwargs["extra_headers"] = extra_headers - - return cast(LegacyAPIResponse[R], await func(*args, **kwargs)) - - return wrapped - - -class HttpxBinaryResponseContent: - response: httpx.Response - - def __init__(self, response: httpx.Response) -> None: - self.response = response - - @property - def content(self) -> bytes: - return self.response.content - - @property - def text(self) -> str: - return self.response.text - - @property - def encoding(self) -> str | None: - return self.response.encoding - - @property - def charset_encoding(self) -> str | None: - return self.response.charset_encoding - - def json(self, **kwargs: Any) -> Any: - return self.response.json(**kwargs) - - def read(self) -> bytes: - return self.response.read() - - def iter_bytes(self, chunk_size: int | None = None) -> Iterator[bytes]: - return self.response.iter_bytes(chunk_size) - - def iter_text(self, chunk_size: int | None = None) -> Iterator[str]: - return self.response.iter_text(chunk_size) - - def iter_lines(self) -> Iterator[str]: - return self.response.iter_lines() - - def iter_raw(self, chunk_size: int | None = None) -> Iterator[bytes]: - return self.response.iter_raw(chunk_size) - - def write_to_file( - self, - file: str | os.PathLike[str], - ) -> None: - """Write the output to the given file. - - Accepts a filename or any path-like object, e.g. pathlib.Path - - Note: if you want to stream the data to the file instead of writing - all at once then you should use `.with_streaming_response` when making - the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')` - """ - with open(file, mode="wb") as f: - for data in self.response.iter_bytes(): - f.write(data) - - @deprecated( - "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" - ) - def stream_to_file( - self, - file: str | os.PathLike[str], - *, - chunk_size: int | None = None, - ) -> None: - with open(file, mode="wb") as f: - for data in self.response.iter_bytes(chunk_size): - f.write(data) - - def close(self) -> None: - return self.response.close() - - async def aread(self) -> bytes: - return await self.response.aread() - - async def aiter_bytes(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: - return self.response.aiter_bytes(chunk_size) - - async def aiter_text(self, chunk_size: int | None = None) -> AsyncIterator[str]: - return self.response.aiter_text(chunk_size) - - async def aiter_lines(self) -> AsyncIterator[str]: - return self.response.aiter_lines() - - async def aiter_raw(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: - return self.response.aiter_raw(chunk_size) - - @deprecated( - "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" - ) - async def astream_to_file( - self, - file: str | os.PathLike[str], - *, - chunk_size: int | None = None, - ) -> None: - path = anyio.Path(file) - async with await path.open(mode="wb") as f: - async for data in self.response.aiter_bytes(chunk_size): - await f.write(data) - - async def aclose(self) -> None: - return await self.response.aclose() diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 54a98364f..274320ca5 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,9 +64,7 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten( - [self._stringify_item(key, value, opts) for key, value in params.items()] - ) + return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) def _stringify_item( self, @@ -81,9 +79,7 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" - if nested_format == "dots" - else f"{key}[{subkey}]", + f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", subvalue, opts, ) @@ -96,11 +92,7 @@ def _stringify_item( return [ ( key, - ",".join( - self._primitive_value_to_str(item) - for item in value - if item is not None - ), + ",".join(self._primitive_value_to_str(item) for item in value if item is not None), ), ] elif array_format == "repeat": @@ -109,9 +101,7 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError( - "The array indices format is not supported yet" - ) + raise NotImplementedError("The array indices format is not supported yet") elif array_format == "brackets": items = [] key = key + "[]" @@ -156,9 +146,5 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = ( - qs.array_format if isinstance(array_format, NotGiven) else array_format - ) - self.nested_format = ( - qs.nested_format if isinstance(nested_format, NotGiven) else nested_format - ) + self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format + self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/increase/_response.py b/src/increase/_response.py index 5d4268a31..fd4bff802 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin +from typing_extensions import Awaitable, ParamSpec, override, get_origin import anyio import httpx @@ -26,7 +26,6 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base -from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -190,7 +189,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to - if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -205,9 +203,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError( - "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" - ) + raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") if ( cast_to is not object @@ -258,8 +254,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): - - @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -364,8 +358,6 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): - - @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 357b42be0..7b5fc6503 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,9 +9,7 @@ import httpx -from ._utils import is_mapping, is_dict, extract_type_var_from_base -from ._exceptions import APIError -from ._response import APIResponse, AsyncAPIResponse +from ._utils import extract_type_var_from_base if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -55,10 +53,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -119,10 +117,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index 0efc60a5e..510d266d3 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,7 +1,6 @@ from __future__ import annotations from os import PathLike -from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -14,10 +13,8 @@ Mapping, TypeVar, Callable, - Iterator, Optional, Sequence, - AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -28,7 +25,6 @@ if TYPE_CHECKING: from ._models import BaseModel from ._response import APIResponse, AsyncAPIResponse - from ._legacy_response import HttpxBinaryResponseContent Transport = BaseTransport AsyncTransport = AsyncBaseTransport @@ -193,7 +189,6 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", - ], ) diff --git a/src/increase/_utils/_data.py b/src/increase/_utils/_data.py new file mode 100644 index 000000000..6f0ef9d3d --- /dev/null +++ b/src/increase/_utils/_data.py @@ -0,0 +1,56 @@ +from __future__ import annotations + +import io +import base64 +import pathlib + +import anyio + + +def to_base64_str(data: object) -> str: + from .._files import is_base64_file_input + + if isinstance(data, str): + return data + + if is_base64_file_input(data): + binary: str | bytes | None = None + + if isinstance(data, pathlib.Path): + binary = data.read_bytes() + elif isinstance(data, io.IOBase): + binary = data.read() + + if isinstance(binary, str): # type: ignore[unreachable] + binary = binary.encode() + + if not isinstance(binary, bytes): + raise RuntimeError(f"Could not read bytes from {data}; Received {type(binary)}") + + return base64.b64encode(binary).decode("ascii") + + raise TypeError(f"Expected base64 input to be a string, io object or PathLike object but got {data}") + + +async def to_base64_str_async(data: object) -> str: + from .._files import is_base64_file_input + + if isinstance(data, str): + return data + + if is_base64_file_input(data): + binary: str | bytes | None = None + + if isinstance(data, pathlib.Path): + binary = await anyio.Path(data).read_bytes() + elif isinstance(data, io.IOBase): + binary = data.read() + + if isinstance(binary, str): # type: ignore[unreachable] + binary = binary.encode() + + if not isinstance(binary, bytes): + raise RuntimeError(f"Could not read bytes from {data}; Received {type(binary)}") + + return base64.b64encode(binary).decode("ascii") + raise TypeError(f"Expected base64 input to be a string, io object or PathLike object but got {data}") diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index ffd883e9d..c46a62a69 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,4 +59,5 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: ... + def __load__(self) -> T: + ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index 238e54ada..d0d810337 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): + if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 2fc5a1c65..34797c290 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,17 +211,20 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: ... + def foo(*, a: str) -> str: + ... @overload - def foo(*, b: bool) -> str: ... + def foo(*, b: bool) -> str: + ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: + ... ``` """ @@ -283,15 +286,18 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: ... +def strip_not_given(obj: None) -> None: + ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: + ... @overload -def strip_not_given(obj: object) -> object: ... +def strip_not_given(obj: object) -> object: + ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index e880ca207..9b556589f 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.71.0" # x-release-please-version \ No newline at end of file +__version__ = "0.71.0" # x-release-please-version diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 62201c0bc..ea6da25e1 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -1,691 +1,733 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, + CardsResource, + AsyncCardsResource, + CardsResourceWithRawResponse, + AsyncCardsResourceWithRawResponse, + CardsResourceWithStreamingResponse, + AsyncCardsResourceWithStreamingResponse, ) from .files import ( - Files, - AsyncFiles, - FilesWithRawResponse, - AsyncFilesWithRawResponse, - FilesWithStreamingResponse, - AsyncFilesWithStreamingResponse, + FilesResource, + AsyncFilesResource, + FilesResourceWithRawResponse, + AsyncFilesResourceWithRawResponse, + FilesResourceWithStreamingResponse, + AsyncFilesResourceWithStreamingResponse, ) from .events import ( - Events, - AsyncEvents, - EventsWithRawResponse, - AsyncEventsWithRawResponse, - EventsWithStreamingResponse, - AsyncEventsWithStreamingResponse, + EventsResource, + AsyncEventsResource, + EventsResourceWithRawResponse, + AsyncEventsResourceWithRawResponse, + EventsResourceWithStreamingResponse, + AsyncEventsResourceWithStreamingResponse, ) from .groups import ( - Groups, - AsyncGroups, - GroupsWithRawResponse, - AsyncGroupsWithRawResponse, - GroupsWithStreamingResponse, - AsyncGroupsWithStreamingResponse, + GroupsResource, + AsyncGroupsResource, + GroupsResourceWithRawResponse, + AsyncGroupsResourceWithRawResponse, + GroupsResourceWithStreamingResponse, + AsyncGroupsResourceWithStreamingResponse, ) from .exports import ( - Exports, - AsyncExports, - ExportsWithRawResponse, - AsyncExportsWithRawResponse, - ExportsWithStreamingResponse, - AsyncExportsWithStreamingResponse, -) -from .intrafi import ( - Intrafi, - AsyncIntrafi, - IntrafiWithRawResponse, - AsyncIntrafiWithRawResponse, - IntrafiWithStreamingResponse, - AsyncIntrafiWithStreamingResponse, + ExportsResource, + AsyncExportsResource, + ExportsResourceWithRawResponse, + AsyncExportsResourceWithRawResponse, + ExportsResourceWithStreamingResponse, + AsyncExportsResourceWithStreamingResponse, ) from .accounts import ( - Accounts, - AsyncAccounts, - AccountsWithRawResponse, - AsyncAccountsWithRawResponse, - AccountsWithStreamingResponse, - AsyncAccountsWithStreamingResponse, + AccountsResource, + AsyncAccountsResource, + AccountsResourceWithRawResponse, + AsyncAccountsResourceWithRawResponse, + AccountsResourceWithStreamingResponse, + AsyncAccountsResourceWithStreamingResponse, ) from .entities import ( - Entities, - AsyncEntities, - EntitiesWithRawResponse, - AsyncEntitiesWithRawResponse, - EntitiesWithStreamingResponse, - AsyncEntitiesWithStreamingResponse, + EntitiesResource, + AsyncEntitiesResource, + EntitiesResourceWithRawResponse, + AsyncEntitiesResourceWithRawResponse, + EntitiesResourceWithStreamingResponse, + AsyncEntitiesResourceWithStreamingResponse, ) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from .lockboxes import ( - Lockboxes, - AsyncLockboxes, - LockboxesWithRawResponse, - AsyncLockboxesWithRawResponse, - LockboxesWithStreamingResponse, - AsyncLockboxesWithStreamingResponse, + LockboxesResource, + AsyncLockboxesResource, + LockboxesResourceWithRawResponse, + AsyncLockboxesResourceWithRawResponse, + LockboxesResourceWithStreamingResponse, + AsyncLockboxesResourceWithStreamingResponse, ) from .simulations import ( - Simulations, - AsyncSimulations, - SimulationsWithRawResponse, - AsyncSimulationsWithRawResponse, - SimulationsWithStreamingResponse, - AsyncSimulationsWithStreamingResponse, + SimulationsResource, + AsyncSimulationsResource, + SimulationsResourceWithRawResponse, + AsyncSimulationsResourceWithRawResponse, + SimulationsResourceWithStreamingResponse, + AsyncSimulationsResourceWithStreamingResponse, ) from .oauth_tokens import ( - OAuthTokens, - AsyncOAuthTokens, - OAuthTokensWithRawResponse, - AsyncOAuthTokensWithRawResponse, - OAuthTokensWithStreamingResponse, - AsyncOAuthTokensWithStreamingResponse, + OAuthTokensResource, + AsyncOAuthTokensResource, + OAuthTokensResourceWithRawResponse, + AsyncOAuthTokensResourceWithRawResponse, + OAuthTokensResourceWithStreamingResponse, + AsyncOAuthTokensResourceWithStreamingResponse, ) from .transactions import ( - Transactions, - AsyncTransactions, - TransactionsWithRawResponse, - AsyncTransactionsWithRawResponse, - TransactionsWithStreamingResponse, - AsyncTransactionsWithStreamingResponse, + TransactionsResource, + AsyncTransactionsResource, + TransactionsResourceWithRawResponse, + AsyncTransactionsResourceWithRawResponse, + TransactionsResourceWithStreamingResponse, + AsyncTransactionsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, ) from .card_payments import ( - CardPayments, - AsyncCardPayments, - CardPaymentsWithRawResponse, - AsyncCardPaymentsWithRawResponse, - CardPaymentsWithStreamingResponse, - AsyncCardPaymentsWithStreamingResponse, + CardPaymentsResource, + AsyncCardPaymentsResource, + CardPaymentsResourceWithRawResponse, + AsyncCardPaymentsResourceWithRawResponse, + CardPaymentsResourceWithStreamingResponse, + AsyncCardPaymentsResourceWithStreamingResponse, ) from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, ) from .account_numbers import ( - AccountNumbers, - AsyncAccountNumbers, - AccountNumbersWithRawResponse, - AsyncAccountNumbersWithRawResponse, - AccountNumbersWithStreamingResponse, - AsyncAccountNumbersWithStreamingResponse, + AccountNumbersResource, + AsyncAccountNumbersResource, + AccountNumbersResourceWithRawResponse, + AsyncAccountNumbersResourceWithRawResponse, + AccountNumbersResourceWithStreamingResponse, + AsyncAccountNumbersResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, ) from .routing_numbers import ( - RoutingNumbers, - AsyncRoutingNumbers, - RoutingNumbersWithRawResponse, - AsyncRoutingNumbersWithRawResponse, - RoutingNumbersWithStreamingResponse, - AsyncRoutingNumbersWithStreamingResponse, + RoutingNumbersResource, + AsyncRoutingNumbersResource, + RoutingNumbersResourceWithRawResponse, + AsyncRoutingNumbersResourceWithRawResponse, + RoutingNumbersResourceWithStreamingResponse, + AsyncRoutingNumbersResourceWithStreamingResponse, +) +from .intrafi_balances import ( + IntrafiBalancesResource, + AsyncIntrafiBalancesResource, + IntrafiBalancesResourceWithRawResponse, + AsyncIntrafiBalancesResourceWithRawResponse, + IntrafiBalancesResourceWithStreamingResponse, + AsyncIntrafiBalancesResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .external_accounts import ( - ExternalAccounts, - AsyncExternalAccounts, - ExternalAccountsWithRawResponse, - AsyncExternalAccountsWithRawResponse, - ExternalAccountsWithStreamingResponse, - AsyncExternalAccountsWithStreamingResponse, + ExternalAccountsResource, + AsyncExternalAccountsResource, + ExternalAccountsResourceWithRawResponse, + AsyncExternalAccountsResourceWithRawResponse, + ExternalAccountsResourceWithStreamingResponse, + AsyncExternalAccountsResourceWithStreamingResponse, ) from .oauth_connections import ( - OAuthConnections, - AsyncOAuthConnections, - OAuthConnectionsWithRawResponse, - AsyncOAuthConnectionsWithRawResponse, - OAuthConnectionsWithStreamingResponse, - AsyncOAuthConnectionsWithStreamingResponse, + OAuthConnectionsResource, + AsyncOAuthConnectionsResource, + OAuthConnectionsResourceWithRawResponse, + AsyncOAuthConnectionsResourceWithRawResponse, + OAuthConnectionsResourceWithStreamingResponse, + AsyncOAuthConnectionsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, ) from .inbound_mail_items import ( - InboundMailItems, - AsyncInboundMailItems, - InboundMailItemsWithRawResponse, - AsyncInboundMailItemsWithRawResponse, - InboundMailItemsWithStreamingResponse, - AsyncInboundMailItemsWithStreamingResponse, + InboundMailItemsResource, + AsyncInboundMailItemsResource, + InboundMailItemsResourceWithRawResponse, + AsyncInboundMailItemsResourceWithRawResponse, + InboundMailItemsResourceWithStreamingResponse, + AsyncInboundMailItemsResourceWithStreamingResponse, +) +from .intrafi_exclusions import ( + IntrafiExclusionsResource, + AsyncIntrafiExclusionsResource, + IntrafiExclusionsResourceWithRawResponse, + AsyncIntrafiExclusionsResourceWithRawResponse, + IntrafiExclusionsResourceWithStreamingResponse, + AsyncIntrafiExclusionsResourceWithStreamingResponse, ) from .bookkeeping_entries import ( - BookkeepingEntries, - AsyncBookkeepingEntries, - BookkeepingEntriesWithRawResponse, - AsyncBookkeepingEntriesWithRawResponse, - BookkeepingEntriesWithStreamingResponse, - AsyncBookkeepingEntriesWithStreamingResponse, + BookkeepingEntriesResource, + AsyncBookkeepingEntriesResource, + BookkeepingEntriesResourceWithRawResponse, + AsyncBookkeepingEntriesResourceWithRawResponse, + BookkeepingEntriesResourceWithStreamingResponse, + AsyncBookkeepingEntriesResourceWithStreamingResponse, ) from .event_subscriptions import ( - EventSubscriptions, - AsyncEventSubscriptions, - EventSubscriptionsWithRawResponse, - AsyncEventSubscriptionsWithRawResponse, - EventSubscriptionsWithStreamingResponse, - AsyncEventSubscriptionsWithStreamingResponse, + EventSubscriptionsResource, + AsyncEventSubscriptionsResource, + EventSubscriptionsResourceWithRawResponse, + AsyncEventSubscriptionsResourceWithRawResponse, + EventSubscriptionsResourceWithStreamingResponse, + AsyncEventSubscriptionsResourceWithStreamingResponse, ) from .real_time_decisions import ( - RealTimeDecisions, - AsyncRealTimeDecisions, - RealTimeDecisionsWithRawResponse, - AsyncRealTimeDecisionsWithRawResponse, - RealTimeDecisionsWithStreamingResponse, - AsyncRealTimeDecisionsWithStreamingResponse, + RealTimeDecisionsResource, + AsyncRealTimeDecisionsResource, + RealTimeDecisionsResourceWithRawResponse, + AsyncRealTimeDecisionsResourceWithRawResponse, + RealTimeDecisionsResourceWithStreamingResponse, + AsyncRealTimeDecisionsResourceWithStreamingResponse, ) from .ach_prenotifications import ( - ACHPrenotifications, - AsyncACHPrenotifications, - ACHPrenotificationsWithRawResponse, - AsyncACHPrenotificationsWithRawResponse, - ACHPrenotificationsWithStreamingResponse, - AsyncACHPrenotificationsWithStreamingResponse, + ACHPrenotificationsResource, + AsyncACHPrenotificationsResource, + ACHPrenotificationsResourceWithRawResponse, + AsyncACHPrenotificationsResourceWithRawResponse, + ACHPrenotificationsResourceWithStreamingResponse, + AsyncACHPrenotificationsResourceWithStreamingResponse, ) from .bookkeeping_accounts import ( - BookkeepingAccounts, - AsyncBookkeepingAccounts, - BookkeepingAccountsWithRawResponse, - AsyncBookkeepingAccountsWithRawResponse, - BookkeepingAccountsWithStreamingResponse, - AsyncBookkeepingAccountsWithStreamingResponse, + BookkeepingAccountsResource, + AsyncBookkeepingAccountsResource, + BookkeepingAccountsResourceWithRawResponse, + AsyncBookkeepingAccountsResourceWithRawResponse, + BookkeepingAccountsResourceWithStreamingResponse, + AsyncBookkeepingAccountsResourceWithStreamingResponse, ) from .pending_transactions import ( - PendingTransactions, - AsyncPendingTransactions, - PendingTransactionsWithRawResponse, - AsyncPendingTransactionsWithRawResponse, - PendingTransactionsWithStreamingResponse, - AsyncPendingTransactionsWithStreamingResponse, + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .declined_transactions import ( - DeclinedTransactions, - AsyncDeclinedTransactions, - DeclinedTransactionsWithRawResponse, - AsyncDeclinedTransactionsWithRawResponse, - DeclinedTransactionsWithStreamingResponse, - AsyncDeclinedTransactionsWithStreamingResponse, + DeclinedTransactionsResource, + AsyncDeclinedTransactionsResource, + DeclinedTransactionsResourceWithRawResponse, + AsyncDeclinedTransactionsResourceWithRawResponse, + DeclinedTransactionsResourceWithStreamingResponse, + AsyncDeclinedTransactionsResourceWithStreamingResponse, ) from .digital_card_profiles import ( - DigitalCardProfiles, - AsyncDigitalCardProfiles, - DigitalCardProfilesWithRawResponse, - AsyncDigitalCardProfilesWithRawResponse, - DigitalCardProfilesWithStreamingResponse, - AsyncDigitalCardProfilesWithStreamingResponse, + DigitalCardProfilesResource, + AsyncDigitalCardProfilesResource, + DigitalCardProfilesResourceWithRawResponse, + AsyncDigitalCardProfilesResourceWithRawResponse, + DigitalCardProfilesResourceWithStreamingResponse, + AsyncDigitalCardProfilesResourceWithStreamingResponse, ) from .digital_wallet_tokens import ( - DigitalWalletTokens, - AsyncDigitalWalletTokens, - DigitalWalletTokensWithRawResponse, - AsyncDigitalWalletTokensWithRawResponse, - DigitalWalletTokensWithStreamingResponse, - AsyncDigitalWalletTokensWithStreamingResponse, + DigitalWalletTokensResource, + AsyncDigitalWalletTokensResource, + DigitalWalletTokensResourceWithRawResponse, + AsyncDigitalWalletTokensResourceWithRawResponse, + DigitalWalletTokensResourceWithStreamingResponse, + AsyncDigitalWalletTokensResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( - InboundACHTransfers, - AsyncInboundACHTransfers, - InboundACHTransfersWithRawResponse, - AsyncInboundACHTransfersWithRawResponse, - InboundACHTransfersWithStreamingResponse, - AsyncInboundACHTransfersWithStreamingResponse, + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) from .bookkeeping_entry_sets import ( - BookkeepingEntrySets, - AsyncBookkeepingEntrySets, - BookkeepingEntrySetsWithRawResponse, - AsyncBookkeepingEntrySetsWithRawResponse, - BookkeepingEntrySetsWithStreamingResponse, - AsyncBookkeepingEntrySetsWithStreamingResponse, + BookkeepingEntrySetsResource, + AsyncBookkeepingEntrySetsResource, + BookkeepingEntrySetsResourceWithRawResponse, + AsyncBookkeepingEntrySetsResourceWithRawResponse, + BookkeepingEntrySetsResourceWithStreamingResponse, + AsyncBookkeepingEntrySetsResourceWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, ) from .inbound_wire_transfers import ( - InboundWireTransfers, - AsyncInboundWireTransfers, - InboundWireTransfersWithRawResponse, - AsyncInboundWireTransfersWithRawResponse, - InboundWireTransfersWithStreamingResponse, - AsyncInboundWireTransfersWithStreamingResponse, + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, ) from .physical_card_profiles import ( - PhysicalCardProfiles, - AsyncPhysicalCardProfiles, - PhysicalCardProfilesWithRawResponse, - AsyncPhysicalCardProfilesWithRawResponse, - PhysicalCardProfilesWithStreamingResponse, - AsyncPhysicalCardProfilesWithStreamingResponse, + PhysicalCardProfilesResource, + AsyncPhysicalCardProfilesResource, + PhysicalCardProfilesResourceWithRawResponse, + AsyncPhysicalCardProfilesResourceWithRawResponse, + PhysicalCardProfilesResourceWithStreamingResponse, + AsyncPhysicalCardProfilesResourceWithStreamingResponse, +) +from .supplemental_documents import ( + SupplementalDocumentsResource, + AsyncSupplementalDocumentsResource, + SupplementalDocumentsResourceWithRawResponse, + AsyncSupplementalDocumentsResourceWithRawResponse, + SupplementalDocumentsResourceWithStreamingResponse, + AsyncSupplementalDocumentsResourceWithStreamingResponse, ) from .wire_drawdown_requests import ( - WireDrawdownRequests, - AsyncWireDrawdownRequests, - WireDrawdownRequestsWithRawResponse, - AsyncWireDrawdownRequestsWithRawResponse, - WireDrawdownRequestsWithStreamingResponse, - AsyncWireDrawdownRequestsWithStreamingResponse, + WireDrawdownRequestsResource, + AsyncWireDrawdownRequestsResource, + WireDrawdownRequestsResourceWithRawResponse, + AsyncWireDrawdownRequestsResourceWithRawResponse, + WireDrawdownRequestsResourceWithStreamingResponse, + AsyncWireDrawdownRequestsResourceWithStreamingResponse, ) from .card_purchase_supplements import ( - CardPurchaseSupplements, - AsyncCardPurchaseSupplements, - CardPurchaseSupplementsWithRawResponse, - AsyncCardPurchaseSupplementsWithRawResponse, - CardPurchaseSupplementsWithStreamingResponse, - AsyncCardPurchaseSupplementsWithStreamingResponse, + CardPurchaseSupplementsResource, + AsyncCardPurchaseSupplementsResource, + CardPurchaseSupplementsResourceWithRawResponse, + AsyncCardPurchaseSupplementsResourceWithRawResponse, + CardPurchaseSupplementsResourceWithStreamingResponse, + AsyncCardPurchaseSupplementsResourceWithStreamingResponse, +) +from .intrafi_account_enrollments import ( + IntrafiAccountEnrollmentsResource, + AsyncIntrafiAccountEnrollmentsResource, + IntrafiAccountEnrollmentsResourceWithRawResponse, + AsyncIntrafiAccountEnrollmentsResourceWithRawResponse, + IntrafiAccountEnrollmentsResourceWithStreamingResponse, + AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) from .proof_of_authorization_requests import ( - ProofOfAuthorizationRequests, - AsyncProofOfAuthorizationRequests, - ProofOfAuthorizationRequestsWithRawResponse, - AsyncProofOfAuthorizationRequestsWithRawResponse, - ProofOfAuthorizationRequestsWithStreamingResponse, - AsyncProofOfAuthorizationRequestsWithStreamingResponse, + ProofOfAuthorizationRequestsResource, + AsyncProofOfAuthorizationRequestsResource, + ProofOfAuthorizationRequestsResourceWithRawResponse, + AsyncProofOfAuthorizationRequestsResourceWithRawResponse, + ProofOfAuthorizationRequestsResourceWithStreamingResponse, + AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse, ) from .real_time_payments_request_for_payments import ( - RealTimePaymentsRequestForPayments, - AsyncRealTimePaymentsRequestForPayments, - RealTimePaymentsRequestForPaymentsWithRawResponse, - AsyncRealTimePaymentsRequestForPaymentsWithRawResponse, - RealTimePaymentsRequestForPaymentsWithStreamingResponse, - AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse, + RealTimePaymentsRequestForPaymentsResource, + AsyncRealTimePaymentsRequestForPaymentsResource, + RealTimePaymentsRequestForPaymentsResourceWithRawResponse, + AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse, + RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, + AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, ) from .proof_of_authorization_request_submissions import ( - ProofOfAuthorizationRequestSubmissions, - AsyncProofOfAuthorizationRequestSubmissions, - ProofOfAuthorizationRequestSubmissionsWithRawResponse, - AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse, - ProofOfAuthorizationRequestSubmissionsWithStreamingResponse, - AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse, + ProofOfAuthorizationRequestSubmissionsResource, + AsyncProofOfAuthorizationRequestSubmissionsResource, + ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, + AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, + ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, + AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, ) __all__ = [ - "Accounts", - "AsyncAccounts", - "AccountsWithRawResponse", - "AsyncAccountsWithRawResponse", - "AccountsWithStreamingResponse", - "AsyncAccountsWithStreamingResponse", - "AccountNumbers", - "AsyncAccountNumbers", - "AccountNumbersWithRawResponse", - "AsyncAccountNumbersWithRawResponse", - "AccountNumbersWithStreamingResponse", - "AsyncAccountNumbersWithStreamingResponse", - "BookkeepingAccounts", - "AsyncBookkeepingAccounts", - "BookkeepingAccountsWithRawResponse", - "AsyncBookkeepingAccountsWithRawResponse", - "BookkeepingAccountsWithStreamingResponse", - "AsyncBookkeepingAccountsWithStreamingResponse", - "BookkeepingEntrySets", - "AsyncBookkeepingEntrySets", - "BookkeepingEntrySetsWithRawResponse", - "AsyncBookkeepingEntrySetsWithRawResponse", - "BookkeepingEntrySetsWithStreamingResponse", - "AsyncBookkeepingEntrySetsWithStreamingResponse", - "BookkeepingEntries", - "AsyncBookkeepingEntries", - "BookkeepingEntriesWithRawResponse", - "AsyncBookkeepingEntriesWithRawResponse", - "BookkeepingEntriesWithStreamingResponse", - "AsyncBookkeepingEntriesWithStreamingResponse", - "RealTimeDecisions", - "AsyncRealTimeDecisions", - "RealTimeDecisionsWithRawResponse", - "AsyncRealTimeDecisionsWithRawResponse", - "RealTimeDecisionsWithStreamingResponse", - "AsyncRealTimeDecisionsWithStreamingResponse", - "RealTimePaymentsTransfers", - "AsyncRealTimePaymentsTransfers", - "RealTimePaymentsTransfersWithRawResponse", - "AsyncRealTimePaymentsTransfersWithRawResponse", - "RealTimePaymentsTransfersWithStreamingResponse", - "AsyncRealTimePaymentsTransfersWithStreamingResponse", - "Cards", - "AsyncCards", - "CardsWithRawResponse", - "AsyncCardsWithRawResponse", - "CardsWithStreamingResponse", - "AsyncCardsWithStreamingResponse", - "CardDisputes", - "AsyncCardDisputes", - "CardDisputesWithRawResponse", - "AsyncCardDisputesWithRawResponse", - "CardDisputesWithStreamingResponse", - "AsyncCardDisputesWithStreamingResponse", - "CardPurchaseSupplements", - "AsyncCardPurchaseSupplements", - "CardPurchaseSupplementsWithRawResponse", - "AsyncCardPurchaseSupplementsWithRawResponse", - "CardPurchaseSupplementsWithStreamingResponse", - "AsyncCardPurchaseSupplementsWithStreamingResponse", - "ExternalAccounts", - "AsyncExternalAccounts", - "ExternalAccountsWithRawResponse", - "AsyncExternalAccountsWithRawResponse", - "ExternalAccountsWithStreamingResponse", - "AsyncExternalAccountsWithStreamingResponse", - "Exports", - "AsyncExports", - "ExportsWithRawResponse", - "AsyncExportsWithRawResponse", - "ExportsWithStreamingResponse", - "AsyncExportsWithStreamingResponse", - "DigitalWalletTokens", - "AsyncDigitalWalletTokens", - "DigitalWalletTokensWithRawResponse", - "AsyncDigitalWalletTokensWithRawResponse", - "DigitalWalletTokensWithStreamingResponse", - "AsyncDigitalWalletTokensWithStreamingResponse", - "Transactions", - "AsyncTransactions", - "TransactionsWithRawResponse", - "AsyncTransactionsWithRawResponse", - "TransactionsWithStreamingResponse", - "AsyncTransactionsWithStreamingResponse", - "PendingTransactions", - "AsyncPendingTransactions", - "PendingTransactionsWithRawResponse", - "AsyncPendingTransactionsWithRawResponse", - "PendingTransactionsWithStreamingResponse", - "AsyncPendingTransactionsWithStreamingResponse", - "Programs", - "AsyncPrograms", - "ProgramsWithRawResponse", - "AsyncProgramsWithRawResponse", - "ProgramsWithStreamingResponse", - "AsyncProgramsWithStreamingResponse", - "DeclinedTransactions", - "AsyncDeclinedTransactions", - "DeclinedTransactionsWithRawResponse", - "AsyncDeclinedTransactionsWithRawResponse", - "DeclinedTransactionsWithStreamingResponse", - "AsyncDeclinedTransactionsWithStreamingResponse", - "AccountTransfers", - "AsyncAccountTransfers", - "AccountTransfersWithRawResponse", - "AsyncAccountTransfersWithRawResponse", - "AccountTransfersWithStreamingResponse", - "AsyncAccountTransfersWithStreamingResponse", - "ACHTransfers", - "AsyncACHTransfers", - "ACHTransfersWithRawResponse", - "AsyncACHTransfersWithRawResponse", - "ACHTransfersWithStreamingResponse", - "AsyncACHTransfersWithStreamingResponse", - "ACHPrenotifications", - "AsyncACHPrenotifications", - "ACHPrenotificationsWithRawResponse", - "AsyncACHPrenotificationsWithRawResponse", - "ACHPrenotificationsWithStreamingResponse", - "AsyncACHPrenotificationsWithStreamingResponse", - "Documents", - "AsyncDocuments", - "DocumentsWithRawResponse", - "AsyncDocumentsWithRawResponse", - "DocumentsWithStreamingResponse", - "AsyncDocumentsWithStreamingResponse", - "WireTransfers", - "AsyncWireTransfers", - "WireTransfersWithRawResponse", - "AsyncWireTransfersWithRawResponse", - "WireTransfersWithStreamingResponse", - "AsyncWireTransfersWithStreamingResponse", - "CheckTransfers", - "AsyncCheckTransfers", - "CheckTransfersWithRawResponse", - "AsyncCheckTransfersWithRawResponse", - "CheckTransfersWithStreamingResponse", - "AsyncCheckTransfersWithStreamingResponse", - "Entities", - "AsyncEntities", - "EntitiesWithRawResponse", - "AsyncEntitiesWithRawResponse", - "EntitiesWithStreamingResponse", - "AsyncEntitiesWithStreamingResponse", - "InboundACHTransfers", - "AsyncInboundACHTransfers", - "InboundACHTransfersWithRawResponse", - "AsyncInboundACHTransfersWithRawResponse", - "InboundACHTransfersWithStreamingResponse", - "AsyncInboundACHTransfersWithStreamingResponse", - "InboundWireDrawdownRequests", - "AsyncInboundWireDrawdownRequests", - "InboundWireDrawdownRequestsWithRawResponse", - "AsyncInboundWireDrawdownRequestsWithRawResponse", - "InboundWireDrawdownRequestsWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsWithStreamingResponse", - "WireDrawdownRequests", - "AsyncWireDrawdownRequests", - "WireDrawdownRequestsWithRawResponse", - "AsyncWireDrawdownRequestsWithRawResponse", - "WireDrawdownRequestsWithStreamingResponse", - "AsyncWireDrawdownRequestsWithStreamingResponse", - "Events", - "AsyncEvents", - "EventsWithRawResponse", - "AsyncEventsWithRawResponse", - "EventsWithStreamingResponse", - "AsyncEventsWithStreamingResponse", - "EventSubscriptions", - "AsyncEventSubscriptions", - "EventSubscriptionsWithRawResponse", - "AsyncEventSubscriptionsWithRawResponse", - "EventSubscriptionsWithStreamingResponse", - "AsyncEventSubscriptionsWithStreamingResponse", - "Files", - "AsyncFiles", - "FilesWithRawResponse", - "AsyncFilesWithRawResponse", - "FilesWithStreamingResponse", - "AsyncFilesWithStreamingResponse", - "Groups", - "AsyncGroups", - "GroupsWithRawResponse", - "AsyncGroupsWithRawResponse", - "GroupsWithStreamingResponse", - "AsyncGroupsWithStreamingResponse", - "OAuthConnections", - "AsyncOAuthConnections", - "OAuthConnectionsWithRawResponse", - "AsyncOAuthConnectionsWithRawResponse", - "OAuthConnectionsWithStreamingResponse", - "AsyncOAuthConnectionsWithStreamingResponse", - "CheckDeposits", - "AsyncCheckDeposits", - "CheckDepositsWithRawResponse", - "AsyncCheckDepositsWithRawResponse", - "CheckDepositsWithStreamingResponse", - "AsyncCheckDepositsWithStreamingResponse", - "RoutingNumbers", - "AsyncRoutingNumbers", - "RoutingNumbersWithRawResponse", - "AsyncRoutingNumbersWithRawResponse", - "RoutingNumbersWithStreamingResponse", - "AsyncRoutingNumbersWithStreamingResponse", - "AccountStatements", - "AsyncAccountStatements", - "AccountStatementsWithRawResponse", - "AsyncAccountStatementsWithRawResponse", - "AccountStatementsWithStreamingResponse", - "AsyncAccountStatementsWithStreamingResponse", - "Simulations", - "AsyncSimulations", - "SimulationsWithRawResponse", - "AsyncSimulationsWithRawResponse", - "SimulationsWithStreamingResponse", - "AsyncSimulationsWithStreamingResponse", - "PhysicalCards", - "AsyncPhysicalCards", - "PhysicalCardsWithRawResponse", - "AsyncPhysicalCardsWithRawResponse", - "PhysicalCardsWithStreamingResponse", - "AsyncPhysicalCardsWithStreamingResponse", - "CardPayments", - "AsyncCardPayments", - "CardPaymentsWithRawResponse", - "AsyncCardPaymentsWithRawResponse", - "CardPaymentsWithStreamingResponse", - "AsyncCardPaymentsWithStreamingResponse", - "ProofOfAuthorizationRequests", - "AsyncProofOfAuthorizationRequests", - "ProofOfAuthorizationRequestsWithRawResponse", - "AsyncProofOfAuthorizationRequestsWithRawResponse", - "ProofOfAuthorizationRequestsWithStreamingResponse", - "AsyncProofOfAuthorizationRequestsWithStreamingResponse", - "ProofOfAuthorizationRequestSubmissions", - "AsyncProofOfAuthorizationRequestSubmissions", - "ProofOfAuthorizationRequestSubmissionsWithRawResponse", - "AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse", - "ProofOfAuthorizationRequestSubmissionsWithStreamingResponse", - "AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse", - "Intrafi", - "AsyncIntrafi", - "IntrafiWithRawResponse", - "AsyncIntrafiWithRawResponse", - "IntrafiWithStreamingResponse", - "AsyncIntrafiWithStreamingResponse", - "RealTimePaymentsRequestForPayments", - "AsyncRealTimePaymentsRequestForPayments", - "RealTimePaymentsRequestForPaymentsWithRawResponse", - "AsyncRealTimePaymentsRequestForPaymentsWithRawResponse", - "RealTimePaymentsRequestForPaymentsWithStreamingResponse", - "AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse", - "OAuthTokens", - "AsyncOAuthTokens", - "OAuthTokensWithRawResponse", - "AsyncOAuthTokensWithRawResponse", - "OAuthTokensWithStreamingResponse", - "AsyncOAuthTokensWithStreamingResponse", - "InboundWireTransfers", - "AsyncInboundWireTransfers", - "InboundWireTransfersWithRawResponse", - "AsyncInboundWireTransfersWithRawResponse", - "InboundWireTransfersWithStreamingResponse", - "AsyncInboundWireTransfersWithStreamingResponse", - "DigitalCardProfiles", - "AsyncDigitalCardProfiles", - "DigitalCardProfilesWithRawResponse", - "AsyncDigitalCardProfilesWithRawResponse", - "DigitalCardProfilesWithStreamingResponse", - "AsyncDigitalCardProfilesWithStreamingResponse", - "PhysicalCardProfiles", - "AsyncPhysicalCardProfiles", - "PhysicalCardProfilesWithRawResponse", - "AsyncPhysicalCardProfilesWithRawResponse", - "PhysicalCardProfilesWithStreamingResponse", - "AsyncPhysicalCardProfilesWithStreamingResponse", - "InboundCheckDeposits", - "AsyncInboundCheckDeposits", - "InboundCheckDepositsWithRawResponse", - "AsyncInboundCheckDepositsWithRawResponse", - "InboundCheckDepositsWithStreamingResponse", - "AsyncInboundCheckDepositsWithStreamingResponse", - "InboundMailItems", - "AsyncInboundMailItems", - "InboundMailItemsWithRawResponse", - "AsyncInboundMailItemsWithRawResponse", - "InboundMailItemsWithStreamingResponse", - "AsyncInboundMailItemsWithStreamingResponse", - "Lockboxes", - "AsyncLockboxes", - "LockboxesWithRawResponse", - "AsyncLockboxesWithRawResponse", - "LockboxesWithStreamingResponse", - "AsyncLockboxesWithStreamingResponse", + "AccountsResource", + "AsyncAccountsResource", + "AccountsResourceWithRawResponse", + "AsyncAccountsResourceWithRawResponse", + "AccountsResourceWithStreamingResponse", + "AsyncAccountsResourceWithStreamingResponse", + "AccountNumbersResource", + "AsyncAccountNumbersResource", + "AccountNumbersResourceWithRawResponse", + "AsyncAccountNumbersResourceWithRawResponse", + "AccountNumbersResourceWithStreamingResponse", + "AsyncAccountNumbersResourceWithStreamingResponse", + "CardsResource", + "AsyncCardsResource", + "CardsResourceWithRawResponse", + "AsyncCardsResourceWithRawResponse", + "CardsResourceWithStreamingResponse", + "AsyncCardsResourceWithStreamingResponse", + "CardPaymentsResource", + "AsyncCardPaymentsResource", + "CardPaymentsResourceWithRawResponse", + "AsyncCardPaymentsResourceWithRawResponse", + "CardPaymentsResourceWithStreamingResponse", + "AsyncCardPaymentsResourceWithStreamingResponse", + "CardPurchaseSupplementsResource", + "AsyncCardPurchaseSupplementsResource", + "CardPurchaseSupplementsResourceWithRawResponse", + "AsyncCardPurchaseSupplementsResourceWithRawResponse", + "CardPurchaseSupplementsResourceWithStreamingResponse", + "AsyncCardPurchaseSupplementsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", + "PhysicalCardsResource", + "AsyncPhysicalCardsResource", + "PhysicalCardsResourceWithRawResponse", + "AsyncPhysicalCardsResourceWithRawResponse", + "PhysicalCardsResourceWithStreamingResponse", + "AsyncPhysicalCardsResourceWithStreamingResponse", + "DigitalCardProfilesResource", + "AsyncDigitalCardProfilesResource", + "DigitalCardProfilesResourceWithRawResponse", + "AsyncDigitalCardProfilesResourceWithRawResponse", + "DigitalCardProfilesResourceWithStreamingResponse", + "AsyncDigitalCardProfilesResourceWithStreamingResponse", + "PhysicalCardProfilesResource", + "AsyncPhysicalCardProfilesResource", + "PhysicalCardProfilesResourceWithRawResponse", + "AsyncPhysicalCardProfilesResourceWithRawResponse", + "PhysicalCardProfilesResourceWithStreamingResponse", + "AsyncPhysicalCardProfilesResourceWithStreamingResponse", + "DigitalWalletTokensResource", + "AsyncDigitalWalletTokensResource", + "DigitalWalletTokensResourceWithRawResponse", + "AsyncDigitalWalletTokensResourceWithRawResponse", + "DigitalWalletTokensResourceWithStreamingResponse", + "AsyncDigitalWalletTokensResourceWithStreamingResponse", + "TransactionsResource", + "AsyncTransactionsResource", + "TransactionsResourceWithRawResponse", + "AsyncTransactionsResourceWithRawResponse", + "TransactionsResourceWithStreamingResponse", + "AsyncTransactionsResourceWithStreamingResponse", + "PendingTransactionsResource", + "AsyncPendingTransactionsResource", + "PendingTransactionsResourceWithRawResponse", + "AsyncPendingTransactionsResourceWithRawResponse", + "PendingTransactionsResourceWithStreamingResponse", + "AsyncPendingTransactionsResourceWithStreamingResponse", + "DeclinedTransactionsResource", + "AsyncDeclinedTransactionsResource", + "DeclinedTransactionsResourceWithRawResponse", + "AsyncDeclinedTransactionsResourceWithRawResponse", + "DeclinedTransactionsResourceWithStreamingResponse", + "AsyncDeclinedTransactionsResourceWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", + "ACHTransfersResource", + "AsyncACHTransfersResource", + "ACHTransfersResourceWithRawResponse", + "AsyncACHTransfersResourceWithRawResponse", + "ACHTransfersResourceWithStreamingResponse", + "AsyncACHTransfersResourceWithStreamingResponse", + "ACHPrenotificationsResource", + "AsyncACHPrenotificationsResource", + "ACHPrenotificationsResourceWithRawResponse", + "AsyncACHPrenotificationsResourceWithRawResponse", + "ACHPrenotificationsResourceWithStreamingResponse", + "AsyncACHPrenotificationsResourceWithStreamingResponse", + "InboundACHTransfersResource", + "AsyncInboundACHTransfersResource", + "InboundACHTransfersResourceWithRawResponse", + "AsyncInboundACHTransfersResourceWithRawResponse", + "InboundACHTransfersResourceWithStreamingResponse", + "AsyncInboundACHTransfersResourceWithStreamingResponse", + "WireTransfersResource", + "AsyncWireTransfersResource", + "WireTransfersResourceWithRawResponse", + "AsyncWireTransfersResourceWithRawResponse", + "WireTransfersResourceWithStreamingResponse", + "AsyncWireTransfersResourceWithStreamingResponse", + "InboundWireTransfersResource", + "AsyncInboundWireTransfersResource", + "InboundWireTransfersResourceWithRawResponse", + "AsyncInboundWireTransfersResourceWithRawResponse", + "InboundWireTransfersResourceWithStreamingResponse", + "AsyncInboundWireTransfersResourceWithStreamingResponse", + "WireDrawdownRequestsResource", + "AsyncWireDrawdownRequestsResource", + "WireDrawdownRequestsResourceWithRawResponse", + "AsyncWireDrawdownRequestsResourceWithRawResponse", + "WireDrawdownRequestsResourceWithStreamingResponse", + "AsyncWireDrawdownRequestsResourceWithStreamingResponse", + "InboundWireDrawdownRequestsResource", + "AsyncInboundWireDrawdownRequestsResource", + "InboundWireDrawdownRequestsResourceWithRawResponse", + "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", + "InboundWireDrawdownRequestsResourceWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", + "CheckTransfersResource", + "AsyncCheckTransfersResource", + "CheckTransfersResourceWithRawResponse", + "AsyncCheckTransfersResourceWithRawResponse", + "CheckTransfersResourceWithStreamingResponse", + "AsyncCheckTransfersResourceWithStreamingResponse", + "InboundCheckDepositsResource", + "AsyncInboundCheckDepositsResource", + "InboundCheckDepositsResourceWithRawResponse", + "AsyncInboundCheckDepositsResourceWithRawResponse", + "InboundCheckDepositsResourceWithStreamingResponse", + "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "RealTimePaymentsTransfersResource", + "AsyncRealTimePaymentsTransfersResource", + "RealTimePaymentsTransfersResourceWithRawResponse", + "AsyncRealTimePaymentsTransfersResourceWithRawResponse", + "RealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "CheckDepositsResource", + "AsyncCheckDepositsResource", + "CheckDepositsResourceWithRawResponse", + "AsyncCheckDepositsResourceWithRawResponse", + "CheckDepositsResourceWithStreamingResponse", + "AsyncCheckDepositsResourceWithStreamingResponse", + "LockboxesResource", + "AsyncLockboxesResource", + "LockboxesResourceWithRawResponse", + "AsyncLockboxesResourceWithRawResponse", + "LockboxesResourceWithStreamingResponse", + "AsyncLockboxesResourceWithStreamingResponse", + "InboundMailItemsResource", + "AsyncInboundMailItemsResource", + "InboundMailItemsResourceWithRawResponse", + "AsyncInboundMailItemsResourceWithRawResponse", + "InboundMailItemsResourceWithStreamingResponse", + "AsyncInboundMailItemsResourceWithStreamingResponse", + "RoutingNumbersResource", + "AsyncRoutingNumbersResource", + "RoutingNumbersResourceWithRawResponse", + "AsyncRoutingNumbersResourceWithRawResponse", + "RoutingNumbersResourceWithStreamingResponse", + "AsyncRoutingNumbersResourceWithStreamingResponse", + "ExternalAccountsResource", + "AsyncExternalAccountsResource", + "ExternalAccountsResourceWithRawResponse", + "AsyncExternalAccountsResourceWithRawResponse", + "ExternalAccountsResourceWithStreamingResponse", + "AsyncExternalAccountsResourceWithStreamingResponse", + "EntitiesResource", + "AsyncEntitiesResource", + "EntitiesResourceWithRawResponse", + "AsyncEntitiesResourceWithRawResponse", + "EntitiesResourceWithStreamingResponse", + "AsyncEntitiesResourceWithStreamingResponse", + "SupplementalDocumentsResource", + "AsyncSupplementalDocumentsResource", + "SupplementalDocumentsResourceWithRawResponse", + "AsyncSupplementalDocumentsResourceWithRawResponse", + "SupplementalDocumentsResourceWithStreamingResponse", + "AsyncSupplementalDocumentsResourceWithStreamingResponse", + "ProgramsResource", + "AsyncProgramsResource", + "ProgramsResourceWithRawResponse", + "AsyncProgramsResourceWithRawResponse", + "ProgramsResourceWithStreamingResponse", + "AsyncProgramsResourceWithStreamingResponse", + "ProofOfAuthorizationRequestsResource", + "AsyncProofOfAuthorizationRequestsResource", + "ProofOfAuthorizationRequestsResourceWithRawResponse", + "AsyncProofOfAuthorizationRequestsResourceWithRawResponse", + "ProofOfAuthorizationRequestsResourceWithStreamingResponse", + "AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse", + "ProofOfAuthorizationRequestSubmissionsResource", + "AsyncProofOfAuthorizationRequestSubmissionsResource", + "ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", + "AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", + "ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", + "AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", + "AccountStatementsResource", + "AsyncAccountStatementsResource", + "AccountStatementsResourceWithRawResponse", + "AsyncAccountStatementsResourceWithRawResponse", + "AccountStatementsResourceWithStreamingResponse", + "AsyncAccountStatementsResourceWithStreamingResponse", + "FilesResource", + "AsyncFilesResource", + "FilesResourceWithRawResponse", + "AsyncFilesResourceWithRawResponse", + "FilesResourceWithStreamingResponse", + "AsyncFilesResourceWithStreamingResponse", + "DocumentsResource", + "AsyncDocumentsResource", + "DocumentsResourceWithRawResponse", + "AsyncDocumentsResourceWithRawResponse", + "DocumentsResourceWithStreamingResponse", + "AsyncDocumentsResourceWithStreamingResponse", + "ExportsResource", + "AsyncExportsResource", + "ExportsResourceWithRawResponse", + "AsyncExportsResourceWithRawResponse", + "ExportsResourceWithStreamingResponse", + "AsyncExportsResourceWithStreamingResponse", + "EventsResource", + "AsyncEventsResource", + "EventsResourceWithRawResponse", + "AsyncEventsResourceWithRawResponse", + "EventsResourceWithStreamingResponse", + "AsyncEventsResourceWithStreamingResponse", + "EventSubscriptionsResource", + "AsyncEventSubscriptionsResource", + "EventSubscriptionsResourceWithRawResponse", + "AsyncEventSubscriptionsResourceWithRawResponse", + "EventSubscriptionsResourceWithStreamingResponse", + "AsyncEventSubscriptionsResourceWithStreamingResponse", + "RealTimeDecisionsResource", + "AsyncRealTimeDecisionsResource", + "RealTimeDecisionsResourceWithRawResponse", + "AsyncRealTimeDecisionsResourceWithRawResponse", + "RealTimeDecisionsResourceWithStreamingResponse", + "AsyncRealTimeDecisionsResourceWithStreamingResponse", + "BookkeepingAccountsResource", + "AsyncBookkeepingAccountsResource", + "BookkeepingAccountsResourceWithRawResponse", + "AsyncBookkeepingAccountsResourceWithRawResponse", + "BookkeepingAccountsResourceWithStreamingResponse", + "AsyncBookkeepingAccountsResourceWithStreamingResponse", + "BookkeepingEntrySetsResource", + "AsyncBookkeepingEntrySetsResource", + "BookkeepingEntrySetsResourceWithRawResponse", + "AsyncBookkeepingEntrySetsResourceWithRawResponse", + "BookkeepingEntrySetsResourceWithStreamingResponse", + "AsyncBookkeepingEntrySetsResourceWithStreamingResponse", + "BookkeepingEntriesResource", + "AsyncBookkeepingEntriesResource", + "BookkeepingEntriesResourceWithRawResponse", + "AsyncBookkeepingEntriesResourceWithRawResponse", + "BookkeepingEntriesResourceWithStreamingResponse", + "AsyncBookkeepingEntriesResourceWithStreamingResponse", + "GroupsResource", + "AsyncGroupsResource", + "GroupsResourceWithRawResponse", + "AsyncGroupsResourceWithRawResponse", + "GroupsResourceWithStreamingResponse", + "AsyncGroupsResourceWithStreamingResponse", + "OAuthConnectionsResource", + "AsyncOAuthConnectionsResource", + "OAuthConnectionsResourceWithRawResponse", + "AsyncOAuthConnectionsResourceWithRawResponse", + "OAuthConnectionsResourceWithStreamingResponse", + "AsyncOAuthConnectionsResourceWithStreamingResponse", + "OAuthTokensResource", + "AsyncOAuthTokensResource", + "OAuthTokensResourceWithRawResponse", + "AsyncOAuthTokensResourceWithRawResponse", + "OAuthTokensResourceWithStreamingResponse", + "AsyncOAuthTokensResourceWithStreamingResponse", + "IntrafiAccountEnrollmentsResource", + "AsyncIntrafiAccountEnrollmentsResource", + "IntrafiAccountEnrollmentsResourceWithRawResponse", + "AsyncIntrafiAccountEnrollmentsResourceWithRawResponse", + "IntrafiAccountEnrollmentsResourceWithStreamingResponse", + "AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse", + "IntrafiBalancesResource", + "AsyncIntrafiBalancesResource", + "IntrafiBalancesResourceWithRawResponse", + "AsyncIntrafiBalancesResourceWithRawResponse", + "IntrafiBalancesResourceWithStreamingResponse", + "AsyncIntrafiBalancesResourceWithStreamingResponse", + "IntrafiExclusionsResource", + "AsyncIntrafiExclusionsResource", + "IntrafiExclusionsResourceWithRawResponse", + "AsyncIntrafiExclusionsResourceWithRawResponse", + "IntrafiExclusionsResourceWithStreamingResponse", + "AsyncIntrafiExclusionsResourceWithStreamingResponse", + "RealTimePaymentsRequestForPaymentsResource", + "AsyncRealTimePaymentsRequestForPaymentsResource", + "RealTimePaymentsRequestForPaymentsResourceWithRawResponse", + "AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse", + "RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", + "AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", + "SimulationsResource", + "AsyncSimulationsResource", + "SimulationsResourceWithRawResponse", + "AsyncSimulationsResourceWithRawResponse", + "SimulationsResourceWithStreamingResponse", + "AsyncSimulationsResourceWithStreamingResponse", ] diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 6823bc66c..37125226b 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( account_number_list_params, account_number_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_number import AccountNumber -__all__ = ["AccountNumbers", "AsyncAccountNumbers"] +__all__ = ["AccountNumbersResource", "AsyncAccountNumbersResource"] -class AccountNumbers(SyncAPIResource): +class AccountNumbersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountNumbersWithRawResponse: - return AccountNumbersWithRawResponse(self) + def with_raw_response(self) -> AccountNumbersResourceWithRawResponse: + return AccountNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountNumbersWithStreamingResponse: - return AccountNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountNumbersResourceWithStreamingResponse: + return AccountNumbersResourceWithStreamingResponse(self) def create( self, @@ -275,14 +279,14 @@ def list( ) -class AsyncAccountNumbers(AsyncAPIResource): +class AsyncAccountNumbersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountNumbersWithRawResponse: - return AsyncAccountNumbersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountNumbersResourceWithRawResponse: + return AsyncAccountNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountNumbersWithStreamingResponse: - return AsyncAccountNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountNumbersResourceWithStreamingResponse: + return AsyncAccountNumbersResourceWithStreamingResponse(self) async def create( self, @@ -523,44 +527,44 @@ def list( ) -class AccountNumbersWithRawResponse: - def __init__(self, account_numbers: AccountNumbers) -> None: +class AccountNumbersResourceWithRawResponse: + def __init__(self, account_numbers: AccountNumbersResource) -> None: self._account_numbers = account_numbers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( account_numbers.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_numbers.list, ) -class AsyncAccountNumbersWithRawResponse: - def __init__(self, account_numbers: AsyncAccountNumbers) -> None: +class AsyncAccountNumbersResourceWithRawResponse: + def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: self._account_numbers = account_numbers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( account_numbers.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_numbers.list, ) -class AccountNumbersWithStreamingResponse: - def __init__(self, account_numbers: AccountNumbers) -> None: +class AccountNumbersResourceWithStreamingResponse: + def __init__(self, account_numbers: AccountNumbersResource) -> None: self._account_numbers = account_numbers self.create = to_streamed_response_wrapper( @@ -577,8 +581,8 @@ def __init__(self, account_numbers: AccountNumbers) -> None: ) -class AsyncAccountNumbersWithStreamingResponse: - def __init__(self, account_numbers: AsyncAccountNumbers) -> None: +class AsyncAccountNumbersResourceWithStreamingResponse: + def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: self._account_numbers = account_numbers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 1a21e706a..1ea474854 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import account_statement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_statement import AccountStatement -__all__ = ["AccountStatements", "AsyncAccountStatements"] +__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] -class AccountStatements(SyncAPIResource): +class AccountStatementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncAccountStatements(AsyncAPIResource): +class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class AccountStatementsWithRawResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_statements.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_statements.list, ) -class AsyncAccountStatementsWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_statements.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_statements.list, ) -class AccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, account_statements: AccountStatements) -> None: ) -class AsyncAccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 8b2c357b6..ef942a740 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import account_transfer_list_params, account_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_transfer import AccountTransfer -__all__ = ["AccountTransfers", "AsyncAccountTransfers"] +__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] -class AccountTransfers(SyncAPIResource): +class AccountTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self) def create( self, @@ -280,14 +284,14 @@ def cancel( ) -class AsyncAccountTransfers(AsyncAPIResource): +class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self) async def create( self, @@ -539,50 +543,50 @@ async def cancel( ) -class AccountTransfersWithRawResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( account_transfers.cancel, ) -class AsyncAccountTransfersWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( account_transfers.cancel, ) -class AccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers self.create = to_streamed_response_wrapper( @@ -602,8 +606,8 @@ def __init__(self, account_transfers: AccountTransfers) -> None: ) -class AsyncAccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 19efac5de..11537977d 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ( account_list_params, account_create_params, @@ -22,23 +21,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup -__all__ = ["Accounts", "AsyncAccounts"] +__all__ = ["AccountsResource", "AsyncAccountsResource"] -class Accounts(SyncAPIResource): +class AccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountsWithRawResponse: - return AccountsWithRawResponse(self) + def with_raw_response(self) -> AccountsResourceWithRawResponse: + return AccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountsWithStreamingResponse: - return AccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountsResourceWithStreamingResponse: + return AccountsResourceWithStreamingResponse(self) def create( self, @@ -339,14 +343,14 @@ def close( ) -class AsyncAccounts(AsyncAPIResource): +class AsyncAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountsWithRawResponse: - return AsyncAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: + return AsyncAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountsWithStreamingResponse: - return AsyncAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse: + return AsyncAccountsResourceWithStreamingResponse(self) async def create( self, @@ -647,56 +651,56 @@ async def close( ) -class AccountsWithRawResponse: - def __init__(self, accounts: Accounts) -> None: +class AccountsResourceWithRawResponse: + def __init__(self, accounts: AccountsResource) -> None: self._accounts = accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( accounts.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( accounts.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( accounts.list, ) - self.balance = _legacy_response.to_raw_response_wrapper( + self.balance = to_raw_response_wrapper( accounts.balance, ) - self.close = _legacy_response.to_raw_response_wrapper( + self.close = to_raw_response_wrapper( accounts.close, ) -class AsyncAccountsWithRawResponse: - def __init__(self, accounts: AsyncAccounts) -> None: +class AsyncAccountsResourceWithRawResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: self._accounts = accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( accounts.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( accounts.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( accounts.list, ) - self.balance = _legacy_response.async_to_raw_response_wrapper( + self.balance = async_to_raw_response_wrapper( accounts.balance, ) - self.close = _legacy_response.async_to_raw_response_wrapper( + self.close = async_to_raw_response_wrapper( accounts.close, ) -class AccountsWithStreamingResponse: - def __init__(self, accounts: Accounts) -> None: +class AccountsResourceWithStreamingResponse: + def __init__(self, accounts: AccountsResource) -> None: self._accounts = accounts self.create = to_streamed_response_wrapper( @@ -719,8 +723,8 @@ def __init__(self, accounts: Accounts) -> None: ) -class AsyncAccountsWithStreamingResponse: - def __init__(self, accounts: AsyncAccounts) -> None: +class AsyncAccountsResourceWithStreamingResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: self._accounts = accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 8e0e1332f..b53f8c1b0 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_prenotification import ACHPrenotification -__all__ = ["ACHPrenotifications", "AsyncACHPrenotifications"] +__all__ = ["ACHPrenotificationsResource", "AsyncACHPrenotificationsResource"] -class ACHPrenotifications(SyncAPIResource): +class ACHPrenotificationsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHPrenotificationsWithRawResponse: - return ACHPrenotificationsWithRawResponse(self) + def with_raw_response(self) -> ACHPrenotificationsResourceWithRawResponse: + return ACHPrenotificationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHPrenotificationsWithStreamingResponse: - return ACHPrenotificationsWithStreamingResponse(self) + def with_streaming_response(self) -> ACHPrenotificationsResourceWithStreamingResponse: + return ACHPrenotificationsResourceWithStreamingResponse(self) def create( self, @@ -240,14 +244,14 @@ def list( ) -class AsyncACHPrenotifications(AsyncAPIResource): +class AsyncACHPrenotificationsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHPrenotificationsWithRawResponse: - return AsyncACHPrenotificationsWithRawResponse(self) + def with_raw_response(self) -> AsyncACHPrenotificationsResourceWithRawResponse: + return AsyncACHPrenotificationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHPrenotificationsWithStreamingResponse: - return AsyncACHPrenotificationsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHPrenotificationsResourceWithStreamingResponse: + return AsyncACHPrenotificationsResourceWithStreamingResponse(self) async def create( self, @@ -455,38 +459,38 @@ def list( ) -class ACHPrenotificationsWithRawResponse: - def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: +class ACHPrenotificationsResourceWithRawResponse: + def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( ach_prenotifications.list, ) -class AsyncACHPrenotificationsWithRawResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: +class AsyncACHPrenotificationsResourceWithRawResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( ach_prenotifications.list, ) -class ACHPrenotificationsWithStreamingResponse: - def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: +class ACHPrenotificationsResourceWithStreamingResponse: + def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications self.create = to_streamed_response_wrapper( @@ -500,8 +504,8 @@ def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: ) -class AsyncACHPrenotificationsWithStreamingResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: +class AsyncACHPrenotificationsResourceWithStreamingResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index b1b178175..6df03a4fd 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_transfer import ACHTransfer -__all__ = ["ACHTransfers", "AsyncACHTransfers"] +__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] -class ACHTransfers(SyncAPIResource): +class ACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self) def create( self, @@ -375,14 +379,14 @@ def cancel( ) -class AsyncACHTransfers(AsyncAPIResource): +class AsyncACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self) async def create( self, @@ -725,50 +729,50 @@ async def cancel( ) -class ACHTransfersWithRawResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( ach_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( ach_transfers.cancel, ) -class AsyncACHTransfersWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( ach_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( ach_transfers.cancel, ) -class ACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers self.create = to_streamed_response_wrapper( @@ -788,8 +792,8 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: ) -class AsyncACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 558af0946..7fad31d1f 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ( bookkeeping_account_list_params, bookkeeping_account_create_params, @@ -22,23 +21,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup -__all__ = ["BookkeepingAccounts", "AsyncBookkeepingAccounts"] +__all__ = ["BookkeepingAccountsResource", "AsyncBookkeepingAccountsResource"] -class BookkeepingAccounts(SyncAPIResource): +class BookkeepingAccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingAccountsWithRawResponse: - return BookkeepingAccountsWithRawResponse(self) + def with_raw_response(self) -> BookkeepingAccountsResourceWithRawResponse: + return BookkeepingAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingAccountsWithStreamingResponse: - return BookkeepingAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingAccountsResourceWithStreamingResponse: + return BookkeepingAccountsResourceWithStreamingResponse(self) def create( self, @@ -251,14 +255,14 @@ def balance( ) -class AsyncBookkeepingAccounts(AsyncAPIResource): +class AsyncBookkeepingAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingAccountsWithRawResponse: - return AsyncBookkeepingAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingAccountsResourceWithRawResponse: + return AsyncBookkeepingAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingAccountsWithStreamingResponse: - return AsyncBookkeepingAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingAccountsResourceWithStreamingResponse: + return AsyncBookkeepingAccountsResourceWithStreamingResponse(self) async def create( self, @@ -473,44 +477,44 @@ async def balance( ) -class BookkeepingAccountsWithRawResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: +class BookkeepingAccountsResourceWithRawResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = _legacy_response.to_raw_response_wrapper( + self.balance = to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class AsyncBookkeepingAccountsWithRawResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: +class AsyncBookkeepingAccountsResourceWithRawResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = _legacy_response.async_to_raw_response_wrapper( + self.balance = async_to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class BookkeepingAccountsWithStreamingResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: +class BookkeepingAccountsResourceWithStreamingResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = to_streamed_response_wrapper( @@ -527,8 +531,8 @@ def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: ) -class AsyncBookkeepingAccountsWithStreamingResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: +class AsyncBookkeepingAccountsResourceWithStreamingResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index dacbd168e..d774cda33 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import bookkeeping_entry_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry import BookkeepingEntry -__all__ = ["BookkeepingEntries", "AsyncBookkeepingEntries"] +__all__ = ["BookkeepingEntriesResource", "AsyncBookkeepingEntriesResource"] -class BookkeepingEntries(SyncAPIResource): +class BookkeepingEntriesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntriesWithRawResponse: - return BookkeepingEntriesWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntriesResourceWithRawResponse: + return BookkeepingEntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntriesWithStreamingResponse: - return BookkeepingEntriesWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntriesResourceWithStreamingResponse: + return BookkeepingEntriesResourceWithStreamingResponse(self) def retrieve( self, @@ -113,14 +117,14 @@ def list( ) -class AsyncBookkeepingEntries(AsyncAPIResource): +class AsyncBookkeepingEntriesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntriesWithRawResponse: - return AsyncBookkeepingEntriesWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntriesResourceWithRawResponse: + return AsyncBookkeepingEntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntriesWithStreamingResponse: - return AsyncBookkeepingEntriesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntriesResourceWithStreamingResponse: + return AsyncBookkeepingEntriesResourceWithStreamingResponse(self) async def retrieve( self, @@ -208,32 +212,32 @@ def list( ) -class BookkeepingEntriesWithRawResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: +class BookkeepingEntriesResourceWithRawResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_entries.list, ) -class AsyncBookkeepingEntriesWithRawResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: +class AsyncBookkeepingEntriesResourceWithRawResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_entries.list, ) -class BookkeepingEntriesWithStreamingResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: +class BookkeepingEntriesResourceWithStreamingResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = to_streamed_response_wrapper( @@ -244,8 +248,8 @@ def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: ) -class AsyncBookkeepingEntriesWithStreamingResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: +class AsyncBookkeepingEntriesResourceWithStreamingResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index d264d675b..1aa8b68e3 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -16,22 +15,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet -__all__ = ["BookkeepingEntrySets", "AsyncBookkeepingEntrySets"] +__all__ = ["BookkeepingEntrySetsResource", "AsyncBookkeepingEntrySetsResource"] -class BookkeepingEntrySets(SyncAPIResource): +class BookkeepingEntrySetsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntrySetsWithRawResponse: - return BookkeepingEntrySetsWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntrySetsResourceWithRawResponse: + return BookkeepingEntrySetsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntrySetsWithStreamingResponse: - return BookkeepingEntrySetsWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntrySetsResourceWithStreamingResponse: + return BookkeepingEntrySetsResourceWithStreamingResponse(self) def create( self, @@ -185,14 +189,14 @@ def list( ) -class AsyncBookkeepingEntrySets(AsyncAPIResource): +class AsyncBookkeepingEntrySetsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntrySetsWithRawResponse: - return AsyncBookkeepingEntrySetsWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntrySetsResourceWithRawResponse: + return AsyncBookkeepingEntrySetsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntrySetsWithStreamingResponse: - return AsyncBookkeepingEntrySetsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + return AsyncBookkeepingEntrySetsResourceWithStreamingResponse(self) async def create( self, @@ -346,38 +350,38 @@ def list( ) -class BookkeepingEntrySetsWithRawResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: +class BookkeepingEntrySetsResourceWithRawResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class AsyncBookkeepingEntrySetsWithRawResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: +class AsyncBookkeepingEntrySetsResourceWithRawResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class BookkeepingEntrySetsWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: +class BookkeepingEntrySetsResourceWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = to_streamed_response_wrapper( @@ -391,8 +395,8 @@ def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: ) -class AsyncBookkeepingEntrySetsWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: +class AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index d34070755..45c8e8b73 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import card_dispute_list_params, card_dispute_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_dispute import CardDispute -__all__ = ["CardDisputes", "AsyncCardDisputes"] +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] -class CardDisputes(SyncAPIResource): +class CardDisputesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self) + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self) def create( self, @@ -176,14 +180,14 @@ def list( ) -class AsyncCardDisputes(AsyncAPIResource): +class AsyncCardDisputesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self) async def create( self, @@ -331,38 +335,38 @@ def list( ) -class CardDisputesWithRawResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_disputes.list, ) -class AsyncCardDisputesWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_disputes.list, ) -class CardDisputesWithStreamingResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes self.create = to_streamed_response_wrapper( @@ -376,8 +380,8 @@ def __init__(self, card_disputes: CardDisputes) -> None: ) -class AsyncCardDisputesWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 1cc066da6..9f70437e6 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import card_payment_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_payment import CardPayment -__all__ = ["CardPayments", "AsyncCardPayments"] +__all__ = ["CardPaymentsResource", "AsyncCardPaymentsResource"] -class CardPayments(SyncAPIResource): +class CardPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPaymentsWithRawResponse: - return CardPaymentsWithRawResponse(self) + def with_raw_response(self) -> CardPaymentsResourceWithRawResponse: + return CardPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPaymentsWithStreamingResponse: - return CardPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> CardPaymentsResourceWithStreamingResponse: + return CardPaymentsResourceWithStreamingResponse(self) def retrieve( self, @@ -121,14 +125,14 @@ def list( ) -class AsyncCardPayments(AsyncAPIResource): +class AsyncCardPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPaymentsWithRawResponse: - return AsyncCardPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPaymentsResourceWithRawResponse: + return AsyncCardPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPaymentsWithStreamingResponse: - return AsyncCardPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPaymentsResourceWithStreamingResponse: + return AsyncCardPaymentsResourceWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +228,32 @@ def list( ) -class CardPaymentsWithRawResponse: - def __init__(self, card_payments: CardPayments) -> None: +class CardPaymentsResourceWithRawResponse: + def __init__(self, card_payments: CardPaymentsResource) -> None: self._card_payments = card_payments - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_payments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_payments.list, ) -class AsyncCardPaymentsWithRawResponse: - def __init__(self, card_payments: AsyncCardPayments) -> None: +class AsyncCardPaymentsResourceWithRawResponse: + def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: self._card_payments = card_payments - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_payments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_payments.list, ) -class CardPaymentsWithStreamingResponse: - def __init__(self, card_payments: CardPayments) -> None: +class CardPaymentsResourceWithStreamingResponse: + def __init__(self, card_payments: CardPaymentsResource) -> None: self._card_payments = card_payments self.retrieve = to_streamed_response_wrapper( @@ -260,8 +264,8 @@ def __init__(self, card_payments: CardPayments) -> None: ) -class AsyncCardPaymentsWithStreamingResponse: - def __init__(self, card_payments: AsyncCardPayments) -> None: +class AsyncCardPaymentsResourceWithStreamingResponse: + def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: self._card_payments = card_payments self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 8c5cc6aa3..20a7f41c2 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import card_purchase_supplement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement -__all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] +__all__ = ["CardPurchaseSupplementsResource", "AsyncCardPurchaseSupplementsResource"] -class CardPurchaseSupplements(SyncAPIResource): +class CardPurchaseSupplementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPurchaseSupplementsWithRawResponse: - return CardPurchaseSupplementsWithRawResponse(self) + def with_raw_response(self) -> CardPurchaseSupplementsResourceWithRawResponse: + return CardPurchaseSupplementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPurchaseSupplementsWithStreamingResponse: - return CardPurchaseSupplementsWithStreamingResponse(self) + def with_streaming_response(self) -> CardPurchaseSupplementsResourceWithStreamingResponse: + return CardPurchaseSupplementsResourceWithStreamingResponse(self) def retrieve( self, @@ -120,14 +124,14 @@ def list( ) -class AsyncCardPurchaseSupplements(AsyncAPIResource): +class AsyncCardPurchaseSupplementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPurchaseSupplementsWithRawResponse: - return AsyncCardPurchaseSupplementsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPurchaseSupplementsResourceWithRawResponse: + return AsyncCardPurchaseSupplementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPurchaseSupplementsWithStreamingResponse: - return AsyncCardPurchaseSupplementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + return AsyncCardPurchaseSupplementsResourceWithStreamingResponse(self) async def retrieve( self, @@ -222,32 +226,32 @@ def list( ) -class CardPurchaseSupplementsWithRawResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: +class CardPurchaseSupplementsResourceWithRawResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_purchase_supplements.list, ) -class AsyncCardPurchaseSupplementsWithRawResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: +class AsyncCardPurchaseSupplementsResourceWithRawResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_purchase_supplements.list, ) -class CardPurchaseSupplementsWithStreamingResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: +class CardPurchaseSupplementsResourceWithStreamingResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = to_streamed_response_wrapper( @@ -258,8 +262,8 @@ def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: ) -class AsyncCardPurchaseSupplementsWithStreamingResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: +class AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 687b5df75..fd16aac16 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import card_list_params, card_create_params, card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,23 +14,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails -__all__ = ["Cards", "AsyncCards"] +__all__ = ["CardsResource", "AsyncCardsResource"] -class Cards(SyncAPIResource): +class CardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self) + def with_raw_response(self) -> CardsResourceWithRawResponse: + return CardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self) + def with_streaming_response(self) -> CardsResourceWithStreamingResponse: + return CardsResourceWithStreamingResponse(self) def create( self, @@ -270,7 +274,7 @@ def list( model=Card, ) - def retrieve_sensitive_details( + def details( self, card_id: str, *, @@ -306,14 +310,14 @@ def retrieve_sensitive_details( ) -class AsyncCards(AsyncAPIResource): +class AsyncCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardsResourceWithRawResponse: + return AsyncCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardsResourceWithStreamingResponse: + return AsyncCardsResourceWithStreamingResponse(self) async def create( self, @@ -552,7 +556,7 @@ def list( model=Card, ) - async def retrieve_sensitive_details( + async def details( self, card_id: str, *, @@ -588,50 +592,50 @@ async def retrieve_sensitive_details( ) -class CardsWithRawResponse: - def __init__(self, cards: Cards) -> None: +class CardsResourceWithRawResponse: + def __init__(self, cards: CardsResource) -> None: self._cards = cards - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( cards.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( cards.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( cards.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = _legacy_response.to_raw_response_wrapper( - cards.retrieve_sensitive_details, + self.details = to_raw_response_wrapper( + cards.details, ) -class AsyncCardsWithRawResponse: - def __init__(self, cards: AsyncCards) -> None: +class AsyncCardsResourceWithRawResponse: + def __init__(self, cards: AsyncCardsResource) -> None: self._cards = cards - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( cards.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( cards.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( cards.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = _legacy_response.async_to_raw_response_wrapper( - cards.retrieve_sensitive_details, + self.details = async_to_raw_response_wrapper( + cards.details, ) -class CardsWithStreamingResponse: - def __init__(self, cards: Cards) -> None: +class CardsResourceWithStreamingResponse: + def __init__(self, cards: CardsResource) -> None: self._cards = cards self.create = to_streamed_response_wrapper( @@ -646,13 +650,13 @@ def __init__(self, cards: Cards) -> None: self.list = to_streamed_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = to_streamed_response_wrapper( - cards.retrieve_sensitive_details, + self.details = to_streamed_response_wrapper( + cards.details, ) -class AsyncCardsWithStreamingResponse: - def __init__(self, cards: AsyncCards) -> None: +class AsyncCardsResourceWithStreamingResponse: + def __init__(self, cards: AsyncCardsResource) -> None: self._cards = cards self.create = async_to_streamed_response_wrapper( @@ -667,6 +671,6 @@ def __init__(self, cards: AsyncCards) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = async_to_streamed_response_wrapper( - cards.retrieve_sensitive_details, + self.details = async_to_streamed_response_wrapper( + cards.details, ) diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 407a36a92..ec91d342b 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import check_deposit_list_params, check_deposit_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_deposit import CheckDeposit -__all__ = ["CheckDeposits", "AsyncCheckDeposits"] +__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] -class CheckDeposits(SyncAPIResource): +class CheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self) def create( self, @@ -190,14 +194,14 @@ def list( ) -class AsyncCheckDeposits(AsyncAPIResource): +class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self) async def create( self, @@ -359,38 +363,38 @@ def list( ) -class CheckDepositsWithRawResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( check_deposits.list, ) -class AsyncCheckDepositsWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( check_deposits.list, ) -class CheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits self.create = to_streamed_response_wrapper( @@ -404,8 +408,8 @@ def __init__(self, check_deposits: CheckDeposits) -> None: ) -class AsyncCheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index ef39c4a2b..6a1322e28 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( check_transfer_list_params, check_transfer_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_transfer import CheckTransfer -__all__ = ["CheckTransfers", "AsyncCheckTransfers"] +__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] -class CheckTransfers(SyncAPIResource): +class CheckTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self) def create( self, @@ -347,14 +351,14 @@ def stop_payment( ) -class AsyncCheckTransfers(AsyncAPIResource): +class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self) async def create( self, @@ -669,56 +673,56 @@ async def stop_payment( ) -class CheckTransfersWithRawResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( check_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = _legacy_response.to_raw_response_wrapper( + self.stop_payment = to_raw_response_wrapper( check_transfers.stop_payment, ) -class AsyncCheckTransfersWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( check_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = _legacy_response.async_to_raw_response_wrapper( + self.stop_payment = async_to_raw_response_wrapper( check_transfers.stop_payment, ) -class CheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers self.create = to_streamed_response_wrapper( @@ -741,8 +745,8 @@ def __init__(self, check_transfers: CheckTransfers) -> None: ) -class AsyncCheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index b02bbb8c2..330395cf6 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import declined_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.declined_transaction import DeclinedTransaction -__all__ = ["DeclinedTransactions", "AsyncDeclinedTransactions"] +__all__ = ["DeclinedTransactionsResource", "AsyncDeclinedTransactionsResource"] -class DeclinedTransactions(SyncAPIResource): +class DeclinedTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DeclinedTransactionsWithRawResponse: - return DeclinedTransactionsWithRawResponse(self) + def with_raw_response(self) -> DeclinedTransactionsResourceWithRawResponse: + return DeclinedTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DeclinedTransactionsWithStreamingResponse: - return DeclinedTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> DeclinedTransactionsResourceWithStreamingResponse: + return DeclinedTransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -125,14 +129,14 @@ def list( ) -class AsyncDeclinedTransactions(AsyncAPIResource): +class AsyncDeclinedTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDeclinedTransactionsWithRawResponse: - return AsyncDeclinedTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncDeclinedTransactionsResourceWithRawResponse: + return AsyncDeclinedTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDeclinedTransactionsWithStreamingResponse: - return AsyncDeclinedTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDeclinedTransactionsResourceWithStreamingResponse: + return AsyncDeclinedTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -232,32 +236,32 @@ def list( ) -class DeclinedTransactionsWithRawResponse: - def __init__(self, declined_transactions: DeclinedTransactions) -> None: +class DeclinedTransactionsResourceWithRawResponse: + def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( declined_transactions.list, ) -class AsyncDeclinedTransactionsWithRawResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: +class AsyncDeclinedTransactionsResourceWithRawResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( declined_transactions.list, ) -class DeclinedTransactionsWithStreamingResponse: - def __init__(self, declined_transactions: DeclinedTransactions) -> None: +class DeclinedTransactionsResourceWithStreamingResponse: + def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions self.retrieve = to_streamed_response_wrapper( @@ -268,8 +272,8 @@ def __init__(self, declined_transactions: DeclinedTransactions) -> None: ) -class AsyncDeclinedTransactionsWithStreamingResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: +class AsyncDeclinedTransactionsResourceWithStreamingResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index e93543736..bd07b9cd0 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import ( digital_card_profile_list_params, digital_card_profile_clone_params, @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_card_profile import DigitalCardProfile -__all__ = ["DigitalCardProfiles", "AsyncDigitalCardProfiles"] +__all__ = ["DigitalCardProfilesResource", "AsyncDigitalCardProfilesResource"] -class DigitalCardProfiles(SyncAPIResource): +class DigitalCardProfilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalCardProfilesWithRawResponse: - return DigitalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> DigitalCardProfilesResourceWithRawResponse: + return DigitalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalCardProfilesWithStreamingResponse: - return DigitalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalCardProfilesResourceWithStreamingResponse: + return DigitalCardProfilesResourceWithStreamingResponse(self) def create( self, @@ -336,14 +340,14 @@ def clone( ) -class AsyncDigitalCardProfiles(AsyncAPIResource): +class AsyncDigitalCardProfilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalCardProfilesWithRawResponse: - return AsyncDigitalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalCardProfilesResourceWithRawResponse: + return AsyncDigitalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalCardProfilesWithStreamingResponse: - return AsyncDigitalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalCardProfilesResourceWithStreamingResponse: + return AsyncDigitalCardProfilesResourceWithStreamingResponse(self) async def create( self, @@ -647,50 +651,50 @@ async def clone( ) -class DigitalCardProfilesWithRawResponse: - def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: +class DigitalCardProfilesResourceWithRawResponse: + def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = _legacy_response.to_raw_response_wrapper( + self.clone = to_raw_response_wrapper( digital_card_profiles.clone, ) -class AsyncDigitalCardProfilesWithRawResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: +class AsyncDigitalCardProfilesResourceWithRawResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = _legacy_response.async_to_raw_response_wrapper( + self.clone = async_to_raw_response_wrapper( digital_card_profiles.clone, ) -class DigitalCardProfilesWithStreamingResponse: - def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: +class DigitalCardProfilesResourceWithStreamingResponse: + def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles self.create = to_streamed_response_wrapper( @@ -710,8 +714,8 @@ def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: ) -class AsyncDigitalCardProfilesWithStreamingResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: +class AsyncDigitalCardProfilesResourceWithStreamingResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 6e4cd775a..eca69456c 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import digital_wallet_token_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_wallet_token import DigitalWalletToken -__all__ = ["DigitalWalletTokens", "AsyncDigitalWalletTokens"] +__all__ = ["DigitalWalletTokensResource", "AsyncDigitalWalletTokensResource"] -class DigitalWalletTokens(SyncAPIResource): +class DigitalWalletTokensResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokensWithRawResponse: - return DigitalWalletTokensWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokensResourceWithRawResponse: + return DigitalWalletTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokensWithStreamingResponse: - return DigitalWalletTokensWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokensResourceWithStreamingResponse: + return DigitalWalletTokensResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncDigitalWalletTokens(AsyncAPIResource): +class AsyncDigitalWalletTokensResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokensWithRawResponse: - return AsyncDigitalWalletTokensWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokensResourceWithRawResponse: + return AsyncDigitalWalletTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokensWithStreamingResponse: - return AsyncDigitalWalletTokensWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokensResourceWithStreamingResponse: + return AsyncDigitalWalletTokensResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class DigitalWalletTokensWithRawResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: +class DigitalWalletTokensResourceWithRawResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( digital_wallet_tokens.list, ) -class AsyncDigitalWalletTokensWithRawResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: +class AsyncDigitalWalletTokensResourceWithRawResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( digital_wallet_tokens.list, ) -class DigitalWalletTokensWithStreamingResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: +class DigitalWalletTokensResourceWithStreamingResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: ) -class AsyncDigitalWalletTokensWithStreamingResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: +class AsyncDigitalWalletTokensResourceWithStreamingResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 412db0c0f..d805ad9ac 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import document_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.document import Document -__all__ = ["Documents", "AsyncDocuments"] +__all__ = ["DocumentsResource", "AsyncDocumentsResource"] -class Documents(SyncAPIResource): +class DocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self) + def with_raw_response(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncDocuments(AsyncAPIResource): +class AsyncDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class DocumentsWithRawResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithRawResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( documents.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( documents.list, ) -class AsyncDocumentsWithRawResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithRawResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( documents.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( documents.list, ) -class DocumentsWithStreamingResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithStreamingResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, documents: Documents) -> None: ) -class AsyncDocumentsWithStreamingResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithStreamingResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities.py similarity index 56% rename from src/increase/resources/entities/entities.py rename to src/increase/resources/entities.py index 4477c84e9..bab96cc22 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities.py @@ -8,72 +8,44 @@ import httpx -from ... import _legacy_response -from ...types import ( +from ..types import ( entity_list_params, entity_create_params, entity_confirm_params, entity_update_address_params, + entity_update_industry_code_params, + entity_create_beneficial_owner_params, + entity_archive_beneficial_owner_params, + entity_update_beneficial_owner_address_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from .industry_code import ( - IndustryCode, - AsyncIndustryCode, - IndustryCodeWithRawResponse, - AsyncIndustryCodeWithRawResponse, - IndustryCodeWithStreamingResponse, - AsyncIndustryCodeWithStreamingResponse, +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) -from ..._base_client import AsyncPaginator, make_request_options -from ...types.entity import Entity -from .beneficial_owners import ( - BeneficialOwners, - AsyncBeneficialOwners, - BeneficialOwnersWithRawResponse, - AsyncBeneficialOwnersWithRawResponse, - BeneficialOwnersWithStreamingResponse, - AsyncBeneficialOwnersWithStreamingResponse, -) -from .supplemental_documents import ( - SupplementalDocuments, - AsyncSupplementalDocuments, - SupplementalDocumentsWithRawResponse, - AsyncSupplementalDocumentsWithRawResponse, - SupplementalDocumentsWithStreamingResponse, - AsyncSupplementalDocumentsWithStreamingResponse, -) - -__all__ = ["Entities", "AsyncEntities"] - - -class Entities(SyncAPIResource): - @cached_property - def beneficial_owners(self) -> BeneficialOwners: - return BeneficialOwners(self._client) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity import Entity - @cached_property - def supplemental_documents(self) -> SupplementalDocuments: - return SupplementalDocuments(self._client) +__all__ = ["EntitiesResource", "AsyncEntitiesResource"] - @cached_property - def industry_code(self) -> IndustryCode: - return IndustryCode(self._client) +class EntitiesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EntitiesWithRawResponse: - return EntitiesWithRawResponse(self) + def with_raw_response(self) -> EntitiesResourceWithRawResponse: + return EntitiesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EntitiesWithStreamingResponse: - return EntitiesWithStreamingResponse(self) + def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse: + return EntitiesResourceWithStreamingResponse(self) def create( self, @@ -300,6 +272,57 @@ def archive( cast_to=Entity, ) + def archive_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner that is being + archived. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/archive_beneficial_owner", + body=maybe_transform( + {"beneficial_owner_id": beneficial_owner_id}, + entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def confirm( self, entity_id: str, @@ -349,6 +372,56 @@ def confirm( cast_to=Entity, ) + def create_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/create_beneficial_owner", + body=maybe_transform( + {"beneficial_owner": beneficial_owner}, + entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def update_address( self, entity_id: str, @@ -366,7 +439,7 @@ def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity to archive. + entity_id: The identifier of the Entity whose address is being updated. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -384,7 +457,7 @@ def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/address", + f"/entities/{entity_id}/update_address", body=maybe_transform({"address": address}, entity_update_address_params.EntityUpdateAddressParams), options=make_request_options( extra_headers=extra_headers, @@ -396,27 +469,125 @@ def update_address( cast_to=Entity, ) + def update_beneficial_owner_address( + self, + entity_id: str, + *, + address: entity_update_beneficial_owner_address_params.Address, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner whose address + is being updated. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/update_beneficial_owner_address", + body=maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + }, + entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + def update_industry_code( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. -class AsyncEntities(AsyncAPIResource): - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwners: - return AsyncBeneficialOwners(self._client) + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocuments: - return AsyncSupplementalDocuments(self._client) + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/update_industry_code", + body=maybe_transform( + {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) - @cached_property - def industry_code(self) -> AsyncIndustryCode: - return AsyncIndustryCode(self._client) +class AsyncEntitiesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEntitiesWithRawResponse: - return AsyncEntitiesWithRawResponse(self) + def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse: + return AsyncEntitiesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEntitiesWithStreamingResponse: - return AsyncEntitiesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse: + return AsyncEntitiesResourceWithStreamingResponse(self) async def create( self, @@ -643,6 +814,57 @@ async def archive( cast_to=Entity, ) + async def archive_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner that is being + archived. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/archive_beneficial_owner", + body=await async_maybe_transform( + {"beneficial_owner_id": beneficial_owner_id}, + entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + async def confirm( self, entity_id: str, @@ -692,6 +914,56 @@ async def confirm( cast_to=Entity, ) + async def create_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/create_beneficial_owner", + body=await async_maybe_transform( + {"beneficial_owner": beneficial_owner}, + entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + async def update_address( self, entity_id: str, @@ -709,7 +981,7 @@ async def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity to archive. + entity_id: The identifier of the Entity whose address is being updated. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -727,7 +999,7 @@ async def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/address", + f"/entities/{entity_id}/update_address", body=await async_maybe_transform( {"address": address}, entity_update_address_params.EntityUpdateAddressParams ), @@ -741,81 +1013,191 @@ async def update_address( cast_to=Entity, ) + async def update_beneficial_owner_address( + self, + entity_id: str, + *, + address: entity_update_beneficial_owner_address_params.Address, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner whose address + is being updated. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/update_beneficial_owner_address", + body=await async_maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + }, + entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + async def update_industry_code( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. + + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/update_industry_code", + body=await async_maybe_transform( + {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + -class EntitiesWithRawResponse: - def __init__(self, entities: Entities) -> None: +class EntitiesResourceWithRawResponse: + def __init__(self, entities: EntitiesResource) -> None: self._entities = entities - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( entities.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( entities.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( entities.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( entities.archive, ) - self.confirm = _legacy_response.to_raw_response_wrapper( + self.archive_beneficial_owner = to_raw_response_wrapper( + entities.archive_beneficial_owner, + ) + self.confirm = to_raw_response_wrapper( entities.confirm, ) - self.update_address = _legacy_response.to_raw_response_wrapper( + self.create_beneficial_owner = to_raw_response_wrapper( + entities.create_beneficial_owner, + ) + self.update_address = to_raw_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> BeneficialOwnersWithRawResponse: - return BeneficialOwnersWithRawResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> SupplementalDocumentsWithRawResponse: - return SupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> IndustryCodeWithRawResponse: - return IndustryCodeWithRawResponse(self._entities.industry_code) + self.update_beneficial_owner_address = to_raw_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = to_raw_response_wrapper( + entities.update_industry_code, + ) -class AsyncEntitiesWithRawResponse: - def __init__(self, entities: AsyncEntities) -> None: +class AsyncEntitiesResourceWithRawResponse: + def __init__(self, entities: AsyncEntitiesResource) -> None: self._entities = entities - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( entities.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( entities.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( entities.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( entities.archive, ) - self.confirm = _legacy_response.async_to_raw_response_wrapper( + self.archive_beneficial_owner = async_to_raw_response_wrapper( + entities.archive_beneficial_owner, + ) + self.confirm = async_to_raw_response_wrapper( entities.confirm, ) - self.update_address = _legacy_response.async_to_raw_response_wrapper( + self.create_beneficial_owner = async_to_raw_response_wrapper( + entities.create_beneficial_owner, + ) + self.update_address = async_to_raw_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwnersWithRawResponse: - return AsyncBeneficialOwnersWithRawResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocumentsWithRawResponse: - return AsyncSupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> AsyncIndustryCodeWithRawResponse: - return AsyncIndustryCodeWithRawResponse(self._entities.industry_code) + self.update_beneficial_owner_address = async_to_raw_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = async_to_raw_response_wrapper( + entities.update_industry_code, + ) -class EntitiesWithStreamingResponse: - def __init__(self, entities: Entities) -> None: +class EntitiesResourceWithStreamingResponse: + def __init__(self, entities: EntitiesResource) -> None: self._entities = entities self.create = to_streamed_response_wrapper( @@ -830,28 +1212,28 @@ def __init__(self, entities: Entities) -> None: self.archive = to_streamed_response_wrapper( entities.archive, ) + self.archive_beneficial_owner = to_streamed_response_wrapper( + entities.archive_beneficial_owner, + ) self.confirm = to_streamed_response_wrapper( entities.confirm, ) + self.create_beneficial_owner = to_streamed_response_wrapper( + entities.create_beneficial_owner, + ) self.update_address = to_streamed_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> BeneficialOwnersWithStreamingResponse: - return BeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> SupplementalDocumentsWithStreamingResponse: - return SupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> IndustryCodeWithStreamingResponse: - return IndustryCodeWithStreamingResponse(self._entities.industry_code) + self.update_beneficial_owner_address = to_streamed_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = to_streamed_response_wrapper( + entities.update_industry_code, + ) -class AsyncEntitiesWithStreamingResponse: - def __init__(self, entities: AsyncEntities) -> None: +class AsyncEntitiesResourceWithStreamingResponse: + def __init__(self, entities: AsyncEntitiesResource) -> None: self._entities = entities self.create = async_to_streamed_response_wrapper( @@ -866,21 +1248,21 @@ def __init__(self, entities: AsyncEntities) -> None: self.archive = async_to_streamed_response_wrapper( entities.archive, ) + self.archive_beneficial_owner = async_to_streamed_response_wrapper( + entities.archive_beneficial_owner, + ) self.confirm = async_to_streamed_response_wrapper( entities.confirm, ) + self.create_beneficial_owner = async_to_streamed_response_wrapper( + entities.create_beneficial_owner, + ) self.update_address = async_to_streamed_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwnersWithStreamingResponse: - return AsyncBeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocumentsWithStreamingResponse: - return AsyncSupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> AsyncIndustryCodeWithStreamingResponse: - return AsyncIndustryCodeWithStreamingResponse(self._entities.industry_code) + self.update_beneficial_owner_address = async_to_streamed_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = async_to_streamed_response_wrapper( + entities.update_industry_code, + ) diff --git a/src/increase/resources/entities/__init__.py b/src/increase/resources/entities/__init__.py deleted file mode 100644 index 67780ab76..000000000 --- a/src/increase/resources/entities/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .entities import ( - Entities, - AsyncEntities, - EntitiesWithRawResponse, - AsyncEntitiesWithRawResponse, - EntitiesWithStreamingResponse, - AsyncEntitiesWithStreamingResponse, -) -from .industry_code import ( - IndustryCode, - AsyncIndustryCode, - IndustryCodeWithRawResponse, - AsyncIndustryCodeWithRawResponse, - IndustryCodeWithStreamingResponse, - AsyncIndustryCodeWithStreamingResponse, -) -from .beneficial_owners import ( - BeneficialOwners, - AsyncBeneficialOwners, - BeneficialOwnersWithRawResponse, - AsyncBeneficialOwnersWithRawResponse, - BeneficialOwnersWithStreamingResponse, - AsyncBeneficialOwnersWithStreamingResponse, -) -from .supplemental_documents import ( - SupplementalDocuments, - AsyncSupplementalDocuments, - SupplementalDocumentsWithRawResponse, - AsyncSupplementalDocumentsWithRawResponse, - SupplementalDocumentsWithStreamingResponse, - AsyncSupplementalDocumentsWithStreamingResponse, -) - -__all__ = [ - "BeneficialOwners", - "AsyncBeneficialOwners", - "BeneficialOwnersWithRawResponse", - "AsyncBeneficialOwnersWithRawResponse", - "BeneficialOwnersWithStreamingResponse", - "AsyncBeneficialOwnersWithStreamingResponse", - "SupplementalDocuments", - "AsyncSupplementalDocuments", - "SupplementalDocumentsWithRawResponse", - "AsyncSupplementalDocumentsWithRawResponse", - "SupplementalDocumentsWithStreamingResponse", - "AsyncSupplementalDocumentsWithStreamingResponse", - "IndustryCode", - "AsyncIndustryCode", - "IndustryCodeWithRawResponse", - "AsyncIndustryCodeWithRawResponse", - "IndustryCodeWithStreamingResponse", - "AsyncIndustryCodeWithStreamingResponse", - "Entities", - "AsyncEntities", - "EntitiesWithRawResponse", - "AsyncEntitiesWithRawResponse", - "EntitiesWithStreamingResponse", - "AsyncEntitiesWithStreamingResponse", -] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py deleted file mode 100644 index bd3924c8a..000000000 --- a/src/increase/resources/entities/beneficial_owners.py +++ /dev/null @@ -1,420 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.entity import Entity -from ...types.entities import ( - beneficial_owner_create_params, - beneficial_owner_archive_params, - beneficial_owner_update_address_params, -) - -__all__ = ["BeneficialOwners", "AsyncBeneficialOwners"] - - -class BeneficialOwners(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BeneficialOwnersWithRawResponse: - return BeneficialOwnersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BeneficialOwnersWithStreamingResponse: - return BeneficialOwnersWithStreamingResponse(self) - - def create( - self, - *, - beneficial_owner: beneficial_owner_create_params.BeneficialOwner, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners", - body=maybe_transform( - { - "beneficial_owner": beneficial_owner, - "entity_id": entity_id, - }, - beneficial_owner_create_params.BeneficialOwnerCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - def archive( - self, - *, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners/archive", - body=maybe_transform( - { - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_archive_params.BeneficialOwnerArchiveParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - def update_address( - self, - *, - address: beneficial_owner_update_address_params.Address, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners/address", - body=maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class AsyncBeneficialOwners(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBeneficialOwnersWithRawResponse: - return AsyncBeneficialOwnersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBeneficialOwnersWithStreamingResponse: - return AsyncBeneficialOwnersWithStreamingResponse(self) - - async def create( - self, - *, - beneficial_owner: beneficial_owner_create_params.BeneficialOwner, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners", - body=await async_maybe_transform( - { - "beneficial_owner": beneficial_owner, - "entity_id": entity_id, - }, - beneficial_owner_create_params.BeneficialOwnerCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - async def archive( - self, - *, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners/archive", - body=await async_maybe_transform( - { - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_archive_params.BeneficialOwnerArchiveParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - async def update_address( - self, - *, - address: beneficial_owner_update_address_params.Address, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners/address", - body=await async_maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class BeneficialOwnersWithRawResponse: - def __init__(self, beneficial_owners: BeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = _legacy_response.to_raw_response_wrapper( - beneficial_owners.create, - ) - self.archive = _legacy_response.to_raw_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = _legacy_response.to_raw_response_wrapper( - beneficial_owners.update_address, - ) - - -class AsyncBeneficialOwnersWithRawResponse: - def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.create, - ) - self.archive = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.update_address, - ) - - -class BeneficialOwnersWithStreamingResponse: - def __init__(self, beneficial_owners: BeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = to_streamed_response_wrapper( - beneficial_owners.create, - ) - self.archive = to_streamed_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = to_streamed_response_wrapper( - beneficial_owners.update_address, - ) - - -class AsyncBeneficialOwnersWithStreamingResponse: - def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = async_to_streamed_response_wrapper( - beneficial_owners.create, - ) - self.archive = async_to_streamed_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = async_to_streamed_response_wrapper( - beneficial_owners.update_address, - ) diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py deleted file mode 100644 index 056389eb2..000000000 --- a/src/increase/resources/entities/industry_code.py +++ /dev/null @@ -1,180 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.entity import Entity -from ...types.entities import industry_code_create_params - -__all__ = ["IndustryCode", "AsyncIndustryCode"] - - -class IndustryCode(SyncAPIResource): - @cached_property - def with_raw_response(self) -> IndustryCodeWithRawResponse: - return IndustryCodeWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IndustryCodeWithStreamingResponse: - return IndustryCodeWithStreamingResponse(self) - - def create( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/industry_code", - body=maybe_transform( - {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class AsyncIndustryCode(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncIndustryCodeWithRawResponse: - return AsyncIndustryCodeWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIndustryCodeWithStreamingResponse: - return AsyncIndustryCodeWithStreamingResponse(self) - - async def create( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/industry_code", - body=await async_maybe_transform( - {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class IndustryCodeWithRawResponse: - def __init__(self, industry_code: IndustryCode) -> None: - self._industry_code = industry_code - - self.create = _legacy_response.to_raw_response_wrapper( - industry_code.create, - ) - - -class AsyncIndustryCodeWithRawResponse: - def __init__(self, industry_code: AsyncIndustryCode) -> None: - self._industry_code = industry_code - - self.create = _legacy_response.async_to_raw_response_wrapper( - industry_code.create, - ) - - -class IndustryCodeWithStreamingResponse: - def __init__(self, industry_code: IndustryCode) -> None: - self._industry_code = industry_code - - self.create = to_streamed_response_wrapper( - industry_code.create, - ) - - -class AsyncIndustryCodeWithStreamingResponse: - def __init__(self, industry_code: AsyncIndustryCode) -> None: - self._industry_code = industry_code - - self.create = async_to_streamed_response_wrapper( - industry_code.create, - ) diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 4bf474533..835fda6ee 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( event_subscription_list_params, event_subscription_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.event_subscription import EventSubscription -__all__ = ["EventSubscriptions", "AsyncEventSubscriptions"] +__all__ = ["EventSubscriptionsResource", "AsyncEventSubscriptionsResource"] -class EventSubscriptions(SyncAPIResource): +class EventSubscriptionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventSubscriptionsWithRawResponse: - return EventSubscriptionsWithRawResponse(self) + def with_raw_response(self) -> EventSubscriptionsResourceWithRawResponse: + return EventSubscriptionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventSubscriptionsWithStreamingResponse: - return EventSubscriptionsWithStreamingResponse(self) + def with_streaming_response(self) -> EventSubscriptionsResourceWithStreamingResponse: + return EventSubscriptionsResourceWithStreamingResponse(self) def create( self, @@ -459,14 +463,14 @@ def list( ) -class AsyncEventSubscriptions(AsyncAPIResource): +class AsyncEventSubscriptionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventSubscriptionsWithRawResponse: - return AsyncEventSubscriptionsWithRawResponse(self) + def with_raw_response(self) -> AsyncEventSubscriptionsResourceWithRawResponse: + return AsyncEventSubscriptionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventSubscriptionsWithStreamingResponse: - return AsyncEventSubscriptionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventSubscriptionsResourceWithStreamingResponse: + return AsyncEventSubscriptionsResourceWithStreamingResponse(self) async def create( self, @@ -893,44 +897,44 @@ def list( ) -class EventSubscriptionsWithRawResponse: - def __init__(self, event_subscriptions: EventSubscriptions) -> None: +class EventSubscriptionsResourceWithRawResponse: + def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( event_subscriptions.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( event_subscriptions.list, ) -class AsyncEventSubscriptionsWithRawResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: +class AsyncEventSubscriptionsResourceWithRawResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( event_subscriptions.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( event_subscriptions.list, ) -class EventSubscriptionsWithStreamingResponse: - def __init__(self, event_subscriptions: EventSubscriptions) -> None: +class EventSubscriptionsResourceWithStreamingResponse: + def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions self.create = to_streamed_response_wrapper( @@ -947,8 +951,8 @@ def __init__(self, event_subscriptions: EventSubscriptions) -> None: ) -class AsyncEventSubscriptionsWithStreamingResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: +class AsyncEventSubscriptionsResourceWithStreamingResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 9d8f7b794..0c40e6359 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import event_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.event import Event from .._base_client import AsyncPaginator, make_request_options -__all__ = ["Events", "AsyncEvents"] +__all__ = ["EventsResource", "AsyncEventsResource"] -class Events(SyncAPIResource): +class EventsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventsWithRawResponse: - return EventsWithRawResponse(self) + def with_raw_response(self) -> EventsResourceWithRawResponse: + return EventsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventsWithStreamingResponse: - return EventsWithStreamingResponse(self) + def with_streaming_response(self) -> EventsResourceWithStreamingResponse: + return EventsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncEvents(AsyncAPIResource): +class AsyncEventsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventsWithRawResponse: - return AsyncEventsWithRawResponse(self) + def with_raw_response(self) -> AsyncEventsResourceWithRawResponse: + return AsyncEventsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventsWithStreamingResponse: - return AsyncEventsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventsResourceWithStreamingResponse: + return AsyncEventsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class EventsWithRawResponse: - def __init__(self, events: Events) -> None: +class EventsResourceWithRawResponse: + def __init__(self, events: EventsResource) -> None: self._events = events - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( events.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( events.list, ) -class AsyncEventsWithRawResponse: - def __init__(self, events: AsyncEvents) -> None: +class AsyncEventsResourceWithRawResponse: + def __init__(self, events: AsyncEventsResource) -> None: self._events = events - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( events.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( events.list, ) -class EventsWithStreamingResponse: - def __init__(self, events: Events) -> None: +class EventsResourceWithStreamingResponse: + def __init__(self, events: EventsResource) -> None: self._events = events self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, events: Events) -> None: ) -class AsyncEventsWithStreamingResponse: - def __init__(self, events: AsyncEvents) -> None: +class AsyncEventsResourceWithStreamingResponse: + def __init__(self, events: AsyncEventsResource) -> None: self._events = events self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index d446f23f6..7b88ee376 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import export_list_params, export_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.export import Export -__all__ = ["Exports", "AsyncExports"] +__all__ = ["ExportsResource", "AsyncExportsResource"] -class Exports(SyncAPIResource): +class ExportsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExportsWithRawResponse: - return ExportsWithRawResponse(self) + def with_raw_response(self) -> ExportsResourceWithRawResponse: + return ExportsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExportsWithStreamingResponse: - return ExportsWithStreamingResponse(self) + def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: + return ExportsResourceWithStreamingResponse(self) def create( self, @@ -221,14 +225,14 @@ def list( ) -class AsyncExports(AsyncAPIResource): +class AsyncExportsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExportsWithRawResponse: - return AsyncExportsWithRawResponse(self) + def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: + return AsyncExportsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExportsWithStreamingResponse: - return AsyncExportsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: + return AsyncExportsResourceWithStreamingResponse(self) async def create( self, @@ -419,38 +423,38 @@ def list( ) -class ExportsWithRawResponse: - def __init__(self, exports: Exports) -> None: +class ExportsResourceWithRawResponse: + def __init__(self, exports: ExportsResource) -> None: self._exports = exports - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( exports.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( exports.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( exports.list, ) -class AsyncExportsWithRawResponse: - def __init__(self, exports: AsyncExports) -> None: +class AsyncExportsResourceWithRawResponse: + def __init__(self, exports: AsyncExportsResource) -> None: self._exports = exports - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( exports.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( exports.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( exports.list, ) -class ExportsWithStreamingResponse: - def __init__(self, exports: Exports) -> None: +class ExportsResourceWithStreamingResponse: + def __init__(self, exports: ExportsResource) -> None: self._exports = exports self.create = to_streamed_response_wrapper( @@ -464,8 +468,8 @@ def __init__(self, exports: Exports) -> None: ) -class AsyncExportsWithStreamingResponse: - def __init__(self, exports: AsyncExports) -> None: +class AsyncExportsResourceWithStreamingResponse: + def __init__(self, exports: AsyncExportsResource) -> None: self._exports = exports self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 8e7cde5af..a335b048c 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( external_account_list_params, external_account_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.external_account import ExternalAccount -__all__ = ["ExternalAccounts", "AsyncExternalAccounts"] +__all__ = ["ExternalAccountsResource", "AsyncExternalAccountsResource"] -class ExternalAccounts(SyncAPIResource): +class ExternalAccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExternalAccountsWithRawResponse: - return ExternalAccountsWithRawResponse(self) + def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse: + return ExternalAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExternalAccountsWithStreamingResponse: - return ExternalAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> ExternalAccountsResourceWithStreamingResponse: + return ExternalAccountsResourceWithStreamingResponse(self) def create( self, @@ -282,14 +286,14 @@ def list( ) -class AsyncExternalAccounts(AsyncAPIResource): +class AsyncExternalAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExternalAccountsWithRawResponse: - return AsyncExternalAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse: + return AsyncExternalAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExternalAccountsWithStreamingResponse: - return AsyncExternalAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExternalAccountsResourceWithStreamingResponse: + return AsyncExternalAccountsResourceWithStreamingResponse(self) async def create( self, @@ -537,44 +541,44 @@ def list( ) -class ExternalAccountsWithRawResponse: - def __init__(self, external_accounts: ExternalAccounts) -> None: +class ExternalAccountsResourceWithRawResponse: + def __init__(self, external_accounts: ExternalAccountsResource) -> None: self._external_accounts = external_accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( external_accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( external_accounts.list, ) -class AsyncExternalAccountsWithRawResponse: - def __init__(self, external_accounts: AsyncExternalAccounts) -> None: +class AsyncExternalAccountsResourceWithRawResponse: + def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: self._external_accounts = external_accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( external_accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( external_accounts.list, ) -class ExternalAccountsWithStreamingResponse: - def __init__(self, external_accounts: ExternalAccounts) -> None: +class ExternalAccountsResourceWithStreamingResponse: + def __init__(self, external_accounts: ExternalAccountsResource) -> None: self._external_accounts = external_accounts self.create = to_streamed_response_wrapper( @@ -591,8 +595,8 @@ def __init__(self, external_accounts: ExternalAccounts) -> None: ) -class AsyncExternalAccountsWithStreamingResponse: - def __init__(self, external_accounts: AsyncExternalAccounts) -> None: +class AsyncExternalAccountsResourceWithStreamingResponse: + def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: self._external_accounts = external_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index e74d6ee4d..c10fb9bdb 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import file_list_params, file_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import ( @@ -18,22 +17,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.file import File from .._base_client import AsyncPaginator, make_request_options -__all__ = ["Files", "AsyncFiles"] +__all__ = ["FilesResource", "AsyncFilesResource"] -class Files(SyncAPIResource): +class FilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> FilesWithRawResponse: - return FilesWithRawResponse(self) + def with_raw_response(self) -> FilesResourceWithRawResponse: + return FilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> FilesWithStreamingResponse: - return FilesWithStreamingResponse(self) + def with_streaming_response(self) -> FilesResourceWithStreamingResponse: + return FilesResourceWithStreamingResponse(self) def create( self, @@ -232,14 +236,14 @@ def list( ) -class AsyncFiles(AsyncAPIResource): +class AsyncFilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncFilesWithRawResponse: - return AsyncFilesWithRawResponse(self) + def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: + return AsyncFilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncFilesWithStreamingResponse: - return AsyncFilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: + return AsyncFilesResourceWithStreamingResponse(self) async def create( self, @@ -438,38 +442,38 @@ def list( ) -class FilesWithRawResponse: - def __init__(self, files: Files) -> None: +class FilesResourceWithRawResponse: + def __init__(self, files: FilesResource) -> None: self._files = files - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( files.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( files.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( files.list, ) -class AsyncFilesWithRawResponse: - def __init__(self, files: AsyncFiles) -> None: +class AsyncFilesResourceWithRawResponse: + def __init__(self, files: AsyncFilesResource) -> None: self._files = files - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( files.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( files.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( files.list, ) -class FilesWithStreamingResponse: - def __init__(self, files: Files) -> None: +class FilesResourceWithStreamingResponse: + def __init__(self, files: FilesResource) -> None: self._files = files self.create = to_streamed_response_wrapper( @@ -483,8 +487,8 @@ def __init__(self, files: Files) -> None: ) -class AsyncFilesWithStreamingResponse: - def __init__(self, files: AsyncFiles) -> None: +class AsyncFilesResourceWithStreamingResponse: + def __init__(self, files: AsyncFilesResource) -> None: self._files = files self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 839d988d7..84a2f1aff 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -4,27 +4,31 @@ import httpx -from .. import _legacy_response from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..types.group import Group from .._base_client import make_request_options -__all__ = ["Groups", "AsyncGroups"] +__all__ = ["GroupsResource", "AsyncGroupsResource"] -class Groups(SyncAPIResource): +class GroupsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> GroupsWithRawResponse: - return GroupsWithRawResponse(self) + def with_raw_response(self) -> GroupsResourceWithRawResponse: + return GroupsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> GroupsWithStreamingResponse: - return GroupsWithStreamingResponse(self) + def with_streaming_response(self) -> GroupsResourceWithStreamingResponse: + return GroupsResourceWithStreamingResponse(self) - def retrieve_details( + def retrieve( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -44,16 +48,16 @@ def retrieve_details( ) -class AsyncGroups(AsyncAPIResource): +class AsyncGroupsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncGroupsWithRawResponse: - return AsyncGroupsWithRawResponse(self) + def with_raw_response(self) -> AsyncGroupsResourceWithRawResponse: + return AsyncGroupsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncGroupsWithStreamingResponse: - return AsyncGroupsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncGroupsResourceWithStreamingResponse: + return AsyncGroupsResourceWithStreamingResponse(self) - async def retrieve_details( + async def retrieve( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -73,37 +77,37 @@ async def retrieve_details( ) -class GroupsWithRawResponse: - def __init__(self, groups: Groups) -> None: +class GroupsResourceWithRawResponse: + def __init__(self, groups: GroupsResource) -> None: self._groups = groups - self.retrieve_details = _legacy_response.to_raw_response_wrapper( - groups.retrieve_details, + self.retrieve = to_raw_response_wrapper( + groups.retrieve, ) -class AsyncGroupsWithRawResponse: - def __init__(self, groups: AsyncGroups) -> None: +class AsyncGroupsResourceWithRawResponse: + def __init__(self, groups: AsyncGroupsResource) -> None: self._groups = groups - self.retrieve_details = _legacy_response.async_to_raw_response_wrapper( - groups.retrieve_details, + self.retrieve = async_to_raw_response_wrapper( + groups.retrieve, ) -class GroupsWithStreamingResponse: - def __init__(self, groups: Groups) -> None: +class GroupsResourceWithStreamingResponse: + def __init__(self, groups: GroupsResource) -> None: self._groups = groups - self.retrieve_details = to_streamed_response_wrapper( - groups.retrieve_details, + self.retrieve = to_streamed_response_wrapper( + groups.retrieve, ) -class AsyncGroupsWithStreamingResponse: - def __init__(self, groups: AsyncGroups) -> None: +class AsyncGroupsResourceWithStreamingResponse: + def __init__(self, groups: AsyncGroupsResource) -> None: self._groups = groups - self.retrieve_details = async_to_streamed_response_wrapper( - groups.retrieve_details, + self.retrieve = async_to_streamed_response_wrapper( + groups.retrieve, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index f76ea1972..efa002682 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -6,11 +6,10 @@ import httpx -from .. import _legacy_response from ..types import ( inbound_ach_transfer_list_params, inbound_ach_transfer_transfer_return_params, - inbound_ach_transfer_notification_of_change_params, + inbound_ach_transfer_create_notification_of_change_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["InboundACHTransfers", "AsyncInboundACHTransfers"] +__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] -class InboundACHTransfers(SyncAPIResource): +class InboundACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundACHTransfersWithRawResponse: - return InboundACHTransfersWithRawResponse(self) + def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundACHTransfersWithStreamingResponse: - return InboundACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self) def retrieve( self, @@ -141,10 +145,12 @@ def list( model=InboundACHTransfer, ) - def decline( + def create_notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -154,10 +160,15 @@ def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -174,7 +185,14 @@ def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + body=maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -185,12 +203,10 @@ def decline( cast_to=InboundACHTransfer, ) - def notification_of_change( + def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -200,15 +216,10 @@ def notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -225,14 +236,7 @@ def notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", - body=maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -330,14 +334,14 @@ def transfer_return( ) -class AsyncInboundACHTransfers(AsyncAPIResource): +class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundACHTransfersWithRawResponse: - return AsyncInboundACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundACHTransfersWithStreamingResponse: - return AsyncInboundACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self) async def retrieve( self, @@ -444,10 +448,12 @@ def list( model=InboundACHTransfer, ) - async def decline( + async def create_notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -457,10 +463,15 @@ async def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -477,7 +488,14 @@ async def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + body=await async_maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -488,12 +506,10 @@ async def decline( cast_to=InboundACHTransfer, ) - async def notification_of_change( + async def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -503,15 +519,10 @@ async def notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -528,14 +539,7 @@ async def notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", - body=await async_maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -633,50 +637,50 @@ async def transfer_return( ) -class InboundACHTransfersWithRawResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: +class InboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.decline = _legacy_response.to_raw_response_wrapper( - inbound_ach_transfers.decline, + self.create_notification_of_change = to_raw_response_wrapper( + inbound_ach_transfers.create_notification_of_change, ) - self.notification_of_change = _legacy_response.to_raw_response_wrapper( - inbound_ach_transfers.notification_of_change, + self.decline = to_raw_response_wrapper( + inbound_ach_transfers.decline, ) - self.transfer_return = _legacy_response.to_raw_response_wrapper( + self.transfer_return = to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersWithRawResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: +class AsyncInboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.decline = _legacy_response.async_to_raw_response_wrapper( - inbound_ach_transfers.decline, + self.create_notification_of_change = async_to_raw_response_wrapper( + inbound_ach_transfers.create_notification_of_change, ) - self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( - inbound_ach_transfers.notification_of_change, + self.decline = async_to_raw_response_wrapper( + inbound_ach_transfers.decline, ) - self.transfer_return = _legacy_response.async_to_raw_response_wrapper( + self.transfer_return = async_to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class InboundACHTransfersWithStreamingResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: +class InboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = to_streamed_response_wrapper( @@ -685,19 +689,19 @@ def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: self.list = to_streamed_response_wrapper( inbound_ach_transfers.list, ) + self.create_notification_of_change = to_streamed_response_wrapper( + inbound_ach_transfers.create_notification_of_change, + ) self.decline = to_streamed_response_wrapper( inbound_ach_transfers.decline, ) - self.notification_of_change = to_streamed_response_wrapper( - inbound_ach_transfers.notification_of_change, - ) self.transfer_return = to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersWithStreamingResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: +class AsyncInboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = async_to_streamed_response_wrapper( @@ -706,12 +710,12 @@ def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: self.list = async_to_streamed_response_wrapper( inbound_ach_transfers.list, ) + self.create_notification_of_change = async_to_streamed_response_wrapper( + inbound_ach_transfers.create_notification_of_change, + ) self.decline = async_to_streamed_response_wrapper( inbound_ach_transfers.decline, ) - self.notification_of_change = async_to_streamed_response_wrapper( - inbound_ach_transfers.notification_of_change, - ) self.transfer_return = async_to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index e6ed2844a..de312acae 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -2,30 +2,39 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from .. import _legacy_response -from ..types import inbound_check_deposit_list_params +from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import ( + maybe_transform, + async_maybe_transform, +) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] +__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] -class InboundCheckDeposits(SyncAPIResource): +class InboundCheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self) def retrieve( self, @@ -167,15 +176,69 @@ def decline( cast_to=InboundCheckDeposit, ) + def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. + + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + -class AsyncInboundCheckDeposits(AsyncAPIResource): +class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def retrieve( self, @@ -317,39 +380,99 @@ async def decline( cast_to=InboundCheckDeposit, ) + async def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. -class InboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=await async_maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class InboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = _legacy_response.to_raw_response_wrapper( + self.decline = to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_raw_response_wrapper( + inbound_check_deposits.return_, + ) -class AsyncInboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = _legacy_response.async_to_raw_response_wrapper( + self.decline = async_to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_raw_response_wrapper( + inbound_check_deposits.return_, + ) -class InboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = to_streamed_response_wrapper( @@ -361,10 +484,13 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self.decline = to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) -class AsyncInboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = async_to_streamed_response_wrapper( @@ -376,3 +502,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self.decline = async_to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 878f4b57b..13c914c60 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_mail_item_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_mail_item import InboundMailItem -__all__ = ["InboundMailItems", "AsyncInboundMailItems"] +__all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] -class InboundMailItems(SyncAPIResource): +class InboundMailItemsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundMailItemsWithRawResponse: - return InboundMailItemsWithRawResponse(self) + def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundMailItemsWithStreamingResponse: - return InboundMailItemsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncInboundMailItems(AsyncAPIResource): +class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundMailItemsWithRawResponse: - return AsyncInboundMailItemsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundMailItemsWithStreamingResponse: - return AsyncInboundMailItemsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + return AsyncInboundMailItemsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class InboundMailItemsWithRawResponse: - def __init__(self, inbound_mail_items: InboundMailItems) -> None: +class InboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_mail_items.list, ) -class AsyncInboundMailItemsWithRawResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: +class AsyncInboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_mail_items.list, ) -class InboundMailItemsWithStreamingResponse: - def __init__(self, inbound_mail_items: InboundMailItems) -> None: +class InboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, inbound_mail_items: InboundMailItems) -> None: ) -class AsyncInboundMailItemsWithStreamingResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: +class AsyncInboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index e61b99d06..91f3bda03 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_wire_drawdown_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] +__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] -class InboundWireDrawdownRequests(SyncAPIResource): +class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def retrieve( self, @@ -113,14 +117,14 @@ def list( ) -class AsyncInboundWireDrawdownRequests(AsyncAPIResource): +class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def retrieve( self, @@ -208,32 +212,32 @@ def list( ) -class InboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class AsyncInboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class InboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = to_streamed_response_wrapper( @@ -244,8 +248,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) ) -class AsyncInboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index c02112989..45d53fc7a 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -6,28 +6,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_wire_transfer_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer -__all__ = ["InboundWireTransfers", "AsyncInboundWireTransfers"] +__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] -class InboundWireTransfers(SyncAPIResource): +class InboundWireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireTransfersWithRawResponse: - return InboundWireTransfersWithRawResponse(self) + def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireTransfersWithStreamingResponse: - return InboundWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self) def retrieve( self, @@ -135,14 +139,14 @@ def list( ) -class AsyncInboundWireTransfers(AsyncAPIResource): +class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireTransfersWithRawResponse: - return AsyncInboundWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireTransfersWithStreamingResponse: - return AsyncInboundWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self) async def retrieve( self, @@ -250,32 +254,32 @@ def list( ) -class InboundWireTransfersWithRawResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: +class InboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_wire_transfers.list, ) -class AsyncInboundWireTransfersWithRawResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: +class AsyncInboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_wire_transfers.list, ) -class InboundWireTransfersWithStreamingResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: +class InboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = to_streamed_response_wrapper( @@ -286,8 +290,8 @@ def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: ) -class AsyncInboundWireTransfersWithStreamingResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: +class AsyncInboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/intrafi/__init__.py b/src/increase/resources/intrafi/__init__.py deleted file mode 100644 index 95d677c98..000000000 --- a/src/increase/resources/intrafi/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .intrafi import ( - Intrafi, - AsyncIntrafi, - IntrafiWithRawResponse, - AsyncIntrafiWithRawResponse, - IntrafiWithStreamingResponse, - AsyncIntrafiWithStreamingResponse, -) -from .balances import ( - Balances, - AsyncBalances, - BalancesWithRawResponse, - AsyncBalancesWithRawResponse, - BalancesWithStreamingResponse, - AsyncBalancesWithStreamingResponse, -) -from .exclusions import ( - Exclusions, - AsyncExclusions, - ExclusionsWithRawResponse, - AsyncExclusionsWithRawResponse, - ExclusionsWithStreamingResponse, - AsyncExclusionsWithStreamingResponse, -) -from .account_enrollments import ( - AccountEnrollments, - AsyncAccountEnrollments, - AccountEnrollmentsWithRawResponse, - AsyncAccountEnrollmentsWithRawResponse, - AccountEnrollmentsWithStreamingResponse, - AsyncAccountEnrollmentsWithStreamingResponse, -) - -__all__ = [ - "AccountEnrollments", - "AsyncAccountEnrollments", - "AccountEnrollmentsWithRawResponse", - "AsyncAccountEnrollmentsWithRawResponse", - "AccountEnrollmentsWithStreamingResponse", - "AsyncAccountEnrollmentsWithStreamingResponse", - "Balances", - "AsyncBalances", - "BalancesWithRawResponse", - "AsyncBalancesWithRawResponse", - "BalancesWithStreamingResponse", - "AsyncBalancesWithStreamingResponse", - "Exclusions", - "AsyncExclusions", - "ExclusionsWithRawResponse", - "AsyncExclusionsWithRawResponse", - "ExclusionsWithStreamingResponse", - "AsyncExclusionsWithStreamingResponse", - "Intrafi", - "AsyncIntrafi", - "IntrafiWithRawResponse", - "AsyncIntrafiWithRawResponse", - "IntrafiWithStreamingResponse", - "AsyncIntrafiWithStreamingResponse", -] diff --git a/src/increase/resources/intrafi/intrafi.py b/src/increase/resources/intrafi/intrafi.py deleted file mode 100644 index 6c978b037..000000000 --- a/src/increase/resources/intrafi/intrafi.py +++ /dev/null @@ -1,144 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .balances import ( - Balances, - AsyncBalances, - BalancesWithRawResponse, - AsyncBalancesWithRawResponse, - BalancesWithStreamingResponse, - AsyncBalancesWithStreamingResponse, -) -from ..._compat import cached_property -from .exclusions import ( - Exclusions, - AsyncExclusions, - ExclusionsWithRawResponse, - AsyncExclusionsWithRawResponse, - ExclusionsWithStreamingResponse, - AsyncExclusionsWithStreamingResponse, -) -from ..._resource import SyncAPIResource, AsyncAPIResource -from .account_enrollments import ( - AccountEnrollments, - AsyncAccountEnrollments, - AccountEnrollmentsWithRawResponse, - AsyncAccountEnrollmentsWithRawResponse, - AccountEnrollmentsWithStreamingResponse, - AsyncAccountEnrollmentsWithStreamingResponse, -) - -__all__ = ["Intrafi", "AsyncIntrafi"] - - -class Intrafi(SyncAPIResource): - @cached_property - def account_enrollments(self) -> AccountEnrollments: - return AccountEnrollments(self._client) - - @cached_property - def balances(self) -> Balances: - return Balances(self._client) - - @cached_property - def exclusions(self) -> Exclusions: - return Exclusions(self._client) - - @cached_property - def with_raw_response(self) -> IntrafiWithRawResponse: - return IntrafiWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IntrafiWithStreamingResponse: - return IntrafiWithStreamingResponse(self) - - -class AsyncIntrafi(AsyncAPIResource): - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollments: - return AsyncAccountEnrollments(self._client) - - @cached_property - def balances(self) -> AsyncBalances: - return AsyncBalances(self._client) - - @cached_property - def exclusions(self) -> AsyncExclusions: - return AsyncExclusions(self._client) - - @cached_property - def with_raw_response(self) -> AsyncIntrafiWithRawResponse: - return AsyncIntrafiWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIntrafiWithStreamingResponse: - return AsyncIntrafiWithStreamingResponse(self) - - -class IntrafiWithRawResponse: - def __init__(self, intrafi: Intrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AccountEnrollmentsWithRawResponse: - return AccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> BalancesWithRawResponse: - return BalancesWithRawResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> ExclusionsWithRawResponse: - return ExclusionsWithRawResponse(self._intrafi.exclusions) - - -class AsyncIntrafiWithRawResponse: - def __init__(self, intrafi: AsyncIntrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollmentsWithRawResponse: - return AsyncAccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> AsyncBalancesWithRawResponse: - return AsyncBalancesWithRawResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> AsyncExclusionsWithRawResponse: - return AsyncExclusionsWithRawResponse(self._intrafi.exclusions) - - -class IntrafiWithStreamingResponse: - def __init__(self, intrafi: Intrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AccountEnrollmentsWithStreamingResponse: - return AccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> BalancesWithStreamingResponse: - return BalancesWithStreamingResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> ExclusionsWithStreamingResponse: - return ExclusionsWithStreamingResponse(self._intrafi.exclusions) - - -class AsyncIntrafiWithStreamingResponse: - def __init__(self, intrafi: AsyncIntrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollmentsWithStreamingResponse: - return AsyncAccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> AsyncBalancesWithStreamingResponse: - return AsyncBalancesWithStreamingResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> AsyncExclusionsWithStreamingResponse: - return AsyncExclusionsWithStreamingResponse(self._intrafi.exclusions) diff --git a/src/increase/resources/intrafi/account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py similarity index 79% rename from src/increase/resources/intrafi/account_enrollments.py rename to src/increase/resources/intrafi_account_enrollments.py index 00a03d615..7e5aae937 100644 --- a/src/increase/resources/intrafi/account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -4,31 +4,35 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.intrafi import account_enrollment_list_params, account_enrollment_create_params -from ...types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.intrafi_account_enrollment import IntrafiAccountEnrollment -__all__ = ["AccountEnrollments", "AsyncAccountEnrollments"] +__all__ = ["IntrafiAccountEnrollmentsResource", "AsyncIntrafiAccountEnrollmentsResource"] -class AccountEnrollments(SyncAPIResource): +class IntrafiAccountEnrollmentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountEnrollmentsWithRawResponse: - return AccountEnrollmentsWithRawResponse(self) + def with_raw_response(self) -> IntrafiAccountEnrollmentsResourceWithRawResponse: + return IntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountEnrollmentsWithStreamingResponse: - return AccountEnrollmentsWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiAccountEnrollmentsResourceWithStreamingResponse: + return IntrafiAccountEnrollmentsResourceWithStreamingResponse(self) def create( self, @@ -68,7 +72,7 @@ def create( "account_id": account_id, "email_address": email_address, }, - account_enrollment_create_params.AccountEnrollmentCreateParams, + intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -124,7 +128,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -172,7 +176,7 @@ def list( "limit": limit, "status": status, }, - account_enrollment_list_params.AccountEnrollmentListParams, + intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -223,14 +227,14 @@ def unenroll( ) -class AsyncAccountEnrollments(AsyncAPIResource): +class AsyncIntrafiAccountEnrollmentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountEnrollmentsWithRawResponse: - return AsyncAccountEnrollmentsWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + return AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountEnrollmentsWithStreamingResponse: - return AsyncAccountEnrollmentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + return AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(self) async def create( self, @@ -270,7 +274,7 @@ async def create( "account_id": account_id, "email_address": email_address, }, - account_enrollment_create_params.AccountEnrollmentCreateParams, + intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -326,7 +330,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -374,7 +378,7 @@ def list( "limit": limit, "status": status, }, - account_enrollment_list_params.AccountEnrollmentListParams, + intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -425,73 +429,73 @@ async def unenroll( ) -class AccountEnrollmentsWithRawResponse: - def __init__(self, account_enrollments: AccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class IntrafiAccountEnrollmentsResourceWithRawResponse: + def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments - self.create = _legacy_response.to_raw_response_wrapper( - account_enrollments.create, + self.create = to_raw_response_wrapper( + intrafi_account_enrollments.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( - account_enrollments.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_account_enrollments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( - account_enrollments.list, + self.list = to_raw_response_wrapper( + intrafi_account_enrollments.list, ) - self.unenroll = _legacy_response.to_raw_response_wrapper( - account_enrollments.unenroll, + self.unenroll = to_raw_response_wrapper( + intrafi_account_enrollments.unenroll, ) -class AsyncAccountEnrollmentsWithRawResponse: - def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments - self.create = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.create, + self.create = async_to_raw_response_wrapper( + intrafi_account_enrollments.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_account_enrollments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.list, + self.list = async_to_raw_response_wrapper( + intrafi_account_enrollments.list, ) - self.unenroll = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.unenroll, + self.unenroll = async_to_raw_response_wrapper( + intrafi_account_enrollments.unenroll, ) -class AccountEnrollmentsWithStreamingResponse: - def __init__(self, account_enrollments: AccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class IntrafiAccountEnrollmentsResourceWithStreamingResponse: + def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments self.create = to_streamed_response_wrapper( - account_enrollments.create, + intrafi_account_enrollments.create, ) self.retrieve = to_streamed_response_wrapper( - account_enrollments.retrieve, + intrafi_account_enrollments.retrieve, ) self.list = to_streamed_response_wrapper( - account_enrollments.list, + intrafi_account_enrollments.list, ) self.unenroll = to_streamed_response_wrapper( - account_enrollments.unenroll, + intrafi_account_enrollments.unenroll, ) -class AsyncAccountEnrollmentsWithStreamingResponse: - def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments self.create = async_to_streamed_response_wrapper( - account_enrollments.create, + intrafi_account_enrollments.create, ) self.retrieve = async_to_streamed_response_wrapper( - account_enrollments.retrieve, + intrafi_account_enrollments.retrieve, ) self.list = async_to_streamed_response_wrapper( - account_enrollments.list, + intrafi_account_enrollments.list, ) self.unenroll = async_to_streamed_response_wrapper( - account_enrollments.unenroll, + intrafi_account_enrollments.unenroll, ) diff --git a/src/increase/resources/intrafi/balances.py b/src/increase/resources/intrafi_balances.py similarity index 59% rename from src/increase/resources/intrafi/balances.py rename to src/increase/resources/intrafi_balances.py index 0a6f3c141..3cd064011 100644 --- a/src/increase/resources/intrafi/balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.intrafi.intrafi_balance import IntrafiBalance - -__all__ = ["Balances", "AsyncBalances"] - - -class Balances(SyncAPIResource): +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from .._base_client import make_request_options +from ..types.intrafi_balance import IntrafiBalance + +__all__ = ["IntrafiBalancesResource", "AsyncIntrafiBalancesResource"] + + +class IntrafiBalancesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BalancesWithRawResponse: - return BalancesWithRawResponse(self) + def with_raw_response(self) -> IntrafiBalancesResourceWithRawResponse: + return IntrafiBalancesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BalancesWithStreamingResponse: - return BalancesWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiBalancesResourceWithStreamingResponse: + return IntrafiBalancesResourceWithStreamingResponse(self) def retrieve( self, @@ -60,14 +64,14 @@ def retrieve( ) -class AsyncBalances(AsyncAPIResource): +class AsyncIntrafiBalancesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBalancesWithRawResponse: - return AsyncBalancesWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiBalancesResourceWithRawResponse: + return AsyncIntrafiBalancesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBalancesWithStreamingResponse: - return AsyncBalancesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiBalancesResourceWithStreamingResponse: + return AsyncIntrafiBalancesResourceWithStreamingResponse(self) async def retrieve( self, @@ -105,37 +109,37 @@ async def retrieve( ) -class BalancesWithRawResponse: - def __init__(self, balances: Balances) -> None: - self._balances = balances +class IntrafiBalancesResourceWithRawResponse: + def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances - self.retrieve = _legacy_response.to_raw_response_wrapper( - balances.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_balances.retrieve, ) -class AsyncBalancesWithRawResponse: - def __init__(self, balances: AsyncBalances) -> None: - self._balances = balances +class AsyncIntrafiBalancesResourceWithRawResponse: + def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - balances.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_balances.retrieve, ) -class BalancesWithStreamingResponse: - def __init__(self, balances: Balances) -> None: - self._balances = balances +class IntrafiBalancesResourceWithStreamingResponse: + def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances self.retrieve = to_streamed_response_wrapper( - balances.retrieve, + intrafi_balances.retrieve, ) -class AsyncBalancesWithStreamingResponse: - def __init__(self, balances: AsyncBalances) -> None: - self._balances = balances +class AsyncIntrafiBalancesResourceWithStreamingResponse: + def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances self.retrieve = async_to_streamed_response_wrapper( - balances.retrieve, + intrafi_balances.retrieve, ) diff --git a/src/increase/resources/intrafi/exclusions.py b/src/increase/resources/intrafi_exclusions.py similarity index 81% rename from src/increase/resources/intrafi/exclusions.py rename to src/increase/resources/intrafi_exclusions.py index 872227889..e45ff5536 100644 --- a/src/increase/resources/intrafi/exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -4,31 +4,35 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.intrafi import exclusion_list_params, exclusion_create_params -from ...types.intrafi.intrafi_exclusion import IntrafiExclusion +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.intrafi_exclusion import IntrafiExclusion -__all__ = ["Exclusions", "AsyncExclusions"] +__all__ = ["IntrafiExclusionsResource", "AsyncIntrafiExclusionsResource"] -class Exclusions(SyncAPIResource): +class IntrafiExclusionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExclusionsWithRawResponse: - return ExclusionsWithRawResponse(self) + def with_raw_response(self) -> IntrafiExclusionsResourceWithRawResponse: + return IntrafiExclusionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExclusionsWithStreamingResponse: - return ExclusionsWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiExclusionsResourceWithStreamingResponse: + return IntrafiExclusionsResourceWithStreamingResponse(self) def create( self, @@ -68,7 +72,7 @@ def create( "bank_name": bank_name, "entity_id": entity_id, }, - exclusion_create_params.ExclusionCreateParams, + intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -170,7 +174,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - exclusion_list_params.ExclusionListParams, + intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), model=IntrafiExclusion, @@ -223,14 +227,14 @@ def archive( ) -class AsyncExclusions(AsyncAPIResource): +class AsyncIntrafiExclusionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExclusionsWithRawResponse: - return AsyncExclusionsWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiExclusionsResourceWithRawResponse: + return AsyncIntrafiExclusionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExclusionsWithStreamingResponse: - return AsyncExclusionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiExclusionsResourceWithStreamingResponse: + return AsyncIntrafiExclusionsResourceWithStreamingResponse(self) async def create( self, @@ -270,7 +274,7 @@ async def create( "bank_name": bank_name, "entity_id": entity_id, }, - exclusion_create_params.ExclusionCreateParams, + intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -372,7 +376,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - exclusion_list_params.ExclusionListParams, + intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), model=IntrafiExclusion, @@ -425,73 +429,73 @@ async def archive( ) -class ExclusionsWithRawResponse: - def __init__(self, exclusions: Exclusions) -> None: - self._exclusions = exclusions +class IntrafiExclusionsResourceWithRawResponse: + def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions - self.create = _legacy_response.to_raw_response_wrapper( - exclusions.create, + self.create = to_raw_response_wrapper( + intrafi_exclusions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( - exclusions.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_exclusions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( - exclusions.list, + self.list = to_raw_response_wrapper( + intrafi_exclusions.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( - exclusions.archive, + self.archive = to_raw_response_wrapper( + intrafi_exclusions.archive, ) -class AsyncExclusionsWithRawResponse: - def __init__(self, exclusions: AsyncExclusions) -> None: - self._exclusions = exclusions +class AsyncIntrafiExclusionsResourceWithRawResponse: + def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions - self.create = _legacy_response.async_to_raw_response_wrapper( - exclusions.create, + self.create = async_to_raw_response_wrapper( + intrafi_exclusions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - exclusions.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_exclusions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( - exclusions.list, + self.list = async_to_raw_response_wrapper( + intrafi_exclusions.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( - exclusions.archive, + self.archive = async_to_raw_response_wrapper( + intrafi_exclusions.archive, ) -class ExclusionsWithStreamingResponse: - def __init__(self, exclusions: Exclusions) -> None: - self._exclusions = exclusions +class IntrafiExclusionsResourceWithStreamingResponse: + def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions self.create = to_streamed_response_wrapper( - exclusions.create, + intrafi_exclusions.create, ) self.retrieve = to_streamed_response_wrapper( - exclusions.retrieve, + intrafi_exclusions.retrieve, ) self.list = to_streamed_response_wrapper( - exclusions.list, + intrafi_exclusions.list, ) self.archive = to_streamed_response_wrapper( - exclusions.archive, + intrafi_exclusions.archive, ) -class AsyncExclusionsWithStreamingResponse: - def __init__(self, exclusions: AsyncExclusions) -> None: - self._exclusions = exclusions +class AsyncIntrafiExclusionsResourceWithStreamingResponse: + def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions self.create = async_to_streamed_response_wrapper( - exclusions.create, + intrafi_exclusions.create, ) self.retrieve = async_to_streamed_response_wrapper( - exclusions.retrieve, + intrafi_exclusions.retrieve, ) self.list = async_to_streamed_response_wrapper( - exclusions.list, + intrafi_exclusions.list, ) self.archive = async_to_streamed_response_wrapper( - exclusions.archive, + intrafi_exclusions.archive, ) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index de190d725..56eb00f6d 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.lockbox import Lockbox -__all__ = ["Lockboxes", "AsyncLockboxes"] +__all__ = ["LockboxesResource", "AsyncLockboxesResource"] -class Lockboxes(SyncAPIResource): +class LockboxesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> LockboxesWithRawResponse: - return LockboxesWithRawResponse(self) + def with_raw_response(self) -> LockboxesResourceWithRawResponse: + return LockboxesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> LockboxesWithStreamingResponse: - return LockboxesWithStreamingResponse(self) + def with_streaming_response(self) -> LockboxesResourceWithStreamingResponse: + return LockboxesResourceWithStreamingResponse(self) def create( self, @@ -239,14 +243,14 @@ def list( ) -class AsyncLockboxes(AsyncAPIResource): +class AsyncLockboxesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncLockboxesWithRawResponse: - return AsyncLockboxesWithRawResponse(self) + def with_raw_response(self) -> AsyncLockboxesResourceWithRawResponse: + return AsyncLockboxesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncLockboxesWithStreamingResponse: - return AsyncLockboxesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncLockboxesResourceWithStreamingResponse: + return AsyncLockboxesResourceWithStreamingResponse(self) async def create( self, @@ -455,44 +459,44 @@ def list( ) -class LockboxesWithRawResponse: - def __init__(self, lockboxes: Lockboxes) -> None: +class LockboxesResourceWithRawResponse: + def __init__(self, lockboxes: LockboxesResource) -> None: self._lockboxes = lockboxes - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( lockboxes.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( lockboxes.list, ) -class AsyncLockboxesWithRawResponse: - def __init__(self, lockboxes: AsyncLockboxes) -> None: +class AsyncLockboxesResourceWithRawResponse: + def __init__(self, lockboxes: AsyncLockboxesResource) -> None: self._lockboxes = lockboxes - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( lockboxes.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( lockboxes.list, ) -class LockboxesWithStreamingResponse: - def __init__(self, lockboxes: Lockboxes) -> None: +class LockboxesResourceWithStreamingResponse: + def __init__(self, lockboxes: LockboxesResource) -> None: self._lockboxes = lockboxes self.create = to_streamed_response_wrapper( @@ -509,8 +513,8 @@ def __init__(self, lockboxes: Lockboxes) -> None: ) -class AsyncLockboxesWithStreamingResponse: - def __init__(self, lockboxes: AsyncLockboxes) -> None: +class AsyncLockboxesResourceWithStreamingResponse: + def __init__(self, lockboxes: AsyncLockboxesResource) -> None: self._lockboxes = lockboxes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index 4098d669b..f33e94a47 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import oauth_connection_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_connection import OAuthConnection -__all__ = ["OAuthConnections", "AsyncOAuthConnections"] +__all__ = ["OAuthConnectionsResource", "AsyncOAuthConnectionsResource"] -class OAuthConnections(SyncAPIResource): +class OAuthConnectionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthConnectionsWithRawResponse: - return OAuthConnectionsWithRawResponse(self) + def with_raw_response(self) -> OAuthConnectionsResourceWithRawResponse: + return OAuthConnectionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthConnectionsWithStreamingResponse: - return OAuthConnectionsWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthConnectionsResourceWithStreamingResponse: + return OAuthConnectionsResourceWithStreamingResponse(self) def retrieve( self, @@ -115,14 +119,14 @@ def list( ) -class AsyncOAuthConnections(AsyncAPIResource): +class AsyncOAuthConnectionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthConnectionsWithRawResponse: - return AsyncOAuthConnectionsWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthConnectionsResourceWithRawResponse: + return AsyncOAuthConnectionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthConnectionsWithStreamingResponse: - return AsyncOAuthConnectionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthConnectionsResourceWithStreamingResponse: + return AsyncOAuthConnectionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +216,32 @@ def list( ) -class OAuthConnectionsWithRawResponse: - def __init__(self, oauth_connections: OAuthConnections) -> None: +class OAuthConnectionsResourceWithRawResponse: + def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( oauth_connections.list, ) -class AsyncOAuthConnectionsWithRawResponse: - def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: +class AsyncOAuthConnectionsResourceWithRawResponse: + def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( oauth_connections.list, ) -class OAuthConnectionsWithStreamingResponse: - def __init__(self, oauth_connections: OAuthConnections) -> None: +class OAuthConnectionsResourceWithStreamingResponse: + def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections self.retrieve = to_streamed_response_wrapper( @@ -248,8 +252,8 @@ def __init__(self, oauth_connections: OAuthConnections) -> None: ) -class AsyncOAuthConnectionsWithStreamingResponse: - def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: +class AsyncOAuthConnectionsResourceWithStreamingResponse: + def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index d0d7e3c02..e2c2f1ca9 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import oauth_token_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,21 +14,26 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from .._base_client import make_request_options from ..types.oauth_token import OAuthToken -__all__ = ["OAuthTokens", "AsyncOAuthTokens"] +__all__ = ["OAuthTokensResource", "AsyncOAuthTokensResource"] -class OAuthTokens(SyncAPIResource): +class OAuthTokensResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthTokensWithRawResponse: - return OAuthTokensWithRawResponse(self) + def with_raw_response(self) -> OAuthTokensResourceWithRawResponse: + return OAuthTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthTokensWithStreamingResponse: - return OAuthTokensWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthTokensResourceWithStreamingResponse: + return OAuthTokensResourceWithStreamingResponse(self) def create( self, @@ -103,14 +107,14 @@ def create( ) -class AsyncOAuthTokens(AsyncAPIResource): +class AsyncOAuthTokensResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthTokensWithRawResponse: - return AsyncOAuthTokensWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthTokensResourceWithRawResponse: + return AsyncOAuthTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthTokensWithStreamingResponse: - return AsyncOAuthTokensWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthTokensResourceWithStreamingResponse: + return AsyncOAuthTokensResourceWithStreamingResponse(self) async def create( self, @@ -184,26 +188,26 @@ async def create( ) -class OAuthTokensWithRawResponse: - def __init__(self, oauth_tokens: OAuthTokens) -> None: +class OAuthTokensResourceWithRawResponse: + def __init__(self, oauth_tokens: OAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( oauth_tokens.create, ) -class AsyncOAuthTokensWithRawResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: +class AsyncOAuthTokensResourceWithRawResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( oauth_tokens.create, ) -class OAuthTokensWithStreamingResponse: - def __init__(self, oauth_tokens: OAuthTokens) -> None: +class OAuthTokensResourceWithStreamingResponse: + def __init__(self, oauth_tokens: OAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens self.create = to_streamed_response_wrapper( @@ -211,8 +215,8 @@ def __init__(self, oauth_tokens: OAuthTokens) -> None: ) -class AsyncOAuthTokensWithStreamingResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: +class AsyncOAuthTokensResourceWithStreamingResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index b09b09a05..1480a95ce 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import pending_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.pending_transaction import PendingTransaction -__all__ = ["PendingTransactions", "AsyncPendingTransactions"] +__all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] -class PendingTransactions(SyncAPIResource): +class PendingTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PendingTransactionsWithRawResponse: - return PendingTransactionsWithRawResponse(self) + def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: + return PendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PendingTransactionsWithStreamingResponse: - return PendingTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: + return PendingTransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -131,14 +135,14 @@ def list( ) -class AsyncPendingTransactions(AsyncAPIResource): +class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPendingTransactionsWithRawResponse: - return AsyncPendingTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: + return AsyncPendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPendingTransactionsWithStreamingResponse: - return AsyncPendingTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: + return AsyncPendingTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -244,32 +248,32 @@ def list( ) -class PendingTransactionsWithRawResponse: - def __init__(self, pending_transactions: PendingTransactions) -> None: +class PendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( pending_transactions.list, ) -class AsyncPendingTransactionsWithRawResponse: - def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: +class AsyncPendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( pending_transactions.list, ) -class PendingTransactionsWithStreamingResponse: - def __init__(self, pending_transactions: PendingTransactions) -> None: +class PendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions self.retrieve = to_streamed_response_wrapper( @@ -280,8 +284,8 @@ def __init__(self, pending_transactions: PendingTransactions) -> None: ) -class AsyncPendingTransactionsWithStreamingResponse: - def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: +class AsyncPendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 09ea6c423..c66db39d0 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import ( physical_card_profile_list_params, physical_card_profile_clone_params, @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card_profile import PhysicalCardProfile -__all__ = ["PhysicalCardProfiles", "AsyncPhysicalCardProfiles"] +__all__ = ["PhysicalCardProfilesResource", "AsyncPhysicalCardProfilesResource"] -class PhysicalCardProfiles(SyncAPIResource): +class PhysicalCardProfilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardProfilesWithRawResponse: - return PhysicalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardProfilesResourceWithRawResponse: + return PhysicalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardProfilesWithStreamingResponse: - return PhysicalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardProfilesResourceWithStreamingResponse: + return PhysicalCardProfilesResourceWithStreamingResponse(self) def create( self, @@ -301,14 +305,14 @@ def clone( ) -class AsyncPhysicalCardProfiles(AsyncAPIResource): +class AsyncPhysicalCardProfilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardProfilesWithRawResponse: - return AsyncPhysicalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardProfilesResourceWithRawResponse: + return AsyncPhysicalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardProfilesWithStreamingResponse: - return AsyncPhysicalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardProfilesResourceWithStreamingResponse: + return AsyncPhysicalCardProfilesResourceWithStreamingResponse(self) async def create( self, @@ -577,50 +581,50 @@ async def clone( ) -class PhysicalCardProfilesWithRawResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: +class PhysicalCardProfilesResourceWithRawResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = _legacy_response.to_raw_response_wrapper( + self.clone = to_raw_response_wrapper( physical_card_profiles.clone, ) -class AsyncPhysicalCardProfilesWithRawResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: +class AsyncPhysicalCardProfilesResourceWithRawResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = _legacy_response.async_to_raw_response_wrapper( + self.clone = async_to_raw_response_wrapper( physical_card_profiles.clone, ) -class PhysicalCardProfilesWithStreamingResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: +class PhysicalCardProfilesResourceWithStreamingResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles self.create = to_streamed_response_wrapper( @@ -640,8 +644,8 @@ def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: ) -class AsyncPhysicalCardProfilesWithStreamingResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: +class AsyncPhysicalCardProfilesResourceWithStreamingResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 17fad6e6e..4ba94b56c 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card import PhysicalCard -__all__ = ["PhysicalCards", "AsyncPhysicalCards"] +__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] -class PhysicalCards(SyncAPIResource): +class PhysicalCardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self) def create( self, @@ -238,14 +242,14 @@ def list( ) -class AsyncPhysicalCards(AsyncAPIResource): +class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self) async def create( self, @@ -453,44 +457,44 @@ def list( ) -class PhysicalCardsWithRawResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( physical_cards.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( physical_cards.list, ) -class AsyncPhysicalCardsWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( physical_cards.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( physical_cards.list, ) -class PhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards self.create = to_streamed_response_wrapper( @@ -507,8 +511,8 @@ def __init__(self, physical_cards: PhysicalCards) -> None: ) -class AsyncPhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index c91affa1f..009d322b1 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import program_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.program import Program -__all__ = ["Programs", "AsyncPrograms"] +__all__ = ["ProgramsResource", "AsyncProgramsResource"] -class Programs(SyncAPIResource): +class ProgramsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self) + def with_raw_response(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self) def retrieve( self, @@ -111,14 +115,14 @@ def list( ) -class AsyncPrograms(AsyncAPIResource): +class AsyncProgramsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self) async def retrieve( self, @@ -204,32 +208,32 @@ def list( ) -class ProgramsWithRawResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithRawResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( programs.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( programs.list, ) -class AsyncProgramsWithRawResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithRawResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( programs.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( programs.list, ) -class ProgramsWithStreamingResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithStreamingResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs self.retrieve = to_streamed_response_wrapper( @@ -240,8 +244,8 @@ def __init__(self, programs: Programs) -> None: ) -class AsyncProgramsWithStreamingResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithStreamingResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index 044777f16..d8319ab58 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import ( proof_of_authorization_request_submission_list_params, proof_of_authorization_request_submission_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission -__all__ = ["ProofOfAuthorizationRequestSubmissions", "AsyncProofOfAuthorizationRequestSubmissions"] +__all__ = ["ProofOfAuthorizationRequestSubmissionsResource", "AsyncProofOfAuthorizationRequestSubmissionsResource"] -class ProofOfAuthorizationRequestSubmissions(SyncAPIResource): +class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsWithRawResponse: - return ProofOfAuthorizationRequestSubmissionsWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + return ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - return ProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + return ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) def create( self, @@ -219,14 +223,14 @@ def list( ) -class AsyncProofOfAuthorizationRequestSubmissions(AsyncAPIResource): +class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: - return AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + return AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - return AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + return AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) async def create( self, @@ -411,38 +415,44 @@ def list( ) -class ProofOfAuthorizationRequestSubmissionsWithRawResponse: - def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: +class ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + def __init__( + self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: - def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + def __init__( + self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: +class ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + def __init__( + self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = to_streamed_response_wrapper( @@ -456,8 +466,10 @@ def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizat ) -class AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + def __init__( + self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index 1b0d14c54..337457a5f 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import proof_of_authorization_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest -__all__ = ["ProofOfAuthorizationRequests", "AsyncProofOfAuthorizationRequests"] +__all__ = ["ProofOfAuthorizationRequestsResource", "AsyncProofOfAuthorizationRequestsResource"] -class ProofOfAuthorizationRequests(SyncAPIResource): +class ProofOfAuthorizationRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestsWithRawResponse: - return ProofOfAuthorizationRequestsWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: + return ProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestsWithStreamingResponse: - return ProofOfAuthorizationRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestsResourceWithStreamingResponse: + return ProofOfAuthorizationRequestsResourceWithStreamingResponse(self) def retrieve( self, @@ -115,14 +119,14 @@ def list( ) -class AsyncProofOfAuthorizationRequests(AsyncAPIResource): +class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsWithRawResponse: - return AsyncProofOfAuthorizationRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: + return AsyncProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsWithStreamingResponse: - return AsyncProofOfAuthorizationRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: + return AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +216,32 @@ def list( ) -class ProofOfAuthorizationRequestsWithRawResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: +class ProofOfAuthorizationRequestsResourceWithRawResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class AsyncProofOfAuthorizationRequestsWithRawResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: +class AsyncProofOfAuthorizationRequestsResourceWithRawResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class ProofOfAuthorizationRequestsWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: +class ProofOfAuthorizationRequestsResourceWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = to_streamed_response_wrapper( @@ -248,8 +252,8 @@ def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests ) -class AsyncProofOfAuthorizationRequestsWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: +class AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 9f8d2bb0c..93980b4d7 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import real_time_decision_action_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,21 +12,26 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from .._base_client import make_request_options from ..types.real_time_decision import RealTimeDecision -__all__ = ["RealTimeDecisions", "AsyncRealTimeDecisions"] +__all__ = ["RealTimeDecisionsResource", "AsyncRealTimeDecisionsResource"] -class RealTimeDecisions(SyncAPIResource): +class RealTimeDecisionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimeDecisionsWithRawResponse: - return RealTimeDecisionsWithRawResponse(self) + def with_raw_response(self) -> RealTimeDecisionsResourceWithRawResponse: + return RealTimeDecisionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimeDecisionsWithStreamingResponse: - return RealTimeDecisionsWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimeDecisionsResourceWithStreamingResponse: + return RealTimeDecisionsResourceWithStreamingResponse(self) def retrieve( self, @@ -132,14 +136,14 @@ def action( ) -class AsyncRealTimeDecisions(AsyncAPIResource): +class AsyncRealTimeDecisionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimeDecisionsWithRawResponse: - return AsyncRealTimeDecisionsWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimeDecisionsResourceWithRawResponse: + return AsyncRealTimeDecisionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimeDecisionsWithStreamingResponse: - return AsyncRealTimeDecisionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimeDecisionsResourceWithStreamingResponse: + return AsyncRealTimeDecisionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -244,32 +248,32 @@ async def action( ) -class RealTimeDecisionsWithRawResponse: - def __init__(self, real_time_decisions: RealTimeDecisions) -> None: +class RealTimeDecisionsResourceWithRawResponse: + def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = _legacy_response.to_raw_response_wrapper( + self.action = to_raw_response_wrapper( real_time_decisions.action, ) -class AsyncRealTimeDecisionsWithRawResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: +class AsyncRealTimeDecisionsResourceWithRawResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = _legacy_response.async_to_raw_response_wrapper( + self.action = async_to_raw_response_wrapper( real_time_decisions.action, ) -class RealTimeDecisionsWithStreamingResponse: - def __init__(self, real_time_decisions: RealTimeDecisions) -> None: +class RealTimeDecisionsResourceWithStreamingResponse: + def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions self.retrieve = to_streamed_response_wrapper( @@ -280,8 +284,8 @@ def __init__(self, real_time_decisions: RealTimeDecisions) -> None: ) -class AsyncRealTimeDecisionsWithStreamingResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: +class AsyncRealTimeDecisionsResourceWithStreamingResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index 3cef6e5ec..a5e170678 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import ( real_time_payments_request_for_payment_list_params, real_time_payments_request_for_payment_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment -__all__ = ["RealTimePaymentsRequestForPayments", "AsyncRealTimePaymentsRequestForPayments"] +__all__ = ["RealTimePaymentsRequestForPaymentsResource", "AsyncRealTimePaymentsRequestForPaymentsResource"] -class RealTimePaymentsRequestForPayments(SyncAPIResource): +class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsWithRawResponse: - return RealTimePaymentsRequestForPaymentsWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: + return RealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsWithStreamingResponse: - return RealTimePaymentsRequestForPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + return RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) def create( self, @@ -208,14 +212,14 @@ def list( ) -class AsyncRealTimePaymentsRequestForPayments(AsyncAPIResource): +class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: - return AsyncRealTimePaymentsRequestForPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: + return AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: - return AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + return AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) async def create( self, @@ -389,38 +393,40 @@ def list( ) -class RealTimePaymentsRequestForPaymentsWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: +class RealTimePaymentsRequestForPaymentsResourceWithRawResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: +class AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: + def __init__( + self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource + ) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class RealTimePaymentsRequestForPaymentsWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: +class RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = to_streamed_response_wrapper( @@ -434,8 +440,10 @@ def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequ ) -class AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: +class AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + def __init__( + self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource + ) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 5294ce28d..b62b0d10f 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer -__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] +__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] -class RealTimePaymentsTransfers(SyncAPIResource): +class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def create( self, @@ -227,14 +231,14 @@ def list( ) -class AsyncRealTimePaymentsTransfers(AsyncAPIResource): +class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def create( self, @@ -433,38 +437,38 @@ def list( ) -class RealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( real_time_payments_transfers.list, ) -class AsyncRealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( real_time_payments_transfers.list, ) -class RealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = to_streamed_response_wrapper( @@ -478,8 +482,8 @@ def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> N ) -class AsyncRealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index d31389f3b..f485b4d2e 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import routing_number_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options -from ..types.routing_number import RoutingNumber +from ..types.routing_number_list_response import RoutingNumberListResponse -__all__ = ["RoutingNumbers", "AsyncRoutingNumbers"] +__all__ = ["RoutingNumbersResource", "AsyncRoutingNumbersResource"] -class RoutingNumbers(SyncAPIResource): +class RoutingNumbersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RoutingNumbersWithRawResponse: - return RoutingNumbersWithRawResponse(self) + def with_raw_response(self) -> RoutingNumbersResourceWithRawResponse: + return RoutingNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RoutingNumbersWithStreamingResponse: - return RoutingNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> RoutingNumbersResourceWithStreamingResponse: + return RoutingNumbersResourceWithStreamingResponse(self) def list( self, @@ -39,7 +43,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[RoutingNumber]: + ) -> SyncPage[RoutingNumberListResponse]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -64,7 +68,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=SyncPage[RoutingNumber], + page=SyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -79,18 +83,18 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumber, + model=RoutingNumberListResponse, ) -class AsyncRoutingNumbers(AsyncAPIResource): +class AsyncRoutingNumbersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRoutingNumbersWithRawResponse: - return AsyncRoutingNumbersWithRawResponse(self) + def with_raw_response(self) -> AsyncRoutingNumbersResourceWithRawResponse: + return AsyncRoutingNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRoutingNumbersWithStreamingResponse: - return AsyncRoutingNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingResponse: + return AsyncRoutingNumbersResourceWithStreamingResponse(self) def list( self, @@ -104,7 +108,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RoutingNumber, AsyncPage[RoutingNumber]]: + ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -129,7 +133,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=AsyncPage[RoutingNumber], + page=AsyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -144,30 +148,30 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumber, + model=RoutingNumberListResponse, ) -class RoutingNumbersWithRawResponse: - def __init__(self, routing_numbers: RoutingNumbers) -> None: +class RoutingNumbersResourceWithRawResponse: + def __init__(self, routing_numbers: RoutingNumbersResource) -> None: self._routing_numbers = routing_numbers - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( routing_numbers.list, ) -class AsyncRoutingNumbersWithRawResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: +class AsyncRoutingNumbersResourceWithRawResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: self._routing_numbers = routing_numbers - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( routing_numbers.list, ) -class RoutingNumbersWithStreamingResponse: - def __init__(self, routing_numbers: RoutingNumbers) -> None: +class RoutingNumbersResourceWithStreamingResponse: + def __init__(self, routing_numbers: RoutingNumbersResource) -> None: self._routing_numbers = routing_numbers self.list = to_streamed_response_wrapper( @@ -175,8 +179,8 @@ def __init__(self, routing_numbers: RoutingNumbers) -> None: ) -class AsyncRoutingNumbersWithStreamingResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: +class AsyncRoutingNumbersResourceWithStreamingResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: self._routing_numbers = routing_numbers self.list = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index ce4ec0a36..e3c4105b5 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -1,285 +1,383 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, -) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from .simulations import ( - Simulations, - AsyncSimulations, - SimulationsWithRawResponse, - AsyncSimulationsWithRawResponse, - SimulationsWithStreamingResponse, - AsyncSimulationsWithStreamingResponse, + SimulationsResource, + AsyncSimulationsResource, + SimulationsResourceWithRawResponse, + AsyncSimulationsResourceWithRawResponse, + SimulationsResourceWithStreamingResponse, + AsyncSimulationsResourceWithStreamingResponse, ) from .card_refunds import ( - CardRefunds, - AsyncCardRefunds, - CardRefundsWithRawResponse, - AsyncCardRefundsWithRawResponse, - CardRefundsWithStreamingResponse, - AsyncCardRefundsWithStreamingResponse, + CardRefundsResource, + AsyncCardRefundsResource, + CardRefundsResourceWithRawResponse, + AsyncCardRefundsResourceWithRawResponse, + CardRefundsResourceWithStreamingResponse, + AsyncCardRefundsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) +from .card_reversals import ( + CardReversalsResource, + AsyncCardReversalsResource, + CardReversalsResourceWithRawResponse, + AsyncCardReversalsResourceWithRawResponse, + CardReversalsResourceWithStreamingResponse, + AsyncCardReversalsResourceWithStreamingResponse, ) from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, +) +from .card_increments import ( + CardIncrementsResource, + AsyncCardIncrementsResource, + CardIncrementsResourceWithRawResponse, + AsyncCardIncrementsResourceWithRawResponse, + CardIncrementsResourceWithStreamingResponse, + AsyncCardIncrementsResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, +) +from .card_settlements import ( + CardSettlementsResource, + AsyncCardSettlementsResource, + CardSettlementsResourceWithRawResponse, + AsyncCardSettlementsResourceWithRawResponse, + CardSettlementsResourceWithStreamingResponse, + AsyncCardSettlementsResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .interest_payments import ( - InterestPayments, - AsyncInterestPayments, - InterestPaymentsWithRawResponse, - AsyncInterestPaymentsWithRawResponse, - InterestPaymentsWithStreamingResponse, - AsyncInterestPaymentsWithStreamingResponse, + InterestPaymentsResource, + AsyncInterestPaymentsResource, + InterestPaymentsResourceWithRawResponse, + AsyncInterestPaymentsResourceWithRawResponse, + InterestPaymentsResourceWithStreamingResponse, + AsyncInterestPaymentsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, +) +from .card_authorizations import ( + CardAuthorizationsResource, + AsyncCardAuthorizationsResource, + CardAuthorizationsResourceWithRawResponse, + AsyncCardAuthorizationsResourceWithRawResponse, + CardAuthorizationsResourceWithStreamingResponse, + AsyncCardAuthorizationsResourceWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHolds, - AsyncInboundFundsHolds, - InboundFundsHoldsWithRawResponse, - AsyncInboundFundsHoldsWithRawResponse, - InboundFundsHoldsWithStreamingResponse, - AsyncInboundFundsHoldsWithStreamingResponse, + InboundFundsHoldsResource, + AsyncInboundFundsHoldsResource, + InboundFundsHoldsResourceWithRawResponse, + AsyncInboundFundsHoldsResourceWithRawResponse, + InboundFundsHoldsResourceWithStreamingResponse, + AsyncInboundFundsHoldsResourceWithStreamingResponse, +) +from .inbound_ach_transfers import ( + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, +) +from .inbound_wire_transfers import ( + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, +) +from .card_fuel_confirmations import ( + CardFuelConfirmationsResource, + AsyncCardFuelConfirmationsResource, + CardFuelConfirmationsResourceWithRawResponse, + AsyncCardFuelConfirmationsResourceWithRawResponse, + CardFuelConfirmationsResourceWithStreamingResponse, + AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequests, - AsyncDigitalWalletTokenRequests, - DigitalWalletTokenRequestsWithRawResponse, - AsyncDigitalWalletTokenRequestsWithRawResponse, - DigitalWalletTokenRequestsWithStreamingResponse, - AsyncDigitalWalletTokenRequestsWithStreamingResponse, + DigitalWalletTokenRequestsResource, + AsyncDigitalWalletTokenRequestsResource, + DigitalWalletTokenRequestsResourceWithRawResponse, + AsyncDigitalWalletTokenRequestsResourceWithRawResponse, + DigitalWalletTokenRequestsResourceWithStreamingResponse, + AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, +) +from .card_authorization_expirations import ( + CardAuthorizationExpirationsResource, + AsyncCardAuthorizationExpirationsResource, + CardAuthorizationExpirationsResourceWithRawResponse, + AsyncCardAuthorizationExpirationsResourceWithRawResponse, + CardAuthorizationExpirationsResourceWithStreamingResponse, + AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfers, - AsyncInboundInternationalACHTransfers, - InboundInternationalACHTransfersWithRawResponse, - AsyncInboundInternationalACHTransfersWithRawResponse, - InboundInternationalACHTransfersWithStreamingResponse, - AsyncInboundInternationalACHTransfersWithStreamingResponse, +from .inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + InboundRealTimePaymentsTransfersResourceWithRawResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) __all__ = [ - "AccountTransfers", - "AsyncAccountTransfers", - "AccountTransfersWithRawResponse", - "AsyncAccountTransfersWithRawResponse", - "AccountTransfersWithStreamingResponse", - "AsyncAccountTransfersWithStreamingResponse", - "AccountStatements", - "AsyncAccountStatements", - "AccountStatementsWithRawResponse", - "AsyncAccountStatementsWithRawResponse", - "AccountStatementsWithStreamingResponse", - "AsyncAccountStatementsWithStreamingResponse", - "ACHTransfers", - "AsyncACHTransfers", - "ACHTransfersWithRawResponse", - "AsyncACHTransfersWithRawResponse", - "ACHTransfersWithStreamingResponse", - "AsyncACHTransfersWithStreamingResponse", - "CardDisputes", - "AsyncCardDisputes", - "CardDisputesWithRawResponse", - "AsyncCardDisputesWithRawResponse", - "CardDisputesWithStreamingResponse", - "AsyncCardDisputesWithStreamingResponse", - "CardRefunds", - "AsyncCardRefunds", - "CardRefundsWithRawResponse", - "AsyncCardRefundsWithRawResponse", - "CardRefundsWithStreamingResponse", - "AsyncCardRefundsWithStreamingResponse", - "CheckTransfers", - "AsyncCheckTransfers", - "CheckTransfersWithRawResponse", - "AsyncCheckTransfersWithRawResponse", - "CheckTransfersWithStreamingResponse", - "AsyncCheckTransfersWithStreamingResponse", - "Documents", - "AsyncDocuments", - "DocumentsWithRawResponse", - "AsyncDocumentsWithRawResponse", - "DocumentsWithStreamingResponse", - "AsyncDocumentsWithStreamingResponse", - "DigitalWalletTokenRequests", - "AsyncDigitalWalletTokenRequests", - "DigitalWalletTokenRequestsWithRawResponse", - "AsyncDigitalWalletTokenRequestsWithRawResponse", - "DigitalWalletTokenRequestsWithStreamingResponse", - "AsyncDigitalWalletTokenRequestsWithStreamingResponse", - "CheckDeposits", - "AsyncCheckDeposits", - "CheckDepositsWithRawResponse", - "AsyncCheckDepositsWithRawResponse", - "CheckDepositsWithStreamingResponse", - "AsyncCheckDepositsWithStreamingResponse", - "Programs", - "AsyncPrograms", - "ProgramsWithRawResponse", - "AsyncProgramsWithRawResponse", - "ProgramsWithStreamingResponse", - "AsyncProgramsWithStreamingResponse", - "InboundWireDrawdownRequests", - "AsyncInboundWireDrawdownRequests", - "InboundWireDrawdownRequestsWithRawResponse", - "AsyncInboundWireDrawdownRequestsWithRawResponse", - "InboundWireDrawdownRequestsWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsWithStreamingResponse", - "InboundFundsHolds", - "AsyncInboundFundsHolds", - "InboundFundsHoldsWithRawResponse", - "AsyncInboundFundsHoldsWithRawResponse", - "InboundFundsHoldsWithStreamingResponse", - "AsyncInboundFundsHoldsWithStreamingResponse", - "InterestPayments", - "AsyncInterestPayments", - "InterestPaymentsWithRawResponse", - "AsyncInterestPaymentsWithRawResponse", - "InterestPaymentsWithStreamingResponse", - "AsyncInterestPaymentsWithStreamingResponse", - "WireTransfers", - "AsyncWireTransfers", - "WireTransfersWithRawResponse", - "AsyncWireTransfersWithRawResponse", - "WireTransfersWithStreamingResponse", - "AsyncWireTransfersWithStreamingResponse", - "Cards", - "AsyncCards", - "CardsWithRawResponse", - "AsyncCardsWithRawResponse", - "CardsWithStreamingResponse", - "AsyncCardsWithStreamingResponse", - "RealTimePaymentsTransfers", - "AsyncRealTimePaymentsTransfers", - "RealTimePaymentsTransfersWithRawResponse", - "AsyncRealTimePaymentsTransfersWithRawResponse", - "RealTimePaymentsTransfersWithStreamingResponse", - "AsyncRealTimePaymentsTransfersWithStreamingResponse", - "PhysicalCards", - "AsyncPhysicalCards", - "PhysicalCardsWithRawResponse", - "AsyncPhysicalCardsWithRawResponse", - "PhysicalCardsWithStreamingResponse", - "AsyncPhysicalCardsWithStreamingResponse", - "InboundCheckDeposits", - "AsyncInboundCheckDeposits", - "InboundCheckDepositsWithRawResponse", - "AsyncInboundCheckDepositsWithRawResponse", - "InboundCheckDepositsWithStreamingResponse", - "AsyncInboundCheckDepositsWithStreamingResponse", - "InboundInternationalACHTransfers", - "AsyncInboundInternationalACHTransfers", - "InboundInternationalACHTransfersWithRawResponse", - "AsyncInboundInternationalACHTransfersWithRawResponse", - "InboundInternationalACHTransfersWithStreamingResponse", - "AsyncInboundInternationalACHTransfersWithStreamingResponse", - "Simulations", - "AsyncSimulations", - "SimulationsWithRawResponse", - "AsyncSimulationsWithRawResponse", - "SimulationsWithStreamingResponse", - "AsyncSimulationsWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", + "InboundACHTransfersResource", + "AsyncInboundACHTransfersResource", + "InboundACHTransfersResourceWithRawResponse", + "AsyncInboundACHTransfersResourceWithRawResponse", + "InboundACHTransfersResourceWithStreamingResponse", + "AsyncInboundACHTransfersResourceWithStreamingResponse", + "ACHTransfersResource", + "AsyncACHTransfersResource", + "ACHTransfersResourceWithRawResponse", + "AsyncACHTransfersResourceWithRawResponse", + "ACHTransfersResourceWithStreamingResponse", + "AsyncACHTransfersResourceWithStreamingResponse", + "CheckTransfersResource", + "AsyncCheckTransfersResource", + "CheckTransfersResourceWithRawResponse", + "AsyncCheckTransfersResourceWithRawResponse", + "CheckTransfersResourceWithStreamingResponse", + "AsyncCheckTransfersResourceWithStreamingResponse", + "InboundCheckDepositsResource", + "AsyncInboundCheckDepositsResource", + "InboundCheckDepositsResourceWithRawResponse", + "AsyncInboundCheckDepositsResourceWithRawResponse", + "InboundCheckDepositsResourceWithStreamingResponse", + "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "CheckDepositsResource", + "AsyncCheckDepositsResource", + "CheckDepositsResourceWithRawResponse", + "AsyncCheckDepositsResourceWithRawResponse", + "CheckDepositsResourceWithStreamingResponse", + "AsyncCheckDepositsResourceWithStreamingResponse", + "InboundWireTransfersResource", + "AsyncInboundWireTransfersResource", + "InboundWireTransfersResourceWithRawResponse", + "AsyncInboundWireTransfersResourceWithRawResponse", + "InboundWireTransfersResourceWithStreamingResponse", + "AsyncInboundWireTransfersResourceWithStreamingResponse", + "WireTransfersResource", + "AsyncWireTransfersResource", + "WireTransfersResourceWithRawResponse", + "AsyncWireTransfersResourceWithRawResponse", + "WireTransfersResourceWithStreamingResponse", + "AsyncWireTransfersResourceWithStreamingResponse", + "InboundWireDrawdownRequestsResource", + "AsyncInboundWireDrawdownRequestsResource", + "InboundWireDrawdownRequestsResourceWithRawResponse", + "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", + "InboundWireDrawdownRequestsResourceWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", + "InboundRealTimePaymentsTransfersResource", + "AsyncInboundRealTimePaymentsTransfersResource", + "InboundRealTimePaymentsTransfersResourceWithRawResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", + "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundFundsHoldsResource", + "AsyncInboundFundsHoldsResource", + "InboundFundsHoldsResourceWithRawResponse", + "AsyncInboundFundsHoldsResourceWithRawResponse", + "InboundFundsHoldsResourceWithStreamingResponse", + "AsyncInboundFundsHoldsResourceWithStreamingResponse", + "RealTimePaymentsTransfersResource", + "AsyncRealTimePaymentsTransfersResource", + "RealTimePaymentsTransfersResourceWithRawResponse", + "AsyncRealTimePaymentsTransfersResourceWithRawResponse", + "RealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "CardAuthorizationsResource", + "AsyncCardAuthorizationsResource", + "CardAuthorizationsResourceWithRawResponse", + "AsyncCardAuthorizationsResourceWithRawResponse", + "CardAuthorizationsResourceWithStreamingResponse", + "AsyncCardAuthorizationsResourceWithStreamingResponse", + "CardSettlementsResource", + "AsyncCardSettlementsResource", + "CardSettlementsResourceWithRawResponse", + "AsyncCardSettlementsResourceWithRawResponse", + "CardSettlementsResourceWithStreamingResponse", + "AsyncCardSettlementsResourceWithStreamingResponse", + "CardReversalsResource", + "AsyncCardReversalsResource", + "CardReversalsResourceWithRawResponse", + "AsyncCardReversalsResourceWithRawResponse", + "CardReversalsResourceWithStreamingResponse", + "AsyncCardReversalsResourceWithStreamingResponse", + "CardIncrementsResource", + "AsyncCardIncrementsResource", + "CardIncrementsResourceWithRawResponse", + "AsyncCardIncrementsResourceWithRawResponse", + "CardIncrementsResourceWithStreamingResponse", + "AsyncCardIncrementsResourceWithStreamingResponse", + "CardAuthorizationExpirationsResource", + "AsyncCardAuthorizationExpirationsResource", + "CardAuthorizationExpirationsResourceWithRawResponse", + "AsyncCardAuthorizationExpirationsResourceWithRawResponse", + "CardAuthorizationExpirationsResourceWithStreamingResponse", + "AsyncCardAuthorizationExpirationsResourceWithStreamingResponse", + "CardFuelConfirmationsResource", + "AsyncCardFuelConfirmationsResource", + "CardFuelConfirmationsResourceWithRawResponse", + "AsyncCardFuelConfirmationsResourceWithRawResponse", + "CardFuelConfirmationsResourceWithStreamingResponse", + "AsyncCardFuelConfirmationsResourceWithStreamingResponse", + "CardRefundsResource", + "AsyncCardRefundsResource", + "CardRefundsResourceWithRawResponse", + "AsyncCardRefundsResourceWithRawResponse", + "CardRefundsResourceWithStreamingResponse", + "AsyncCardRefundsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", + "DigitalWalletTokenRequestsResource", + "AsyncDigitalWalletTokenRequestsResource", + "DigitalWalletTokenRequestsResourceWithRawResponse", + "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", + "DigitalWalletTokenRequestsResourceWithStreamingResponse", + "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", + "PhysicalCardsResource", + "AsyncPhysicalCardsResource", + "PhysicalCardsResourceWithRawResponse", + "AsyncPhysicalCardsResourceWithRawResponse", + "PhysicalCardsResourceWithStreamingResponse", + "AsyncPhysicalCardsResourceWithStreamingResponse", + "InterestPaymentsResource", + "AsyncInterestPaymentsResource", + "InterestPaymentsResourceWithRawResponse", + "AsyncInterestPaymentsResourceWithRawResponse", + "InterestPaymentsResourceWithStreamingResponse", + "AsyncInterestPaymentsResourceWithStreamingResponse", + "AccountStatementsResource", + "AsyncAccountStatementsResource", + "AccountStatementsResourceWithRawResponse", + "AsyncAccountStatementsResourceWithRawResponse", + "AccountStatementsResourceWithStreamingResponse", + "AsyncAccountStatementsResourceWithStreamingResponse", + "DocumentsResource", + "AsyncDocumentsResource", + "DocumentsResourceWithRawResponse", + "AsyncDocumentsResourceWithRawResponse", + "DocumentsResourceWithStreamingResponse", + "AsyncDocumentsResourceWithStreamingResponse", + "ProgramsResource", + "AsyncProgramsResource", + "ProgramsResourceWithRawResponse", + "AsyncProgramsResourceWithRawResponse", + "ProgramsResourceWithStreamingResponse", + "AsyncProgramsResourceWithStreamingResponse", + "SimulationsResource", + "AsyncSimulationsResource", + "SimulationsResourceWithRawResponse", + "AsyncSimulationsResourceWithRawResponse", + "SimulationsResourceWithStreamingResponse", + "AsyncSimulationsResourceWithStreamingResponse", ] diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index 5e682e3fd..85080b70d 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import account_statement_create_params from ...types.account_statement import AccountStatement -__all__ = ["AccountStatements", "AsyncAccountStatements"] +__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] -class AccountStatements(SyncAPIResource): +class AccountStatementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncAccountStatements(AsyncAPIResource): +class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class AccountStatementsWithRawResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_statements.create, ) -class AsyncAccountStatementsWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_statements.create, ) -class AccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, account_statements: AccountStatements) -> None: ) -class AsyncAccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index ef347df1c..7495451ca 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.account_transfer import AccountTransfer -__all__ = ["AccountTransfers", "AsyncAccountTransfers"] +__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] -class AccountTransfers(SyncAPIResource): +class AccountTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self) def complete( self, @@ -72,14 +76,14 @@ def complete( ) -class AsyncAccountTransfers(AsyncAPIResource): +class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self) async def complete( self, @@ -129,26 +133,26 @@ async def complete( ) -class AccountTransfersWithRawResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers - self.complete = _legacy_response.to_raw_response_wrapper( + self.complete = to_raw_response_wrapper( account_transfers.complete, ) -class AsyncAccountTransfersWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers - self.complete = _legacy_response.async_to_raw_response_wrapper( + self.complete = async_to_raw_response_wrapper( account_transfers.complete, ) -class AccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers self.complete = to_streamed_response_wrapper( @@ -156,8 +160,8 @@ def __init__(self, account_transfers: AccountTransfers) -> None: ) -class AsyncAccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers self.complete = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index c0247fa89..21c1c0c2a 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -2,13 +2,10 @@ from __future__ import annotations -from typing import Union -from datetime import datetime from typing_extensions import Literal import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -16,41 +13,32 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import ( - ach_transfer_return_params, - ach_transfer_create_inbound_params, - ach_transfer_notification_of_change_params, +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) +from ..._base_client import make_request_options +from ...types.simulations import ach_transfer_return_params, ach_transfer_create_notification_of_change_params from ...types.ach_transfer import ACHTransfer -from ...types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["ACHTransfers", "AsyncACHTransfers"] +__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] -class ACHTransfers(SyncAPIResource): +class ACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self) - def create_inbound( + def acknowledge( self, + ach_transfer_id: str, *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -58,43 +46,17 @@ def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. + ) -> ACHTransfer: + """ + Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the + Federal Reserve. This transfer must first have a `status` of `submitted` . In + production, the Federal Reserve generally acknowledges submitted ACH files + within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal + Reserve, this endpoint allows you to skip that delay and add the acknowledgment + subresource to the ACH Transfer. Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. + ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. extra_headers: Send extra headers @@ -106,23 +68,10 @@ def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - "/simulations/inbound_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - }, - ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, - ), + f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,10 +79,10 @@ def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundACHTransfer, + cast_to=ACHTransfer, ) - def notification_of_change( + def create_notification_of_change( self, ach_transfer_id: str, *, @@ -227,13 +176,13 @@ def notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", body=maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -562,28 +511,19 @@ def submit( ) -class AsyncACHTransfers(AsyncAPIResource): +class AsyncACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self) - async def create_inbound( + async def acknowledge( self, + ach_transfer_id: str, *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -591,43 +531,17 @@ async def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. + ) -> ACHTransfer: + """ + Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the + Federal Reserve. This transfer must first have a `status` of `submitted` . In + production, the Federal Reserve generally acknowledges submitted ACH files + within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal + Reserve, this endpoint allows you to skip that delay and add the acknowledgment + subresource to the ACH Transfer. Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. + ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. extra_headers: Send extra headers @@ -639,23 +553,10 @@ async def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - "/simulations/inbound_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - }, - ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, - ), + f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -663,10 +564,10 @@ async def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundACHTransfer, + cast_to=ACHTransfer, ) - async def notification_of_change( + async def create_notification_of_change( self, ach_transfer_id: str, *, @@ -760,13 +661,13 @@ async def notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", body=await async_maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -1095,51 +996,51 @@ async def submit( ) -class ACHTransfersWithRawResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = _legacy_response.to_raw_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = to_raw_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = _legacy_response.to_raw_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = to_raw_response_wrapper( + ach_transfers.create_notification_of_change, ) - self.return_ = _legacy_response.to_raw_response_wrapper( + self.return_ = to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = _legacy_response.to_raw_response_wrapper( + self.submit = to_raw_response_wrapper( ach_transfers.submit, ) -class AsyncACHTransfersWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = async_to_raw_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = async_to_raw_response_wrapper( + ach_transfers.create_notification_of_change, ) - self.return_ = _legacy_response.async_to_raw_response_wrapper( + self.return_ = async_to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = _legacy_response.async_to_raw_response_wrapper( + self.submit = async_to_raw_response_wrapper( ach_transfers.submit, ) -class ACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = to_streamed_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = to_streamed_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = to_streamed_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = to_streamed_response_wrapper( + ach_transfers.create_notification_of_change, ) self.return_ = to_streamed_response_wrapper( ach_transfers.return_, @@ -1149,15 +1050,15 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: ) -class AsyncACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = async_to_streamed_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = async_to_streamed_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = async_to_streamed_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = async_to_streamed_response_wrapper( + ach_transfers.create_notification_of_change, ) self.return_ = async_to_streamed_response_wrapper( ach_transfers.return_, diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py new file mode 100644 index 000000000..bd2a5c020 --- /dev/null +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -0,0 +1,168 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_authorization_expiration_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardAuthorizationExpirationsResource", "AsyncCardAuthorizationExpirationsResource"] + + +class CardAuthorizationExpirationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + return CardAuthorizationExpirationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + return CardAuthorizationExpirationsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_authorization_expirations", + body=maybe_transform( + {"card_payment_id": card_payment_id}, + card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardAuthorizationExpirationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + return AsyncCardAuthorizationExpirationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_authorization_expirations", + body=await async_maybe_transform( + {"card_payment_id": card_payment_id}, + card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardAuthorizationExpirationsResourceWithRawResponse: + def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = to_raw_response_wrapper( + card_authorization_expirations.create, + ) + + +class AsyncCardAuthorizationExpirationsResourceWithRawResponse: + def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = async_to_raw_response_wrapper( + card_authorization_expirations.create, + ) + + +class CardAuthorizationExpirationsResourceWithStreamingResponse: + def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = to_streamed_response_wrapper( + card_authorization_expirations.create, + ) + + +class AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = async_to_streamed_response_wrapper( + card_authorization_expirations.create, + ) diff --git a/src/increase/resources/simulations/cards.py b/src/increase/resources/simulations/card_authorizations.py similarity index 54% rename from src/increase/resources/simulations/cards.py rename to src/increase/resources/simulations/card_authorizations.py index b4e6e7186..6089829c9 100644 --- a/src/increase/resources/simulations/cards.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,25 +11,29 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import card_authorize_params, card_settlement_params -from ...types.transaction import Transaction -from ...types.simulations.card_authorization_simulation import CardAuthorizationSimulation +from ...types.simulations import card_authorization_create_params +from ...types.simulations.card_authorization_create_response import CardAuthorizationCreateResponse -__all__ = ["Cards", "AsyncCards"] +__all__ = ["CardAuthorizationsResource", "AsyncCardAuthorizationsResource"] -class Cards(SyncAPIResource): +class CardAuthorizationsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self) + def with_raw_response(self) -> CardAuthorizationsResourceWithRawResponse: + return CardAuthorizationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self) + def with_streaming_response(self) -> CardAuthorizationsResourceWithStreamingResponse: + return CardAuthorizationsResourceWithStreamingResponse(self) - def authorize( + def create( self, *, amount: int, @@ -50,7 +53,7 @@ def authorize( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationSimulation: + ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -112,68 +115,7 @@ def authorize( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorize_params.CardAuthorizeParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardAuthorizationSimulation, - ) - - def settlement( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_settlements", - body=maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_params.CardSettlementParams, + card_authorization_create_params.CardAuthorizationCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -182,20 +124,20 @@ def settlement( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Transaction, + cast_to=CardAuthorizationCreateResponse, ) -class AsyncCards(AsyncAPIResource): +class AsyncCardAuthorizationsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + return AsyncCardAuthorizationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: + return AsyncCardAuthorizationsResourceWithStreamingResponse(self) - async def authorize( + async def create( self, *, amount: int, @@ -215,7 +157,7 @@ async def authorize( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationSimulation: + ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -277,7 +219,7 @@ async def authorize( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorize_params.CardAuthorizeParams, + card_authorization_create_params.CardAuthorizationCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -286,114 +228,41 @@ async def authorize( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=CardAuthorizationSimulation, + cast_to=CardAuthorizationCreateResponse, ) - async def settlement( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. +class CardAuthorizationsResourceWithRawResponse: + def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_settlements", - body=await async_maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_params.CardSettlementParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class CardsWithRawResponse: - def __init__(self, cards: Cards) -> None: - self._cards = cards - - self.authorize = _legacy_response.to_raw_response_wrapper( - cards.authorize, - ) - self.settlement = _legacy_response.to_raw_response_wrapper( - cards.settlement, + self.create = to_raw_response_wrapper( + card_authorizations.create, ) -class AsyncCardsWithRawResponse: - def __init__(self, cards: AsyncCards) -> None: - self._cards = cards +class AsyncCardAuthorizationsResourceWithRawResponse: + def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = _legacy_response.async_to_raw_response_wrapper( - cards.authorize, - ) - self.settlement = _legacy_response.async_to_raw_response_wrapper( - cards.settlement, + self.create = async_to_raw_response_wrapper( + card_authorizations.create, ) -class CardsWithStreamingResponse: - def __init__(self, cards: Cards) -> None: - self._cards = cards +class CardAuthorizationsResourceWithStreamingResponse: + def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = to_streamed_response_wrapper( - cards.authorize, - ) - self.settlement = to_streamed_response_wrapper( - cards.settlement, + self.create = to_streamed_response_wrapper( + card_authorizations.create, ) -class AsyncCardsWithStreamingResponse: - def __init__(self, cards: AsyncCards) -> None: - self._cards = cards +class AsyncCardAuthorizationsResourceWithStreamingResponse: + def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = async_to_streamed_response_wrapper( - cards.authorize, - ) - self.settlement = async_to_streamed_response_wrapper( - cards.settlement, + self.create = async_to_streamed_response_wrapper( + card_authorizations.create, ) diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 27f373762..ec48f6924 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -6,7 +6,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -14,22 +13,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import card_dispute_action_params from ...types.card_dispute import CardDispute -__all__ = ["CardDisputes", "AsyncCardDisputes"] +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] -class CardDisputes(SyncAPIResource): +class CardDisputesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self) + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self) def action( self, @@ -98,14 +102,14 @@ def action( ) -class AsyncCardDisputes(AsyncAPIResource): +class AsyncCardDisputesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self) async def action( self, @@ -174,26 +178,26 @@ async def action( ) -class CardDisputesWithRawResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes - self.action = _legacy_response.to_raw_response_wrapper( + self.action = to_raw_response_wrapper( card_disputes.action, ) -class AsyncCardDisputesWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes - self.action = _legacy_response.async_to_raw_response_wrapper( + self.action = async_to_raw_response_wrapper( card_disputes.action, ) -class CardDisputesWithStreamingResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes self.action = to_streamed_response_wrapper( @@ -201,8 +205,8 @@ def __init__(self, card_disputes: CardDisputes) -> None: ) -class AsyncCardDisputesWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes self.action = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py new file mode 100644 index 000000000..fe62793ec --- /dev/null +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -0,0 +1,188 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_fuel_confirmation_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardFuelConfirmationsResource", "AsyncCardFuelConfirmationsResource"] + + +class CardFuelConfirmationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardFuelConfirmationsResourceWithRawResponse: + return CardFuelConfirmationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardFuelConfirmationsResourceWithStreamingResponse: + return CardFuelConfirmationsResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_fuel_confirmations", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardFuelConfirmationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: + return AsyncCardFuelConfirmationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: + return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_fuel_confirmations", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardFuelConfirmationsResourceWithRawResponse: + def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = to_raw_response_wrapper( + card_fuel_confirmations.create, + ) + + +class AsyncCardFuelConfirmationsResourceWithRawResponse: + def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = async_to_raw_response_wrapper( + card_fuel_confirmations.create, + ) + + +class CardFuelConfirmationsResourceWithStreamingResponse: + def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = to_streamed_response_wrapper( + card_fuel_confirmations.create, + ) + + +class AsyncCardFuelConfirmationsResourceWithStreamingResponse: + def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = async_to_streamed_response_wrapper( + card_fuel_confirmations.create, + ) diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py new file mode 100644 index 000000000..24e8ab4e5 --- /dev/null +++ b/src/increase/resources/simulations/card_increments.py @@ -0,0 +1,198 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_increment_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardIncrementsResource", "AsyncCardIncrementsResource"] + + +class CardIncrementsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardIncrementsResourceWithRawResponse: + return CardIncrementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardIncrementsResourceWithStreamingResponse: + return CardIncrementsResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_increments", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + card_increment_create_params.CardIncrementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardIncrementsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardIncrementsResourceWithRawResponse: + return AsyncCardIncrementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardIncrementsResourceWithStreamingResponse: + return AsyncCardIncrementsResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_increments", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + card_increment_create_params.CardIncrementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardIncrementsResourceWithRawResponse: + def __init__(self, card_increments: CardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = to_raw_response_wrapper( + card_increments.create, + ) + + +class AsyncCardIncrementsResourceWithRawResponse: + def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = async_to_raw_response_wrapper( + card_increments.create, + ) + + +class CardIncrementsResourceWithStreamingResponse: + def __init__(self, card_increments: CardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = to_streamed_response_wrapper( + card_increments.create, + ) + + +class AsyncCardIncrementsResourceWithStreamingResponse: + def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = async_to_streamed_response_wrapper( + card_increments.create, + ) diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 6c01e48c6..7ab498340 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import card_refund_create_params from ...types.transaction import Transaction -__all__ = ["CardRefunds", "AsyncCardRefunds"] +__all__ = ["CardRefundsResource", "AsyncCardRefundsResource"] -class CardRefunds(SyncAPIResource): +class CardRefundsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardRefundsWithRawResponse: - return CardRefundsWithRawResponse(self) + def with_raw_response(self) -> CardRefundsResourceWithRawResponse: + return CardRefundsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardRefundsWithStreamingResponse: - return CardRefundsWithStreamingResponse(self) + def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: + return CardRefundsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncCardRefunds(AsyncAPIResource): +class AsyncCardRefundsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardRefundsWithRawResponse: - return AsyncCardRefundsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardRefundsResourceWithRawResponse: + return AsyncCardRefundsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardRefundsWithStreamingResponse: - return AsyncCardRefundsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingResponse: + return AsyncCardRefundsResourceWithStreamingResponse(self) async def create( self, @@ -130,26 +134,26 @@ async def create( ) -class CardRefundsWithRawResponse: - def __init__(self, card_refunds: CardRefunds) -> None: +class CardRefundsResourceWithRawResponse: + def __init__(self, card_refunds: CardRefundsResource) -> None: self._card_refunds = card_refunds - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( card_refunds.create, ) -class AsyncCardRefundsWithRawResponse: - def __init__(self, card_refunds: AsyncCardRefunds) -> None: +class AsyncCardRefundsResourceWithRawResponse: + def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: self._card_refunds = card_refunds - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( card_refunds.create, ) -class CardRefundsWithStreamingResponse: - def __init__(self, card_refunds: CardRefunds) -> None: +class CardRefundsResourceWithStreamingResponse: + def __init__(self, card_refunds: CardRefundsResource) -> None: self._card_refunds = card_refunds self.create = to_streamed_response_wrapper( @@ -157,8 +161,8 @@ def __init__(self, card_refunds: CardRefunds) -> None: ) -class AsyncCardRefundsWithStreamingResponse: - def __init__(self, card_refunds: AsyncCardRefunds) -> None: +class AsyncCardRefundsResourceWithStreamingResponse: + def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: self._card_refunds = card_refunds self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py new file mode 100644 index 000000000..ff8bd9515 --- /dev/null +++ b/src/increase/resources/simulations/card_reversals.py @@ -0,0 +1,190 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_reversal_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardReversalsResource", "AsyncCardReversalsResource"] + + +class CardReversalsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardReversalsResourceWithRawResponse: + return CardReversalsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardReversalsResourceWithStreamingResponse: + return CardReversalsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_reversals", + body=maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + card_reversal_create_params.CardReversalCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardReversalsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardReversalsResourceWithRawResponse: + return AsyncCardReversalsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardReversalsResourceWithStreamingResponse: + return AsyncCardReversalsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_reversals", + body=await async_maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + card_reversal_create_params.CardReversalCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardReversalsResourceWithRawResponse: + def __init__(self, card_reversals: CardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = to_raw_response_wrapper( + card_reversals.create, + ) + + +class AsyncCardReversalsResourceWithRawResponse: + def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = async_to_raw_response_wrapper( + card_reversals.create, + ) + + +class CardReversalsResourceWithStreamingResponse: + def __init__(self, card_reversals: CardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = to_streamed_response_wrapper( + card_reversals.create, + ) + + +class AsyncCardReversalsResourceWithStreamingResponse: + def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = async_to_streamed_response_wrapper( + card_reversals.create, + ) diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py new file mode 100644 index 000000000..84399485f --- /dev/null +++ b/src/increase/resources/simulations/card_settlements.py @@ -0,0 +1,202 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_settlement_create_params +from ...types.transaction import Transaction + +__all__ = ["CardSettlementsResource", "AsyncCardSettlementsResource"] + + +class CardSettlementsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardSettlementsResourceWithRawResponse: + return CardSettlementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardSettlementsResourceWithStreamingResponse: + return CardSettlementsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. + + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_settlements", + body=maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_create_params.CardSettlementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class AsyncCardSettlementsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardSettlementsResourceWithRawResponse: + return AsyncCardSettlementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardSettlementsResourceWithStreamingResponse: + return AsyncCardSettlementsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. + + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_settlements", + body=await async_maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_create_params.CardSettlementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class CardSettlementsResourceWithRawResponse: + def __init__(self, card_settlements: CardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = to_raw_response_wrapper( + card_settlements.create, + ) + + +class AsyncCardSettlementsResourceWithRawResponse: + def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = async_to_raw_response_wrapper( + card_settlements.create, + ) + + +class CardSettlementsResourceWithStreamingResponse: + def __init__(self, card_settlements: CardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = to_streamed_response_wrapper( + card_settlements.create, + ) + + +class AsyncCardSettlementsResourceWithStreamingResponse: + def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = async_to_streamed_response_wrapper( + card_settlements.create, + ) diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 76230a77c..862029b70 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.check_deposit import CheckDeposit -__all__ = ["CheckDeposits", "AsyncCheckDeposits"] +__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] -class CheckDeposits(SyncAPIResource): +class CheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self) def reject( self, @@ -156,14 +160,14 @@ def submit( ) -class AsyncCheckDeposits(AsyncAPIResource): +class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self) async def reject( self, @@ -297,38 +301,38 @@ async def submit( ) -class CheckDepositsWithRawResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits - self.reject = _legacy_response.to_raw_response_wrapper( + self.reject = to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = _legacy_response.to_raw_response_wrapper( + self.return_ = to_raw_response_wrapper( check_deposits.return_, ) - self.submit = _legacy_response.to_raw_response_wrapper( + self.submit = to_raw_response_wrapper( check_deposits.submit, ) -class AsyncCheckDepositsWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits - self.reject = _legacy_response.async_to_raw_response_wrapper( + self.reject = async_to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = _legacy_response.async_to_raw_response_wrapper( + self.return_ = async_to_raw_response_wrapper( check_deposits.return_, ) - self.submit = _legacy_response.async_to_raw_response_wrapper( + self.submit = async_to_raw_response_wrapper( check_deposits.submit, ) -class CheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits self.reject = to_streamed_response_wrapper( @@ -342,8 +346,8 @@ def __init__(self, check_deposits: CheckDeposits) -> None: ) -class AsyncCheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits self.reject = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index 8f3ac9af3..a0299f97f 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.check_transfer import CheckTransfer -__all__ = ["CheckTransfers", "AsyncCheckTransfers"] +__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] -class CheckTransfers(SyncAPIResource): +class CheckTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self) def mail( self, @@ -69,14 +73,14 @@ def mail( ) -class AsyncCheckTransfers(AsyncAPIResource): +class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self) async def mail( self, @@ -123,26 +127,26 @@ async def mail( ) -class CheckTransfersWithRawResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers - self.mail = _legacy_response.to_raw_response_wrapper( + self.mail = to_raw_response_wrapper( check_transfers.mail, ) -class AsyncCheckTransfersWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers - self.mail = _legacy_response.async_to_raw_response_wrapper( + self.mail = async_to_raw_response_wrapper( check_transfers.mail, ) -class CheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers self.mail = to_streamed_response_wrapper( @@ -150,8 +154,8 @@ def __init__(self, check_transfers: CheckTransfers) -> None: ) -class AsyncCheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers self.mail = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 6a7407aa9..7576f7708 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import digital_wallet_token_request_create_params from ...types.simulations.digital_wallet_token_request_create_response import DigitalWalletTokenRequestCreateResponse -__all__ = ["DigitalWalletTokenRequests", "AsyncDigitalWalletTokenRequests"] +__all__ = ["DigitalWalletTokenRequestsResource", "AsyncDigitalWalletTokenRequestsResource"] -class DigitalWalletTokenRequests(SyncAPIResource): +class DigitalWalletTokenRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokenRequestsWithRawResponse: - return DigitalWalletTokenRequestsWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + return DigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokenRequestsWithStreamingResponse: - return DigitalWalletTokenRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + return DigitalWalletTokenRequestsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncDigitalWalletTokenRequests(AsyncAPIResource): +class AsyncDigitalWalletTokenRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: - return AsyncDigitalWalletTokenRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class DigitalWalletTokenRequestsWithRawResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: +class DigitalWalletTokenRequestsResourceWithRawResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class AsyncDigitalWalletTokenRequestsWithRawResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: +class AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class DigitalWalletTokenRequestsWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: +class DigitalWalletTokenRequestsResourceWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> ) -class AsyncDigitalWalletTokenRequestsWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: +class AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 3228ade65..b2f455a28 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.document import Document from ...types.simulations import document_create_params -__all__ = ["Documents", "AsyncDocuments"] +__all__ = ["DocumentsResource", "AsyncDocumentsResource"] -class Documents(SyncAPIResource): +class DocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self) + def with_raw_response(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self) def create( self, @@ -71,14 +75,14 @@ def create( ) -class AsyncDocuments(AsyncAPIResource): +class AsyncDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self) async def create( self, @@ -122,26 +126,26 @@ async def create( ) -class DocumentsWithRawResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithRawResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( documents.create, ) -class AsyncDocumentsWithRawResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithRawResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( documents.create, ) -class DocumentsWithStreamingResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithStreamingResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents self.create = to_streamed_response_wrapper( @@ -149,8 +153,8 @@ def __init__(self, documents: Documents) -> None: ) -class AsyncDocumentsWithStreamingResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithStreamingResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py new file mode 100644 index 000000000..87a5f33a7 --- /dev/null +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -0,0 +1,352 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_ach_transfer_create_params +from ...types.inbound_ach_transfer import InboundACHTransfer + +__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] + + +class InboundACHTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. + + Args: + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. + + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, + }, + inbound_ach_transfer_create_params.InboundACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundACHTransfer, + ) + + +class AsyncInboundACHTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. + + Args: + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. + + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, + }, + inbound_ach_transfer_create_params.InboundACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundACHTransfer, + ) + + +class InboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = to_raw_response_wrapper( + inbound_ach_transfers.create, + ) + + +class AsyncInboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = async_to_raw_response_wrapper( + inbound_ach_transfers.create, + ) + + +class InboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = to_streamed_response_wrapper( + inbound_ach_transfers.create, + ) + + +class AsyncInboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_ach_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 2d37d6f23..902853eb3 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import inbound_check_deposit_create_params from ...types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] +__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] -class InboundCheckDeposits(SyncAPIResource): +class InboundCheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self) def create( self, @@ -90,14 +94,14 @@ def create( ) -class AsyncInboundCheckDeposits(AsyncAPIResource): +class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def create( self, @@ -160,26 +164,26 @@ async def create( ) -class InboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( inbound_check_deposits.create, ) -class AsyncInboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( inbound_check_deposits.create, ) -class InboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = to_streamed_response_wrapper( @@ -187,8 +191,8 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: ) -class AsyncInboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index ff7d43726..6cb3ad65a 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse -__all__ = ["InboundFundsHolds", "AsyncInboundFundsHolds"] +__all__ = ["InboundFundsHoldsResource", "AsyncInboundFundsHoldsResource"] -class InboundFundsHolds(SyncAPIResource): +class InboundFundsHoldsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundFundsHoldsWithRawResponse: - return InboundFundsHoldsWithRawResponse(self) + def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: + return InboundFundsHoldsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundFundsHoldsWithStreamingResponse: - return InboundFundsHoldsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: + return InboundFundsHoldsResourceWithStreamingResponse(self) def release( self, @@ -70,14 +74,14 @@ def release( ) -class AsyncInboundFundsHolds(AsyncAPIResource): +class AsyncInboundFundsHoldsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundFundsHoldsWithRawResponse: - return AsyncInboundFundsHoldsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + return AsyncInboundFundsHoldsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundFundsHoldsWithStreamingResponse: - return AsyncInboundFundsHoldsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + return AsyncInboundFundsHoldsResourceWithStreamingResponse(self) async def release( self, @@ -125,26 +129,26 @@ async def release( ) -class InboundFundsHoldsWithRawResponse: - def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: +class InboundFundsHoldsResourceWithRawResponse: + def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = _legacy_response.to_raw_response_wrapper( + self.release = to_raw_response_wrapper( inbound_funds_holds.release, ) -class AsyncInboundFundsHoldsWithRawResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: +class AsyncInboundFundsHoldsResourceWithRawResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = _legacy_response.async_to_raw_response_wrapper( + self.release = async_to_raw_response_wrapper( inbound_funds_holds.release, ) -class InboundFundsHoldsWithStreamingResponse: - def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: +class InboundFundsHoldsResourceWithStreamingResponse: + def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = to_streamed_response_wrapper( @@ -152,8 +156,8 @@ def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: ) -class AsyncInboundFundsHoldsWithStreamingResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: +class AsyncInboundFundsHoldsResourceWithStreamingResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py deleted file mode 100644 index 6c0109920..000000000 --- a/src/increase/resources/simulations/inbound_international_ach_transfers.py +++ /dev/null @@ -1,244 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import inbound_international_ach_transfer_create_params -from ...types.simulations.inbound_international_ach_transfer import InboundInternationalACHTransfer - -__all__ = ["InboundInternationalACHTransfers", "AsyncInboundInternationalACHTransfers"] - - -class InboundInternationalACHTransfers(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundInternationalACHTransfersWithRawResponse: - return InboundInternationalACHTransfersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundInternationalACHTransfersWithStreamingResponse: - return InboundInternationalACHTransfersWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransfer: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_international_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransfer, - ) - - -class AsyncInboundInternationalACHTransfers(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: - return AsyncInboundInternationalACHTransfersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: - return AsyncInboundInternationalACHTransfersWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransfer: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_international_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransfer, - ) - - -class InboundInternationalACHTransfersWithRawResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = _legacy_response.to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersWithRawResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = _legacy_response.async_to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class InboundInternationalACHTransfersWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py new file mode 100644 index 000000000..209db6144 --- /dev/null +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -0,0 +1,228 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_real_time_payments_transfer_create_params +from ...types.simulations.inbound_real_time_payments_transfer_create_response import ( + InboundRealTimePaymentsTransferCreateResponse, +) + +__all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] + + +class InboundRealTimePaymentsTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferCreateResponse: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_real_time_payments_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferCreateResponse, + ) + + +class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferCreateResponse: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_real_time_payments_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferCreateResponse, + ) + + +class InboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = to_raw_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = async_to_raw_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = to_streamed_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_real_time_payments_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 90dae10a0..61f2d8b4a 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import inbound_wire_drawdown_request_create_params from ...types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] +__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] -class InboundWireDrawdownRequests(SyncAPIResource): +class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def create( self, @@ -159,14 +163,14 @@ def create( ) -class AsyncInboundWireDrawdownRequests(AsyncAPIResource): +class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( self, @@ -298,26 +302,26 @@ async def create( ) -class InboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class AsyncInboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class InboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -325,8 +329,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) ) -class AsyncInboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py new file mode 100644 index 000000000..3501f7328 --- /dev/null +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -0,0 +1,330 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_wire_transfer_create_params +from ...types.inbound_wire_transfer import InboundWireTransfer + +__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] + + +class InboundWireTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Simulates an inbound Wire Transfer to your account. + + Args: + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. + + amount: The transfer amount in cents. Must be positive. + + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. + + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. + + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. + + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. + + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. + + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. + + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_wire_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, + }, + inbound_wire_transfer_create_params.InboundWireTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + + +class AsyncInboundWireTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Simulates an inbound Wire Transfer to your account. + + Args: + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. + + amount: The transfer amount in cents. Must be positive. + + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. + + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. + + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. + + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. + + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. + + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. + + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_wire_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, + }, + inbound_wire_transfer_create_params.InboundWireTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + + +class InboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = to_raw_response_wrapper( + inbound_wire_transfers.create, + ) + + +class AsyncInboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = async_to_raw_response_wrapper( + inbound_wire_transfers.create, + ) + + +class InboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = to_streamed_response_wrapper( + inbound_wire_transfers.create, + ) + + +class AsyncInboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_wire_transfers.create, + ) diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index b7bd0a17f..b129e1563 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -7,7 +7,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -15,22 +14,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import interest_payment_create_params from ...types.transaction import Transaction -__all__ = ["InterestPayments", "AsyncInterestPayments"] +__all__ = ["InterestPaymentsResource", "AsyncInterestPaymentsResource"] -class InterestPayments(SyncAPIResource): +class InterestPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InterestPaymentsWithRawResponse: - return InterestPaymentsWithRawResponse(self) + def with_raw_response(self) -> InterestPaymentsResourceWithRawResponse: + return InterestPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InterestPaymentsWithStreamingResponse: - return InterestPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> InterestPaymentsResourceWithStreamingResponse: + return InterestPaymentsResourceWithStreamingResponse(self) def create( self, @@ -72,7 +76,7 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ return self._post( - "/simulations/interest_payment", + "/simulations/interest_payments", body=maybe_transform( { "account_id": account_id, @@ -93,14 +97,14 @@ def create( ) -class AsyncInterestPayments(AsyncAPIResource): +class AsyncInterestPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInterestPaymentsWithRawResponse: - return AsyncInterestPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncInterestPaymentsResourceWithRawResponse: + return AsyncInterestPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInterestPaymentsWithStreamingResponse: - return AsyncInterestPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + return AsyncInterestPaymentsResourceWithStreamingResponse(self) async def create( self, @@ -142,7 +146,7 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ return await self._post( - "/simulations/interest_payment", + "/simulations/interest_payments", body=await async_maybe_transform( { "account_id": account_id, @@ -163,26 +167,26 @@ async def create( ) -class InterestPaymentsWithRawResponse: - def __init__(self, interest_payments: InterestPayments) -> None: +class InterestPaymentsResourceWithRawResponse: + def __init__(self, interest_payments: InterestPaymentsResource) -> None: self._interest_payments = interest_payments - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( interest_payments.create, ) -class AsyncInterestPaymentsWithRawResponse: - def __init__(self, interest_payments: AsyncInterestPayments) -> None: +class AsyncInterestPaymentsResourceWithRawResponse: + def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: self._interest_payments = interest_payments - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( interest_payments.create, ) -class InterestPaymentsWithStreamingResponse: - def __init__(self, interest_payments: InterestPayments) -> None: +class InterestPaymentsResourceWithStreamingResponse: + def __init__(self, interest_payments: InterestPaymentsResource) -> None: self._interest_payments = interest_payments self.create = to_streamed_response_wrapper( @@ -190,8 +194,8 @@ def __init__(self, interest_payments: InterestPayments) -> None: ) -class AsyncInterestPaymentsWithStreamingResponse: - def __init__(self, interest_payments: AsyncInterestPayments) -> None: +class AsyncInterestPaymentsResourceWithStreamingResponse: + def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: self._interest_payments = interest_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 02c7f6459..a3eac10ff 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -6,7 +6,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -14,24 +13,29 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import physical_card_shipment_advance_params +from ...types.simulations import physical_card_advance_shipment_params from ...types.physical_card import PhysicalCard -__all__ = ["PhysicalCards", "AsyncPhysicalCards"] +__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] -class PhysicalCards(SyncAPIResource): +class PhysicalCardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self) - def shipment_advance( + def advance_shipment( self, physical_card_id: str, *, @@ -79,10 +83,10 @@ def shipment_advance( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._post( - f"/simulations/physical_cards/{physical_card_id}/shipment_advance", + f"/simulations/physical_cards/{physical_card_id}/advance_shipment", body=maybe_transform( {"shipment_status": shipment_status}, - physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, + physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), options=make_request_options( extra_headers=extra_headers, @@ -95,16 +99,16 @@ def shipment_advance( ) -class AsyncPhysicalCards(AsyncAPIResource): +class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self) - async def shipment_advance( + async def advance_shipment( self, physical_card_id: str, *, @@ -152,10 +156,10 @@ async def shipment_advance( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._post( - f"/simulations/physical_cards/{physical_card_id}/shipment_advance", + f"/simulations/physical_cards/{physical_card_id}/advance_shipment", body=await async_maybe_transform( {"shipment_status": shipment_status}, - physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, + physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), options=make_request_options( extra_headers=extra_headers, @@ -168,37 +172,37 @@ async def shipment_advance( ) -class PhysicalCardsWithRawResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = _legacy_response.to_raw_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = to_raw_response_wrapper( + physical_cards.advance_shipment, ) -class AsyncPhysicalCardsWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = _legacy_response.async_to_raw_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = async_to_raw_response_wrapper( + physical_cards.advance_shipment, ) -class PhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = to_streamed_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = to_streamed_response_wrapper( + physical_cards.advance_shipment, ) -class AsyncPhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = async_to_streamed_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = async_to_streamed_response_wrapper( + physical_cards.advance_shipment, ) diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index f5877f8bd..ee78aebbe 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.program import Program from ...types.simulations import program_create_params -__all__ = ["Programs", "AsyncPrograms"] +__all__ = ["ProgramsResource", "AsyncProgramsResource"] -class Programs(SyncAPIResource): +class ProgramsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self) + def with_raw_response(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncPrograms(AsyncAPIResource): +class AsyncProgramsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class ProgramsWithRawResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithRawResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( programs.create, ) -class AsyncProgramsWithRawResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithRawResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( programs.create, ) -class ProgramsWithStreamingResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithStreamingResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, programs: Programs) -> None: ) -class AsyncProgramsWithStreamingResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithStreamingResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 4759f543c..9df107fe3 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,28 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import ( - real_time_payments_transfer_complete_params, - real_time_payments_transfer_create_inbound_params, +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) +from ..._base_client import make_request_options +from ...types.simulations import real_time_payments_transfer_complete_params from ...types.real_time_payments_transfer import RealTimePaymentsTransfer -from ...types.simulations.inbound_real_time_payments_transfer_simulation_result import ( - InboundRealTimePaymentsTransferSimulationResult, -) -__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] +__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] -class RealTimePaymentsTransfers(SyncAPIResource): +class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def complete( self, @@ -88,88 +86,15 @@ def complete( cast_to=RealTimePaymentsTransfer, ) - def create_inbound( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferSimulationResult: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_real_time_payments_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferSimulationResult, - ) - - -class AsyncRealTimePaymentsTransfers(AsyncAPIResource): +class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def complete( self, @@ -224,123 +149,38 @@ async def complete( cast_to=RealTimePaymentsTransfer, ) - async def create_inbound( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferSimulationResult: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_real_time_payments_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferSimulationResult, - ) - -class RealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = _legacy_response.to_raw_response_wrapper( + self.complete = to_raw_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = _legacy_response.to_raw_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class AsyncRealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = _legacy_response.async_to_raw_response_wrapper( + self.complete = async_to_raw_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class RealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = to_streamed_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = to_streamed_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class AsyncRealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = async_to_streamed_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = async_to_streamed_response_wrapper( - real_time_payments_transfers.create_inbound, - ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index cbf003d01..0da1a353d 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -2,1154 +2,903 @@ from __future__ import annotations -import httpx - -from ... import _legacy_response -from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, -) -from ...types import ( - simulation_card_reversals_params, - simulation_card_increments_params, - simulation_card_fuel_confirmations_params, - simulation_card_authorization_expirations_params, -) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from ..._compat import cached_property from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from .card_refunds import ( - CardRefunds, - AsyncCardRefunds, - CardRefundsWithRawResponse, - AsyncCardRefundsWithRawResponse, - CardRefundsWithStreamingResponse, - AsyncCardRefundsWithStreamingResponse, + CardRefundsResource, + AsyncCardRefundsResource, + CardRefundsResourceWithRawResponse, + AsyncCardRefundsResourceWithRawResponse, + CardRefundsResourceWithStreamingResponse, + AsyncCardRefundsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) +from .card_reversals import ( + CardReversalsResource, + AsyncCardReversalsResource, + CardReversalsResourceWithRawResponse, + AsyncCardReversalsResourceWithRawResponse, + CardReversalsResourceWithStreamingResponse, + AsyncCardReversalsResourceWithStreamingResponse, ) -from ..._base_client import make_request_options from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, +) +from .card_increments import ( + CardIncrementsResource, + AsyncCardIncrementsResource, + CardIncrementsResourceWithRawResponse, + AsyncCardIncrementsResourceWithRawResponse, + CardIncrementsResourceWithStreamingResponse, + AsyncCardIncrementsResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, +) +from .card_settlements import ( + CardSettlementsResource, + AsyncCardSettlementsResource, + CardSettlementsResourceWithRawResponse, + AsyncCardSettlementsResourceWithRawResponse, + CardSettlementsResourceWithStreamingResponse, + AsyncCardSettlementsResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .interest_payments import ( - InterestPayments, - AsyncInterestPayments, - InterestPaymentsWithRawResponse, - AsyncInterestPaymentsWithRawResponse, - InterestPaymentsWithStreamingResponse, - AsyncInterestPaymentsWithStreamingResponse, + InterestPaymentsResource, + AsyncInterestPaymentsResource, + InterestPaymentsResourceWithRawResponse, + AsyncInterestPaymentsResourceWithRawResponse, + InterestPaymentsResourceWithStreamingResponse, + AsyncInterestPaymentsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, +) +from .card_authorizations import ( + CardAuthorizationsResource, + AsyncCardAuthorizationsResource, + CardAuthorizationsResourceWithRawResponse, + AsyncCardAuthorizationsResourceWithRawResponse, + CardAuthorizationsResourceWithStreamingResponse, + AsyncCardAuthorizationsResourceWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHolds, - AsyncInboundFundsHolds, - InboundFundsHoldsWithRawResponse, - AsyncInboundFundsHoldsWithRawResponse, - InboundFundsHoldsWithStreamingResponse, - AsyncInboundFundsHoldsWithStreamingResponse, + InboundFundsHoldsResource, + AsyncInboundFundsHoldsResource, + InboundFundsHoldsResourceWithRawResponse, + AsyncInboundFundsHoldsResourceWithRawResponse, + InboundFundsHoldsResourceWithStreamingResponse, + AsyncInboundFundsHoldsResourceWithStreamingResponse, +) +from .inbound_ach_transfers import ( + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) -from ...types.card_payment import CardPayment from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, +) +from .inbound_wire_transfers import ( + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, +) +from .card_fuel_confirmations import ( + CardFuelConfirmationsResource, + AsyncCardFuelConfirmationsResource, + CardFuelConfirmationsResourceWithRawResponse, + AsyncCardFuelConfirmationsResourceWithRawResponse, + CardFuelConfirmationsResourceWithStreamingResponse, + AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequests, - AsyncDigitalWalletTokenRequests, - DigitalWalletTokenRequestsWithRawResponse, - AsyncDigitalWalletTokenRequestsWithRawResponse, - DigitalWalletTokenRequestsWithStreamingResponse, - AsyncDigitalWalletTokenRequestsWithStreamingResponse, + DigitalWalletTokenRequestsResource, + AsyncDigitalWalletTokenRequestsResource, + DigitalWalletTokenRequestsResourceWithRawResponse, + AsyncDigitalWalletTokenRequestsResourceWithRawResponse, + DigitalWalletTokenRequestsResourceWithStreamingResponse, + AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, +) +from .card_authorization_expirations import ( + CardAuthorizationExpirationsResource, + AsyncCardAuthorizationExpirationsResource, + CardAuthorizationExpirationsResourceWithRawResponse, + AsyncCardAuthorizationExpirationsResourceWithRawResponse, + CardAuthorizationExpirationsResourceWithStreamingResponse, + AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfers, - AsyncInboundInternationalACHTransfers, - InboundInternationalACHTransfersWithRawResponse, - AsyncInboundInternationalACHTransfersWithRawResponse, - InboundInternationalACHTransfersWithStreamingResponse, - AsyncInboundInternationalACHTransfersWithStreamingResponse, +from .inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + InboundRealTimePaymentsTransfersResourceWithRawResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) -__all__ = ["Simulations", "AsyncSimulations"] +__all__ = ["SimulationsResource", "AsyncSimulationsResource"] -class Simulations(SyncAPIResource): +class SimulationsResource(SyncAPIResource): @cached_property - def account_transfers(self) -> AccountTransfers: - return AccountTransfers(self._client) + def account_transfers(self) -> AccountTransfersResource: + return AccountTransfersResource(self._client) @cached_property - def account_statements(self) -> AccountStatements: - return AccountStatements(self._client) + def inbound_ach_transfers(self) -> InboundACHTransfersResource: + return InboundACHTransfersResource(self._client) @cached_property - def ach_transfers(self) -> ACHTransfers: - return ACHTransfers(self._client) + def ach_transfers(self) -> ACHTransfersResource: + return ACHTransfersResource(self._client) @cached_property - def card_disputes(self) -> CardDisputes: - return CardDisputes(self._client) + def check_transfers(self) -> CheckTransfersResource: + return CheckTransfersResource(self._client) @cached_property - def card_refunds(self) -> CardRefunds: - return CardRefunds(self._client) + def inbound_check_deposits(self) -> InboundCheckDepositsResource: + return InboundCheckDepositsResource(self._client) @cached_property - def check_transfers(self) -> CheckTransfers: - return CheckTransfers(self._client) + def check_deposits(self) -> CheckDepositsResource: + return CheckDepositsResource(self._client) @cached_property - def documents(self) -> Documents: - return Documents(self._client) + def inbound_wire_transfers(self) -> InboundWireTransfersResource: + return InboundWireTransfersResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequests: - return DigitalWalletTokenRequests(self._client) + def wire_transfers(self) -> WireTransfersResource: + return WireTransfersResource(self._client) @cached_property - def check_deposits(self) -> CheckDeposits: - return CheckDeposits(self._client) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: + return InboundWireDrawdownRequestsResource(self._client) @cached_property - def programs(self) -> Programs: - return Programs(self._client) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: + return InboundRealTimePaymentsTransfersResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequests: - return InboundWireDrawdownRequests(self._client) + def inbound_funds_holds(self) -> InboundFundsHoldsResource: + return InboundFundsHoldsResource(self._client) @cached_property - def inbound_funds_holds(self) -> InboundFundsHolds: - return InboundFundsHolds(self._client) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: + return RealTimePaymentsTransfersResource(self._client) @cached_property - def interest_payments(self) -> InterestPayments: - return InterestPayments(self._client) + def card_authorizations(self) -> CardAuthorizationsResource: + return CardAuthorizationsResource(self._client) @cached_property - def wire_transfers(self) -> WireTransfers: - return WireTransfers(self._client) + def card_settlements(self) -> CardSettlementsResource: + return CardSettlementsResource(self._client) @cached_property - def cards(self) -> Cards: - return Cards(self._client) + def card_reversals(self) -> CardReversalsResource: + return CardReversalsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfers: - return RealTimePaymentsTransfers(self._client) + def card_increments(self) -> CardIncrementsResource: + return CardIncrementsResource(self._client) @cached_property - def physical_cards(self) -> PhysicalCards: - return PhysicalCards(self._client) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: + return CardAuthorizationExpirationsResource(self._client) @cached_property - def inbound_check_deposits(self) -> InboundCheckDeposits: - return InboundCheckDeposits(self._client) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: + return CardFuelConfirmationsResource(self._client) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfers: - return InboundInternationalACHTransfers(self._client) + def card_refunds(self) -> CardRefundsResource: + return CardRefundsResource(self._client) @cached_property - def with_raw_response(self) -> SimulationsWithRawResponse: - return SimulationsWithRawResponse(self) + def card_disputes(self) -> CardDisputesResource: + return CardDisputesResource(self._client) @cached_property - def with_streaming_response(self) -> SimulationsWithStreamingResponse: - return SimulationsWithStreamingResponse(self) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: + return DigitalWalletTokenRequestsResource(self._client) - def card_authorization_expirations( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_authorization_expirations", - body=maybe_transform( - {"card_payment_id": card_payment_id}, - simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def physical_cards(self) -> PhysicalCardsResource: + return PhysicalCardsResource(self._client) - def card_fuel_confirmations( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_fuel_confirmations", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def interest_payments(self) -> InterestPaymentsResource: + return InterestPaymentsResource(self._client) - def card_increments( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_increments", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - simulation_card_increments_params.SimulationCardIncrementsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def account_statements(self) -> AccountStatementsResource: + return AccountStatementsResource(self._client) - def card_reversals( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_reversals", - body=maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - simulation_card_reversals_params.SimulationCardReversalsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def documents(self) -> DocumentsResource: + return DocumentsResource(self._client) + @cached_property + def programs(self) -> ProgramsResource: + return ProgramsResource(self._client) -class AsyncSimulations(AsyncAPIResource): @cached_property - def account_transfers(self) -> AsyncAccountTransfers: - return AsyncAccountTransfers(self._client) + def with_raw_response(self) -> SimulationsResourceWithRawResponse: + return SimulationsResourceWithRawResponse(self) @cached_property - def account_statements(self) -> AsyncAccountStatements: - return AsyncAccountStatements(self._client) + def with_streaming_response(self) -> SimulationsResourceWithStreamingResponse: + return SimulationsResourceWithStreamingResponse(self) + +class AsyncSimulationsResource(AsyncAPIResource): @cached_property - def ach_transfers(self) -> AsyncACHTransfers: - return AsyncACHTransfers(self._client) + def account_transfers(self) -> AsyncAccountTransfersResource: + return AsyncAccountTransfersResource(self._client) @cached_property - def card_disputes(self) -> AsyncCardDisputes: - return AsyncCardDisputes(self._client) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: + return AsyncInboundACHTransfersResource(self._client) @cached_property - def card_refunds(self) -> AsyncCardRefunds: - return AsyncCardRefunds(self._client) + def ach_transfers(self) -> AsyncACHTransfersResource: + return AsyncACHTransfersResource(self._client) @cached_property - def check_transfers(self) -> AsyncCheckTransfers: - return AsyncCheckTransfers(self._client) + def check_transfers(self) -> AsyncCheckTransfersResource: + return AsyncCheckTransfersResource(self._client) @cached_property - def documents(self) -> AsyncDocuments: - return AsyncDocuments(self._client) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: + return AsyncInboundCheckDepositsResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequests: - return AsyncDigitalWalletTokenRequests(self._client) + def check_deposits(self) -> AsyncCheckDepositsResource: + return AsyncCheckDepositsResource(self._client) @cached_property - def check_deposits(self) -> AsyncCheckDeposits: - return AsyncCheckDeposits(self._client) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: + return AsyncInboundWireTransfersResource(self._client) @cached_property - def programs(self) -> AsyncPrograms: - return AsyncPrograms(self._client) + def wire_transfers(self) -> AsyncWireTransfersResource: + return AsyncWireTransfersResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequests: - return AsyncInboundWireDrawdownRequests(self._client) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: + return AsyncInboundWireDrawdownRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHolds: - return AsyncInboundFundsHolds(self._client) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: + return AsyncInboundRealTimePaymentsTransfersResource(self._client) @cached_property - def interest_payments(self) -> AsyncInterestPayments: - return AsyncInterestPayments(self._client) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: + return AsyncInboundFundsHoldsResource(self._client) @cached_property - def wire_transfers(self) -> AsyncWireTransfers: - return AsyncWireTransfers(self._client) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: + return AsyncRealTimePaymentsTransfersResource(self._client) @cached_property - def cards(self) -> AsyncCards: - return AsyncCards(self._client) + def card_authorizations(self) -> AsyncCardAuthorizationsResource: + return AsyncCardAuthorizationsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfers: - return AsyncRealTimePaymentsTransfers(self._client) + def card_settlements(self) -> AsyncCardSettlementsResource: + return AsyncCardSettlementsResource(self._client) @cached_property - def physical_cards(self) -> AsyncPhysicalCards: - return AsyncPhysicalCards(self._client) + def card_reversals(self) -> AsyncCardReversalsResource: + return AsyncCardReversalsResource(self._client) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: - return AsyncInboundCheckDeposits(self._client) + def card_increments(self) -> AsyncCardIncrementsResource: + return AsyncCardIncrementsResource(self._client) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfers: - return AsyncInboundInternationalACHTransfers(self._client) + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: + return AsyncCardAuthorizationExpirationsResource(self._client) @cached_property - def with_raw_response(self) -> AsyncSimulationsWithRawResponse: - return AsyncSimulationsWithRawResponse(self) + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: + return AsyncCardFuelConfirmationsResource(self._client) @cached_property - def with_streaming_response(self) -> AsyncSimulationsWithStreamingResponse: - return AsyncSimulationsWithStreamingResponse(self) + def card_refunds(self) -> AsyncCardRefundsResource: + return AsyncCardRefundsResource(self._client) - async def card_authorization_expirations( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_authorization_expirations", - body=await async_maybe_transform( - {"card_payment_id": card_payment_id}, - simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResource: + return AsyncCardDisputesResource(self._client) - async def card_fuel_confirmations( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_fuel_confirmations", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResource: + return AsyncDigitalWalletTokenRequestsResource(self._client) - async def card_increments( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_increments", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - simulation_card_increments_params.SimulationCardIncrementsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResource: + return AsyncPhysicalCardsResource(self._client) - async def card_reversals( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_reversals", - body=await async_maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - simulation_card_reversals_params.SimulationCardReversalsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResource: + return AsyncInterestPaymentsResource(self._client) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResource: + return AsyncAccountStatementsResource(self._client) + + @cached_property + def documents(self) -> AsyncDocumentsResource: + return AsyncDocumentsResource(self._client) + + @cached_property + def programs(self) -> AsyncProgramsResource: + return AsyncProgramsResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: + return AsyncSimulationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSimulationsResourceWithStreamingResponse: + return AsyncSimulationsResourceWithStreamingResponse(self) -class SimulationsWithRawResponse: - def __init__(self, simulations: Simulations) -> None: +class SimulationsResourceWithRawResponse: + def __init__(self, simulations: SimulationsResource) -> None: self._simulations = simulations - self.card_authorization_expirations = _legacy_response.to_raw_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = _legacy_response.to_raw_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = _legacy_response.to_raw_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = _legacy_response.to_raw_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def account_transfers(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def account_transfers(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self._simulations.account_transfers) + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) @cached_property - def account_statements(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self._simulations.account_statements) + def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def ach_transfers(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self._simulations.ach_transfers) + def check_transfers(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def card_disputes(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self._simulations.card_disputes) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def card_refunds(self) -> CardRefundsWithRawResponse: - return CardRefundsWithRawResponse(self._simulations.card_refunds) + def check_deposits(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def check_transfers(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self._simulations.check_transfers) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def documents(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self._simulations.documents) + def wire_transfers(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithRawResponse: - return DigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def check_deposits(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self._simulations.check_deposits) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def programs(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self._simulations.programs) + def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: + return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsWithRawResponse: - return InboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) + def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: + return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def interest_payments(self) -> InterestPaymentsWithRawResponse: - return InterestPaymentsWithRawResponse(self._simulations.interest_payments) + def card_settlements(self) -> CardSettlementsResourceWithRawResponse: + return CardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @cached_property - def wire_transfers(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self._simulations.wire_transfers) + def card_reversals(self) -> CardReversalsResourceWithRawResponse: + return CardReversalsResourceWithRawResponse(self._simulations.card_reversals) @cached_property - def cards(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self._simulations.cards) + def card_increments(self) -> CardIncrementsResourceWithRawResponse: + return CardIncrementsResourceWithRawResponse(self._simulations.card_increments) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) @cached_property - def physical_cards(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self._simulations.physical_cards) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawResponse: + return CardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + def card_refunds(self) -> CardRefundsResourceWithRawResponse: + return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithRawResponse: - return InboundInternationalACHTransfersWithRawResponse(self._simulations.inbound_international_ach_transfers) + def card_disputes(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) -class AsyncSimulationsWithRawResponse: - def __init__(self, simulations: AsyncSimulations) -> None: - self._simulations = simulations + @cached_property + def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) - self.card_authorization_expirations = _legacy_response.async_to_raw_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = _legacy_response.async_to_raw_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = _legacy_response.async_to_raw_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = _legacy_response.async_to_raw_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: + return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self._simulations.account_statements) @cached_property - def account_transfers(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self._simulations.account_transfers) + def documents(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self._simulations.documents) @cached_property - def account_statements(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self._simulations.account_statements) + def programs(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self._simulations.programs) + + +class AsyncSimulationsResourceWithRawResponse: + def __init__(self, simulations: AsyncSimulationsResource) -> None: + self._simulations = simulations @cached_property - def ach_transfers(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self._simulations.ach_transfers) + def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def card_disputes(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self._simulations.card_disputes) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) @cached_property - def card_refunds(self) -> AsyncCardRefundsWithRawResponse: - return AsyncCardRefundsWithRawResponse(self._simulations.card_refunds) + def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def check_transfers(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self._simulations.check_transfers) + def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def documents(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self._simulations.documents) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: - return AsyncDigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) + def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def check_deposits(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self._simulations.check_deposits) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def programs(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self._simulations.programs) + def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithRawResponse: - return AsyncInboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsWithRawResponse: - return AsyncInterestPaymentsWithRawResponse(self._simulations.interest_payments) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def wire_transfers(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self._simulations.wire_transfers) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def cards(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self._simulations.cards) + def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) + def card_settlements(self) -> AsyncCardSettlementsResourceWithRawResponse: + return AsyncCardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self._simulations.physical_cards) + def card_reversals(self) -> AsyncCardReversalsResourceWithRawResponse: + return AsyncCardReversalsResourceWithRawResponse(self._simulations.card_reversals) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + def card_increments(self) -> AsyncCardIncrementsResourceWithRawResponse: + return AsyncCardIncrementsResourceWithRawResponse(self._simulations.card_increments) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: - return AsyncInboundInternationalACHTransfersWithRawResponse( - self._simulations.inbound_international_ach_transfers + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + return AsyncCardAuthorizationExpirationsResourceWithRawResponse( + self._simulations.card_authorization_expirations ) + @cached_property + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: + return AsyncCardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) -class SimulationsWithStreamingResponse: - def __init__(self, simulations: Simulations) -> None: - self._simulations = simulations + @cached_property + def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: + return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) - self.card_authorization_expirations = to_streamed_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = to_streamed_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = to_streamed_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = to_streamed_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) + + @cached_property + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) + + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: + return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) @cached_property - def account_transfers(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self._simulations.account_transfers) + def documents(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) @cached_property - def account_statements(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self._simulations.account_statements) + def programs(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self._simulations.programs) + + +class SimulationsResourceWithStreamingResponse: + def __init__(self, simulations: SimulationsResource) -> None: + self._simulations = simulations @cached_property - def ach_transfers(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self._simulations.ach_transfers) + def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) @cached_property - def card_disputes(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self._simulations.card_disputes) + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) @cached_property - def card_refunds(self) -> CardRefundsWithStreamingResponse: - return CardRefundsWithStreamingResponse(self._simulations.card_refunds) + def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def check_transfers(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self._simulations.check_transfers) + def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) @cached_property - def documents(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self._simulations.documents) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithStreamingResponse: - return DigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) + def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property - def check_deposits(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self._simulations.check_deposits) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) @cached_property - def programs(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self._simulations.programs) + def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsWithStreamingResponse: - return InboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def interest_payments(self) -> InterestPaymentsWithStreamingResponse: - return InterestPaymentsWithStreamingResponse(self._simulations.interest_payments) + def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: + return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def wire_transfers(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self._simulations.wire_transfers) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) @cached_property - def cards(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self._simulations.cards) + def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: + return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) + def card_settlements(self) -> CardSettlementsResourceWithStreamingResponse: + return CardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @cached_property - def physical_cards(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + def card_reversals(self) -> CardReversalsResourceWithStreamingResponse: + return CardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + def card_increments(self) -> CardIncrementsResourceWithStreamingResponse: + return CardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithStreamingResponse: - return InboundInternationalACHTransfersWithStreamingResponse( - self._simulations.inbound_international_ach_transfers + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + return CardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations ) + @cached_property + def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingResponse: + return CardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) + + @cached_property + def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: + return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + + @cached_property + def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) + + @cached_property + def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: + return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + + @cached_property + def documents(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self._simulations.documents) + + @cached_property + def programs(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self._simulations.programs) + -class AsyncSimulationsWithStreamingResponse: - def __init__(self, simulations: AsyncSimulations) -> None: +class AsyncSimulationsResourceWithStreamingResponse: + def __init__(self, simulations: AsyncSimulationsResource) -> None: self._simulations = simulations - self.card_authorization_expirations = async_to_streamed_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = async_to_streamed_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = async_to_streamed_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = async_to_streamed_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + + @cached_property + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) @cached_property - def account_transfers(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self._simulations.account_transfers) + def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def account_statements(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self._simulations.account_statements) + def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) @cached_property - def ach_transfers(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self._simulations.ach_transfers) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def card_disputes(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self._simulations.card_disputes) + def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property - def card_refunds(self) -> AsyncCardRefundsWithStreamingResponse: - return AsyncCardRefundsWithStreamingResponse(self._simulations.card_refunds) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) @cached_property - def check_transfers(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self._simulations.check_transfers) + def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def documents(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self._simulations.documents) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) + def inbound_real_time_payments_transfers( + self, + ) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def check_deposits(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self._simulations.check_deposits) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def programs(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self._simulations.programs) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.real_time_payments_transfers + ) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) + def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: + return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithStreamingResponse: - return AsyncInboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) + def card_settlements(self) -> AsyncCardSettlementsResourceWithStreamingResponse: + return AsyncCardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsWithStreamingResponse: - return AsyncInterestPaymentsWithStreamingResponse(self._simulations.interest_payments) + def card_reversals(self) -> AsyncCardReversalsResourceWithStreamingResponse: + return AsyncCardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) @cached_property - def wire_transfers(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self._simulations.wire_transfers) + def card_increments(self) -> AsyncCardIncrementsResourceWithStreamingResponse: + return AsyncCardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) @cached_property - def cards(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self._simulations.cards) + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations + ) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: + return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: + return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: - return AsyncInboundInternationalACHTransfersWithStreamingResponse( - self._simulations.inbound_international_ach_transfers + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse( + self._simulations.digital_wallet_token_requests ) + + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + + @cached_property + def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + + @cached_property + def programs(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 66fcba3dc..9cece56fc 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -4,50 +4,34 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import wire_transfer_create_inbound_params -from ...types.inbound_wire_transfer import InboundWireTransfer +from ...types.wire_transfer import WireTransfer -__all__ = ["WireTransfers", "AsyncWireTransfers"] +__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] -class WireTransfers(SyncAPIResource): +class WireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self) + def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self) - def create_inbound( + def reverse( self, + wire_transfer_id: str, *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -55,56 +39,59 @@ def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundWireTransfer: + ) -> WireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. - - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + extra_headers: Send extra headers - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + extra_query: Add additional query parameters to the request - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. + extra_body: Add additional JSON properties to the request - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. + timeout: Override the client-level default timeout for this request, in seconds - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. extra_headers: Send extra headers @@ -116,29 +103,10 @@ def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - "/simulations/inbound_wire_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - }, - wire_transfer_create_inbound_params.WireTransferCreateInboundParams, - ), + f"/simulations/wire_transfers/{wire_transfer_id}/submit", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -146,38 +114,23 @@ def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundWireTransfer, + cast_to=WireTransfer, ) -class AsyncWireTransfers(AsyncAPIResource): +class AsyncWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self) - async def create_inbound( + async def reverse( self, + wire_transfer_id: str, *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -185,56 +138,59 @@ async def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundWireTransfer: + ) -> WireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. - - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + extra_headers: Send extra headers - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + extra_query: Add additional query parameters to the request - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. + extra_body: Add additional JSON properties to the request - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. + timeout: Override the client-level default timeout for this request, in seconds - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return await self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + async def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. extra_headers: Send extra headers @@ -246,29 +202,10 @@ async def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - "/simulations/inbound_wire_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - }, - wire_transfer_create_inbound_params.WireTransferCreateInboundParams, - ), + f"/simulations/wire_transfers/{wire_transfer_id}/submit", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -276,41 +213,53 @@ async def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundWireTransfer, + cast_to=WireTransfer, ) -class WireTransfersWithRawResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = _legacy_response.to_raw_response_wrapper( - wire_transfers.create_inbound, + self.reverse = to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = to_raw_response_wrapper( + wire_transfers.submit, ) -class AsyncWireTransfersWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.create_inbound, + self.reverse = async_to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = async_to_raw_response_wrapper( + wire_transfers.submit, ) -class WireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = to_streamed_response_wrapper( - wire_transfers.create_inbound, + self.reverse = to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = to_streamed_response_wrapper( + wire_transfers.submit, ) -class AsyncWireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = async_to_streamed_response_wrapper( - wire_transfers.create_inbound, + self.reverse = async_to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = async_to_streamed_response_wrapper( + wire_transfers.submit, ) diff --git a/src/increase/resources/entities/supplemental_documents.py b/src/increase/resources/supplemental_documents.py similarity index 75% rename from src/increase/resources/entities/supplemental_documents.py rename to src/increase/resources/supplemental_documents.py index 8cadca695..1ce6adbaa 100644 --- a/src/increase/resources/entities/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -4,37 +4,40 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import supplemental_document_list_params, supplemental_document_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.entity import Entity -from ...types.entities import supplemental_document_list_params, supplemental_document_create_params -from ...types.entities.supplemental_document import SupplementalDocument +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity_supplemental_document import EntitySupplementalDocument -__all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments"] +__all__ = ["SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource"] -class SupplementalDocuments(SyncAPIResource): +class SupplementalDocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> SupplementalDocumentsWithRawResponse: - return SupplementalDocumentsWithRawResponse(self) + def with_raw_response(self) -> SupplementalDocumentsResourceWithRawResponse: + return SupplementalDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> SupplementalDocumentsWithStreamingResponse: - return SupplementalDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> SupplementalDocumentsResourceWithStreamingResponse: + return SupplementalDocumentsResourceWithStreamingResponse(self) def create( self, - entity_id: str, *, + entity_id: str, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -43,7 +46,7 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> Entity: + ) -> EntitySupplementalDocument: """ Create a supplemental document for an Entity @@ -62,12 +65,14 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/supplemental_documents", + "/entity_supplemental_documents", body=maybe_transform( - {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams + { + "entity_id": entity_id, + "file_id": file_id, + }, + supplemental_document_create_params.SupplementalDocumentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -76,7 +81,7 @@ def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Entity, + cast_to=EntitySupplementalDocument, ) def list( @@ -92,7 +97,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[SupplementalDocument]: + ) -> SyncPage[EntitySupplementalDocument]: """ List Entity Supplemental Document Submissions @@ -119,7 +124,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=SyncPage[SupplementalDocument], + page=SyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,23 +140,23 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=SupplementalDocument, + model=EntitySupplementalDocument, ) -class AsyncSupplementalDocuments(AsyncAPIResource): +class AsyncSupplementalDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncSupplementalDocumentsWithRawResponse: - return AsyncSupplementalDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncSupplementalDocumentsResourceWithRawResponse: + return AsyncSupplementalDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncSupplementalDocumentsWithStreamingResponse: - return AsyncSupplementalDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncSupplementalDocumentsResourceWithStreamingResponse: + return AsyncSupplementalDocumentsResourceWithStreamingResponse(self) async def create( self, - entity_id: str, *, + entity_id: str, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -160,7 +165,7 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> Entity: + ) -> EntitySupplementalDocument: """ Create a supplemental document for an Entity @@ -179,12 +184,14 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/supplemental_documents", + "/entity_supplemental_documents", body=await async_maybe_transform( - {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams + { + "entity_id": entity_id, + "file_id": file_id, + }, + supplemental_document_create_params.SupplementalDocumentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -193,7 +200,7 @@ async def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Entity, + cast_to=EntitySupplementalDocument, ) def list( @@ -209,7 +216,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[SupplementalDocument, AsyncPage[SupplementalDocument]]: + ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: """ List Entity Supplemental Document Submissions @@ -236,7 +243,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=AsyncPage[SupplementalDocument], + page=AsyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -252,36 +259,36 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=SupplementalDocument, + model=EntitySupplementalDocument, ) -class SupplementalDocumentsWithRawResponse: - def __init__(self, supplemental_documents: SupplementalDocuments) -> None: +class SupplementalDocumentsResourceWithRawResponse: + def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( supplemental_documents.create, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( supplemental_documents.list, ) -class AsyncSupplementalDocumentsWithRawResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: +class AsyncSupplementalDocumentsResourceWithRawResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( supplemental_documents.create, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( supplemental_documents.list, ) -class SupplementalDocumentsWithStreamingResponse: - def __init__(self, supplemental_documents: SupplementalDocuments) -> None: +class SupplementalDocumentsResourceWithStreamingResponse: + def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents self.create = to_streamed_response_wrapper( @@ -292,8 +299,8 @@ def __init__(self, supplemental_documents: SupplementalDocuments) -> None: ) -class AsyncSupplementalDocumentsWithStreamingResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: +class AsyncSupplementalDocumentsResourceWithStreamingResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index cba7da871..029e2d703 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.transaction import Transaction -__all__ = ["Transactions", "AsyncTransactions"] +__all__ = ["TransactionsResource", "AsyncTransactionsResource"] -class Transactions(SyncAPIResource): +class TransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> TransactionsWithRawResponse: - return TransactionsWithRawResponse(self) + def with_raw_response(self) -> TransactionsResourceWithRawResponse: + return TransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> TransactionsWithStreamingResponse: - return TransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> TransactionsResourceWithStreamingResponse: + return TransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -124,14 +128,14 @@ def list( ) -class AsyncTransactions(AsyncAPIResource): +class AsyncTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncTransactionsWithRawResponse: - return AsyncTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncTransactionsResourceWithRawResponse: + return AsyncTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncTransactionsWithStreamingResponse: - return AsyncTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncTransactionsResourceWithStreamingResponse: + return AsyncTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -230,32 +234,32 @@ def list( ) -class TransactionsWithRawResponse: - def __init__(self, transactions: Transactions) -> None: +class TransactionsResourceWithRawResponse: + def __init__(self, transactions: TransactionsResource) -> None: self._transactions = transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( transactions.list, ) -class AsyncTransactionsWithRawResponse: - def __init__(self, transactions: AsyncTransactions) -> None: +class AsyncTransactionsResourceWithRawResponse: + def __init__(self, transactions: AsyncTransactionsResource) -> None: self._transactions = transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( transactions.list, ) -class TransactionsWithStreamingResponse: - def __init__(self, transactions: Transactions) -> None: +class TransactionsResourceWithStreamingResponse: + def __init__(self, transactions: TransactionsResource) -> None: self._transactions = transactions self.retrieve = to_streamed_response_wrapper( @@ -266,8 +270,8 @@ def __init__(self, transactions: Transactions) -> None: ) -class AsyncTransactionsWithStreamingResponse: - def __init__(self, transactions: AsyncTransactions) -> None: +class AsyncTransactionsResourceWithStreamingResponse: + def __init__(self, transactions: AsyncTransactionsResource) -> None: self._transactions = transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 473aeb874..ccbc2de1a 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest -__all__ = ["WireDrawdownRequests", "AsyncWireDrawdownRequests"] +__all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] -class WireDrawdownRequests(SyncAPIResource): +class WireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireDrawdownRequestsWithRawResponse: - return WireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: + return WireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireDrawdownRequestsWithStreamingResponse: - return WireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> WireDrawdownRequestsResourceWithStreamingResponse: + return WireDrawdownRequestsResourceWithStreamingResponse(self) def create( self, @@ -238,14 +242,14 @@ def list( ) -class AsyncWireDrawdownRequests(AsyncAPIResource): +class AsyncWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireDrawdownRequestsWithRawResponse: - return AsyncWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: + return AsyncWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireDrawdownRequestsWithStreamingResponse: - return AsyncWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( self, @@ -453,38 +457,38 @@ def list( ) -class WireDrawdownRequestsWithRawResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: +class WireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( wire_drawdown_requests.list, ) -class AsyncWireDrawdownRequestsWithRawResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: +class AsyncWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( wire_drawdown_requests.list, ) -class WireDrawdownRequestsWithStreamingResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: +class WireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -498,8 +502,8 @@ def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: ) -class AsyncWireDrawdownRequestsWithStreamingResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: +class AsyncWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 2e90dd06f..90d041e0e 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_transfer import WireTransfer -__all__ = ["WireTransfers", "AsyncWireTransfers"] +__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] -class WireTransfers(SyncAPIResource): +class WireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self) + def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self) def create( self, @@ -322,104 +326,15 @@ def cancel( cast_to=WireTransfer, ) - def reverse( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - -class AsyncWireTransfers(AsyncAPIResource): +class AsyncWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self) async def create( self, @@ -713,152 +628,51 @@ async def cancel( cast_to=WireTransfer, ) - async def reverse( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - async def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - -class WireTransfersWithRawResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( wire_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( wire_transfers.cancel, ) - self.reverse = _legacy_response.to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = _legacy_response.to_raw_response_wrapper( - wire_transfers.submit, - ) -class AsyncWireTransfersWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( wire_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( wire_transfers.cancel, ) - self.reverse = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.submit, - ) -class WireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers self.create = to_streamed_response_wrapper( @@ -876,16 +690,10 @@ def __init__(self, wire_transfers: WireTransfers) -> None: self.cancel = to_streamed_response_wrapper( wire_transfers.cancel, ) - self.reverse = to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = to_streamed_response_wrapper( - wire_transfers.submit, - ) -class AsyncWireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers self.create = async_to_streamed_response_wrapper( @@ -903,9 +711,3 @@ def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self.cancel = async_to_streamed_response_wrapper( wire_transfers.cancel, ) - self.reverse = async_to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = async_to_streamed_response_wrapper( - wire_transfers.submit, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c643cfabc..412ea7621 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -18,14 +18,13 @@ from .card_details import CardDetails as CardDetails from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment -from .lockbox_list import LockboxList as LockboxList from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard from .wire_transfer import WireTransfer as WireTransfer from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer -from .routing_number import RoutingNumber as RoutingNumber +from .intrafi_balance import IntrafiBalance as IntrafiBalance from .account_transfer import AccountTransfer as AccountTransfer from .card_list_params import CardListParams as CardListParams from .external_account import ExternalAccount as ExternalAccount @@ -35,6 +34,7 @@ from .bookkeeping_entry import BookkeepingEntry as BookkeepingEntry from .event_list_params import EventListParams as EventListParams from .inbound_mail_item import InboundMailItem as InboundMailItem +from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams @@ -66,7 +66,6 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams -from .inbound_mail_item_list import InboundMailItemList as InboundMailItemList from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams @@ -81,6 +80,7 @@ from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams +from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams @@ -91,13 +91,16 @@ from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams +from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams +from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest +from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams @@ -105,6 +108,7 @@ from .proof_of_authorization_request import ProofOfAuthorizationRequest as ProofOfAuthorizationRequest from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams +from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams @@ -113,7 +117,6 @@ from .event_subscription_update_params import EventSubscriptionUpdateParams as EventSubscriptionUpdateParams from .inbound_ach_transfer_list_params import InboundACHTransferListParams as InboundACHTransferListParams from .real_time_decision_action_params import RealTimeDecisionActionParams as RealTimeDecisionActionParams -from .simulation_card_reversals_params import SimulationCardReversalsParams as SimulationCardReversalsParams from .ach_prenotification_create_params import ACHPrenotificationCreateParams as ACHPrenotificationCreateParams from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams @@ -122,22 +125,37 @@ from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams -from .simulation_card_increments_params import SimulationCardIncrementsParams as SimulationCardIncrementsParams +from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams +from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams +from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams +from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams +from .entity_create_beneficial_owner_params import ( + EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, +) +from .entity_archive_beneficial_owner_params import ( + EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, +) +from .intrafi_account_enrollment_list_params import ( + IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, +) from .real_time_payments_request_for_payment import ( RealTimePaymentsRequestForPayment as RealTimePaymentsRequestForPayment, ) from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) +from .intrafi_account_enrollment_create_params import ( + IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, +) from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) @@ -147,20 +165,14 @@ from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) -from .simulation_card_fuel_confirmations_params import ( - SimulationCardFuelConfirmationsParams as SimulationCardFuelConfirmationsParams, -) from .proof_of_authorization_request_list_params import ( ProofOfAuthorizationRequestListParams as ProofOfAuthorizationRequestListParams, ) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) -from .simulation_card_authorization_expirations_params import ( - SimulationCardAuthorizationExpirationsParams as SimulationCardAuthorizationExpirationsParams, -) -from .inbound_ach_transfer_notification_of_change_params import ( - InboundACHTransferNotificationOfChangeParams as InboundACHTransferNotificationOfChangeParams, +from .entity_update_beneficial_owner_address_params import ( + EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, ) from .real_time_payments_request_for_payment_list_params import ( RealTimePaymentsRequestForPaymentListParams as RealTimePaymentsRequestForPaymentListParams, @@ -174,3 +186,6 @@ from .proof_of_authorization_request_submission_create_params import ( ProofOfAuthorizationRequestSubmissionCreateParams as ProofOfAuthorizationRequestSubmissionCreateParams, ) +from .inbound_ach_transfer_create_notification_of_change_params import ( + InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, +) diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9fe9fc08b..689b6cd4d 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -20,7 +20,6 @@ "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", - "SourceInternationalACHDecline", "SourceWireDecline", ] @@ -656,252 +655,6 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The Real-Time Payments network identification of the declined transfer.""" -class SourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -946,7 +699,6 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", @@ -964,8 +716,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -995,13 +745,6 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ - international_ach_decline: Optional[SourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index e79abff89..0a4ca27b8 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,7 +41,6 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/entities/__init__.py b/src/increase/types/entities/__init__.py deleted file mode 100644 index e7b6ad184..000000000 --- a/src/increase/types/entities/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .supplemental_document import SupplementalDocument as SupplementalDocument -from .industry_code_create_params import IndustryCodeCreateParams as IndustryCodeCreateParams -from .beneficial_owner_create_params import BeneficialOwnerCreateParams as BeneficialOwnerCreateParams -from .beneficial_owner_archive_params import BeneficialOwnerArchiveParams as BeneficialOwnerArchiveParams -from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams -from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams -from .beneficial_owner_update_address_params import ( - BeneficialOwnerUpdateAddressParams as BeneficialOwnerUpdateAddressParams, -) diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 7f0974807..afeb6da56 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -5,6 +5,7 @@ from typing_extensions import Literal from .._models import BaseModel +from .entity_supplemental_document import EntitySupplementalDocument __all__ = [ "Entity", @@ -24,7 +25,6 @@ "NaturalPerson", "NaturalPersonAddress", "NaturalPersonIdentification", - "SupplementalDocument", "Trust", "TrustAddress", "TrustGrantor", @@ -333,31 +333,6 @@ class NaturalPerson(BaseModel): """The person's legal name.""" -class SupplementalDocument(BaseModel): - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - Supplemental Document was created. - """ - - file_id: str - """The File containing the document.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - type: Literal["entity_supplemental_document"] - """A constant representing the object's type. - - For this resource it will always be `entity_supplemental_document`. - """ - - class TrustAddress(BaseModel): city: str """The city of the address.""" @@ -606,7 +581,7 @@ class Entity(BaseModel): - `government_authority` - A government authority. """ - supplemental_documents: List[SupplementalDocument] + supplemental_documents: List[EntitySupplementalDocument] """Additional documentation associated with the entity. This is limited to the first 10 documents for an entity. If an entity has more diff --git a/src/increase/types/entities/beneficial_owner_archive_params.py b/src/increase/types/entity_archive_beneficial_owner_params.py similarity index 63% rename from src/increase/types/entities/beneficial_owner_archive_params.py rename to src/increase/types/entity_archive_beneficial_owner_params.py index cd13deb9c..d430cf7e4 100644 --- a/src/increase/types/entities/beneficial_owner_archive_params.py +++ b/src/increase/types/entity_archive_beneficial_owner_params.py @@ -4,15 +4,12 @@ from typing_extensions import Required, TypedDict -__all__ = ["BeneficialOwnerArchiveParams"] +__all__ = ["EntityArchiveBeneficialOwnerParams"] -class BeneficialOwnerArchiveParams(TypedDict, total=False): +class EntityArchiveBeneficialOwnerParams(TypedDict, total=False): beneficial_owner_id: Required[str] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ - - entity_id: Required[str] - """The identifier of the Entity to retrieve.""" diff --git a/src/increase/types/entities/beneficial_owner_create_params.py b/src/increase/types/entity_create_beneficial_owner_params.py similarity index 95% rename from src/increase/types/entities/beneficial_owner_create_params.py rename to src/increase/types/entity_create_beneficial_owner_params.py index 1aee87eff..7c95dc04b 100644 --- a/src/increase/types/entities/beneficial_owner_create_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -6,10 +6,10 @@ from datetime import date from typing_extensions import Literal, Required, Annotated, TypedDict -from ..._utils import PropertyInfo +from .._utils import PropertyInfo __all__ = [ - "BeneficialOwnerCreateParams", + "EntityCreateBeneficialOwnerParams", "BeneficialOwner", "BeneficialOwnerIndividual", "BeneficialOwnerIndividualAddress", @@ -20,16 +20,13 @@ ] -class BeneficialOwnerCreateParams(TypedDict, total=False): +class EntityCreateBeneficialOwnerParams(TypedDict, total=False): beneficial_owner: Required[BeneficialOwner] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ - entity_id: Required[str] - """The identifier of the Entity to associate with the new Beneficial Owner.""" - class BeneficialOwnerIndividualAddress(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entities/supplemental_document.py b/src/increase/types/entity_supplemental_document.py similarity index 81% rename from src/increase/types/entities/supplemental_document.py rename to src/increase/types/entity_supplemental_document.py index fbee31bb4..695107f9d 100644 --- a/src/increase/types/entities/supplemental_document.py +++ b/src/increase/types/entity_supplemental_document.py @@ -4,18 +4,21 @@ from datetime import datetime from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel -__all__ = ["SupplementalDocument"] +__all__ = ["EntitySupplementalDocument"] -class SupplementalDocument(BaseModel): +class EntitySupplementalDocument(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Supplemental Document was created. """ + entity_id: str + """The Entity the supplemental document is attached to.""" + file_id: str """The File containing the document.""" diff --git a/src/increase/types/entities/beneficial_owner_update_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py similarity index 82% rename from src/increase/types/entities/beneficial_owner_update_address_params.py rename to src/increase/types/entity_update_beneficial_owner_address_params.py index 00db2088a..862389978 100644 --- a/src/increase/types/entities/beneficial_owner_update_address_params.py +++ b/src/increase/types/entity_update_beneficial_owner_address_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["BeneficialOwnerUpdateAddressParams", "Address"] +__all__ = ["EntityUpdateBeneficialOwnerAddressParams", "Address"] -class BeneficialOwnerUpdateAddressParams(TypedDict, total=False): +class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): address: Required[Address] """The individual's physical address. @@ -20,9 +20,6 @@ class BeneficialOwnerUpdateAddressParams(TypedDict, total=False): corporation. """ - entity_id: Required[str] - """The identifier of the Entity to retrieve.""" - class Address(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entities/industry_code_create_params.py b/src/increase/types/entity_update_industry_code_params.py similarity index 84% rename from src/increase/types/entities/industry_code_create_params.py rename to src/increase/types/entity_update_industry_code_params.py index 254bbbf3e..7843d7137 100644 --- a/src/increase/types/entities/industry_code_create_params.py +++ b/src/increase/types/entity_update_industry_code_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["IndustryCodeCreateParams"] +__all__ = ["EntityUpdateIndustryCodeParams"] -class IndustryCodeCreateParams(TypedDict, total=False): +class EntityUpdateIndustryCodeParams(TypedDict, total=False): industry_code: Required[str] """ The North American Industry Classification System (NAICS) code for the diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 237b1b61a..12f7c5d90 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -13,6 +13,7 @@ "AddendaFreeform", "AddendaFreeformEntry", "Decline", + "InternationalAddenda", "NotificationOfChange", "TransferReturn", ] @@ -98,6 +99,234 @@ class Decline(BaseModel): """ +class InternationalAddenda(BaseModel): + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + class NotificationOfChange(BaseModel): updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -184,6 +413,12 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ + international_addenda: Optional[InternationalAddenda] = None + """ + If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will + contain fields pertaining to the International ACH Transaction. + """ + notification_of_change: Optional[NotificationOfChange] = None """ If you initiate a notification of change in response to the transfer, this will @@ -233,6 +468,7 @@ class InboundACHTransfer(BaseModel): "point_of_purchase", "check_truncation", "destroyed_check", + "international_ach_transaction", ] """The Standard Entry Class (SEC) code of the transfer. @@ -251,6 +487,7 @@ class InboundACHTransfer(BaseModel): - `point_of_purchase` - Point of Purchase (POP). - `check_truncation` - Check Truncation (TRC). - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). """ status: Literal["pending", "declined", "accepted", "returned"] diff --git a/src/increase/types/inbound_ach_transfer_notification_of_change_params.py b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py similarity index 72% rename from src/increase/types/inbound_ach_transfer_notification_of_change_params.py rename to src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py index 239820edc..73920dc71 100644 --- a/src/increase/types/inbound_ach_transfer_notification_of_change_params.py +++ b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["InboundACHTransferNotificationOfChangeParams"] +__all__ = ["InboundACHTransferCreateNotificationOfChangeParams"] -class InboundACHTransferNotificationOfChangeParams(TypedDict, total=False): +class InboundACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): updated_account_number: str """The updated account number to send in the notification of change.""" diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 44ae731ff..b75b6e5a5 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,6 +10,14 @@ class DepositReturn(BaseModel): + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] + """The reason the deposit was returned. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ + returned_at: datetime """The time at which the deposit was returned.""" @@ -98,12 +106,13 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined"] + status: Literal["pending", "accepted", "declined", "returned"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. + - `returned` - The Inbound Check Deposit was returned. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py new file mode 100644 index 000000000..169cc55aa --- /dev/null +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundCheckDepositReturnParams"] + + +class InboundCheckDepositReturnParams(TypedDict, total=False): + reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] + """The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ diff --git a/src/increase/types/inbound_mail_item_list.py b/src/increase/types/inbound_mail_item_list.py deleted file mode 100644 index 5831477ec..000000000 --- a/src/increase/types/inbound_mail_item_list.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .._models import BaseModel -from .inbound_mail_item import InboundMailItem - -__all__ = ["InboundMailItemList"] - - -class InboundMailItemList(BaseModel): - data: List[InboundMailItem] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 75e36f1a3..c2d381d36 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -79,6 +79,9 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire transfer.""" + status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. diff --git a/src/increase/types/intrafi/__init__.py b/src/increase/types/intrafi/__init__.py deleted file mode 100644 index 89dd10101..000000000 --- a/src/increase/types/intrafi/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .intrafi_balance import IntrafiBalance as IntrafiBalance -from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion -from .exclusion_list_params import ExclusionListParams as ExclusionListParams -from .exclusion_create_params import ExclusionCreateParams as ExclusionCreateParams -from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment -from .account_enrollment_list_params import AccountEnrollmentListParams as AccountEnrollmentListParams -from .account_enrollment_create_params import AccountEnrollmentCreateParams as AccountEnrollmentCreateParams diff --git a/src/increase/types/intrafi/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py similarity index 98% rename from src/increase/types/intrafi/intrafi_account_enrollment.py rename to src/increase/types/intrafi_account_enrollment.py index bf22fe514..4f7eb73d5 100644 --- a/src/increase/types/intrafi/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi_account_enrollment.py @@ -3,7 +3,7 @@ from typing import Optional from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiAccountEnrollment"] diff --git a/src/increase/types/intrafi/account_enrollment_create_params.py b/src/increase/types/intrafi_account_enrollment_create_params.py similarity index 76% rename from src/increase/types/intrafi/account_enrollment_create_params.py rename to src/increase/types/intrafi_account_enrollment_create_params.py index a213e0882..0445b37ae 100644 --- a/src/increase/types/intrafi/account_enrollment_create_params.py +++ b/src/increase/types/intrafi_account_enrollment_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["AccountEnrollmentCreateParams"] +__all__ = ["IntrafiAccountEnrollmentCreateParams"] -class AccountEnrollmentCreateParams(TypedDict, total=False): +class IntrafiAccountEnrollmentCreateParams(TypedDict, total=False): account_id: Required[str] """The identifier for the account to be added to IntraFi.""" diff --git a/src/increase/types/intrafi/account_enrollment_list_params.py b/src/increase/types/intrafi_account_enrollment_list_params.py similarity index 90% rename from src/increase/types/intrafi/account_enrollment_list_params.py rename to src/increase/types/intrafi_account_enrollment_list_params.py index 86247eb1c..a20c00571 100644 --- a/src/increase/types/intrafi/account_enrollment_list_params.py +++ b/src/increase/types/intrafi_account_enrollment_list_params.py @@ -5,10 +5,10 @@ from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["AccountEnrollmentListParams", "Status"] +__all__ = ["IntrafiAccountEnrollmentListParams", "Status"] -class AccountEnrollmentListParams(TypedDict, total=False): +class IntrafiAccountEnrollmentListParams(TypedDict, total=False): account_id: str """Filter IntraFi Account Enrollments to the one belonging to an account.""" diff --git a/src/increase/types/intrafi/intrafi_balance.py b/src/increase/types/intrafi_balance.py similarity index 98% rename from src/increase/types/intrafi/intrafi_balance.py rename to src/increase/types/intrafi_balance.py index e93235731..7c79445d6 100644 --- a/src/increase/types/intrafi/intrafi_balance.py +++ b/src/increase/types/intrafi_balance.py @@ -4,7 +4,7 @@ from datetime import date from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiBalance", "Balance", "BalanceBankLocation"] diff --git a/src/increase/types/intrafi/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py similarity index 98% rename from src/increase/types/intrafi/intrafi_exclusion.py rename to src/increase/types/intrafi_exclusion.py index 775fbfae3..6b1c35abd 100644 --- a/src/increase/types/intrafi/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiExclusion"] diff --git a/src/increase/types/intrafi/exclusion_create_params.py b/src/increase/types/intrafi_exclusion_create_params.py similarity index 78% rename from src/increase/types/intrafi/exclusion_create_params.py rename to src/increase/types/intrafi_exclusion_create_params.py index 8075260bd..1a0c78dc3 100644 --- a/src/increase/types/intrafi/exclusion_create_params.py +++ b/src/increase/types/intrafi_exclusion_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["ExclusionCreateParams"] +__all__ = ["IntrafiExclusionCreateParams"] -class ExclusionCreateParams(TypedDict, total=False): +class IntrafiExclusionCreateParams(TypedDict, total=False): bank_name: Required[str] """The name of the financial institution to be excluded.""" diff --git a/src/increase/types/intrafi/exclusion_list_params.py b/src/increase/types/intrafi_exclusion_list_params.py similarity index 88% rename from src/increase/types/intrafi/exclusion_list_params.py rename to src/increase/types/intrafi_exclusion_list_params.py index 07d9859fb..8b20a277e 100644 --- a/src/increase/types/intrafi/exclusion_list_params.py +++ b/src/increase/types/intrafi_exclusion_list_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["ExclusionListParams"] +__all__ = ["IntrafiExclusionListParams"] -class ExclusionListParams(TypedDict, total=False): +class IntrafiExclusionListParams(TypedDict, total=False): cursor: str """Return the page of entries after this one.""" diff --git a/src/increase/types/lockbox_list.py b/src/increase/types/lockbox_list.py deleted file mode 100644 index 52bb1ef89..000000000 --- a/src/increase/types/lockbox_list.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .lockbox import Lockbox -from .._models import BaseModel - -__all__ = ["LockboxList"] - - -class LockboxList(BaseModel): - data: List[Lockbox] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" diff --git a/src/increase/types/routing_number.py b/src/increase/types/routing_number_list_response.py similarity index 94% rename from src/increase/types/routing_number.py rename to src/increase/types/routing_number_list_response.py index f9bab1249..7fbca1e8d 100644 --- a/src/increase/types/routing_number.py +++ b/src/increase/types/routing_number_list_response.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["RoutingNumber"] +__all__ = ["RoutingNumberListResponse"] -class RoutingNumber(BaseModel): +class RoutingNumberListResponse(BaseModel): ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index ccd925666..3d3e77b31 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -2,30 +2,32 @@ from __future__ import annotations -from .card_authorize_params import CardAuthorizeParams as CardAuthorizeParams from .program_create_params import ProgramCreateParams as ProgramCreateParams -from .card_settlement_params import CardSettlementParams as CardSettlementParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams -from .card_authorization_simulation import CardAuthorizationSimulation as CardAuthorizationSimulation +from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams +from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams +from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams -from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams -from .inbound_international_ach_transfer import InboundInternationalACHTransfer as InboundInternationalACHTransfer +from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams +from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse +from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse -from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams -from .physical_card_shipment_advance_params import ( - PhysicalCardShipmentAdvanceParams as PhysicalCardShipmentAdvanceParams, -) -from .ach_transfer_notification_of_change_params import ( - ACHTransferNotificationOfChangeParams as ACHTransferNotificationOfChangeParams, +from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams +from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams +from .physical_card_advance_shipment_params import ( + PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) +from .card_authorization_expiration_create_params import ( + CardAuthorizationExpirationCreateParams as CardAuthorizationExpirationCreateParams, +) from .inbound_wire_drawdown_request_create_params import ( InboundWireDrawdownRequestCreateParams as InboundWireDrawdownRequestCreateParams, ) @@ -35,12 +37,12 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) -from .inbound_international_ach_transfer_create_params import ( - InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, +from .ach_transfer_create_notification_of_change_params import ( + ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, ) -from .real_time_payments_transfer_create_inbound_params import ( - RealTimePaymentsTransferCreateInboundParams as RealTimePaymentsTransferCreateInboundParams, +from .inbound_real_time_payments_transfer_create_params import ( + InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, ) -from .inbound_real_time_payments_transfer_simulation_result import ( - InboundRealTimePaymentsTransferSimulationResult as InboundRealTimePaymentsTransferSimulationResult, +from .inbound_real_time_payments_transfer_create_response import ( + InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, ) diff --git a/src/increase/types/simulations/ach_transfer_create_inbound_params.py b/src/increase/types/simulations/ach_transfer_create_inbound_params.py deleted file mode 100644 index 077cea994..000000000 --- a/src/increase/types/simulations/ach_transfer_create_inbound_params.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["ACHTransferCreateInboundParams"] - - -class ACHTransferCreateInboundParams(TypedDict, total=False): - account_number_id: Required[str] - """The identifier of the Account Number the inbound ACH Transfer is for.""" - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - company_descriptive_date: str - """The description of the date of the transfer.""" - - company_discretionary_data: str - """Data associated with the transfer set by the sender.""" - - company_entry_description: str - """The description of the transfer set by the sender.""" - - company_id: str - """The sender's company ID.""" - - company_name: str - """The name of the sender.""" - - receiver_id_number: str - """The ID of the receiver of the transfer.""" - - receiver_name: str - """The name of the receiver of the transfer.""" - - resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """The time at which the transfer should be resolved. - - If not provided will resolve immediately. - """ diff --git a/src/increase/types/simulations/ach_transfer_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py similarity index 96% rename from src/increase/types/simulations/ach_transfer_notification_of_change_params.py rename to src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py index c08626084..13a1f88d9 100644 --- a/src/increase/types/simulations/ach_transfer_notification_of_change_params.py +++ b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ACHTransferNotificationOfChangeParams"] +__all__ = ["ACHTransferCreateNotificationOfChangeParams"] -class ACHTransferNotificationOfChangeParams(TypedDict, total=False): +class ACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): change_code: Required[ Literal[ "incorrect_account_number", diff --git a/src/increase/types/simulations/card_authorize_params.py b/src/increase/types/simulations/card_authorization_create_params.py similarity index 93% rename from src/increase/types/simulations/card_authorize_params.py rename to src/increase/types/simulations/card_authorization_create_params.py index ec64c91be..875f3cf23 100644 --- a/src/increase/types/simulations/card_authorize_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardAuthorizeParams"] +__all__ = ["CardAuthorizationCreateParams"] -class CardAuthorizeParams(TypedDict, total=False): +class CardAuthorizationCreateParams(TypedDict, total=False): amount: Required[int] """The authorization amount in cents.""" diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py new file mode 100644 index 000000000..5944bf00d --- /dev/null +++ b/src/increase/types/simulations/card_authorization_create_response.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from ..pending_transaction import PendingTransaction +from ..declined_transaction import DeclinedTransaction + +__all__ = ["CardAuthorizationCreateResponse"] + + +class CardAuthorizationCreateResponse(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the authorization attempt fails, this will contain the resulting + [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of `category: card_decline`. + """ + + pending_transaction: Optional[PendingTransaction] = None + """ + If the authorization attempt succeeds, this will contain the resulting Pending + Transaction object. The Pending Transaction's `source` will be of + `category: card_authorization`. + """ + + type: Literal["inbound_card_authorization_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_card_authorization_simulation_result`. + """ diff --git a/src/increase/types/simulation_card_authorization_expirations_params.py b/src/increase/types/simulations/card_authorization_expiration_create_params.py similarity index 66% rename from src/increase/types/simulation_card_authorization_expirations_params.py rename to src/increase/types/simulations/card_authorization_expiration_create_params.py index 00aa2e09f..1fda3504d 100644 --- a/src/increase/types/simulation_card_authorization_expirations_params.py +++ b/src/increase/types/simulations/card_authorization_expiration_create_params.py @@ -4,9 +4,9 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardAuthorizationExpirationsParams"] +__all__ = ["CardAuthorizationExpirationCreateParams"] -class SimulationCardAuthorizationExpirationsParams(TypedDict, total=False): +class CardAuthorizationExpirationCreateParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to expire.""" diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py deleted file mode 100644 index 7676b2b33..000000000 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ /dev/null @@ -1,1817 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "CardAuthorizationSimulation", - "DeclinedTransaction", - "DeclinedTransactionSource", - "DeclinedTransactionSourceACHDecline", - "DeclinedTransactionSourceCardDecline", - "DeclinedTransactionSourceCardDeclineNetworkDetails", - "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", - "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", - "DeclinedTransactionSourceCardDeclineVerification", - "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", - "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", - "DeclinedTransactionSourceCheckDecline", - "DeclinedTransactionSourceCheckDepositRejection", - "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", - "DeclinedTransactionSourceInternationalACHDecline", - "DeclinedTransactionSourceWireDecline", - "PendingTransaction", - "PendingTransactionSource", - "PendingTransactionSourceAccountTransferInstruction", - "PendingTransactionSourceACHTransferInstruction", - "PendingTransactionSourceCardAuthorization", - "PendingTransactionSourceCardAuthorizationNetworkDetails", - "PendingTransactionSourceCardAuthorizationNetworkDetailsVisa", - "PendingTransactionSourceCardAuthorizationNetworkIdentifiers", - "PendingTransactionSourceCardAuthorizationVerification", - "PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode", - "PendingTransactionSourceCardAuthorizationVerificationCardholderAddress", - "PendingTransactionSourceCheckDepositInstruction", - "PendingTransactionSourceCheckTransferInstruction", - "PendingTransactionSourceInboundFundsHold", - "PendingTransactionSourceRealTimePaymentsTransferInstruction", - "PendingTransactionSourceWireTransferInstruction", -] - - -class DeclinedTransactionSourceACHDecline(BaseModel): - id: str - """The ACH Decline's identifier.""" - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - inbound_ach_transfer_id: str - """The identifier of the Inbound ACH Transfer object associated with this decline.""" - - originator_company_descriptive_date: Optional[str] = None - """The descriptive date of the transfer.""" - - originator_company_discretionary_data: Optional[str] = None - """The additional information included with the transfer.""" - - originator_company_id: str - """The identifier of the company that initiated the transfer.""" - - originator_company_name: str - """The name of the company that initiated the transfer.""" - - reason: Literal[ - "ach_route_canceled", - "ach_route_disabled", - "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", - "entity_not_active", - "field_error", - "group_locked", - "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", - "transaction_not_allowed", - "user_initiated", - ] - """Why the ACH transfer was declined. - - - `ach_route_canceled` - The account number is canceled. - - `ach_route_disabled` - The account number is disabled. - - `breaches_limit` - The transaction would cause an Increase limit to be - exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - - `user_initiated` - Your integration declined this transfer via the API. - """ - - receiver_id_number: Optional[str] = None - """The id of the receiver of the transfer.""" - - receiver_name: Optional[str] = None - """The name of the receiver of the transfer.""" - - trace_number: str - """The trace number of the transfer.""" - - type: Literal["ach_decline"] - """A constant representing the object's type. - - For this resource it will always be `ach_decline`. - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class DeclinedTransactionSourceCardDeclineVerification(BaseModel): - card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class DeclinedTransactionSourceCardDecline(BaseModel): - id: str - """The Card Decline identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - declined_transaction_id: str - """The identifier of the declined transaction created for this Card Decline.""" - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_details: DeclinedTransactionSourceCardDeclineNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """ - The declined amount in the minor unit of the transaction's presentment currency. - """ - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - reason: Literal[ - "card_not_active", - "physical_card_not_active", - "entity_not_active", - "group_locked", - "insufficient_funds", - "cvv2_mismatch", - "card_expiration_mismatch", - "transaction_not_allowed", - "breaches_limit", - "webhook_declined", - "webhook_timed_out", - "declined_by_stand_in_processing", - "invalid_physical_card", - "missing_original_authorization", - "suspected_fraud", - ] - """Why the transaction was declined. - - - `card_not_active` - The Card was not active. - - `physical_card_not_active` - The Physical Card was not active. - - `entity_not_active` - The account's entity was not active. - - `group_locked` - The account was inactive. - - `insufficient_funds` - The Card's Account did not have a sufficient available - balance. - - `cvv2_mismatch` - The given CVV2 did not match the card's value. - - `card_expiration_mismatch` - The given expiration date did not match the - card's value. Only applies when a CVV2 is present. - - `transaction_not_allowed` - The attempted card transaction is not allowed per - Increase's terms. - - `breaches_limit` - The transaction was blocked by a Limit. - - `webhook_declined` - Your application declined the transaction via webhook. - - `webhook_timed_out` - Your application webhook did not respond without the - required timeout. - - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. - - `missing_original_authorization` - The original card authorization for this - incremental authorization does not exist. - - `suspected_fraud` - The transaction was suspected to be fraudulent. Please - reach out to support@increase.com for more information. - """ - - verification: DeclinedTransactionSourceCardDeclineVerification - """Fields related to verification of cardholder-provided values.""" - - -class DeclinedTransactionSourceCheckDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """ - A computer-readable number printed on the MICR line of business checks, usually - the check number. This is useful for positive pay checks, but can be unreliably - transmitted by the bank of first deposit. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - declined check. - """ - - check_transfer_id: Optional[str] = None - """The identifier of the Check Transfer object associated with this decline.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - declined check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this decline. - """ - - reason: Literal[ - "ach_route_disabled", - "ach_route_canceled", - "altered_or_fictitious", - "breaches_limit", - "entity_not_active", - "group_locked", - "insufficient_funds", - "stop_payment_requested", - "duplicate_presentment", - "not_authorized", - "amount_mismatch", - "not_our_item", - "no_account_number_found", - "refer_to_image", - "unable_to_process", - "user_initiated", - ] - """Why the check was declined. - - - `ach_route_disabled` - The account number is disabled. - - `ach_route_canceled` - The account number is canceled. - - `altered_or_fictitious` - The deposited check was altered or fictitious. - - `breaches_limit` - The transaction would cause a limit to be exceeded. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `stop_payment_requested` - Stop payment requested for this check. - - `duplicate_presentment` - The check was a duplicate deposit. - - `not_authorized` - The check was not authorized. - - `amount_mismatch` - The amount the receiving bank is attempting to deposit - does not match the amount on the check. - - `not_our_item` - The check attempting to be deposited does not belong to - Increase. - - `no_account_number_found` - The account number on the check does not exist at - Increase. - - `refer_to_image` - The check is not readable. Please refer to the image. - - `unable_to_process` - The check cannot be processed. This is rare: please - contact support. - - `user_initiated` - Your integration declined this check via the API. - """ - - -class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - amount: int - """The rejected amount in the minor unit of check's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was rejected.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "incomplete_image", - "duplicate", - "poor_image_quality", - "incorrect_amount", - "incorrect_recipient", - "not_eligible_for_mobile_deposit", - "missing_required_data_elements", - "suspected_fraud", - "deposit_window_expired", - "unknown", - ] - """Why the check deposit was rejected. - - - `incomplete_image` - The check's image is incomplete. - - `duplicate` - This is a duplicate check submission. - - `poor_image_quality` - This check has poor image quality. - - `incorrect_amount` - The check was deposited with the incorrect amount. - - `incorrect_recipient` - The check is made out to someone other than the - account holder. - - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile - deposit. - - `missing_required_data_elements` - This check is missing at least one required - field. - - `suspected_fraud` - This check is suspected to be fraudulent. - - `deposit_window_expired` - This check's deposit window has expired. - - `unknown` - The check was rejected for an unknown reason. - """ - - rejected_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was rejected. - """ - - -class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined - transfer's currency. This will always be "USD" for a Real-Time Payments - transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "account_restricted", - "group_locked", - "entity_not_active", - "real_time_payments_not_enabled", - ] - """Why the transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `account_restricted` - Your account is restricted. - - `group_locked` - Your account is inactive. - - `entity_not_active` - The account's entity is not active. - - `real_time_payments_not_enabled` - Your account is not enabled to receive - Real-Time Payments transfers. - """ - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the declined transfer.""" - - -class DeclinedTransactionSourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - -class DeclinedTransactionSourceWireDecline(BaseModel): - inbound_wire_transfer_id: str - """The identifier of the Inbound Wire Transfer that was declined.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "entity_not_active", - "group_locked", - "no_account_number", - "transaction_not_allowed", - ] - """Why the wire transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `no_account_number` - The beneficiary account number does not exist. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - """ - - -class DeclinedTransactionSource(BaseModel): - ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None - """An ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_decline`. - """ - - card_decline: Optional[DeclinedTransactionSourceCardDecline] = None - """A Card Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_decline`. - """ - - category: Literal[ - "ach_decline", - "card_decline", - "check_decline", - "inbound_real_time_payments_transfer_decline", - "international_ach_decline", - "wire_decline", - "check_deposit_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. - - `card_decline` - Card Decline: details will be under the `card_decline` - object. - - `check_decline` - Check Decline: details will be under the `check_decline` - object. - - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments - Transfer Decline: details will be under the - `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - - `wire_decline` - Wire Decline: details will be under the `wire_decline` - object. - - `check_deposit_rejection` - Check Deposit Rejection: details will be under the - `check_deposit_rejection` object. - - `other` - The Declined Transaction was made for an undocumented or deprecated - reason. - """ - - check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None - """A Check Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_decline`. - """ - - check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None - """A Check Deposit Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_rejection`. - """ - - inbound_real_time_payments_transfer_decline: Optional[ - DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline - ] = None - """An Inbound Real-Time Payments Transfer Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_decline`. - """ - - international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - - wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None - """A Wire Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_decline`. - """ - - -class DeclinedTransaction(BaseModel): - id: str - """The Declined Transaction identifier.""" - - account_id: str - """The identifier for the Account the Declined Transaction belongs to.""" - - amount: int - """The Declined Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined - Transaction's currency. This will match the currency on the Declined - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """This is the description the vendor provides.""" - - route_id: Optional[str] = None - """The identifier for the route this Declined Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Declined Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: DeclinedTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Declined Transaction. For example, for a card transaction this lists the - merchant's industry and location. Note that for backwards compatibility reasons, - additional undocumented keys may appear in this object. These should be treated - as deprecated and will be removed in the future. - """ - - type: Literal["declined_transaction"] - """A constant representing the object's type. - - For this resource it will always be `declined_transaction`. - """ - - -class PendingTransactionSourceAccountTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - transfer_id: str - """The identifier of the Account Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceACHTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - transfer_id: str - """The identifier of the ACH Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceCardAuthorizationNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class PendingTransactionSourceCardAuthorizationNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[PendingTransactionSourceCardAuthorizationNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class PendingTransactionSourceCardAuthorizationNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class PendingTransactionSourceCardAuthorizationVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class PendingTransactionSourceCardAuthorizationVerification(BaseModel): - card_verification_code: PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: PendingTransactionSourceCardAuthorizationVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class PendingTransactionSourceCardAuthorization(BaseModel): - id: str - """The Card Authorization identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - direction: Literal["settlement", "refund"] - """ - The direction descibes the direction the funds will move, either from the - cardholder to the merchant or from the merchant to the cardholder. - - - `settlement` - A regular card authorization where funds are debited from the - cardholder. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - expires_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) when this authorization - will expire and the pending transaction will be released. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - network_details: PendingTransactionSourceCardAuthorizationNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: PendingTransactionSourceCardAuthorizationNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - pending_transaction_id: Optional[str] = None - """The identifier of the Pending Transaction associated with this Transaction.""" - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """The pending amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - type: Literal["card_authorization"] - """A constant representing the object's type. - - For this resource it will always be `card_authorization`. - """ - - verification: PendingTransactionSourceCardAuthorizationVerification - """Fields related to verification of cardholder-provided values.""" - - -class PendingTransactionSourceCheckDepositInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the File containing the image of the back of the check that - was deposited. - """ - - check_deposit_id: Optional[str] = None - """The identifier of the Check Deposit.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - front_image_file_id: str - """ - The identifier of the File containing the image of the front of the check that - was deposited. - """ - - -class PendingTransactionSourceCheckTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - transfer_id: str - """The identifier of the Check Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceInboundFundsHold(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - - amount: int - """The held amount in the minor unit of the account's currency. - - For dollars, for example, this is cents. - """ - - automatically_releases_at: datetime - """When the hold will be released automatically. - - Certain conditions may cause it to be released before this time. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - was created. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - held_transaction_id: Optional[str] = None - """The ID of the Transaction for which funds were held.""" - - pending_transaction_id: Optional[str] = None - """The ID of the Pending Transaction representing the held funds.""" - - released_at: Optional[datetime] = None - """When the hold was released (if it has been released).""" - - status: Literal["held", "complete"] - """The status of the hold. - - - `held` - Funds are still being held. - - `complete` - Funds have been released. - """ - - type: Literal["inbound_funds_hold"] - """A constant representing the object's type. - - For this resource it will always be `inbound_funds_hold`. - """ - - -class PendingTransactionSourceRealTimePaymentsTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - transfer_id: str - """ - The identifier of the Real-Time Payments Transfer that led to this Pending - Transaction. - """ - - -class PendingTransactionSourceWireTransferInstruction(BaseModel): - account_number: str - """The account number for the destination account.""" - - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - message_to_recipient: str - """The message that will show on the recipient's bank statement.""" - - routing_number: str - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - destination account. - """ - - transfer_id: str - """The identifier of the Wire Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSource(BaseModel): - account_transfer_instruction: Optional[PendingTransactionSourceAccountTransferInstruction] = None - """An Account Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_instruction`. - """ - - ach_transfer_instruction: Optional[PendingTransactionSourceACHTransferInstruction] = None - """An ACH Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_instruction`. - """ - - card_authorization: Optional[PendingTransactionSourceCardAuthorization] = None - """A Card Authorization object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_authorization`. - """ - - category: Literal[ - "account_transfer_instruction", - "ach_transfer_instruction", - "card_authorization", - "check_deposit_instruction", - "check_transfer_instruction", - "inbound_funds_hold", - "real_time_payments_transfer_instruction", - "wire_transfer_instruction", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `account_transfer_instruction` - Account Transfer Instruction: details will be - under the `account_transfer_instruction` object. - - `ach_transfer_instruction` - ACH Transfer Instruction: details will be under - the `ach_transfer_instruction` object. - - `card_authorization` - Card Authorization: details will be under the - `card_authorization` object. - - `check_deposit_instruction` - Check Deposit Instruction: details will be under - the `check_deposit_instruction` object. - - `check_transfer_instruction` - Check Transfer Instruction: details will be - under the `check_transfer_instruction` object. - - `inbound_funds_hold` - Inbound Funds Hold: details will be under the - `inbound_funds_hold` object. - - `real_time_payments_transfer_instruction` - Real-Time Payments Transfer - Instruction: details will be under the - `real_time_payments_transfer_instruction` object. - - `wire_transfer_instruction` - Wire Transfer Instruction: details will be under - the `wire_transfer_instruction` object. - - `other` - The Pending Transaction was made for an undocumented or deprecated - reason. - """ - - check_deposit_instruction: Optional[PendingTransactionSourceCheckDepositInstruction] = None - """A Check Deposit Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_instruction`. - """ - - check_transfer_instruction: Optional[PendingTransactionSourceCheckTransferInstruction] = None - """A Check Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_instruction`. - """ - - inbound_funds_hold: Optional[PendingTransactionSourceInboundFundsHold] = None - """An Inbound Funds Hold object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_funds_hold`. - """ - - real_time_payments_transfer_instruction: Optional[ - PendingTransactionSourceRealTimePaymentsTransferInstruction - ] = None - """A Real-Time Payments Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `real_time_payments_transfer_instruction`. - """ - - wire_transfer_instruction: Optional[PendingTransactionSourceWireTransferInstruction] = None - """A Wire Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_instruction`. - """ - - -class PendingTransaction(BaseModel): - id: str - """The Pending Transaction identifier.""" - - account_id: str - """The identifier for the account this Pending Transaction belongs to.""" - - amount: int - """The Pending Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - completed_at: Optional[datetime] = None - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending - Transaction was completed. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending - Transaction's currency. This will match the currency on the Pending - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """ - For a Pending Transaction related to a transfer, this is the description you - provide. For a Pending Transaction related to a payment, this is the description - the vendor provides. - """ - - route_id: Optional[str] = None - """The identifier for the route this Pending Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Pending Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: PendingTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Pending Transaction. For example, for a card transaction this lists the - merchant's industry and location. - """ - - status: Literal["pending", "complete"] - """ - Whether the Pending Transaction has been confirmed and has an associated - Transaction. - - - `pending` - The Pending Transaction is still awaiting confirmation. - - `complete` - The Pending Transaction is confirmed. An associated Transaction - exists for this object. The Pending Transaction will no longer count against - your balance and can generally be hidden from UIs, etc. - """ - - type: Literal["pending_transaction"] - """A constant representing the object's type. - - For this resource it will always be `pending_transaction`. - """ - - -class CardAuthorizationSimulation(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the authorization attempt fails, this will contain the resulting - [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of `category: card_decline`. - """ - - pending_transaction: Optional[PendingTransaction] = None - """ - If the authorization attempt succeeds, this will contain the resulting Pending - Transaction object. The Pending Transaction's `source` will be of - `category: card_authorization`. - """ - - type: Literal["inbound_card_authorization_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_card_authorization_simulation_result`. - """ diff --git a/src/increase/types/simulation_card_fuel_confirmations_params.py b/src/increase/types/simulations/card_fuel_confirmation_create_params.py similarity index 78% rename from src/increase/types/simulation_card_fuel_confirmations_params.py rename to src/increase/types/simulations/card_fuel_confirmation_create_params.py index 90af445be..4ebfc413a 100644 --- a/src/increase/types/simulation_card_fuel_confirmations_params.py +++ b/src/increase/types/simulations/card_fuel_confirmation_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardFuelConfirmationsParams"] +__all__ = ["CardFuelConfirmationCreateParams"] -class SimulationCardFuelConfirmationsParams(TypedDict, total=False): +class CardFuelConfirmationCreateParams(TypedDict, total=False): amount: Required[int] """ The amount of the fuel_confirmation in minor units in the card authorization's diff --git a/src/increase/types/simulation_card_increments_params.py b/src/increase/types/simulations/card_increment_create_params.py similarity index 87% rename from src/increase/types/simulation_card_increments_params.py rename to src/increase/types/simulations/card_increment_create_params.py index 564c0631c..85f2aafc5 100644 --- a/src/increase/types/simulation_card_increments_params.py +++ b/src/increase/types/simulations/card_increment_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardIncrementsParams"] +__all__ = ["CardIncrementCreateParams"] -class SimulationCardIncrementsParams(TypedDict, total=False): +class CardIncrementCreateParams(TypedDict, total=False): amount: Required[int] """ The amount of the increment in minor units in the card authorization's currency. diff --git a/src/increase/types/simulation_card_reversals_params.py b/src/increase/types/simulations/card_reversal_create_params.py similarity index 80% rename from src/increase/types/simulation_card_reversals_params.py rename to src/increase/types/simulations/card_reversal_create_params.py index 3ee6bdc91..ad0b9c8d2 100644 --- a/src/increase/types/simulation_card_reversals_params.py +++ b/src/increase/types/simulations/card_reversal_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardReversalsParams"] +__all__ = ["CardReversalCreateParams"] -class SimulationCardReversalsParams(TypedDict, total=False): +class CardReversalCreateParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to create a reversal on.""" diff --git a/src/increase/types/simulations/card_settlement_params.py b/src/increase/types/simulations/card_settlement_create_params.py similarity index 84% rename from src/increase/types/simulations/card_settlement_params.py rename to src/increase/types/simulations/card_settlement_create_params.py index 53aa972b8..f93244b00 100644 --- a/src/increase/types/simulations/card_settlement_params.py +++ b/src/increase/types/simulations/card_settlement_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardSettlementParams"] +__all__ = ["CardSettlementCreateParams"] -class CardSettlementParams(TypedDict, total=False): +class CardSettlementCreateParams(TypedDict, total=False): card_id: Required[str] """The identifier of the Card to create a settlement on.""" diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py new file mode 100644 index 000000000..fa743818c --- /dev/null +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -0,0 +1,89 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["InboundACHTransferCreateParams"] + + +class InboundACHTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the inbound ACH Transfer is for.""" + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + company_descriptive_date: str + """The description of the date of the transfer.""" + + company_discretionary_data: str + """Data associated with the transfer set by the sender.""" + + company_entry_description: str + """The description of the transfer set by the sender.""" + + company_id: str + """The sender's company ID.""" + + company_name: str + """The name of the sender.""" + + receiver_id_number: str + """The ID of the receiver of the transfer.""" + + receiver_name: str + """The name of the receiver of the transfer.""" + + resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The time at which the transfer should be resolved. + + If not provided will resolve immediately. + """ + + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + """The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer.py b/src/increase/types/simulations/inbound_international_ach_transfer.py deleted file mode 100644 index f7ccb3353..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer.py +++ /dev/null @@ -1,260 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["InboundInternationalACHTransfer"] - - -class InboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py deleted file mode 100644 index 3cf052e3b..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["InboundInternationalACHTransferCreateParams"] - - -class InboundInternationalACHTransferCreateParams(TypedDict, total=False): - account_number_id: Required[str] - """ - The identifier of the Account Number the inbound international ACH Transfer is - for. - """ - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - foreign_payment_amount: Required[int] - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - originating_currency_code: Required[str] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - receiver_identification_number: str - """An identification number the originator uses for the receiver.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py similarity index 88% rename from src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py rename to src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py index f4dfec4a0..78d9b323e 100644 --- a/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["RealTimePaymentsTransferCreateInboundParams"] +__all__ = ["InboundRealTimePaymentsTransferCreateParams"] -class RealTimePaymentsTransferCreateInboundParams(TypedDict, total=False): +class InboundRealTimePaymentsTransferCreateParams(TypedDict, total=False): account_number_id: Required[str] """ The identifier of the Account Number the inbound Real-Time Payments Transfer is diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py new file mode 100644 index 000000000..2e254b388 --- /dev/null +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from ..transaction import Transaction +from ..declined_transaction import DeclinedTransaction + +__all__ = ["InboundRealTimePaymentsTransferCreateResponse"] + + +class InboundRealTimePaymentsTransferCreateResponse(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the Real-Time Payments Transfer attempt fails, this will contain the + resulting [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of + `category: inbound_real_time_payments_transfer_decline`. + """ + + transaction: Optional[Transaction] = None + """ + If the Real-Time Payments Transfer attempt succeeds, this will contain the + resulting [Transaction](#transactions) object. The Transaction's `source` will + be of `category: inbound_real_time_payments_transfer_confirmation`. + """ + + type: Literal["inbound_real_time_payments_transfer_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_real_time_payments_transfer_simulation_result`. + """ diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py deleted file mode 100644 index f1f43a1e5..000000000 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ /dev/null @@ -1,3857 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import date, datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "InboundRealTimePaymentsTransferSimulationResult", - "DeclinedTransaction", - "DeclinedTransactionSource", - "DeclinedTransactionSourceACHDecline", - "DeclinedTransactionSourceCardDecline", - "DeclinedTransactionSourceCardDeclineNetworkDetails", - "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", - "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", - "DeclinedTransactionSourceCardDeclineVerification", - "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", - "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", - "DeclinedTransactionSourceCheckDecline", - "DeclinedTransactionSourceCheckDepositRejection", - "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", - "DeclinedTransactionSourceInternationalACHDecline", - "DeclinedTransactionSourceWireDecline", - "Transaction", - "TransactionSource", - "TransactionSourceAccountTransferIntention", - "TransactionSourceACHTransferIntention", - "TransactionSourceACHTransferRejection", - "TransactionSourceACHTransferReturn", - "TransactionSourceCardDisputeAcceptance", - "TransactionSourceCardDisputeLoss", - "TransactionSourceCardRefund", - "TransactionSourceCardRefundNetworkIdentifiers", - "TransactionSourceCardRefundPurchaseDetails", - "TransactionSourceCardRefundPurchaseDetailsCarRental", - "TransactionSourceCardRefundPurchaseDetailsLodging", - "TransactionSourceCardRefundPurchaseDetailsTravel", - "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", - "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", - "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", - "TransactionSourceCardRevenuePayment", - "TransactionSourceCardSettlement", - "TransactionSourceCardSettlementNetworkIdentifiers", - "TransactionSourceCardSettlementPurchaseDetails", - "TransactionSourceCardSettlementPurchaseDetailsCarRental", - "TransactionSourceCardSettlementPurchaseDetailsLodging", - "TransactionSourceCardSettlementPurchaseDetailsTravel", - "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", - "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", - "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", - "TransactionSourceCashbackPayment", - "TransactionSourceCheckDepositAcceptance", - "TransactionSourceCheckDepositReturn", - "TransactionSourceCheckTransferDeposit", - "TransactionSourceCheckTransferStopPaymentRequest", - "TransactionSourceFeePayment", - "TransactionSourceInboundACHTransfer", - "TransactionSourceInboundACHTransferAddenda", - "TransactionSourceInboundACHTransferAddendaFreeform", - "TransactionSourceInboundACHTransferAddendaFreeformEntry", - "TransactionSourceInboundInternationalACHTransfer", - "TransactionSourceInboundRealTimePaymentsTransferConfirmation", - "TransactionSourceInboundWireDrawdownPayment", - "TransactionSourceInboundWireReversal", - "TransactionSourceInboundWireTransfer", - "TransactionSourceInterestPayment", - "TransactionSourceInternalSource", - "TransactionSourceRealTimePaymentsTransferAcknowledgement", - "TransactionSourceSampleFunds", - "TransactionSourceWireTransferIntention", - "TransactionSourceWireTransferRejection", -] - - -class DeclinedTransactionSourceACHDecline(BaseModel): - id: str - """The ACH Decline's identifier.""" - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - inbound_ach_transfer_id: str - """The identifier of the Inbound ACH Transfer object associated with this decline.""" - - originator_company_descriptive_date: Optional[str] = None - """The descriptive date of the transfer.""" - - originator_company_discretionary_data: Optional[str] = None - """The additional information included with the transfer.""" - - originator_company_id: str - """The identifier of the company that initiated the transfer.""" - - originator_company_name: str - """The name of the company that initiated the transfer.""" - - reason: Literal[ - "ach_route_canceled", - "ach_route_disabled", - "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", - "entity_not_active", - "field_error", - "group_locked", - "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", - "transaction_not_allowed", - "user_initiated", - ] - """Why the ACH transfer was declined. - - - `ach_route_canceled` - The account number is canceled. - - `ach_route_disabled` - The account number is disabled. - - `breaches_limit` - The transaction would cause an Increase limit to be - exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - - `user_initiated` - Your integration declined this transfer via the API. - """ - - receiver_id_number: Optional[str] = None - """The id of the receiver of the transfer.""" - - receiver_name: Optional[str] = None - """The name of the receiver of the transfer.""" - - trace_number: str - """The trace number of the transfer.""" - - type: Literal["ach_decline"] - """A constant representing the object's type. - - For this resource it will always be `ach_decline`. - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class DeclinedTransactionSourceCardDeclineVerification(BaseModel): - card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class DeclinedTransactionSourceCardDecline(BaseModel): - id: str - """The Card Decline identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - declined_transaction_id: str - """The identifier of the declined transaction created for this Card Decline.""" - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_details: DeclinedTransactionSourceCardDeclineNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """ - The declined amount in the minor unit of the transaction's presentment currency. - """ - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - reason: Literal[ - "card_not_active", - "physical_card_not_active", - "entity_not_active", - "group_locked", - "insufficient_funds", - "cvv2_mismatch", - "card_expiration_mismatch", - "transaction_not_allowed", - "breaches_limit", - "webhook_declined", - "webhook_timed_out", - "declined_by_stand_in_processing", - "invalid_physical_card", - "missing_original_authorization", - "suspected_fraud", - ] - """Why the transaction was declined. - - - `card_not_active` - The Card was not active. - - `physical_card_not_active` - The Physical Card was not active. - - `entity_not_active` - The account's entity was not active. - - `group_locked` - The account was inactive. - - `insufficient_funds` - The Card's Account did not have a sufficient available - balance. - - `cvv2_mismatch` - The given CVV2 did not match the card's value. - - `card_expiration_mismatch` - The given expiration date did not match the - card's value. Only applies when a CVV2 is present. - - `transaction_not_allowed` - The attempted card transaction is not allowed per - Increase's terms. - - `breaches_limit` - The transaction was blocked by a Limit. - - `webhook_declined` - Your application declined the transaction via webhook. - - `webhook_timed_out` - Your application webhook did not respond without the - required timeout. - - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. - - `missing_original_authorization` - The original card authorization for this - incremental authorization does not exist. - - `suspected_fraud` - The transaction was suspected to be fraudulent. Please - reach out to support@increase.com for more information. - """ - - verification: DeclinedTransactionSourceCardDeclineVerification - """Fields related to verification of cardholder-provided values.""" - - -class DeclinedTransactionSourceCheckDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """ - A computer-readable number printed on the MICR line of business checks, usually - the check number. This is useful for positive pay checks, but can be unreliably - transmitted by the bank of first deposit. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - declined check. - """ - - check_transfer_id: Optional[str] = None - """The identifier of the Check Transfer object associated with this decline.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - declined check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this decline. - """ - - reason: Literal[ - "ach_route_disabled", - "ach_route_canceled", - "altered_or_fictitious", - "breaches_limit", - "entity_not_active", - "group_locked", - "insufficient_funds", - "stop_payment_requested", - "duplicate_presentment", - "not_authorized", - "amount_mismatch", - "not_our_item", - "no_account_number_found", - "refer_to_image", - "unable_to_process", - "user_initiated", - ] - """Why the check was declined. - - - `ach_route_disabled` - The account number is disabled. - - `ach_route_canceled` - The account number is canceled. - - `altered_or_fictitious` - The deposited check was altered or fictitious. - - `breaches_limit` - The transaction would cause a limit to be exceeded. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `stop_payment_requested` - Stop payment requested for this check. - - `duplicate_presentment` - The check was a duplicate deposit. - - `not_authorized` - The check was not authorized. - - `amount_mismatch` - The amount the receiving bank is attempting to deposit - does not match the amount on the check. - - `not_our_item` - The check attempting to be deposited does not belong to - Increase. - - `no_account_number_found` - The account number on the check does not exist at - Increase. - - `refer_to_image` - The check is not readable. Please refer to the image. - - `unable_to_process` - The check cannot be processed. This is rare: please - contact support. - - `user_initiated` - Your integration declined this check via the API. - """ - - -class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - amount: int - """The rejected amount in the minor unit of check's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was rejected.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "incomplete_image", - "duplicate", - "poor_image_quality", - "incorrect_amount", - "incorrect_recipient", - "not_eligible_for_mobile_deposit", - "missing_required_data_elements", - "suspected_fraud", - "deposit_window_expired", - "unknown", - ] - """Why the check deposit was rejected. - - - `incomplete_image` - The check's image is incomplete. - - `duplicate` - This is a duplicate check submission. - - `poor_image_quality` - This check has poor image quality. - - `incorrect_amount` - The check was deposited with the incorrect amount. - - `incorrect_recipient` - The check is made out to someone other than the - account holder. - - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile - deposit. - - `missing_required_data_elements` - This check is missing at least one required - field. - - `suspected_fraud` - This check is suspected to be fraudulent. - - `deposit_window_expired` - This check's deposit window has expired. - - `unknown` - The check was rejected for an unknown reason. - """ - - rejected_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was rejected. - """ - - -class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined - transfer's currency. This will always be "USD" for a Real-Time Payments - transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "account_restricted", - "group_locked", - "entity_not_active", - "real_time_payments_not_enabled", - ] - """Why the transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `account_restricted` - Your account is restricted. - - `group_locked` - Your account is inactive. - - `entity_not_active` - The account's entity is not active. - - `real_time_payments_not_enabled` - Your account is not enabled to receive - Real-Time Payments transfers. - """ - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the declined transfer.""" - - -class DeclinedTransactionSourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - -class DeclinedTransactionSourceWireDecline(BaseModel): - inbound_wire_transfer_id: str - """The identifier of the Inbound Wire Transfer that was declined.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "entity_not_active", - "group_locked", - "no_account_number", - "transaction_not_allowed", - ] - """Why the wire transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `no_account_number` - The beneficiary account number does not exist. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - """ - - -class DeclinedTransactionSource(BaseModel): - ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None - """An ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_decline`. - """ - - card_decline: Optional[DeclinedTransactionSourceCardDecline] = None - """A Card Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_decline`. - """ - - category: Literal[ - "ach_decline", - "card_decline", - "check_decline", - "inbound_real_time_payments_transfer_decline", - "international_ach_decline", - "wire_decline", - "check_deposit_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. - - `card_decline` - Card Decline: details will be under the `card_decline` - object. - - `check_decline` - Check Decline: details will be under the `check_decline` - object. - - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments - Transfer Decline: details will be under the - `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - - `wire_decline` - Wire Decline: details will be under the `wire_decline` - object. - - `check_deposit_rejection` - Check Deposit Rejection: details will be under the - `check_deposit_rejection` object. - - `other` - The Declined Transaction was made for an undocumented or deprecated - reason. - """ - - check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None - """A Check Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_decline`. - """ - - check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None - """A Check Deposit Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_rejection`. - """ - - inbound_real_time_payments_transfer_decline: Optional[ - DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline - ] = None - """An Inbound Real-Time Payments Transfer Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_decline`. - """ - - international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - - wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None - """A Wire Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_decline`. - """ - - -class DeclinedTransaction(BaseModel): - id: str - """The Declined Transaction identifier.""" - - account_id: str - """The identifier for the Account the Declined Transaction belongs to.""" - - amount: int - """The Declined Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined - Transaction's currency. This will match the currency on the Declined - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """This is the description the vendor provides.""" - - route_id: Optional[str] = None - """The identifier for the route this Declined Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Declined Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: DeclinedTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Declined Transaction. For example, for a card transaction this lists the - merchant's industry and location. Note that for backwards compatibility reasons, - additional undocumented keys may appear in this object. These should be treated - as deprecated and will be removed in the future. - """ - - type: Literal["declined_transaction"] - """A constant representing the object's type. - - For this resource it will always be `declined_transaction`. - """ - - -class TransactionSourceAccountTransferIntention(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """The description you chose to give the transfer.""" - - destination_account_id: str - """The identifier of the Account to where the Account Transfer was sent.""" - - source_account_id: str - """The identifier of the Account from where the Account Transfer was sent.""" - - transfer_id: str - """The identifier of the Account Transfer that led to this Pending Transaction.""" - - -class TransactionSourceACHTransferIntention(BaseModel): - account_number: str - """The account number for the destination account.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - routing_number: str - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - destination account. - """ - - statement_descriptor: str - """A description set when the ACH Transfer was created.""" - - transfer_id: str - """The identifier of the ACH Transfer that led to this Transaction.""" - - -class TransactionSourceACHTransferRejection(BaseModel): - transfer_id: str - """The identifier of the ACH Transfer that led to this Transaction.""" - - -class TransactionSourceACHTransferReturn(BaseModel): - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the transfer was created. - """ - - raw_return_reason_code: str - """The three character ACH return code, in the range R01 to R85.""" - - return_reason_code: Literal[ - "insufficient_fund", - "no_account", - "account_closed", - "invalid_account_number_structure", - "account_frozen_entry_returned_per_ofac_instruction", - "credit_entry_refused_by_receiver", - "unauthorized_debit_to_consumer_account_using_corporate_sec_code", - "corporate_customer_advised_not_authorized", - "payment_stopped", - "non_transaction_account", - "uncollected_funds", - "routing_number_check_digit_error", - "customer_advised_unauthorized_improper_ineligible_or_incomplete", - "amount_field_error", - "authorization_revoked_by_customer", - "invalid_ach_routing_number", - "file_record_edit_criteria", - "enr_invalid_individual_name", - "returned_per_odfi_request", - "limited_participation_dfi", - "incorrectly_coded_outbound_international_payment", - "account_sold_to_another_dfi", - "addenda_error", - "beneficiary_or_account_holder_deceased", - "customer_advised_not_within_authorization_terms", - "corrected_return", - "duplicate_entry", - "duplicate_return", - "enr_duplicate_enrollment", - "enr_invalid_dfi_account_number", - "enr_invalid_individual_id_number", - "enr_invalid_representative_payee_indicator", - "enr_invalid_transaction_code", - "enr_return_of_enr_entry", - "enr_routing_number_check_digit_error", - "entry_not_processed_by_gateway", - "field_error", - "foreign_receiving_dfi_unable_to_settle", - "iat_entry_coding_error", - "improper_effective_entry_date", - "improper_source_document_source_document_presented", - "invalid_company_id", - "invalid_foreign_receiving_dfi_identification", - "invalid_individual_id_number", - "item_and_rck_entry_presented_for_payment", - "item_related_to_rck_entry_is_ineligible", - "mandatory_field_error", - "misrouted_dishonored_return", - "misrouted_return", - "no_errors_found", - "non_acceptance_of_r62_dishonored_return", - "non_participant_in_iat_program", - "permissible_return_entry", - "permissible_return_entry_not_accepted", - "rdfi_non_settlement", - "rdfi_participant_in_check_truncation_program", - "representative_payee_deceased_or_unable_to_continue_in_that_capacity", - "return_not_a_duplicate", - "return_of_erroneous_or_reversing_debit", - "return_of_improper_credit_entry", - "return_of_improper_debit_entry", - "return_of_xck_entry", - "source_document_presented_for_payment", - "state_law_affecting_rck_acceptance", - "stop_payment_on_item_related_to_rck_entry", - "stop_payment_on_source_document", - "timely_original_return", - "trace_number_error", - "untimely_dishonored_return", - "untimely_return", - ] - """Why the ACH Transfer was returned. - - This reason code is sent by the receiving bank back to Increase. - - - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. - - `no_account` - Code R03. The account does not exist or the receiving bank was - unable to locate it. - - `account_closed` - Code R02. The account is closed at the receiving bank. - - `invalid_account_number_structure` - Code R04. The account number is invalid - at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. - - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. - The receiving bank rejected because of an incorrect Standard Entry Class code. - - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer - at the receiving bank reversed the transfer. - - `payment_stopped` - Code R08. The receiving bank stopped payment on this - transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. - - `uncollected_funds` - Code R09. The receiving bank account does not have - enough available balance for the transfer. - - `routing_number_check_digit_error` - Code R28. The routing number is - incorrect. - - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. - The customer at the receiving bank reversed the transfer. - - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. - - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - - `file_record_edit_criteria` - Code R17. The receiving bank is unable to - process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. - - `returned_per_odfi_request` - Code R06. The originating financial institution - asked for this transfer to be returned. The receiving bank is complying with - the request. - - `limited_participation_dfi` - Code R34. The receiving bank's regulatory - supervisor has limited their participation in the ACH network. - - `incorrectly_coded_outbound_international_payment` - Code R85. The outbound - international ACH transfer was incorrect. - - `account_sold_to_another_dfi` - Code R12. A rare return reason. The account - was sold to another bank. - - `addenda_error` - Code R25. The addenda record is incorrect or missing. - - `beneficiary_or_account_holder_deceased` - Code R15. A rare return reason. The - account holder is deceased. - - `customer_advised_not_within_authorization_terms` - Code R11. A rare return - reason. The customer authorized some payment to the sender, but this payment - was not in error. - - `corrected_return` - Code R74. A rare return reason. Sent in response to a - return that was returned with code `field_error`. The latest return should - include the corrected field(s). - - `duplicate_entry` - Code R24. A rare return reason. The receiving bank - received an exact duplicate entry with the same trace number and amount. - - `duplicate_return` - Code R67. A rare return reason. The return this message - refers to was a duplicate. - - `enr_duplicate_enrollment` - Code R47. A rare return reason. Only used for US - Government agency non-monetary automatic enrollment messages. - - `enr_invalid_dfi_account_number` - Code R43. A rare return reason. Only used - for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_individual_id_number` - Code R44. A rare return reason. Only used - for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_representative_payee_indicator` - Code R46. A rare return reason. - Only used for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_transaction_code` - Code R41. A rare return reason. Only used for - US Government agency non-monetary automatic enrollment messages. - - `enr_return_of_enr_entry` - Code R40. A rare return reason. Only used for US - Government agency non-monetary automatic enrollment messages. - - `enr_routing_number_check_digit_error` - Code R42. A rare return reason. Only - used for US Government agency non-monetary automatic enrollment messages. - - `entry_not_processed_by_gateway` - Code R84. A rare return reason. The - International ACH Transfer cannot be processed by the gateway. - - `field_error` - Code R69. A rare return reason. One or more of the fields in - the ACH were malformed. - - `foreign_receiving_dfi_unable_to_settle` - Code R83. A rare return reason. The - Foreign receiving bank was unable to settle this ACH transfer. - - `iat_entry_coding_error` - Code R80. A rare return reason. The International - ACH Transfer is malformed. - - `improper_effective_entry_date` - Code R18. A rare return reason. The ACH has - an improper effective entry date field. - - `improper_source_document_source_document_presented` - Code R39. A rare return - reason. The source document related to this ACH, usually an ACH check - conversion, was presented to the bank. - - `invalid_company_id` - Code R21. A rare return reason. The Company ID field of - the ACH was invalid. - - `invalid_foreign_receiving_dfi_identification` - Code R82. A rare return - reason. The foreign receiving bank identifier for an International ACH - Transfer was invalid. - - `invalid_individual_id_number` - Code R22. A rare return reason. The - Individual ID number field of the ACH was invalid. - - `item_and_rck_entry_presented_for_payment` - Code R53. A rare return reason. - Both the Represented Check ("RCK") entry and the original check were presented - to the bank. - - `item_related_to_rck_entry_is_ineligible` - Code R51. A rare return reason. - The Represented Check ("RCK") entry is ineligible. - - `mandatory_field_error` - Code R26. A rare return reason. The ACH is missing a - required field. - - `misrouted_dishonored_return` - Code R71. A rare return reason. The receiving - bank does not recognize the routing number in a dishonored return entry. - - `misrouted_return` - Code R61. A rare return reason. The receiving bank does - not recognize the routing number in a return entry. - - `no_errors_found` - Code R76. A rare return reason. Sent in response to a - return, the bank does not find the errors alleged by the returning bank. - - `non_acceptance_of_r62_dishonored_return` - Code R77. A rare return reason. - The receiving bank does not accept the return of the erroneous debit. The - funds are not available at the receiving bank. - - `non_participant_in_iat_program` - Code R81. A rare return reason. The - receiving bank does not accept International ACH Transfers. - - `permissible_return_entry` - Code R31. A rare return reason. A return that has - been agreed to be accepted by the receiving bank, despite falling outside of - the usual return timeframe. - - `permissible_return_entry_not_accepted` - Code R70. A rare return reason. The - receiving bank had not approved this return. - - `rdfi_non_settlement` - Code R32. A rare return reason. The receiving bank - could not settle this transaction. - - `rdfi_participant_in_check_truncation_program` - Code R30. A rare return - reason. The receiving bank does not accept Check Truncation ACH transfers. - - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - Code - R14. A rare return reason. The payee is deceased. - - `return_not_a_duplicate` - Code R75. A rare return reason. The originating - bank disputes that an earlier `duplicate_entry` return was actually a - duplicate. - - `return_of_erroneous_or_reversing_debit` - Code R62. A rare return reason. The - originating financial institution made a mistake and this return corrects it. - - `return_of_improper_credit_entry` - Code R36. A rare return reason. Return of - a malformed credit entry. - - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a - malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. - - `source_document_presented_for_payment` - Code R37. A rare return reason. The - source document related to this ACH, usually an ACH check conversion, was - presented to the bank. - - `state_law_affecting_rck_acceptance` - Code R50. A rare return reason. State - law prevents the bank from accepting the Represented Check ("RCK") entry. - - `stop_payment_on_item_related_to_rck_entry` - Code R52. A rare return reason. - A stop payment was issued on a Represented Check ("RCK") entry. - - `stop_payment_on_source_document` - Code R38. A rare return reason. The source - attached to the ACH, usually an ACH check conversion, includes a stop payment. - - `timely_original_return` - Code R73. A rare return reason. The bank receiving - an `untimely_return` believes it was on time. - - `trace_number_error` - Code R27. A rare return reason. An ACH return's trace - number does not match an originated ACH. - - `untimely_dishonored_return` - Code R72. A rare return reason. The dishonored - return was sent too late. - - `untimely_return` - Code R68. A rare return reason. The return was sent too - late. - """ - - trace_number: str - """A 15 digit number that was generated by the bank that initiated the return. - - The trace number of the return is different than that of the original transfer. - ACH trace numbers are not unique, but along with the amount and date this number - can be used to identify the ACH return at the bank that initiated it. - """ - - transaction_id: str - """The identifier of the Transaction associated with this return.""" - - transfer_id: str - """The identifier of the ACH Transfer associated with this return.""" - - -class TransactionSourceCardDisputeAcceptance(BaseModel): - accepted_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was accepted. - """ - - card_dispute_id: str - """The identifier of the Card Dispute that was accepted.""" - - transaction_id: str - """ - The identifier of the Transaction that was created to return the disputed funds - to your account. - """ - - -class TransactionSourceCardDisputeLoss(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was lost.""" - - explanation: str - """Why the Card Dispute was lost.""" - - lost_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was lost. - """ - - transaction_id: str - """ - The identifier of the Transaction that was created to debit the disputed funds - from your account. - """ - - -class TransactionSourceCardRefundNetworkIdentifiers(BaseModel): - acquirer_business_id: str - """ - A network assigned business ID that identifies the acquirer that processed this - transaction. - """ - - acquirer_reference_number: str - """A globally unique identifier for this settlement.""" - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): - car_class_code: Optional[str] = None - """Code indicating the vehicle's class.""" - - checkout_date: Optional[date] = None - """ - Date the customer picked up the car or, in the case of a no-show or pre-pay - transaction, the scheduled pick up date. - """ - - daily_rental_rate_amount: Optional[int] = None - """Daily rate being charged for the vehicle.""" - - daily_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - rate. - """ - - days_rented: Optional[int] = None - """Number of days the vehicle was rented.""" - - extra_charges: Optional[ - Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] - ] = None - """Additional charges (gas, late fee, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `gas` - Gas - - `extra_mileage` - Extra mileage - - `late_return` - Late return - - `one_way_service_fee` - One way service fee - - `parking_violation` - Parking violation - """ - - fuel_charges_amount: Optional[int] = None - """Fuel charges for the vehicle.""" - - fuel_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - assessed. - """ - - insurance_charges_amount: Optional[int] = None - """Any insurance being charged for the vehicle.""" - - insurance_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - charges assessed. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None - """ - An indicator that the cardholder is being billed for a reserved vehicle that was - not actually rented (that is, a "no-show" charge). - - - `not_applicable` - Not applicable - - `no_show_for_specialized_vehicle` - No show for specialized vehicle - """ - - one_way_drop_off_charges_amount: Optional[int] = None - """ - Charges for returning the vehicle at a different location than where it was - picked up. - """ - - one_way_drop_off_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - drop-off charges assessed. - """ - - renter_name: Optional[str] = None - """Name of the person renting the vehicle.""" - - weekly_rental_rate_amount: Optional[int] = None - """Weekly rate being charged for the vehicle.""" - - weekly_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - rental rate. - """ - - -class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): - check_in_date: Optional[date] = None - """Date the customer checked in.""" - - daily_room_rate_amount: Optional[int] = None - """Daily rate being charged for the room.""" - - daily_room_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - rate. - """ - - extra_charges: Optional[ - Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] - ] = None - """Additional charges (phone, late check-out, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `restaurant` - Restaurant - - `gift_shop` - Gift shop - - `mini_bar` - Mini bar - - `telephone` - Telephone - - `other` - Other - - `laundry` - Laundry - """ - - folio_cash_advances_amount: Optional[int] = None - """Folio cash advances for the room.""" - - folio_cash_advances_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - advances. - """ - - food_beverage_charges_amount: Optional[int] = None - """Food and beverage charges for the room.""" - - food_beverage_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - beverage charges. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None - """ - Indicator that the cardholder is being billed for a reserved room that was not - actually used. - - - `not_applicable` - Not applicable - - `no_show` - No show - """ - - prepaid_expenses_amount: Optional[int] = None - """Prepaid expenses being charged for the room.""" - - prepaid_expenses_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - expenses. - """ - - room_nights: Optional[int] = None - """Number of nights the room was rented.""" - - total_room_tax_amount: Optional[int] = None - """Total room tax being charged.""" - - total_room_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - tax. - """ - - total_tax_amount: Optional[int] = None - """Total tax being charged for the room.""" - - total_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - assessed. - """ - - -class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): - category: Optional[ - Literal[ - "none", - "bundled_service", - "baggage_fee", - "change_fee", - "cargo", - "carbon_offset", - "frequent_flyer", - "gift_card", - "ground_transport", - "in_flight_entertainment", - "lounge", - "medical", - "meal_beverage", - "other", - "passenger_assist_fee", - "pets", - "seat_fees", - "standby", - "service_fee", - "store", - "travel_service", - "unaccompanied_travel", - "upgrades", - "wifi", - ] - ] = None - """Category of the ancillary service. - - - `none` - None - - `bundled_service` - Bundled service - - `baggage_fee` - Baggage fee - - `change_fee` - Change fee - - `cargo` - Cargo - - `carbon_offset` - Carbon offset - - `frequent_flyer` - Frequent flyer - - `gift_card` - Gift card - - `ground_transport` - Ground transport - - `in_flight_entertainment` - In-flight entertainment - - `lounge` - Lounge - - `medical` - Medical - - `meal_beverage` - Meal beverage - - `other` - Other - - `passenger_assist_fee` - Passenger assist fee - - `pets` - Pets - - `seat_fees` - Seat fees - - `standby` - Standby - - `service_fee` - Service fee - - `store` - Store - - `travel_service` - Travel service - - `unaccompanied_travel` - Unaccompanied travel - - `upgrades` - Upgrades - - `wifi` - Wi-fi - """ - - sub_category: Optional[str] = None - """Sub-category of the ancillary service, free-form.""" - - -class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): - connected_ticket_document_number: Optional[str] = None - """ - If this purchase has a connection or relationship to another purchase, such as a - baggage fee for a passenger transport ticket, this field should contain the - ticket document number for the other purchase. - """ - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "other", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `other` - Other - """ - - passenger_name_or_description: Optional[str] = None - """Name of the passenger or description of the ancillary purchase.""" - - services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] - """Additional travel charges, such as baggage fees.""" - - ticket_document_number: Optional[str] = None - """Ticket document number.""" - - -class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): - carrier_code: Optional[str] = None - """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" - - destination_city_airport_code: Optional[str] = None - """Code for the destination city or airport.""" - - fare_basis_code: Optional[str] = None - """Fare basis code.""" - - flight_number: Optional[str] = None - """Flight number.""" - - service_class: Optional[str] = None - """Service class (e.g., first class, business class, etc.).""" - - stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None - """Indicates whether a stopover is allowed on this ticket. - - - `none` - None - - `stop_over_allowed` - Stop over allowed - - `stop_over_not_allowed` - Stop over not allowed - """ - - -class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): - ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] = None - """Ancillary purchases in addition to the airfare.""" - - computerized_reservation_system: Optional[str] = None - """Indicates the computerized reservation system used to book the ticket.""" - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_cancellation", - "other", - "partial_refund_of_airline_ticket", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `airline_ticket_cancellation` - Airline ticket cancellation - - `other` - Other - - `partial_refund_of_airline_ticket` - Partial refund of airline ticket - """ - - departure_date: Optional[date] = None - """Date of departure.""" - - origination_city_airport_code: Optional[str] = None - """Code for the originating city or airport.""" - - passenger_name: Optional[str] = None - """Name of the passenger.""" - - restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None - """Indicates whether this ticket is non-refundable. - - - `no_restrictions` - No restrictions - - `restricted_non_refundable_ticket` - Restricted non-refundable ticket - """ - - ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None - """Indicates why a ticket was changed. - - - `none` - None - - `change_to_existing_ticket` - Change to existing ticket - - `new_ticket` - New ticket - """ - - ticket_number: Optional[str] = None - """Ticket number.""" - - travel_agency_code: Optional[str] = None - """Code for the travel agency if the ticket was issued by a travel agency.""" - - travel_agency_name: Optional[str] = None - """Name of the travel agency if the ticket was issued by a travel agency.""" - - trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] = None - """Fields specific to each leg of the journey.""" - - -class TransactionSourceCardRefundPurchaseDetails(BaseModel): - car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] = None - """Fields specific to car rentals.""" - - customer_reference_identifier: Optional[str] = None - """An identifier from the merchant for the customer or consumer.""" - - local_tax_amount: Optional[int] = None - """The state or provincial tax amount in minor units.""" - - local_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] = None - """Fields specific to lodging.""" - - national_tax_amount: Optional[int] = None - """The national tax amount in minor units.""" - - national_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - purchase_identifier: Optional[str] = None - """An identifier from the merchant for the purchase to the issuer and cardholder.""" - - purchase_identifier_format: Optional[ - Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] - ] = None - """The format of the purchase identifier. - - - `free_text` - Free text - - `order_number` - Order number - - `rental_agreement_number` - Rental agreement number - - `hotel_folio_number` - Hotel folio number - - `invoice_number` - Invoice number - """ - - travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] = None - """Fields specific to travel.""" - - -class TransactionSourceCardRefund(BaseModel): - id: str - """The Card Refund identifier.""" - - amount: int - """The amount in the minor unit of the transaction's settlement currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's settlement currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - merchant_acceptor_id: Optional[str] = None - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: str - """The 4-digit MCC describing the merchant's business.""" - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: str - """The country the merchant resides in.""" - - merchant_name: Optional[str] = None - """The name of the merchant.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_identifiers: TransactionSourceCardRefundNetworkIdentifiers - """Network-specific identifiers for this refund.""" - - presentment_amount: int - """The amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] = None - """ - Additional details about the card purchase, such as tax and industry-specific - fields. - """ - - transaction_id: str - """The identifier of the Transaction associated with this Transaction.""" - - type: Literal["card_refund"] - """A constant representing the object's type. - - For this resource it will always be `card_refund`. - """ - - -class TransactionSourceCardRevenuePayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid interest.""" - - period_start: datetime - """The start of the period for which this transaction paid interest.""" - - transacted_on_account_id: Optional[str] = None - """The account the card belonged to.""" - - -class TransactionSourceCardSettlementNetworkIdentifiers(BaseModel): - acquirer_business_id: str - """ - A network assigned business ID that identifies the acquirer that processed this - transaction. - """ - - acquirer_reference_number: str - """A globally unique identifier for this settlement.""" - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): - car_class_code: Optional[str] = None - """Code indicating the vehicle's class.""" - - checkout_date: Optional[date] = None - """ - Date the customer picked up the car or, in the case of a no-show or pre-pay - transaction, the scheduled pick up date. - """ - - daily_rental_rate_amount: Optional[int] = None - """Daily rate being charged for the vehicle.""" - - daily_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - rate. - """ - - days_rented: Optional[int] = None - """Number of days the vehicle was rented.""" - - extra_charges: Optional[ - Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] - ] = None - """Additional charges (gas, late fee, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `gas` - Gas - - `extra_mileage` - Extra mileage - - `late_return` - Late return - - `one_way_service_fee` - One way service fee - - `parking_violation` - Parking violation - """ - - fuel_charges_amount: Optional[int] = None - """Fuel charges for the vehicle.""" - - fuel_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - assessed. - """ - - insurance_charges_amount: Optional[int] = None - """Any insurance being charged for the vehicle.""" - - insurance_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - charges assessed. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None - """ - An indicator that the cardholder is being billed for a reserved vehicle that was - not actually rented (that is, a "no-show" charge). - - - `not_applicable` - Not applicable - - `no_show_for_specialized_vehicle` - No show for specialized vehicle - """ - - one_way_drop_off_charges_amount: Optional[int] = None - """ - Charges for returning the vehicle at a different location than where it was - picked up. - """ - - one_way_drop_off_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - drop-off charges assessed. - """ - - renter_name: Optional[str] = None - """Name of the person renting the vehicle.""" - - weekly_rental_rate_amount: Optional[int] = None - """Weekly rate being charged for the vehicle.""" - - weekly_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - rental rate. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): - check_in_date: Optional[date] = None - """Date the customer checked in.""" - - daily_room_rate_amount: Optional[int] = None - """Daily rate being charged for the room.""" - - daily_room_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - rate. - """ - - extra_charges: Optional[ - Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] - ] = None - """Additional charges (phone, late check-out, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `restaurant` - Restaurant - - `gift_shop` - Gift shop - - `mini_bar` - Mini bar - - `telephone` - Telephone - - `other` - Other - - `laundry` - Laundry - """ - - folio_cash_advances_amount: Optional[int] = None - """Folio cash advances for the room.""" - - folio_cash_advances_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - advances. - """ - - food_beverage_charges_amount: Optional[int] = None - """Food and beverage charges for the room.""" - - food_beverage_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - beverage charges. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None - """ - Indicator that the cardholder is being billed for a reserved room that was not - actually used. - - - `not_applicable` - Not applicable - - `no_show` - No show - """ - - prepaid_expenses_amount: Optional[int] = None - """Prepaid expenses being charged for the room.""" - - prepaid_expenses_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - expenses. - """ - - room_nights: Optional[int] = None - """Number of nights the room was rented.""" - - total_room_tax_amount: Optional[int] = None - """Total room tax being charged.""" - - total_room_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - tax. - """ - - total_tax_amount: Optional[int] = None - """Total tax being charged for the room.""" - - total_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - assessed. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): - category: Optional[ - Literal[ - "none", - "bundled_service", - "baggage_fee", - "change_fee", - "cargo", - "carbon_offset", - "frequent_flyer", - "gift_card", - "ground_transport", - "in_flight_entertainment", - "lounge", - "medical", - "meal_beverage", - "other", - "passenger_assist_fee", - "pets", - "seat_fees", - "standby", - "service_fee", - "store", - "travel_service", - "unaccompanied_travel", - "upgrades", - "wifi", - ] - ] = None - """Category of the ancillary service. - - - `none` - None - - `bundled_service` - Bundled service - - `baggage_fee` - Baggage fee - - `change_fee` - Change fee - - `cargo` - Cargo - - `carbon_offset` - Carbon offset - - `frequent_flyer` - Frequent flyer - - `gift_card` - Gift card - - `ground_transport` - Ground transport - - `in_flight_entertainment` - In-flight entertainment - - `lounge` - Lounge - - `medical` - Medical - - `meal_beverage` - Meal beverage - - `other` - Other - - `passenger_assist_fee` - Passenger assist fee - - `pets` - Pets - - `seat_fees` - Seat fees - - `standby` - Standby - - `service_fee` - Service fee - - `store` - Store - - `travel_service` - Travel service - - `unaccompanied_travel` - Unaccompanied travel - - `upgrades` - Upgrades - - `wifi` - Wi-fi - """ - - sub_category: Optional[str] = None - """Sub-category of the ancillary service, free-form.""" - - -class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): - connected_ticket_document_number: Optional[str] = None - """ - If this purchase has a connection or relationship to another purchase, such as a - baggage fee for a passenger transport ticket, this field should contain the - ticket document number for the other purchase. - """ - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "other", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `other` - Other - """ - - passenger_name_or_description: Optional[str] = None - """Name of the passenger or description of the ancillary purchase.""" - - services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] - """Additional travel charges, such as baggage fees.""" - - ticket_document_number: Optional[str] = None - """Ticket document number.""" - - -class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): - carrier_code: Optional[str] = None - """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" - - destination_city_airport_code: Optional[str] = None - """Code for the destination city or airport.""" - - fare_basis_code: Optional[str] = None - """Fare basis code.""" - - flight_number: Optional[str] = None - """Flight number.""" - - service_class: Optional[str] = None - """Service class (e.g., first class, business class, etc.).""" - - stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None - """Indicates whether a stopover is allowed on this ticket. - - - `none` - None - - `stop_over_allowed` - Stop over allowed - - `stop_over_not_allowed` - Stop over not allowed - """ - - -class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): - ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] = None - """Ancillary purchases in addition to the airfare.""" - - computerized_reservation_system: Optional[str] = None - """Indicates the computerized reservation system used to book the ticket.""" - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_cancellation", - "other", - "partial_refund_of_airline_ticket", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `airline_ticket_cancellation` - Airline ticket cancellation - - `other` - Other - - `partial_refund_of_airline_ticket` - Partial refund of airline ticket - """ - - departure_date: Optional[date] = None - """Date of departure.""" - - origination_city_airport_code: Optional[str] = None - """Code for the originating city or airport.""" - - passenger_name: Optional[str] = None - """Name of the passenger.""" - - restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None - """Indicates whether this ticket is non-refundable. - - - `no_restrictions` - No restrictions - - `restricted_non_refundable_ticket` - Restricted non-refundable ticket - """ - - ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None - """Indicates why a ticket was changed. - - - `none` - None - - `change_to_existing_ticket` - Change to existing ticket - - `new_ticket` - New ticket - """ - - ticket_number: Optional[str] = None - """Ticket number.""" - - travel_agency_code: Optional[str] = None - """Code for the travel agency if the ticket was issued by a travel agency.""" - - travel_agency_name: Optional[str] = None - """Name of the travel agency if the ticket was issued by a travel agency.""" - - trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] = None - """Fields specific to each leg of the journey.""" - - -class TransactionSourceCardSettlementPurchaseDetails(BaseModel): - car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] = None - """Fields specific to car rentals.""" - - customer_reference_identifier: Optional[str] = None - """An identifier from the merchant for the customer or consumer.""" - - local_tax_amount: Optional[int] = None - """The state or provincial tax amount in minor units.""" - - local_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] = None - """Fields specific to lodging.""" - - national_tax_amount: Optional[int] = None - """The national tax amount in minor units.""" - - national_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - purchase_identifier: Optional[str] = None - """An identifier from the merchant for the purchase to the issuer and cardholder.""" - - purchase_identifier_format: Optional[ - Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] - ] = None - """The format of the purchase identifier. - - - `free_text` - Free text - - `order_number` - Order number - - `rental_agreement_number` - Rental agreement number - - `hotel_folio_number` - Hotel folio number - - `invoice_number` - Invoice number - """ - - travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] = None - """Fields specific to travel.""" - - -class TransactionSourceCardSettlement(BaseModel): - id: str - """The Card Settlement identifier.""" - - amount: int - """The amount in the minor unit of the transaction's settlement currency. - - For dollars, for example, this is cents. - """ - - card_authorization: Optional[str] = None - """ - The Card Authorization that was created prior to this Card Settlement, if one - exists. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's settlement currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - merchant_acceptor_id: Optional[str] = None - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: str - """The 4-digit MCC describing the merchant's business.""" - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: str - """The country the merchant resides in.""" - - merchant_name: Optional[str] = None - """The name of the merchant.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_identifiers: TransactionSourceCardSettlementNetworkIdentifiers - """Network-specific identifiers for this refund.""" - - pending_transaction_id: Optional[str] = None - """The identifier of the Pending Transaction associated with this Transaction.""" - - presentment_amount: int - """The amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] = None - """ - Additional details about the card purchase, such as tax and industry-specific - fields. - """ - - transaction_id: str - """The identifier of the Transaction associated with this Transaction.""" - - type: Literal["card_settlement"] - """A constant representing the object's type. - - For this resource it will always be `card_settlement`. - """ - - -class TransactionSourceCashbackPayment(BaseModel): - accrued_on_card_id: Optional[str] = None - """The card on which the cashback was accrued.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid cashback.""" - - period_start: datetime - """The start of the period for which this transaction paid cashback.""" - - -class TransactionSourceCheckDepositAcceptance(BaseModel): - account_number: str - """The account number printed on the check.""" - - amount: int - """The amount to be deposited in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """An additional line of metadata printed on the check. - - This typically includes the check number for business checks. - """ - - check_deposit_id: str - """The ID of the Check Deposit that was accepted.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - routing_number: str - """The routing number printed on the check.""" - - serial_number: Optional[str] = None - """The check serial number, if present, for consumer checks. - - For business checks, the serial number is usually in the `auxiliary_on_us` - field. - """ - - -class TransactionSourceCheckDepositReturn(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was returned.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - return_reason: Literal[ - "ach_conversion_not_supported", - "closed_account", - "duplicate_submission", - "insufficient_funds", - "no_account", - "not_authorized", - "stale_dated", - "stop_payment", - "unknown_reason", - "unmatched_details", - "unreadable_image", - "endorsement_irregular", - "altered_or_fictitious_item", - "frozen_or_blocked_account", - "post_dated", - "endorsement_missing", - "signature_missing", - "stop_payment_suspect", - "unusable_image", - "image_fails_security_check", - "cannot_determine_amount", - "signature_irregular", - "non_cash_item", - "unable_to_process", - "item_exceeds_dollar_limit", - "branch_or_account_sold", - ] - """ - Why this check was returned by the bank holding the account it was drawn - against. - - - `ach_conversion_not_supported` - The check doesn't allow ACH conversion. - - `closed_account` - The account is closed. - - `duplicate_submission` - The check has already been deposited. - - `insufficient_funds` - Insufficient funds - - `no_account` - No account was found matching the check details. - - `not_authorized` - The check was not authorized. - - `stale_dated` - The check is too old. - - `stop_payment` - The payment has been stopped by the account holder. - - `unknown_reason` - The reason for the return is unknown. - - `unmatched_details` - The image doesn't match the details submitted. - - `unreadable_image` - The image could not be read. - - `endorsement_irregular` - The check endorsement was irregular. - - `altered_or_fictitious_item` - The check present was either altered or fake. - - `frozen_or_blocked_account` - The account this check is drawn on is frozen. - - `post_dated` - The check is post dated. - - `endorsement_missing` - The endorsement was missing. - - `signature_missing` - The check signature was missing. - - `stop_payment_suspect` - The bank suspects a stop payment will be placed. - - `unusable_image` - The bank cannot read the image. - - `image_fails_security_check` - The check image fails the bank's security - check. - - `cannot_determine_amount` - The bank cannot determine the amount. - - `signature_irregular` - The signature is inconsistent with prior signatures. - - `non_cash_item` - The check is a non-cash item and cannot be drawn against the - account. - - `unable_to_process` - The bank is unable to process this check. - - `item_exceeds_dollar_limit` - The check exceeds the bank or customer's limit. - - `branch_or_account_sold` - The bank sold this account and no longer services - this customer. - """ - - returned_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was returned. - """ - - transaction_id: str - """ - The identifier of the transaction that reversed the original check deposit - transaction. - """ - - -class TransactionSourceCheckTransferDeposit(BaseModel): - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - deposited check. - """ - - bank_of_first_deposit_routing_number: Optional[str] = None - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - bank depositing this check. In some rare cases, this is not transmitted via - Check21 and the value will be null. - """ - - deposited_at: datetime - """When the check was deposited.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - deposited check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this - transaction. - """ - - transaction_id: Optional[str] = None - """The identifier of the Transaction object created when the check was deposited.""" - - transfer_id: Optional[str] = None - """The identifier of the Check Transfer object that was deposited.""" - - type: Literal["check_transfer_deposit"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_deposit`. - """ - - -class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] - """The reason why this transfer was stopped. - - - `mail_delivery_failed` - The check could not be delivered. - - `rejected_by_increase` - The check was canceled by an Increase operator who - will provide details out-of-band. - - `not_authorized` - The check was not authorized. - - `unknown` - The check was stopped for another reason. - """ - - requested_at: datetime - """The time the stop-payment was requested.""" - - transfer_id: str - """The ID of the check transfer that was stopped.""" - - type: Literal["check_transfer_stop_payment_request"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_stop_payment_request`. - """ - - -class TransactionSourceFeePayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - fee_period_start: date - """The start of this payment's fee period, usually the first day of a month.""" - - -class TransactionSourceInboundACHTransferAddendaFreeformEntry(BaseModel): - payment_related_information: str - """The payment related information passed in the addendum.""" - - -class TransactionSourceInboundACHTransferAddendaFreeform(BaseModel): - entries: List[TransactionSourceInboundACHTransferAddendaFreeformEntry] - """Each entry represents an addendum received from the originator.""" - - -class TransactionSourceInboundACHTransferAddenda(BaseModel): - category: Literal["freeform"] - """The type of addendum. - - - `freeform` - Unstructured addendum. - """ - - freeform: Optional[TransactionSourceInboundACHTransferAddendaFreeform] = None - """Unstructured `payment_related_information` passed through by the originator.""" - - -class TransactionSourceInboundACHTransfer(BaseModel): - addenda: Optional[TransactionSourceInboundACHTransferAddenda] = None - """Additional information sent from the originator.""" - - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - originator_company_descriptive_date: Optional[str] = None - """The description of the date of the transfer, usually in the format `YYMMDD`.""" - - originator_company_discretionary_data: Optional[str] = None - """Data set by the originator.""" - - originator_company_entry_description: str - """An informational description of the transfer.""" - - originator_company_id: str - """An identifier for the originating company. - - This is generally, but not always, a stable identifier across multiple - transfers. - """ - - originator_company_name: str - """A name set by the originator to identify themselves.""" - - receiver_id_number: Optional[str] = None - """The originator's identifier for the transfer receipient.""" - - receiver_name: Optional[str] = None - """The name of the transfer recipient. - - This value is informational and not verified by Increase. - """ - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - transfer_id: str - """The Inbound ACH Transfer's identifier.""" - - -class TransactionSourceInboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ - - -class TransactionSourceInboundRealTimePaymentsTransferConfirmation(BaseModel): - amount: int - """The amount in the minor unit of the transfer's currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's - currency. This will always be "USD" for a Real-Time Payments transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the transfer.""" - - -class TransactionSourceInboundWireDrawdownPayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - - description: str - """An Increase-constructed description of the transfer.""" - - input_message_accountability_data: Optional[str] = None - """ - A unique identifier available to the originating and receiving banks, commonly - abbreviated as IMAD. It is created when the wire is submitted to the Fedwire - service and is helpful when debugging wires with the receiving bank. - """ - - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - - -class TransactionSourceInboundWireReversal(BaseModel): - amount: int - """The amount that was reversed in USD cents.""" - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the reversal was created. - """ - - description: str - """ - The description on the reversal message from Fedwire, set by the reversing bank. - """ - - financial_institution_to_financial_institution_information: Optional[str] = None - """Additional financial institution information included in the wire reversal.""" - - input_cycle_date: date - """The Fedwire cycle date for the wire reversal. - - The "Fedwire day" begins at 9:00 PM Eastern Time on the evening before the - `cycle date`. - """ - - input_message_accountability_data: str - """The Fedwire transaction identifier.""" - - input_sequence_number: str - """The Fedwire sequence number.""" - - input_source: str - """The Fedwire input source identifier.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - previous_message_input_cycle_date: date - """ - The Fedwire cycle date for the wire transfer that is being reversed by this - message. - """ - - previous_message_input_message_accountability_data: str - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: str - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - receiver_financial_institution_information: Optional[str] = None - """ - Information included in the wire reversal for the receiving financial - institution. - """ - - transaction_id: str - """The ID for the Transaction associated with the transfer reversal.""" - - wire_transfer_id: str - """The ID for the Wire Transfer that is being reversed.""" - - -class TransactionSourceInboundWireTransfer(BaseModel): - amount: int - """The amount in USD cents.""" - - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - - description: str - """An Increase-constructed description of the transfer.""" - - input_message_accountability_data: Optional[str] = None - """ - A unique identifier available to the originating and receiving banks, commonly - abbreviated as IMAD. It is created when the wire is submitted to the Fedwire - service and is helpful when debugging wires with the originating bank. - """ - - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - - transfer_id: str - """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" - - -class TransactionSourceInterestPayment(BaseModel): - accrued_on_account_id: Optional[str] = None - """The account on which the interest was accrued.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid interest.""" - - period_start: datetime - """The start of the period for which this transaction paid interest.""" - - -class TransactionSourceInternalSource(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "account_closure", - "bank_migration", - "check_adjustment", - "collection_payment", - "collection_receivable", - "empyreal_adjustment", - "error", - "error_correction", - "fees", - "interest", - "negative_balance_forgiveness", - "sample_funds", - "sample_funds_return", - ] - """An Internal Source is a transaction between you and Increase. - - This describes the reason for the transaction. - - - `account_closure` - Account closure - - `bank_migration` - Bank migration - - `check_adjustment` - Check adjustment - - `collection_payment` - Collection payment - - `collection_receivable` - Collection receivable - - `empyreal_adjustment` - Empyreal adjustment - - `error` - Error - - `error_correction` - Error correction - - `fees` - Fees - - `interest` - Interest - - `negative_balance_forgiveness` - Negative balance forgiveness - - `sample_funds` - Sample funds - - `sample_funds_return` - Sample funds return - """ - - -class TransactionSourceRealTimePaymentsTransferAcknowledgement(BaseModel): - amount: int - """The transfer amount in USD cents.""" - - destination_account_number: str - """The destination account number.""" - - destination_routing_number: str - """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" - - remittance_information: str - """Unstructured information that will show on the recipient's bank statement.""" - - transfer_id: str - """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" - - -class TransactionSourceSampleFunds(BaseModel): - originator: str - """Where the sample funds came from.""" - - -class TransactionSourceWireTransferIntention(BaseModel): - account_number: str - """The destination account number.""" - - amount: int - """The transfer amount in USD cents.""" - - message_to_recipient: str - """The message that will show on the recipient's bank statement.""" - - routing_number: str - """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" - - transfer_id: str - """The identifier of the Wire Transfer that led to this Transaction.""" - - -class TransactionSourceWireTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Wire Transfer that led to this Transaction.""" - - -class TransactionSource(BaseModel): - account_transfer_intention: Optional[TransactionSourceAccountTransferIntention] = None - """An Account Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_intention`. - """ - - ach_transfer_intention: Optional[TransactionSourceACHTransferIntention] = None - """An ACH Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_intention`. - """ - - ach_transfer_rejection: Optional[TransactionSourceACHTransferRejection] = None - """An ACH Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_rejection`. - """ - - ach_transfer_return: Optional[TransactionSourceACHTransferReturn] = None - """An ACH Transfer Return object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_return`. - """ - - card_dispute_acceptance: Optional[TransactionSourceCardDisputeAcceptance] = None - """A Card Dispute Acceptance object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_acceptance`. - """ - - card_dispute_loss: Optional[TransactionSourceCardDisputeLoss] = None - """A Card Dispute Loss object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_loss`. - """ - - card_refund: Optional[TransactionSourceCardRefund] = None - """A Card Refund object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_refund`. - """ - - card_revenue_payment: Optional[TransactionSourceCardRevenuePayment] = None - """A Card Revenue Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_revenue_payment`. - """ - - card_settlement: Optional[TransactionSourceCardSettlement] = None - """A Card Settlement object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_settlement`. - """ - - cashback_payment: Optional[TransactionSourceCashbackPayment] = None - """A Cashback Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `cashback_payment`. - """ - - category: Literal[ - "account_transfer_intention", - "ach_transfer_intention", - "ach_transfer_rejection", - "ach_transfer_return", - "cashback_payment", - "card_dispute_acceptance", - "card_dispute_loss", - "card_refund", - "card_settlement", - "card_revenue_payment", - "check_deposit_acceptance", - "check_deposit_return", - "check_transfer_deposit", - "check_transfer_stop_payment_request", - "fee_payment", - "inbound_ach_transfer", - "inbound_ach_transfer_return_intention", - "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", - "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment", - "inbound_wire_reversal", - "inbound_wire_transfer", - "inbound_wire_transfer_reversal", - "interest_payment", - "internal_source", - "real_time_payments_transfer_acknowledgement", - "sample_funds", - "wire_transfer_intention", - "wire_transfer_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `account_transfer_intention` - Account Transfer Intention: details will be - under the `account_transfer_intention` object. - - `ach_transfer_intention` - ACH Transfer Intention: details will be under the - `ach_transfer_intention` object. - - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the - `ach_transfer_rejection` object. - - `ach_transfer_return` - ACH Transfer Return: details will be under the - `ach_transfer_return` object. - - `cashback_payment` - Cashback Payment: details will be under the - `cashback_payment` object. - - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the - `card_dispute_acceptance` object. - - `card_dispute_loss` - Card Dispute Loss: details will be under the - `card_dispute_loss` object. - - `card_refund` - Card Refund: details will be under the `card_refund` object. - - `card_settlement` - Card Settlement: details will be under the - `card_settlement` object. - - `card_revenue_payment` - Card Revenue Payment: details will be under the - `card_revenue_payment` object. - - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under - the `check_deposit_acceptance` object. - - `check_deposit_return` - Check Deposit Return: details will be under the - `check_deposit_return` object. - - `check_transfer_deposit` - Check Transfer Deposit: details will be under the - `check_transfer_deposit` object. - - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: - details will be under the `check_transfer_stop_payment_request` object. - - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under - the `inbound_ach_transfer` object. - - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return - Intention: details will be under the `inbound_ach_transfer_return_intention` - object. - - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return - Intention: details will be under the `inbound_check_deposit_return_intention` - object. - - `inbound_international_ach_transfer` - Inbound International ACH Transfer: - details will be under the `inbound_international_ach_transfer` object. - - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time - Payments Transfer Confirmation: details will be under the - `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will - be under the `inbound_wire_drawdown_payment` object. - - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the - `inbound_wire_reversal` object. - - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be - under the `inbound_wire_transfer` object. - - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention: - details will be under the `inbound_wire_transfer_reversal` object. - - `interest_payment` - Interest Payment: details will be under the - `interest_payment` object. - - `internal_source` - Internal Source: details will be under the - `internal_source` object. - - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer - Acknowledgement: details will be under the - `real_time_payments_transfer_acknowledgement` object. - - `sample_funds` - Sample Funds: details will be under the `sample_funds` - object. - - `wire_transfer_intention` - Wire Transfer Intention: details will be under the - `wire_transfer_intention` object. - - `wire_transfer_rejection` - Wire Transfer Rejection: details will be under the - `wire_transfer_rejection` object. - - `other` - The Transaction was made for an undocumented or deprecated reason. - """ - - check_deposit_acceptance: Optional[TransactionSourceCheckDepositAcceptance] = None - """A Check Deposit Acceptance object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_acceptance`. - """ - - check_deposit_return: Optional[TransactionSourceCheckDepositReturn] = None - """A Check Deposit Return object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_return`. - """ - - check_transfer_deposit: Optional[TransactionSourceCheckTransferDeposit] = None - """A Check Transfer Deposit object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_deposit`. - """ - - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] = None - """A Check Transfer Stop Payment Request object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_stop_payment_request`. - """ - - fee_payment: Optional[TransactionSourceFeePayment] = None - """A Fee Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `fee_payment`. - """ - - inbound_ach_transfer: Optional[TransactionSourceInboundACHTransfer] = None - """An Inbound ACH Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_ach_transfer`. - """ - - inbound_international_ach_transfer: Optional[TransactionSourceInboundInternationalACHTransfer] = None - """An Inbound International ACH Transfer object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_international_ach_transfer`. - """ - - inbound_real_time_payments_transfer_confirmation: Optional[ - TransactionSourceInboundRealTimePaymentsTransferConfirmation - ] = None - """An Inbound Real-Time Payments Transfer Confirmation object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_confirmation`. - """ - - inbound_wire_drawdown_payment: Optional[TransactionSourceInboundWireDrawdownPayment] = None - """An Inbound Wire Drawdown Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_drawdown_payment`. - """ - - inbound_wire_reversal: Optional[TransactionSourceInboundWireReversal] = None - """An Inbound Wire Reversal object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_reversal`. - """ - - inbound_wire_transfer: Optional[TransactionSourceInboundWireTransfer] = None - """An Inbound Wire Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_transfer`. - """ - - interest_payment: Optional[TransactionSourceInterestPayment] = None - """An Interest Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `interest_payment`. - """ - - internal_source: Optional[TransactionSourceInternalSource] = None - """An Internal Source object. - - This field will be present in the JSON response if and only if `category` is - equal to `internal_source`. - """ - - real_time_payments_transfer_acknowledgement: Optional[ - TransactionSourceRealTimePaymentsTransferAcknowledgement - ] = None - """A Real-Time Payments Transfer Acknowledgement object. - - This field will be present in the JSON response if and only if `category` is - equal to `real_time_payments_transfer_acknowledgement`. - """ - - sample_funds: Optional[TransactionSourceSampleFunds] = None - """A Sample Funds object. - - This field will be present in the JSON response if and only if `category` is - equal to `sample_funds`. - """ - - wire_transfer_intention: Optional[TransactionSourceWireTransferIntention] = None - """A Wire Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_intention`. - """ - - wire_transfer_rejection: Optional[TransactionSourceWireTransferRejection] = None - """A Wire Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_rejection`. - """ - - -class Transaction(BaseModel): - id: str - """The Transaction identifier.""" - - account_id: str - """The identifier for the Account the Transaction belongs to.""" - - amount: int - """The Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - Transaction's currency. This will match the currency on the Transaction's - Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """An informational message describing this transaction. - - Use the fields in `source` to get more detailed information. This field appears - as the line-item on the statement. - """ - - route_id: Optional[str] = None - """The identifier for the route this Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: TransactionSource - """ - This is an object giving more details on the network-level event that caused the - Transaction. Note that for backwards compatibility reasons, additional - undocumented keys may appear in this object. These should be treated as - deprecated and will be removed in the future. - """ - - type: Literal["transaction"] - """A constant representing the object's type. - - For this resource it will always be `transaction`. - """ - - -class InboundRealTimePaymentsTransferSimulationResult(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the Real-Time Payments Transfer attempt fails, this will contain the - resulting [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of - `category: inbound_real_time_payments_transfer_decline`. - """ - - transaction: Optional[Transaction] = None - """ - If the Real-Time Payments Transfer attempt succeeds, this will contain the - resulting [Transaction](#transactions) object. The Transaction's `source` will - be of `category: inbound_real_time_payments_transfer_confirmation`. - """ - - type: Literal["inbound_real_time_payments_transfer_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_real_time_payments_transfer_simulation_result`. - """ diff --git a/src/increase/types/simulations/wire_transfer_create_inbound_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py similarity index 91% rename from src/increase/types/simulations/wire_transfer_create_inbound_params.py rename to src/increase/types/simulations/inbound_wire_transfer_create_params.py index 7357261b3..6e25dc5a8 100644 --- a/src/increase/types/simulations/wire_transfer_create_inbound_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["WireTransferCreateInboundParams"] +__all__ = ["InboundWireTransferCreateParams"] -class WireTransferCreateInboundParams(TypedDict, total=False): +class InboundWireTransferCreateParams(TypedDict, total=False): account_number_id: Required[str] """The identifier of the Account Number the inbound Wire Transfer is for.""" @@ -97,3 +97,9 @@ class WireTransferCreateInboundParams(TypedDict, total=False): The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. """ + + sender_reference: str + """The sending bank will set sender_reference in production. + + You can simulate any value here. + """ diff --git a/src/increase/types/simulations/physical_card_shipment_advance_params.py b/src/increase/types/simulations/physical_card_advance_shipment_params.py similarity index 90% rename from src/increase/types/simulations/physical_card_shipment_advance_params.py rename to src/increase/types/simulations/physical_card_advance_shipment_params.py index 58e44d41c..8d3d45e5f 100644 --- a/src/increase/types/simulations/physical_card_shipment_advance_params.py +++ b/src/increase/types/simulations/physical_card_advance_shipment_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["PhysicalCardShipmentAdvanceParams"] +__all__ = ["PhysicalCardAdvanceShipmentParams"] -class PhysicalCardShipmentAdvanceParams(TypedDict, total=False): +class PhysicalCardAdvanceShipmentParams(TypedDict, total=False): shipment_status: Required[ Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"] ] diff --git a/src/increase/types/entities/supplemental_document_create_params.py b/src/increase/types/supplemental_document_create_params.py similarity index 76% rename from src/increase/types/entities/supplemental_document_create_params.py rename to src/increase/types/supplemental_document_create_params.py index 74939db4e..50169258d 100644 --- a/src/increase/types/entities/supplemental_document_create_params.py +++ b/src/increase/types/supplemental_document_create_params.py @@ -8,5 +8,8 @@ class SupplementalDocumentCreateParams(TypedDict, total=False): + entity_id: Required[str] + """The identifier of the Entity to associate with the supplemental document.""" + file_id: Required[str] """The identifier of the File containing the document.""" diff --git a/src/increase/types/entities/supplemental_document_list_params.py b/src/increase/types/supplemental_document_list_params.py similarity index 100% rename from src/increase/types/entities/supplemental_document_list_params.py rename to src/increase/types/supplemental_document_list_params.py diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6da2ae804..ce9ff4f7d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,13 +38,11 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", - "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", - "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", @@ -1657,30 +1655,6 @@ class SourceCheckTransferDeposit(BaseModel): """ -class SourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] - """The reason why this transfer was stopped. - - - `mail_delivery_failed` - The check could not be delivered. - - `rejected_by_increase` - The check was canceled by an Increase operator who - will provide details out-of-band. - - `not_authorized` - The check was not authorized. - - `unknown` - The check was stopped for another reason. - """ - - requested_at: datetime - """The time the stop-payment was requested.""" - - transfer_id: str - """The ID of the check transfer that was stopped.""" - - type: Literal["check_transfer_stop_payment_request"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_stop_payment_request`. - """ - - class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -1777,258 +1751,6 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" -class SourceInboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ - - class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2195,6 +1917,9 @@ class SourceInboundWireReversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" @@ -2482,12 +2207,10 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", @@ -2531,8 +2254,6 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: - details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under the `inbound_ach_transfer` object. @@ -2542,8 +2263,6 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. - - `inbound_international_ach_transfer` - Inbound International ACH Transfer: - details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2592,13 +2311,6 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ - check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None - """A Check Transfer Stop Payment Request object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_stop_payment_request`. - """ - fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. @@ -2613,13 +2325,6 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ - inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None - """An Inbound International ACH Transfer object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_international_ach_transfer`. - """ - inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 78e79eec1..324e0f00e 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,12 +53,10 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 0d17f1364..fdab38799 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -144,6 +144,9 @@ class Reversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/tests/api_resources/entities/__init__.py b/tests/api_resources/entities/__init__.py deleted file mode 100644 index fd8019a9a..000000000 --- a/tests/api_resources/entities/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py deleted file mode 100644 index e62f68ade..000000000 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ /dev/null @@ -1,479 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Entity -from increase._utils import parse_date - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBeneficialOwners: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.create( - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_archive(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_archive(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_archive(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_update_address(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_method_update_address_with_all_params(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_update_address(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_update_address(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncBeneficialOwners: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.create( - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_archive(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_update_address(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py deleted file mode 100644 index c4589caa8..000000000 --- a/tests/api_resources/entities/test_industry_code.py +++ /dev/null @@ -1,106 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Entity - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestIndustryCode: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - industry_code = client.entities.industry_code.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.industry_code.with_raw_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.industry_code.with_streaming_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.industry_code.with_raw_response.create( - entity_id="", - industry_code="5132", - ) - - -class TestAsyncIndustryCode: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - industry_code = await async_client.entities.industry_code.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.industry_code.with_raw_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.industry_code.with_streaming_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - industry_code = await response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.industry_code.with_raw_response.create( - entity_id="", - industry_code="5132", - ) diff --git a/tests/api_resources/intrafi/__init__.py b/tests/api_resources/intrafi/__init__.py deleted file mode 100644 index fd8019a9a..000000000 --- a/tests/api_resources/intrafi/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index 619881fcb..69276d274 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index fa6cf3101..6f5818e11 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -17,7 +17,6 @@ class TestAccountTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_complete(self, client: Increase) -> None: account_transfer = client.simulations.account_transfers.complete( @@ -25,7 +24,6 @@ def test_method_complete(self, client: Increase) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.account_transfers.with_raw_response.complete( @@ -37,7 +35,6 @@ def test_raw_response_complete(self, client: Increase) -> None: account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.account_transfers.with_streaming_response.complete( @@ -51,7 +48,6 @@ def test_streaming_response_complete(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_complete(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_complete(self, client: Increase) -> None: class TestAsyncAccountTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.simulations.account_transfers.complete( @@ -71,7 +66,6 @@ async def test_method_complete(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.account_transfers.with_raw_response.complete( @@ -80,10 +74,9 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.account_transfers.with_streaming_response.complete( @@ -97,7 +90,6 @@ async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 221370a67..52ea026c1 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -9,8 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer, InboundACHTransfer -from increase._utils import parse_datetime +from increase.types import ACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,58 +18,46 @@ class TestACHTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + def test_method_acknowledge(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.acknowledge( + "ach_transfer_id", ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_raw_response_acknowledge(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.acknowledge( + "ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_streaming_response_acknowledge(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.acknowledge( + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - def test_method_notification_of_change(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.notification_of_change( + def test_path_params_acknowledge(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + client.simulations.ach_transfers.with_raw_response.acknowledge( + "", + ) + + @parametrize + def test_method_create_notification_of_change(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -78,8 +65,8 @@ def test_method_notification_of_change(self, client: Increase) -> None: assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_notification_of_change(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.notification_of_change( + def test_raw_response_create_notification_of_change(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -91,8 +78,8 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_notification_of_change(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.notification_of_change( + def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -106,15 +93,14 @@ def test_streaming_response_notification_of_change(self, client: Increase) -> No assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_notification_of_change(self, client: Increase) -> None: + def test_path_params_create_notification_of_change(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - client.simulations.ach_transfers.with_raw_response.notification_of_change( + client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -122,7 +108,6 @@ def test_method_return(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return_with_all_params(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -131,7 +116,6 @@ def test_method_return_with_all_params(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.return_( @@ -143,7 +127,6 @@ def test_raw_response_return(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.return_( @@ -157,7 +140,6 @@ def test_streaming_response_return(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_return(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -165,7 +147,6 @@ def test_path_params_return(self, client: Increase) -> None: ach_transfer_id="", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( @@ -173,7 +154,6 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.submit( @@ -185,7 +165,6 @@ def test_raw_response_submit(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.submit( @@ -199,7 +178,6 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -212,58 +190,46 @@ class TestAsyncACHTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + async def test_method_acknowledge(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.acknowledge( + "ach_transfer_id", ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_raw_response_acknowledge(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.acknowledge( + "ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + ach_transfer = await response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_streaming_response_acknowledge(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.acknowledge( + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.notification_of_change( + async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + await async_client.simulations.ach_transfers.with_raw_response.acknowledge( + "", + ) + + @parametrize + async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -271,8 +237,8 @@ async def test_method_notification_of_change(self, async_client: AsyncIncrease) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -280,12 +246,12 @@ async def test_raw_response_notification_of_change(self, async_client: AsyncIncr assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.notification_of_change( + async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -299,15 +265,14 @@ async def test_streaming_response_notification_of_change(self, async_client: Asy assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -315,7 +280,6 @@ async def test_method_return(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return_with_all_params(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -324,7 +288,6 @@ async def test_method_return_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.return_( @@ -333,10 +296,9 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.return_( @@ -350,7 +312,6 @@ async def test_streaming_response_return(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_return(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -358,7 +319,6 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: ach_transfer_id="", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( @@ -366,7 +326,6 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.submit( @@ -375,10 +334,9 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.submit( @@ -392,7 +350,6 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py new file mode 100644 index 000000000..a0a1f1316 --- /dev/null +++ b/tests/api_resources/simulations/test_card_authorization_expirations.py @@ -0,0 +1,84 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardAuthorizationExpirations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_authorization_expiration = client.simulations.card_authorization_expirations.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_authorization_expirations.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization_expiration = response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_authorization_expirations.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization_expiration = response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardAuthorizationExpirations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_authorization_expiration = await async_client.simulations.card_authorization_expirations.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authorization_expirations.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization_expiration = await response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authorization_expirations.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization_expiration = await response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py new file mode 100644 index 000000000..83067015a --- /dev/null +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -0,0 +1,116 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import CardAuthorizationCreateResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardAuthorizations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_authorization = client.simulations.card_authorizations.create( + amount=1000, + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_authorization = client.simulations.card_authorizations.create( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_authorizations.with_raw_response.create( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization = response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_authorizations.with_streaming_response.create( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization = response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardAuthorizations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_authorization = await async_client.simulations.card_authorizations.create( + amount=1000, + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_authorization = await async_client.simulations.card_authorizations.create( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authorizations.with_raw_response.create( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization = await response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authorizations.with_streaming_response.create( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization = await response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 05c9c8271..15ed4aebc 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -98,7 +98,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py new file mode 100644 index 000000000..e7edbab71 --- /dev/null +++ b/tests/api_resources/simulations/test_card_fuel_confirmations.py @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardFuelConfirmations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_fuel_confirmation = client.simulations.card_fuel_confirmations.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_fuel_confirmations.with_raw_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_fuel_confirmation = response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_fuel_confirmations.with_streaming_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_fuel_confirmation = response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardFuelConfirmations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_fuel_confirmation = await async_client.simulations.card_fuel_confirmations.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_fuel_confirmations.with_raw_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_fuel_confirmation = await response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_fuel_confirmations.with_streaming_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_fuel_confirmation = await response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py new file mode 100644 index 000000000..188652e84 --- /dev/null +++ b/tests/api_resources/simulations/test_card_increments.py @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardIncrements: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_increment = client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_increment = client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_increments.with_raw_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_increment = response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_increments.with_streaming_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_increment = response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardIncrements: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_increment = await async_client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_increment = await async_client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_increments.with_raw_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_increment = await response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_increments.with_streaming_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_increment = await response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index 979ddd02c..ccbec8f1e 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_refund = response.parse() + card_refund = await response.parse() assert_matches_type(Transaction, card_refund, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py new file mode 100644 index 000000000..0d7122ce7 --- /dev/null +++ b/tests/api_resources/simulations/test_card_reversals.py @@ -0,0 +1,100 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardReversals: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_reversal = client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_reversal = client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_reversals.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_reversal = response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_reversals.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_reversal = response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardReversals: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_reversal = await async_client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_reversal = await async_client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_reversals.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_reversal = await response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_reversals.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_reversal = await response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py new file mode 100644 index 000000000..c994fdf29 --- /dev/null +++ b/tests/api_resources/simulations/test_card_settlements.py @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Transaction + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardSettlements: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_settlement = client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_settlement = client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_settlements.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_settlement = response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_settlements.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_settlement = response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardSettlements: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_settlement = await async_client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_settlement = await async_client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_settlements.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_settlement = await response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_settlements.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_settlement = await response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py deleted file mode 100644 index 0510f563f..000000000 --- a/tests/api_resources/simulations/test_cards.py +++ /dev/null @@ -1,203 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Transaction -from increase.types.simulations import CardAuthorizationSimulation - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCards: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_authorize(self, client: Increase) -> None: - card = client.simulations.cards.authorize( - amount=1000, - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_method_authorize_with_all_params(self, client: Increase) -> None: - card = client.simulations.cards.authorize( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_raw_response_authorize(self, client: Increase) -> None: - response = client.simulations.cards.with_raw_response.authorize( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_streaming_response_authorize(self, client: Increase) -> None: - with client.simulations.cards.with_streaming_response.authorize( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_settlement(self, client: Increase) -> None: - card = client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_method_settlement_with_all_params(self, client: Increase) -> None: - card = client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_raw_response_settlement(self, client: Increase) -> None: - response = client.simulations.cards.with_raw_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_streaming_response_settlement(self, client: Increase) -> None: - with client.simulations.cards.with_streaming_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCards: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_authorize(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.authorize( - amount=1000, - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_method_authorize_with_all_params(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.authorize( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_raw_response_authorize(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.cards.with_raw_response.authorize( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_streaming_response_authorize(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.cards.with_streaming_response.authorize( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_settlement(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_method_settlement_with_all_params(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_raw_response_settlement(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.cards.with_raw_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_streaming_response_settlement(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.cards.with_streaming_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 0dc091c92..b77fa8782 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -17,7 +17,6 @@ class TestCheckDeposits: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( @@ -25,7 +24,6 @@ def test_method_reject(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_reject(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.reject( @@ -37,7 +35,6 @@ def test_raw_response_reject(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_reject(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.reject( @@ -51,7 +48,6 @@ def test_streaming_response_reject(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_reject(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -97,7 +93,6 @@ def test_path_params_return(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( @@ -105,7 +100,6 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( @@ -117,7 +111,6 @@ def test_raw_response_submit(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( @@ -131,7 +124,6 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -143,7 +135,6 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( @@ -151,7 +142,6 @@ async def test_method_reject(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.reject( @@ -160,10 +150,9 @@ async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.reject( @@ -177,7 +166,6 @@ async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_reject(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -200,7 +188,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -223,7 +211,6 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: "", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( @@ -231,7 +218,6 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( @@ -240,10 +226,9 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( @@ -257,7 +242,6 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 93834eb5e..7afae4013 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -17,7 +17,6 @@ class TestCheckTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_mail(self, client: Increase) -> None: check_transfer = client.simulations.check_transfers.mail( @@ -25,7 +24,6 @@ def test_method_mail(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_mail(self, client: Increase) -> None: response = client.simulations.check_transfers.with_raw_response.mail( @@ -37,7 +35,6 @@ def test_raw_response_mail(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_mail(self, client: Increase) -> None: with client.simulations.check_transfers.with_streaming_response.mail( @@ -51,7 +48,6 @@ def test_streaming_response_mail(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_mail(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_mail(self, client: Increase) -> None: class TestAsyncCheckTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.simulations.check_transfers.mail( @@ -71,7 +66,6 @@ async def test_method_mail(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_transfers.with_raw_response.mail( @@ -80,10 +74,9 @@ async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_transfers.with_streaming_response.mail( @@ -97,7 +90,6 @@ async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_mail(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): 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 7d4d8cb36..f3e72d5cc 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -71,7 +71,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token_request = response.parse() + digital_wallet_token_request = await response.parse() assert_matches_type(DigitalWalletTokenRequestCreateResponse, digital_wallet_token_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 3eedf06da..189905342 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py new file mode 100644 index 000000000..69291ab83 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -0,0 +1,125 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundACHTransfer +from increase._utils import parse_datetime + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundACHTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_ach_transfer = response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_ach_transfer = response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundACHTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_ach_transfer = await response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_ach_transfer = await response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index 48760003f..fdd11f49e 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -77,7 +77,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index aa7a859dc..9a2285c51 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -74,7 +74,7 @@ async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = response.parse() + inbound_funds_hold = await response.parse() assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py deleted file mode 100644 index c54b501f5..000000000 --- a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py +++ /dev/null @@ -1,130 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import InboundInternationalACHTransfer - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = await response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True 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 new file mode 100644 index 000000000..7e547d239 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py @@ -0,0 +1,138 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import ( + InboundRealTimePaymentsTransferCreateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = ( + await async_client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = ( + await async_client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True 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 e03b70c12..56a206a95 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -154,7 +154,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py new file mode 100644 index 000000000..f1893dbe4 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -0,0 +1,136 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundWireTransfer + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundWireTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", + sender_reference="x", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_wire_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_wire_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundWireTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", + sender_reference="x", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_wire_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_wire_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index d755d9a81..e51d2e67d 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -93,7 +93,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - interest_payment = response.parse() + interest_payment = await response.parse() assert_matches_type(Transaction, interest_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 9762d794f..419377273 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -18,16 +18,16 @@ class TestPhysicalCards: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_shipment_advance(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.shipment_advance( + def test_method_advance_shipment(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_raw_response_shipment_advance(self, client: Increase) -> None: - response = client.simulations.physical_cards.with_raw_response.shipment_advance( + def test_raw_response_advance_shipment(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) @@ -38,8 +38,8 @@ def test_raw_response_shipment_advance(self, client: Increase) -> None: assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_streaming_response_shipment_advance(self, client: Increase) -> None: - with client.simulations.physical_cards.with_streaming_response.shipment_advance( + def test_streaming_response_advance_shipment(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -52,9 +52,9 @@ def test_streaming_response_shipment_advance(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_shipment_advance(self, client: Increase) -> None: + def test_path_params_advance_shipment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - client.simulations.physical_cards.with_raw_response.shipment_advance( + client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", shipment_status="shipped", ) @@ -64,28 +64,28 @@ class TestAsyncPhysicalCards: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_shipment_advance(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.shipment_advance( + async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_raw_response_shipment_advance(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.physical_cards.with_raw_response.shipment_advance( + async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_streaming_response_shipment_advance(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.physical_cards.with_streaming_response.shipment_advance( + async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -98,9 +98,9 @@ async def test_streaming_response_shipment_advance(self, async_client: AsyncIncr assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_shipment_advance(self, async_client: AsyncIncrease) -> None: + async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - await async_client.simulations.physical_cards.with_raw_response.shipment_advance( + await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", shipment_status="shipped", ) diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 348c8bdf6..22734a13f 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize 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 7835c8efc..c9ec4eb72 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -10,9 +10,6 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import RealTimePaymentsTransfer -from increase.types.simulations import ( - InboundRealTimePaymentsTransferSimulationResult, -) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -68,61 +65,6 @@ def test_path_params_complete(self, client: Increase) -> None: real_time_payments_transfer_id="", ) - @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - class TestAsyncRealTimePaymentsTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -150,7 +92,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -174,58 +116,3 @@ async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: await async_client.simulations.real_time_payments_transfers.with_raw_response.complete( real_time_payments_transfer_id="", ) - - @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index 8a699bc38..a3a380865 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer +from increase.types import WireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,117 +18,157 @@ class TestWireTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_method_reverse(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.reverse( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + def test_raw_response_reverse(self, client: Increase) -> None: + response = client.simulations.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + def test_streaming_response_reverse(self, client: Increase) -> None: + with client.simulations.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_reverse(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.simulations.wire_transfers.with_raw_response.reverse( + "", + ) + + @parametrize + def test_method_submit(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.submit( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.wire_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_raw_response_submit(self, client: Increase) -> None: + response = client.simulations.wire_transfers.with_raw_response.submit( + "wire_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.wire_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_streaming_response_submit(self, client: Increase) -> None: + with client.simulations.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + @parametrize + def test_path_params_submit(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.simulations.wire_transfers.with_raw_response.submit( + "", + ) + class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_method_reverse(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.reverse( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.simulations.wire_transfers.with_raw_response.reverse( + "", + ) + + @parametrize + async def test_method_submit(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.submit( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.wire_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_transfers.with_raw_response.submit( + "wire_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.wire_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.simulations.wire_transfers.with_raw_response.submit( + "", + ) diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 831a7d63d..16237cb72 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -226,7 +226,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -359,7 +359,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index 3e10525b4..bb8567116 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 583d3bb1a..10647a3db 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -261,7 +261,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -295,7 +295,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -345,7 +345,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -412,7 +412,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index fd8212eb7..3f80d108f 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -236,7 +236,6 @@ def test_path_params_balance(self, client: Increase) -> None: account_id="", ) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_close(self, client: Increase) -> None: account = client.accounts.close( @@ -244,7 +243,6 @@ def test_method_close(self, client: Increase) -> None: ) assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_close(self, client: Increase) -> None: response = client.accounts.with_raw_response.close( @@ -256,7 +254,6 @@ def test_raw_response_close(self, client: Increase) -> None: account = response.parse() assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_close(self, client: Increase) -> None: with client.accounts.with_streaming_response.close( @@ -270,7 +267,6 @@ def test_streaming_response_close(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_close(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -307,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -338,7 +334,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -384,7 +380,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -436,7 +432,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize @@ -473,7 +469,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(BalanceLookup, account, path=["response"]) @parametrize @@ -496,7 +492,6 @@ async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: account_id="", ) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_close(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.close( @@ -504,7 +499,6 @@ async def test_method_close(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.close( @@ -513,10 +507,9 @@ async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_close(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.close( @@ -530,7 +523,6 @@ async def test_streaming_response_close(self, async_client: AsyncIncrease) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_close(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 00305a15f..67c8ab1f9 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -197,7 +197,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -230,7 +230,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -281,7 +281,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 847819f0a..1012385b3 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -341,7 +341,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -425,7 +425,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize @@ -454,7 +454,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -492,7 +492,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index aae5586f5..6b59f1696 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -218,7 +218,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -251,7 +251,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -298,7 +298,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index b6385c70e..8d7b8942e 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = response.parse() + bookkeeping_entry = await response.parse() assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = response.parse() + bookkeeping_entry = await response.parse() assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 1fab3a87d..c1ed6de1b 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -311,7 +311,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 2cb7b1d91..1f75f3301 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -153,7 +153,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -185,7 +185,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -235,7 +235,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index b18e4bac9..64ce7f77d 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = response.parse() + card_payment = await response.parse() assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = response.parse() + card_payment = await response.parse() assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 7483ce1f7..172656d19 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = response.parse() + card_purchase_supplement = await response.parse() assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = response.parse() + card_purchase_supplement = await response.parse() assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 45b5abd5d..03606b54a 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -211,15 +211,15 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_retrieve_sensitive_details(self, client: Increase) -> None: - card = client.cards.retrieve_sensitive_details( + def test_method_details(self, client: Increase) -> None: + card = client.cards.details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None: - response = client.cards.with_raw_response.retrieve_sensitive_details( + def test_raw_response_details(self, client: Increase) -> None: + response = client.cards.with_raw_response.details( "card_id", ) @@ -229,8 +229,8 @@ def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_streaming_response_retrieve_sensitive_details(self, client: Increase) -> None: - with client.cards.with_streaming_response.retrieve_sensitive_details( + def test_streaming_response_details(self, client: Increase) -> None: + with client.cards.with_streaming_response.details( "card_id", ) as response: assert not response.is_closed @@ -242,9 +242,9 @@ def test_streaming_response_retrieve_sensitive_details(self, client: Increase) - assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_retrieve_sensitive_details(self, client: Increase) -> None: + def test_path_params_details(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.cards.with_raw_response.retrieve_sensitive_details( + client.cards.with_raw_response.details( "", ) @@ -288,7 +288,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -319,7 +319,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -429,7 +429,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize @@ -444,26 +444,26 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.retrieve_sensitive_details( + async def test_method_details(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_raw_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.cards.with_raw_response.retrieve_sensitive_details( + async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.details( "card_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_streaming_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - async with async_client.cards.with_streaming_response.retrieve_sensitive_details( + async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.details( "card_id", ) as response: assert not response.is_closed @@ -475,8 +475,8 @@ async def test_streaming_response_retrieve_sensitive_details(self, async_client: assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: + async def test_path_params_details(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.cards.with_raw_response.retrieve_sensitive_details( + await async_client.cards.with_raw_response.details( "", ) diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index 1ec22ea43..adab057c6 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -185,7 +185,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -219,7 +219,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -269,7 +269,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index efb753353..0f21979ea 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -247,7 +247,6 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -255,7 +254,6 @@ def test_method_stop_payment(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -264,7 +262,6 @@ def test_method_stop_payment_with_all_params(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_raw_response_stop_payment(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.stop_payment( @@ -276,7 +273,6 @@ def test_raw_response_stop_payment(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_streaming_response_stop_payment(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.stop_payment( @@ -290,7 +286,6 @@ def test_streaming_response_stop_payment(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_path_params_stop_payment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -355,7 +350,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -388,7 +383,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -438,7 +433,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize @@ -467,7 +462,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -505,7 +500,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -528,7 +523,6 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: "", ) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -536,7 +530,6 @@ async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -545,7 +538,6 @@ async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncr ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.stop_payment( @@ -554,10 +546,9 @@ async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> N assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.stop_payment( @@ -571,7 +562,6 @@ async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_path_params_stop_payment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 91eb1f8e4..105398249 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = response.parse() + declined_transaction = await response.parse() assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = response.parse() + declined_transaction = await response.parse() assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index d1e2e7e37..743166a0a 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -338,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -384,7 +384,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize @@ -413,7 +413,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -473,7 +473,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 13d3eb9e8..368ff689c 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = response.parse() + digital_wallet_token = await response.parse() assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = response.parse() + digital_wallet_token = await response.parse() assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index d8eedd34e..ed0699d51 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 05589eafa..29bd4ef39 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -548,6 +548,48 @@ def test_path_params_archive(self, client: Increase) -> None: "", ) + @parametrize + def test_method_archive_beneficial_owner(self, client: Increase) -> None: + entity = client.entities.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_archive_beneficial_owner(self, client: Increase) -> None: + response = client.entities.with_raw_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_archive_beneficial_owner(self, client: Increase) -> None: + with client.entities.with_streaming_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_archive_beneficial_owner(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.archive_beneficial_owner( + entity_id="", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + @parametrize def test_method_confirm(self, client: Increase) -> None: entity = client.entities.confirm( @@ -594,6 +636,157 @@ def test_path_params_confirm(self, client: Increase) -> None: entity_id="", ) + @parametrize + def test_method_create_beneficial_owner(self, client: Increase) -> None: + entity = client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_method_create_beneficial_owner_with_all_params(self, client: Increase) -> None: + entity = client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: + response = client.entities.with_raw_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_create_beneficial_owner(self, client: Increase) -> None: + with client.entities.with_streaming_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_beneficial_owner(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.create_beneficial_owner( + entity_id="", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + @parametrize def test_method_update_address(self, client: Increase) -> None: entity = client.entities.update_address( @@ -670,6 +863,129 @@ def test_path_params_update_address(self, client: Increase) -> None: }, ) + @parametrize + def test_method_update_beneficial_owner_address(self, client: Increase) -> None: + entity = client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_method_update_beneficial_owner_address_with_all_params(self, client: Increase) -> None: + entity = client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> None: + response = client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_update_beneficial_owner_address(self, client: Increase) -> None: + with client.entities.with_streaming_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_beneficial_owner_address(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + @parametrize + def test_method_update_industry_code(self, client: Increase) -> None: + entity = client.entities.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_update_industry_code(self, client: Increase) -> None: + response = client.entities.with_raw_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_update_industry_code(self, client: Increase) -> None: + with client.entities.with_streaming_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_industry_code(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.update_industry_code( + entity_id="", + industry_code="5132", + ) + class TestAsyncEntities: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -1068,7 +1384,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1099,7 +1415,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1149,7 +1465,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize @@ -1178,7 +1494,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1201,6 +1517,48 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: "", ) + @parametrize + async def test_method_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.archive_beneficial_owner( + entity_id="", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + @parametrize async def test_method_confirm(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.confirm( @@ -1224,7 +1582,7 @@ async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1247,6 +1605,157 @@ async def test_path_params_confirm(self, async_client: AsyncIncrease) -> None: entity_id="", ) + @parametrize + async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_method_create_beneficial_owner_with_all_params(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.create_beneficial_owner( + entity_id="", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + @parametrize async def test_method_update_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( @@ -1288,7 +1797,7 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1322,3 +1831,126 @@ async def test_path_params_update_address(self, async_client: AsyncIncrease) -> "zip": "10045", }, ) + + @parametrize + async def test_method_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_method_update_beneficial_owner_address_with_all_params(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + @parametrize + async def test_method_update_industry_code(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_update_industry_code(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_update_industry_code(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_industry_code(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.update_industry_code( + entity_id="", + industry_code="5132", + ) diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 1106f1fdf..877e24f0f 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -208,7 +208,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -239,7 +239,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -285,7 +285,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -328,7 +328,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 4a4ffb2e0..d750217e1 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = response.parse() + event = await response.parse() assert_matches_type(Event, event, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = response.parse() + event = await response.parse() assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index c51bc3931..ff2ef1b62 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -239,7 +239,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -270,7 +270,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -321,7 +321,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 8a7d82b66..6e17b34d0 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -352,7 +352,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 44d842d97..e8cac448b 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -171,7 +171,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -203,7 +203,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -253,7 +253,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index f0b1a4e4d..08e11a8db 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -18,13 +18,13 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve_details(self, client: Increase) -> None: - group = client.groups.retrieve_details() + def test_method_retrieve(self, client: Increase) -> None: + group = client.groups.retrieve() assert_matches_type(Group, group, path=["response"]) @parametrize - def test_raw_response_retrieve_details(self, client: Increase) -> None: - response = client.groups.with_raw_response.retrieve_details() + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.groups.with_raw_response.retrieve() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -32,8 +32,8 @@ def test_raw_response_retrieve_details(self, client: Increase) -> None: assert_matches_type(Group, group, path=["response"]) @parametrize - def test_streaming_response_retrieve_details(self, client: Increase) -> None: - with client.groups.with_streaming_response.retrieve_details() as response: + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.groups.with_streaming_response.retrieve() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -47,22 +47,22 @@ class TestAsyncGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve_details(self, async_client: AsyncIncrease) -> None: - group = await async_client.groups.retrieve_details() + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + group = await async_client.groups.retrieve() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_raw_response_retrieve_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.groups.with_raw_response.retrieve_details() + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.groups.with_raw_response.retrieve() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - group = response.parse() + group = await response.parse() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_streaming_response_retrieve_details(self, async_client: AsyncIncrease) -> None: - async with async_client.groups.with_streaming_response.retrieve_details() as response: + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.groups.with_streaming_response.retrieve() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index d82fcb32d..ba9abf32d 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -104,16 +104,25 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_decline(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + def test_method_create_notification_of_change(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_decline(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + def test_method_create_notification_of_change_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create_notification_of_change(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -122,9 +131,9 @@ def test_raw_response_decline(self, client: Increase) -> None: assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_decline(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -135,34 +144,25 @@ def test_streaming_response_decline(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_decline(self, client: Increase) -> None: + def test_path_params_create_notification_of_change(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.decline( - "", + client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="", ) @parametrize - def test_method_notification_of_change(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_method_notification_of_change_with_all_params(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + def test_method_decline(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_notification_of_change(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_raw_response_decline(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -171,9 +171,9 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_notification_of_change(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_streaming_response_decline(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,12 +184,12 @@ def test_streaming_response_notification_of_change(self, client: Increase) -> No assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_notification_of_change(self, client: Increase) -> None: + def test_path_params_decline(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="", + client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize @@ -255,7 +255,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize @@ -308,7 +308,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize @@ -323,27 +323,36 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_decline(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + async def test_method_create_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,45 +363,36 @@ async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: + async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.decline( - "", + await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="", ) @parametrize - async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_method_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + async def test_method_decline(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,12 +403,12 @@ async def test_streaming_response_notification_of_change(self, async_client: Asy assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="", + await async_client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize @@ -428,7 +428,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index c723a8457..54109446a 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -140,6 +140,50 @@ def test_path_params_decline(self, client: Increase) -> None: "", ) + @parametrize + def test_method_return(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_return(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_return(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_return(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) + class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -159,7 +203,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -211,7 +255,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize @@ -240,7 +284,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -264,3 +308,47 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: await async_client.inbound_check_deposits.with_raw_response.decline( "", ) + + @parametrize + async def test_method_return(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_return(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 37b399b81..eed29b796 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = response.parse() + inbound_mail_item = await response.parse() assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = response.parse() + inbound_mail_item = await response.parse() assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 48ec873d2..6fa65219f 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -110,7 +110,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize @@ -154,7 +154,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 99f2454cc..2ed890683 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = response.parse() + inbound_wire_transfer = await response.parse() assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = response.parse() + inbound_wire_transfer = await response.parse() assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/intrafi/test_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py similarity index 63% rename from tests/api_resources/intrafi/test_account_enrollments.py rename to tests/api_resources/test_intrafi_account_enrollments.py index 1b37f1c5a..d595132f9 100644 --- a/tests/api_resources/intrafi/test_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -9,79 +9,79 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import ( +from increase.types import ( IntrafiAccountEnrollment, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestAccountEnrollments: +class TestIntrafiAccountEnrollments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.create( + intrafi_account_enrollment = client.intrafi_account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.create( + response = client.intrafi_account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.create( + with client.intrafi_account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.retrieve( + intrafi_account_enrollment = client.intrafi_account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.retrieve( + response = client.intrafi_account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.retrieve( + with client.intrafi_account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,74 +90,74 @@ def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi.account_enrollments.with_raw_response.retrieve( + client.intrafi_account_enrollments.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.list() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = client.intrafi_account_enrollments.list() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.list( + intrafi_account_enrollment = client.intrafi_account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.list() + response = client.intrafi_account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.list() as response: + with client.intrafi_account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_unenroll(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.unenroll( + intrafi_account_enrollment = client.intrafi_account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_unenroll(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.unenroll( + response = client.intrafi_account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_unenroll(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.unenroll( + with client.intrafi_account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -166,76 +166,76 @@ def test_path_params_unenroll(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi.account_enrollments.with_raw_response.unenroll( + client.intrafi_account_enrollments.with_raw_response.unenroll( "", ) -class TestAsyncAccountEnrollments: +class TestAsyncIntrafiAccountEnrollments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.create( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.create( + response = await async_client.intrafi_account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.create( + async with async_client.intrafi_account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.retrieve( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.retrieve( + response = await async_client.intrafi_account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.retrieve( + async with async_client.intrafi_account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,74 +244,74 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi.account_enrollments.with_raw_response.retrieve( + await async_client.intrafi_account_enrollments.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.list() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.list( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.list() + response = await async_client.intrafi_account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.list() as response: + async with async_client.intrafi_account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_unenroll(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.unenroll( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.unenroll( + response = await async_client.intrafi_account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_unenroll(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.unenroll( + async with async_client.intrafi_account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,6 +320,6 @@ async def test_path_params_unenroll(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi.account_enrollments.with_raw_response.unenroll( + await async_client.intrafi_account_enrollments.with_raw_response.unenroll( "", ) diff --git a/tests/api_resources/intrafi/test_balances.py b/tests/api_resources/test_intrafi_balances.py similarity index 66% rename from tests/api_resources/intrafi/test_balances.py rename to tests/api_resources/test_intrafi_balances.py index 72d34bcdc..4e3f99c2b 100644 --- a/tests/api_resources/intrafi/test_balances.py +++ b/tests/api_resources/test_intrafi_balances.py @@ -9,90 +9,90 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.intrafi import IntrafiBalance +from increase.types import IntrafiBalance base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestBalances: +class TestIntrafiBalances: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_retrieve(self, client: Increase) -> None: - balance = client.intrafi.balances.retrieve( + intrafi_balance = client.intrafi_balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, balance, path=["response"]) + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.balances.with_raw_response.retrieve( + response = client.intrafi_balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.balances.with_streaming_response.retrieve( + with client.intrafi_balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.intrafi.balances.with_raw_response.retrieve( + client.intrafi_balances.with_raw_response.retrieve( "", ) -class TestAsyncBalances: +class TestAsyncIntrafiBalances: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - balance = await async_client.intrafi.balances.retrieve( + intrafi_balance = await async_client.intrafi_balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, balance, path=["response"]) + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.balances.with_raw_response.retrieve( + response = await async_client.intrafi_balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = await response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.balances.with_streaming_response.retrieve( + async with async_client.intrafi_balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = await response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = await response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.intrafi.balances.with_raw_response.retrieve( + await async_client.intrafi_balances.with_raw_response.retrieve( "", ) diff --git a/tests/api_resources/intrafi/test_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py similarity index 61% rename from tests/api_resources/intrafi/test_exclusions.py rename to tests/api_resources/test_intrafi_exclusions.py index ff29e3655..46c12e185 100644 --- a/tests/api_resources/intrafi/test_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -9,305 +9,305 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import IntrafiExclusion from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import IntrafiExclusion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestExclusions: +class TestIntrafiExclusions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.create( + intrafi_exclusion = client.intrafi_exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.create( + response = client.intrafi_exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.create( + with client.intrafi_exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.retrieve( + intrafi_exclusion = client.intrafi_exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.retrieve( + response = client.intrafi_exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.retrieve( + with client.intrafi_exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi.exclusions.with_raw_response.retrieve( + client.intrafi_exclusions.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.list() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = client.intrafi_exclusions.list() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.list( + intrafi_exclusion = client.intrafi_exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.list() + response = client.intrafi_exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.list() as response: + with client.intrafi_exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_archive(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.archive( + intrafi_exclusion = client.intrafi_exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.archive( + response = client.intrafi_exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_archive(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.archive( + with client.intrafi_exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_archive(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi.exclusions.with_raw_response.archive( + client.intrafi_exclusions.with_raw_response.archive( "", ) -class TestAsyncExclusions: +class TestAsyncIntrafiExclusions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.create( + intrafi_exclusion = await async_client.intrafi_exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.create( + response = await async_client.intrafi_exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.create( + async with async_client.intrafi_exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.retrieve( + intrafi_exclusion = await async_client.intrafi_exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.retrieve( + response = await async_client.intrafi_exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.retrieve( + async with async_client.intrafi_exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi.exclusions.with_raw_response.retrieve( + await async_client.intrafi_exclusions.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.list() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await async_client.intrafi_exclusions.list() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.list( + intrafi_exclusion = await async_client.intrafi_exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.list() + response = await async_client.intrafi_exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.list() as response: + async with async_client.intrafi_exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.archive( + intrafi_exclusion = await async_client.intrafi_exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.archive( + response = await async_client.intrafi_exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.archive( + async with async_client.intrafi_exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi.exclusions.with_raw_response.archive( + await async_client.intrafi_exclusions.with_raw_response.archive( "", ) diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index f2080a6f8..60459796b 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -211,7 +211,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -242,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -339,7 +339,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 2de34e5ea..83ca7370a 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -109,7 +109,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = response.parse() + oauth_connection = await response.parse() assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize @@ -152,7 +152,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = response.parse() + oauth_connection = await response.parse() assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index fac339dc0..1ac7113db 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -89,7 +89,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_token = response.parse() + oauth_token = await response.parse() assert_matches_type(OAuthToken, oauth_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index ee91ef1e2..0147f5a77 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -122,7 +122,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = response.parse() + pending_transaction = await response.parse() assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize @@ -177,7 +177,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = response.parse() + pending_transaction = await response.parse() assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 8208a1991..0289dea89 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -255,7 +255,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize @@ -364,7 +364,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -419,7 +419,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index fd97f23b7..a9c8fafda 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -312,7 +312,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -357,7 +357,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -397,7 +397,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -449,7 +449,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 92f6d417f..e78fd1cdb 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index edd1d1c1c..3e30c8f76 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -259,7 +259,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -306,7 +306,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -365,7 +365,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( AsyncPage[ProofOfAuthorizationRequestSubmission], proof_of_authorization_request_submission, diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index 3ea91f58e..67f041080 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -119,7 +119,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() + proof_of_authorization_request = await response.parse() assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() + proof_of_authorization_request = await response.parse() assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 3fb14837f..e85150cdb 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = response.parse() + real_time_decision = await response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize @@ -182,7 +182,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = response.parse() + real_time_decision = await response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index 5d719a69c..de382db0d 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -219,7 +219,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -325,7 +325,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] ) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 1e84a5648..8e90ed78e 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -202,7 +202,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -236,7 +236,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index c0896e7cd..f635f5d1a 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RoutingNumber +from increase.types import RoutingNumberListResponse from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_list(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -32,7 +32,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -43,7 +43,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -54,7 +54,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -67,7 +67,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -76,7 +76,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -86,8 +86,8 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - routing_number = response.parse() - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + routing_number = await response.parse() + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -98,6 +98,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py deleted file mode 100644 index 0e4ff50ae..000000000 --- a/tests/api_resources/test_simulations.py +++ /dev/null @@ -1,318 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ( - CardPayment, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSimulations: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_card_authorization_expirations(self, client: Increase) -> None: - simulation = client.simulations.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_authorization_expirations(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_authorization_expirations(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_fuel_confirmations(self, client: Increase) -> None: - simulation = client.simulations.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_fuel_confirmations(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_fuel_confirmations(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_increments(self, client: Increase) -> None: - simulation = client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_method_card_increments_with_all_params(self, client: Increase) -> None: - simulation = client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_increments(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_increments(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_reversals(self, client: Increase) -> None: - simulation = client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_method_card_reversals_with_all_params(self, client: Increase) -> None: - simulation = client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_reversals(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_reversals(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncSimulations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_increments(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_method_card_increments_with_all_params(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_increments(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_increments(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_reversals(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_method_card_reversals_with_all_params(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_reversals(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_reversals(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py similarity index 58% rename from tests/api_resources/entities/test_supplemental_documents.py rename to tests/api_resources/test_supplemental_documents.py index 4b97f4110..e20cb1bb5 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/test_supplemental_documents.py @@ -9,11 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Entity -from increase.pagination import SyncPage, AsyncPage -from increase.types.entities import ( - SupplementalDocument, +from increase.types import ( + EntitySupplementalDocument, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,15 +22,15 @@ class TestSupplementalDocuments: @parametrize def test_method_create(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.create( + supplemental_document = client.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.supplemental_documents.with_raw_response.create( + response = client.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) @@ -39,11 +38,11 @@ def test_raw_response_create(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.supplemental_documents.with_streaming_response.create( + with client.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -51,56 +50,48 @@ def test_streaming_response_create(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True - @parametrize - def test_path_params_create(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.supplemental_documents.with_raw_response.create( - entity_id="", - file_id="file_makxrc67oh9l6sg7w9yc", - ) - @parametrize def test_method_list(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.list( + supplemental_document = client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.list( + supplemental_document = client.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.entities.supplemental_documents.with_raw_response.list( + response = client.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.entities.supplemental_documents.with_streaming_response.list( + with client.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -110,27 +101,27 @@ class TestAsyncSupplementalDocuments: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.create( + supplemental_document = await async_client.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.supplemental_documents.with_raw_response.create( + response = await async_client.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + supplemental_document = await response.parse() + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.supplemental_documents.with_streaming_response.create( + async with async_client.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -138,55 +129,47 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True - @parametrize - async def test_path_params_create(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.supplemental_documents.with_raw_response.create( - entity_id="", - file_id="file_makxrc67oh9l6sg7w9yc", - ) - @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.list( + supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.list( + supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.supplemental_documents.with_raw_response.list( + response = await async_client.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = response.parse() - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + supplemental_document = await response.parse() + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.supplemental_documents.with_streaming_response.list( + async with async_client.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 2f1f3522e..b8dea8d52 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = response.parse() + transaction = await response.parse() assert_matches_type(Transaction, transaction, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = response.parse() + transaction = await response.parse() assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 4ed4db948..0acdbcd09 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -18,7 +18,6 @@ class TestWireDrawdownRequests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -31,7 +30,6 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -51,7 +49,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.create( @@ -68,7 +65,6 @@ def test_raw_response_create(self, client: Increase) -> None: wire_drawdown_request = response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.create( @@ -166,7 +162,6 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncWireDrawdownRequests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -179,7 +174,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -199,7 +193,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.create( @@ -213,10 +206,9 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.wire_drawdown_requests.with_streaming_response.create( @@ -250,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize @@ -296,7 +288,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 98d7c85e6..3419dbccf 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -236,90 +236,6 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_method_reverse(self, client: Increase) -> None: - wire_transfer = client.wire_transfers.reverse( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_raw_response_reverse(self, client: Increase) -> None: - response = client.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_streaming_response_reverse(self, client: Increase) -> None: - with client.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_path_params_reverse(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.wire_transfers.with_raw_response.reverse( - "", - ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_method_submit(self, client: Increase) -> None: - wire_transfer = client.wire_transfers.submit( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_raw_response_submit(self, client: Increase) -> None: - response = client.wire_transfers.with_raw_response.submit( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_streaming_response_submit(self, client: Increase) -> None: - with client.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_path_params_submit(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.wire_transfers.with_raw_response.submit( - "", - ) - class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -366,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -400,7 +316,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -451,7 +367,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize @@ -480,7 +396,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -518,7 +434,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -540,87 +456,3 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: await async_client.wire_transfers.with_raw_response.cancel( "", ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_method_reverse(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.wire_transfers.reverse( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: - response = await async_client.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: - async with async_client.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.wire_transfers.with_raw_response.reverse( - "", - ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_method_submit(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.wire_transfers.submit( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: - response = await async_client.wire_transfers.with_raw_response.submit( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: - async with async_client.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.wire_transfers.with_raw_response.submit( - "", - ) diff --git a/tests/conftest.py b/tests/conftest.py index 731a67982..120908a4c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,18 +1,16 @@ from __future__ import annotations +import os import asyncio import logging -from typing import Iterator +from typing import TYPE_CHECKING, Iterator, AsyncIterator import pytest -import os -from typing import TYPE_CHECKING, AsyncIterator - from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -30,20 +28,22 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" + @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') + raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client + @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {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 : + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client diff --git a/tests/test_client.py b/tests/test_client.py index 230905c3f..874f4fc0a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -661,97 +661,6 @@ def test_absolute_request_url(self, client: Increase) -> None: ) assert request.url == "https://myapi.com/foo" - def test_transport_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", - ): - transport = httpx.MockTransport( - lambda: None, # type: ignore - ) - - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport) - - assert client._client._transport is transport - - def test_transport_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - transport=httpx.MockTransport( - lambda: None, # type: ignore - ), - http_client=http_client, - ) - - def test_connection_pool_limits_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - ): - connection_pool_limits = httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ) - - client = Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=connection_pool_limits, - ) - - assert isinstance(client._client._transport, httpx.HTTPTransport) - assert client._client._transport._pool._max_connections == 101 - assert client._client._transport._pool._max_keepalive_connections == 76 - assert client._client._transport._pool._keepalive_expiry == 23 - - def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises( - ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" - ): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ), - http_client=http_client, - ) - - def test_proxies_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - ): - proxies = "https://www.example.com/proxy" - - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies) - - mounts = list(client._client._mounts.keys()) - assert len(mounts) == 1 - - pattern = mounts[0].pattern - assert pattern == "all://" - - def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - proxies="https://www.example.com/proxy", - http_client=http_client, - ) - def test_copied_client_does_not_close_http(self) -> None: client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -841,7 +750,14 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No with pytest.raises(APITimeoutError): self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -856,7 +772,14 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non with pytest.raises(APIStatusError): self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1484,101 +1407,6 @@ def test_absolute_request_url(self, client: AsyncIncrease) -> None: ) assert request.url == "https://myapi.com/foo" - def test_transport_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", - ): - transport = httpx.MockTransport( - lambda: None, # type: ignore - ) - - client = AsyncIncrease( - base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport - ) - - assert client._client._transport is transport - - async def test_transport_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - transport=httpx.MockTransport( - lambda: None, # type: ignore - ), - http_client=http_client, - ) - - def test_connection_pool_limits_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - ): - connection_pool_limits = httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ) - - client = AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=connection_pool_limits, - ) - - assert isinstance(client._client._transport, httpx.AsyncHTTPTransport) - assert client._client._transport._pool._max_connections == 101 - assert client._client._transport._pool._max_keepalive_connections == 76 - assert client._client._transport._pool._keepalive_expiry == 23 - - async def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises( - ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" - ): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ), - http_client=http_client, - ) - - def test_proxies_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - ): - proxies = "https://www.example.com/proxy" - - client = AsyncIncrease( - base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies - ) - - mounts = list(client._client._mounts.keys()) - assert len(mounts) == 1 - - pattern = mounts[0].pattern - assert pattern == "all://" - - async def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - proxies="https://www.example.com/proxy", - http_client=http_client, - ) - async def test_copied_client_does_not_close_http(self) -> None: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -1674,7 +1502,14 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APITimeoutError): await self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1689,7 +1524,14 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APIStatusError): await self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) diff --git a/tests/test_files.py b/tests/test_files.py index 42fa7ae0a..f46618d02 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path =Path(__file__).parent.parent.joinpath("README.md") +readme_path = Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([('file', readme_path)]) + result = to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([('file', readme_path)]) + result = await async_to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) def test_string_not_allowed() -> None: @@ -49,4 +49,3 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) - diff --git a/tests/test_legacy_response.py b/tests/test_legacy_response.py deleted file mode 100644 index f1199aa64..000000000 --- a/tests/test_legacy_response.py +++ /dev/null @@ -1,84 +0,0 @@ -import json -from typing import cast -from typing_extensions import Annotated - -import httpx -import pytest -import pydantic - -from increase import Increase, BaseModel -from increase._streaming import Stream -from increase._base_client import FinalRequestOptions -from increase._legacy_response import LegacyAPIResponse - - -class PydanticModel(pydantic.BaseModel): - ... - - -def test_response_parse_mismatched_basemodel(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=b"foo"), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - with pytest.raises( - TypeError, - match="Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`", - ): - response.parse(to=PydanticModel) - - -def test_response_parse_custom_stream(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=b"foo"), - client=client, - stream=True, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - stream = response.parse(to=Stream[int]) - assert stream._cast_to == int - - -class CustomModel(BaseModel): - foo: str - bar: int - - -def test_response_parse_custom_model(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - obj = response.parse(to=CustomModel) - assert obj.foo == "hello!" - assert obj.bar == 2 - - -def test_response_parse_annotated_type(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - obj = response.parse( - to=cast("type[CustomModel]", Annotated[CustomModel, "random metadata"]), - ) - assert obj.foo == "hello!" - assert obj.bar == 2 diff --git a/tests/test_response.py b/tests/test_response.py index e743d69e2..7da95c19c 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import BaseModel, Increase, AsyncIncrease +from increase import Increase, BaseModel, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index ac4693911..4dd59699e 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,9 +28,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -46,9 +44,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -64,9 +60,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -88,9 +82,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -114,9 +106,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -138,9 +128,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -157,9 +145,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From 3f3d1e88bbaec8ae6ccd767f367bd4d11681f86c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:22:18 +0000 Subject: [PATCH 0088/1325] revert custom code applied to generated branch (#511) Co-authored-by: Stainless Bot --- .release-please-manifest.json | 2 +- README.md | 35 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 +- src/increase/_base_client.py | 83 +- src/increase/_client.py | 757 +--- src/increase/_compat.py | 6 +- src/increase/_legacy_response.py | 456 ++ src/increase/_qs.py | 26 +- src/increase/_response.py | 12 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 + src/increase/_utils/_data.py | 56 - src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- src/increase/resources/__init__.py | 1222 +++--- src/increase/resources/account_numbers.py | 62 +- src/increase/resources/account_statements.py | 54 +- src/increase/resources/account_transfers.py | 66 +- src/increase/resources/accounts.py | 70 +- .../resources/ach_prenotifications.py | 58 +- src/increase/resources/ach_transfers.py | 66 +- .../resources/bookkeeping_accounts.py | 62 +- src/increase/resources/bookkeeping_entries.py | 54 +- .../resources/bookkeeping_entry_sets.py | 58 +- src/increase/resources/card_disputes.py | 58 +- src/increase/resources/card_payments.py | 54 +- .../resources/card_purchase_supplements.py | 54 +- src/increase/resources/cards.py | 82 +- src/increase/resources/check_deposits.py | 58 +- src/increase/resources/check_transfers.py | 70 +- .../resources/declined_transactions.py | 54 +- .../resources/digital_card_profiles.py | 66 +- .../resources/digital_wallet_tokens.py | 54 +- src/increase/resources/documents.py | 54 +- src/increase/resources/entities/__init__.py | 61 + .../resources/entities/beneficial_owners.py | 420 ++ .../resources/{ => entities}/entities.py | 656 +-- .../resources/entities/industry_code.py | 180 + .../{ => entities}/supplemental_documents.py | 115 +- src/increase/resources/event_subscriptions.py | 62 +- src/increase/resources/events.py | 54 +- src/increase/resources/exports.py | 58 +- src/increase/resources/external_accounts.py | 62 +- src/increase/resources/files.py | 58 +- src/increase/resources/groups.py | 66 +- .../resources/inbound_ach_transfers.py | 176 +- .../resources/inbound_check_deposits.py | 187 +- src/increase/resources/inbound_mail_items.py | 54 +- .../inbound_wire_drawdown_requests.py | 54 +- .../resources/inbound_wire_transfers.py | 54 +- src/increase/resources/intrafi/__init__.py | 61 + .../account_enrollments.py} | 130 +- .../balances.py} | 82 +- .../exclusions.py} | 126 +- src/increase/resources/intrafi/intrafi.py | 144 + src/increase/resources/lockboxes.py | 62 +- src/increase/resources/oauth_connections.py | 54 +- src/increase/resources/oauth_tokens.py | 50 +- .../resources/pending_transactions.py | 54 +- .../resources/physical_card_profiles.py | 66 +- src/increase/resources/physical_cards.py | 62 +- src/increase/resources/programs.py | 54 +- ...of_of_authorization_request_submissions.py | 66 +- .../proof_of_authorization_requests.py | 54 +- src/increase/resources/real_time_decisions.py | 54 +- ...real_time_payments_request_for_payments.py | 62 +- .../resources/real_time_payments_transfers.py | 58 +- src/increase/resources/routing_numbers.py | 64 +- .../resources/simulations/__init__.py | 584 ++- .../simulations/account_statements.py | 50 +- .../simulations/account_transfers.py | 50 +- .../resources/simulations/ach_transfers.py | 263 +- .../card_authorization_expirations.py | 168 - .../resources/simulations/card_disputes.py | 50 +- .../simulations/card_fuel_confirmations.py | 188 - .../resources/simulations/card_increments.py | 198 - .../resources/simulations/card_refunds.py | 50 +- .../resources/simulations/card_reversals.py | 190 - .../resources/simulations/card_settlements.py | 202 - .../{card_authorizations.py => cards.py} | 225 +- .../resources/simulations/check_deposits.py | 58 +- .../resources/simulations/check_transfers.py | 50 +- .../digital_wallet_token_requests.py | 50 +- .../resources/simulations/documents.py | 50 +- .../simulations/inbound_ach_transfers.py | 352 -- .../simulations/inbound_check_deposits.py | 50 +- .../simulations/inbound_funds_holds.py | 50 +- .../inbound_international_ach_transfers.py | 244 ++ .../inbound_real_time_payments_transfers.py | 228 - .../inbound_wire_drawdown_requests.py | 50 +- .../simulations/inbound_wire_transfers.py | 330 -- .../simulations/interest_payments.py | 54 +- .../resources/simulations/physical_cards.py | 76 +- .../resources/simulations/programs.py | 50 +- .../real_time_payments_transfers.py | 216 +- .../resources/simulations/simulations.py | 1449 ++++--- .../resources/simulations/wire_transfers.py | 339 +- src/increase/resources/transactions.py | 54 +- .../resources/wire_drawdown_requests.py | 58 +- src/increase/resources/wire_transfers.py | 268 +- src/increase/types/__init__.py | 41 +- src/increase/types/declined_transaction.py | 257 ++ .../types/declined_transaction_list_params.py | 1 + src/increase/types/entities/__init__.py | 13 + .../beneficial_owner_archive_params.py} | 7 +- .../beneficial_owner_create_params.py} | 9 +- ...beneficial_owner_update_address_params.py} | 7 +- .../industry_code_create_params.py} | 4 +- .../supplemental_document.py} | 9 +- .../supplemental_document_create_params.py | 3 - .../supplemental_document_list_params.py | 0 src/increase/types/entity.py | 29 +- src/increase/types/inbound_ach_transfer.py | 237 - ...transfer_notification_of_change_params.py} | 4 +- src/increase/types/inbound_check_deposit.py | 11 +- .../inbound_check_deposit_return_params.py | 17 - src/increase/types/inbound_mail_item_list.py | 16 + src/increase/types/inbound_wire_transfer.py | 3 - src/increase/types/intrafi/__init__.py | 11 + .../account_enrollment_create_params.py} | 4 +- .../account_enrollment_list_params.py} | 4 +- .../exclusion_create_params.py} | 4 +- .../exclusion_list_params.py} | 4 +- .../intrafi_account_enrollment.py | 2 +- .../types/{ => intrafi}/intrafi_balance.py | 2 +- .../types/{ => intrafi}/intrafi_exclusion.py | 2 +- src/increase/types/lockbox_list.py | 16 + ...ber_list_response.py => routing_number.py} | 4 +- ..._card_authorization_expirations_params.py} | 4 +- ...ulation_card_fuel_confirmations_params.py} | 4 +- ...y => simulation_card_increments_params.py} | 4 +- ...py => simulation_card_reversals_params.py} | 4 +- src/increase/types/simulations/__init__.py | 36 +- .../ach_transfer_create_inbound_params.py | 51 + ...transfer_notification_of_change_params.py} | 4 +- .../card_authorization_create_response.py | 33 - .../card_authorization_simulation.py | 1817 ++++++++ ...ate_params.py => card_authorize_params.py} | 4 +- ...te_params.py => card_settlement_params.py} | 4 +- .../inbound_ach_transfer_create_params.py | 89 - .../inbound_international_ach_transfer.py | 260 ++ ...nternational_ach_transfer_create_params.py | 47 + ..._time_payments_transfer_create_response.py | 34 - ...ime_payments_transfer_simulation_result.py | 3857 +++++++++++++++++ ... physical_card_shipment_advance_params.py} | 4 +- ...ayments_transfer_create_inbound_params.py} | 4 +- ...=> wire_transfer_create_inbound_params.py} | 10 +- src/increase/types/transaction.py | 301 +- src/increase/types/transaction_list_params.py | 2 + src/increase/types/wire_transfer.py | 3 - tests/api_resources/entities/__init__.py | 1 + .../entities/test_beneficial_owners.py | 479 ++ .../entities/test_industry_code.py | 106 + .../test_supplemental_documents.py | 83 +- tests/api_resources/intrafi/__init__.py | 1 + .../test_account_enrollments.py} | 152 +- .../test_balances.py} | 42 +- .../test_exclusions.py} | 150 +- .../simulations/test_account_statements.py | 2 +- .../simulations/test_account_transfers.py | 10 +- .../simulations/test_ach_transfers.py | 161 +- .../test_card_authorization_expirations.py | 84 - .../simulations/test_card_authorizations.py | 116 - .../simulations/test_card_disputes.py | 2 +- .../test_card_fuel_confirmations.py | 90 - .../simulations/test_card_increments.py | 108 - .../simulations/test_card_refunds.py | 2 +- .../simulations/test_card_reversals.py | 100 - .../simulations/test_card_settlements.py | 108 - tests/api_resources/simulations/test_cards.py | 203 + .../simulations/test_check_deposits.py | 22 +- .../simulations/test_check_transfers.py | 10 +- .../test_digital_wallet_token_requests.py | 2 +- .../simulations/test_documents.py | 2 +- .../simulations/test_inbound_ach_transfers.py | 125 - .../test_inbound_check_deposits.py | 2 +- .../simulations/test_inbound_funds_holds.py | 2 +- ...est_inbound_international_ach_transfers.py | 130 + ...st_inbound_real_time_payments_transfers.py | 138 - .../test_inbound_wire_drawdown_requests.py | 2 +- .../test_inbound_wire_transfers.py | 136 - .../simulations/test_interest_payments.py | 2 +- .../simulations/test_physical_cards.py | 34 +- .../simulations/test_programs.py | 2 +- .../test_real_time_payments_transfers.py | 115 +- .../simulations/test_wire_transfers.py | 188 +- tests/api_resources/test_account_numbers.py | 8 +- .../api_resources/test_account_statements.py | 4 +- tests/api_resources/test_account_transfers.py | 10 +- tests/api_resources/test_accounts.py | 20 +- .../test_ach_prenotifications.py | 6 +- tests/api_resources/test_ach_transfers.py | 10 +- .../test_bookkeeping_accounts.py | 8 +- .../api_resources/test_bookkeeping_entries.py | 4 +- .../test_bookkeeping_entry_sets.py | 6 +- tests/api_resources/test_card_disputes.py | 6 +- tests/api_resources/test_card_payments.py | 4 +- .../test_card_purchase_supplements.py | 4 +- tests/api_resources/test_cards.py | 42 +- tests/api_resources/test_check_deposits.py | 6 +- tests/api_resources/test_check_transfers.py | 22 +- .../test_declined_transactions.py | 4 +- .../test_digital_card_profiles.py | 10 +- .../test_digital_wallet_tokens.py | 4 +- tests/api_resources/test_documents.py | 4 +- tests/api_resources/test_entities.py | 644 +-- .../api_resources/test_event_subscriptions.py | 8 +- tests/api_resources/test_events.py | 4 +- tests/api_resources/test_exports.py | 6 +- tests/api_resources/test_external_accounts.py | 8 +- tests/api_resources/test_files.py | 6 +- tests/api_resources/test_groups.py | 26 +- .../test_inbound_ach_transfers.py | 142 +- .../test_inbound_check_deposits.py | 94 +- .../api_resources/test_inbound_mail_items.py | 4 +- .../test_inbound_wire_drawdown_requests.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- tests/api_resources/test_lockboxes.py | 8 +- tests/api_resources/test_oauth_connections.py | 4 +- tests/api_resources/test_oauth_tokens.py | 2 +- .../test_pending_transactions.py | 4 +- .../test_physical_card_profiles.py | 10 +- tests/api_resources/test_physical_cards.py | 8 +- tests/api_resources/test_programs.py | 4 +- ...of_of_authorization_request_submissions.py | 6 +- .../test_proof_of_authorization_requests.py | 4 +- .../api_resources/test_real_time_decisions.py | 4 +- ...real_time_payments_request_for_payments.py | 6 +- .../test_real_time_payments_transfers.py | 6 +- tests/api_resources/test_routing_numbers.py | 20 +- tests/api_resources/test_simulations.py | 318 ++ tests/api_resources/test_transactions.py | 4 +- .../test_wire_drawdown_requests.py | 14 +- tests/api_resources/test_wire_transfers.py | 178 +- tests/conftest.py | 22 +- tests/test_client.py | 222 +- tests/test_files.py | 11 +- tests/test_legacy_response.py | 84 + tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 244 files changed, 15909 insertions(+), 10297 deletions(-) create mode 100644 src/increase/_legacy_response.py delete mode 100644 src/increase/_utils/_data.py create mode 100644 src/increase/resources/entities/__init__.py create mode 100644 src/increase/resources/entities/beneficial_owners.py rename src/increase/resources/{ => entities}/entities.py (56%) create mode 100644 src/increase/resources/entities/industry_code.py rename src/increase/resources/{ => entities}/supplemental_documents.py (75%) create mode 100644 src/increase/resources/intrafi/__init__.py rename src/increase/resources/{intrafi_account_enrollments.py => intrafi/account_enrollments.py} (79%) rename src/increase/resources/{intrafi_balances.py => intrafi/balances.py} (59%) rename src/increase/resources/{intrafi_exclusions.py => intrafi/exclusions.py} (81%) create mode 100644 src/increase/resources/intrafi/intrafi.py delete mode 100644 src/increase/resources/simulations/card_authorization_expirations.py delete mode 100644 src/increase/resources/simulations/card_fuel_confirmations.py delete mode 100644 src/increase/resources/simulations/card_increments.py delete mode 100644 src/increase/resources/simulations/card_reversals.py delete mode 100644 src/increase/resources/simulations/card_settlements.py rename src/increase/resources/simulations/{card_authorizations.py => cards.py} (54%) delete mode 100644 src/increase/resources/simulations/inbound_ach_transfers.py create mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py delete mode 100644 src/increase/resources/simulations/inbound_real_time_payments_transfers.py delete mode 100644 src/increase/resources/simulations/inbound_wire_transfers.py create mode 100644 src/increase/types/entities/__init__.py rename src/increase/types/{entity_archive_beneficial_owner_params.py => entities/beneficial_owner_archive_params.py} (63%) rename src/increase/types/{entity_create_beneficial_owner_params.py => entities/beneficial_owner_create_params.py} (95%) rename src/increase/types/{entity_update_beneficial_owner_address_params.py => entities/beneficial_owner_update_address_params.py} (82%) rename src/increase/types/{entity_update_industry_code_params.py => entities/industry_code_create_params.py} (84%) rename src/increase/types/{entity_supplemental_document.py => entities/supplemental_document.py} (81%) rename src/increase/types/{ => entities}/supplemental_document_create_params.py (76%) rename src/increase/types/{ => entities}/supplemental_document_list_params.py (100%) rename src/increase/types/{inbound_ach_transfer_create_notification_of_change_params.py => inbound_ach_transfer_notification_of_change_params.py} (72%) delete mode 100644 src/increase/types/inbound_check_deposit_return_params.py create mode 100644 src/increase/types/inbound_mail_item_list.py create mode 100644 src/increase/types/intrafi/__init__.py rename src/increase/types/{intrafi_account_enrollment_create_params.py => intrafi/account_enrollment_create_params.py} (76%) rename src/increase/types/{intrafi_account_enrollment_list_params.py => intrafi/account_enrollment_list_params.py} (90%) rename src/increase/types/{intrafi_exclusion_create_params.py => intrafi/exclusion_create_params.py} (78%) rename src/increase/types/{intrafi_exclusion_list_params.py => intrafi/exclusion_list_params.py} (88%) rename src/increase/types/{ => intrafi}/intrafi_account_enrollment.py (98%) rename src/increase/types/{ => intrafi}/intrafi_balance.py (98%) rename src/increase/types/{ => intrafi}/intrafi_exclusion.py (98%) create mode 100644 src/increase/types/lockbox_list.py rename src/increase/types/{routing_number_list_response.py => routing_number.py} (94%) rename src/increase/types/{simulations/card_authorization_expiration_create_params.py => simulation_card_authorization_expirations_params.py} (66%) rename src/increase/types/{simulations/card_fuel_confirmation_create_params.py => simulation_card_fuel_confirmations_params.py} (78%) rename src/increase/types/{simulations/card_increment_create_params.py => simulation_card_increments_params.py} (87%) rename src/increase/types/{simulations/card_reversal_create_params.py => simulation_card_reversals_params.py} (80%) create mode 100644 src/increase/types/simulations/ach_transfer_create_inbound_params.py rename src/increase/types/simulations/{ach_transfer_create_notification_of_change_params.py => ach_transfer_notification_of_change_params.py} (96%) delete mode 100644 src/increase/types/simulations/card_authorization_create_response.py create mode 100644 src/increase/types/simulations/card_authorization_simulation.py rename src/increase/types/simulations/{card_authorization_create_params.py => card_authorize_params.py} (93%) rename src/increase/types/simulations/{card_settlement_create_params.py => card_settlement_params.py} (84%) delete mode 100644 src/increase/types/simulations/inbound_ach_transfer_create_params.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py delete mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py create mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py rename src/increase/types/simulations/{physical_card_advance_shipment_params.py => physical_card_shipment_advance_params.py} (90%) rename src/increase/types/simulations/{inbound_real_time_payments_transfer_create_params.py => real_time_payments_transfer_create_inbound_params.py} (88%) rename src/increase/types/simulations/{inbound_wire_transfer_create_params.py => wire_transfer_create_inbound_params.py} (91%) create mode 100644 tests/api_resources/entities/__init__.py create mode 100644 tests/api_resources/entities/test_beneficial_owners.py create mode 100644 tests/api_resources/entities/test_industry_code.py rename tests/api_resources/{ => entities}/test_supplemental_documents.py (58%) create mode 100644 tests/api_resources/intrafi/__init__.py rename tests/api_resources/{test_intrafi_account_enrollments.py => intrafi/test_account_enrollments.py} (63%) rename tests/api_resources/{test_intrafi_balances.py => intrafi/test_balances.py} (66%) rename tests/api_resources/{test_intrafi_exclusions.py => intrafi/test_exclusions.py} (61%) delete mode 100644 tests/api_resources/simulations/test_card_authorization_expirations.py delete mode 100644 tests/api_resources/simulations/test_card_authorizations.py delete mode 100644 tests/api_resources/simulations/test_card_fuel_confirmations.py delete mode 100644 tests/api_resources/simulations/test_card_increments.py delete mode 100644 tests/api_resources/simulations/test_card_reversals.py delete mode 100644 tests/api_resources/simulations/test_card_settlements.py create mode 100644 tests/api_resources/simulations/test_cards.py delete mode 100644 tests/api_resources/simulations/test_inbound_ach_transfers.py create mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py delete mode 100644 tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py delete mode 100644 tests/api_resources/simulations/test_inbound_wire_transfers.py create mode 100644 tests/api_resources/test_simulations.py create mode 100644 tests/test_legacy_response.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6772f01dc..f7e971ead 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.71.0" + ".": "0.61.0" } \ No newline at end of file diff --git a/README.md b/README.md index 1f137aa0e..2dc0b9cba 100644 --- a/README.md +++ b/README.md @@ -61,15 +61,13 @@ client = AsyncIncrease( environment="sandbox", ) - async def main() -> None: - account = await client.accounts.create( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ) - print(account.id) - + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) asyncio.run(main()) ``` @@ -112,7 +110,6 @@ import increase client = AsyncIncrease() - async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -120,7 +117,6 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) - asyncio.run(main()) ``` @@ -141,7 +137,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -202,7 +198,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -242,7 +238,7 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries=5).accounts.create( +client.with_options(max_retries = 5).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -269,7 +265,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout=5.0).accounts.create( +client.with_options(timeout = 5.0).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -338,11 +334,11 @@ with client.accounts.with_streaming_response.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", -) as response: - print(response.headers.get("X-My-Header")) +) as response : + print(response.headers.get('X-My-Header')) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -396,10 +392,7 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient( - proxies="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), + http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), ) ``` diff --git a/requirements-dev.lock b/requirements-dev.lock index f6f54a23d..33440059e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase # via respx + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio - # via increase # via mypy # via pydantic # via pydantic-core + # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index daa54a31b..094dd754e 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename typing-extensions==4.8.0 # via anyio - # via increase # via pydantic # via pydantic-core + # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 519cb0b5a..238f453e6 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,105 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes +from ._version import __version__, __title__ +from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS +from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError +from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN from ._utils import file_from_path -from ._client import ( - ENVIRONMENTS, - Client, - Stream, - Timeout, - Increase, - Transport, - AsyncClient, - AsyncStream, - AsyncIncrease, - RequestOptions, -) from ._models import BaseModel -from ._version import __title__, __version__ -from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS -from ._exceptions import ( - APIError, - ConflictError, - IncreaseError, - NotFoundError, - APIStatusError, - RateLimitError, - APITimeoutError, - BadRequestError, - RateLimitedError, - APIConnectionError, - InvalidAPIKeyError, - AuthenticationError, - InternalServerError, - ObjectNotFoundError, - PrivateFeatureError, - InvalidOperationError, - MalformedRequestError, - PermissionDeniedError, - APIMethodNotFoundError, - InvalidParametersError, - EnvironmentMismatchError, - UnprocessableEntityError, - APIResponseValidationError, - InsufficientPermissionsError, - IdempotencyKeyAlreadyUsedError, -) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS +from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging +from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -__all__ = [ - "types", - "__version__", - "__title__", - "NoneType", - "Transport", - "ProxiesTypes", - "NotGiven", - "NOT_GIVEN", - "IncreaseError", - "APIError", - "APIStatusError", - "APITimeoutError", - "APIConnectionError", - "APIResponseValidationError", - "BadRequestError", - "AuthenticationError", - "PermissionDeniedError", - "NotFoundError", - "ConflictError", - "UnprocessableEntityError", - "RateLimitError", - "InternalServerError", - "APIMethodNotFoundError", - "EnvironmentMismatchError", - "IdempotencyKeyAlreadyUsedError", - "InsufficientPermissionsError", - "InvalidAPIKeyError", - "InvalidOperationError", - "InvalidParametersError", - "MalformedRequestError", - "ObjectNotFoundError", - "PrivateFeatureError", - "RateLimitedError", - "Timeout", - "RequestOptions", - "Client", - "AsyncClient", - "Stream", - "AsyncStream", - "Increase", - "AsyncIncrease", - "ENVIRONMENTS", - "file_from_path", - "BaseModel", - "DEFAULT_TIMEOUT", - "DEFAULT_MAX_RETRIES", - "DEFAULT_CONNECTION_LIMITS", - "DefaultHttpxClient", - "DefaultAsyncHttpxClient", -] +__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] _setup_logging() @@ -111,7 +24,7 @@ for __name in __all__: if not __name.startswith("__"): try: - __locals[__name].__module__ = "increase" + setattr(__locals[__name], "__module__", "increase") except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass + pass \ No newline at end of file diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index fe3c6e1d8..73f141e55 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,6 +86,7 @@ APIConnectionError, APIResponseValidationError, ) +from ._legacy_response import LegacyAPIResponse log: logging.Logger = logging.getLogger(__name__) @@ -124,16 +125,14 @@ def __init__( self, *, url: URL, - ) -> None: - ... + ) -> None: ... @overload def __init__( self, *, params: Query, - ) -> None: - ... + ) -> None: ... def __init__( self, @@ -166,8 +165,7 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: - ... + def next_page_info(self) -> Optional[PageInfo]: ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -599,7 +597,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, - **self.platform_headers(), +**self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -879,9 +877,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> FinalRequestOptions: + ) -> None: """Hook for mutating the given options""" - return options + return None def _prepare_request( self, @@ -903,8 +901,7 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def request( @@ -914,8 +911,7 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def request( @@ -926,8 +922,7 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def request( self, @@ -961,7 +956,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - options = self._prepare_options(options) + self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1018,6 +1013,7 @@ def _request( response.reason_phrase, response.headers, ) + try: response.raise_for_status() @@ -1091,6 +1087,8 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: + + origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1152,8 +1150,7 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def get( @@ -1164,8 +1161,7 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def get( @@ -1176,8 +1172,7 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def get( self, @@ -1203,8 +1198,7 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def post( @@ -1217,8 +1211,7 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def post( @@ -1231,8 +1224,7 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def post( self, @@ -1442,9 +1434,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> FinalRequestOptions: + ) -> None: """Hook for mutating the given options""" - return options + return None async def _prepare_request( self, @@ -1465,8 +1457,7 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def request( @@ -1477,8 +1468,7 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def request( @@ -1489,8 +1479,7 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def request( self, @@ -1529,7 +1518,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - options = await self._prepare_options(options) + await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1650,6 +1639,8 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: + + origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1701,8 +1692,7 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def get( @@ -1713,8 +1703,7 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def get( @@ -1725,8 +1714,7 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def get( self, @@ -1750,8 +1738,7 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def post( @@ -1764,8 +1751,7 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def post( @@ -1778,8 +1764,7 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index 311788c4f..d3f890574 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,56 +2,55 @@ from __future__ import annotations +import httpx + +import os + +from ._streaming import AsyncStream as AsyncStream, Stream as Stream + +from ._exceptions import IncreaseError, APIStatusError + +from typing_extensions import override, Self + +from typing import Any + +from ._utils import is_mapping, get_async_library + +from . import _exceptions + import os -from typing import Any, Dict, Union, Mapping, cast -from typing_extensions import Self, Literal, override +import asyncio +import warnings +from typing import Optional, Union, Dict, Any, Mapping, overload, cast +from typing_extensions import Literal import httpx -from . import resources, _exceptions -from ._qs import Querystring -from ._types import ( - NOT_GIVEN, - Omit, - Timeout, - NotGiven, - Transport, - ProxiesTypes, - RequestOptions, -) -from ._utils import ( - is_given, - is_mapping, - get_async_library, -) from ._version import __version__ -from ._streaming import Stream as Stream, AsyncStream as AsyncStream -from ._exceptions import IncreaseError, APIStatusError +from ._qs import Querystring +from .types import shared_params +from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given +from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN from ._base_client import ( + DEFAULT_CONNECTION_LIMITS, + DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, + ResponseT, + SyncHttpxClientWrapper, + AsyncHttpxClientWrapper, SyncAPIClient, AsyncAPIClient, + make_request_options, ) +from . import resources -__all__ = [ - "ENVIRONMENTS", - "Timeout", - "Transport", - "ProxiesTypes", - "RequestOptions", - "resources", - "Increase", - "AsyncIncrease", - "Client", - "AsyncClient", -] +__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } - class Increase(SyncAPIClient): accounts: resources.AccountsResource account_numbers: resources.AccountNumbersResource @@ -112,33 +111,22 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -146,53 +134,44 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" @@ -260,41 +239,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.Client | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -309,31 +279,14 @@ def copy( params = set_default_query http_client = http_client or self._client - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -371,16 +324,12 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -404,7 +353,6 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class AsyncIncrease(AsyncAPIClient): accounts: resources.AsyncAccountsResource account_numbers: resources.AsyncAccountNumbersResource @@ -465,33 +413,22 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -499,53 +436,44 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" @@ -582,9 +510,7 @@ def __init__( self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) self.programs = resources.AsyncProgramsResource(self) self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( - self - ) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) self.account_statements = resources.AsyncAccountStatementsResource(self) self.files = resources.AsyncFilesResource(self) self.documents = resources.AsyncDocumentsResource(self) @@ -615,41 +541,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f"async:{get_async_library()}", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f'async:{get_async_library()}', + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.AsyncClient | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -664,31 +581,14 @@ def copy( params = set_default_query http_client = http_client or self._client - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -726,16 +626,12 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -759,22 +655,17 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.CardsResourceWithRawResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) @@ -784,40 +675,22 @@ def __init__(self, client: Increase) -> None: self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.FilesResourceWithRawResponse(client.files) self.documents = resources.DocumentsResourceWithRawResponse(client.documents) @@ -826,96 +699,53 @@ def __init__(self, client: Increase) -> None: self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) - class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( - client.pending_transactions - ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( - client.declined_transactions - ) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithRawResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) @@ -923,99 +753,54 @@ def __init__(self, client: AsyncIncrease) -> None: self.events = resources.AsyncEventsResourceWithRawResponse(client.events) self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) - class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.CardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.FilesResourceWithStreamingResponse(client.files) self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) @@ -1023,141 +808,73 @@ def __init__(self, client: Increase) -> None: self.events = resources.EventsResourceWithStreamingResponse(client.events) self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) - class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( - client.inbound_mail_items - ) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( - client.account_statements - ) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( - client.event_subscriptions - ) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( - client.bookkeeping_entries - ) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( - client.intrafi_exclusions - ) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) - Client = Increase -AsyncClient = AsyncIncrease +AsyncClient = AsyncIncrease \ No newline at end of file diff --git a/src/increase/_compat.py b/src/increase/_compat.py index c919b5adb..74c7639b4 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: +def model_copy(model: _ModelT) -> _ModelT: if PYDANTIC_V2: - return model.model_copy(deep=deep) - return model.copy(deep=deep) # type: ignore + return model.model_copy() + return model.copy() # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: diff --git a/src/increase/_legacy_response.py b/src/increase/_legacy_response.py new file mode 100644 index 000000000..fecb9b503 --- /dev/null +++ b/src/increase/_legacy_response.py @@ -0,0 +1,456 @@ +from __future__ import annotations + +import os +import inspect +import logging +import datetime +import functools +from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, Iterator, AsyncIterator, cast, overload +from typing_extensions import Awaitable, ParamSpec, override, deprecated, get_origin + +import anyio +import httpx +import pydantic + +from ._types import NoneType +from ._utils import is_given, extract_type_arg, is_annotated_type +from ._models import BaseModel, is_basemodel +from ._constants import RAW_RESPONSE_HEADER +from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type +from ._exceptions import APIResponseValidationError + +if TYPE_CHECKING: + from ._models import FinalRequestOptions + from ._base_client import BaseClient + + +P = ParamSpec("P") +R = TypeVar("R") +_T = TypeVar("_T") + +log: logging.Logger = logging.getLogger(__name__) + + +class LegacyAPIResponse(Generic[R]): + """This is a legacy class as it will be replaced by `APIResponse` + and `AsyncAPIResponse` in the `_response.py` file in the next major + release. + + For the sync client this will mostly be the same with the exception + of `content` & `text` will be methods instead of properties. In the + async client, all methods will be async. + + A migration script will be provided & the migration in general should + be smooth. + """ + + _cast_to: type[R] + _client: BaseClient[Any, Any] + _parsed_by_type: dict[type[Any], Any] + _stream: bool + _stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None + _options: FinalRequestOptions + + http_response: httpx.Response + + def __init__( + self, + *, + raw: httpx.Response, + cast_to: type[R], + client: BaseClient[Any, Any], + stream: bool, + stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, + options: FinalRequestOptions, + ) -> None: + self._cast_to = cast_to + self._client = client + self._parsed_by_type = {} + self._stream = stream + self._stream_cls = stream_cls + self._options = options + self.http_response = raw + + @overload + def parse(self, *, to: type[_T]) -> _T: + ... + + @overload + def parse(self) -> R: + ... + + def parse(self, *, to: type[_T] | None = None) -> R | _T: + """Returns the rich python representation of this response's data. + + NOTE: For the async client: this will become a coroutine in the next major version. + + For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`. + + You can customise the type that the response is parsed into through + the `to` argument, e.g. + + ```py + from increase import BaseModel + + + class MyModel(BaseModel): + foo: str + + + obj = response.parse(to=MyModel) + print(obj.foo) + ``` + + We support parsing: + - `BaseModel` + - `dict` + - `list` + - `Union` + - `str` + - `int` + - `float` + - `httpx.Response` + """ + cache_key = to if to is not None else self._cast_to + cached = self._parsed_by_type.get(cache_key) + if cached is not None: + return cached # type: ignore[no-any-return] + + parsed = self._parse(to=to) + if is_given(self._options.post_parser): + parsed = self._options.post_parser(parsed) + + self._parsed_by_type[cache_key] = parsed + return parsed + + @property + def headers(self) -> httpx.Headers: + return self.http_response.headers + + @property + def http_request(self) -> httpx.Request: + return self.http_response.request + + @property + def status_code(self) -> int: + return self.http_response.status_code + + @property + def url(self) -> httpx.URL: + return self.http_response.url + + @property + def method(self) -> str: + return self.http_request.method + + @property + def content(self) -> bytes: + """Return the binary response content. + + NOTE: this will be removed in favour of `.read()` in the + next major version. + """ + return self.http_response.content + + @property + def text(self) -> str: + """Return the decoded response content. + + NOTE: this will be turned into a method in the next major version. + """ + return self.http_response.text + + @property + def http_version(self) -> str: + return self.http_response.http_version + + @property + def is_closed(self) -> bool: + return self.http_response.is_closed + + @property + def elapsed(self) -> datetime.timedelta: + """The time taken for the complete request/response cycle to complete.""" + return self.http_response.elapsed + + def _parse(self, *, to: type[_T] | None = None) -> R | _T: + # unwrap `Annotated[T, ...]` -> `T` + if to and is_annotated_type(to): + to = extract_type_arg(to, 0) + + if self._stream: + if to: + if not is_stream_class_type(to): + raise TypeError(f"Expected custom parse type to be a subclass of {Stream} or {AsyncStream}") + + return cast( + _T, + to( + cast_to=extract_stream_chunk_type( + to, + failure_message="Expected custom stream type to be passed with a type argument, e.g. Stream[ChunkType]", + ), + response=self.http_response, + client=cast(Any, self._client), + ), + ) + + if self._stream_cls: + return cast( + R, + self._stream_cls( + cast_to=extract_stream_chunk_type(self._stream_cls), + response=self.http_response, + client=cast(Any, self._client), + ), + ) + + stream_cls = cast("type[Stream[Any]] | type[AsyncStream[Any]] | None", self._client._default_stream_cls) + if stream_cls is None: + raise MissingStreamClassError() + + return cast( + R, + stream_cls( + cast_to=self._cast_to, + response=self.http_response, + client=cast(Any, self._client), + ), + ) + + cast_to = to if to is not None else self._cast_to + + # unwrap `Annotated[T, ...]` -> `T` + if is_annotated_type(cast_to): + cast_to = extract_type_arg(cast_to, 0) + + if cast_to is NoneType: + return cast(R, None) + + response = self.http_response + if cast_to == str: + return cast(R, response.text) + + if cast_to == int: + return cast(R, int(response.text)) + + if cast_to == float: + return cast(R, float(response.text)) + + origin = get_origin(cast_to) or cast_to + + if inspect.isclass(origin) and issubclass(origin, HttpxBinaryResponseContent): + return cast(R, cast_to(response)) # type: ignore + + if origin == LegacyAPIResponse: + raise RuntimeError("Unexpected state - cast_to is `APIResponse`") + + if inspect.isclass(origin) and issubclass(origin, httpx.Response): + # Because of the invariance of our ResponseT TypeVar, users can subclass httpx.Response + # and pass that class to our request functions. We cannot change the variance to be either + # covariant or contravariant as that makes our usage of ResponseT illegal. We could construct + # the response class ourselves but that is something that should be supported directly in httpx + # as it would be easy to incorrectly construct the Response object due to the multitude of arguments. + if cast_to != httpx.Response: + raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`") + return cast(R, response) + + if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): + raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") + + if ( + cast_to is not object + and not origin is list + and not origin is dict + and not origin is Union + and not issubclass(origin, BaseModel) + ): + raise RuntimeError( + f"Unsupported type, expected {cast_to} to be a subclass of {BaseModel}, {dict}, {list}, {Union}, {NoneType}, {str} or {httpx.Response}." + ) + + # split is required to handle cases where additional information is included + # in the response, e.g. application/json; charset=utf-8 + content_type, *_ = response.headers.get("content-type", "*").split(";") + if content_type != "application/json": + if is_basemodel(cast_to): + try: + data = response.json() + except Exception as exc: + log.debug("Could not read JSON from response data due to %s - %s", type(exc), exc) + else: + return self._client._process_response_data( + data=data, + cast_to=cast_to, # type: ignore + response=response, + ) + + if self._client._strict_response_validation: + raise APIResponseValidationError( + response=response, + message=f"Expected Content-Type response header to be `application/json` but received `{content_type}` instead.", + body=response.text, + ) + + # If the API responds with content that isn't JSON then we just return + # the (decoded) text without performing any parsing so that you can still + # handle the response however you need to. + return response.text # type: ignore + + data = response.json() + + return self._client._process_response_data( + data=data, + cast_to=cast_to, # type: ignore + response=response, + ) + + @override + def __repr__(self) -> str: + return f"" + + +class MissingStreamClassError(TypeError): + def __init__(self) -> None: + super().__init__( + "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `increase._streaming` for reference", + ) + + +def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, LegacyAPIResponse[R]]: + """Higher order function that takes one of our bound API methods and wraps it + to support returning the raw `APIResponse` object directly. + """ + + @functools.wraps(func) + def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: + extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} + extra_headers[RAW_RESPONSE_HEADER] = "true" + + kwargs["extra_headers"] = extra_headers + + return cast(LegacyAPIResponse[R], func(*args, **kwargs)) + + return wrapped + + +def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P, Awaitable[LegacyAPIResponse[R]]]: + """Higher order function that takes one of our bound API methods and wraps it + to support returning the raw `APIResponse` object directly. + """ + + @functools.wraps(func) + async def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: + extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} + extra_headers[RAW_RESPONSE_HEADER] = "true" + + kwargs["extra_headers"] = extra_headers + + return cast(LegacyAPIResponse[R], await func(*args, **kwargs)) + + return wrapped + + +class HttpxBinaryResponseContent: + response: httpx.Response + + def __init__(self, response: httpx.Response) -> None: + self.response = response + + @property + def content(self) -> bytes: + return self.response.content + + @property + def text(self) -> str: + return self.response.text + + @property + def encoding(self) -> str | None: + return self.response.encoding + + @property + def charset_encoding(self) -> str | None: + return self.response.charset_encoding + + def json(self, **kwargs: Any) -> Any: + return self.response.json(**kwargs) + + def read(self) -> bytes: + return self.response.read() + + def iter_bytes(self, chunk_size: int | None = None) -> Iterator[bytes]: + return self.response.iter_bytes(chunk_size) + + def iter_text(self, chunk_size: int | None = None) -> Iterator[str]: + return self.response.iter_text(chunk_size) + + def iter_lines(self) -> Iterator[str]: + return self.response.iter_lines() + + def iter_raw(self, chunk_size: int | None = None) -> Iterator[bytes]: + return self.response.iter_raw(chunk_size) + + def write_to_file( + self, + file: str | os.PathLike[str], + ) -> None: + """Write the output to the given file. + + Accepts a filename or any path-like object, e.g. pathlib.Path + + Note: if you want to stream the data to the file instead of writing + all at once then you should use `.with_streaming_response` when making + the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')` + """ + with open(file, mode="wb") as f: + for data in self.response.iter_bytes(): + f.write(data) + + @deprecated( + "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" + ) + def stream_to_file( + self, + file: str | os.PathLike[str], + *, + chunk_size: int | None = None, + ) -> None: + with open(file, mode="wb") as f: + for data in self.response.iter_bytes(chunk_size): + f.write(data) + + def close(self) -> None: + return self.response.close() + + async def aread(self) -> bytes: + return await self.response.aread() + + async def aiter_bytes(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: + return self.response.aiter_bytes(chunk_size) + + async def aiter_text(self, chunk_size: int | None = None) -> AsyncIterator[str]: + return self.response.aiter_text(chunk_size) + + async def aiter_lines(self) -> AsyncIterator[str]: + return self.response.aiter_lines() + + async def aiter_raw(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: + return self.response.aiter_raw(chunk_size) + + @deprecated( + "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" + ) + async def astream_to_file( + self, + file: str | os.PathLike[str], + *, + chunk_size: int | None = None, + ) -> None: + path = anyio.Path(file) + async with await path.open(mode="wb") as f: + async for data in self.response.aiter_bytes(chunk_size): + await f.write(data) + + async def aclose(self) -> None: + return await self.response.aclose() diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 274320ca5..54a98364f 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,7 +64,9 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) + return flatten( + [self._stringify_item(key, value, opts) for key, value in params.items()] + ) def _stringify_item( self, @@ -79,7 +81,9 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", + f"{key}.{subkey}" + if nested_format == "dots" + else f"{key}[{subkey}]", subvalue, opts, ) @@ -92,7 +96,11 @@ def _stringify_item( return [ ( key, - ",".join(self._primitive_value_to_str(item) for item in value if item is not None), + ",".join( + self._primitive_value_to_str(item) + for item in value + if item is not None + ), ), ] elif array_format == "repeat": @@ -101,7 +109,9 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + raise NotImplementedError( + "The array indices format is not supported yet" + ) elif array_format == "brackets": items = [] key = key + "[]" @@ -146,5 +156,9 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format - self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + self.array_format = ( + qs.array_format if isinstance(array_format, NotGiven) else array_format + ) + self.nested_format = ( + qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + ) diff --git a/src/increase/_response.py b/src/increase/_response.py index fd4bff802..5d4268a31 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, override, get_origin +from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin import anyio import httpx @@ -26,6 +26,7 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base +from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -189,6 +190,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to + if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -203,7 +205,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") + raise TypeError( + "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" + ) if ( cast_to is not object @@ -254,6 +258,8 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): + + @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -358,6 +364,8 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): + + @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 7b5fc6503..357b42be0 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,7 +9,9 @@ import httpx -from ._utils import extract_type_var_from_base +from ._utils import is_mapping, is_dict, extract_type_var_from_base +from ._exceptions import APIError +from ._response import APIResponse, AsyncAPIResponse if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -53,10 +55,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -117,10 +119,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index 510d266d3..0efc60a5e 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,6 +1,7 @@ from __future__ import annotations from os import PathLike +from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -13,8 +14,10 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, + AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -25,6 +28,7 @@ if TYPE_CHECKING: from ._models import BaseModel from ._response import APIResponse, AsyncAPIResponse + from ._legacy_response import HttpxBinaryResponseContent Transport = BaseTransport AsyncTransport = AsyncBaseTransport @@ -189,6 +193,7 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", + ], ) diff --git a/src/increase/_utils/_data.py b/src/increase/_utils/_data.py deleted file mode 100644 index 6f0ef9d3d..000000000 --- a/src/increase/_utils/_data.py +++ /dev/null @@ -1,56 +0,0 @@ -from __future__ import annotations - -import io -import base64 -import pathlib - -import anyio - - -def to_base64_str(data: object) -> str: - from .._files import is_base64_file_input - - if isinstance(data, str): - return data - - if is_base64_file_input(data): - binary: str | bytes | None = None - - if isinstance(data, pathlib.Path): - binary = data.read_bytes() - elif isinstance(data, io.IOBase): - binary = data.read() - - if isinstance(binary, str): # type: ignore[unreachable] - binary = binary.encode() - - if not isinstance(binary, bytes): - raise RuntimeError(f"Could not read bytes from {data}; Received {type(binary)}") - - return base64.b64encode(binary).decode("ascii") - - raise TypeError(f"Expected base64 input to be a string, io object or PathLike object but got {data}") - - -async def to_base64_str_async(data: object) -> str: - from .._files import is_base64_file_input - - if isinstance(data, str): - return data - - if is_base64_file_input(data): - binary: str | bytes | None = None - - if isinstance(data, pathlib.Path): - binary = await anyio.Path(data).read_bytes() - elif isinstance(data, io.IOBase): - binary = data.read() - - if isinstance(binary, str): # type: ignore[unreachable] - binary = binary.encode() - - if not isinstance(binary, bytes): - raise RuntimeError(f"Could not read bytes from {data}; Received {type(binary)}") - - return base64.b64encode(binary).decode("ascii") - raise TypeError(f"Expected base64 input to be a string, io object or PathLike object but got {data}") diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index c46a62a69..ffd883e9d 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,5 +59,4 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: - ... + def __load__(self) -> T: ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index d0d810337..238e54ada 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): + if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 34797c290..2fc5a1c65 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,20 +211,17 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: - ... + def foo(*, a: str) -> str: ... @overload - def foo(*, b: bool) -> str: - ... + def foo(*, b: bool) -> str: ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: - ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: ... ``` """ @@ -286,18 +283,15 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: - ... +def strip_not_given(obj: None) -> None: ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: - ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... @overload -def strip_not_given(obj: object) -> object: - ... +def strip_not_given(obj: object) -> object: ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index 9b556589f..e880ca207 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.71.0" # x-release-please-version +__version__ = "0.71.0" # x-release-please-version \ No newline at end of file diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index ea6da25e1..62201c0bc 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -1,733 +1,691 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .cards import ( - CardsResource, - AsyncCardsResource, - CardsResourceWithRawResponse, - AsyncCardsResourceWithRawResponse, - CardsResourceWithStreamingResponse, - AsyncCardsResourceWithStreamingResponse, + Cards, + AsyncCards, + CardsWithRawResponse, + AsyncCardsWithRawResponse, + CardsWithStreamingResponse, + AsyncCardsWithStreamingResponse, ) from .files import ( - FilesResource, - AsyncFilesResource, - FilesResourceWithRawResponse, - AsyncFilesResourceWithRawResponse, - FilesResourceWithStreamingResponse, - AsyncFilesResourceWithStreamingResponse, + Files, + AsyncFiles, + FilesWithRawResponse, + AsyncFilesWithRawResponse, + FilesWithStreamingResponse, + AsyncFilesWithStreamingResponse, ) from .events import ( - EventsResource, - AsyncEventsResource, - EventsResourceWithRawResponse, - AsyncEventsResourceWithRawResponse, - EventsResourceWithStreamingResponse, - AsyncEventsResourceWithStreamingResponse, + Events, + AsyncEvents, + EventsWithRawResponse, + AsyncEventsWithRawResponse, + EventsWithStreamingResponse, + AsyncEventsWithStreamingResponse, ) from .groups import ( - GroupsResource, - AsyncGroupsResource, - GroupsResourceWithRawResponse, - AsyncGroupsResourceWithRawResponse, - GroupsResourceWithStreamingResponse, - AsyncGroupsResourceWithStreamingResponse, + Groups, + AsyncGroups, + GroupsWithRawResponse, + AsyncGroupsWithRawResponse, + GroupsWithStreamingResponse, + AsyncGroupsWithStreamingResponse, ) from .exports import ( - ExportsResource, - AsyncExportsResource, - ExportsResourceWithRawResponse, - AsyncExportsResourceWithRawResponse, - ExportsResourceWithStreamingResponse, - AsyncExportsResourceWithStreamingResponse, + Exports, + AsyncExports, + ExportsWithRawResponse, + AsyncExportsWithRawResponse, + ExportsWithStreamingResponse, + AsyncExportsWithStreamingResponse, +) +from .intrafi import ( + Intrafi, + AsyncIntrafi, + IntrafiWithRawResponse, + AsyncIntrafiWithRawResponse, + IntrafiWithStreamingResponse, + AsyncIntrafiWithStreamingResponse, ) from .accounts import ( - AccountsResource, - AsyncAccountsResource, - AccountsResourceWithRawResponse, - AsyncAccountsResourceWithRawResponse, - AccountsResourceWithStreamingResponse, - AsyncAccountsResourceWithStreamingResponse, + Accounts, + AsyncAccounts, + AccountsWithRawResponse, + AsyncAccountsWithRawResponse, + AccountsWithStreamingResponse, + AsyncAccountsWithStreamingResponse, ) from .entities import ( - EntitiesResource, - AsyncEntitiesResource, - EntitiesResourceWithRawResponse, - AsyncEntitiesResourceWithRawResponse, - EntitiesResourceWithStreamingResponse, - AsyncEntitiesResourceWithStreamingResponse, + Entities, + AsyncEntities, + EntitiesWithRawResponse, + AsyncEntitiesWithRawResponse, + EntitiesWithStreamingResponse, + AsyncEntitiesWithStreamingResponse, ) from .programs import ( - ProgramsResource, - AsyncProgramsResource, - ProgramsResourceWithRawResponse, - AsyncProgramsResourceWithRawResponse, - ProgramsResourceWithStreamingResponse, - AsyncProgramsResourceWithStreamingResponse, + Programs, + AsyncPrograms, + ProgramsWithRawResponse, + AsyncProgramsWithRawResponse, + ProgramsWithStreamingResponse, + AsyncProgramsWithStreamingResponse, ) from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, + Documents, + AsyncDocuments, + DocumentsWithRawResponse, + AsyncDocumentsWithRawResponse, + DocumentsWithStreamingResponse, + AsyncDocumentsWithStreamingResponse, ) from .lockboxes import ( - LockboxesResource, - AsyncLockboxesResource, - LockboxesResourceWithRawResponse, - AsyncLockboxesResourceWithRawResponse, - LockboxesResourceWithStreamingResponse, - AsyncLockboxesResourceWithStreamingResponse, + Lockboxes, + AsyncLockboxes, + LockboxesWithRawResponse, + AsyncLockboxesWithRawResponse, + LockboxesWithStreamingResponse, + AsyncLockboxesWithStreamingResponse, ) from .simulations import ( - SimulationsResource, - AsyncSimulationsResource, - SimulationsResourceWithRawResponse, - AsyncSimulationsResourceWithRawResponse, - SimulationsResourceWithStreamingResponse, - AsyncSimulationsResourceWithStreamingResponse, + Simulations, + AsyncSimulations, + SimulationsWithRawResponse, + AsyncSimulationsWithRawResponse, + SimulationsWithStreamingResponse, + AsyncSimulationsWithStreamingResponse, ) from .oauth_tokens import ( - OAuthTokensResource, - AsyncOAuthTokensResource, - OAuthTokensResourceWithRawResponse, - AsyncOAuthTokensResourceWithRawResponse, - OAuthTokensResourceWithStreamingResponse, - AsyncOAuthTokensResourceWithStreamingResponse, + OAuthTokens, + AsyncOAuthTokens, + OAuthTokensWithRawResponse, + AsyncOAuthTokensWithRawResponse, + OAuthTokensWithStreamingResponse, + AsyncOAuthTokensWithStreamingResponse, ) from .transactions import ( - TransactionsResource, - AsyncTransactionsResource, - TransactionsResourceWithRawResponse, - AsyncTransactionsResourceWithRawResponse, - TransactionsResourceWithStreamingResponse, - AsyncTransactionsResourceWithStreamingResponse, + Transactions, + AsyncTransactions, + TransactionsWithRawResponse, + AsyncTransactionsWithRawResponse, + TransactionsWithStreamingResponse, + AsyncTransactionsWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfersResource, - AsyncACHTransfersResource, - ACHTransfersResourceWithRawResponse, - AsyncACHTransfersResourceWithRawResponse, - ACHTransfersResourceWithStreamingResponse, - AsyncACHTransfersResourceWithStreamingResponse, + ACHTransfers, + AsyncACHTransfers, + ACHTransfersWithRawResponse, + AsyncACHTransfersWithRawResponse, + ACHTransfersWithStreamingResponse, + AsyncACHTransfersWithStreamingResponse, ) from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, + CardDisputes, + AsyncCardDisputes, + CardDisputesWithRawResponse, + AsyncCardDisputesWithRawResponse, + CardDisputesWithStreamingResponse, + AsyncCardDisputesWithStreamingResponse, ) from .card_payments import ( - CardPaymentsResource, - AsyncCardPaymentsResource, - CardPaymentsResourceWithRawResponse, - AsyncCardPaymentsResourceWithRawResponse, - CardPaymentsResourceWithStreamingResponse, - AsyncCardPaymentsResourceWithStreamingResponse, + CardPayments, + AsyncCardPayments, + CardPaymentsWithRawResponse, + AsyncCardPaymentsWithRawResponse, + CardPaymentsWithStreamingResponse, + AsyncCardPaymentsWithStreamingResponse, ) from .check_deposits import ( - CheckDepositsResource, - AsyncCheckDepositsResource, - CheckDepositsResourceWithRawResponse, - AsyncCheckDepositsResourceWithRawResponse, - CheckDepositsResourceWithStreamingResponse, - AsyncCheckDepositsResourceWithStreamingResponse, + CheckDeposits, + AsyncCheckDeposits, + CheckDepositsWithRawResponse, + AsyncCheckDepositsWithRawResponse, + CheckDepositsWithStreamingResponse, + AsyncCheckDepositsWithStreamingResponse, ) from .physical_cards import ( - PhysicalCardsResource, - AsyncPhysicalCardsResource, - PhysicalCardsResourceWithRawResponse, - AsyncPhysicalCardsResourceWithRawResponse, - PhysicalCardsResourceWithStreamingResponse, - AsyncPhysicalCardsResourceWithStreamingResponse, + PhysicalCards, + AsyncPhysicalCards, + PhysicalCardsWithRawResponse, + AsyncPhysicalCardsWithRawResponse, + PhysicalCardsWithStreamingResponse, + AsyncPhysicalCardsWithStreamingResponse, ) from .wire_transfers import ( - WireTransfersResource, - AsyncWireTransfersResource, - WireTransfersResourceWithRawResponse, - AsyncWireTransfersResourceWithRawResponse, - WireTransfersResourceWithStreamingResponse, - AsyncWireTransfersResourceWithStreamingResponse, + WireTransfers, + AsyncWireTransfers, + WireTransfersWithRawResponse, + AsyncWireTransfersWithRawResponse, + WireTransfersWithStreamingResponse, + AsyncWireTransfersWithStreamingResponse, ) from .account_numbers import ( - AccountNumbersResource, - AsyncAccountNumbersResource, - AccountNumbersResourceWithRawResponse, - AsyncAccountNumbersResourceWithRawResponse, - AccountNumbersResourceWithStreamingResponse, - AsyncAccountNumbersResourceWithStreamingResponse, + AccountNumbers, + AsyncAccountNumbers, + AccountNumbersWithRawResponse, + AsyncAccountNumbersWithRawResponse, + AccountNumbersWithStreamingResponse, + AsyncAccountNumbersWithStreamingResponse, ) from .check_transfers import ( - CheckTransfersResource, - AsyncCheckTransfersResource, - CheckTransfersResourceWithRawResponse, - AsyncCheckTransfersResourceWithRawResponse, - CheckTransfersResourceWithStreamingResponse, - AsyncCheckTransfersResourceWithStreamingResponse, + CheckTransfers, + AsyncCheckTransfers, + CheckTransfersWithRawResponse, + AsyncCheckTransfersWithRawResponse, + CheckTransfersWithStreamingResponse, + AsyncCheckTransfersWithStreamingResponse, ) from .routing_numbers import ( - RoutingNumbersResource, - AsyncRoutingNumbersResource, - RoutingNumbersResourceWithRawResponse, - AsyncRoutingNumbersResourceWithRawResponse, - RoutingNumbersResourceWithStreamingResponse, - AsyncRoutingNumbersResourceWithStreamingResponse, -) -from .intrafi_balances import ( - IntrafiBalancesResource, - AsyncIntrafiBalancesResource, - IntrafiBalancesResourceWithRawResponse, - AsyncIntrafiBalancesResourceWithRawResponse, - IntrafiBalancesResourceWithStreamingResponse, - AsyncIntrafiBalancesResourceWithStreamingResponse, + RoutingNumbers, + AsyncRoutingNumbers, + RoutingNumbersWithRawResponse, + AsyncRoutingNumbersWithRawResponse, + RoutingNumbersWithStreamingResponse, + AsyncRoutingNumbersWithStreamingResponse, ) from .account_transfers import ( - AccountTransfersResource, - AsyncAccountTransfersResource, - AccountTransfersResourceWithRawResponse, - AsyncAccountTransfersResourceWithRawResponse, - AccountTransfersResourceWithStreamingResponse, - AsyncAccountTransfersResourceWithStreamingResponse, + AccountTransfers, + AsyncAccountTransfers, + AccountTransfersWithRawResponse, + AsyncAccountTransfersWithRawResponse, + AccountTransfersWithStreamingResponse, + AsyncAccountTransfersWithStreamingResponse, ) from .external_accounts import ( - ExternalAccountsResource, - AsyncExternalAccountsResource, - ExternalAccountsResourceWithRawResponse, - AsyncExternalAccountsResourceWithRawResponse, - ExternalAccountsResourceWithStreamingResponse, - AsyncExternalAccountsResourceWithStreamingResponse, + ExternalAccounts, + AsyncExternalAccounts, + ExternalAccountsWithRawResponse, + AsyncExternalAccountsWithRawResponse, + ExternalAccountsWithStreamingResponse, + AsyncExternalAccountsWithStreamingResponse, ) from .oauth_connections import ( - OAuthConnectionsResource, - AsyncOAuthConnectionsResource, - OAuthConnectionsResourceWithRawResponse, - AsyncOAuthConnectionsResourceWithRawResponse, - OAuthConnectionsResourceWithStreamingResponse, - AsyncOAuthConnectionsResourceWithStreamingResponse, + OAuthConnections, + AsyncOAuthConnections, + OAuthConnectionsWithRawResponse, + AsyncOAuthConnectionsWithRawResponse, + OAuthConnectionsWithStreamingResponse, + AsyncOAuthConnectionsWithStreamingResponse, ) from .account_statements import ( - AccountStatementsResource, - AsyncAccountStatementsResource, - AccountStatementsResourceWithRawResponse, - AsyncAccountStatementsResourceWithRawResponse, - AccountStatementsResourceWithStreamingResponse, - AsyncAccountStatementsResourceWithStreamingResponse, + AccountStatements, + AsyncAccountStatements, + AccountStatementsWithRawResponse, + AsyncAccountStatementsWithRawResponse, + AccountStatementsWithStreamingResponse, + AsyncAccountStatementsWithStreamingResponse, ) from .inbound_mail_items import ( - InboundMailItemsResource, - AsyncInboundMailItemsResource, - InboundMailItemsResourceWithRawResponse, - AsyncInboundMailItemsResourceWithRawResponse, - InboundMailItemsResourceWithStreamingResponse, - AsyncInboundMailItemsResourceWithStreamingResponse, -) -from .intrafi_exclusions import ( - IntrafiExclusionsResource, - AsyncIntrafiExclusionsResource, - IntrafiExclusionsResourceWithRawResponse, - AsyncIntrafiExclusionsResourceWithRawResponse, - IntrafiExclusionsResourceWithStreamingResponse, - AsyncIntrafiExclusionsResourceWithStreamingResponse, + InboundMailItems, + AsyncInboundMailItems, + InboundMailItemsWithRawResponse, + AsyncInboundMailItemsWithRawResponse, + InboundMailItemsWithStreamingResponse, + AsyncInboundMailItemsWithStreamingResponse, ) from .bookkeeping_entries import ( - BookkeepingEntriesResource, - AsyncBookkeepingEntriesResource, - BookkeepingEntriesResourceWithRawResponse, - AsyncBookkeepingEntriesResourceWithRawResponse, - BookkeepingEntriesResourceWithStreamingResponse, - AsyncBookkeepingEntriesResourceWithStreamingResponse, + BookkeepingEntries, + AsyncBookkeepingEntries, + BookkeepingEntriesWithRawResponse, + AsyncBookkeepingEntriesWithRawResponse, + BookkeepingEntriesWithStreamingResponse, + AsyncBookkeepingEntriesWithStreamingResponse, ) from .event_subscriptions import ( - EventSubscriptionsResource, - AsyncEventSubscriptionsResource, - EventSubscriptionsResourceWithRawResponse, - AsyncEventSubscriptionsResourceWithRawResponse, - EventSubscriptionsResourceWithStreamingResponse, - AsyncEventSubscriptionsResourceWithStreamingResponse, + EventSubscriptions, + AsyncEventSubscriptions, + EventSubscriptionsWithRawResponse, + AsyncEventSubscriptionsWithRawResponse, + EventSubscriptionsWithStreamingResponse, + AsyncEventSubscriptionsWithStreamingResponse, ) from .real_time_decisions import ( - RealTimeDecisionsResource, - AsyncRealTimeDecisionsResource, - RealTimeDecisionsResourceWithRawResponse, - AsyncRealTimeDecisionsResourceWithRawResponse, - RealTimeDecisionsResourceWithStreamingResponse, - AsyncRealTimeDecisionsResourceWithStreamingResponse, + RealTimeDecisions, + AsyncRealTimeDecisions, + RealTimeDecisionsWithRawResponse, + AsyncRealTimeDecisionsWithRawResponse, + RealTimeDecisionsWithStreamingResponse, + AsyncRealTimeDecisionsWithStreamingResponse, ) from .ach_prenotifications import ( - ACHPrenotificationsResource, - AsyncACHPrenotificationsResource, - ACHPrenotificationsResourceWithRawResponse, - AsyncACHPrenotificationsResourceWithRawResponse, - ACHPrenotificationsResourceWithStreamingResponse, - AsyncACHPrenotificationsResourceWithStreamingResponse, + ACHPrenotifications, + AsyncACHPrenotifications, + ACHPrenotificationsWithRawResponse, + AsyncACHPrenotificationsWithRawResponse, + ACHPrenotificationsWithStreamingResponse, + AsyncACHPrenotificationsWithStreamingResponse, ) from .bookkeeping_accounts import ( - BookkeepingAccountsResource, - AsyncBookkeepingAccountsResource, - BookkeepingAccountsResourceWithRawResponse, - AsyncBookkeepingAccountsResourceWithRawResponse, - BookkeepingAccountsResourceWithStreamingResponse, - AsyncBookkeepingAccountsResourceWithStreamingResponse, + BookkeepingAccounts, + AsyncBookkeepingAccounts, + BookkeepingAccountsWithRawResponse, + AsyncBookkeepingAccountsWithRawResponse, + BookkeepingAccountsWithStreamingResponse, + AsyncBookkeepingAccountsWithStreamingResponse, ) from .pending_transactions import ( - PendingTransactionsResource, - AsyncPendingTransactionsResource, - PendingTransactionsResourceWithRawResponse, - AsyncPendingTransactionsResourceWithRawResponse, - PendingTransactionsResourceWithStreamingResponse, - AsyncPendingTransactionsResourceWithStreamingResponse, + PendingTransactions, + AsyncPendingTransactions, + PendingTransactionsWithRawResponse, + AsyncPendingTransactionsWithRawResponse, + PendingTransactionsWithStreamingResponse, + AsyncPendingTransactionsWithStreamingResponse, ) from .declined_transactions import ( - DeclinedTransactionsResource, - AsyncDeclinedTransactionsResource, - DeclinedTransactionsResourceWithRawResponse, - AsyncDeclinedTransactionsResourceWithRawResponse, - DeclinedTransactionsResourceWithStreamingResponse, - AsyncDeclinedTransactionsResourceWithStreamingResponse, + DeclinedTransactions, + AsyncDeclinedTransactions, + DeclinedTransactionsWithRawResponse, + AsyncDeclinedTransactionsWithRawResponse, + DeclinedTransactionsWithStreamingResponse, + AsyncDeclinedTransactionsWithStreamingResponse, ) from .digital_card_profiles import ( - DigitalCardProfilesResource, - AsyncDigitalCardProfilesResource, - DigitalCardProfilesResourceWithRawResponse, - AsyncDigitalCardProfilesResourceWithRawResponse, - DigitalCardProfilesResourceWithStreamingResponse, - AsyncDigitalCardProfilesResourceWithStreamingResponse, + DigitalCardProfiles, + AsyncDigitalCardProfiles, + DigitalCardProfilesWithRawResponse, + AsyncDigitalCardProfilesWithRawResponse, + DigitalCardProfilesWithStreamingResponse, + AsyncDigitalCardProfilesWithStreamingResponse, ) from .digital_wallet_tokens import ( - DigitalWalletTokensResource, - AsyncDigitalWalletTokensResource, - DigitalWalletTokensResourceWithRawResponse, - AsyncDigitalWalletTokensResourceWithRawResponse, - DigitalWalletTokensResourceWithStreamingResponse, - AsyncDigitalWalletTokensResourceWithStreamingResponse, + DigitalWalletTokens, + AsyncDigitalWalletTokens, + DigitalWalletTokensWithRawResponse, + AsyncDigitalWalletTokensWithRawResponse, + DigitalWalletTokensWithStreamingResponse, + AsyncDigitalWalletTokensWithStreamingResponse, ) from .inbound_ach_transfers import ( - InboundACHTransfersResource, - AsyncInboundACHTransfersResource, - InboundACHTransfersResourceWithRawResponse, - AsyncInboundACHTransfersResourceWithRawResponse, - InboundACHTransfersResourceWithStreamingResponse, - AsyncInboundACHTransfersResourceWithStreamingResponse, + InboundACHTransfers, + AsyncInboundACHTransfers, + InboundACHTransfersWithRawResponse, + AsyncInboundACHTransfersWithRawResponse, + InboundACHTransfersWithStreamingResponse, + AsyncInboundACHTransfersWithStreamingResponse, ) from .bookkeeping_entry_sets import ( - BookkeepingEntrySetsResource, - AsyncBookkeepingEntrySetsResource, - BookkeepingEntrySetsResourceWithRawResponse, - AsyncBookkeepingEntrySetsResourceWithRawResponse, - BookkeepingEntrySetsResourceWithStreamingResponse, - AsyncBookkeepingEntrySetsResourceWithStreamingResponse, + BookkeepingEntrySets, + AsyncBookkeepingEntrySets, + BookkeepingEntrySetsWithRawResponse, + AsyncBookkeepingEntrySetsWithRawResponse, + BookkeepingEntrySetsWithStreamingResponse, + AsyncBookkeepingEntrySetsWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDepositsResource, - AsyncInboundCheckDepositsResource, - InboundCheckDepositsResourceWithRawResponse, - AsyncInboundCheckDepositsResourceWithRawResponse, - InboundCheckDepositsResourceWithStreamingResponse, - AsyncInboundCheckDepositsResourceWithStreamingResponse, + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, ) from .inbound_wire_transfers import ( - InboundWireTransfersResource, - AsyncInboundWireTransfersResource, - InboundWireTransfersResourceWithRawResponse, - AsyncInboundWireTransfersResourceWithRawResponse, - InboundWireTransfersResourceWithStreamingResponse, - AsyncInboundWireTransfersResourceWithStreamingResponse, + InboundWireTransfers, + AsyncInboundWireTransfers, + InboundWireTransfersWithRawResponse, + AsyncInboundWireTransfersWithRawResponse, + InboundWireTransfersWithStreamingResponse, + AsyncInboundWireTransfersWithStreamingResponse, ) from .physical_card_profiles import ( - PhysicalCardProfilesResource, - AsyncPhysicalCardProfilesResource, - PhysicalCardProfilesResourceWithRawResponse, - AsyncPhysicalCardProfilesResourceWithRawResponse, - PhysicalCardProfilesResourceWithStreamingResponse, - AsyncPhysicalCardProfilesResourceWithStreamingResponse, -) -from .supplemental_documents import ( - SupplementalDocumentsResource, - AsyncSupplementalDocumentsResource, - SupplementalDocumentsResourceWithRawResponse, - AsyncSupplementalDocumentsResourceWithRawResponse, - SupplementalDocumentsResourceWithStreamingResponse, - AsyncSupplementalDocumentsResourceWithStreamingResponse, + PhysicalCardProfiles, + AsyncPhysicalCardProfiles, + PhysicalCardProfilesWithRawResponse, + AsyncPhysicalCardProfilesWithRawResponse, + PhysicalCardProfilesWithStreamingResponse, + AsyncPhysicalCardProfilesWithStreamingResponse, ) from .wire_drawdown_requests import ( - WireDrawdownRequestsResource, - AsyncWireDrawdownRequestsResource, - WireDrawdownRequestsResourceWithRawResponse, - AsyncWireDrawdownRequestsResourceWithRawResponse, - WireDrawdownRequestsResourceWithStreamingResponse, - AsyncWireDrawdownRequestsResourceWithStreamingResponse, + WireDrawdownRequests, + AsyncWireDrawdownRequests, + WireDrawdownRequestsWithRawResponse, + AsyncWireDrawdownRequestsWithRawResponse, + WireDrawdownRequestsWithStreamingResponse, + AsyncWireDrawdownRequestsWithStreamingResponse, ) from .card_purchase_supplements import ( - CardPurchaseSupplementsResource, - AsyncCardPurchaseSupplementsResource, - CardPurchaseSupplementsResourceWithRawResponse, - AsyncCardPurchaseSupplementsResourceWithRawResponse, - CardPurchaseSupplementsResourceWithStreamingResponse, - AsyncCardPurchaseSupplementsResourceWithStreamingResponse, -) -from .intrafi_account_enrollments import ( - IntrafiAccountEnrollmentsResource, - AsyncIntrafiAccountEnrollmentsResource, - IntrafiAccountEnrollmentsResourceWithRawResponse, - AsyncIntrafiAccountEnrollmentsResourceWithRawResponse, - IntrafiAccountEnrollmentsResourceWithStreamingResponse, - AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse, + CardPurchaseSupplements, + AsyncCardPurchaseSupplements, + CardPurchaseSupplementsWithRawResponse, + AsyncCardPurchaseSupplementsWithRawResponse, + CardPurchaseSupplementsWithStreamingResponse, + AsyncCardPurchaseSupplementsWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfersResource, - AsyncRealTimePaymentsTransfersResource, - RealTimePaymentsTransfersResourceWithRawResponse, - AsyncRealTimePaymentsTransfersResourceWithRawResponse, - RealTimePaymentsTransfersResourceWithStreamingResponse, - AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, + RealTimePaymentsTransfers, + AsyncRealTimePaymentsTransfers, + RealTimePaymentsTransfersWithRawResponse, + AsyncRealTimePaymentsTransfersWithRawResponse, + RealTimePaymentsTransfersWithStreamingResponse, + AsyncRealTimePaymentsTransfersWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequestsResource, - AsyncInboundWireDrawdownRequestsResource, - InboundWireDrawdownRequestsResourceWithRawResponse, - AsyncInboundWireDrawdownRequestsResourceWithRawResponse, - InboundWireDrawdownRequestsResourceWithStreamingResponse, - AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, + InboundWireDrawdownRequests, + AsyncInboundWireDrawdownRequests, + InboundWireDrawdownRequestsWithRawResponse, + AsyncInboundWireDrawdownRequestsWithRawResponse, + InboundWireDrawdownRequestsWithStreamingResponse, + AsyncInboundWireDrawdownRequestsWithStreamingResponse, ) from .proof_of_authorization_requests import ( - ProofOfAuthorizationRequestsResource, - AsyncProofOfAuthorizationRequestsResource, - ProofOfAuthorizationRequestsResourceWithRawResponse, - AsyncProofOfAuthorizationRequestsResourceWithRawResponse, - ProofOfAuthorizationRequestsResourceWithStreamingResponse, - AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse, + ProofOfAuthorizationRequests, + AsyncProofOfAuthorizationRequests, + ProofOfAuthorizationRequestsWithRawResponse, + AsyncProofOfAuthorizationRequestsWithRawResponse, + ProofOfAuthorizationRequestsWithStreamingResponse, + AsyncProofOfAuthorizationRequestsWithStreamingResponse, ) from .real_time_payments_request_for_payments import ( - RealTimePaymentsRequestForPaymentsResource, - AsyncRealTimePaymentsRequestForPaymentsResource, - RealTimePaymentsRequestForPaymentsResourceWithRawResponse, - AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse, - RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, - AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, + RealTimePaymentsRequestForPayments, + AsyncRealTimePaymentsRequestForPayments, + RealTimePaymentsRequestForPaymentsWithRawResponse, + AsyncRealTimePaymentsRequestForPaymentsWithRawResponse, + RealTimePaymentsRequestForPaymentsWithStreamingResponse, + AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse, ) from .proof_of_authorization_request_submissions import ( - ProofOfAuthorizationRequestSubmissionsResource, - AsyncProofOfAuthorizationRequestSubmissionsResource, - ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, - AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, - ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, - AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, + ProofOfAuthorizationRequestSubmissions, + AsyncProofOfAuthorizationRequestSubmissions, + ProofOfAuthorizationRequestSubmissionsWithRawResponse, + AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse, + ProofOfAuthorizationRequestSubmissionsWithStreamingResponse, + AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse, ) __all__ = [ - "AccountsResource", - "AsyncAccountsResource", - "AccountsResourceWithRawResponse", - "AsyncAccountsResourceWithRawResponse", - "AccountsResourceWithStreamingResponse", - "AsyncAccountsResourceWithStreamingResponse", - "AccountNumbersResource", - "AsyncAccountNumbersResource", - "AccountNumbersResourceWithRawResponse", - "AsyncAccountNumbersResourceWithRawResponse", - "AccountNumbersResourceWithStreamingResponse", - "AsyncAccountNumbersResourceWithStreamingResponse", - "CardsResource", - "AsyncCardsResource", - "CardsResourceWithRawResponse", - "AsyncCardsResourceWithRawResponse", - "CardsResourceWithStreamingResponse", - "AsyncCardsResourceWithStreamingResponse", - "CardPaymentsResource", - "AsyncCardPaymentsResource", - "CardPaymentsResourceWithRawResponse", - "AsyncCardPaymentsResourceWithRawResponse", - "CardPaymentsResourceWithStreamingResponse", - "AsyncCardPaymentsResourceWithStreamingResponse", - "CardPurchaseSupplementsResource", - "AsyncCardPurchaseSupplementsResource", - "CardPurchaseSupplementsResourceWithRawResponse", - "AsyncCardPurchaseSupplementsResourceWithRawResponse", - "CardPurchaseSupplementsResourceWithStreamingResponse", - "AsyncCardPurchaseSupplementsResourceWithStreamingResponse", - "CardDisputesResource", - "AsyncCardDisputesResource", - "CardDisputesResourceWithRawResponse", - "AsyncCardDisputesResourceWithRawResponse", - "CardDisputesResourceWithStreamingResponse", - "AsyncCardDisputesResourceWithStreamingResponse", - "PhysicalCardsResource", - "AsyncPhysicalCardsResource", - "PhysicalCardsResourceWithRawResponse", - "AsyncPhysicalCardsResourceWithRawResponse", - "PhysicalCardsResourceWithStreamingResponse", - "AsyncPhysicalCardsResourceWithStreamingResponse", - "DigitalCardProfilesResource", - "AsyncDigitalCardProfilesResource", - "DigitalCardProfilesResourceWithRawResponse", - "AsyncDigitalCardProfilesResourceWithRawResponse", - "DigitalCardProfilesResourceWithStreamingResponse", - "AsyncDigitalCardProfilesResourceWithStreamingResponse", - "PhysicalCardProfilesResource", - "AsyncPhysicalCardProfilesResource", - "PhysicalCardProfilesResourceWithRawResponse", - "AsyncPhysicalCardProfilesResourceWithRawResponse", - "PhysicalCardProfilesResourceWithStreamingResponse", - "AsyncPhysicalCardProfilesResourceWithStreamingResponse", - "DigitalWalletTokensResource", - "AsyncDigitalWalletTokensResource", - "DigitalWalletTokensResourceWithRawResponse", - "AsyncDigitalWalletTokensResourceWithRawResponse", - "DigitalWalletTokensResourceWithStreamingResponse", - "AsyncDigitalWalletTokensResourceWithStreamingResponse", - "TransactionsResource", - "AsyncTransactionsResource", - "TransactionsResourceWithRawResponse", - "AsyncTransactionsResourceWithRawResponse", - "TransactionsResourceWithStreamingResponse", - "AsyncTransactionsResourceWithStreamingResponse", - "PendingTransactionsResource", - "AsyncPendingTransactionsResource", - "PendingTransactionsResourceWithRawResponse", - "AsyncPendingTransactionsResourceWithRawResponse", - "PendingTransactionsResourceWithStreamingResponse", - "AsyncPendingTransactionsResourceWithStreamingResponse", - "DeclinedTransactionsResource", - "AsyncDeclinedTransactionsResource", - "DeclinedTransactionsResourceWithRawResponse", - "AsyncDeclinedTransactionsResourceWithRawResponse", - "DeclinedTransactionsResourceWithStreamingResponse", - "AsyncDeclinedTransactionsResourceWithStreamingResponse", - "AccountTransfersResource", - "AsyncAccountTransfersResource", - "AccountTransfersResourceWithRawResponse", - "AsyncAccountTransfersResourceWithRawResponse", - "AccountTransfersResourceWithStreamingResponse", - "AsyncAccountTransfersResourceWithStreamingResponse", - "ACHTransfersResource", - "AsyncACHTransfersResource", - "ACHTransfersResourceWithRawResponse", - "AsyncACHTransfersResourceWithRawResponse", - "ACHTransfersResourceWithStreamingResponse", - "AsyncACHTransfersResourceWithStreamingResponse", - "ACHPrenotificationsResource", - "AsyncACHPrenotificationsResource", - "ACHPrenotificationsResourceWithRawResponse", - "AsyncACHPrenotificationsResourceWithRawResponse", - "ACHPrenotificationsResourceWithStreamingResponse", - "AsyncACHPrenotificationsResourceWithStreamingResponse", - "InboundACHTransfersResource", - "AsyncInboundACHTransfersResource", - "InboundACHTransfersResourceWithRawResponse", - "AsyncInboundACHTransfersResourceWithRawResponse", - "InboundACHTransfersResourceWithStreamingResponse", - "AsyncInboundACHTransfersResourceWithStreamingResponse", - "WireTransfersResource", - "AsyncWireTransfersResource", - "WireTransfersResourceWithRawResponse", - "AsyncWireTransfersResourceWithRawResponse", - "WireTransfersResourceWithStreamingResponse", - "AsyncWireTransfersResourceWithStreamingResponse", - "InboundWireTransfersResource", - "AsyncInboundWireTransfersResource", - "InboundWireTransfersResourceWithRawResponse", - "AsyncInboundWireTransfersResourceWithRawResponse", - "InboundWireTransfersResourceWithStreamingResponse", - "AsyncInboundWireTransfersResourceWithStreamingResponse", - "WireDrawdownRequestsResource", - "AsyncWireDrawdownRequestsResource", - "WireDrawdownRequestsResourceWithRawResponse", - "AsyncWireDrawdownRequestsResourceWithRawResponse", - "WireDrawdownRequestsResourceWithStreamingResponse", - "AsyncWireDrawdownRequestsResourceWithStreamingResponse", - "InboundWireDrawdownRequestsResource", - "AsyncInboundWireDrawdownRequestsResource", - "InboundWireDrawdownRequestsResourceWithRawResponse", - "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", - "InboundWireDrawdownRequestsResourceWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", - "CheckTransfersResource", - "AsyncCheckTransfersResource", - "CheckTransfersResourceWithRawResponse", - "AsyncCheckTransfersResourceWithRawResponse", - "CheckTransfersResourceWithStreamingResponse", - "AsyncCheckTransfersResourceWithStreamingResponse", - "InboundCheckDepositsResource", - "AsyncInboundCheckDepositsResource", - "InboundCheckDepositsResourceWithRawResponse", - "AsyncInboundCheckDepositsResourceWithRawResponse", - "InboundCheckDepositsResourceWithStreamingResponse", - "AsyncInboundCheckDepositsResourceWithStreamingResponse", - "RealTimePaymentsTransfersResource", - "AsyncRealTimePaymentsTransfersResource", - "RealTimePaymentsTransfersResourceWithRawResponse", - "AsyncRealTimePaymentsTransfersResourceWithRawResponse", - "RealTimePaymentsTransfersResourceWithStreamingResponse", - "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", - "CheckDepositsResource", - "AsyncCheckDepositsResource", - "CheckDepositsResourceWithRawResponse", - "AsyncCheckDepositsResourceWithRawResponse", - "CheckDepositsResourceWithStreamingResponse", - "AsyncCheckDepositsResourceWithStreamingResponse", - "LockboxesResource", - "AsyncLockboxesResource", - "LockboxesResourceWithRawResponse", - "AsyncLockboxesResourceWithRawResponse", - "LockboxesResourceWithStreamingResponse", - "AsyncLockboxesResourceWithStreamingResponse", - "InboundMailItemsResource", - "AsyncInboundMailItemsResource", - "InboundMailItemsResourceWithRawResponse", - "AsyncInboundMailItemsResourceWithRawResponse", - "InboundMailItemsResourceWithStreamingResponse", - "AsyncInboundMailItemsResourceWithStreamingResponse", - "RoutingNumbersResource", - "AsyncRoutingNumbersResource", - "RoutingNumbersResourceWithRawResponse", - "AsyncRoutingNumbersResourceWithRawResponse", - "RoutingNumbersResourceWithStreamingResponse", - "AsyncRoutingNumbersResourceWithStreamingResponse", - "ExternalAccountsResource", - "AsyncExternalAccountsResource", - "ExternalAccountsResourceWithRawResponse", - "AsyncExternalAccountsResourceWithRawResponse", - "ExternalAccountsResourceWithStreamingResponse", - "AsyncExternalAccountsResourceWithStreamingResponse", - "EntitiesResource", - "AsyncEntitiesResource", - "EntitiesResourceWithRawResponse", - "AsyncEntitiesResourceWithRawResponse", - "EntitiesResourceWithStreamingResponse", - "AsyncEntitiesResourceWithStreamingResponse", - "SupplementalDocumentsResource", - "AsyncSupplementalDocumentsResource", - "SupplementalDocumentsResourceWithRawResponse", - "AsyncSupplementalDocumentsResourceWithRawResponse", - "SupplementalDocumentsResourceWithStreamingResponse", - "AsyncSupplementalDocumentsResourceWithStreamingResponse", - "ProgramsResource", - "AsyncProgramsResource", - "ProgramsResourceWithRawResponse", - "AsyncProgramsResourceWithRawResponse", - "ProgramsResourceWithStreamingResponse", - "AsyncProgramsResourceWithStreamingResponse", - "ProofOfAuthorizationRequestsResource", - "AsyncProofOfAuthorizationRequestsResource", - "ProofOfAuthorizationRequestsResourceWithRawResponse", - "AsyncProofOfAuthorizationRequestsResourceWithRawResponse", - "ProofOfAuthorizationRequestsResourceWithStreamingResponse", - "AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse", - "ProofOfAuthorizationRequestSubmissionsResource", - "AsyncProofOfAuthorizationRequestSubmissionsResource", - "ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", - "AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", - "ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", - "AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", - "AccountStatementsResource", - "AsyncAccountStatementsResource", - "AccountStatementsResourceWithRawResponse", - "AsyncAccountStatementsResourceWithRawResponse", - "AccountStatementsResourceWithStreamingResponse", - "AsyncAccountStatementsResourceWithStreamingResponse", - "FilesResource", - "AsyncFilesResource", - "FilesResourceWithRawResponse", - "AsyncFilesResourceWithRawResponse", - "FilesResourceWithStreamingResponse", - "AsyncFilesResourceWithStreamingResponse", - "DocumentsResource", - "AsyncDocumentsResource", - "DocumentsResourceWithRawResponse", - "AsyncDocumentsResourceWithRawResponse", - "DocumentsResourceWithStreamingResponse", - "AsyncDocumentsResourceWithStreamingResponse", - "ExportsResource", - "AsyncExportsResource", - "ExportsResourceWithRawResponse", - "AsyncExportsResourceWithRawResponse", - "ExportsResourceWithStreamingResponse", - "AsyncExportsResourceWithStreamingResponse", - "EventsResource", - "AsyncEventsResource", - "EventsResourceWithRawResponse", - "AsyncEventsResourceWithRawResponse", - "EventsResourceWithStreamingResponse", - "AsyncEventsResourceWithStreamingResponse", - "EventSubscriptionsResource", - "AsyncEventSubscriptionsResource", - "EventSubscriptionsResourceWithRawResponse", - "AsyncEventSubscriptionsResourceWithRawResponse", - "EventSubscriptionsResourceWithStreamingResponse", - "AsyncEventSubscriptionsResourceWithStreamingResponse", - "RealTimeDecisionsResource", - "AsyncRealTimeDecisionsResource", - "RealTimeDecisionsResourceWithRawResponse", - "AsyncRealTimeDecisionsResourceWithRawResponse", - "RealTimeDecisionsResourceWithStreamingResponse", - "AsyncRealTimeDecisionsResourceWithStreamingResponse", - "BookkeepingAccountsResource", - "AsyncBookkeepingAccountsResource", - "BookkeepingAccountsResourceWithRawResponse", - "AsyncBookkeepingAccountsResourceWithRawResponse", - "BookkeepingAccountsResourceWithStreamingResponse", - "AsyncBookkeepingAccountsResourceWithStreamingResponse", - "BookkeepingEntrySetsResource", - "AsyncBookkeepingEntrySetsResource", - "BookkeepingEntrySetsResourceWithRawResponse", - "AsyncBookkeepingEntrySetsResourceWithRawResponse", - "BookkeepingEntrySetsResourceWithStreamingResponse", - "AsyncBookkeepingEntrySetsResourceWithStreamingResponse", - "BookkeepingEntriesResource", - "AsyncBookkeepingEntriesResource", - "BookkeepingEntriesResourceWithRawResponse", - "AsyncBookkeepingEntriesResourceWithRawResponse", - "BookkeepingEntriesResourceWithStreamingResponse", - "AsyncBookkeepingEntriesResourceWithStreamingResponse", - "GroupsResource", - "AsyncGroupsResource", - "GroupsResourceWithRawResponse", - "AsyncGroupsResourceWithRawResponse", - "GroupsResourceWithStreamingResponse", - "AsyncGroupsResourceWithStreamingResponse", - "OAuthConnectionsResource", - "AsyncOAuthConnectionsResource", - "OAuthConnectionsResourceWithRawResponse", - "AsyncOAuthConnectionsResourceWithRawResponse", - "OAuthConnectionsResourceWithStreamingResponse", - "AsyncOAuthConnectionsResourceWithStreamingResponse", - "OAuthTokensResource", - "AsyncOAuthTokensResource", - "OAuthTokensResourceWithRawResponse", - "AsyncOAuthTokensResourceWithRawResponse", - "OAuthTokensResourceWithStreamingResponse", - "AsyncOAuthTokensResourceWithStreamingResponse", - "IntrafiAccountEnrollmentsResource", - "AsyncIntrafiAccountEnrollmentsResource", - "IntrafiAccountEnrollmentsResourceWithRawResponse", - "AsyncIntrafiAccountEnrollmentsResourceWithRawResponse", - "IntrafiAccountEnrollmentsResourceWithStreamingResponse", - "AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse", - "IntrafiBalancesResource", - "AsyncIntrafiBalancesResource", - "IntrafiBalancesResourceWithRawResponse", - "AsyncIntrafiBalancesResourceWithRawResponse", - "IntrafiBalancesResourceWithStreamingResponse", - "AsyncIntrafiBalancesResourceWithStreamingResponse", - "IntrafiExclusionsResource", - "AsyncIntrafiExclusionsResource", - "IntrafiExclusionsResourceWithRawResponse", - "AsyncIntrafiExclusionsResourceWithRawResponse", - "IntrafiExclusionsResourceWithStreamingResponse", - "AsyncIntrafiExclusionsResourceWithStreamingResponse", - "RealTimePaymentsRequestForPaymentsResource", - "AsyncRealTimePaymentsRequestForPaymentsResource", - "RealTimePaymentsRequestForPaymentsResourceWithRawResponse", - "AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse", - "RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", - "AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", - "SimulationsResource", - "AsyncSimulationsResource", - "SimulationsResourceWithRawResponse", - "AsyncSimulationsResourceWithRawResponse", - "SimulationsResourceWithStreamingResponse", - "AsyncSimulationsResourceWithStreamingResponse", + "Accounts", + "AsyncAccounts", + "AccountsWithRawResponse", + "AsyncAccountsWithRawResponse", + "AccountsWithStreamingResponse", + "AsyncAccountsWithStreamingResponse", + "AccountNumbers", + "AsyncAccountNumbers", + "AccountNumbersWithRawResponse", + "AsyncAccountNumbersWithRawResponse", + "AccountNumbersWithStreamingResponse", + "AsyncAccountNumbersWithStreamingResponse", + "BookkeepingAccounts", + "AsyncBookkeepingAccounts", + "BookkeepingAccountsWithRawResponse", + "AsyncBookkeepingAccountsWithRawResponse", + "BookkeepingAccountsWithStreamingResponse", + "AsyncBookkeepingAccountsWithStreamingResponse", + "BookkeepingEntrySets", + "AsyncBookkeepingEntrySets", + "BookkeepingEntrySetsWithRawResponse", + "AsyncBookkeepingEntrySetsWithRawResponse", + "BookkeepingEntrySetsWithStreamingResponse", + "AsyncBookkeepingEntrySetsWithStreamingResponse", + "BookkeepingEntries", + "AsyncBookkeepingEntries", + "BookkeepingEntriesWithRawResponse", + "AsyncBookkeepingEntriesWithRawResponse", + "BookkeepingEntriesWithStreamingResponse", + "AsyncBookkeepingEntriesWithStreamingResponse", + "RealTimeDecisions", + "AsyncRealTimeDecisions", + "RealTimeDecisionsWithRawResponse", + "AsyncRealTimeDecisionsWithRawResponse", + "RealTimeDecisionsWithStreamingResponse", + "AsyncRealTimeDecisionsWithStreamingResponse", + "RealTimePaymentsTransfers", + "AsyncRealTimePaymentsTransfers", + "RealTimePaymentsTransfersWithRawResponse", + "AsyncRealTimePaymentsTransfersWithRawResponse", + "RealTimePaymentsTransfersWithStreamingResponse", + "AsyncRealTimePaymentsTransfersWithStreamingResponse", + "Cards", + "AsyncCards", + "CardsWithRawResponse", + "AsyncCardsWithRawResponse", + "CardsWithStreamingResponse", + "AsyncCardsWithStreamingResponse", + "CardDisputes", + "AsyncCardDisputes", + "CardDisputesWithRawResponse", + "AsyncCardDisputesWithRawResponse", + "CardDisputesWithStreamingResponse", + "AsyncCardDisputesWithStreamingResponse", + "CardPurchaseSupplements", + "AsyncCardPurchaseSupplements", + "CardPurchaseSupplementsWithRawResponse", + "AsyncCardPurchaseSupplementsWithRawResponse", + "CardPurchaseSupplementsWithStreamingResponse", + "AsyncCardPurchaseSupplementsWithStreamingResponse", + "ExternalAccounts", + "AsyncExternalAccounts", + "ExternalAccountsWithRawResponse", + "AsyncExternalAccountsWithRawResponse", + "ExternalAccountsWithStreamingResponse", + "AsyncExternalAccountsWithStreamingResponse", + "Exports", + "AsyncExports", + "ExportsWithRawResponse", + "AsyncExportsWithRawResponse", + "ExportsWithStreamingResponse", + "AsyncExportsWithStreamingResponse", + "DigitalWalletTokens", + "AsyncDigitalWalletTokens", + "DigitalWalletTokensWithRawResponse", + "AsyncDigitalWalletTokensWithRawResponse", + "DigitalWalletTokensWithStreamingResponse", + "AsyncDigitalWalletTokensWithStreamingResponse", + "Transactions", + "AsyncTransactions", + "TransactionsWithRawResponse", + "AsyncTransactionsWithRawResponse", + "TransactionsWithStreamingResponse", + "AsyncTransactionsWithStreamingResponse", + "PendingTransactions", + "AsyncPendingTransactions", + "PendingTransactionsWithRawResponse", + "AsyncPendingTransactionsWithRawResponse", + "PendingTransactionsWithStreamingResponse", + "AsyncPendingTransactionsWithStreamingResponse", + "Programs", + "AsyncPrograms", + "ProgramsWithRawResponse", + "AsyncProgramsWithRawResponse", + "ProgramsWithStreamingResponse", + "AsyncProgramsWithStreamingResponse", + "DeclinedTransactions", + "AsyncDeclinedTransactions", + "DeclinedTransactionsWithRawResponse", + "AsyncDeclinedTransactionsWithRawResponse", + "DeclinedTransactionsWithStreamingResponse", + "AsyncDeclinedTransactionsWithStreamingResponse", + "AccountTransfers", + "AsyncAccountTransfers", + "AccountTransfersWithRawResponse", + "AsyncAccountTransfersWithRawResponse", + "AccountTransfersWithStreamingResponse", + "AsyncAccountTransfersWithStreamingResponse", + "ACHTransfers", + "AsyncACHTransfers", + "ACHTransfersWithRawResponse", + "AsyncACHTransfersWithRawResponse", + "ACHTransfersWithStreamingResponse", + "AsyncACHTransfersWithStreamingResponse", + "ACHPrenotifications", + "AsyncACHPrenotifications", + "ACHPrenotificationsWithRawResponse", + "AsyncACHPrenotificationsWithRawResponse", + "ACHPrenotificationsWithStreamingResponse", + "AsyncACHPrenotificationsWithStreamingResponse", + "Documents", + "AsyncDocuments", + "DocumentsWithRawResponse", + "AsyncDocumentsWithRawResponse", + "DocumentsWithStreamingResponse", + "AsyncDocumentsWithStreamingResponse", + "WireTransfers", + "AsyncWireTransfers", + "WireTransfersWithRawResponse", + "AsyncWireTransfersWithRawResponse", + "WireTransfersWithStreamingResponse", + "AsyncWireTransfersWithStreamingResponse", + "CheckTransfers", + "AsyncCheckTransfers", + "CheckTransfersWithRawResponse", + "AsyncCheckTransfersWithRawResponse", + "CheckTransfersWithStreamingResponse", + "AsyncCheckTransfersWithStreamingResponse", + "Entities", + "AsyncEntities", + "EntitiesWithRawResponse", + "AsyncEntitiesWithRawResponse", + "EntitiesWithStreamingResponse", + "AsyncEntitiesWithStreamingResponse", + "InboundACHTransfers", + "AsyncInboundACHTransfers", + "InboundACHTransfersWithRawResponse", + "AsyncInboundACHTransfersWithRawResponse", + "InboundACHTransfersWithStreamingResponse", + "AsyncInboundACHTransfersWithStreamingResponse", + "InboundWireDrawdownRequests", + "AsyncInboundWireDrawdownRequests", + "InboundWireDrawdownRequestsWithRawResponse", + "AsyncInboundWireDrawdownRequestsWithRawResponse", + "InboundWireDrawdownRequestsWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsWithStreamingResponse", + "WireDrawdownRequests", + "AsyncWireDrawdownRequests", + "WireDrawdownRequestsWithRawResponse", + "AsyncWireDrawdownRequestsWithRawResponse", + "WireDrawdownRequestsWithStreamingResponse", + "AsyncWireDrawdownRequestsWithStreamingResponse", + "Events", + "AsyncEvents", + "EventsWithRawResponse", + "AsyncEventsWithRawResponse", + "EventsWithStreamingResponse", + "AsyncEventsWithStreamingResponse", + "EventSubscriptions", + "AsyncEventSubscriptions", + "EventSubscriptionsWithRawResponse", + "AsyncEventSubscriptionsWithRawResponse", + "EventSubscriptionsWithStreamingResponse", + "AsyncEventSubscriptionsWithStreamingResponse", + "Files", + "AsyncFiles", + "FilesWithRawResponse", + "AsyncFilesWithRawResponse", + "FilesWithStreamingResponse", + "AsyncFilesWithStreamingResponse", + "Groups", + "AsyncGroups", + "GroupsWithRawResponse", + "AsyncGroupsWithRawResponse", + "GroupsWithStreamingResponse", + "AsyncGroupsWithStreamingResponse", + "OAuthConnections", + "AsyncOAuthConnections", + "OAuthConnectionsWithRawResponse", + "AsyncOAuthConnectionsWithRawResponse", + "OAuthConnectionsWithStreamingResponse", + "AsyncOAuthConnectionsWithStreamingResponse", + "CheckDeposits", + "AsyncCheckDeposits", + "CheckDepositsWithRawResponse", + "AsyncCheckDepositsWithRawResponse", + "CheckDepositsWithStreamingResponse", + "AsyncCheckDepositsWithStreamingResponse", + "RoutingNumbers", + "AsyncRoutingNumbers", + "RoutingNumbersWithRawResponse", + "AsyncRoutingNumbersWithRawResponse", + "RoutingNumbersWithStreamingResponse", + "AsyncRoutingNumbersWithStreamingResponse", + "AccountStatements", + "AsyncAccountStatements", + "AccountStatementsWithRawResponse", + "AsyncAccountStatementsWithRawResponse", + "AccountStatementsWithStreamingResponse", + "AsyncAccountStatementsWithStreamingResponse", + "Simulations", + "AsyncSimulations", + "SimulationsWithRawResponse", + "AsyncSimulationsWithRawResponse", + "SimulationsWithStreamingResponse", + "AsyncSimulationsWithStreamingResponse", + "PhysicalCards", + "AsyncPhysicalCards", + "PhysicalCardsWithRawResponse", + "AsyncPhysicalCardsWithRawResponse", + "PhysicalCardsWithStreamingResponse", + "AsyncPhysicalCardsWithStreamingResponse", + "CardPayments", + "AsyncCardPayments", + "CardPaymentsWithRawResponse", + "AsyncCardPaymentsWithRawResponse", + "CardPaymentsWithStreamingResponse", + "AsyncCardPaymentsWithStreamingResponse", + "ProofOfAuthorizationRequests", + "AsyncProofOfAuthorizationRequests", + "ProofOfAuthorizationRequestsWithRawResponse", + "AsyncProofOfAuthorizationRequestsWithRawResponse", + "ProofOfAuthorizationRequestsWithStreamingResponse", + "AsyncProofOfAuthorizationRequestsWithStreamingResponse", + "ProofOfAuthorizationRequestSubmissions", + "AsyncProofOfAuthorizationRequestSubmissions", + "ProofOfAuthorizationRequestSubmissionsWithRawResponse", + "AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse", + "ProofOfAuthorizationRequestSubmissionsWithStreamingResponse", + "AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse", + "Intrafi", + "AsyncIntrafi", + "IntrafiWithRawResponse", + "AsyncIntrafiWithRawResponse", + "IntrafiWithStreamingResponse", + "AsyncIntrafiWithStreamingResponse", + "RealTimePaymentsRequestForPayments", + "AsyncRealTimePaymentsRequestForPayments", + "RealTimePaymentsRequestForPaymentsWithRawResponse", + "AsyncRealTimePaymentsRequestForPaymentsWithRawResponse", + "RealTimePaymentsRequestForPaymentsWithStreamingResponse", + "AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse", + "OAuthTokens", + "AsyncOAuthTokens", + "OAuthTokensWithRawResponse", + "AsyncOAuthTokensWithRawResponse", + "OAuthTokensWithStreamingResponse", + "AsyncOAuthTokensWithStreamingResponse", + "InboundWireTransfers", + "AsyncInboundWireTransfers", + "InboundWireTransfersWithRawResponse", + "AsyncInboundWireTransfersWithRawResponse", + "InboundWireTransfersWithStreamingResponse", + "AsyncInboundWireTransfersWithStreamingResponse", + "DigitalCardProfiles", + "AsyncDigitalCardProfiles", + "DigitalCardProfilesWithRawResponse", + "AsyncDigitalCardProfilesWithRawResponse", + "DigitalCardProfilesWithStreamingResponse", + "AsyncDigitalCardProfilesWithStreamingResponse", + "PhysicalCardProfiles", + "AsyncPhysicalCardProfiles", + "PhysicalCardProfilesWithRawResponse", + "AsyncPhysicalCardProfilesWithRawResponse", + "PhysicalCardProfilesWithStreamingResponse", + "AsyncPhysicalCardProfilesWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", + "InboundMailItems", + "AsyncInboundMailItems", + "InboundMailItemsWithRawResponse", + "AsyncInboundMailItemsWithRawResponse", + "InboundMailItemsWithStreamingResponse", + "AsyncInboundMailItemsWithStreamingResponse", + "Lockboxes", + "AsyncLockboxes", + "LockboxesWithRawResponse", + "AsyncLockboxesWithRawResponse", + "LockboxesWithStreamingResponse", + "AsyncLockboxesWithStreamingResponse", ] diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 37125226b..6823bc66c 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import ( account_number_list_params, account_number_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_number import AccountNumber -__all__ = ["AccountNumbersResource", "AsyncAccountNumbersResource"] +__all__ = ["AccountNumbers", "AsyncAccountNumbers"] -class AccountNumbersResource(SyncAPIResource): +class AccountNumbers(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountNumbersResourceWithRawResponse: - return AccountNumbersResourceWithRawResponse(self) + def with_raw_response(self) -> AccountNumbersWithRawResponse: + return AccountNumbersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountNumbersResourceWithStreamingResponse: - return AccountNumbersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountNumbersWithStreamingResponse: + return AccountNumbersWithStreamingResponse(self) def create( self, @@ -279,14 +275,14 @@ def list( ) -class AsyncAccountNumbersResource(AsyncAPIResource): +class AsyncAccountNumbers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountNumbersResourceWithRawResponse: - return AsyncAccountNumbersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountNumbersWithRawResponse: + return AsyncAccountNumbersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountNumbersResourceWithStreamingResponse: - return AsyncAccountNumbersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountNumbersWithStreamingResponse: + return AsyncAccountNumbersWithStreamingResponse(self) async def create( self, @@ -527,44 +523,44 @@ def list( ) -class AccountNumbersResourceWithRawResponse: - def __init__(self, account_numbers: AccountNumbersResource) -> None: +class AccountNumbersWithRawResponse: + def __init__(self, account_numbers: AccountNumbers) -> None: self._account_numbers = account_numbers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( account_numbers.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( account_numbers.list, ) -class AsyncAccountNumbersResourceWithRawResponse: - def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: +class AsyncAccountNumbersWithRawResponse: + def __init__(self, account_numbers: AsyncAccountNumbers) -> None: self._account_numbers = account_numbers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( account_numbers.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( account_numbers.list, ) -class AccountNumbersResourceWithStreamingResponse: - def __init__(self, account_numbers: AccountNumbersResource) -> None: +class AccountNumbersWithStreamingResponse: + def __init__(self, account_numbers: AccountNumbers) -> None: self._account_numbers = account_numbers self.create = to_streamed_response_wrapper( @@ -581,8 +577,8 @@ def __init__(self, account_numbers: AccountNumbersResource) -> None: ) -class AsyncAccountNumbersResourceWithStreamingResponse: - def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: +class AsyncAccountNumbersWithStreamingResponse: + def __init__(self, account_numbers: AsyncAccountNumbers) -> None: self._account_numbers = account_numbers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 1ea474854..1a21e706a 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import account_statement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_statement import AccountStatement -__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] +__all__ = ["AccountStatements", "AsyncAccountStatements"] -class AccountStatementsResource(SyncAPIResource): +class AccountStatements(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: - return AccountStatementsResourceWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsWithRawResponse: + return AccountStatementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: - return AccountStatementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: + return AccountStatementsWithStreamingResponse(self) def retrieve( self, @@ -123,14 +119,14 @@ def list( ) -class AsyncAccountStatementsResource(AsyncAPIResource): +class AsyncAccountStatements(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: - return AsyncAccountStatementsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: + return AsyncAccountStatementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: - return AsyncAccountStatementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: + return AsyncAccountStatementsWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +220,32 @@ def list( ) -class AccountStatementsResourceWithRawResponse: - def __init__(self, account_statements: AccountStatementsResource) -> None: +class AccountStatementsWithRawResponse: + def __init__(self, account_statements: AccountStatements) -> None: self._account_statements = account_statements - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( account_statements.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( account_statements.list, ) -class AsyncAccountStatementsResourceWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: +class AsyncAccountStatementsWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatements) -> None: self._account_statements = account_statements - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( account_statements.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( account_statements.list, ) -class AccountStatementsResourceWithStreamingResponse: - def __init__(self, account_statements: AccountStatementsResource) -> None: +class AccountStatementsWithStreamingResponse: + def __init__(self, account_statements: AccountStatements) -> None: self._account_statements = account_statements self.retrieve = to_streamed_response_wrapper( @@ -260,8 +256,8 @@ def __init__(self, account_statements: AccountStatementsResource) -> None: ) -class AsyncAccountStatementsResourceWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: +class AsyncAccountStatementsWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatements) -> None: self._account_statements = account_statements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index ef942a740..8b2c357b6 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import account_transfer_list_params, account_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,27 +13,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_transfer import AccountTransfer -__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] +__all__ = ["AccountTransfers", "AsyncAccountTransfers"] -class AccountTransfersResource(SyncAPIResource): +class AccountTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: - return AccountTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersWithRawResponse: + return AccountTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: - return AccountTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: + return AccountTransfersWithStreamingResponse(self) def create( self, @@ -284,14 +280,14 @@ def cancel( ) -class AsyncAccountTransfersResource(AsyncAPIResource): +class AsyncAccountTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: - return AsyncAccountTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: + return AsyncAccountTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: - return AsyncAccountTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: + return AsyncAccountTransfersWithStreamingResponse(self) async def create( self, @@ -543,50 +539,50 @@ async def cancel( ) -class AccountTransfersResourceWithRawResponse: - def __init__(self, account_transfers: AccountTransfersResource) -> None: +class AccountTransfersWithRawResponse: + def __init__(self, account_transfers: AccountTransfers) -> None: self._account_transfers = account_transfers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( account_transfers.list, ) - self.approve = to_raw_response_wrapper( + self.approve = _legacy_response.to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = to_raw_response_wrapper( + self.cancel = _legacy_response.to_raw_response_wrapper( account_transfers.cancel, ) -class AsyncAccountTransfersResourceWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: +class AsyncAccountTransfersWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfers) -> None: self._account_transfers = account_transfers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( account_transfers.list, ) - self.approve = async_to_raw_response_wrapper( + self.approve = _legacy_response.async_to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = async_to_raw_response_wrapper( + self.cancel = _legacy_response.async_to_raw_response_wrapper( account_transfers.cancel, ) -class AccountTransfersResourceWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfersResource) -> None: +class AccountTransfersWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfers) -> None: self._account_transfers = account_transfers self.create = to_streamed_response_wrapper( @@ -606,8 +602,8 @@ def __init__(self, account_transfers: AccountTransfersResource) -> None: ) -class AsyncAccountTransfersResourceWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: +class AsyncAccountTransfersWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfers) -> None: self._account_transfers = account_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 11537977d..19efac5de 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -8,6 +8,7 @@ import httpx +from .. import _legacy_response from ..types import ( account_list_params, account_create_params, @@ -21,28 +22,23 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup -__all__ = ["AccountsResource", "AsyncAccountsResource"] +__all__ = ["Accounts", "AsyncAccounts"] -class AccountsResource(SyncAPIResource): +class Accounts(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountsResourceWithRawResponse: - return AccountsResourceWithRawResponse(self) + def with_raw_response(self) -> AccountsWithRawResponse: + return AccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountsResourceWithStreamingResponse: - return AccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountsWithStreamingResponse: + return AccountsWithStreamingResponse(self) def create( self, @@ -343,14 +339,14 @@ def close( ) -class AsyncAccountsResource(AsyncAPIResource): +class AsyncAccounts(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: - return AsyncAccountsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountsWithRawResponse: + return AsyncAccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse: - return AsyncAccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountsWithStreamingResponse: + return AsyncAccountsWithStreamingResponse(self) async def create( self, @@ -651,56 +647,56 @@ async def close( ) -class AccountsResourceWithRawResponse: - def __init__(self, accounts: AccountsResource) -> None: +class AccountsWithRawResponse: + def __init__(self, accounts: Accounts) -> None: self._accounts = accounts - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( accounts.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( accounts.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( accounts.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( accounts.list, ) - self.balance = to_raw_response_wrapper( + self.balance = _legacy_response.to_raw_response_wrapper( accounts.balance, ) - self.close = to_raw_response_wrapper( + self.close = _legacy_response.to_raw_response_wrapper( accounts.close, ) -class AsyncAccountsResourceWithRawResponse: - def __init__(self, accounts: AsyncAccountsResource) -> None: +class AsyncAccountsWithRawResponse: + def __init__(self, accounts: AsyncAccounts) -> None: self._accounts = accounts - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( accounts.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( accounts.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( accounts.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( accounts.list, ) - self.balance = async_to_raw_response_wrapper( + self.balance = _legacy_response.async_to_raw_response_wrapper( accounts.balance, ) - self.close = async_to_raw_response_wrapper( + self.close = _legacy_response.async_to_raw_response_wrapper( accounts.close, ) -class AccountsResourceWithStreamingResponse: - def __init__(self, accounts: AccountsResource) -> None: +class AccountsWithStreamingResponse: + def __init__(self, accounts: Accounts) -> None: self._accounts = accounts self.create = to_streamed_response_wrapper( @@ -723,8 +719,8 @@ def __init__(self, accounts: AccountsResource) -> None: ) -class AsyncAccountsResourceWithStreamingResponse: - def __init__(self, accounts: AsyncAccountsResource) -> None: +class AsyncAccountsWithStreamingResponse: + def __init__(self, accounts: AsyncAccounts) -> None: self._accounts = accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index b53f8c1b0..8e0e1332f 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -8,6 +8,7 @@ import httpx +from .. import _legacy_response from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -16,27 +17,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_prenotification import ACHPrenotification -__all__ = ["ACHPrenotificationsResource", "AsyncACHPrenotificationsResource"] +__all__ = ["ACHPrenotifications", "AsyncACHPrenotifications"] -class ACHPrenotificationsResource(SyncAPIResource): +class ACHPrenotifications(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHPrenotificationsResourceWithRawResponse: - return ACHPrenotificationsResourceWithRawResponse(self) + def with_raw_response(self) -> ACHPrenotificationsWithRawResponse: + return ACHPrenotificationsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHPrenotificationsResourceWithStreamingResponse: - return ACHPrenotificationsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ACHPrenotificationsWithStreamingResponse: + return ACHPrenotificationsWithStreamingResponse(self) def create( self, @@ -244,14 +240,14 @@ def list( ) -class AsyncACHPrenotificationsResource(AsyncAPIResource): +class AsyncACHPrenotifications(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHPrenotificationsResourceWithRawResponse: - return AsyncACHPrenotificationsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncACHPrenotificationsWithRawResponse: + return AsyncACHPrenotificationsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHPrenotificationsResourceWithStreamingResponse: - return AsyncACHPrenotificationsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHPrenotificationsWithStreamingResponse: + return AsyncACHPrenotificationsWithStreamingResponse(self) async def create( self, @@ -459,38 +455,38 @@ def list( ) -class ACHPrenotificationsResourceWithRawResponse: - def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: +class ACHPrenotificationsWithRawResponse: + def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: self._ach_prenotifications = ach_prenotifications - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( ach_prenotifications.list, ) -class AsyncACHPrenotificationsResourceWithRawResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: +class AsyncACHPrenotificationsWithRawResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: self._ach_prenotifications = ach_prenotifications - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( ach_prenotifications.list, ) -class ACHPrenotificationsResourceWithStreamingResponse: - def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: +class ACHPrenotificationsWithStreamingResponse: + def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: self._ach_prenotifications = ach_prenotifications self.create = to_streamed_response_wrapper( @@ -504,8 +500,8 @@ def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: ) -class AsyncACHPrenotificationsResourceWithStreamingResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: +class AsyncACHPrenotificationsWithStreamingResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: self._ach_prenotifications = ach_prenotifications self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 6df03a4fd..b1b178175 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -8,6 +8,7 @@ import httpx +from .. import _legacy_response from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -16,27 +17,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_transfer import ACHTransfer -__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] +__all__ = ["ACHTransfers", "AsyncACHTransfers"] -class ACHTransfersResource(SyncAPIResource): +class ACHTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: - return ACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersWithRawResponse: + return ACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: - return ACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: + return ACHTransfersWithStreamingResponse(self) def create( self, @@ -379,14 +375,14 @@ def cancel( ) -class AsyncACHTransfersResource(AsyncAPIResource): +class AsyncACHTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: - return AsyncACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: + return AsyncACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: - return AsyncACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: + return AsyncACHTransfersWithStreamingResponse(self) async def create( self, @@ -729,50 +725,50 @@ async def cancel( ) -class ACHTransfersResourceWithRawResponse: - def __init__(self, ach_transfers: ACHTransfersResource) -> None: +class ACHTransfersWithRawResponse: + def __init__(self, ach_transfers: ACHTransfers) -> None: self._ach_transfers = ach_transfers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( ach_transfers.list, ) - self.approve = to_raw_response_wrapper( + self.approve = _legacy_response.to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = to_raw_response_wrapper( + self.cancel = _legacy_response.to_raw_response_wrapper( ach_transfers.cancel, ) -class AsyncACHTransfersResourceWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: +class AsyncACHTransfersWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self._ach_transfers = ach_transfers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( ach_transfers.list, ) - self.approve = async_to_raw_response_wrapper( + self.approve = _legacy_response.async_to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = async_to_raw_response_wrapper( + self.cancel = _legacy_response.async_to_raw_response_wrapper( ach_transfers.cancel, ) -class ACHTransfersResourceWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfersResource) -> None: +class ACHTransfersWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfers) -> None: self._ach_transfers = ach_transfers self.create = to_streamed_response_wrapper( @@ -792,8 +788,8 @@ def __init__(self, ach_transfers: ACHTransfersResource) -> None: ) -class AsyncACHTransfersResourceWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: +class AsyncACHTransfersWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self._ach_transfers = ach_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 7fad31d1f..558af0946 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -8,6 +8,7 @@ import httpx +from .. import _legacy_response from ..types import ( bookkeeping_account_list_params, bookkeeping_account_create_params, @@ -21,28 +22,23 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup -__all__ = ["BookkeepingAccountsResource", "AsyncBookkeepingAccountsResource"] +__all__ = ["BookkeepingAccounts", "AsyncBookkeepingAccounts"] -class BookkeepingAccountsResource(SyncAPIResource): +class BookkeepingAccounts(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingAccountsResourceWithRawResponse: - return BookkeepingAccountsResourceWithRawResponse(self) + def with_raw_response(self) -> BookkeepingAccountsWithRawResponse: + return BookkeepingAccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingAccountsResourceWithStreamingResponse: - return BookkeepingAccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingAccountsWithStreamingResponse: + return BookkeepingAccountsWithStreamingResponse(self) def create( self, @@ -255,14 +251,14 @@ def balance( ) -class AsyncBookkeepingAccountsResource(AsyncAPIResource): +class AsyncBookkeepingAccounts(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingAccountsResourceWithRawResponse: - return AsyncBookkeepingAccountsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingAccountsWithRawResponse: + return AsyncBookkeepingAccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingAccountsResourceWithStreamingResponse: - return AsyncBookkeepingAccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingAccountsWithStreamingResponse: + return AsyncBookkeepingAccountsWithStreamingResponse(self) async def create( self, @@ -477,44 +473,44 @@ async def balance( ) -class BookkeepingAccountsResourceWithRawResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: +class BookkeepingAccountsWithRawResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = to_raw_response_wrapper( + self.balance = _legacy_response.to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class AsyncBookkeepingAccountsResourceWithRawResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: +class AsyncBookkeepingAccountsWithRawResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = async_to_raw_response_wrapper( + self.balance = _legacy_response.async_to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class BookkeepingAccountsResourceWithStreamingResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: +class BookkeepingAccountsWithStreamingResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = to_streamed_response_wrapper( @@ -531,8 +527,8 @@ def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: ) -class AsyncBookkeepingAccountsResourceWithStreamingResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: +class AsyncBookkeepingAccountsWithStreamingResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index d774cda33..dacbd168e 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import bookkeeping_entry_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry import BookkeepingEntry -__all__ = ["BookkeepingEntriesResource", "AsyncBookkeepingEntriesResource"] +__all__ = ["BookkeepingEntries", "AsyncBookkeepingEntries"] -class BookkeepingEntriesResource(SyncAPIResource): +class BookkeepingEntries(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntriesResourceWithRawResponse: - return BookkeepingEntriesResourceWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntriesWithRawResponse: + return BookkeepingEntriesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntriesResourceWithStreamingResponse: - return BookkeepingEntriesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntriesWithStreamingResponse: + return BookkeepingEntriesWithStreamingResponse(self) def retrieve( self, @@ -117,14 +113,14 @@ def list( ) -class AsyncBookkeepingEntriesResource(AsyncAPIResource): +class AsyncBookkeepingEntries(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntriesResourceWithRawResponse: - return AsyncBookkeepingEntriesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntriesWithRawResponse: + return AsyncBookkeepingEntriesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntriesResourceWithStreamingResponse: - return AsyncBookkeepingEntriesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntriesWithStreamingResponse: + return AsyncBookkeepingEntriesWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +208,32 @@ def list( ) -class BookkeepingEntriesResourceWithRawResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: +class BookkeepingEntriesWithRawResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( bookkeeping_entries.list, ) -class AsyncBookkeepingEntriesResourceWithRawResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: +class AsyncBookkeepingEntriesWithRawResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( bookkeeping_entries.list, ) -class BookkeepingEntriesResourceWithStreamingResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: +class BookkeepingEntriesWithStreamingResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = to_streamed_response_wrapper( @@ -248,8 +244,8 @@ def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: ) -class AsyncBookkeepingEntriesResourceWithStreamingResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: +class AsyncBookkeepingEntriesWithStreamingResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index 1aa8b68e3..d264d675b 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -7,6 +7,7 @@ import httpx +from .. import _legacy_response from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,27 +16,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet -__all__ = ["BookkeepingEntrySetsResource", "AsyncBookkeepingEntrySetsResource"] +__all__ = ["BookkeepingEntrySets", "AsyncBookkeepingEntrySets"] -class BookkeepingEntrySetsResource(SyncAPIResource): +class BookkeepingEntrySets(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntrySetsResourceWithRawResponse: - return BookkeepingEntrySetsResourceWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntrySetsWithRawResponse: + return BookkeepingEntrySetsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntrySetsResourceWithStreamingResponse: - return BookkeepingEntrySetsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntrySetsWithStreamingResponse: + return BookkeepingEntrySetsWithStreamingResponse(self) def create( self, @@ -189,14 +185,14 @@ def list( ) -class AsyncBookkeepingEntrySetsResource(AsyncAPIResource): +class AsyncBookkeepingEntrySets(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntrySetsResourceWithRawResponse: - return AsyncBookkeepingEntrySetsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntrySetsWithRawResponse: + return AsyncBookkeepingEntrySetsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntrySetsResourceWithStreamingResponse: - return AsyncBookkeepingEntrySetsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntrySetsWithStreamingResponse: + return AsyncBookkeepingEntrySetsWithStreamingResponse(self) async def create( self, @@ -350,38 +346,38 @@ def list( ) -class BookkeepingEntrySetsResourceWithRawResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: +class BookkeepingEntrySetsWithRawResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class AsyncBookkeepingEntrySetsResourceWithRawResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: +class AsyncBookkeepingEntrySetsWithRawResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class BookkeepingEntrySetsResourceWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: +class BookkeepingEntrySetsWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = to_streamed_response_wrapper( @@ -395,8 +391,8 @@ def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None ) -class AsyncBookkeepingEntrySetsResourceWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: +class AsyncBookkeepingEntrySetsWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 45c8e8b73..d34070755 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import card_dispute_list_params, card_dispute_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,27 +13,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_dispute import CardDispute -__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] +__all__ = ["CardDisputes", "AsyncCardDisputes"] -class CardDisputesResource(SyncAPIResource): +class CardDisputes(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesResourceWithRawResponse: - return CardDisputesResourceWithRawResponse(self) + def with_raw_response(self) -> CardDisputesWithRawResponse: + return CardDisputesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: - return CardDisputesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesWithStreamingResponse: + return CardDisputesWithStreamingResponse(self) def create( self, @@ -180,14 +176,14 @@ def list( ) -class AsyncCardDisputesResource(AsyncAPIResource): +class AsyncCardDisputes(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: - return AsyncCardDisputesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: + return AsyncCardDisputesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: - return AsyncCardDisputesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: + return AsyncCardDisputesWithStreamingResponse(self) async def create( self, @@ -335,38 +331,38 @@ def list( ) -class CardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: +class CardDisputesWithRawResponse: + def __init__(self, card_disputes: CardDisputes) -> None: self._card_disputes = card_disputes - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( card_disputes.list, ) -class AsyncCardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: +class AsyncCardDisputesWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputes) -> None: self._card_disputes = card_disputes - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( card_disputes.list, ) -class CardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: +class CardDisputesWithStreamingResponse: + def __init__(self, card_disputes: CardDisputes) -> None: self._card_disputes = card_disputes self.create = to_streamed_response_wrapper( @@ -380,8 +376,8 @@ def __init__(self, card_disputes: CardDisputesResource) -> None: ) -class AsyncCardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: +class AsyncCardDisputesWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputes) -> None: self._card_disputes = card_disputes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 9f70437e6..1cc066da6 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import card_payment_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_payment import CardPayment -__all__ = ["CardPaymentsResource", "AsyncCardPaymentsResource"] +__all__ = ["CardPayments", "AsyncCardPayments"] -class CardPaymentsResource(SyncAPIResource): +class CardPayments(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPaymentsResourceWithRawResponse: - return CardPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> CardPaymentsWithRawResponse: + return CardPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPaymentsResourceWithStreamingResponse: - return CardPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardPaymentsWithStreamingResponse: + return CardPaymentsWithStreamingResponse(self) def retrieve( self, @@ -125,14 +121,14 @@ def list( ) -class AsyncCardPaymentsResource(AsyncAPIResource): +class AsyncCardPayments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPaymentsResourceWithRawResponse: - return AsyncCardPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPaymentsWithRawResponse: + return AsyncCardPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPaymentsResourceWithStreamingResponse: - return AsyncCardPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPaymentsWithStreamingResponse: + return AsyncCardPaymentsWithStreamingResponse(self) async def retrieve( self, @@ -228,32 +224,32 @@ def list( ) -class CardPaymentsResourceWithRawResponse: - def __init__(self, card_payments: CardPaymentsResource) -> None: +class CardPaymentsWithRawResponse: + def __init__(self, card_payments: CardPayments) -> None: self._card_payments = card_payments - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( card_payments.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( card_payments.list, ) -class AsyncCardPaymentsResourceWithRawResponse: - def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: +class AsyncCardPaymentsWithRawResponse: + def __init__(self, card_payments: AsyncCardPayments) -> None: self._card_payments = card_payments - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( card_payments.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( card_payments.list, ) -class CardPaymentsResourceWithStreamingResponse: - def __init__(self, card_payments: CardPaymentsResource) -> None: +class CardPaymentsWithStreamingResponse: + def __init__(self, card_payments: CardPayments) -> None: self._card_payments = card_payments self.retrieve = to_streamed_response_wrapper( @@ -264,8 +260,8 @@ def __init__(self, card_payments: CardPaymentsResource) -> None: ) -class AsyncCardPaymentsResourceWithStreamingResponse: - def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: +class AsyncCardPaymentsWithStreamingResponse: + def __init__(self, card_payments: AsyncCardPayments) -> None: self._card_payments = card_payments self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 20a7f41c2..8c5cc6aa3 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import card_purchase_supplement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement -__all__ = ["CardPurchaseSupplementsResource", "AsyncCardPurchaseSupplementsResource"] +__all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] -class CardPurchaseSupplementsResource(SyncAPIResource): +class CardPurchaseSupplements(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPurchaseSupplementsResourceWithRawResponse: - return CardPurchaseSupplementsResourceWithRawResponse(self) + def with_raw_response(self) -> CardPurchaseSupplementsWithRawResponse: + return CardPurchaseSupplementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPurchaseSupplementsResourceWithStreamingResponse: - return CardPurchaseSupplementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardPurchaseSupplementsWithStreamingResponse: + return CardPurchaseSupplementsWithStreamingResponse(self) def retrieve( self, @@ -124,14 +120,14 @@ def list( ) -class AsyncCardPurchaseSupplementsResource(AsyncAPIResource): +class AsyncCardPurchaseSupplements(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPurchaseSupplementsResourceWithRawResponse: - return AsyncCardPurchaseSupplementsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPurchaseSupplementsWithRawResponse: + return AsyncCardPurchaseSupplementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPurchaseSupplementsResourceWithStreamingResponse: - return AsyncCardPurchaseSupplementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPurchaseSupplementsWithStreamingResponse: + return AsyncCardPurchaseSupplementsWithStreamingResponse(self) async def retrieve( self, @@ -226,32 +222,32 @@ def list( ) -class CardPurchaseSupplementsResourceWithRawResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: +class CardPurchaseSupplementsWithRawResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( card_purchase_supplements.list, ) -class AsyncCardPurchaseSupplementsResourceWithRawResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: +class AsyncCardPurchaseSupplementsWithRawResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( card_purchase_supplements.list, ) -class CardPurchaseSupplementsResourceWithStreamingResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: +class CardPurchaseSupplementsWithStreamingResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = to_streamed_response_wrapper( @@ -262,8 +258,8 @@ def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) - ) -class AsyncCardPurchaseSupplementsResourceWithStreamingResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: +class AsyncCardPurchaseSupplementsWithStreamingResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index fd16aac16..687b5df75 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import card_list_params, card_create_params, card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,28 +15,23 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails -__all__ = ["CardsResource", "AsyncCardsResource"] +__all__ = ["Cards", "AsyncCards"] -class CardsResource(SyncAPIResource): +class Cards(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardsResourceWithRawResponse: - return CardsResourceWithRawResponse(self) + def with_raw_response(self) -> CardsWithRawResponse: + return CardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardsResourceWithStreamingResponse: - return CardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardsWithStreamingResponse: + return CardsWithStreamingResponse(self) def create( self, @@ -274,7 +270,7 @@ def list( model=Card, ) - def details( + def retrieve_sensitive_details( self, card_id: str, *, @@ -310,14 +306,14 @@ def details( ) -class AsyncCardsResource(AsyncAPIResource): +class AsyncCards(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardsResourceWithRawResponse: - return AsyncCardsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardsWithRawResponse: + return AsyncCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardsResourceWithStreamingResponse: - return AsyncCardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: + return AsyncCardsWithStreamingResponse(self) async def create( self, @@ -556,7 +552,7 @@ def list( model=Card, ) - async def details( + async def retrieve_sensitive_details( self, card_id: str, *, @@ -592,50 +588,50 @@ async def details( ) -class CardsResourceWithRawResponse: - def __init__(self, cards: CardsResource) -> None: +class CardsWithRawResponse: + def __init__(self, cards: Cards) -> None: self._cards = cards - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( cards.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( cards.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( cards.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( cards.list, ) - self.details = to_raw_response_wrapper( - cards.details, + self.retrieve_sensitive_details = _legacy_response.to_raw_response_wrapper( + cards.retrieve_sensitive_details, ) -class AsyncCardsResourceWithRawResponse: - def __init__(self, cards: AsyncCardsResource) -> None: +class AsyncCardsWithRawResponse: + def __init__(self, cards: AsyncCards) -> None: self._cards = cards - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( cards.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( cards.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( cards.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( cards.list, ) - self.details = async_to_raw_response_wrapper( - cards.details, + self.retrieve_sensitive_details = _legacy_response.async_to_raw_response_wrapper( + cards.retrieve_sensitive_details, ) -class CardsResourceWithStreamingResponse: - def __init__(self, cards: CardsResource) -> None: +class CardsWithStreamingResponse: + def __init__(self, cards: Cards) -> None: self._cards = cards self.create = to_streamed_response_wrapper( @@ -650,13 +646,13 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_streamed_response_wrapper( cards.list, ) - self.details = to_streamed_response_wrapper( - cards.details, + self.retrieve_sensitive_details = to_streamed_response_wrapper( + cards.retrieve_sensitive_details, ) -class AsyncCardsResourceWithStreamingResponse: - def __init__(self, cards: AsyncCardsResource) -> None: +class AsyncCardsWithStreamingResponse: + def __init__(self, cards: AsyncCards) -> None: self._cards = cards self.create = async_to_streamed_response_wrapper( @@ -671,6 +667,6 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) - self.details = async_to_streamed_response_wrapper( - cards.details, + self.retrieve_sensitive_details = async_to_streamed_response_wrapper( + cards.retrieve_sensitive_details, ) diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index ec91d342b..407a36a92 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import check_deposit_list_params, check_deposit_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,27 +13,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_deposit import CheckDeposit -__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] +__all__ = ["CheckDeposits", "AsyncCheckDeposits"] -class CheckDepositsResource(SyncAPIResource): +class CheckDeposits(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: - return CheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsWithRawResponse: + return CheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: - return CheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: + return CheckDepositsWithStreamingResponse(self) def create( self, @@ -194,14 +190,14 @@ def list( ) -class AsyncCheckDepositsResource(AsyncAPIResource): +class AsyncCheckDeposits(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: - return AsyncCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: + return AsyncCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: - return AsyncCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: + return AsyncCheckDepositsWithStreamingResponse(self) async def create( self, @@ -363,38 +359,38 @@ def list( ) -class CheckDepositsResourceWithRawResponse: - def __init__(self, check_deposits: CheckDepositsResource) -> None: +class CheckDepositsWithRawResponse: + def __init__(self, check_deposits: CheckDeposits) -> None: self._check_deposits = check_deposits - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( check_deposits.list, ) -class AsyncCheckDepositsResourceWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: +class AsyncCheckDepositsWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDeposits) -> None: self._check_deposits = check_deposits - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( check_deposits.list, ) -class CheckDepositsResourceWithStreamingResponse: - def __init__(self, check_deposits: CheckDepositsResource) -> None: +class CheckDepositsWithStreamingResponse: + def __init__(self, check_deposits: CheckDeposits) -> None: self._check_deposits = check_deposits self.create = to_streamed_response_wrapper( @@ -408,8 +404,8 @@ def __init__(self, check_deposits: CheckDepositsResource) -> None: ) -class AsyncCheckDepositsResourceWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: +class AsyncCheckDepositsWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDeposits) -> None: self._check_deposits = check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 6a1322e28..ef39c4a2b 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import ( check_transfer_list_params, check_transfer_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_transfer import CheckTransfer -__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] +__all__ = ["CheckTransfers", "AsyncCheckTransfers"] -class CheckTransfersResource(SyncAPIResource): +class CheckTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: - return CheckTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersWithRawResponse: + return CheckTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: - return CheckTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: + return CheckTransfersWithStreamingResponse(self) def create( self, @@ -351,14 +347,14 @@ def stop_payment( ) -class AsyncCheckTransfersResource(AsyncAPIResource): +class AsyncCheckTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: - return AsyncCheckTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: + return AsyncCheckTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: - return AsyncCheckTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: + return AsyncCheckTransfersWithStreamingResponse(self) async def create( self, @@ -673,56 +669,56 @@ async def stop_payment( ) -class CheckTransfersResourceWithRawResponse: - def __init__(self, check_transfers: CheckTransfersResource) -> None: +class CheckTransfersWithRawResponse: + def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( check_transfers.list, ) - self.approve = to_raw_response_wrapper( + self.approve = _legacy_response.to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = to_raw_response_wrapper( + self.cancel = _legacy_response.to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = to_raw_response_wrapper( + self.stop_payment = _legacy_response.to_raw_response_wrapper( check_transfers.stop_payment, ) -class AsyncCheckTransfersResourceWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: +class AsyncCheckTransfersWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( check_transfers.list, ) - self.approve = async_to_raw_response_wrapper( + self.approve = _legacy_response.async_to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = async_to_raw_response_wrapper( + self.cancel = _legacy_response.async_to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = async_to_raw_response_wrapper( + self.stop_payment = _legacy_response.async_to_raw_response_wrapper( check_transfers.stop_payment, ) -class CheckTransfersResourceWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfersResource) -> None: +class CheckTransfersWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers self.create = to_streamed_response_wrapper( @@ -745,8 +741,8 @@ def __init__(self, check_transfers: CheckTransfersResource) -> None: ) -class AsyncCheckTransfersResourceWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: +class AsyncCheckTransfersWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 330395cf6..b02bbb8c2 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import declined_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.declined_transaction import DeclinedTransaction -__all__ = ["DeclinedTransactionsResource", "AsyncDeclinedTransactionsResource"] +__all__ = ["DeclinedTransactions", "AsyncDeclinedTransactions"] -class DeclinedTransactionsResource(SyncAPIResource): +class DeclinedTransactions(SyncAPIResource): @cached_property - def with_raw_response(self) -> DeclinedTransactionsResourceWithRawResponse: - return DeclinedTransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> DeclinedTransactionsWithRawResponse: + return DeclinedTransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DeclinedTransactionsResourceWithStreamingResponse: - return DeclinedTransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DeclinedTransactionsWithStreamingResponse: + return DeclinedTransactionsWithStreamingResponse(self) def retrieve( self, @@ -129,14 +125,14 @@ def list( ) -class AsyncDeclinedTransactionsResource(AsyncAPIResource): +class AsyncDeclinedTransactions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDeclinedTransactionsResourceWithRawResponse: - return AsyncDeclinedTransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDeclinedTransactionsWithRawResponse: + return AsyncDeclinedTransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDeclinedTransactionsResourceWithStreamingResponse: - return AsyncDeclinedTransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDeclinedTransactionsWithStreamingResponse: + return AsyncDeclinedTransactionsWithStreamingResponse(self) async def retrieve( self, @@ -236,32 +232,32 @@ def list( ) -class DeclinedTransactionsResourceWithRawResponse: - def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: +class DeclinedTransactionsWithRawResponse: + def __init__(self, declined_transactions: DeclinedTransactions) -> None: self._declined_transactions = declined_transactions - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( declined_transactions.list, ) -class AsyncDeclinedTransactionsResourceWithRawResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: +class AsyncDeclinedTransactionsWithRawResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: self._declined_transactions = declined_transactions - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( declined_transactions.list, ) -class DeclinedTransactionsResourceWithStreamingResponse: - def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: +class DeclinedTransactionsWithStreamingResponse: + def __init__(self, declined_transactions: DeclinedTransactions) -> None: self._declined_transactions = declined_transactions self.retrieve = to_streamed_response_wrapper( @@ -272,8 +268,8 @@ def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: ) -class AsyncDeclinedTransactionsResourceWithStreamingResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: +class AsyncDeclinedTransactionsWithStreamingResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: self._declined_transactions = declined_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index bd07b9cd0..e93543736 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import ( digital_card_profile_list_params, digital_card_profile_clone_params, @@ -16,27 +17,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_card_profile import DigitalCardProfile -__all__ = ["DigitalCardProfilesResource", "AsyncDigitalCardProfilesResource"] +__all__ = ["DigitalCardProfiles", "AsyncDigitalCardProfiles"] -class DigitalCardProfilesResource(SyncAPIResource): +class DigitalCardProfiles(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalCardProfilesResourceWithRawResponse: - return DigitalCardProfilesResourceWithRawResponse(self) + def with_raw_response(self) -> DigitalCardProfilesWithRawResponse: + return DigitalCardProfilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalCardProfilesResourceWithStreamingResponse: - return DigitalCardProfilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalCardProfilesWithStreamingResponse: + return DigitalCardProfilesWithStreamingResponse(self) def create( self, @@ -340,14 +336,14 @@ def clone( ) -class AsyncDigitalCardProfilesResource(AsyncAPIResource): +class AsyncDigitalCardProfiles(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalCardProfilesResourceWithRawResponse: - return AsyncDigitalCardProfilesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalCardProfilesWithRawResponse: + return AsyncDigitalCardProfilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalCardProfilesResourceWithStreamingResponse: - return AsyncDigitalCardProfilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalCardProfilesWithStreamingResponse: + return AsyncDigitalCardProfilesWithStreamingResponse(self) async def create( self, @@ -651,50 +647,50 @@ async def clone( ) -class DigitalCardProfilesResourceWithRawResponse: - def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: +class DigitalCardProfilesWithRawResponse: + def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: self._digital_card_profiles = digital_card_profiles - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = to_raw_response_wrapper( + self.archive = _legacy_response.to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = to_raw_response_wrapper( + self.clone = _legacy_response.to_raw_response_wrapper( digital_card_profiles.clone, ) -class AsyncDigitalCardProfilesResourceWithRawResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: +class AsyncDigitalCardProfilesWithRawResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: self._digital_card_profiles = digital_card_profiles - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = async_to_raw_response_wrapper( + self.archive = _legacy_response.async_to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = async_to_raw_response_wrapper( + self.clone = _legacy_response.async_to_raw_response_wrapper( digital_card_profiles.clone, ) -class DigitalCardProfilesResourceWithStreamingResponse: - def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: +class DigitalCardProfilesWithStreamingResponse: + def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: self._digital_card_profiles = digital_card_profiles self.create = to_streamed_response_wrapper( @@ -714,8 +710,8 @@ def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: ) -class AsyncDigitalCardProfilesResourceWithStreamingResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: +class AsyncDigitalCardProfilesWithStreamingResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: self._digital_card_profiles = digital_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index eca69456c..6e4cd775a 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import digital_wallet_token_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_wallet_token import DigitalWalletToken -__all__ = ["DigitalWalletTokensResource", "AsyncDigitalWalletTokensResource"] +__all__ = ["DigitalWalletTokens", "AsyncDigitalWalletTokens"] -class DigitalWalletTokensResource(SyncAPIResource): +class DigitalWalletTokens(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokensResourceWithRawResponse: - return DigitalWalletTokensResourceWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokensWithRawResponse: + return DigitalWalletTokensWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokensResourceWithStreamingResponse: - return DigitalWalletTokensResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokensWithStreamingResponse: + return DigitalWalletTokensWithStreamingResponse(self) def retrieve( self, @@ -123,14 +119,14 @@ def list( ) -class AsyncDigitalWalletTokensResource(AsyncAPIResource): +class AsyncDigitalWalletTokens(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokensResourceWithRawResponse: - return AsyncDigitalWalletTokensResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokensWithRawResponse: + return AsyncDigitalWalletTokensWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokensResourceWithStreamingResponse: - return AsyncDigitalWalletTokensResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokensWithStreamingResponse: + return AsyncDigitalWalletTokensWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +220,32 @@ def list( ) -class DigitalWalletTokensResourceWithRawResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: +class DigitalWalletTokensWithRawResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( digital_wallet_tokens.list, ) -class AsyncDigitalWalletTokensResourceWithRawResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: +class AsyncDigitalWalletTokensWithRawResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( digital_wallet_tokens.list, ) -class DigitalWalletTokensResourceWithStreamingResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: +class DigitalWalletTokensWithStreamingResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = to_streamed_response_wrapper( @@ -260,8 +256,8 @@ def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: ) -class AsyncDigitalWalletTokensResourceWithStreamingResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: +class AsyncDigitalWalletTokensWithStreamingResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index d805ad9ac..412db0c0f 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import document_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.document import Document -__all__ = ["DocumentsResource", "AsyncDocumentsResource"] +__all__ = ["Documents", "AsyncDocuments"] -class DocumentsResource(SyncAPIResource): +class Documents(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsResourceWithRawResponse: - return DocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> DocumentsWithRawResponse: + return DocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: - return DocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsWithStreamingResponse: + return DocumentsWithStreamingResponse(self) def retrieve( self, @@ -123,14 +119,14 @@ def list( ) -class AsyncDocumentsResource(AsyncAPIResource): +class AsyncDocuments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: - return AsyncDocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsWithRawResponse: + return AsyncDocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: - return AsyncDocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: + return AsyncDocumentsWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +220,32 @@ def list( ) -class DocumentsResourceWithRawResponse: - def __init__(self, documents: DocumentsResource) -> None: +class DocumentsWithRawResponse: + def __init__(self, documents: Documents) -> None: self._documents = documents - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( documents.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( documents.list, ) -class AsyncDocumentsResourceWithRawResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: +class AsyncDocumentsWithRawResponse: + def __init__(self, documents: AsyncDocuments) -> None: self._documents = documents - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( documents.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( documents.list, ) -class DocumentsResourceWithStreamingResponse: - def __init__(self, documents: DocumentsResource) -> None: +class DocumentsWithStreamingResponse: + def __init__(self, documents: Documents) -> None: self._documents = documents self.retrieve = to_streamed_response_wrapper( @@ -260,8 +256,8 @@ def __init__(self, documents: DocumentsResource) -> None: ) -class AsyncDocumentsResourceWithStreamingResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: +class AsyncDocumentsWithStreamingResponse: + def __init__(self, documents: AsyncDocuments) -> None: self._documents = documents self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/entities/__init__.py b/src/increase/resources/entities/__init__.py new file mode 100644 index 000000000..67780ab76 --- /dev/null +++ b/src/increase/resources/entities/__init__.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .entities import ( + Entities, + AsyncEntities, + EntitiesWithRawResponse, + AsyncEntitiesWithRawResponse, + EntitiesWithStreamingResponse, + AsyncEntitiesWithStreamingResponse, +) +from .industry_code import ( + IndustryCode, + AsyncIndustryCode, + IndustryCodeWithRawResponse, + AsyncIndustryCodeWithRawResponse, + IndustryCodeWithStreamingResponse, + AsyncIndustryCodeWithStreamingResponse, +) +from .beneficial_owners import ( + BeneficialOwners, + AsyncBeneficialOwners, + BeneficialOwnersWithRawResponse, + AsyncBeneficialOwnersWithRawResponse, + BeneficialOwnersWithStreamingResponse, + AsyncBeneficialOwnersWithStreamingResponse, +) +from .supplemental_documents import ( + SupplementalDocuments, + AsyncSupplementalDocuments, + SupplementalDocumentsWithRawResponse, + AsyncSupplementalDocumentsWithRawResponse, + SupplementalDocumentsWithStreamingResponse, + AsyncSupplementalDocumentsWithStreamingResponse, +) + +__all__ = [ + "BeneficialOwners", + "AsyncBeneficialOwners", + "BeneficialOwnersWithRawResponse", + "AsyncBeneficialOwnersWithRawResponse", + "BeneficialOwnersWithStreamingResponse", + "AsyncBeneficialOwnersWithStreamingResponse", + "SupplementalDocuments", + "AsyncSupplementalDocuments", + "SupplementalDocumentsWithRawResponse", + "AsyncSupplementalDocumentsWithRawResponse", + "SupplementalDocumentsWithStreamingResponse", + "AsyncSupplementalDocumentsWithStreamingResponse", + "IndustryCode", + "AsyncIndustryCode", + "IndustryCodeWithRawResponse", + "AsyncIndustryCodeWithRawResponse", + "IndustryCodeWithStreamingResponse", + "AsyncIndustryCodeWithStreamingResponse", + "Entities", + "AsyncEntities", + "EntitiesWithRawResponse", + "AsyncEntitiesWithRawResponse", + "EntitiesWithStreamingResponse", + "AsyncEntitiesWithStreamingResponse", +] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py new file mode 100644 index 000000000..bd3924c8a --- /dev/null +++ b/src/increase/resources/entities/beneficial_owners.py @@ -0,0 +1,420 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import make_request_options +from ...types.entity import Entity +from ...types.entities import ( + beneficial_owner_create_params, + beneficial_owner_archive_params, + beneficial_owner_update_address_params, +) + +__all__ = ["BeneficialOwners", "AsyncBeneficialOwners"] + + +class BeneficialOwners(SyncAPIResource): + @cached_property + def with_raw_response(self) -> BeneficialOwnersWithRawResponse: + return BeneficialOwnersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BeneficialOwnersWithStreamingResponse: + return BeneficialOwnersWithStreamingResponse(self) + + def create( + self, + *, + beneficial_owner: beneficial_owner_create_params.BeneficialOwner, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/entity_beneficial_owners", + body=maybe_transform( + { + "beneficial_owner": beneficial_owner, + "entity_id": entity_id, + }, + beneficial_owner_create_params.BeneficialOwnerCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + def archive( + self, + *, + beneficial_owner_id: str, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/entity_beneficial_owners/archive", + body=maybe_transform( + { + "beneficial_owner_id": beneficial_owner_id, + "entity_id": entity_id, + }, + beneficial_owner_archive_params.BeneficialOwnerArchiveParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + def update_address( + self, + *, + address: beneficial_owner_update_address_params.Address, + beneficial_owner_id: str, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/entity_beneficial_owners/address", + body=maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + "entity_id": entity_id, + }, + beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + +class AsyncBeneficialOwners(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncBeneficialOwnersWithRawResponse: + return AsyncBeneficialOwnersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBeneficialOwnersWithStreamingResponse: + return AsyncBeneficialOwnersWithStreamingResponse(self) + + async def create( + self, + *, + beneficial_owner: beneficial_owner_create_params.BeneficialOwner, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/entity_beneficial_owners", + body=await async_maybe_transform( + { + "beneficial_owner": beneficial_owner, + "entity_id": entity_id, + }, + beneficial_owner_create_params.BeneficialOwnerCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + async def archive( + self, + *, + beneficial_owner_id: str, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/entity_beneficial_owners/archive", + body=await async_maybe_transform( + { + "beneficial_owner_id": beneficial_owner_id, + "entity_id": entity_id, + }, + beneficial_owner_archive_params.BeneficialOwnerArchiveParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + async def update_address( + self, + *, + address: beneficial_owner_update_address_params.Address, + beneficial_owner_id: str, + entity_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + entity_id: The identifier of the Entity to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/entity_beneficial_owners/address", + body=await async_maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + "entity_id": entity_id, + }, + beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + +class BeneficialOwnersWithRawResponse: + def __init__(self, beneficial_owners: BeneficialOwners) -> None: + self._beneficial_owners = beneficial_owners + + self.create = _legacy_response.to_raw_response_wrapper( + beneficial_owners.create, + ) + self.archive = _legacy_response.to_raw_response_wrapper( + beneficial_owners.archive, + ) + self.update_address = _legacy_response.to_raw_response_wrapper( + beneficial_owners.update_address, + ) + + +class AsyncBeneficialOwnersWithRawResponse: + def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: + self._beneficial_owners = beneficial_owners + + self.create = _legacy_response.async_to_raw_response_wrapper( + beneficial_owners.create, + ) + self.archive = _legacy_response.async_to_raw_response_wrapper( + beneficial_owners.archive, + ) + self.update_address = _legacy_response.async_to_raw_response_wrapper( + beneficial_owners.update_address, + ) + + +class BeneficialOwnersWithStreamingResponse: + def __init__(self, beneficial_owners: BeneficialOwners) -> None: + self._beneficial_owners = beneficial_owners + + self.create = to_streamed_response_wrapper( + beneficial_owners.create, + ) + self.archive = to_streamed_response_wrapper( + beneficial_owners.archive, + ) + self.update_address = to_streamed_response_wrapper( + beneficial_owners.update_address, + ) + + +class AsyncBeneficialOwnersWithStreamingResponse: + def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: + self._beneficial_owners = beneficial_owners + + self.create = async_to_streamed_response_wrapper( + beneficial_owners.create, + ) + self.archive = async_to_streamed_response_wrapper( + beneficial_owners.archive, + ) + self.update_address = async_to_streamed_response_wrapper( + beneficial_owners.update_address, + ) diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities/entities.py similarity index 56% rename from src/increase/resources/entities.py rename to src/increase/resources/entities/entities.py index bab96cc22..4477c84e9 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities/entities.py @@ -8,44 +8,72 @@ import httpx -from ..types import ( +from ... import _legacy_response +from ...types import ( entity_list_params, entity_create_params, entity_confirm_params, entity_update_address_params, - entity_update_industry_code_params, - entity_create_beneficial_owner_params, - entity_archive_beneficial_owner_params, - entity_update_beneficial_owner_address_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( maybe_transform, async_maybe_transform, ) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...pagination import SyncPage, AsyncPage +from .industry_code import ( + IndustryCode, + AsyncIndustryCode, + IndustryCodeWithRawResponse, + AsyncIndustryCodeWithRawResponse, + IndustryCodeWithStreamingResponse, + AsyncIndustryCodeWithStreamingResponse, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.entity import Entity +from ..._base_client import AsyncPaginator, make_request_options +from ...types.entity import Entity +from .beneficial_owners import ( + BeneficialOwners, + AsyncBeneficialOwners, + BeneficialOwnersWithRawResponse, + AsyncBeneficialOwnersWithRawResponse, + BeneficialOwnersWithStreamingResponse, + AsyncBeneficialOwnersWithStreamingResponse, +) +from .supplemental_documents import ( + SupplementalDocuments, + AsyncSupplementalDocuments, + SupplementalDocumentsWithRawResponse, + AsyncSupplementalDocumentsWithRawResponse, + SupplementalDocumentsWithStreamingResponse, + AsyncSupplementalDocumentsWithStreamingResponse, +) + +__all__ = ["Entities", "AsyncEntities"] + + +class Entities(SyncAPIResource): + @cached_property + def beneficial_owners(self) -> BeneficialOwners: + return BeneficialOwners(self._client) -__all__ = ["EntitiesResource", "AsyncEntitiesResource"] + @cached_property + def supplemental_documents(self) -> SupplementalDocuments: + return SupplementalDocuments(self._client) + @cached_property + def industry_code(self) -> IndustryCode: + return IndustryCode(self._client) -class EntitiesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EntitiesResourceWithRawResponse: - return EntitiesResourceWithRawResponse(self) + def with_raw_response(self) -> EntitiesWithRawResponse: + return EntitiesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse: - return EntitiesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> EntitiesWithStreamingResponse: + return EntitiesWithStreamingResponse(self) def create( self, @@ -272,57 +300,6 @@ def archive( cast_to=Entity, ) - def archive_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner that is being - archived. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/archive_beneficial_owner", - body=maybe_transform( - {"beneficial_owner_id": beneficial_owner_id}, - entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - def confirm( self, entity_id: str, @@ -372,56 +349,6 @@ def confirm( cast_to=Entity, ) - def create_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/create_beneficial_owner", - body=maybe_transform( - {"beneficial_owner": beneficial_owner}, - entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - def update_address( self, entity_id: str, @@ -439,7 +366,7 @@ def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity whose address is being updated. + entity_id: The identifier of the Entity to archive. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -457,7 +384,7 @@ def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/update_address", + f"/entities/{entity_id}/address", body=maybe_transform({"address": address}, entity_update_address_params.EntityUpdateAddressParams), options=make_request_options( extra_headers=extra_headers, @@ -469,125 +396,27 @@ def update_address( cast_to=Entity, ) - def update_beneficial_owner_address( - self, - entity_id: str, - *, - address: entity_update_beneficial_owner_address_params.Address, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner whose address - is being updated. - - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/update_beneficial_owner_address", - body=maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - }, - entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - def update_industry_code( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - timeout: Override the client-level default timeout for this request, in seconds +class AsyncEntities(AsyncAPIResource): + @cached_property + def beneficial_owners(self) -> AsyncBeneficialOwners: + return AsyncBeneficialOwners(self._client) - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/update_industry_code", - body=maybe_transform( - {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) + @cached_property + def supplemental_documents(self) -> AsyncSupplementalDocuments: + return AsyncSupplementalDocuments(self._client) + @cached_property + def industry_code(self) -> AsyncIndustryCode: + return AsyncIndustryCode(self._client) -class AsyncEntitiesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse: - return AsyncEntitiesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncEntitiesWithRawResponse: + return AsyncEntitiesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse: - return AsyncEntitiesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEntitiesWithStreamingResponse: + return AsyncEntitiesWithStreamingResponse(self) async def create( self, @@ -814,57 +643,6 @@ async def archive( cast_to=Entity, ) - async def archive_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner that is being - archived. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/archive_beneficial_owner", - body=await async_maybe_transform( - {"beneficial_owner_id": beneficial_owner_id}, - entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - async def confirm( self, entity_id: str, @@ -914,56 +692,6 @@ async def confirm( cast_to=Entity, ) - async def create_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/create_beneficial_owner", - body=await async_maybe_transform( - {"beneficial_owner": beneficial_owner}, - entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - async def update_address( self, entity_id: str, @@ -981,7 +709,7 @@ async def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity whose address is being updated. + entity_id: The identifier of the Entity to archive. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -999,7 +727,7 @@ async def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/update_address", + f"/entities/{entity_id}/address", body=await async_maybe_transform( {"address": address}, entity_update_address_params.EntityUpdateAddressParams ), @@ -1013,191 +741,81 @@ async def update_address( cast_to=Entity, ) - async def update_beneficial_owner_address( - self, - entity_id: str, - *, - address: entity_update_beneficial_owner_address_params.Address, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner whose address - is being updated. - - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/update_beneficial_owner_address", - body=await async_maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - }, - entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - async def update_industry_code( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/update_industry_code", - body=await async_maybe_transform( - {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - -class EntitiesResourceWithRawResponse: - def __init__(self, entities: EntitiesResource) -> None: +class EntitiesWithRawResponse: + def __init__(self, entities: Entities) -> None: self._entities = entities - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( entities.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( entities.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( entities.list, ) - self.archive = to_raw_response_wrapper( + self.archive = _legacy_response.to_raw_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = to_raw_response_wrapper( - entities.archive_beneficial_owner, - ) - self.confirm = to_raw_response_wrapper( + self.confirm = _legacy_response.to_raw_response_wrapper( entities.confirm, ) - self.create_beneficial_owner = to_raw_response_wrapper( - entities.create_beneficial_owner, - ) - self.update_address = to_raw_response_wrapper( + self.update_address = _legacy_response.to_raw_response_wrapper( entities.update_address, ) - self.update_beneficial_owner_address = to_raw_response_wrapper( - entities.update_beneficial_owner_address, - ) - self.update_industry_code = to_raw_response_wrapper( - entities.update_industry_code, - ) + + @cached_property + def beneficial_owners(self) -> BeneficialOwnersWithRawResponse: + return BeneficialOwnersWithRawResponse(self._entities.beneficial_owners) + + @cached_property + def supplemental_documents(self) -> SupplementalDocumentsWithRawResponse: + return SupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) + + @cached_property + def industry_code(self) -> IndustryCodeWithRawResponse: + return IndustryCodeWithRawResponse(self._entities.industry_code) -class AsyncEntitiesResourceWithRawResponse: - def __init__(self, entities: AsyncEntitiesResource) -> None: +class AsyncEntitiesWithRawResponse: + def __init__(self, entities: AsyncEntities) -> None: self._entities = entities - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( entities.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( entities.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( entities.list, ) - self.archive = async_to_raw_response_wrapper( + self.archive = _legacy_response.async_to_raw_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = async_to_raw_response_wrapper( - entities.archive_beneficial_owner, - ) - self.confirm = async_to_raw_response_wrapper( + self.confirm = _legacy_response.async_to_raw_response_wrapper( entities.confirm, ) - self.create_beneficial_owner = async_to_raw_response_wrapper( - entities.create_beneficial_owner, - ) - self.update_address = async_to_raw_response_wrapper( + self.update_address = _legacy_response.async_to_raw_response_wrapper( entities.update_address, ) - self.update_beneficial_owner_address = async_to_raw_response_wrapper( - entities.update_beneficial_owner_address, - ) - self.update_industry_code = async_to_raw_response_wrapper( - entities.update_industry_code, - ) + @cached_property + def beneficial_owners(self) -> AsyncBeneficialOwnersWithRawResponse: + return AsyncBeneficialOwnersWithRawResponse(self._entities.beneficial_owners) + + @cached_property + def supplemental_documents(self) -> AsyncSupplementalDocumentsWithRawResponse: + return AsyncSupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) + + @cached_property + def industry_code(self) -> AsyncIndustryCodeWithRawResponse: + return AsyncIndustryCodeWithRawResponse(self._entities.industry_code) -class EntitiesResourceWithStreamingResponse: - def __init__(self, entities: EntitiesResource) -> None: + +class EntitiesWithStreamingResponse: + def __init__(self, entities: Entities) -> None: self._entities = entities self.create = to_streamed_response_wrapper( @@ -1212,28 +830,28 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive = to_streamed_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = to_streamed_response_wrapper( - entities.archive_beneficial_owner, - ) self.confirm = to_streamed_response_wrapper( entities.confirm, ) - self.create_beneficial_owner = to_streamed_response_wrapper( - entities.create_beneficial_owner, - ) self.update_address = to_streamed_response_wrapper( entities.update_address, ) - self.update_beneficial_owner_address = to_streamed_response_wrapper( - entities.update_beneficial_owner_address, - ) - self.update_industry_code = to_streamed_response_wrapper( - entities.update_industry_code, - ) + + @cached_property + def beneficial_owners(self) -> BeneficialOwnersWithStreamingResponse: + return BeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) + + @cached_property + def supplemental_documents(self) -> SupplementalDocumentsWithStreamingResponse: + return SupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) + + @cached_property + def industry_code(self) -> IndustryCodeWithStreamingResponse: + return IndustryCodeWithStreamingResponse(self._entities.industry_code) -class AsyncEntitiesResourceWithStreamingResponse: - def __init__(self, entities: AsyncEntitiesResource) -> None: +class AsyncEntitiesWithStreamingResponse: + def __init__(self, entities: AsyncEntities) -> None: self._entities = entities self.create = async_to_streamed_response_wrapper( @@ -1248,21 +866,21 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive = async_to_streamed_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = async_to_streamed_response_wrapper( - entities.archive_beneficial_owner, - ) self.confirm = async_to_streamed_response_wrapper( entities.confirm, ) - self.create_beneficial_owner = async_to_streamed_response_wrapper( - entities.create_beneficial_owner, - ) self.update_address = async_to_streamed_response_wrapper( entities.update_address, ) - self.update_beneficial_owner_address = async_to_streamed_response_wrapper( - entities.update_beneficial_owner_address, - ) - self.update_industry_code = async_to_streamed_response_wrapper( - entities.update_industry_code, - ) + + @cached_property + def beneficial_owners(self) -> AsyncBeneficialOwnersWithStreamingResponse: + return AsyncBeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) + + @cached_property + def supplemental_documents(self) -> AsyncSupplementalDocumentsWithStreamingResponse: + return AsyncSupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) + + @cached_property + def industry_code(self) -> AsyncIndustryCodeWithStreamingResponse: + return AsyncIndustryCodeWithStreamingResponse(self._entities.industry_code) diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py new file mode 100644 index 000000000..056389eb2 --- /dev/null +++ b/src/increase/resources/entities/industry_code.py @@ -0,0 +1,180 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import make_request_options +from ...types.entity import Entity +from ...types.entities import industry_code_create_params + +__all__ = ["IndustryCode", "AsyncIndustryCode"] + + +class IndustryCode(SyncAPIResource): + @cached_property + def with_raw_response(self) -> IndustryCodeWithRawResponse: + return IndustryCodeWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> IndustryCodeWithStreamingResponse: + return IndustryCodeWithStreamingResponse(self) + + def create( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. + + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/industry_code", + body=maybe_transform( + {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + +class AsyncIndustryCode(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncIndustryCodeWithRawResponse: + return AsyncIndustryCodeWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncIndustryCodeWithStreamingResponse: + return AsyncIndustryCodeWithStreamingResponse(self) + + async def create( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. + + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/industry_code", + body=await async_maybe_transform( + {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + +class IndustryCodeWithRawResponse: + def __init__(self, industry_code: IndustryCode) -> None: + self._industry_code = industry_code + + self.create = _legacy_response.to_raw_response_wrapper( + industry_code.create, + ) + + +class AsyncIndustryCodeWithRawResponse: + def __init__(self, industry_code: AsyncIndustryCode) -> None: + self._industry_code = industry_code + + self.create = _legacy_response.async_to_raw_response_wrapper( + industry_code.create, + ) + + +class IndustryCodeWithStreamingResponse: + def __init__(self, industry_code: IndustryCode) -> None: + self._industry_code = industry_code + + self.create = to_streamed_response_wrapper( + industry_code.create, + ) + + +class AsyncIndustryCodeWithStreamingResponse: + def __init__(self, industry_code: AsyncIndustryCode) -> None: + self._industry_code = industry_code + + self.create = async_to_streamed_response_wrapper( + industry_code.create, + ) diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/entities/supplemental_documents.py similarity index 75% rename from src/increase/resources/supplemental_documents.py rename to src/increase/resources/entities/supplemental_documents.py index 1ce6adbaa..8cadca695 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/entities/supplemental_documents.py @@ -4,40 +4,37 @@ import httpx -from ..types import supplemental_document_list_params, supplemental_document_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( maybe_transform, async_maybe_transform, ) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.entity_supplemental_document import EntitySupplementalDocument +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...pagination import SyncPage, AsyncPage +from ..._base_client import AsyncPaginator, make_request_options +from ...types.entity import Entity +from ...types.entities import supplemental_document_list_params, supplemental_document_create_params +from ...types.entities.supplemental_document import SupplementalDocument -__all__ = ["SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource"] +__all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments"] -class SupplementalDocumentsResource(SyncAPIResource): +class SupplementalDocuments(SyncAPIResource): @cached_property - def with_raw_response(self) -> SupplementalDocumentsResourceWithRawResponse: - return SupplementalDocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> SupplementalDocumentsWithRawResponse: + return SupplementalDocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> SupplementalDocumentsResourceWithStreamingResponse: - return SupplementalDocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> SupplementalDocumentsWithStreamingResponse: + return SupplementalDocumentsWithStreamingResponse(self) def create( self, - *, entity_id: str, + *, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -46,7 +43,7 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> EntitySupplementalDocument: + ) -> Entity: """ Create a supplemental document for an Entity @@ -65,14 +62,12 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - "/entity_supplemental_documents", + f"/entities/{entity_id}/supplemental_documents", body=maybe_transform( - { - "entity_id": entity_id, - "file_id": file_id, - }, - supplemental_document_create_params.SupplementalDocumentCreateParams, + {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams ), options=make_request_options( extra_headers=extra_headers, @@ -81,7 +76,7 @@ def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=EntitySupplementalDocument, + cast_to=Entity, ) def list( @@ -97,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[EntitySupplementalDocument]: + ) -> SyncPage[SupplementalDocument]: """ List Entity Supplemental Document Submissions @@ -124,7 +119,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=SyncPage[EntitySupplementalDocument], + page=SyncPage[SupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -140,23 +135,23 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=EntitySupplementalDocument, + model=SupplementalDocument, ) -class AsyncSupplementalDocumentsResource(AsyncAPIResource): +class AsyncSupplementalDocuments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncSupplementalDocumentsResourceWithRawResponse: - return AsyncSupplementalDocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncSupplementalDocumentsWithRawResponse: + return AsyncSupplementalDocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncSupplementalDocumentsResourceWithStreamingResponse: - return AsyncSupplementalDocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncSupplementalDocumentsWithStreamingResponse: + return AsyncSupplementalDocumentsWithStreamingResponse(self) async def create( self, - *, entity_id: str, + *, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -165,7 +160,7 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> EntitySupplementalDocument: + ) -> Entity: """ Create a supplemental document for an Entity @@ -184,14 +179,12 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - "/entity_supplemental_documents", + f"/entities/{entity_id}/supplemental_documents", body=await async_maybe_transform( - { - "entity_id": entity_id, - "file_id": file_id, - }, - supplemental_document_create_params.SupplementalDocumentCreateParams, + {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams ), options=make_request_options( extra_headers=extra_headers, @@ -200,7 +193,7 @@ async def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=EntitySupplementalDocument, + cast_to=Entity, ) def list( @@ -216,7 +209,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: + ) -> AsyncPaginator[SupplementalDocument, AsyncPage[SupplementalDocument]]: """ List Entity Supplemental Document Submissions @@ -243,7 +236,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=AsyncPage[EntitySupplementalDocument], + page=AsyncPage[SupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -259,36 +252,36 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=EntitySupplementalDocument, + model=SupplementalDocument, ) -class SupplementalDocumentsResourceWithRawResponse: - def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: +class SupplementalDocumentsWithRawResponse: + def __init__(self, supplemental_documents: SupplementalDocuments) -> None: self._supplemental_documents = supplemental_documents - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( supplemental_documents.create, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( supplemental_documents.list, ) -class AsyncSupplementalDocumentsResourceWithRawResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: +class AsyncSupplementalDocumentsWithRawResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: self._supplemental_documents = supplemental_documents - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( supplemental_documents.create, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( supplemental_documents.list, ) -class SupplementalDocumentsResourceWithStreamingResponse: - def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: +class SupplementalDocumentsWithStreamingResponse: + def __init__(self, supplemental_documents: SupplementalDocuments) -> None: self._supplemental_documents = supplemental_documents self.create = to_streamed_response_wrapper( @@ -299,8 +292,8 @@ def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> Non ) -class AsyncSupplementalDocumentsResourceWithStreamingResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: +class AsyncSupplementalDocumentsWithStreamingResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: self._supplemental_documents = supplemental_documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 835fda6ee..4bf474533 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import ( event_subscription_list_params, event_subscription_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.event_subscription import EventSubscription -__all__ = ["EventSubscriptionsResource", "AsyncEventSubscriptionsResource"] +__all__ = ["EventSubscriptions", "AsyncEventSubscriptions"] -class EventSubscriptionsResource(SyncAPIResource): +class EventSubscriptions(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventSubscriptionsResourceWithRawResponse: - return EventSubscriptionsResourceWithRawResponse(self) + def with_raw_response(self) -> EventSubscriptionsWithRawResponse: + return EventSubscriptionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventSubscriptionsResourceWithStreamingResponse: - return EventSubscriptionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> EventSubscriptionsWithStreamingResponse: + return EventSubscriptionsWithStreamingResponse(self) def create( self, @@ -463,14 +459,14 @@ def list( ) -class AsyncEventSubscriptionsResource(AsyncAPIResource): +class AsyncEventSubscriptions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventSubscriptionsResourceWithRawResponse: - return AsyncEventSubscriptionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncEventSubscriptionsWithRawResponse: + return AsyncEventSubscriptionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventSubscriptionsResourceWithStreamingResponse: - return AsyncEventSubscriptionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventSubscriptionsWithStreamingResponse: + return AsyncEventSubscriptionsWithStreamingResponse(self) async def create( self, @@ -897,44 +893,44 @@ def list( ) -class EventSubscriptionsResourceWithRawResponse: - def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: +class EventSubscriptionsWithRawResponse: + def __init__(self, event_subscriptions: EventSubscriptions) -> None: self._event_subscriptions = event_subscriptions - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( event_subscriptions.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( event_subscriptions.list, ) -class AsyncEventSubscriptionsResourceWithRawResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: +class AsyncEventSubscriptionsWithRawResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: self._event_subscriptions = event_subscriptions - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( event_subscriptions.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( event_subscriptions.list, ) -class EventSubscriptionsResourceWithStreamingResponse: - def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: +class EventSubscriptionsWithStreamingResponse: + def __init__(self, event_subscriptions: EventSubscriptions) -> None: self._event_subscriptions = event_subscriptions self.create = to_streamed_response_wrapper( @@ -951,8 +947,8 @@ def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: ) -class AsyncEventSubscriptionsResourceWithStreamingResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: +class AsyncEventSubscriptionsWithStreamingResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: self._event_subscriptions = event_subscriptions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 0c40e6359..9d8f7b794 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import event_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.event import Event from .._base_client import AsyncPaginator, make_request_options -__all__ = ["EventsResource", "AsyncEventsResource"] +__all__ = ["Events", "AsyncEvents"] -class EventsResource(SyncAPIResource): +class Events(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventsResourceWithRawResponse: - return EventsResourceWithRawResponse(self) + def with_raw_response(self) -> EventsWithRawResponse: + return EventsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventsResourceWithStreamingResponse: - return EventsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> EventsWithStreamingResponse: + return EventsWithStreamingResponse(self) def retrieve( self, @@ -123,14 +119,14 @@ def list( ) -class AsyncEventsResource(AsyncAPIResource): +class AsyncEvents(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventsResourceWithRawResponse: - return AsyncEventsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncEventsWithRawResponse: + return AsyncEventsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventsResourceWithStreamingResponse: - return AsyncEventsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventsWithStreamingResponse: + return AsyncEventsWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +220,32 @@ def list( ) -class EventsResourceWithRawResponse: - def __init__(self, events: EventsResource) -> None: +class EventsWithRawResponse: + def __init__(self, events: Events) -> None: self._events = events - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( events.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( events.list, ) -class AsyncEventsResourceWithRawResponse: - def __init__(self, events: AsyncEventsResource) -> None: +class AsyncEventsWithRawResponse: + def __init__(self, events: AsyncEvents) -> None: self._events = events - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( events.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( events.list, ) -class EventsResourceWithStreamingResponse: - def __init__(self, events: EventsResource) -> None: +class EventsWithStreamingResponse: + def __init__(self, events: Events) -> None: self._events = events self.retrieve = to_streamed_response_wrapper( @@ -260,8 +256,8 @@ def __init__(self, events: EventsResource) -> None: ) -class AsyncEventsResourceWithStreamingResponse: - def __init__(self, events: AsyncEventsResource) -> None: +class AsyncEventsWithStreamingResponse: + def __init__(self, events: AsyncEvents) -> None: self._events = events self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 7b88ee376..d446f23f6 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import export_list_params, export_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,27 +15,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.export import Export -__all__ = ["ExportsResource", "AsyncExportsResource"] +__all__ = ["Exports", "AsyncExports"] -class ExportsResource(SyncAPIResource): +class Exports(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExportsResourceWithRawResponse: - return ExportsResourceWithRawResponse(self) + def with_raw_response(self) -> ExportsWithRawResponse: + return ExportsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: - return ExportsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ExportsWithStreamingResponse: + return ExportsWithStreamingResponse(self) def create( self, @@ -225,14 +221,14 @@ def list( ) -class AsyncExportsResource(AsyncAPIResource): +class AsyncExports(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: - return AsyncExportsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncExportsWithRawResponse: + return AsyncExportsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: - return AsyncExportsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExportsWithStreamingResponse: + return AsyncExportsWithStreamingResponse(self) async def create( self, @@ -423,38 +419,38 @@ def list( ) -class ExportsResourceWithRawResponse: - def __init__(self, exports: ExportsResource) -> None: +class ExportsWithRawResponse: + def __init__(self, exports: Exports) -> None: self._exports = exports - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( exports.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( exports.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( exports.list, ) -class AsyncExportsResourceWithRawResponse: - def __init__(self, exports: AsyncExportsResource) -> None: +class AsyncExportsWithRawResponse: + def __init__(self, exports: AsyncExports) -> None: self._exports = exports - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( exports.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( exports.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( exports.list, ) -class ExportsResourceWithStreamingResponse: - def __init__(self, exports: ExportsResource) -> None: +class ExportsWithStreamingResponse: + def __init__(self, exports: Exports) -> None: self._exports = exports self.create = to_streamed_response_wrapper( @@ -468,8 +464,8 @@ def __init__(self, exports: ExportsResource) -> None: ) -class AsyncExportsResourceWithStreamingResponse: - def __init__(self, exports: AsyncExportsResource) -> None: +class AsyncExportsWithStreamingResponse: + def __init__(self, exports: AsyncExports) -> None: self._exports = exports self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index a335b048c..8e7cde5af 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import ( external_account_list_params, external_account_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.external_account import ExternalAccount -__all__ = ["ExternalAccountsResource", "AsyncExternalAccountsResource"] +__all__ = ["ExternalAccounts", "AsyncExternalAccounts"] -class ExternalAccountsResource(SyncAPIResource): +class ExternalAccounts(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse: - return ExternalAccountsResourceWithRawResponse(self) + def with_raw_response(self) -> ExternalAccountsWithRawResponse: + return ExternalAccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExternalAccountsResourceWithStreamingResponse: - return ExternalAccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ExternalAccountsWithStreamingResponse: + return ExternalAccountsWithStreamingResponse(self) def create( self, @@ -286,14 +282,14 @@ def list( ) -class AsyncExternalAccountsResource(AsyncAPIResource): +class AsyncExternalAccounts(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse: - return AsyncExternalAccountsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncExternalAccountsWithRawResponse: + return AsyncExternalAccountsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExternalAccountsResourceWithStreamingResponse: - return AsyncExternalAccountsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExternalAccountsWithStreamingResponse: + return AsyncExternalAccountsWithStreamingResponse(self) async def create( self, @@ -541,44 +537,44 @@ def list( ) -class ExternalAccountsResourceWithRawResponse: - def __init__(self, external_accounts: ExternalAccountsResource) -> None: +class ExternalAccountsWithRawResponse: + def __init__(self, external_accounts: ExternalAccounts) -> None: self._external_accounts = external_accounts - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( external_accounts.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( external_accounts.list, ) -class AsyncExternalAccountsResourceWithRawResponse: - def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: +class AsyncExternalAccountsWithRawResponse: + def __init__(self, external_accounts: AsyncExternalAccounts) -> None: self._external_accounts = external_accounts - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( external_accounts.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( external_accounts.list, ) -class ExternalAccountsResourceWithStreamingResponse: - def __init__(self, external_accounts: ExternalAccountsResource) -> None: +class ExternalAccountsWithStreamingResponse: + def __init__(self, external_accounts: ExternalAccounts) -> None: self._external_accounts = external_accounts self.create = to_streamed_response_wrapper( @@ -595,8 +591,8 @@ def __init__(self, external_accounts: ExternalAccountsResource) -> None: ) -class AsyncExternalAccountsResourceWithStreamingResponse: - def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: +class AsyncExternalAccountsWithStreamingResponse: + def __init__(self, external_accounts: AsyncExternalAccounts) -> None: self._external_accounts = external_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index c10fb9bdb..e74d6ee4d 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -7,6 +7,7 @@ import httpx +from .. import _legacy_response from ..types import file_list_params, file_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import ( @@ -17,27 +18,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from ..types.file import File from .._base_client import AsyncPaginator, make_request_options -__all__ = ["FilesResource", "AsyncFilesResource"] +__all__ = ["Files", "AsyncFiles"] -class FilesResource(SyncAPIResource): +class Files(SyncAPIResource): @cached_property - def with_raw_response(self) -> FilesResourceWithRawResponse: - return FilesResourceWithRawResponse(self) + def with_raw_response(self) -> FilesWithRawResponse: + return FilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> FilesResourceWithStreamingResponse: - return FilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> FilesWithStreamingResponse: + return FilesWithStreamingResponse(self) def create( self, @@ -236,14 +232,14 @@ def list( ) -class AsyncFilesResource(AsyncAPIResource): +class AsyncFiles(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: - return AsyncFilesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncFilesWithRawResponse: + return AsyncFilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: - return AsyncFilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncFilesWithStreamingResponse: + return AsyncFilesWithStreamingResponse(self) async def create( self, @@ -442,38 +438,38 @@ def list( ) -class FilesResourceWithRawResponse: - def __init__(self, files: FilesResource) -> None: +class FilesWithRawResponse: + def __init__(self, files: Files) -> None: self._files = files - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( files.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( files.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( files.list, ) -class AsyncFilesResourceWithRawResponse: - def __init__(self, files: AsyncFilesResource) -> None: +class AsyncFilesWithRawResponse: + def __init__(self, files: AsyncFiles) -> None: self._files = files - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( files.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( files.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( files.list, ) -class FilesResourceWithStreamingResponse: - def __init__(self, files: FilesResource) -> None: +class FilesWithStreamingResponse: + def __init__(self, files: Files) -> None: self._files = files self.create = to_streamed_response_wrapper( @@ -487,8 +483,8 @@ def __init__(self, files: FilesResource) -> None: ) -class AsyncFilesResourceWithStreamingResponse: - def __init__(self, files: AsyncFilesResource) -> None: +class AsyncFilesWithStreamingResponse: + def __init__(self, files: AsyncFiles) -> None: self._files = files self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 84a2f1aff..839d988d7 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -4,31 +4,27 @@ import httpx +from .. import _legacy_response from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..types.group import Group from .._base_client import make_request_options -__all__ = ["GroupsResource", "AsyncGroupsResource"] +__all__ = ["Groups", "AsyncGroups"] -class GroupsResource(SyncAPIResource): +class Groups(SyncAPIResource): @cached_property - def with_raw_response(self) -> GroupsResourceWithRawResponse: - return GroupsResourceWithRawResponse(self) + def with_raw_response(self) -> GroupsWithRawResponse: + return GroupsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> GroupsResourceWithStreamingResponse: - return GroupsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> GroupsWithStreamingResponse: + return GroupsWithStreamingResponse(self) - def retrieve( + def retrieve_details( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -48,16 +44,16 @@ def retrieve( ) -class AsyncGroupsResource(AsyncAPIResource): +class AsyncGroups(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncGroupsResourceWithRawResponse: - return AsyncGroupsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncGroupsWithRawResponse: + return AsyncGroupsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncGroupsResourceWithStreamingResponse: - return AsyncGroupsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncGroupsWithStreamingResponse: + return AsyncGroupsWithStreamingResponse(self) - async def retrieve( + async def retrieve_details( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -77,37 +73,37 @@ async def retrieve( ) -class GroupsResourceWithRawResponse: - def __init__(self, groups: GroupsResource) -> None: +class GroupsWithRawResponse: + def __init__(self, groups: Groups) -> None: self._groups = groups - self.retrieve = to_raw_response_wrapper( - groups.retrieve, + self.retrieve_details = _legacy_response.to_raw_response_wrapper( + groups.retrieve_details, ) -class AsyncGroupsResourceWithRawResponse: - def __init__(self, groups: AsyncGroupsResource) -> None: +class AsyncGroupsWithRawResponse: + def __init__(self, groups: AsyncGroups) -> None: self._groups = groups - self.retrieve = async_to_raw_response_wrapper( - groups.retrieve, + self.retrieve_details = _legacy_response.async_to_raw_response_wrapper( + groups.retrieve_details, ) -class GroupsResourceWithStreamingResponse: - def __init__(self, groups: GroupsResource) -> None: +class GroupsWithStreamingResponse: + def __init__(self, groups: Groups) -> None: self._groups = groups - self.retrieve = to_streamed_response_wrapper( - groups.retrieve, + self.retrieve_details = to_streamed_response_wrapper( + groups.retrieve_details, ) -class AsyncGroupsResourceWithStreamingResponse: - def __init__(self, groups: AsyncGroupsResource) -> None: +class AsyncGroupsWithStreamingResponse: + def __init__(self, groups: AsyncGroups) -> None: self._groups = groups - self.retrieve = async_to_streamed_response_wrapper( - groups.retrieve, + self.retrieve_details = async_to_streamed_response_wrapper( + groups.retrieve_details, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index efa002682..f76ea1972 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -6,10 +6,11 @@ import httpx +from .. import _legacy_response from ..types import ( inbound_ach_transfer_list_params, inbound_ach_transfer_transfer_return_params, - inbound_ach_transfer_create_notification_of_change_params, + inbound_ach_transfer_notification_of_change_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] +__all__ = ["InboundACHTransfers", "AsyncInboundACHTransfers"] -class InboundACHTransfersResource(SyncAPIResource): +class InboundACHTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: - return InboundACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> InboundACHTransfersWithRawResponse: + return InboundACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: - return InboundACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundACHTransfersWithStreamingResponse: + return InboundACHTransfersWithStreamingResponse(self) def retrieve( self, @@ -145,12 +141,10 @@ def list( model=InboundACHTransfer, ) - def create_notification_of_change( + def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -160,15 +154,10 @@ def create_notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -185,14 +174,7 @@ def create_notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", - body=maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -203,10 +185,12 @@ def create_notification_of_change( cast_to=InboundACHTransfer, ) - def decline( + def notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -216,10 +200,15 @@ def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -236,7 +225,14 @@ def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", + body=maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -334,14 +330,14 @@ def transfer_return( ) -class AsyncInboundACHTransfersResource(AsyncAPIResource): +class AsyncInboundACHTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: - return AsyncInboundACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundACHTransfersWithRawResponse: + return AsyncInboundACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: - return AsyncInboundACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundACHTransfersWithStreamingResponse: + return AsyncInboundACHTransfersWithStreamingResponse(self) async def retrieve( self, @@ -448,12 +444,10 @@ def list( model=InboundACHTransfer, ) - async def create_notification_of_change( + async def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -463,15 +457,10 @@ async def create_notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -488,14 +477,7 @@ async def create_notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", - body=await async_maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -506,10 +488,12 @@ async def create_notification_of_change( cast_to=InboundACHTransfer, ) - async def decline( + async def notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -519,10 +503,15 @@ async def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -539,7 +528,14 @@ async def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", + body=await async_maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -637,50 +633,50 @@ async def transfer_return( ) -class InboundACHTransfersResourceWithRawResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: +class InboundACHTransfersWithRawResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.create_notification_of_change = to_raw_response_wrapper( - inbound_ach_transfers.create_notification_of_change, - ) - self.decline = to_raw_response_wrapper( + self.decline = _legacy_response.to_raw_response_wrapper( inbound_ach_transfers.decline, ) - self.transfer_return = to_raw_response_wrapper( + self.notification_of_change = _legacy_response.to_raw_response_wrapper( + inbound_ach_transfers.notification_of_change, + ) + self.transfer_return = _legacy_response.to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersResourceWithRawResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: +class AsyncInboundACHTransfersWithRawResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.create_notification_of_change = async_to_raw_response_wrapper( - inbound_ach_transfers.create_notification_of_change, - ) - self.decline = async_to_raw_response_wrapper( + self.decline = _legacy_response.async_to_raw_response_wrapper( inbound_ach_transfers.decline, ) - self.transfer_return = async_to_raw_response_wrapper( + self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( + inbound_ach_transfers.notification_of_change, + ) + self.transfer_return = _legacy_response.async_to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class InboundACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: +class InboundACHTransfersWithStreamingResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = to_streamed_response_wrapper( @@ -689,19 +685,19 @@ def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: self.list = to_streamed_response_wrapper( inbound_ach_transfers.list, ) - self.create_notification_of_change = to_streamed_response_wrapper( - inbound_ach_transfers.create_notification_of_change, - ) self.decline = to_streamed_response_wrapper( inbound_ach_transfers.decline, ) + self.notification_of_change = to_streamed_response_wrapper( + inbound_ach_transfers.notification_of_change, + ) self.transfer_return = to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: +class AsyncInboundACHTransfersWithStreamingResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = async_to_streamed_response_wrapper( @@ -710,12 +706,12 @@ def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> N self.list = async_to_streamed_response_wrapper( inbound_ach_transfers.list, ) - self.create_notification_of_change = async_to_streamed_response_wrapper( - inbound_ach_transfers.create_notification_of_change, - ) self.decline = async_to_streamed_response_wrapper( inbound_ach_transfers.decline, ) + self.notification_of_change = async_to_streamed_response_wrapper( + inbound_ach_transfers.notification_of_change, + ) self.transfer_return = async_to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index de312acae..e6ed2844a 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -2,39 +2,30 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx -from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params +from .. import _legacy_response +from ..types import inbound_check_deposit_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] -class InboundCheckDepositsResource(SyncAPIResource): +class InboundCheckDeposits(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: - return InboundCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: - return InboundCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) def retrieve( self, @@ -176,69 +167,15 @@ def decline( cast_to=InboundCheckDeposit, ) - def return_( - self, - inbound_check_deposit_id: str, - *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundCheckDeposit: - """ - Return an Inbound Check Deposit - - Args: - inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. - - reason: The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not inbound_check_deposit_id: - raise ValueError( - f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" - ) - return self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", - body=maybe_transform( - {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundCheckDeposit, - ) - -class AsyncInboundCheckDepositsResource(AsyncAPIResource): +class AsyncInboundCheckDeposits(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: - return AsyncInboundCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: - return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) async def retrieve( self, @@ -380,99 +317,39 @@ async def decline( cast_to=InboundCheckDeposit, ) - async def return_( - self, - inbound_check_deposit_id: str, - *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundCheckDeposit: - """ - Return an Inbound Check Deposit - - Args: - inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. - reason: The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not inbound_check_deposit_id: - raise ValueError( - f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" - ) - return await self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", - body=await async_maybe_transform( - {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundCheckDeposit, - ) - - -class InboundCheckDepositsResourceWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = to_raw_response_wrapper( + self.decline = _legacy_response.to_raw_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = to_raw_response_wrapper( - inbound_check_deposits.return_, - ) -class AsyncInboundCheckDepositsResourceWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = async_to_raw_response_wrapper( + self.decline = _legacy_response.async_to_raw_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = async_to_raw_response_wrapper( - inbound_check_deposits.return_, - ) -class InboundCheckDepositsResourceWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = to_streamed_response_wrapper( @@ -484,13 +361,10 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.decline = to_streamed_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = to_streamed_response_wrapper( - inbound_check_deposits.return_, - ) -class AsyncInboundCheckDepositsResourceWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = async_to_streamed_response_wrapper( @@ -502,6 +376,3 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.decline = async_to_streamed_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = async_to_streamed_response_wrapper( - inbound_check_deposits.return_, - ) diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 13c914c60..878f4b57b 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import inbound_mail_item_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_mail_item import InboundMailItem -__all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] +__all__ = ["InboundMailItems", "AsyncInboundMailItems"] -class InboundMailItemsResource(SyncAPIResource): +class InboundMailItems(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: - return InboundMailItemsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundMailItemsWithRawResponse: + return InboundMailItemsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: - return InboundMailItemsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundMailItemsWithStreamingResponse: + return InboundMailItemsWithStreamingResponse(self) def retrieve( self, @@ -123,14 +119,14 @@ def list( ) -class AsyncInboundMailItemsResource(AsyncAPIResource): +class AsyncInboundMailItems(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: - return AsyncInboundMailItemsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundMailItemsWithRawResponse: + return AsyncInboundMailItemsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: - return AsyncInboundMailItemsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundMailItemsWithStreamingResponse: + return AsyncInboundMailItemsWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +220,32 @@ def list( ) -class InboundMailItemsResourceWithRawResponse: - def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: +class InboundMailItemsWithRawResponse: + def __init__(self, inbound_mail_items: InboundMailItems) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( inbound_mail_items.list, ) -class AsyncInboundMailItemsResourceWithRawResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: +class AsyncInboundMailItemsWithRawResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( inbound_mail_items.list, ) -class InboundMailItemsResourceWithStreamingResponse: - def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: +class InboundMailItemsWithStreamingResponse: + def __init__(self, inbound_mail_items: InboundMailItems) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = to_streamed_response_wrapper( @@ -260,8 +256,8 @@ def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: ) -class AsyncInboundMailItemsResourceWithStreamingResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: +class AsyncInboundMailItemsWithStreamingResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index 91f3bda03..e61b99d06 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import inbound_wire_drawdown_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] +__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] -class InboundWireDrawdownRequestsResource(SyncAPIResource): +class InboundWireDrawdownRequests(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: - return InboundWireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: + return InboundWireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: - return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: + return InboundWireDrawdownRequestsWithStreamingResponse(self) def retrieve( self, @@ -117,14 +113,14 @@ def list( ) -class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): +class AsyncInboundWireDrawdownRequests(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: + return AsyncInboundWireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +208,32 @@ def list( ) -class InboundWireDrawdownRequestsResourceWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: +class InboundWireDrawdownRequestsWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: +class AsyncInboundWireDrawdownRequestsWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class InboundWireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: +class InboundWireDrawdownRequestsWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = to_streamed_response_wrapper( @@ -248,8 +244,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsRe ) -class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: +class AsyncInboundWireDrawdownRequestsWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 45d53fc7a..c02112989 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -6,32 +6,28 @@ import httpx +from .. import _legacy_response from ..types import inbound_wire_transfer_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer -__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] +__all__ = ["InboundWireTransfers", "AsyncInboundWireTransfers"] -class InboundWireTransfersResource(SyncAPIResource): +class InboundWireTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: - return InboundWireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> InboundWireTransfersWithRawResponse: + return InboundWireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: - return InboundWireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireTransfersWithStreamingResponse: + return InboundWireTransfersWithStreamingResponse(self) def retrieve( self, @@ -139,14 +135,14 @@ def list( ) -class AsyncInboundWireTransfersResource(AsyncAPIResource): +class AsyncInboundWireTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: - return AsyncInboundWireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireTransfersWithRawResponse: + return AsyncInboundWireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: - return AsyncInboundWireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireTransfersWithStreamingResponse: + return AsyncInboundWireTransfersWithStreamingResponse(self) async def retrieve( self, @@ -254,32 +250,32 @@ def list( ) -class InboundWireTransfersResourceWithRawResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: +class InboundWireTransfersWithRawResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( inbound_wire_transfers.list, ) -class AsyncInboundWireTransfersResourceWithRawResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: +class AsyncInboundWireTransfersWithRawResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( inbound_wire_transfers.list, ) -class InboundWireTransfersResourceWithStreamingResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: +class InboundWireTransfersWithStreamingResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = to_streamed_response_wrapper( @@ -290,8 +286,8 @@ def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None ) -class AsyncInboundWireTransfersResourceWithStreamingResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: +class AsyncInboundWireTransfersWithStreamingResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/intrafi/__init__.py b/src/increase/resources/intrafi/__init__.py new file mode 100644 index 000000000..95d677c98 --- /dev/null +++ b/src/increase/resources/intrafi/__init__.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from .intrafi import ( + Intrafi, + AsyncIntrafi, + IntrafiWithRawResponse, + AsyncIntrafiWithRawResponse, + IntrafiWithStreamingResponse, + AsyncIntrafiWithStreamingResponse, +) +from .balances import ( + Balances, + AsyncBalances, + BalancesWithRawResponse, + AsyncBalancesWithRawResponse, + BalancesWithStreamingResponse, + AsyncBalancesWithStreamingResponse, +) +from .exclusions import ( + Exclusions, + AsyncExclusions, + ExclusionsWithRawResponse, + AsyncExclusionsWithRawResponse, + ExclusionsWithStreamingResponse, + AsyncExclusionsWithStreamingResponse, +) +from .account_enrollments import ( + AccountEnrollments, + AsyncAccountEnrollments, + AccountEnrollmentsWithRawResponse, + AsyncAccountEnrollmentsWithRawResponse, + AccountEnrollmentsWithStreamingResponse, + AsyncAccountEnrollmentsWithStreamingResponse, +) + +__all__ = [ + "AccountEnrollments", + "AsyncAccountEnrollments", + "AccountEnrollmentsWithRawResponse", + "AsyncAccountEnrollmentsWithRawResponse", + "AccountEnrollmentsWithStreamingResponse", + "AsyncAccountEnrollmentsWithStreamingResponse", + "Balances", + "AsyncBalances", + "BalancesWithRawResponse", + "AsyncBalancesWithRawResponse", + "BalancesWithStreamingResponse", + "AsyncBalancesWithStreamingResponse", + "Exclusions", + "AsyncExclusions", + "ExclusionsWithRawResponse", + "AsyncExclusionsWithRawResponse", + "ExclusionsWithStreamingResponse", + "AsyncExclusionsWithStreamingResponse", + "Intrafi", + "AsyncIntrafi", + "IntrafiWithRawResponse", + "AsyncIntrafiWithRawResponse", + "IntrafiWithStreamingResponse", + "AsyncIntrafiWithStreamingResponse", +] diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi/account_enrollments.py similarity index 79% rename from src/increase/resources/intrafi_account_enrollments.py rename to src/increase/resources/intrafi/account_enrollments.py index 7e5aae937..00a03d615 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi/account_enrollments.py @@ -4,35 +4,31 @@ import httpx -from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( maybe_transform, async_maybe_transform, ) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.intrafi_account_enrollment import IntrafiAccountEnrollment +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...pagination import SyncPage, AsyncPage +from ..._base_client import AsyncPaginator, make_request_options +from ...types.intrafi import account_enrollment_list_params, account_enrollment_create_params +from ...types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment -__all__ = ["IntrafiAccountEnrollmentsResource", "AsyncIntrafiAccountEnrollmentsResource"] +__all__ = ["AccountEnrollments", "AsyncAccountEnrollments"] -class IntrafiAccountEnrollmentsResource(SyncAPIResource): +class AccountEnrollments(SyncAPIResource): @cached_property - def with_raw_response(self) -> IntrafiAccountEnrollmentsResourceWithRawResponse: - return IntrafiAccountEnrollmentsResourceWithRawResponse(self) + def with_raw_response(self) -> AccountEnrollmentsWithRawResponse: + return AccountEnrollmentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> IntrafiAccountEnrollmentsResourceWithStreamingResponse: - return IntrafiAccountEnrollmentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountEnrollmentsWithStreamingResponse: + return AccountEnrollmentsWithStreamingResponse(self) def create( self, @@ -72,7 +68,7 @@ def create( "account_id": account_id, "email_address": email_address, }, - intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, + account_enrollment_create_params.AccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -128,7 +124,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -176,7 +172,7 @@ def list( "limit": limit, "status": status, }, - intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, + account_enrollment_list_params.AccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -227,14 +223,14 @@ def unenroll( ) -class AsyncIntrafiAccountEnrollmentsResource(AsyncAPIResource): +class AsyncAccountEnrollments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: - return AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountEnrollmentsWithRawResponse: + return AsyncAccountEnrollmentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: - return AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountEnrollmentsWithStreamingResponse: + return AsyncAccountEnrollmentsWithStreamingResponse(self) async def create( self, @@ -274,7 +270,7 @@ async def create( "account_id": account_id, "email_address": email_address, }, - intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, + account_enrollment_create_params.AccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -330,7 +326,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -378,7 +374,7 @@ def list( "limit": limit, "status": status, }, - intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, + account_enrollment_list_params.AccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -429,73 +425,73 @@ async def unenroll( ) -class IntrafiAccountEnrollmentsResourceWithRawResponse: - def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: - self._intrafi_account_enrollments = intrafi_account_enrollments +class AccountEnrollmentsWithRawResponse: + def __init__(self, account_enrollments: AccountEnrollments) -> None: + self._account_enrollments = account_enrollments - self.create = to_raw_response_wrapper( - intrafi_account_enrollments.create, + self.create = _legacy_response.to_raw_response_wrapper( + account_enrollments.create, ) - self.retrieve = to_raw_response_wrapper( - intrafi_account_enrollments.retrieve, + self.retrieve = _legacy_response.to_raw_response_wrapper( + account_enrollments.retrieve, ) - self.list = to_raw_response_wrapper( - intrafi_account_enrollments.list, + self.list = _legacy_response.to_raw_response_wrapper( + account_enrollments.list, ) - self.unenroll = to_raw_response_wrapper( - intrafi_account_enrollments.unenroll, + self.unenroll = _legacy_response.to_raw_response_wrapper( + account_enrollments.unenroll, ) -class AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: - def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: - self._intrafi_account_enrollments = intrafi_account_enrollments +class AsyncAccountEnrollmentsWithRawResponse: + def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: + self._account_enrollments = account_enrollments - self.create = async_to_raw_response_wrapper( - intrafi_account_enrollments.create, + self.create = _legacy_response.async_to_raw_response_wrapper( + account_enrollments.create, ) - self.retrieve = async_to_raw_response_wrapper( - intrafi_account_enrollments.retrieve, + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + account_enrollments.retrieve, ) - self.list = async_to_raw_response_wrapper( - intrafi_account_enrollments.list, + self.list = _legacy_response.async_to_raw_response_wrapper( + account_enrollments.list, ) - self.unenroll = async_to_raw_response_wrapper( - intrafi_account_enrollments.unenroll, + self.unenroll = _legacy_response.async_to_raw_response_wrapper( + account_enrollments.unenroll, ) -class IntrafiAccountEnrollmentsResourceWithStreamingResponse: - def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: - self._intrafi_account_enrollments = intrafi_account_enrollments +class AccountEnrollmentsWithStreamingResponse: + def __init__(self, account_enrollments: AccountEnrollments) -> None: + self._account_enrollments = account_enrollments self.create = to_streamed_response_wrapper( - intrafi_account_enrollments.create, + account_enrollments.create, ) self.retrieve = to_streamed_response_wrapper( - intrafi_account_enrollments.retrieve, + account_enrollments.retrieve, ) self.list = to_streamed_response_wrapper( - intrafi_account_enrollments.list, + account_enrollments.list, ) self.unenroll = to_streamed_response_wrapper( - intrafi_account_enrollments.unenroll, + account_enrollments.unenroll, ) -class AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: - def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: - self._intrafi_account_enrollments = intrafi_account_enrollments +class AsyncAccountEnrollmentsWithStreamingResponse: + def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: + self._account_enrollments = account_enrollments self.create = async_to_streamed_response_wrapper( - intrafi_account_enrollments.create, + account_enrollments.create, ) self.retrieve = async_to_streamed_response_wrapper( - intrafi_account_enrollments.retrieve, + account_enrollments.retrieve, ) self.list = async_to_streamed_response_wrapper( - intrafi_account_enrollments.list, + account_enrollments.list, ) self.unenroll = async_to_streamed_response_wrapper( - intrafi_account_enrollments.unenroll, + account_enrollments.unenroll, ) diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi/balances.py similarity index 59% rename from src/increase/resources/intrafi_balances.py rename to src/increase/resources/intrafi/balances.py index 3cd064011..0a6f3c141 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi/balances.py @@ -4,29 +4,25 @@ import httpx -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from .._base_client import make_request_options -from ..types.intrafi_balance import IntrafiBalance - -__all__ = ["IntrafiBalancesResource", "AsyncIntrafiBalancesResource"] - - -class IntrafiBalancesResource(SyncAPIResource): +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import make_request_options +from ...types.intrafi.intrafi_balance import IntrafiBalance + +__all__ = ["Balances", "AsyncBalances"] + + +class Balances(SyncAPIResource): @cached_property - def with_raw_response(self) -> IntrafiBalancesResourceWithRawResponse: - return IntrafiBalancesResourceWithRawResponse(self) + def with_raw_response(self) -> BalancesWithRawResponse: + return BalancesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> IntrafiBalancesResourceWithStreamingResponse: - return IntrafiBalancesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> BalancesWithStreamingResponse: + return BalancesWithStreamingResponse(self) def retrieve( self, @@ -64,14 +60,14 @@ def retrieve( ) -class AsyncIntrafiBalancesResource(AsyncAPIResource): +class AsyncBalances(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncIntrafiBalancesResourceWithRawResponse: - return AsyncIntrafiBalancesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncBalancesWithRawResponse: + return AsyncBalancesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncIntrafiBalancesResourceWithStreamingResponse: - return AsyncIntrafiBalancesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBalancesWithStreamingResponse: + return AsyncBalancesWithStreamingResponse(self) async def retrieve( self, @@ -109,37 +105,37 @@ async def retrieve( ) -class IntrafiBalancesResourceWithRawResponse: - def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: - self._intrafi_balances = intrafi_balances +class BalancesWithRawResponse: + def __init__(self, balances: Balances) -> None: + self._balances = balances - self.retrieve = to_raw_response_wrapper( - intrafi_balances.retrieve, + self.retrieve = _legacy_response.to_raw_response_wrapper( + balances.retrieve, ) -class AsyncIntrafiBalancesResourceWithRawResponse: - def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: - self._intrafi_balances = intrafi_balances +class AsyncBalancesWithRawResponse: + def __init__(self, balances: AsyncBalances) -> None: + self._balances = balances - self.retrieve = async_to_raw_response_wrapper( - intrafi_balances.retrieve, + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + balances.retrieve, ) -class IntrafiBalancesResourceWithStreamingResponse: - def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: - self._intrafi_balances = intrafi_balances +class BalancesWithStreamingResponse: + def __init__(self, balances: Balances) -> None: + self._balances = balances self.retrieve = to_streamed_response_wrapper( - intrafi_balances.retrieve, + balances.retrieve, ) -class AsyncIntrafiBalancesResourceWithStreamingResponse: - def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: - self._intrafi_balances = intrafi_balances +class AsyncBalancesWithStreamingResponse: + def __init__(self, balances: AsyncBalances) -> None: + self._balances = balances self.retrieve = async_to_streamed_response_wrapper( - intrafi_balances.retrieve, + balances.retrieve, ) diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi/exclusions.py similarity index 81% rename from src/increase/resources/intrafi_exclusions.py rename to src/increase/resources/intrafi/exclusions.py index e45ff5536..872227889 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi/exclusions.py @@ -4,35 +4,31 @@ import httpx -from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( maybe_transform, async_maybe_transform, ) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.intrafi_exclusion import IntrafiExclusion +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ...pagination import SyncPage, AsyncPage +from ..._base_client import AsyncPaginator, make_request_options +from ...types.intrafi import exclusion_list_params, exclusion_create_params +from ...types.intrafi.intrafi_exclusion import IntrafiExclusion -__all__ = ["IntrafiExclusionsResource", "AsyncIntrafiExclusionsResource"] +__all__ = ["Exclusions", "AsyncExclusions"] -class IntrafiExclusionsResource(SyncAPIResource): +class Exclusions(SyncAPIResource): @cached_property - def with_raw_response(self) -> IntrafiExclusionsResourceWithRawResponse: - return IntrafiExclusionsResourceWithRawResponse(self) + def with_raw_response(self) -> ExclusionsWithRawResponse: + return ExclusionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> IntrafiExclusionsResourceWithStreamingResponse: - return IntrafiExclusionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ExclusionsWithStreamingResponse: + return ExclusionsWithStreamingResponse(self) def create( self, @@ -72,7 +68,7 @@ def create( "bank_name": bank_name, "entity_id": entity_id, }, - intrafi_exclusion_create_params.IntrafiExclusionCreateParams, + exclusion_create_params.ExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -174,7 +170,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - intrafi_exclusion_list_params.IntrafiExclusionListParams, + exclusion_list_params.ExclusionListParams, ), ), model=IntrafiExclusion, @@ -227,14 +223,14 @@ def archive( ) -class AsyncIntrafiExclusionsResource(AsyncAPIResource): +class AsyncExclusions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncIntrafiExclusionsResourceWithRawResponse: - return AsyncIntrafiExclusionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncExclusionsWithRawResponse: + return AsyncExclusionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncIntrafiExclusionsResourceWithStreamingResponse: - return AsyncIntrafiExclusionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExclusionsWithStreamingResponse: + return AsyncExclusionsWithStreamingResponse(self) async def create( self, @@ -274,7 +270,7 @@ async def create( "bank_name": bank_name, "entity_id": entity_id, }, - intrafi_exclusion_create_params.IntrafiExclusionCreateParams, + exclusion_create_params.ExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -376,7 +372,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - intrafi_exclusion_list_params.IntrafiExclusionListParams, + exclusion_list_params.ExclusionListParams, ), ), model=IntrafiExclusion, @@ -429,73 +425,73 @@ async def archive( ) -class IntrafiExclusionsResourceWithRawResponse: - def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: - self._intrafi_exclusions = intrafi_exclusions +class ExclusionsWithRawResponse: + def __init__(self, exclusions: Exclusions) -> None: + self._exclusions = exclusions - self.create = to_raw_response_wrapper( - intrafi_exclusions.create, + self.create = _legacy_response.to_raw_response_wrapper( + exclusions.create, ) - self.retrieve = to_raw_response_wrapper( - intrafi_exclusions.retrieve, + self.retrieve = _legacy_response.to_raw_response_wrapper( + exclusions.retrieve, ) - self.list = to_raw_response_wrapper( - intrafi_exclusions.list, + self.list = _legacy_response.to_raw_response_wrapper( + exclusions.list, ) - self.archive = to_raw_response_wrapper( - intrafi_exclusions.archive, + self.archive = _legacy_response.to_raw_response_wrapper( + exclusions.archive, ) -class AsyncIntrafiExclusionsResourceWithRawResponse: - def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: - self._intrafi_exclusions = intrafi_exclusions +class AsyncExclusionsWithRawResponse: + def __init__(self, exclusions: AsyncExclusions) -> None: + self._exclusions = exclusions - self.create = async_to_raw_response_wrapper( - intrafi_exclusions.create, + self.create = _legacy_response.async_to_raw_response_wrapper( + exclusions.create, ) - self.retrieve = async_to_raw_response_wrapper( - intrafi_exclusions.retrieve, + self.retrieve = _legacy_response.async_to_raw_response_wrapper( + exclusions.retrieve, ) - self.list = async_to_raw_response_wrapper( - intrafi_exclusions.list, + self.list = _legacy_response.async_to_raw_response_wrapper( + exclusions.list, ) - self.archive = async_to_raw_response_wrapper( - intrafi_exclusions.archive, + self.archive = _legacy_response.async_to_raw_response_wrapper( + exclusions.archive, ) -class IntrafiExclusionsResourceWithStreamingResponse: - def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: - self._intrafi_exclusions = intrafi_exclusions +class ExclusionsWithStreamingResponse: + def __init__(self, exclusions: Exclusions) -> None: + self._exclusions = exclusions self.create = to_streamed_response_wrapper( - intrafi_exclusions.create, + exclusions.create, ) self.retrieve = to_streamed_response_wrapper( - intrafi_exclusions.retrieve, + exclusions.retrieve, ) self.list = to_streamed_response_wrapper( - intrafi_exclusions.list, + exclusions.list, ) self.archive = to_streamed_response_wrapper( - intrafi_exclusions.archive, + exclusions.archive, ) -class AsyncIntrafiExclusionsResourceWithStreamingResponse: - def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: - self._intrafi_exclusions = intrafi_exclusions +class AsyncExclusionsWithStreamingResponse: + def __init__(self, exclusions: AsyncExclusions) -> None: + self._exclusions = exclusions self.create = async_to_streamed_response_wrapper( - intrafi_exclusions.create, + exclusions.create, ) self.retrieve = async_to_streamed_response_wrapper( - intrafi_exclusions.retrieve, + exclusions.retrieve, ) self.list = async_to_streamed_response_wrapper( - intrafi_exclusions.list, + exclusions.list, ) self.archive = async_to_streamed_response_wrapper( - intrafi_exclusions.archive, + exclusions.archive, ) diff --git a/src/increase/resources/intrafi/intrafi.py b/src/increase/resources/intrafi/intrafi.py new file mode 100644 index 000000000..6c978b037 --- /dev/null +++ b/src/increase/resources/intrafi/intrafi.py @@ -0,0 +1,144 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .balances import ( + Balances, + AsyncBalances, + BalancesWithRawResponse, + AsyncBalancesWithRawResponse, + BalancesWithStreamingResponse, + AsyncBalancesWithStreamingResponse, +) +from ..._compat import cached_property +from .exclusions import ( + Exclusions, + AsyncExclusions, + ExclusionsWithRawResponse, + AsyncExclusionsWithRawResponse, + ExclusionsWithStreamingResponse, + AsyncExclusionsWithStreamingResponse, +) +from ..._resource import SyncAPIResource, AsyncAPIResource +from .account_enrollments import ( + AccountEnrollments, + AsyncAccountEnrollments, + AccountEnrollmentsWithRawResponse, + AsyncAccountEnrollmentsWithRawResponse, + AccountEnrollmentsWithStreamingResponse, + AsyncAccountEnrollmentsWithStreamingResponse, +) + +__all__ = ["Intrafi", "AsyncIntrafi"] + + +class Intrafi(SyncAPIResource): + @cached_property + def account_enrollments(self) -> AccountEnrollments: + return AccountEnrollments(self._client) + + @cached_property + def balances(self) -> Balances: + return Balances(self._client) + + @cached_property + def exclusions(self) -> Exclusions: + return Exclusions(self._client) + + @cached_property + def with_raw_response(self) -> IntrafiWithRawResponse: + return IntrafiWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> IntrafiWithStreamingResponse: + return IntrafiWithStreamingResponse(self) + + +class AsyncIntrafi(AsyncAPIResource): + @cached_property + def account_enrollments(self) -> AsyncAccountEnrollments: + return AsyncAccountEnrollments(self._client) + + @cached_property + def balances(self) -> AsyncBalances: + return AsyncBalances(self._client) + + @cached_property + def exclusions(self) -> AsyncExclusions: + return AsyncExclusions(self._client) + + @cached_property + def with_raw_response(self) -> AsyncIntrafiWithRawResponse: + return AsyncIntrafiWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncIntrafiWithStreamingResponse: + return AsyncIntrafiWithStreamingResponse(self) + + +class IntrafiWithRawResponse: + def __init__(self, intrafi: Intrafi) -> None: + self._intrafi = intrafi + + @cached_property + def account_enrollments(self) -> AccountEnrollmentsWithRawResponse: + return AccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) + + @cached_property + def balances(self) -> BalancesWithRawResponse: + return BalancesWithRawResponse(self._intrafi.balances) + + @cached_property + def exclusions(self) -> ExclusionsWithRawResponse: + return ExclusionsWithRawResponse(self._intrafi.exclusions) + + +class AsyncIntrafiWithRawResponse: + def __init__(self, intrafi: AsyncIntrafi) -> None: + self._intrafi = intrafi + + @cached_property + def account_enrollments(self) -> AsyncAccountEnrollmentsWithRawResponse: + return AsyncAccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) + + @cached_property + def balances(self) -> AsyncBalancesWithRawResponse: + return AsyncBalancesWithRawResponse(self._intrafi.balances) + + @cached_property + def exclusions(self) -> AsyncExclusionsWithRawResponse: + return AsyncExclusionsWithRawResponse(self._intrafi.exclusions) + + +class IntrafiWithStreamingResponse: + def __init__(self, intrafi: Intrafi) -> None: + self._intrafi = intrafi + + @cached_property + def account_enrollments(self) -> AccountEnrollmentsWithStreamingResponse: + return AccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) + + @cached_property + def balances(self) -> BalancesWithStreamingResponse: + return BalancesWithStreamingResponse(self._intrafi.balances) + + @cached_property + def exclusions(self) -> ExclusionsWithStreamingResponse: + return ExclusionsWithStreamingResponse(self._intrafi.exclusions) + + +class AsyncIntrafiWithStreamingResponse: + def __init__(self, intrafi: AsyncIntrafi) -> None: + self._intrafi = intrafi + + @cached_property + def account_enrollments(self) -> AsyncAccountEnrollmentsWithStreamingResponse: + return AsyncAccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) + + @cached_property + def balances(self) -> AsyncBalancesWithStreamingResponse: + return AsyncBalancesWithStreamingResponse(self._intrafi.balances) + + @cached_property + def exclusions(self) -> AsyncExclusionsWithStreamingResponse: + return AsyncExclusionsWithStreamingResponse(self._intrafi.exclusions) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 56eb00f6d..de190d725 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,27 +15,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.lockbox import Lockbox -__all__ = ["LockboxesResource", "AsyncLockboxesResource"] +__all__ = ["Lockboxes", "AsyncLockboxes"] -class LockboxesResource(SyncAPIResource): +class Lockboxes(SyncAPIResource): @cached_property - def with_raw_response(self) -> LockboxesResourceWithRawResponse: - return LockboxesResourceWithRawResponse(self) + def with_raw_response(self) -> LockboxesWithRawResponse: + return LockboxesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> LockboxesResourceWithStreamingResponse: - return LockboxesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> LockboxesWithStreamingResponse: + return LockboxesWithStreamingResponse(self) def create( self, @@ -243,14 +239,14 @@ def list( ) -class AsyncLockboxesResource(AsyncAPIResource): +class AsyncLockboxes(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncLockboxesResourceWithRawResponse: - return AsyncLockboxesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncLockboxesWithRawResponse: + return AsyncLockboxesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncLockboxesResourceWithStreamingResponse: - return AsyncLockboxesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncLockboxesWithStreamingResponse: + return AsyncLockboxesWithStreamingResponse(self) async def create( self, @@ -459,44 +455,44 @@ def list( ) -class LockboxesResourceWithRawResponse: - def __init__(self, lockboxes: LockboxesResource) -> None: +class LockboxesWithRawResponse: + def __init__(self, lockboxes: Lockboxes) -> None: self._lockboxes = lockboxes - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( lockboxes.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( lockboxes.list, ) -class AsyncLockboxesResourceWithRawResponse: - def __init__(self, lockboxes: AsyncLockboxesResource) -> None: +class AsyncLockboxesWithRawResponse: + def __init__(self, lockboxes: AsyncLockboxes) -> None: self._lockboxes = lockboxes - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( lockboxes.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( lockboxes.list, ) -class LockboxesResourceWithStreamingResponse: - def __init__(self, lockboxes: LockboxesResource) -> None: +class LockboxesWithStreamingResponse: + def __init__(self, lockboxes: Lockboxes) -> None: self._lockboxes = lockboxes self.create = to_streamed_response_wrapper( @@ -513,8 +509,8 @@ def __init__(self, lockboxes: LockboxesResource) -> None: ) -class AsyncLockboxesResourceWithStreamingResponse: - def __init__(self, lockboxes: AsyncLockboxesResource) -> None: +class AsyncLockboxesWithStreamingResponse: + def __init__(self, lockboxes: AsyncLockboxes) -> None: self._lockboxes = lockboxes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index f33e94a47..4098d669b 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import oauth_connection_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_connection import OAuthConnection -__all__ = ["OAuthConnectionsResource", "AsyncOAuthConnectionsResource"] +__all__ = ["OAuthConnections", "AsyncOAuthConnections"] -class OAuthConnectionsResource(SyncAPIResource): +class OAuthConnections(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthConnectionsResourceWithRawResponse: - return OAuthConnectionsResourceWithRawResponse(self) + def with_raw_response(self) -> OAuthConnectionsWithRawResponse: + return OAuthConnectionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthConnectionsResourceWithStreamingResponse: - return OAuthConnectionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthConnectionsWithStreamingResponse: + return OAuthConnectionsWithStreamingResponse(self) def retrieve( self, @@ -119,14 +115,14 @@ def list( ) -class AsyncOAuthConnectionsResource(AsyncAPIResource): +class AsyncOAuthConnections(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthConnectionsResourceWithRawResponse: - return AsyncOAuthConnectionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthConnectionsWithRawResponse: + return AsyncOAuthConnectionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthConnectionsResourceWithStreamingResponse: - return AsyncOAuthConnectionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthConnectionsWithStreamingResponse: + return AsyncOAuthConnectionsWithStreamingResponse(self) async def retrieve( self, @@ -216,32 +212,32 @@ def list( ) -class OAuthConnectionsResourceWithRawResponse: - def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: +class OAuthConnectionsWithRawResponse: + def __init__(self, oauth_connections: OAuthConnections) -> None: self._oauth_connections = oauth_connections - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( oauth_connections.list, ) -class AsyncOAuthConnectionsResourceWithRawResponse: - def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: +class AsyncOAuthConnectionsWithRawResponse: + def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: self._oauth_connections = oauth_connections - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( oauth_connections.list, ) -class OAuthConnectionsResourceWithStreamingResponse: - def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: +class OAuthConnectionsWithStreamingResponse: + def __init__(self, oauth_connections: OAuthConnections) -> None: self._oauth_connections = oauth_connections self.retrieve = to_streamed_response_wrapper( @@ -252,8 +248,8 @@ def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: ) -class AsyncOAuthConnectionsResourceWithStreamingResponse: - def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: +class AsyncOAuthConnectionsWithStreamingResponse: + def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: self._oauth_connections = oauth_connections self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index e2c2f1ca9..d0d7e3c02 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import oauth_token_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,26 +15,21 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from .._base_client import make_request_options from ..types.oauth_token import OAuthToken -__all__ = ["OAuthTokensResource", "AsyncOAuthTokensResource"] +__all__ = ["OAuthTokens", "AsyncOAuthTokens"] -class OAuthTokensResource(SyncAPIResource): +class OAuthTokens(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthTokensResourceWithRawResponse: - return OAuthTokensResourceWithRawResponse(self) + def with_raw_response(self) -> OAuthTokensWithRawResponse: + return OAuthTokensWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthTokensResourceWithStreamingResponse: - return OAuthTokensResourceWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthTokensWithStreamingResponse: + return OAuthTokensWithStreamingResponse(self) def create( self, @@ -107,14 +103,14 @@ def create( ) -class AsyncOAuthTokensResource(AsyncAPIResource): +class AsyncOAuthTokens(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthTokensResourceWithRawResponse: - return AsyncOAuthTokensResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthTokensWithRawResponse: + return AsyncOAuthTokensWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthTokensResourceWithStreamingResponse: - return AsyncOAuthTokensResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthTokensWithStreamingResponse: + return AsyncOAuthTokensWithStreamingResponse(self) async def create( self, @@ -188,26 +184,26 @@ async def create( ) -class OAuthTokensResourceWithRawResponse: - def __init__(self, oauth_tokens: OAuthTokensResource) -> None: +class OAuthTokensWithRawResponse: + def __init__(self, oauth_tokens: OAuthTokens) -> None: self._oauth_tokens = oauth_tokens - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( oauth_tokens.create, ) -class AsyncOAuthTokensResourceWithRawResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: +class AsyncOAuthTokensWithRawResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: self._oauth_tokens = oauth_tokens - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( oauth_tokens.create, ) -class OAuthTokensResourceWithStreamingResponse: - def __init__(self, oauth_tokens: OAuthTokensResource) -> None: +class OAuthTokensWithStreamingResponse: + def __init__(self, oauth_tokens: OAuthTokens) -> None: self._oauth_tokens = oauth_tokens self.create = to_streamed_response_wrapper( @@ -215,8 +211,8 @@ def __init__(self, oauth_tokens: OAuthTokensResource) -> None: ) -class AsyncOAuthTokensResourceWithStreamingResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: +class AsyncOAuthTokensWithStreamingResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: self._oauth_tokens = oauth_tokens self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 1480a95ce..b09b09a05 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import pending_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.pending_transaction import PendingTransaction -__all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] +__all__ = ["PendingTransactions", "AsyncPendingTransactions"] -class PendingTransactionsResource(SyncAPIResource): +class PendingTransactions(SyncAPIResource): @cached_property - def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: - return PendingTransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> PendingTransactionsWithRawResponse: + return PendingTransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: - return PendingTransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> PendingTransactionsWithStreamingResponse: + return PendingTransactionsWithStreamingResponse(self) def retrieve( self, @@ -135,14 +131,14 @@ def list( ) -class AsyncPendingTransactionsResource(AsyncAPIResource): +class AsyncPendingTransactions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: - return AsyncPendingTransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncPendingTransactionsWithRawResponse: + return AsyncPendingTransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: - return AsyncPendingTransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPendingTransactionsWithStreamingResponse: + return AsyncPendingTransactionsWithStreamingResponse(self) async def retrieve( self, @@ -248,32 +244,32 @@ def list( ) -class PendingTransactionsResourceWithRawResponse: - def __init__(self, pending_transactions: PendingTransactionsResource) -> None: +class PendingTransactionsWithRawResponse: + def __init__(self, pending_transactions: PendingTransactions) -> None: self._pending_transactions = pending_transactions - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( pending_transactions.list, ) -class AsyncPendingTransactionsResourceWithRawResponse: - def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: +class AsyncPendingTransactionsWithRawResponse: + def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: self._pending_transactions = pending_transactions - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( pending_transactions.list, ) -class PendingTransactionsResourceWithStreamingResponse: - def __init__(self, pending_transactions: PendingTransactionsResource) -> None: +class PendingTransactionsWithStreamingResponse: + def __init__(self, pending_transactions: PendingTransactions) -> None: self._pending_transactions = pending_transactions self.retrieve = to_streamed_response_wrapper( @@ -284,8 +280,8 @@ def __init__(self, pending_transactions: PendingTransactionsResource) -> None: ) -class AsyncPendingTransactionsResourceWithStreamingResponse: - def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: +class AsyncPendingTransactionsWithStreamingResponse: + def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: self._pending_transactions = pending_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index c66db39d0..09ea6c423 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import ( physical_card_profile_list_params, physical_card_profile_clone_params, @@ -16,27 +17,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card_profile import PhysicalCardProfile -__all__ = ["PhysicalCardProfilesResource", "AsyncPhysicalCardProfilesResource"] +__all__ = ["PhysicalCardProfiles", "AsyncPhysicalCardProfiles"] -class PhysicalCardProfilesResource(SyncAPIResource): +class PhysicalCardProfiles(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardProfilesResourceWithRawResponse: - return PhysicalCardProfilesResourceWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardProfilesWithRawResponse: + return PhysicalCardProfilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardProfilesResourceWithStreamingResponse: - return PhysicalCardProfilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardProfilesWithStreamingResponse: + return PhysicalCardProfilesWithStreamingResponse(self) def create( self, @@ -305,14 +301,14 @@ def clone( ) -class AsyncPhysicalCardProfilesResource(AsyncAPIResource): +class AsyncPhysicalCardProfiles(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardProfilesResourceWithRawResponse: - return AsyncPhysicalCardProfilesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardProfilesWithRawResponse: + return AsyncPhysicalCardProfilesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardProfilesResourceWithStreamingResponse: - return AsyncPhysicalCardProfilesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardProfilesWithStreamingResponse: + return AsyncPhysicalCardProfilesWithStreamingResponse(self) async def create( self, @@ -581,50 +577,50 @@ async def clone( ) -class PhysicalCardProfilesResourceWithRawResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: +class PhysicalCardProfilesWithRawResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: self._physical_card_profiles = physical_card_profiles - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = to_raw_response_wrapper( + self.archive = _legacy_response.to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = to_raw_response_wrapper( + self.clone = _legacy_response.to_raw_response_wrapper( physical_card_profiles.clone, ) -class AsyncPhysicalCardProfilesResourceWithRawResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: +class AsyncPhysicalCardProfilesWithRawResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: self._physical_card_profiles = physical_card_profiles - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = async_to_raw_response_wrapper( + self.archive = _legacy_response.async_to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = async_to_raw_response_wrapper( + self.clone = _legacy_response.async_to_raw_response_wrapper( physical_card_profiles.clone, ) -class PhysicalCardProfilesResourceWithStreamingResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: +class PhysicalCardProfilesWithStreamingResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: self._physical_card_profiles = physical_card_profiles self.create = to_streamed_response_wrapper( @@ -644,8 +640,8 @@ def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None ) -class AsyncPhysicalCardProfilesResourceWithStreamingResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: +class AsyncPhysicalCardProfilesWithStreamingResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: self._physical_card_profiles = physical_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 4ba94b56c..17fad6e6e 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,27 +15,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card import PhysicalCard -__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] +__all__ = ["PhysicalCards", "AsyncPhysicalCards"] -class PhysicalCardsResource(SyncAPIResource): +class PhysicalCards(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: - return PhysicalCardsResourceWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsWithRawResponse: + return PhysicalCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: - return PhysicalCardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: + return PhysicalCardsWithStreamingResponse(self) def create( self, @@ -242,14 +238,14 @@ def list( ) -class AsyncPhysicalCardsResource(AsyncAPIResource): +class AsyncPhysicalCards(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: - return AsyncPhysicalCardsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: + return AsyncPhysicalCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: - return AsyncPhysicalCardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: + return AsyncPhysicalCardsWithStreamingResponse(self) async def create( self, @@ -457,44 +453,44 @@ def list( ) -class PhysicalCardsResourceWithRawResponse: - def __init__(self, physical_cards: PhysicalCardsResource) -> None: +class PhysicalCardsWithRawResponse: + def __init__(self, physical_cards: PhysicalCards) -> None: self._physical_cards = physical_cards - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = to_raw_response_wrapper( + self.update = _legacy_response.to_raw_response_wrapper( physical_cards.update, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( physical_cards.list, ) -class AsyncPhysicalCardsResourceWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: +class AsyncPhysicalCardsWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCards) -> None: self._physical_cards = physical_cards - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = async_to_raw_response_wrapper( + self.update = _legacy_response.async_to_raw_response_wrapper( physical_cards.update, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( physical_cards.list, ) -class PhysicalCardsResourceWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCardsResource) -> None: +class PhysicalCardsWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCards) -> None: self._physical_cards = physical_cards self.create = to_streamed_response_wrapper( @@ -511,8 +507,8 @@ def __init__(self, physical_cards: PhysicalCardsResource) -> None: ) -class AsyncPhysicalCardsResourceWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: +class AsyncPhysicalCardsWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCards) -> None: self._physical_cards = physical_cards self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 009d322b1..c91affa1f 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import program_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.program import Program -__all__ = ["ProgramsResource", "AsyncProgramsResource"] +__all__ = ["Programs", "AsyncPrograms"] -class ProgramsResource(SyncAPIResource): +class Programs(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsResourceWithRawResponse: - return ProgramsResourceWithRawResponse(self) + def with_raw_response(self) -> ProgramsWithRawResponse: + return ProgramsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: - return ProgramsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsWithStreamingResponse: + return ProgramsWithStreamingResponse(self) def retrieve( self, @@ -115,14 +111,14 @@ def list( ) -class AsyncProgramsResource(AsyncAPIResource): +class AsyncPrograms(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: - return AsyncProgramsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsWithRawResponse: + return AsyncProgramsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: - return AsyncProgramsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: + return AsyncProgramsWithStreamingResponse(self) async def retrieve( self, @@ -208,32 +204,32 @@ def list( ) -class ProgramsResourceWithRawResponse: - def __init__(self, programs: ProgramsResource) -> None: +class ProgramsWithRawResponse: + def __init__(self, programs: Programs) -> None: self._programs = programs - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( programs.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( programs.list, ) -class AsyncProgramsResourceWithRawResponse: - def __init__(self, programs: AsyncProgramsResource) -> None: +class AsyncProgramsWithRawResponse: + def __init__(self, programs: AsyncPrograms) -> None: self._programs = programs - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( programs.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( programs.list, ) -class ProgramsResourceWithStreamingResponse: - def __init__(self, programs: ProgramsResource) -> None: +class ProgramsWithStreamingResponse: + def __init__(self, programs: Programs) -> None: self._programs = programs self.retrieve = to_streamed_response_wrapper( @@ -244,8 +240,8 @@ def __init__(self, programs: ProgramsResource) -> None: ) -class AsyncProgramsResourceWithStreamingResponse: - def __init__(self, programs: AsyncProgramsResource) -> None: +class AsyncProgramsWithStreamingResponse: + def __init__(self, programs: AsyncPrograms) -> None: self._programs = programs self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index d8319ab58..044777f16 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -7,6 +7,7 @@ import httpx +from .. import _legacy_response from ..types import ( proof_of_authorization_request_submission_list_params, proof_of_authorization_request_submission_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission -__all__ = ["ProofOfAuthorizationRequestSubmissionsResource", "AsyncProofOfAuthorizationRequestSubmissionsResource"] +__all__ = ["ProofOfAuthorizationRequestSubmissions", "AsyncProofOfAuthorizationRequestSubmissions"] -class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): +class ProofOfAuthorizationRequestSubmissions(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - return ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsWithRawResponse: + return ProofOfAuthorizationRequestSubmissionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - return ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: + return ProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) def create( self, @@ -223,14 +219,14 @@ def list( ) -class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): +class AsyncProofOfAuthorizationRequestSubmissions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - return AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: + return AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - return AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: + return AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) async def create( self, @@ -415,44 +411,38 @@ def list( ) -class ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - def __init__( - self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource - ) -> None: +class ProofOfAuthorizationRequestSubmissionsWithRawResponse: + def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - def __init__( - self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource - ) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: + def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - def __init__( - self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource - ) -> None: +class ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: + def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = to_streamed_response_wrapper( @@ -466,10 +456,8 @@ def __init__( ) -class AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - def __init__( - self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource - ) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: + def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index 337457a5f..1b0d14c54 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import proof_of_authorization_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest -__all__ = ["ProofOfAuthorizationRequestsResource", "AsyncProofOfAuthorizationRequestsResource"] +__all__ = ["ProofOfAuthorizationRequests", "AsyncProofOfAuthorizationRequests"] -class ProofOfAuthorizationRequestsResource(SyncAPIResource): +class ProofOfAuthorizationRequests(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: - return ProofOfAuthorizationRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestsWithRawResponse: + return ProofOfAuthorizationRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestsResourceWithStreamingResponse: - return ProofOfAuthorizationRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestsWithStreamingResponse: + return ProofOfAuthorizationRequestsWithStreamingResponse(self) def retrieve( self, @@ -119,14 +115,14 @@ def list( ) -class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): +class AsyncProofOfAuthorizationRequests(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: - return AsyncProofOfAuthorizationRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsWithRawResponse: + return AsyncProofOfAuthorizationRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: - return AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsWithStreamingResponse: + return AsyncProofOfAuthorizationRequestsWithStreamingResponse(self) async def retrieve( self, @@ -216,32 +212,32 @@ def list( ) -class ProofOfAuthorizationRequestsResourceWithRawResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: +class ProofOfAuthorizationRequestsWithRawResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class AsyncProofOfAuthorizationRequestsResourceWithRawResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: +class AsyncProofOfAuthorizationRequestsWithRawResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class ProofOfAuthorizationRequestsResourceWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: +class ProofOfAuthorizationRequestsWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = to_streamed_response_wrapper( @@ -252,8 +248,8 @@ def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests ) -class AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: +class AsyncProofOfAuthorizationRequestsWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 93980b4d7..9f8d2bb0c 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import real_time_decision_action_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,26 +13,21 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from .._base_client import make_request_options from ..types.real_time_decision import RealTimeDecision -__all__ = ["RealTimeDecisionsResource", "AsyncRealTimeDecisionsResource"] +__all__ = ["RealTimeDecisions", "AsyncRealTimeDecisions"] -class RealTimeDecisionsResource(SyncAPIResource): +class RealTimeDecisions(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimeDecisionsResourceWithRawResponse: - return RealTimeDecisionsResourceWithRawResponse(self) + def with_raw_response(self) -> RealTimeDecisionsWithRawResponse: + return RealTimeDecisionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimeDecisionsResourceWithStreamingResponse: - return RealTimeDecisionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimeDecisionsWithStreamingResponse: + return RealTimeDecisionsWithStreamingResponse(self) def retrieve( self, @@ -136,14 +132,14 @@ def action( ) -class AsyncRealTimeDecisionsResource(AsyncAPIResource): +class AsyncRealTimeDecisions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimeDecisionsResourceWithRawResponse: - return AsyncRealTimeDecisionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimeDecisionsWithRawResponse: + return AsyncRealTimeDecisionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimeDecisionsResourceWithStreamingResponse: - return AsyncRealTimeDecisionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimeDecisionsWithStreamingResponse: + return AsyncRealTimeDecisionsWithStreamingResponse(self) async def retrieve( self, @@ -248,32 +244,32 @@ async def action( ) -class RealTimeDecisionsResourceWithRawResponse: - def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: +class RealTimeDecisionsWithRawResponse: + def __init__(self, real_time_decisions: RealTimeDecisions) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = to_raw_response_wrapper( + self.action = _legacy_response.to_raw_response_wrapper( real_time_decisions.action, ) -class AsyncRealTimeDecisionsResourceWithRawResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: +class AsyncRealTimeDecisionsWithRawResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = async_to_raw_response_wrapper( + self.action = _legacy_response.async_to_raw_response_wrapper( real_time_decisions.action, ) -class RealTimeDecisionsResourceWithStreamingResponse: - def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: +class RealTimeDecisionsWithStreamingResponse: + def __init__(self, real_time_decisions: RealTimeDecisions) -> None: self._real_time_decisions = real_time_decisions self.retrieve = to_streamed_response_wrapper( @@ -284,8 +280,8 @@ def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: ) -class AsyncRealTimeDecisionsResourceWithStreamingResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: +class AsyncRealTimeDecisionsWithStreamingResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: self._real_time_decisions = real_time_decisions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index a5e170678..3cef6e5ec 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -7,6 +7,7 @@ import httpx +from .. import _legacy_response from ..types import ( real_time_payments_request_for_payment_list_params, real_time_payments_request_for_payment_create_params, @@ -18,27 +19,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment -__all__ = ["RealTimePaymentsRequestForPaymentsResource", "AsyncRealTimePaymentsRequestForPaymentsResource"] +__all__ = ["RealTimePaymentsRequestForPayments", "AsyncRealTimePaymentsRequestForPayments"] -class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): +class RealTimePaymentsRequestForPayments(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: - return RealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsWithRawResponse: + return RealTimePaymentsRequestForPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - return RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsWithStreamingResponse: + return RealTimePaymentsRequestForPaymentsWithStreamingResponse(self) def create( self, @@ -212,14 +208,14 @@ def list( ) -class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): +class AsyncRealTimePaymentsRequestForPayments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: - return AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: + return AsyncRealTimePaymentsRequestForPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - return AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: + return AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse(self) async def create( self, @@ -393,40 +389,38 @@ def list( ) -class RealTimePaymentsRequestForPaymentsResourceWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: +class RealTimePaymentsRequestForPaymentsWithRawResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: - def __init__( - self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource - ) -> None: +class AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: + def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: +class RealTimePaymentsRequestForPaymentsWithStreamingResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = to_streamed_response_wrapper( @@ -440,10 +434,8 @@ def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequ ) -class AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - def __init__( - self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource - ) -> None: +class AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: + def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index b62b0d10f..5294ce28d 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,27 +13,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer -__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] +__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] -class RealTimePaymentsTransfersResource(SyncAPIResource): +class RealTimePaymentsTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: - return RealTimePaymentsTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: + return RealTimePaymentsTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: - return RealTimePaymentsTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: + return RealTimePaymentsTransfersWithStreamingResponse(self) def create( self, @@ -231,14 +227,14 @@ def list( ) -class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): +class AsyncRealTimePaymentsTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: + return AsyncRealTimePaymentsTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: + return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) async def create( self, @@ -437,38 +433,38 @@ def list( ) -class RealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: +class RealTimePaymentsTransfersWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( real_time_payments_transfers.list, ) -class AsyncRealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: +class AsyncRealTimePaymentsTransfersWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( real_time_payments_transfers.list, ) -class RealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: +class RealTimePaymentsTransfersWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = to_streamed_response_wrapper( @@ -482,8 +478,8 @@ def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResour ) -class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: +class AsyncRealTimePaymentsTransfersWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index f485b4d2e..d31389f3b 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import routing_number_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options -from ..types.routing_number_list_response import RoutingNumberListResponse +from ..types.routing_number import RoutingNumber -__all__ = ["RoutingNumbersResource", "AsyncRoutingNumbersResource"] +__all__ = ["RoutingNumbers", "AsyncRoutingNumbers"] -class RoutingNumbersResource(SyncAPIResource): +class RoutingNumbers(SyncAPIResource): @cached_property - def with_raw_response(self) -> RoutingNumbersResourceWithRawResponse: - return RoutingNumbersResourceWithRawResponse(self) + def with_raw_response(self) -> RoutingNumbersWithRawResponse: + return RoutingNumbersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RoutingNumbersResourceWithStreamingResponse: - return RoutingNumbersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> RoutingNumbersWithStreamingResponse: + return RoutingNumbersWithStreamingResponse(self) def list( self, @@ -43,7 +39,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[RoutingNumberListResponse]: + ) -> SyncPage[RoutingNumber]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -68,7 +64,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=SyncPage[RoutingNumberListResponse], + page=SyncPage[RoutingNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -83,18 +79,18 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumberListResponse, + model=RoutingNumber, ) -class AsyncRoutingNumbersResource(AsyncAPIResource): +class AsyncRoutingNumbers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRoutingNumbersResourceWithRawResponse: - return AsyncRoutingNumbersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncRoutingNumbersWithRawResponse: + return AsyncRoutingNumbersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingResponse: - return AsyncRoutingNumbersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRoutingNumbersWithStreamingResponse: + return AsyncRoutingNumbersWithStreamingResponse(self) def list( self, @@ -108,7 +104,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: + ) -> AsyncPaginator[RoutingNumber, AsyncPage[RoutingNumber]]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -133,7 +129,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=AsyncPage[RoutingNumberListResponse], + page=AsyncPage[RoutingNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -148,30 +144,30 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumberListResponse, + model=RoutingNumber, ) -class RoutingNumbersResourceWithRawResponse: - def __init__(self, routing_numbers: RoutingNumbersResource) -> None: +class RoutingNumbersWithRawResponse: + def __init__(self, routing_numbers: RoutingNumbers) -> None: self._routing_numbers = routing_numbers - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( routing_numbers.list, ) -class AsyncRoutingNumbersResourceWithRawResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: +class AsyncRoutingNumbersWithRawResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: self._routing_numbers = routing_numbers - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( routing_numbers.list, ) -class RoutingNumbersResourceWithStreamingResponse: - def __init__(self, routing_numbers: RoutingNumbersResource) -> None: +class RoutingNumbersWithStreamingResponse: + def __init__(self, routing_numbers: RoutingNumbers) -> None: self._routing_numbers = routing_numbers self.list = to_streamed_response_wrapper( @@ -179,8 +175,8 @@ def __init__(self, routing_numbers: RoutingNumbersResource) -> None: ) -class AsyncRoutingNumbersResourceWithStreamingResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: +class AsyncRoutingNumbersWithStreamingResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: self._routing_numbers = routing_numbers self.list = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index e3c4105b5..ce4ec0a36 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -1,383 +1,285 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .cards import ( + Cards, + AsyncCards, + CardsWithRawResponse, + AsyncCardsWithRawResponse, + CardsWithStreamingResponse, + AsyncCardsWithStreamingResponse, +) from .programs import ( - ProgramsResource, - AsyncProgramsResource, - ProgramsResourceWithRawResponse, - AsyncProgramsResourceWithRawResponse, - ProgramsResourceWithStreamingResponse, - AsyncProgramsResourceWithStreamingResponse, + Programs, + AsyncPrograms, + ProgramsWithRawResponse, + AsyncProgramsWithRawResponse, + ProgramsWithStreamingResponse, + AsyncProgramsWithStreamingResponse, ) from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, + Documents, + AsyncDocuments, + DocumentsWithRawResponse, + AsyncDocumentsWithRawResponse, + DocumentsWithStreamingResponse, + AsyncDocumentsWithStreamingResponse, ) from .simulations import ( - SimulationsResource, - AsyncSimulationsResource, - SimulationsResourceWithRawResponse, - AsyncSimulationsResourceWithRawResponse, - SimulationsResourceWithStreamingResponse, - AsyncSimulationsResourceWithStreamingResponse, + Simulations, + AsyncSimulations, + SimulationsWithRawResponse, + AsyncSimulationsWithRawResponse, + SimulationsWithStreamingResponse, + AsyncSimulationsWithStreamingResponse, ) from .card_refunds import ( - CardRefundsResource, - AsyncCardRefundsResource, - CardRefundsResourceWithRawResponse, - AsyncCardRefundsResourceWithRawResponse, - CardRefundsResourceWithStreamingResponse, - AsyncCardRefundsResourceWithStreamingResponse, + CardRefunds, + AsyncCardRefunds, + CardRefundsWithRawResponse, + AsyncCardRefundsWithRawResponse, + CardRefundsWithStreamingResponse, + AsyncCardRefundsWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfersResource, - AsyncACHTransfersResource, - ACHTransfersResourceWithRawResponse, - AsyncACHTransfersResourceWithRawResponse, - ACHTransfersResourceWithStreamingResponse, - AsyncACHTransfersResourceWithStreamingResponse, + ACHTransfers, + AsyncACHTransfers, + ACHTransfersWithRawResponse, + AsyncACHTransfersWithRawResponse, + ACHTransfersWithStreamingResponse, + AsyncACHTransfersWithStreamingResponse, ) from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, -) -from .card_reversals import ( - CardReversalsResource, - AsyncCardReversalsResource, - CardReversalsResourceWithRawResponse, - AsyncCardReversalsResourceWithRawResponse, - CardReversalsResourceWithStreamingResponse, - AsyncCardReversalsResourceWithStreamingResponse, + CardDisputes, + AsyncCardDisputes, + CardDisputesWithRawResponse, + AsyncCardDisputesWithRawResponse, + CardDisputesWithStreamingResponse, + AsyncCardDisputesWithStreamingResponse, ) from .check_deposits import ( - CheckDepositsResource, - AsyncCheckDepositsResource, - CheckDepositsResourceWithRawResponse, - AsyncCheckDepositsResourceWithRawResponse, - CheckDepositsResourceWithStreamingResponse, - AsyncCheckDepositsResourceWithStreamingResponse, + CheckDeposits, + AsyncCheckDeposits, + CheckDepositsWithRawResponse, + AsyncCheckDepositsWithRawResponse, + CheckDepositsWithStreamingResponse, + AsyncCheckDepositsWithStreamingResponse, ) from .physical_cards import ( - PhysicalCardsResource, - AsyncPhysicalCardsResource, - PhysicalCardsResourceWithRawResponse, - AsyncPhysicalCardsResourceWithRawResponse, - PhysicalCardsResourceWithStreamingResponse, - AsyncPhysicalCardsResourceWithStreamingResponse, + PhysicalCards, + AsyncPhysicalCards, + PhysicalCardsWithRawResponse, + AsyncPhysicalCardsWithRawResponse, + PhysicalCardsWithStreamingResponse, + AsyncPhysicalCardsWithStreamingResponse, ) from .wire_transfers import ( - WireTransfersResource, - AsyncWireTransfersResource, - WireTransfersResourceWithRawResponse, - AsyncWireTransfersResourceWithRawResponse, - WireTransfersResourceWithStreamingResponse, - AsyncWireTransfersResourceWithStreamingResponse, -) -from .card_increments import ( - CardIncrementsResource, - AsyncCardIncrementsResource, - CardIncrementsResourceWithRawResponse, - AsyncCardIncrementsResourceWithRawResponse, - CardIncrementsResourceWithStreamingResponse, - AsyncCardIncrementsResourceWithStreamingResponse, + WireTransfers, + AsyncWireTransfers, + WireTransfersWithRawResponse, + AsyncWireTransfersWithRawResponse, + WireTransfersWithStreamingResponse, + AsyncWireTransfersWithStreamingResponse, ) from .check_transfers import ( - CheckTransfersResource, - AsyncCheckTransfersResource, - CheckTransfersResourceWithRawResponse, - AsyncCheckTransfersResourceWithRawResponse, - CheckTransfersResourceWithStreamingResponse, - AsyncCheckTransfersResourceWithStreamingResponse, -) -from .card_settlements import ( - CardSettlementsResource, - AsyncCardSettlementsResource, - CardSettlementsResourceWithRawResponse, - AsyncCardSettlementsResourceWithRawResponse, - CardSettlementsResourceWithStreamingResponse, - AsyncCardSettlementsResourceWithStreamingResponse, + CheckTransfers, + AsyncCheckTransfers, + CheckTransfersWithRawResponse, + AsyncCheckTransfersWithRawResponse, + CheckTransfersWithStreamingResponse, + AsyncCheckTransfersWithStreamingResponse, ) from .account_transfers import ( - AccountTransfersResource, - AsyncAccountTransfersResource, - AccountTransfersResourceWithRawResponse, - AsyncAccountTransfersResourceWithRawResponse, - AccountTransfersResourceWithStreamingResponse, - AsyncAccountTransfersResourceWithStreamingResponse, + AccountTransfers, + AsyncAccountTransfers, + AccountTransfersWithRawResponse, + AsyncAccountTransfersWithRawResponse, + AccountTransfersWithStreamingResponse, + AsyncAccountTransfersWithStreamingResponse, ) from .interest_payments import ( - InterestPaymentsResource, - AsyncInterestPaymentsResource, - InterestPaymentsResourceWithRawResponse, - AsyncInterestPaymentsResourceWithRawResponse, - InterestPaymentsResourceWithStreamingResponse, - AsyncInterestPaymentsResourceWithStreamingResponse, + InterestPayments, + AsyncInterestPayments, + InterestPaymentsWithRawResponse, + AsyncInterestPaymentsWithRawResponse, + InterestPaymentsWithStreamingResponse, + AsyncInterestPaymentsWithStreamingResponse, ) from .account_statements import ( - AccountStatementsResource, - AsyncAccountStatementsResource, - AccountStatementsResourceWithRawResponse, - AsyncAccountStatementsResourceWithRawResponse, - AccountStatementsResourceWithStreamingResponse, - AsyncAccountStatementsResourceWithStreamingResponse, -) -from .card_authorizations import ( - CardAuthorizationsResource, - AsyncCardAuthorizationsResource, - CardAuthorizationsResourceWithRawResponse, - AsyncCardAuthorizationsResourceWithRawResponse, - CardAuthorizationsResourceWithStreamingResponse, - AsyncCardAuthorizationsResourceWithStreamingResponse, + AccountStatements, + AsyncAccountStatements, + AccountStatementsWithRawResponse, + AsyncAccountStatementsWithRawResponse, + AccountStatementsWithStreamingResponse, + AsyncAccountStatementsWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, -) -from .inbound_ach_transfers import ( - InboundACHTransfersResource, - AsyncInboundACHTransfersResource, - InboundACHTransfersResourceWithRawResponse, - AsyncInboundACHTransfersResourceWithRawResponse, - InboundACHTransfersResourceWithStreamingResponse, - AsyncInboundACHTransfersResourceWithStreamingResponse, + InboundFundsHolds, + AsyncInboundFundsHolds, + InboundFundsHoldsWithRawResponse, + AsyncInboundFundsHoldsWithRawResponse, + InboundFundsHoldsWithStreamingResponse, + AsyncInboundFundsHoldsWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDepositsResource, - AsyncInboundCheckDepositsResource, - InboundCheckDepositsResourceWithRawResponse, - AsyncInboundCheckDepositsResourceWithRawResponse, - InboundCheckDepositsResourceWithStreamingResponse, - AsyncInboundCheckDepositsResourceWithStreamingResponse, -) -from .inbound_wire_transfers import ( - InboundWireTransfersResource, - AsyncInboundWireTransfersResource, - InboundWireTransfersResourceWithRawResponse, - AsyncInboundWireTransfersResourceWithRawResponse, - InboundWireTransfersResourceWithStreamingResponse, - AsyncInboundWireTransfersResourceWithStreamingResponse, -) -from .card_fuel_confirmations import ( - CardFuelConfirmationsResource, - AsyncCardFuelConfirmationsResource, - CardFuelConfirmationsResourceWithRawResponse, - AsyncCardFuelConfirmationsResourceWithRawResponse, - CardFuelConfirmationsResourceWithStreamingResponse, - AsyncCardFuelConfirmationsResourceWithStreamingResponse, + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfersResource, - AsyncRealTimePaymentsTransfersResource, - RealTimePaymentsTransfersResourceWithRawResponse, - AsyncRealTimePaymentsTransfersResourceWithRawResponse, - RealTimePaymentsTransfersResourceWithStreamingResponse, - AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, + RealTimePaymentsTransfers, + AsyncRealTimePaymentsTransfers, + RealTimePaymentsTransfersWithRawResponse, + AsyncRealTimePaymentsTransfersWithRawResponse, + RealTimePaymentsTransfersWithStreamingResponse, + AsyncRealTimePaymentsTransfersWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequestsResource, - AsyncDigitalWalletTokenRequestsResource, - DigitalWalletTokenRequestsResourceWithRawResponse, - AsyncDigitalWalletTokenRequestsResourceWithRawResponse, - DigitalWalletTokenRequestsResourceWithStreamingResponse, - AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, -) -from .card_authorization_expirations import ( - CardAuthorizationExpirationsResource, - AsyncCardAuthorizationExpirationsResource, - CardAuthorizationExpirationsResourceWithRawResponse, - AsyncCardAuthorizationExpirationsResourceWithRawResponse, - CardAuthorizationExpirationsResourceWithStreamingResponse, - AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, + DigitalWalletTokenRequests, + AsyncDigitalWalletTokenRequests, + DigitalWalletTokenRequestsWithRawResponse, + AsyncDigitalWalletTokenRequestsWithRawResponse, + DigitalWalletTokenRequestsWithStreamingResponse, + AsyncDigitalWalletTokenRequestsWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequestsResource, - AsyncInboundWireDrawdownRequestsResource, - InboundWireDrawdownRequestsResourceWithRawResponse, - AsyncInboundWireDrawdownRequestsResourceWithRawResponse, - InboundWireDrawdownRequestsResourceWithStreamingResponse, - AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, + InboundWireDrawdownRequests, + AsyncInboundWireDrawdownRequests, + InboundWireDrawdownRequestsWithRawResponse, + AsyncInboundWireDrawdownRequestsWithRawResponse, + InboundWireDrawdownRequestsWithStreamingResponse, + AsyncInboundWireDrawdownRequestsWithStreamingResponse, ) -from .inbound_real_time_payments_transfers import ( - InboundRealTimePaymentsTransfersResource, - AsyncInboundRealTimePaymentsTransfersResource, - InboundRealTimePaymentsTransfersResourceWithRawResponse, - AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, - InboundRealTimePaymentsTransfersResourceWithStreamingResponse, - AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfers, + AsyncInboundInternationalACHTransfers, + InboundInternationalACHTransfersWithRawResponse, + AsyncInboundInternationalACHTransfersWithRawResponse, + InboundInternationalACHTransfersWithStreamingResponse, + AsyncInboundInternationalACHTransfersWithStreamingResponse, ) __all__ = [ - "AccountTransfersResource", - "AsyncAccountTransfersResource", - "AccountTransfersResourceWithRawResponse", - "AsyncAccountTransfersResourceWithRawResponse", - "AccountTransfersResourceWithStreamingResponse", - "AsyncAccountTransfersResourceWithStreamingResponse", - "InboundACHTransfersResource", - "AsyncInboundACHTransfersResource", - "InboundACHTransfersResourceWithRawResponse", - "AsyncInboundACHTransfersResourceWithRawResponse", - "InboundACHTransfersResourceWithStreamingResponse", - "AsyncInboundACHTransfersResourceWithStreamingResponse", - "ACHTransfersResource", - "AsyncACHTransfersResource", - "ACHTransfersResourceWithRawResponse", - "AsyncACHTransfersResourceWithRawResponse", - "ACHTransfersResourceWithStreamingResponse", - "AsyncACHTransfersResourceWithStreamingResponse", - "CheckTransfersResource", - "AsyncCheckTransfersResource", - "CheckTransfersResourceWithRawResponse", - "AsyncCheckTransfersResourceWithRawResponse", - "CheckTransfersResourceWithStreamingResponse", - "AsyncCheckTransfersResourceWithStreamingResponse", - "InboundCheckDepositsResource", - "AsyncInboundCheckDepositsResource", - "InboundCheckDepositsResourceWithRawResponse", - "AsyncInboundCheckDepositsResourceWithRawResponse", - "InboundCheckDepositsResourceWithStreamingResponse", - "AsyncInboundCheckDepositsResourceWithStreamingResponse", - "CheckDepositsResource", - "AsyncCheckDepositsResource", - "CheckDepositsResourceWithRawResponse", - "AsyncCheckDepositsResourceWithRawResponse", - "CheckDepositsResourceWithStreamingResponse", - "AsyncCheckDepositsResourceWithStreamingResponse", - "InboundWireTransfersResource", - "AsyncInboundWireTransfersResource", - "InboundWireTransfersResourceWithRawResponse", - "AsyncInboundWireTransfersResourceWithRawResponse", - "InboundWireTransfersResourceWithStreamingResponse", - "AsyncInboundWireTransfersResourceWithStreamingResponse", - "WireTransfersResource", - "AsyncWireTransfersResource", - "WireTransfersResourceWithRawResponse", - "AsyncWireTransfersResourceWithRawResponse", - "WireTransfersResourceWithStreamingResponse", - "AsyncWireTransfersResourceWithStreamingResponse", - "InboundWireDrawdownRequestsResource", - "AsyncInboundWireDrawdownRequestsResource", - "InboundWireDrawdownRequestsResourceWithRawResponse", - "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", - "InboundWireDrawdownRequestsResourceWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", - "InboundRealTimePaymentsTransfersResource", - "AsyncInboundRealTimePaymentsTransfersResource", - "InboundRealTimePaymentsTransfersResourceWithRawResponse", - "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", - "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", - "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", - "InboundFundsHoldsResource", - "AsyncInboundFundsHoldsResource", - "InboundFundsHoldsResourceWithRawResponse", - "AsyncInboundFundsHoldsResourceWithRawResponse", - "InboundFundsHoldsResourceWithStreamingResponse", - "AsyncInboundFundsHoldsResourceWithStreamingResponse", - "RealTimePaymentsTransfersResource", - "AsyncRealTimePaymentsTransfersResource", - "RealTimePaymentsTransfersResourceWithRawResponse", - "AsyncRealTimePaymentsTransfersResourceWithRawResponse", - "RealTimePaymentsTransfersResourceWithStreamingResponse", - "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", - "CardAuthorizationsResource", - "AsyncCardAuthorizationsResource", - "CardAuthorizationsResourceWithRawResponse", - "AsyncCardAuthorizationsResourceWithRawResponse", - "CardAuthorizationsResourceWithStreamingResponse", - "AsyncCardAuthorizationsResourceWithStreamingResponse", - "CardSettlementsResource", - "AsyncCardSettlementsResource", - "CardSettlementsResourceWithRawResponse", - "AsyncCardSettlementsResourceWithRawResponse", - "CardSettlementsResourceWithStreamingResponse", - "AsyncCardSettlementsResourceWithStreamingResponse", - "CardReversalsResource", - "AsyncCardReversalsResource", - "CardReversalsResourceWithRawResponse", - "AsyncCardReversalsResourceWithRawResponse", - "CardReversalsResourceWithStreamingResponse", - "AsyncCardReversalsResourceWithStreamingResponse", - "CardIncrementsResource", - "AsyncCardIncrementsResource", - "CardIncrementsResourceWithRawResponse", - "AsyncCardIncrementsResourceWithRawResponse", - "CardIncrementsResourceWithStreamingResponse", - "AsyncCardIncrementsResourceWithStreamingResponse", - "CardAuthorizationExpirationsResource", - "AsyncCardAuthorizationExpirationsResource", - "CardAuthorizationExpirationsResourceWithRawResponse", - "AsyncCardAuthorizationExpirationsResourceWithRawResponse", - "CardAuthorizationExpirationsResourceWithStreamingResponse", - "AsyncCardAuthorizationExpirationsResourceWithStreamingResponse", - "CardFuelConfirmationsResource", - "AsyncCardFuelConfirmationsResource", - "CardFuelConfirmationsResourceWithRawResponse", - "AsyncCardFuelConfirmationsResourceWithRawResponse", - "CardFuelConfirmationsResourceWithStreamingResponse", - "AsyncCardFuelConfirmationsResourceWithStreamingResponse", - "CardRefundsResource", - "AsyncCardRefundsResource", - "CardRefundsResourceWithRawResponse", - "AsyncCardRefundsResourceWithRawResponse", - "CardRefundsResourceWithStreamingResponse", - "AsyncCardRefundsResourceWithStreamingResponse", - "CardDisputesResource", - "AsyncCardDisputesResource", - "CardDisputesResourceWithRawResponse", - "AsyncCardDisputesResourceWithRawResponse", - "CardDisputesResourceWithStreamingResponse", - "AsyncCardDisputesResourceWithStreamingResponse", - "DigitalWalletTokenRequestsResource", - "AsyncDigitalWalletTokenRequestsResource", - "DigitalWalletTokenRequestsResourceWithRawResponse", - "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", - "DigitalWalletTokenRequestsResourceWithStreamingResponse", - "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", - "PhysicalCardsResource", - "AsyncPhysicalCardsResource", - "PhysicalCardsResourceWithRawResponse", - "AsyncPhysicalCardsResourceWithRawResponse", - "PhysicalCardsResourceWithStreamingResponse", - "AsyncPhysicalCardsResourceWithStreamingResponse", - "InterestPaymentsResource", - "AsyncInterestPaymentsResource", - "InterestPaymentsResourceWithRawResponse", - "AsyncInterestPaymentsResourceWithRawResponse", - "InterestPaymentsResourceWithStreamingResponse", - "AsyncInterestPaymentsResourceWithStreamingResponse", - "AccountStatementsResource", - "AsyncAccountStatementsResource", - "AccountStatementsResourceWithRawResponse", - "AsyncAccountStatementsResourceWithRawResponse", - "AccountStatementsResourceWithStreamingResponse", - "AsyncAccountStatementsResourceWithStreamingResponse", - "DocumentsResource", - "AsyncDocumentsResource", - "DocumentsResourceWithRawResponse", - "AsyncDocumentsResourceWithRawResponse", - "DocumentsResourceWithStreamingResponse", - "AsyncDocumentsResourceWithStreamingResponse", - "ProgramsResource", - "AsyncProgramsResource", - "ProgramsResourceWithRawResponse", - "AsyncProgramsResourceWithRawResponse", - "ProgramsResourceWithStreamingResponse", - "AsyncProgramsResourceWithStreamingResponse", - "SimulationsResource", - "AsyncSimulationsResource", - "SimulationsResourceWithRawResponse", - "AsyncSimulationsResourceWithRawResponse", - "SimulationsResourceWithStreamingResponse", - "AsyncSimulationsResourceWithStreamingResponse", + "AccountTransfers", + "AsyncAccountTransfers", + "AccountTransfersWithRawResponse", + "AsyncAccountTransfersWithRawResponse", + "AccountTransfersWithStreamingResponse", + "AsyncAccountTransfersWithStreamingResponse", + "AccountStatements", + "AsyncAccountStatements", + "AccountStatementsWithRawResponse", + "AsyncAccountStatementsWithRawResponse", + "AccountStatementsWithStreamingResponse", + "AsyncAccountStatementsWithStreamingResponse", + "ACHTransfers", + "AsyncACHTransfers", + "ACHTransfersWithRawResponse", + "AsyncACHTransfersWithRawResponse", + "ACHTransfersWithStreamingResponse", + "AsyncACHTransfersWithStreamingResponse", + "CardDisputes", + "AsyncCardDisputes", + "CardDisputesWithRawResponse", + "AsyncCardDisputesWithRawResponse", + "CardDisputesWithStreamingResponse", + "AsyncCardDisputesWithStreamingResponse", + "CardRefunds", + "AsyncCardRefunds", + "CardRefundsWithRawResponse", + "AsyncCardRefundsWithRawResponse", + "CardRefundsWithStreamingResponse", + "AsyncCardRefundsWithStreamingResponse", + "CheckTransfers", + "AsyncCheckTransfers", + "CheckTransfersWithRawResponse", + "AsyncCheckTransfersWithRawResponse", + "CheckTransfersWithStreamingResponse", + "AsyncCheckTransfersWithStreamingResponse", + "Documents", + "AsyncDocuments", + "DocumentsWithRawResponse", + "AsyncDocumentsWithRawResponse", + "DocumentsWithStreamingResponse", + "AsyncDocumentsWithStreamingResponse", + "DigitalWalletTokenRequests", + "AsyncDigitalWalletTokenRequests", + "DigitalWalletTokenRequestsWithRawResponse", + "AsyncDigitalWalletTokenRequestsWithRawResponse", + "DigitalWalletTokenRequestsWithStreamingResponse", + "AsyncDigitalWalletTokenRequestsWithStreamingResponse", + "CheckDeposits", + "AsyncCheckDeposits", + "CheckDepositsWithRawResponse", + "AsyncCheckDepositsWithRawResponse", + "CheckDepositsWithStreamingResponse", + "AsyncCheckDepositsWithStreamingResponse", + "Programs", + "AsyncPrograms", + "ProgramsWithRawResponse", + "AsyncProgramsWithRawResponse", + "ProgramsWithStreamingResponse", + "AsyncProgramsWithStreamingResponse", + "InboundWireDrawdownRequests", + "AsyncInboundWireDrawdownRequests", + "InboundWireDrawdownRequestsWithRawResponse", + "AsyncInboundWireDrawdownRequestsWithRawResponse", + "InboundWireDrawdownRequestsWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsWithStreamingResponse", + "InboundFundsHolds", + "AsyncInboundFundsHolds", + "InboundFundsHoldsWithRawResponse", + "AsyncInboundFundsHoldsWithRawResponse", + "InboundFundsHoldsWithStreamingResponse", + "AsyncInboundFundsHoldsWithStreamingResponse", + "InterestPayments", + "AsyncInterestPayments", + "InterestPaymentsWithRawResponse", + "AsyncInterestPaymentsWithRawResponse", + "InterestPaymentsWithStreamingResponse", + "AsyncInterestPaymentsWithStreamingResponse", + "WireTransfers", + "AsyncWireTransfers", + "WireTransfersWithRawResponse", + "AsyncWireTransfersWithRawResponse", + "WireTransfersWithStreamingResponse", + "AsyncWireTransfersWithStreamingResponse", + "Cards", + "AsyncCards", + "CardsWithRawResponse", + "AsyncCardsWithRawResponse", + "CardsWithStreamingResponse", + "AsyncCardsWithStreamingResponse", + "RealTimePaymentsTransfers", + "AsyncRealTimePaymentsTransfers", + "RealTimePaymentsTransfersWithRawResponse", + "AsyncRealTimePaymentsTransfersWithRawResponse", + "RealTimePaymentsTransfersWithStreamingResponse", + "AsyncRealTimePaymentsTransfersWithStreamingResponse", + "PhysicalCards", + "AsyncPhysicalCards", + "PhysicalCardsWithRawResponse", + "AsyncPhysicalCardsWithRawResponse", + "PhysicalCardsWithStreamingResponse", + "AsyncPhysicalCardsWithStreamingResponse", + "InboundCheckDeposits", + "AsyncInboundCheckDeposits", + "InboundCheckDepositsWithRawResponse", + "AsyncInboundCheckDepositsWithRawResponse", + "InboundCheckDepositsWithStreamingResponse", + "AsyncInboundCheckDepositsWithStreamingResponse", + "InboundInternationalACHTransfers", + "AsyncInboundInternationalACHTransfers", + "InboundInternationalACHTransfersWithRawResponse", + "AsyncInboundInternationalACHTransfersWithRawResponse", + "InboundInternationalACHTransfersWithStreamingResponse", + "AsyncInboundInternationalACHTransfersWithStreamingResponse", + "Simulations", + "AsyncSimulations", + "SimulationsWithRawResponse", + "AsyncSimulationsWithRawResponse", + "SimulationsWithStreamingResponse", + "AsyncSimulationsWithStreamingResponse", ] diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index 85080b70d..5e682e3fd 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import account_statement_create_params from ...types.account_statement import AccountStatement -__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] +__all__ = ["AccountStatements", "AsyncAccountStatements"] -class AccountStatementsResource(SyncAPIResource): +class AccountStatements(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: - return AccountStatementsResourceWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsWithRawResponse: + return AccountStatementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: - return AccountStatementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: + return AccountStatementsWithStreamingResponse(self) def create( self, @@ -78,14 +74,14 @@ def create( ) -class AsyncAccountStatementsResource(AsyncAPIResource): +class AsyncAccountStatements(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: - return AsyncAccountStatementsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: + return AsyncAccountStatementsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: - return AsyncAccountStatementsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: + return AsyncAccountStatementsWithStreamingResponse(self) async def create( self, @@ -132,26 +128,26 @@ async def create( ) -class AccountStatementsResourceWithRawResponse: - def __init__(self, account_statements: AccountStatementsResource) -> None: +class AccountStatementsWithRawResponse: + def __init__(self, account_statements: AccountStatements) -> None: self._account_statements = account_statements - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( account_statements.create, ) -class AsyncAccountStatementsResourceWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: +class AsyncAccountStatementsWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatements) -> None: self._account_statements = account_statements - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( account_statements.create, ) -class AccountStatementsResourceWithStreamingResponse: - def __init__(self, account_statements: AccountStatementsResource) -> None: +class AccountStatementsWithStreamingResponse: + def __init__(self, account_statements: AccountStatements) -> None: self._account_statements = account_statements self.create = to_streamed_response_wrapper( @@ -159,8 +155,8 @@ def __init__(self, account_statements: AccountStatementsResource) -> None: ) -class AsyncAccountStatementsResourceWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: +class AsyncAccountStatementsWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatements) -> None: self._account_statements = account_statements self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 7495451ca..ef347df1c 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -4,29 +4,25 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.account_transfer import AccountTransfer -__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] +__all__ = ["AccountTransfers", "AsyncAccountTransfers"] -class AccountTransfersResource(SyncAPIResource): +class AccountTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: - return AccountTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersWithRawResponse: + return AccountTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: - return AccountTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: + return AccountTransfersWithStreamingResponse(self) def complete( self, @@ -76,14 +72,14 @@ def complete( ) -class AsyncAccountTransfersResource(AsyncAPIResource): +class AsyncAccountTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: - return AsyncAccountTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: + return AsyncAccountTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: - return AsyncAccountTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: + return AsyncAccountTransfersWithStreamingResponse(self) async def complete( self, @@ -133,26 +129,26 @@ async def complete( ) -class AccountTransfersResourceWithRawResponse: - def __init__(self, account_transfers: AccountTransfersResource) -> None: +class AccountTransfersWithRawResponse: + def __init__(self, account_transfers: AccountTransfers) -> None: self._account_transfers = account_transfers - self.complete = to_raw_response_wrapper( + self.complete = _legacy_response.to_raw_response_wrapper( account_transfers.complete, ) -class AsyncAccountTransfersResourceWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: +class AsyncAccountTransfersWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfers) -> None: self._account_transfers = account_transfers - self.complete = async_to_raw_response_wrapper( + self.complete = _legacy_response.async_to_raw_response_wrapper( account_transfers.complete, ) -class AccountTransfersResourceWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfersResource) -> None: +class AccountTransfersWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfers) -> None: self._account_transfers = account_transfers self.complete = to_streamed_response_wrapper( @@ -160,8 +156,8 @@ def __init__(self, account_transfers: AccountTransfersResource) -> None: ) -class AsyncAccountTransfersResourceWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: +class AsyncAccountTransfersWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfers) -> None: self._account_transfers = account_transfers self.complete = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 21c1c0c2a..c0247fa89 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -2,10 +2,13 @@ from __future__ import annotations +from typing import Union +from datetime import datetime from typing_extensions import Literal import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -13,32 +16,41 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options -from ...types.simulations import ach_transfer_return_params, ach_transfer_create_notification_of_change_params +from ...types.simulations import ( + ach_transfer_return_params, + ach_transfer_create_inbound_params, + ach_transfer_notification_of_change_params, +) from ...types.ach_transfer import ACHTransfer +from ...types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] +__all__ = ["ACHTransfers", "AsyncACHTransfers"] -class ACHTransfersResource(SyncAPIResource): +class ACHTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: - return ACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersWithRawResponse: + return ACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: - return ACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: + return ACHTransfersWithStreamingResponse(self) - def acknowledge( + def create_inbound( self, - ach_transfer_id: str, *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -46,17 +58,43 @@ def acknowledge( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> ACHTransfer: - """ - Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the - Federal Reserve. This transfer must first have a `status` of `submitted` . In - production, the Federal Reserve generally acknowledges submitted ACH files - within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal - Reserve, this endpoint allows you to skip that delay and add the acknowledgment - subresource to the ACH Transfer. + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. Args: - ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. extra_headers: Send extra headers @@ -68,10 +106,23 @@ def acknowledge( idempotency_key: Specify a custom idempotency key for this request """ - if not ach_transfer_id: - raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", + "/simulations/inbound_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + }, + ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -79,10 +130,10 @@ def acknowledge( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=ACHTransfer, + cast_to=InboundACHTransfer, ) - def create_notification_of_change( + def notification_of_change( self, ach_transfer_id: str, *, @@ -176,13 +227,13 @@ def create_notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", body=maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, + ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -511,19 +562,28 @@ def submit( ) -class AsyncACHTransfersResource(AsyncAPIResource): +class AsyncACHTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: - return AsyncACHTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: + return AsyncACHTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: - return AsyncACHTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: + return AsyncACHTransfersWithStreamingResponse(self) - async def acknowledge( + async def create_inbound( self, - ach_transfer_id: str, *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -531,17 +591,43 @@ async def acknowledge( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> ACHTransfer: - """ - Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the - Federal Reserve. This transfer must first have a `status` of `submitted` . In - production, the Federal Reserve generally acknowledges submitted ACH files - within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal - Reserve, this endpoint allows you to skip that delay and add the acknowledgment - subresource to the ACH Transfer. + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. Args: - ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. extra_headers: Send extra headers @@ -553,10 +639,23 @@ async def acknowledge( idempotency_key: Specify a custom idempotency key for this request """ - if not ach_transfer_id: - raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", + "/simulations/inbound_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + }, + ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -564,10 +663,10 @@ async def acknowledge( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=ACHTransfer, + cast_to=InboundACHTransfer, ) - async def create_notification_of_change( + async def notification_of_change( self, ach_transfer_id: str, *, @@ -661,13 +760,13 @@ async def create_notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", body=await async_maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, + ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -996,51 +1095,51 @@ async def submit( ) -class ACHTransfersResourceWithRawResponse: - def __init__(self, ach_transfers: ACHTransfersResource) -> None: +class ACHTransfersWithRawResponse: + def __init__(self, ach_transfers: ACHTransfers) -> None: self._ach_transfers = ach_transfers - self.acknowledge = to_raw_response_wrapper( - ach_transfers.acknowledge, + self.create_inbound = _legacy_response.to_raw_response_wrapper( + ach_transfers.create_inbound, ) - self.create_notification_of_change = to_raw_response_wrapper( - ach_transfers.create_notification_of_change, + self.notification_of_change = _legacy_response.to_raw_response_wrapper( + ach_transfers.notification_of_change, ) - self.return_ = to_raw_response_wrapper( + self.return_ = _legacy_response.to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = to_raw_response_wrapper( + self.submit = _legacy_response.to_raw_response_wrapper( ach_transfers.submit, ) -class AsyncACHTransfersResourceWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: +class AsyncACHTransfersWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self._ach_transfers = ach_transfers - self.acknowledge = async_to_raw_response_wrapper( - ach_transfers.acknowledge, + self.create_inbound = _legacy_response.async_to_raw_response_wrapper( + ach_transfers.create_inbound, ) - self.create_notification_of_change = async_to_raw_response_wrapper( - ach_transfers.create_notification_of_change, + self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( + ach_transfers.notification_of_change, ) - self.return_ = async_to_raw_response_wrapper( + self.return_ = _legacy_response.async_to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = async_to_raw_response_wrapper( + self.submit = _legacy_response.async_to_raw_response_wrapper( ach_transfers.submit, ) -class ACHTransfersResourceWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfersResource) -> None: +class ACHTransfersWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfers) -> None: self._ach_transfers = ach_transfers - self.acknowledge = to_streamed_response_wrapper( - ach_transfers.acknowledge, + self.create_inbound = to_streamed_response_wrapper( + ach_transfers.create_inbound, ) - self.create_notification_of_change = to_streamed_response_wrapper( - ach_transfers.create_notification_of_change, + self.notification_of_change = to_streamed_response_wrapper( + ach_transfers.notification_of_change, ) self.return_ = to_streamed_response_wrapper( ach_transfers.return_, @@ -1050,15 +1149,15 @@ def __init__(self, ach_transfers: ACHTransfersResource) -> None: ) -class AsyncACHTransfersResourceWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: +class AsyncACHTransfersWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfers) -> None: self._ach_transfers = ach_transfers - self.acknowledge = async_to_streamed_response_wrapper( - ach_transfers.acknowledge, + self.create_inbound = async_to_streamed_response_wrapper( + ach_transfers.create_inbound, ) - self.create_notification_of_change = async_to_streamed_response_wrapper( - ach_transfers.create_notification_of_change, + self.notification_of_change = async_to_streamed_response_wrapper( + ach_transfers.notification_of_change, ) self.return_ = async_to_streamed_response_wrapper( ach_transfers.return_, diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py deleted file mode 100644 index bd2a5c020..000000000 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ /dev/null @@ -1,168 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_authorization_expiration_create_params -from ...types.card_payment import CardPayment - -__all__ = ["CardAuthorizationExpirationsResource", "AsyncCardAuthorizationExpirationsResource"] - - -class CardAuthorizationExpirationsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardAuthorizationExpirationsResourceWithRawResponse: - return CardAuthorizationExpirationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: - return CardAuthorizationExpirationsResourceWithStreamingResponse(self) - - def create( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_authorization_expirations", - body=maybe_transform( - {"card_payment_id": card_payment_id}, - card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class AsyncCardAuthorizationExpirationsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: - return AsyncCardAuthorizationExpirationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: - return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse(self) - - async def create( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_authorization_expirations", - body=await async_maybe_transform( - {"card_payment_id": card_payment_id}, - card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class CardAuthorizationExpirationsResourceWithRawResponse: - def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: - self._card_authorization_expirations = card_authorization_expirations - - self.create = to_raw_response_wrapper( - card_authorization_expirations.create, - ) - - -class AsyncCardAuthorizationExpirationsResourceWithRawResponse: - def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: - self._card_authorization_expirations = card_authorization_expirations - - self.create = async_to_raw_response_wrapper( - card_authorization_expirations.create, - ) - - -class CardAuthorizationExpirationsResourceWithStreamingResponse: - def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: - self._card_authorization_expirations = card_authorization_expirations - - self.create = to_streamed_response_wrapper( - card_authorization_expirations.create, - ) - - -class AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: - def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: - self._card_authorization_expirations = card_authorization_expirations - - self.create = async_to_streamed_response_wrapper( - card_authorization_expirations.create, - ) diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index ec48f6924..27f373762 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -6,6 +6,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -13,27 +14,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import card_dispute_action_params from ...types.card_dispute import CardDispute -__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] +__all__ = ["CardDisputes", "AsyncCardDisputes"] -class CardDisputesResource(SyncAPIResource): +class CardDisputes(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesResourceWithRawResponse: - return CardDisputesResourceWithRawResponse(self) + def with_raw_response(self) -> CardDisputesWithRawResponse: + return CardDisputesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: - return CardDisputesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesWithStreamingResponse: + return CardDisputesWithStreamingResponse(self) def action( self, @@ -102,14 +98,14 @@ def action( ) -class AsyncCardDisputesResource(AsyncAPIResource): +class AsyncCardDisputes(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: - return AsyncCardDisputesResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: + return AsyncCardDisputesWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: - return AsyncCardDisputesResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: + return AsyncCardDisputesWithStreamingResponse(self) async def action( self, @@ -178,26 +174,26 @@ async def action( ) -class CardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: +class CardDisputesWithRawResponse: + def __init__(self, card_disputes: CardDisputes) -> None: self._card_disputes = card_disputes - self.action = to_raw_response_wrapper( + self.action = _legacy_response.to_raw_response_wrapper( card_disputes.action, ) -class AsyncCardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: +class AsyncCardDisputesWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputes) -> None: self._card_disputes = card_disputes - self.action = async_to_raw_response_wrapper( + self.action = _legacy_response.async_to_raw_response_wrapper( card_disputes.action, ) -class CardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: +class CardDisputesWithStreamingResponse: + def __init__(self, card_disputes: CardDisputes) -> None: self._card_disputes = card_disputes self.action = to_streamed_response_wrapper( @@ -205,8 +201,8 @@ def __init__(self, card_disputes: CardDisputesResource) -> None: ) -class AsyncCardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: +class AsyncCardDisputesWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputes) -> None: self._card_disputes = card_disputes self.action = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py deleted file mode 100644 index fe62793ec..000000000 --- a/src/increase/resources/simulations/card_fuel_confirmations.py +++ /dev/null @@ -1,188 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_fuel_confirmation_create_params -from ...types.card_payment import CardPayment - -__all__ = ["CardFuelConfirmationsResource", "AsyncCardFuelConfirmationsResource"] - - -class CardFuelConfirmationsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardFuelConfirmationsResourceWithRawResponse: - return CardFuelConfirmationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardFuelConfirmationsResourceWithStreamingResponse: - return CardFuelConfirmationsResourceWithStreamingResponse(self) - - def create( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_fuel_confirmations", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class AsyncCardFuelConfirmationsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: - return AsyncCardFuelConfirmationsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: - return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self) - - async def create( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_fuel_confirmations", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class CardFuelConfirmationsResourceWithRawResponse: - def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: - self._card_fuel_confirmations = card_fuel_confirmations - - self.create = to_raw_response_wrapper( - card_fuel_confirmations.create, - ) - - -class AsyncCardFuelConfirmationsResourceWithRawResponse: - def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: - self._card_fuel_confirmations = card_fuel_confirmations - - self.create = async_to_raw_response_wrapper( - card_fuel_confirmations.create, - ) - - -class CardFuelConfirmationsResourceWithStreamingResponse: - def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: - self._card_fuel_confirmations = card_fuel_confirmations - - self.create = to_streamed_response_wrapper( - card_fuel_confirmations.create, - ) - - -class AsyncCardFuelConfirmationsResourceWithStreamingResponse: - def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: - self._card_fuel_confirmations = card_fuel_confirmations - - self.create = async_to_streamed_response_wrapper( - card_fuel_confirmations.create, - ) diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py deleted file mode 100644 index 24e8ab4e5..000000000 --- a/src/increase/resources/simulations/card_increments.py +++ /dev/null @@ -1,198 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_increment_create_params -from ...types.card_payment import CardPayment - -__all__ = ["CardIncrementsResource", "AsyncCardIncrementsResource"] - - -class CardIncrementsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardIncrementsResourceWithRawResponse: - return CardIncrementsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardIncrementsResourceWithStreamingResponse: - return CardIncrementsResourceWithStreamingResponse(self) - - def create( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_increments", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - card_increment_create_params.CardIncrementCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class AsyncCardIncrementsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardIncrementsResourceWithRawResponse: - return AsyncCardIncrementsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardIncrementsResourceWithStreamingResponse: - return AsyncCardIncrementsResourceWithStreamingResponse(self) - - async def create( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_increments", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - card_increment_create_params.CardIncrementCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class CardIncrementsResourceWithRawResponse: - def __init__(self, card_increments: CardIncrementsResource) -> None: - self._card_increments = card_increments - - self.create = to_raw_response_wrapper( - card_increments.create, - ) - - -class AsyncCardIncrementsResourceWithRawResponse: - def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: - self._card_increments = card_increments - - self.create = async_to_raw_response_wrapper( - card_increments.create, - ) - - -class CardIncrementsResourceWithStreamingResponse: - def __init__(self, card_increments: CardIncrementsResource) -> None: - self._card_increments = card_increments - - self.create = to_streamed_response_wrapper( - card_increments.create, - ) - - -class AsyncCardIncrementsResourceWithStreamingResponse: - def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: - self._card_increments = card_increments - - self.create = async_to_streamed_response_wrapper( - card_increments.create, - ) diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 7ab498340..6c01e48c6 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import card_refund_create_params from ...types.transaction import Transaction -__all__ = ["CardRefundsResource", "AsyncCardRefundsResource"] +__all__ = ["CardRefunds", "AsyncCardRefunds"] -class CardRefundsResource(SyncAPIResource): +class CardRefunds(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardRefundsResourceWithRawResponse: - return CardRefundsResourceWithRawResponse(self) + def with_raw_response(self) -> CardRefundsWithRawResponse: + return CardRefundsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: - return CardRefundsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardRefundsWithStreamingResponse: + return CardRefundsWithStreamingResponse(self) def create( self, @@ -78,14 +74,14 @@ def create( ) -class AsyncCardRefundsResource(AsyncAPIResource): +class AsyncCardRefunds(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardRefundsResourceWithRawResponse: - return AsyncCardRefundsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardRefundsWithRawResponse: + return AsyncCardRefundsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingResponse: - return AsyncCardRefundsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardRefundsWithStreamingResponse: + return AsyncCardRefundsWithStreamingResponse(self) async def create( self, @@ -134,26 +130,26 @@ async def create( ) -class CardRefundsResourceWithRawResponse: - def __init__(self, card_refunds: CardRefundsResource) -> None: +class CardRefundsWithRawResponse: + def __init__(self, card_refunds: CardRefunds) -> None: self._card_refunds = card_refunds - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( card_refunds.create, ) -class AsyncCardRefundsResourceWithRawResponse: - def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: +class AsyncCardRefundsWithRawResponse: + def __init__(self, card_refunds: AsyncCardRefunds) -> None: self._card_refunds = card_refunds - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( card_refunds.create, ) -class CardRefundsResourceWithStreamingResponse: - def __init__(self, card_refunds: CardRefundsResource) -> None: +class CardRefundsWithStreamingResponse: + def __init__(self, card_refunds: CardRefunds) -> None: self._card_refunds = card_refunds self.create = to_streamed_response_wrapper( @@ -161,8 +157,8 @@ def __init__(self, card_refunds: CardRefundsResource) -> None: ) -class AsyncCardRefundsResourceWithStreamingResponse: - def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: +class AsyncCardRefundsWithStreamingResponse: + def __init__(self, card_refunds: AsyncCardRefunds) -> None: self._card_refunds = card_refunds self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py deleted file mode 100644 index ff8bd9515..000000000 --- a/src/increase/resources/simulations/card_reversals.py +++ /dev/null @@ -1,190 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_reversal_create_params -from ...types.card_payment import CardPayment - -__all__ = ["CardReversalsResource", "AsyncCardReversalsResource"] - - -class CardReversalsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardReversalsResourceWithRawResponse: - return CardReversalsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardReversalsResourceWithStreamingResponse: - return CardReversalsResourceWithStreamingResponse(self) - - def create( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_reversals", - body=maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - card_reversal_create_params.CardReversalCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class AsyncCardReversalsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardReversalsResourceWithRawResponse: - return AsyncCardReversalsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardReversalsResourceWithStreamingResponse: - return AsyncCardReversalsResourceWithStreamingResponse(self) - - async def create( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_reversals", - body=await async_maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - card_reversal_create_params.CardReversalCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) - - -class CardReversalsResourceWithRawResponse: - def __init__(self, card_reversals: CardReversalsResource) -> None: - self._card_reversals = card_reversals - - self.create = to_raw_response_wrapper( - card_reversals.create, - ) - - -class AsyncCardReversalsResourceWithRawResponse: - def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: - self._card_reversals = card_reversals - - self.create = async_to_raw_response_wrapper( - card_reversals.create, - ) - - -class CardReversalsResourceWithStreamingResponse: - def __init__(self, card_reversals: CardReversalsResource) -> None: - self._card_reversals = card_reversals - - self.create = to_streamed_response_wrapper( - card_reversals.create, - ) - - -class AsyncCardReversalsResourceWithStreamingResponse: - def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: - self._card_reversals = card_reversals - - self.create = async_to_streamed_response_wrapper( - card_reversals.create, - ) diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py deleted file mode 100644 index 84399485f..000000000 --- a/src/increase/resources/simulations/card_settlements.py +++ /dev/null @@ -1,202 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_settlement_create_params -from ...types.transaction import Transaction - -__all__ = ["CardSettlementsResource", "AsyncCardSettlementsResource"] - - -class CardSettlementsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardSettlementsResourceWithRawResponse: - return CardSettlementsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardSettlementsResourceWithStreamingResponse: - return CardSettlementsResourceWithStreamingResponse(self) - - def create( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_settlements", - body=maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_create_params.CardSettlementCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class AsyncCardSettlementsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardSettlementsResourceWithRawResponse: - return AsyncCardSettlementsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardSettlementsResourceWithStreamingResponse: - return AsyncCardSettlementsResourceWithStreamingResponse(self) - - async def create( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_settlements", - body=await async_maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_create_params.CardSettlementCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class CardSettlementsResourceWithRawResponse: - def __init__(self, card_settlements: CardSettlementsResource) -> None: - self._card_settlements = card_settlements - - self.create = to_raw_response_wrapper( - card_settlements.create, - ) - - -class AsyncCardSettlementsResourceWithRawResponse: - def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: - self._card_settlements = card_settlements - - self.create = async_to_raw_response_wrapper( - card_settlements.create, - ) - - -class CardSettlementsResourceWithStreamingResponse: - def __init__(self, card_settlements: CardSettlementsResource) -> None: - self._card_settlements = card_settlements - - self.create = to_streamed_response_wrapper( - card_settlements.create, - ) - - -class AsyncCardSettlementsResourceWithStreamingResponse: - def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: - self._card_settlements = card_settlements - - self.create = async_to_streamed_response_wrapper( - card_settlements.create, - ) diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/cards.py similarity index 54% rename from src/increase/resources/simulations/card_authorizations.py rename to src/increase/resources/simulations/cards.py index 6089829c9..b4e6e7186 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/cards.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,29 +12,25 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options -from ...types.simulations import card_authorization_create_params -from ...types.simulations.card_authorization_create_response import CardAuthorizationCreateResponse +from ...types.simulations import card_authorize_params, card_settlement_params +from ...types.transaction import Transaction +from ...types.simulations.card_authorization_simulation import CardAuthorizationSimulation -__all__ = ["CardAuthorizationsResource", "AsyncCardAuthorizationsResource"] +__all__ = ["Cards", "AsyncCards"] -class CardAuthorizationsResource(SyncAPIResource): +class Cards(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardAuthorizationsResourceWithRawResponse: - return CardAuthorizationsResourceWithRawResponse(self) + def with_raw_response(self) -> CardsWithRawResponse: + return CardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardAuthorizationsResourceWithStreamingResponse: - return CardAuthorizationsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CardsWithStreamingResponse: + return CardsWithStreamingResponse(self) - def create( + def authorize( self, *, amount: int, @@ -53,7 +50,7 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationCreateResponse: + ) -> CardAuthorizationSimulation: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -115,7 +112,68 @@ def create( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorization_create_params.CardAuthorizationCreateParams, + card_authorize_params.CardAuthorizeParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardAuthorizationSimulation, + ) + + def settlement( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. + + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_settlements", + body=maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_params.CardSettlementParams, ), options=make_request_options( extra_headers=extra_headers, @@ -124,20 +182,20 @@ def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=CardAuthorizationCreateResponse, + cast_to=Transaction, ) -class AsyncCardAuthorizationsResource(AsyncAPIResource): +class AsyncCards(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardAuthorizationsResourceWithRawResponse: - return AsyncCardAuthorizationsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCardsWithRawResponse: + return AsyncCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: - return AsyncCardAuthorizationsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: + return AsyncCardsWithStreamingResponse(self) - async def create( + async def authorize( self, *, amount: int, @@ -157,7 +215,7 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationCreateResponse: + ) -> CardAuthorizationSimulation: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -219,7 +277,7 @@ async def create( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorization_create_params.CardAuthorizationCreateParams, + card_authorize_params.CardAuthorizeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -228,41 +286,114 @@ async def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=CardAuthorizationCreateResponse, + cast_to=CardAuthorizationSimulation, ) + async def settlement( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. -class CardAuthorizationsResourceWithRawResponse: - def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: - self._card_authorizations = card_authorizations + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. - self.create = to_raw_response_wrapper( - card_authorizations.create, + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_settlements", + body=await async_maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_params.CardSettlementParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class CardsWithRawResponse: + def __init__(self, cards: Cards) -> None: + self._cards = cards + + self.authorize = _legacy_response.to_raw_response_wrapper( + cards.authorize, + ) + self.settlement = _legacy_response.to_raw_response_wrapper( + cards.settlement, ) -class AsyncCardAuthorizationsResourceWithRawResponse: - def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: - self._card_authorizations = card_authorizations +class AsyncCardsWithRawResponse: + def __init__(self, cards: AsyncCards) -> None: + self._cards = cards - self.create = async_to_raw_response_wrapper( - card_authorizations.create, + self.authorize = _legacy_response.async_to_raw_response_wrapper( + cards.authorize, + ) + self.settlement = _legacy_response.async_to_raw_response_wrapper( + cards.settlement, ) -class CardAuthorizationsResourceWithStreamingResponse: - def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: - self._card_authorizations = card_authorizations +class CardsWithStreamingResponse: + def __init__(self, cards: Cards) -> None: + self._cards = cards - self.create = to_streamed_response_wrapper( - card_authorizations.create, + self.authorize = to_streamed_response_wrapper( + cards.authorize, + ) + self.settlement = to_streamed_response_wrapper( + cards.settlement, ) -class AsyncCardAuthorizationsResourceWithStreamingResponse: - def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: - self._card_authorizations = card_authorizations +class AsyncCardsWithStreamingResponse: + def __init__(self, cards: AsyncCards) -> None: + self._cards = cards - self.create = async_to_streamed_response_wrapper( - card_authorizations.create, + self.authorize = async_to_streamed_response_wrapper( + cards.authorize, + ) + self.settlement = async_to_streamed_response_wrapper( + cards.settlement, ) diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 862029b70..76230a77c 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -4,29 +4,25 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.check_deposit import CheckDeposit -__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] +__all__ = ["CheckDeposits", "AsyncCheckDeposits"] -class CheckDepositsResource(SyncAPIResource): +class CheckDeposits(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: - return CheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsWithRawResponse: + return CheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: - return CheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: + return CheckDepositsWithStreamingResponse(self) def reject( self, @@ -160,14 +156,14 @@ def submit( ) -class AsyncCheckDepositsResource(AsyncAPIResource): +class AsyncCheckDeposits(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: - return AsyncCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: + return AsyncCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: - return AsyncCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: + return AsyncCheckDepositsWithStreamingResponse(self) async def reject( self, @@ -301,38 +297,38 @@ async def submit( ) -class CheckDepositsResourceWithRawResponse: - def __init__(self, check_deposits: CheckDepositsResource) -> None: +class CheckDepositsWithRawResponse: + def __init__(self, check_deposits: CheckDeposits) -> None: self._check_deposits = check_deposits - self.reject = to_raw_response_wrapper( + self.reject = _legacy_response.to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = to_raw_response_wrapper( + self.return_ = _legacy_response.to_raw_response_wrapper( check_deposits.return_, ) - self.submit = to_raw_response_wrapper( + self.submit = _legacy_response.to_raw_response_wrapper( check_deposits.submit, ) -class AsyncCheckDepositsResourceWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: +class AsyncCheckDepositsWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDeposits) -> None: self._check_deposits = check_deposits - self.reject = async_to_raw_response_wrapper( + self.reject = _legacy_response.async_to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = async_to_raw_response_wrapper( + self.return_ = _legacy_response.async_to_raw_response_wrapper( check_deposits.return_, ) - self.submit = async_to_raw_response_wrapper( + self.submit = _legacy_response.async_to_raw_response_wrapper( check_deposits.submit, ) -class CheckDepositsResourceWithStreamingResponse: - def __init__(self, check_deposits: CheckDepositsResource) -> None: +class CheckDepositsWithStreamingResponse: + def __init__(self, check_deposits: CheckDeposits) -> None: self._check_deposits = check_deposits self.reject = to_streamed_response_wrapper( @@ -346,8 +342,8 @@ def __init__(self, check_deposits: CheckDepositsResource) -> None: ) -class AsyncCheckDepositsResourceWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: +class AsyncCheckDepositsWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDeposits) -> None: self._check_deposits = check_deposits self.reject = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index a0299f97f..8f3ac9af3 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -4,29 +4,25 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.check_transfer import CheckTransfer -__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] +__all__ = ["CheckTransfers", "AsyncCheckTransfers"] -class CheckTransfersResource(SyncAPIResource): +class CheckTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: - return CheckTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersWithRawResponse: + return CheckTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: - return CheckTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: + return CheckTransfersWithStreamingResponse(self) def mail( self, @@ -73,14 +69,14 @@ def mail( ) -class AsyncCheckTransfersResource(AsyncAPIResource): +class AsyncCheckTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: - return AsyncCheckTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: + return AsyncCheckTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: - return AsyncCheckTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: + return AsyncCheckTransfersWithStreamingResponse(self) async def mail( self, @@ -127,26 +123,26 @@ async def mail( ) -class CheckTransfersResourceWithRawResponse: - def __init__(self, check_transfers: CheckTransfersResource) -> None: +class CheckTransfersWithRawResponse: + def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers - self.mail = to_raw_response_wrapper( + self.mail = _legacy_response.to_raw_response_wrapper( check_transfers.mail, ) -class AsyncCheckTransfersResourceWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: +class AsyncCheckTransfersWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers - self.mail = async_to_raw_response_wrapper( + self.mail = _legacy_response.async_to_raw_response_wrapper( check_transfers.mail, ) -class CheckTransfersResourceWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfersResource) -> None: +class CheckTransfersWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfers) -> None: self._check_transfers = check_transfers self.mail = to_streamed_response_wrapper( @@ -154,8 +150,8 @@ def __init__(self, check_transfers: CheckTransfersResource) -> None: ) -class AsyncCheckTransfersResourceWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: +class AsyncCheckTransfersWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfers) -> None: self._check_transfers = check_transfers self.mail = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 7576f7708..6a7407aa9 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import digital_wallet_token_request_create_params from ...types.simulations.digital_wallet_token_request_create_response import DigitalWalletTokenRequestCreateResponse -__all__ = ["DigitalWalletTokenRequestsResource", "AsyncDigitalWalletTokenRequestsResource"] +__all__ = ["DigitalWalletTokenRequests", "AsyncDigitalWalletTokenRequests"] -class DigitalWalletTokenRequestsResource(SyncAPIResource): +class DigitalWalletTokenRequests(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: - return DigitalWalletTokenRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokenRequestsWithRawResponse: + return DigitalWalletTokenRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: - return DigitalWalletTokenRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokenRequestsWithStreamingResponse: + return DigitalWalletTokenRequestsWithStreamingResponse(self) def create( self, @@ -78,14 +74,14 @@ def create( ) -class AsyncDigitalWalletTokenRequestsResource(AsyncAPIResource): +class AsyncDigitalWalletTokenRequests(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: - return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: + return AsyncDigitalWalletTokenRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self) async def create( self, @@ -132,26 +128,26 @@ async def create( ) -class DigitalWalletTokenRequestsResourceWithRawResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: +class DigitalWalletTokenRequestsWithRawResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class AsyncDigitalWalletTokenRequestsResourceWithRawResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: +class AsyncDigitalWalletTokenRequestsWithRawResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class DigitalWalletTokenRequestsResourceWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: +class DigitalWalletTokenRequestsWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = to_streamed_response_wrapper( @@ -159,8 +155,8 @@ def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsReso ) -class AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: +class AsyncDigitalWalletTokenRequestsWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index b2f455a28..3228ade65 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.document import Document from ...types.simulations import document_create_params -__all__ = ["DocumentsResource", "AsyncDocumentsResource"] +__all__ = ["Documents", "AsyncDocuments"] -class DocumentsResource(SyncAPIResource): +class Documents(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsResourceWithRawResponse: - return DocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> DocumentsWithRawResponse: + return DocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: - return DocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsWithStreamingResponse: + return DocumentsWithStreamingResponse(self) def create( self, @@ -75,14 +71,14 @@ def create( ) -class AsyncDocumentsResource(AsyncAPIResource): +class AsyncDocuments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: - return AsyncDocumentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsWithRawResponse: + return AsyncDocumentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: - return AsyncDocumentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: + return AsyncDocumentsWithStreamingResponse(self) async def create( self, @@ -126,26 +122,26 @@ async def create( ) -class DocumentsResourceWithRawResponse: - def __init__(self, documents: DocumentsResource) -> None: +class DocumentsWithRawResponse: + def __init__(self, documents: Documents) -> None: self._documents = documents - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( documents.create, ) -class AsyncDocumentsResourceWithRawResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: +class AsyncDocumentsWithRawResponse: + def __init__(self, documents: AsyncDocuments) -> None: self._documents = documents - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( documents.create, ) -class DocumentsResourceWithStreamingResponse: - def __init__(self, documents: DocumentsResource) -> None: +class DocumentsWithStreamingResponse: + def __init__(self, documents: Documents) -> None: self._documents = documents self.create = to_streamed_response_wrapper( @@ -153,8 +149,8 @@ def __init__(self, documents: DocumentsResource) -> None: ) -class AsyncDocumentsResourceWithStreamingResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: +class AsyncDocumentsWithStreamingResponse: + def __init__(self, documents: AsyncDocuments) -> None: self._documents = documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py deleted file mode 100644 index 87a5f33a7..000000000 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ /dev/null @@ -1,352 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Literal - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import inbound_ach_transfer_create_params -from ...types.inbound_ach_transfer import InboundACHTransfer - -__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] - - -class InboundACHTransfersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: - return InboundACHTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: - return InboundACHTransfersResourceWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. - - Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. - - standard_entry_class_code: The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - "standard_entry_class_code": standard_entry_class_code, - }, - inbound_ach_transfer_create_params.InboundACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundACHTransfer, - ) - - -class AsyncInboundACHTransfersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: - return AsyncInboundACHTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: - return AsyncInboundACHTransfersResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. - - Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. - - standard_entry_class_code: The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - "standard_entry_class_code": standard_entry_class_code, - }, - inbound_ach_transfer_create_params.InboundACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundACHTransfer, - ) - - -class InboundACHTransfersResourceWithRawResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: - self._inbound_ach_transfers = inbound_ach_transfers - - self.create = to_raw_response_wrapper( - inbound_ach_transfers.create, - ) - - -class AsyncInboundACHTransfersResourceWithRawResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: - self._inbound_ach_transfers = inbound_ach_transfers - - self.create = async_to_raw_response_wrapper( - inbound_ach_transfers.create, - ) - - -class InboundACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: - self._inbound_ach_transfers = inbound_ach_transfers - - self.create = to_streamed_response_wrapper( - inbound_ach_transfers.create, - ) - - -class AsyncInboundACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: - self._inbound_ach_transfers = inbound_ach_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_ach_transfers.create, - ) diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 902853eb3..2d37d6f23 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import inbound_check_deposit_create_params from ...types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] +__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] -class InboundCheckDepositsResource(SyncAPIResource): +class InboundCheckDeposits(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: - return InboundCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: - return InboundCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self) def create( self, @@ -94,14 +90,14 @@ def create( ) -class AsyncInboundCheckDepositsResource(AsyncAPIResource): +class AsyncInboundCheckDeposits(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: - return AsyncInboundCheckDepositsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: - return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self) async def create( self, @@ -164,26 +160,26 @@ async def create( ) -class InboundCheckDepositsResourceWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: +class InboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( inbound_check_deposits.create, ) -class AsyncInboundCheckDepositsResourceWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: +class AsyncInboundCheckDepositsWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( inbound_check_deposits.create, ) -class InboundCheckDepositsResourceWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: +class InboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = to_streamed_response_wrapper( @@ -191,8 +187,8 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None ) -class AsyncInboundCheckDepositsResourceWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: +class AsyncInboundCheckDepositsWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index 6cb3ad65a..ff7d43726 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -4,29 +4,25 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse -__all__ = ["InboundFundsHoldsResource", "AsyncInboundFundsHoldsResource"] +__all__ = ["InboundFundsHolds", "AsyncInboundFundsHolds"] -class InboundFundsHoldsResource(SyncAPIResource): +class InboundFundsHolds(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: - return InboundFundsHoldsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundFundsHoldsWithRawResponse: + return InboundFundsHoldsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: - return InboundFundsHoldsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundFundsHoldsWithStreamingResponse: + return InboundFundsHoldsWithStreamingResponse(self) def release( self, @@ -74,14 +70,14 @@ def release( ) -class AsyncInboundFundsHoldsResource(AsyncAPIResource): +class AsyncInboundFundsHolds(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: - return AsyncInboundFundsHoldsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundFundsHoldsWithRawResponse: + return AsyncInboundFundsHoldsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundFundsHoldsWithStreamingResponse: + return AsyncInboundFundsHoldsWithStreamingResponse(self) async def release( self, @@ -129,26 +125,26 @@ async def release( ) -class InboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: +class InboundFundsHoldsWithRawResponse: + def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = to_raw_response_wrapper( + self.release = _legacy_response.to_raw_response_wrapper( inbound_funds_holds.release, ) -class AsyncInboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: +class AsyncInboundFundsHoldsWithRawResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = async_to_raw_response_wrapper( + self.release = _legacy_response.async_to_raw_response_wrapper( inbound_funds_holds.release, ) -class InboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: +class InboundFundsHoldsWithStreamingResponse: + def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = to_streamed_response_wrapper( @@ -156,8 +152,8 @@ def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: ) -class AsyncInboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: +class AsyncInboundFundsHoldsWithStreamingResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py new file mode 100644 index 000000000..6c0109920 --- /dev/null +++ b/src/increase/resources/simulations/inbound_international_ach_transfers.py @@ -0,0 +1,244 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ... import _legacy_response +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._base_client import make_request_options +from ...types.simulations import inbound_international_ach_transfer_create_params +from ...types.simulations.inbound_international_ach_transfer import InboundInternationalACHTransfer + +__all__ = ["InboundInternationalACHTransfers", "AsyncInboundInternationalACHTransfers"] + + +class InboundInternationalACHTransfers(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundInternationalACHTransfersWithRawResponse: + return InboundInternationalACHTransfersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundInternationalACHTransfersWithStreamingResponse: + return InboundInternationalACHTransfersWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransfer: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiver_identification_number: An identification number the originator uses for the receiver. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_international_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransfer, + ) + + +class AsyncInboundInternationalACHTransfers(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: + return AsyncInboundInternationalACHTransfersWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: + return AsyncInboundInternationalACHTransfersWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransfer: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiver_identification_number: An identification number the originator uses for the receiver. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_international_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransfer, + ) + + +class InboundInternationalACHTransfersWithRawResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = _legacy_response.to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersWithRawResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = _legacy_response.async_to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class InboundInternationalACHTransfersWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py deleted file mode 100644 index 209db6144..000000000 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ /dev/null @@ -1,228 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import inbound_real_time_payments_transfer_create_params -from ...types.simulations.inbound_real_time_payments_transfer_create_response import ( - InboundRealTimePaymentsTransferCreateResponse, -) - -__all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] - - -class InboundRealTimePaymentsTransfersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: - return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferCreateResponse: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_real_time_payments_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferCreateResponse, - ) - - -class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferCreateResponse: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_real_time_payments_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferCreateResponse, - ) - - -class InboundRealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: - self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers - - self.create = to_raw_response_wrapper( - inbound_real_time_payments_transfers.create, - ) - - -class AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: - self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers - - self.create = async_to_raw_response_wrapper( - inbound_real_time_payments_transfers.create, - ) - - -class InboundRealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: - self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers - - self.create = to_streamed_response_wrapper( - inbound_real_time_payments_transfers.create, - ) - - -class AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: - self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_real_time_payments_transfers.create, - ) diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 61f2d8b4a..90dae10a0 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import inbound_wire_drawdown_request_create_params from ...types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] +__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] -class InboundWireDrawdownRequestsResource(SyncAPIResource): +class InboundWireDrawdownRequests(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: - return InboundWireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: + return InboundWireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: - return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: + return InboundWireDrawdownRequestsWithStreamingResponse(self) def create( self, @@ -163,14 +159,14 @@ def create( ) -class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): +class AsyncInboundWireDrawdownRequests(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: + return AsyncInboundWireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) async def create( self, @@ -302,26 +298,26 @@ async def create( ) -class InboundWireDrawdownRequestsResourceWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: +class InboundWireDrawdownRequestsWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: +class AsyncInboundWireDrawdownRequestsWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class InboundWireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: +class InboundWireDrawdownRequestsWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -329,8 +325,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsRe ) -class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: +class AsyncInboundWireDrawdownRequestsWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py deleted file mode 100644 index 3501f7328..000000000 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ /dev/null @@ -1,330 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import inbound_wire_transfer_create_params -from ...types.inbound_wire_transfer import InboundWireTransfer - -__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] - - -class InboundWireTransfersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: - return InboundWireTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: - return InboundWireTransfersResourceWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundWireTransfer: - """ - Simulates an inbound Wire Transfer to your account. - - Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. - - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. - - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. - - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. - - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. - - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. - - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_wire_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, - }, - inbound_wire_transfer_create_params.InboundWireTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundWireTransfer, - ) - - -class AsyncInboundWireTransfersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: - return AsyncInboundWireTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: - return AsyncInboundWireTransfersResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundWireTransfer: - """ - Simulates an inbound Wire Transfer to your account. - - Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. - - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. - - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. - - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. - - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. - - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. - - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_wire_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, - }, - inbound_wire_transfer_create_params.InboundWireTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundWireTransfer, - ) - - -class InboundWireTransfersResourceWithRawResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: - self._inbound_wire_transfers = inbound_wire_transfers - - self.create = to_raw_response_wrapper( - inbound_wire_transfers.create, - ) - - -class AsyncInboundWireTransfersResourceWithRawResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: - self._inbound_wire_transfers = inbound_wire_transfers - - self.create = async_to_raw_response_wrapper( - inbound_wire_transfers.create, - ) - - -class InboundWireTransfersResourceWithStreamingResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: - self._inbound_wire_transfers = inbound_wire_transfers - - self.create = to_streamed_response_wrapper( - inbound_wire_transfers.create, - ) - - -class AsyncInboundWireTransfersResourceWithStreamingResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: - self._inbound_wire_transfers = inbound_wire_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_wire_transfers.create, - ) diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index b129e1563..b7bd0a17f 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -7,6 +7,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -14,27 +15,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.simulations import interest_payment_create_params from ...types.transaction import Transaction -__all__ = ["InterestPaymentsResource", "AsyncInterestPaymentsResource"] +__all__ = ["InterestPayments", "AsyncInterestPayments"] -class InterestPaymentsResource(SyncAPIResource): +class InterestPayments(SyncAPIResource): @cached_property - def with_raw_response(self) -> InterestPaymentsResourceWithRawResponse: - return InterestPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> InterestPaymentsWithRawResponse: + return InterestPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InterestPaymentsResourceWithStreamingResponse: - return InterestPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> InterestPaymentsWithStreamingResponse: + return InterestPaymentsWithStreamingResponse(self) def create( self, @@ -76,7 +72,7 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ return self._post( - "/simulations/interest_payments", + "/simulations/interest_payment", body=maybe_transform( { "account_id": account_id, @@ -97,14 +93,14 @@ def create( ) -class AsyncInterestPaymentsResource(AsyncAPIResource): +class AsyncInterestPayments(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInterestPaymentsResourceWithRawResponse: - return AsyncInterestPaymentsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncInterestPaymentsWithRawResponse: + return AsyncInterestPaymentsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: - return AsyncInterestPaymentsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInterestPaymentsWithStreamingResponse: + return AsyncInterestPaymentsWithStreamingResponse(self) async def create( self, @@ -146,7 +142,7 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ return await self._post( - "/simulations/interest_payments", + "/simulations/interest_payment", body=await async_maybe_transform( { "account_id": account_id, @@ -167,26 +163,26 @@ async def create( ) -class InterestPaymentsResourceWithRawResponse: - def __init__(self, interest_payments: InterestPaymentsResource) -> None: +class InterestPaymentsWithRawResponse: + def __init__(self, interest_payments: InterestPayments) -> None: self._interest_payments = interest_payments - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( interest_payments.create, ) -class AsyncInterestPaymentsResourceWithRawResponse: - def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: +class AsyncInterestPaymentsWithRawResponse: + def __init__(self, interest_payments: AsyncInterestPayments) -> None: self._interest_payments = interest_payments - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( interest_payments.create, ) -class InterestPaymentsResourceWithStreamingResponse: - def __init__(self, interest_payments: InterestPaymentsResource) -> None: +class InterestPaymentsWithStreamingResponse: + def __init__(self, interest_payments: InterestPayments) -> None: self._interest_payments = interest_payments self.create = to_streamed_response_wrapper( @@ -194,8 +190,8 @@ def __init__(self, interest_payments: InterestPaymentsResource) -> None: ) -class AsyncInterestPaymentsResourceWithStreamingResponse: - def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: +class AsyncInterestPaymentsWithStreamingResponse: + def __init__(self, interest_payments: AsyncInterestPayments) -> None: self._interest_payments = interest_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index a3eac10ff..02c7f6459 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -6,6 +6,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -13,29 +14,24 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options -from ...types.simulations import physical_card_advance_shipment_params +from ...types.simulations import physical_card_shipment_advance_params from ...types.physical_card import PhysicalCard -__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] +__all__ = ["PhysicalCards", "AsyncPhysicalCards"] -class PhysicalCardsResource(SyncAPIResource): +class PhysicalCards(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: - return PhysicalCardsResourceWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsWithRawResponse: + return PhysicalCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: - return PhysicalCardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: + return PhysicalCardsWithStreamingResponse(self) - def advance_shipment( + def shipment_advance( self, physical_card_id: str, *, @@ -83,10 +79,10 @@ def advance_shipment( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._post( - f"/simulations/physical_cards/{physical_card_id}/advance_shipment", + f"/simulations/physical_cards/{physical_card_id}/shipment_advance", body=maybe_transform( {"shipment_status": shipment_status}, - physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, + physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, ), options=make_request_options( extra_headers=extra_headers, @@ -99,16 +95,16 @@ def advance_shipment( ) -class AsyncPhysicalCardsResource(AsyncAPIResource): +class AsyncPhysicalCards(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: - return AsyncPhysicalCardsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: + return AsyncPhysicalCardsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: - return AsyncPhysicalCardsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: + return AsyncPhysicalCardsWithStreamingResponse(self) - async def advance_shipment( + async def shipment_advance( self, physical_card_id: str, *, @@ -156,10 +152,10 @@ async def advance_shipment( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._post( - f"/simulations/physical_cards/{physical_card_id}/advance_shipment", + f"/simulations/physical_cards/{physical_card_id}/shipment_advance", body=await async_maybe_transform( {"shipment_status": shipment_status}, - physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, + physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, ), options=make_request_options( extra_headers=extra_headers, @@ -172,37 +168,37 @@ async def advance_shipment( ) -class PhysicalCardsResourceWithRawResponse: - def __init__(self, physical_cards: PhysicalCardsResource) -> None: +class PhysicalCardsWithRawResponse: + def __init__(self, physical_cards: PhysicalCards) -> None: self._physical_cards = physical_cards - self.advance_shipment = to_raw_response_wrapper( - physical_cards.advance_shipment, + self.shipment_advance = _legacy_response.to_raw_response_wrapper( + physical_cards.shipment_advance, ) -class AsyncPhysicalCardsResourceWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: +class AsyncPhysicalCardsWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCards) -> None: self._physical_cards = physical_cards - self.advance_shipment = async_to_raw_response_wrapper( - physical_cards.advance_shipment, + self.shipment_advance = _legacy_response.async_to_raw_response_wrapper( + physical_cards.shipment_advance, ) -class PhysicalCardsResourceWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCardsResource) -> None: +class PhysicalCardsWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCards) -> None: self._physical_cards = physical_cards - self.advance_shipment = to_streamed_response_wrapper( - physical_cards.advance_shipment, + self.shipment_advance = to_streamed_response_wrapper( + physical_cards.shipment_advance, ) -class AsyncPhysicalCardsResourceWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: +class AsyncPhysicalCardsWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCards) -> None: self._physical_cards = physical_cards - self.advance_shipment = async_to_streamed_response_wrapper( - physical_cards.advance_shipment, + self.shipment_advance = async_to_streamed_response_wrapper( + physical_cards.shipment_advance, ) diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index ee78aebbe..f5877f8bd 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,22 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options from ...types.program import Program from ...types.simulations import program_create_params -__all__ = ["ProgramsResource", "AsyncProgramsResource"] +__all__ = ["Programs", "AsyncPrograms"] -class ProgramsResource(SyncAPIResource): +class Programs(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsResourceWithRawResponse: - return ProgramsResourceWithRawResponse(self) + def with_raw_response(self) -> ProgramsWithRawResponse: + return ProgramsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: - return ProgramsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsWithStreamingResponse: + return ProgramsWithStreamingResponse(self) def create( self, @@ -78,14 +74,14 @@ def create( ) -class AsyncProgramsResource(AsyncAPIResource): +class AsyncPrograms(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: - return AsyncProgramsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsWithRawResponse: + return AsyncProgramsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: - return AsyncProgramsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: + return AsyncProgramsWithStreamingResponse(self) async def create( self, @@ -132,26 +128,26 @@ async def create( ) -class ProgramsResourceWithRawResponse: - def __init__(self, programs: ProgramsResource) -> None: +class ProgramsWithRawResponse: + def __init__(self, programs: Programs) -> None: self._programs = programs - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( programs.create, ) -class AsyncProgramsResourceWithRawResponse: - def __init__(self, programs: AsyncProgramsResource) -> None: +class AsyncProgramsWithRawResponse: + def __init__(self, programs: AsyncPrograms) -> None: self._programs = programs - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( programs.create, ) -class ProgramsResourceWithStreamingResponse: - def __init__(self, programs: ProgramsResource) -> None: +class ProgramsWithStreamingResponse: + def __init__(self, programs: Programs) -> None: self._programs = programs self.create = to_streamed_response_wrapper( @@ -159,8 +155,8 @@ def __init__(self, programs: ProgramsResource) -> None: ) -class AsyncProgramsResourceWithStreamingResponse: - def __init__(self, programs: AsyncProgramsResource) -> None: +class AsyncProgramsWithStreamingResponse: + def __init__(self, programs: AsyncPrograms) -> None: self._programs = programs self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 9df107fe3..4759f543c 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -4,6 +4,7 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -11,27 +12,28 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options -from ...types.simulations import real_time_payments_transfer_complete_params +from ...types.simulations import ( + real_time_payments_transfer_complete_params, + real_time_payments_transfer_create_inbound_params, +) from ...types.real_time_payments_transfer import RealTimePaymentsTransfer +from ...types.simulations.inbound_real_time_payments_transfer_simulation_result import ( + InboundRealTimePaymentsTransferSimulationResult, +) -__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] +__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] -class RealTimePaymentsTransfersResource(SyncAPIResource): +class RealTimePaymentsTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: - return RealTimePaymentsTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: + return RealTimePaymentsTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: - return RealTimePaymentsTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: + return RealTimePaymentsTransfersWithStreamingResponse(self) def complete( self, @@ -86,15 +88,88 @@ def complete( cast_to=RealTimePaymentsTransfer, ) + def create_inbound( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferSimulationResult: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers -class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_real_time_payments_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferSimulationResult, + ) + + +class AsyncRealTimePaymentsTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: + return AsyncRealTimePaymentsTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: + return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) async def complete( self, @@ -149,38 +224,123 @@ async def complete( cast_to=RealTimePaymentsTransfer, ) + async def create_inbound( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferSimulationResult: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_real_time_payments_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferSimulationResult, + ) -class RealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: + +class RealTimePaymentsTransfersWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = to_raw_response_wrapper( + self.complete = _legacy_response.to_raw_response_wrapper( real_time_payments_transfers.complete, ) + self.create_inbound = _legacy_response.to_raw_response_wrapper( + real_time_payments_transfers.create_inbound, + ) -class AsyncRealTimePaymentsTransfersResourceWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: +class AsyncRealTimePaymentsTransfersWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = async_to_raw_response_wrapper( + self.complete = _legacy_response.async_to_raw_response_wrapper( real_time_payments_transfers.complete, ) + self.create_inbound = _legacy_response.async_to_raw_response_wrapper( + real_time_payments_transfers.create_inbound, + ) -class RealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: +class RealTimePaymentsTransfersWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = to_streamed_response_wrapper( real_time_payments_transfers.complete, ) + self.create_inbound = to_streamed_response_wrapper( + real_time_payments_transfers.create_inbound, + ) -class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: +class AsyncRealTimePaymentsTransfersWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = async_to_streamed_response_wrapper( real_time_payments_transfers.complete, ) + self.create_inbound = async_to_streamed_response_wrapper( + real_time_payments_transfers.create_inbound, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 0da1a353d..cbf003d01 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -2,903 +2,1154 @@ from __future__ import annotations +import httpx + +from ... import _legacy_response +from .cards import ( + Cards, + AsyncCards, + CardsWithRawResponse, + AsyncCardsWithRawResponse, + CardsWithStreamingResponse, + AsyncCardsWithStreamingResponse, +) +from ...types import ( + simulation_card_reversals_params, + simulation_card_increments_params, + simulation_card_fuel_confirmations_params, + simulation_card_authorization_expirations_params, +) +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) from .programs import ( - ProgramsResource, - AsyncProgramsResource, - ProgramsResourceWithRawResponse, - AsyncProgramsResourceWithRawResponse, - ProgramsResourceWithStreamingResponse, - AsyncProgramsResourceWithStreamingResponse, + Programs, + AsyncPrograms, + ProgramsWithRawResponse, + AsyncProgramsWithRawResponse, + ProgramsWithStreamingResponse, + AsyncProgramsWithStreamingResponse, ) from ..._compat import cached_property from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, + Documents, + AsyncDocuments, + DocumentsWithRawResponse, + AsyncDocumentsWithRawResponse, + DocumentsWithStreamingResponse, + AsyncDocumentsWithStreamingResponse, ) from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from .card_refunds import ( - CardRefundsResource, - AsyncCardRefundsResource, - CardRefundsResourceWithRawResponse, - AsyncCardRefundsResourceWithRawResponse, - CardRefundsResourceWithStreamingResponse, - AsyncCardRefundsResourceWithStreamingResponse, + CardRefunds, + AsyncCardRefunds, + CardRefundsWithRawResponse, + AsyncCardRefundsWithRawResponse, + CardRefundsWithStreamingResponse, + AsyncCardRefundsWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfersResource, - AsyncACHTransfersResource, - ACHTransfersResourceWithRawResponse, - AsyncACHTransfersResourceWithRawResponse, - ACHTransfersResourceWithStreamingResponse, - AsyncACHTransfersResourceWithStreamingResponse, + ACHTransfers, + AsyncACHTransfers, + ACHTransfersWithRawResponse, + AsyncACHTransfersWithRawResponse, + ACHTransfersWithStreamingResponse, + AsyncACHTransfersWithStreamingResponse, ) from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, -) -from .card_reversals import ( - CardReversalsResource, - AsyncCardReversalsResource, - CardReversalsResourceWithRawResponse, - AsyncCardReversalsResourceWithRawResponse, - CardReversalsResourceWithStreamingResponse, - AsyncCardReversalsResourceWithStreamingResponse, + CardDisputes, + AsyncCardDisputes, + CardDisputesWithRawResponse, + AsyncCardDisputesWithRawResponse, + CardDisputesWithStreamingResponse, + AsyncCardDisputesWithStreamingResponse, ) +from ..._base_client import make_request_options from .check_deposits import ( - CheckDepositsResource, - AsyncCheckDepositsResource, - CheckDepositsResourceWithRawResponse, - AsyncCheckDepositsResourceWithRawResponse, - CheckDepositsResourceWithStreamingResponse, - AsyncCheckDepositsResourceWithStreamingResponse, + CheckDeposits, + AsyncCheckDeposits, + CheckDepositsWithRawResponse, + AsyncCheckDepositsWithRawResponse, + CheckDepositsWithStreamingResponse, + AsyncCheckDepositsWithStreamingResponse, ) from .physical_cards import ( - PhysicalCardsResource, - AsyncPhysicalCardsResource, - PhysicalCardsResourceWithRawResponse, - AsyncPhysicalCardsResourceWithRawResponse, - PhysicalCardsResourceWithStreamingResponse, - AsyncPhysicalCardsResourceWithStreamingResponse, + PhysicalCards, + AsyncPhysicalCards, + PhysicalCardsWithRawResponse, + AsyncPhysicalCardsWithRawResponse, + PhysicalCardsWithStreamingResponse, + AsyncPhysicalCardsWithStreamingResponse, ) from .wire_transfers import ( - WireTransfersResource, - AsyncWireTransfersResource, - WireTransfersResourceWithRawResponse, - AsyncWireTransfersResourceWithRawResponse, - WireTransfersResourceWithStreamingResponse, - AsyncWireTransfersResourceWithStreamingResponse, -) -from .card_increments import ( - CardIncrementsResource, - AsyncCardIncrementsResource, - CardIncrementsResourceWithRawResponse, - AsyncCardIncrementsResourceWithRawResponse, - CardIncrementsResourceWithStreamingResponse, - AsyncCardIncrementsResourceWithStreamingResponse, + WireTransfers, + AsyncWireTransfers, + WireTransfersWithRawResponse, + AsyncWireTransfersWithRawResponse, + WireTransfersWithStreamingResponse, + AsyncWireTransfersWithStreamingResponse, ) from .check_transfers import ( - CheckTransfersResource, - AsyncCheckTransfersResource, - CheckTransfersResourceWithRawResponse, - AsyncCheckTransfersResourceWithRawResponse, - CheckTransfersResourceWithStreamingResponse, - AsyncCheckTransfersResourceWithStreamingResponse, -) -from .card_settlements import ( - CardSettlementsResource, - AsyncCardSettlementsResource, - CardSettlementsResourceWithRawResponse, - AsyncCardSettlementsResourceWithRawResponse, - CardSettlementsResourceWithStreamingResponse, - AsyncCardSettlementsResourceWithStreamingResponse, + CheckTransfers, + AsyncCheckTransfers, + CheckTransfersWithRawResponse, + AsyncCheckTransfersWithRawResponse, + CheckTransfersWithStreamingResponse, + AsyncCheckTransfersWithStreamingResponse, ) from .account_transfers import ( - AccountTransfersResource, - AsyncAccountTransfersResource, - AccountTransfersResourceWithRawResponse, - AsyncAccountTransfersResourceWithRawResponse, - AccountTransfersResourceWithStreamingResponse, - AsyncAccountTransfersResourceWithStreamingResponse, + AccountTransfers, + AsyncAccountTransfers, + AccountTransfersWithRawResponse, + AsyncAccountTransfersWithRawResponse, + AccountTransfersWithStreamingResponse, + AsyncAccountTransfersWithStreamingResponse, ) from .interest_payments import ( - InterestPaymentsResource, - AsyncInterestPaymentsResource, - InterestPaymentsResourceWithRawResponse, - AsyncInterestPaymentsResourceWithRawResponse, - InterestPaymentsResourceWithStreamingResponse, - AsyncInterestPaymentsResourceWithStreamingResponse, + InterestPayments, + AsyncInterestPayments, + InterestPaymentsWithRawResponse, + AsyncInterestPaymentsWithRawResponse, + InterestPaymentsWithStreamingResponse, + AsyncInterestPaymentsWithStreamingResponse, ) from .account_statements import ( - AccountStatementsResource, - AsyncAccountStatementsResource, - AccountStatementsResourceWithRawResponse, - AsyncAccountStatementsResourceWithRawResponse, - AccountStatementsResourceWithStreamingResponse, - AsyncAccountStatementsResourceWithStreamingResponse, -) -from .card_authorizations import ( - CardAuthorizationsResource, - AsyncCardAuthorizationsResource, - CardAuthorizationsResourceWithRawResponse, - AsyncCardAuthorizationsResourceWithRawResponse, - CardAuthorizationsResourceWithStreamingResponse, - AsyncCardAuthorizationsResourceWithStreamingResponse, + AccountStatements, + AsyncAccountStatements, + AccountStatementsWithRawResponse, + AsyncAccountStatementsWithRawResponse, + AccountStatementsWithStreamingResponse, + AsyncAccountStatementsWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, -) -from .inbound_ach_transfers import ( - InboundACHTransfersResource, - AsyncInboundACHTransfersResource, - InboundACHTransfersResourceWithRawResponse, - AsyncInboundACHTransfersResourceWithRawResponse, - InboundACHTransfersResourceWithStreamingResponse, - AsyncInboundACHTransfersResourceWithStreamingResponse, + InboundFundsHolds, + AsyncInboundFundsHolds, + InboundFundsHoldsWithRawResponse, + AsyncInboundFundsHoldsWithRawResponse, + InboundFundsHoldsWithStreamingResponse, + AsyncInboundFundsHoldsWithStreamingResponse, ) +from ...types.card_payment import CardPayment from .inbound_check_deposits import ( - InboundCheckDepositsResource, - AsyncInboundCheckDepositsResource, - InboundCheckDepositsResourceWithRawResponse, - AsyncInboundCheckDepositsResourceWithRawResponse, - InboundCheckDepositsResourceWithStreamingResponse, - AsyncInboundCheckDepositsResourceWithStreamingResponse, -) -from .inbound_wire_transfers import ( - InboundWireTransfersResource, - AsyncInboundWireTransfersResource, - InboundWireTransfersResourceWithRawResponse, - AsyncInboundWireTransfersResourceWithRawResponse, - InboundWireTransfersResourceWithStreamingResponse, - AsyncInboundWireTransfersResourceWithStreamingResponse, -) -from .card_fuel_confirmations import ( - CardFuelConfirmationsResource, - AsyncCardFuelConfirmationsResource, - CardFuelConfirmationsResourceWithRawResponse, - AsyncCardFuelConfirmationsResourceWithRawResponse, - CardFuelConfirmationsResourceWithStreamingResponse, - AsyncCardFuelConfirmationsResourceWithStreamingResponse, + InboundCheckDeposits, + AsyncInboundCheckDeposits, + InboundCheckDepositsWithRawResponse, + AsyncInboundCheckDepositsWithRawResponse, + InboundCheckDepositsWithStreamingResponse, + AsyncInboundCheckDepositsWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfersResource, - AsyncRealTimePaymentsTransfersResource, - RealTimePaymentsTransfersResourceWithRawResponse, - AsyncRealTimePaymentsTransfersResourceWithRawResponse, - RealTimePaymentsTransfersResourceWithStreamingResponse, - AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, + RealTimePaymentsTransfers, + AsyncRealTimePaymentsTransfers, + RealTimePaymentsTransfersWithRawResponse, + AsyncRealTimePaymentsTransfersWithRawResponse, + RealTimePaymentsTransfersWithStreamingResponse, + AsyncRealTimePaymentsTransfersWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequestsResource, - AsyncDigitalWalletTokenRequestsResource, - DigitalWalletTokenRequestsResourceWithRawResponse, - AsyncDigitalWalletTokenRequestsResourceWithRawResponse, - DigitalWalletTokenRequestsResourceWithStreamingResponse, - AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, -) -from .card_authorization_expirations import ( - CardAuthorizationExpirationsResource, - AsyncCardAuthorizationExpirationsResource, - CardAuthorizationExpirationsResourceWithRawResponse, - AsyncCardAuthorizationExpirationsResourceWithRawResponse, - CardAuthorizationExpirationsResourceWithStreamingResponse, - AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, + DigitalWalletTokenRequests, + AsyncDigitalWalletTokenRequests, + DigitalWalletTokenRequestsWithRawResponse, + AsyncDigitalWalletTokenRequestsWithRawResponse, + DigitalWalletTokenRequestsWithStreamingResponse, + AsyncDigitalWalletTokenRequestsWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequestsResource, - AsyncInboundWireDrawdownRequestsResource, - InboundWireDrawdownRequestsResourceWithRawResponse, - AsyncInboundWireDrawdownRequestsResourceWithRawResponse, - InboundWireDrawdownRequestsResourceWithStreamingResponse, - AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, + InboundWireDrawdownRequests, + AsyncInboundWireDrawdownRequests, + InboundWireDrawdownRequestsWithRawResponse, + AsyncInboundWireDrawdownRequestsWithRawResponse, + InboundWireDrawdownRequestsWithStreamingResponse, + AsyncInboundWireDrawdownRequestsWithStreamingResponse, ) -from .inbound_real_time_payments_transfers import ( - InboundRealTimePaymentsTransfersResource, - AsyncInboundRealTimePaymentsTransfersResource, - InboundRealTimePaymentsTransfersResourceWithRawResponse, - AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, - InboundRealTimePaymentsTransfersResourceWithStreamingResponse, - AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfers, + AsyncInboundInternationalACHTransfers, + InboundInternationalACHTransfersWithRawResponse, + AsyncInboundInternationalACHTransfersWithRawResponse, + InboundInternationalACHTransfersWithStreamingResponse, + AsyncInboundInternationalACHTransfersWithStreamingResponse, ) -__all__ = ["SimulationsResource", "AsyncSimulationsResource"] - - -class SimulationsResource(SyncAPIResource): - @cached_property - def account_transfers(self) -> AccountTransfersResource: - return AccountTransfersResource(self._client) - - @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResource: - return InboundACHTransfersResource(self._client) - - @cached_property - def ach_transfers(self) -> ACHTransfersResource: - return ACHTransfersResource(self._client) - - @cached_property - def check_transfers(self) -> CheckTransfersResource: - return CheckTransfersResource(self._client) - - @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResource: - return InboundCheckDepositsResource(self._client) +__all__ = ["Simulations", "AsyncSimulations"] - @cached_property - def check_deposits(self) -> CheckDepositsResource: - return CheckDepositsResource(self._client) +class Simulations(SyncAPIResource): @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResource: - return InboundWireTransfersResource(self._client) + def account_transfers(self) -> AccountTransfers: + return AccountTransfers(self._client) @cached_property - def wire_transfers(self) -> WireTransfersResource: - return WireTransfersResource(self._client) + def account_statements(self) -> AccountStatements: + return AccountStatements(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: - return InboundWireDrawdownRequestsResource(self._client) + def ach_transfers(self) -> ACHTransfers: + return ACHTransfers(self._client) @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: - return InboundRealTimePaymentsTransfersResource(self._client) + def card_disputes(self) -> CardDisputes: + return CardDisputes(self._client) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResource: - return InboundFundsHoldsResource(self._client) + def card_refunds(self) -> CardRefunds: + return CardRefunds(self._client) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: - return RealTimePaymentsTransfersResource(self._client) + def check_transfers(self) -> CheckTransfers: + return CheckTransfers(self._client) @cached_property - def card_authorizations(self) -> CardAuthorizationsResource: - return CardAuthorizationsResource(self._client) + def documents(self) -> Documents: + return Documents(self._client) @cached_property - def card_settlements(self) -> CardSettlementsResource: - return CardSettlementsResource(self._client) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequests: + return DigitalWalletTokenRequests(self._client) @cached_property - def card_reversals(self) -> CardReversalsResource: - return CardReversalsResource(self._client) + def check_deposits(self) -> CheckDeposits: + return CheckDeposits(self._client) @cached_property - def card_increments(self) -> CardIncrementsResource: - return CardIncrementsResource(self._client) + def programs(self) -> Programs: + return Programs(self._client) @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: - return CardAuthorizationExpirationsResource(self._client) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequests: + return InboundWireDrawdownRequests(self._client) @cached_property - def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: - return CardFuelConfirmationsResource(self._client) + def inbound_funds_holds(self) -> InboundFundsHolds: + return InboundFundsHolds(self._client) @cached_property - def card_refunds(self) -> CardRefundsResource: - return CardRefundsResource(self._client) + def interest_payments(self) -> InterestPayments: + return InterestPayments(self._client) @cached_property - def card_disputes(self) -> CardDisputesResource: - return CardDisputesResource(self._client) + def wire_transfers(self) -> WireTransfers: + return WireTransfers(self._client) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: - return DigitalWalletTokenRequestsResource(self._client) + def cards(self) -> Cards: + return Cards(self._client) @cached_property - def physical_cards(self) -> PhysicalCardsResource: - return PhysicalCardsResource(self._client) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfers: + return RealTimePaymentsTransfers(self._client) @cached_property - def interest_payments(self) -> InterestPaymentsResource: - return InterestPaymentsResource(self._client) + def physical_cards(self) -> PhysicalCards: + return PhysicalCards(self._client) @cached_property - def account_statements(self) -> AccountStatementsResource: - return AccountStatementsResource(self._client) + def inbound_check_deposits(self) -> InboundCheckDeposits: + return InboundCheckDeposits(self._client) @cached_property - def documents(self) -> DocumentsResource: - return DocumentsResource(self._client) + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfers: + return InboundInternationalACHTransfers(self._client) @cached_property - def programs(self) -> ProgramsResource: - return ProgramsResource(self._client) + def with_raw_response(self) -> SimulationsWithRawResponse: + return SimulationsWithRawResponse(self) @cached_property - def with_raw_response(self) -> SimulationsResourceWithRawResponse: - return SimulationsResourceWithRawResponse(self) + def with_streaming_response(self) -> SimulationsWithStreamingResponse: + return SimulationsWithStreamingResponse(self) - @cached_property - def with_streaming_response(self) -> SimulationsResourceWithStreamingResponse: - return SimulationsResourceWithStreamingResponse(self) + def card_authorization_expirations( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_authorization_expirations", + body=maybe_transform( + {"card_payment_id": card_payment_id}, + simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + def card_fuel_confirmations( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_fuel_confirmations", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) -class AsyncSimulationsResource(AsyncAPIResource): - @cached_property - def account_transfers(self) -> AsyncAccountTransfersResource: - return AsyncAccountTransfersResource(self._client) + def card_increments( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_increments", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + simulation_card_increments_params.SimulationCardIncrementsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) - @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: - return AsyncInboundACHTransfersResource(self._client) + def card_reversals( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_reversals", + body=maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + simulation_card_reversals_params.SimulationCardReversalsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) - @cached_property - def ach_transfers(self) -> AsyncACHTransfersResource: - return AsyncACHTransfersResource(self._client) +class AsyncSimulations(AsyncAPIResource): @cached_property - def check_transfers(self) -> AsyncCheckTransfersResource: - return AsyncCheckTransfersResource(self._client) + def account_transfers(self) -> AsyncAccountTransfers: + return AsyncAccountTransfers(self._client) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: - return AsyncInboundCheckDepositsResource(self._client) + def account_statements(self) -> AsyncAccountStatements: + return AsyncAccountStatements(self._client) @cached_property - def check_deposits(self) -> AsyncCheckDepositsResource: - return AsyncCheckDepositsResource(self._client) + def ach_transfers(self) -> AsyncACHTransfers: + return AsyncACHTransfers(self._client) @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: - return AsyncInboundWireTransfersResource(self._client) + def card_disputes(self) -> AsyncCardDisputes: + return AsyncCardDisputes(self._client) @cached_property - def wire_transfers(self) -> AsyncWireTransfersResource: - return AsyncWireTransfersResource(self._client) + def card_refunds(self) -> AsyncCardRefunds: + return AsyncCardRefunds(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: - return AsyncInboundWireDrawdownRequestsResource(self._client) + def check_transfers(self) -> AsyncCheckTransfers: + return AsyncCheckTransfers(self._client) @cached_property - def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: - return AsyncInboundRealTimePaymentsTransfersResource(self._client) + def documents(self) -> AsyncDocuments: + return AsyncDocuments(self._client) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: - return AsyncInboundFundsHoldsResource(self._client) + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequests: + return AsyncDigitalWalletTokenRequests(self._client) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: - return AsyncRealTimePaymentsTransfersResource(self._client) + def check_deposits(self) -> AsyncCheckDeposits: + return AsyncCheckDeposits(self._client) @cached_property - def card_authorizations(self) -> AsyncCardAuthorizationsResource: - return AsyncCardAuthorizationsResource(self._client) + def programs(self) -> AsyncPrograms: + return AsyncPrograms(self._client) @cached_property - def card_settlements(self) -> AsyncCardSettlementsResource: - return AsyncCardSettlementsResource(self._client) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequests: + return AsyncInboundWireDrawdownRequests(self._client) @cached_property - def card_reversals(self) -> AsyncCardReversalsResource: - return AsyncCardReversalsResource(self._client) + def inbound_funds_holds(self) -> AsyncInboundFundsHolds: + return AsyncInboundFundsHolds(self._client) @cached_property - def card_increments(self) -> AsyncCardIncrementsResource: - return AsyncCardIncrementsResource(self._client) + def interest_payments(self) -> AsyncInterestPayments: + return AsyncInterestPayments(self._client) @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: - return AsyncCardAuthorizationExpirationsResource(self._client) + def wire_transfers(self) -> AsyncWireTransfers: + return AsyncWireTransfers(self._client) @cached_property - def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: - return AsyncCardFuelConfirmationsResource(self._client) + def cards(self) -> AsyncCards: + return AsyncCards(self._client) @cached_property - def card_refunds(self) -> AsyncCardRefundsResource: - return AsyncCardRefundsResource(self._client) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfers: + return AsyncRealTimePaymentsTransfers(self._client) @cached_property - def card_disputes(self) -> AsyncCardDisputesResource: - return AsyncCardDisputesResource(self._client) + def physical_cards(self) -> AsyncPhysicalCards: + return AsyncPhysicalCards(self._client) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResource: - return AsyncDigitalWalletTokenRequestsResource(self._client) + def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: + return AsyncInboundCheckDeposits(self._client) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsResource: - return AsyncPhysicalCardsResource(self._client) + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfers: + return AsyncInboundInternationalACHTransfers(self._client) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResource: - return AsyncInterestPaymentsResource(self._client) + def with_raw_response(self) -> AsyncSimulationsWithRawResponse: + return AsyncSimulationsWithRawResponse(self) @cached_property - def account_statements(self) -> AsyncAccountStatementsResource: - return AsyncAccountStatementsResource(self._client) + def with_streaming_response(self) -> AsyncSimulationsWithStreamingResponse: + return AsyncSimulationsWithStreamingResponse(self) - @cached_property - def documents(self) -> AsyncDocumentsResource: - return AsyncDocumentsResource(self._client) + async def card_authorization_expirations( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_authorization_expirations", + body=await async_maybe_transform( + {"card_payment_id": card_payment_id}, + simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) - @cached_property - def programs(self) -> AsyncProgramsResource: - return AsyncProgramsResource(self._client) + async def card_fuel_confirmations( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_fuel_confirmations", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) - @cached_property - def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: - return AsyncSimulationsResourceWithRawResponse(self) + async def card_increments( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_increments", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + simulation_card_increments_params.SimulationCardIncrementsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) - @cached_property - def with_streaming_response(self) -> AsyncSimulationsResourceWithStreamingResponse: - return AsyncSimulationsResourceWithStreamingResponse(self) + async def card_reversals( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_reversals", + body=await async_maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + simulation_card_reversals_params.SimulationCardReversalsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) -class SimulationsResourceWithRawResponse: - def __init__(self, simulations: SimulationsResource) -> None: +class SimulationsWithRawResponse: + def __init__(self, simulations: Simulations) -> None: self._simulations = simulations - @cached_property - def account_transfers(self) -> AccountTransfersResourceWithRawResponse: - return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) - - @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithRawResponse: - return InboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) - - @cached_property - def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: - return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) - - @cached_property - def check_transfers(self) -> CheckTransfersResourceWithRawResponse: - return CheckTransfersResourceWithRawResponse(self._simulations.check_transfers) - - @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: - return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) - - @cached_property - def check_deposits(self) -> CheckDepositsResourceWithRawResponse: - return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) - - @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: - return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) - - @cached_property - def wire_transfers(self) -> WireTransfersResourceWithRawResponse: - return WireTransfersResourceWithRawResponse(self._simulations.wire_transfers) - - @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: - return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) - - @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: - return InboundRealTimePaymentsTransfersResourceWithRawResponse( - self._simulations.inbound_real_time_payments_transfers + self.card_authorization_expirations = _legacy_response.to_raw_response_wrapper( + simulations.card_authorization_expirations, + ) + self.card_fuel_confirmations = _legacy_response.to_raw_response_wrapper( + simulations.card_fuel_confirmations, + ) + self.card_increments = _legacy_response.to_raw_response_wrapper( + simulations.card_increments, + ) + self.card_reversals = _legacy_response.to_raw_response_wrapper( + simulations.card_reversals, ) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: - return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) - - @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: - return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) - - @cached_property - def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: - return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) - - @cached_property - def card_settlements(self) -> CardSettlementsResourceWithRawResponse: - return CardSettlementsResourceWithRawResponse(self._simulations.card_settlements) - - @cached_property - def card_reversals(self) -> CardReversalsResourceWithRawResponse: - return CardReversalsResourceWithRawResponse(self._simulations.card_reversals) + def account_transfers(self) -> AccountTransfersWithRawResponse: + return AccountTransfersWithRawResponse(self._simulations.account_transfers) @cached_property - def card_increments(self) -> CardIncrementsResourceWithRawResponse: - return CardIncrementsResourceWithRawResponse(self._simulations.card_increments) + def account_statements(self) -> AccountStatementsWithRawResponse: + return AccountStatementsWithRawResponse(self._simulations.account_statements) @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: - return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) + def ach_transfers(self) -> ACHTransfersWithRawResponse: + return ACHTransfersWithRawResponse(self._simulations.ach_transfers) @cached_property - def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawResponse: - return CardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) + def card_disputes(self) -> CardDisputesWithRawResponse: + return CardDisputesWithRawResponse(self._simulations.card_disputes) @cached_property - def card_refunds(self) -> CardRefundsResourceWithRawResponse: - return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) + def card_refunds(self) -> CardRefundsWithRawResponse: + return CardRefundsWithRawResponse(self._simulations.card_refunds) @cached_property - def card_disputes(self) -> CardDisputesResourceWithRawResponse: - return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) + def check_transfers(self) -> CheckTransfersWithRawResponse: + return CheckTransfersWithRawResponse(self._simulations.check_transfers) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: - return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) + def documents(self) -> DocumentsWithRawResponse: + return DocumentsWithRawResponse(self._simulations.documents) @cached_property - def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: - return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithRawResponse: + return DigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: - return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + def check_deposits(self) -> CheckDepositsWithRawResponse: + return CheckDepositsWithRawResponse(self._simulations.check_deposits) @cached_property - def account_statements(self) -> AccountStatementsResourceWithRawResponse: - return AccountStatementsResourceWithRawResponse(self._simulations.account_statements) + def programs(self) -> ProgramsWithRawResponse: + return ProgramsWithRawResponse(self._simulations.programs) @cached_property - def documents(self) -> DocumentsResourceWithRawResponse: - return DocumentsResourceWithRawResponse(self._simulations.documents) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithRawResponse: + return InboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def programs(self) -> ProgramsResourceWithRawResponse: - return ProgramsResourceWithRawResponse(self._simulations.programs) - - -class AsyncSimulationsResourceWithRawResponse: - def __init__(self, simulations: AsyncSimulationsResource) -> None: - self._simulations = simulations + def inbound_funds_holds(self) -> InboundFundsHoldsWithRawResponse: + return InboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: - return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) + def interest_payments(self) -> InterestPaymentsWithRawResponse: + return InterestPaymentsWithRawResponse(self._simulations.interest_payments) @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithRawResponse: - return AsyncInboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) + def wire_transfers(self) -> WireTransfersWithRawResponse: + return WireTransfersWithRawResponse(self._simulations.wire_transfers) @cached_property - def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: - return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) + def cards(self) -> CardsWithRawResponse: + return CardsWithRawResponse(self._simulations.cards) @cached_property - def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: - return AsyncCheckTransfersResourceWithRawResponse(self._simulations.check_transfers) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithRawResponse: + return RealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: - return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) + def physical_cards(self) -> PhysicalCardsWithRawResponse: + return PhysicalCardsWithRawResponse(self._simulations.physical_cards) @cached_property - def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: - return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) + def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: + return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: - return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithRawResponse: + return InboundInternationalACHTransfersWithRawResponse(self._simulations.inbound_international_ach_transfers) - @cached_property - def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: - return AsyncWireTransfersResourceWithRawResponse(self._simulations.wire_transfers) - @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) +class AsyncSimulationsWithRawResponse: + def __init__(self, simulations: AsyncSimulations) -> None: + self._simulations = simulations - @cached_property - def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( - self._simulations.inbound_real_time_payments_transfers + self.card_authorization_expirations = _legacy_response.async_to_raw_response_wrapper( + simulations.card_authorization_expirations, + ) + self.card_fuel_confirmations = _legacy_response.async_to_raw_response_wrapper( + simulations.card_fuel_confirmations, + ) + self.card_increments = _legacy_response.async_to_raw_response_wrapper( + simulations.card_increments, + ) + self.card_reversals = _legacy_response.async_to_raw_response_wrapper( + simulations.card_reversals, ) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: - return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) - - @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) - - @cached_property - def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: - return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) - - @cached_property - def card_settlements(self) -> AsyncCardSettlementsResourceWithRawResponse: - return AsyncCardSettlementsResourceWithRawResponse(self._simulations.card_settlements) + def account_transfers(self) -> AsyncAccountTransfersWithRawResponse: + return AsyncAccountTransfersWithRawResponse(self._simulations.account_transfers) @cached_property - def card_reversals(self) -> AsyncCardReversalsResourceWithRawResponse: - return AsyncCardReversalsResourceWithRawResponse(self._simulations.card_reversals) + def account_statements(self) -> AsyncAccountStatementsWithRawResponse: + return AsyncAccountStatementsWithRawResponse(self._simulations.account_statements) @cached_property - def card_increments(self) -> AsyncCardIncrementsResourceWithRawResponse: - return AsyncCardIncrementsResourceWithRawResponse(self._simulations.card_increments) + def ach_transfers(self) -> AsyncACHTransfersWithRawResponse: + return AsyncACHTransfersWithRawResponse(self._simulations.ach_transfers) @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: - return AsyncCardAuthorizationExpirationsResourceWithRawResponse( - self._simulations.card_authorization_expirations - ) + def card_disputes(self) -> AsyncCardDisputesWithRawResponse: + return AsyncCardDisputesWithRawResponse(self._simulations.card_disputes) @cached_property - def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: - return AsyncCardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) + def card_refunds(self) -> AsyncCardRefundsWithRawResponse: + return AsyncCardRefundsWithRawResponse(self._simulations.card_refunds) @cached_property - def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: - return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) + def check_transfers(self) -> AsyncCheckTransfersWithRawResponse: + return AsyncCheckTransfersWithRawResponse(self._simulations.check_transfers) @cached_property - def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: - return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) + def documents(self) -> AsyncDocumentsWithRawResponse: + return AsyncDocumentsWithRawResponse(self._simulations.documents) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: - return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: + return AsyncDigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: - return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + def check_deposits(self) -> AsyncCheckDepositsWithRawResponse: + return AsyncCheckDepositsWithRawResponse(self._simulations.check_deposits) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: - return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + def programs(self) -> AsyncProgramsWithRawResponse: + return AsyncProgramsWithRawResponse(self._simulations.programs) @cached_property - def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: - return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: + return AsyncInboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def documents(self) -> AsyncDocumentsResourceWithRawResponse: - return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithRawResponse: + return AsyncInboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def programs(self) -> AsyncProgramsResourceWithRawResponse: - return AsyncProgramsResourceWithRawResponse(self._simulations.programs) - - -class SimulationsResourceWithStreamingResponse: - def __init__(self, simulations: SimulationsResource) -> None: - self._simulations = simulations + def interest_payments(self) -> AsyncInterestPaymentsWithRawResponse: + return AsyncInterestPaymentsWithRawResponse(self._simulations.interest_payments) @cached_property - def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: - return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + def wire_transfers(self) -> AsyncWireTransfersWithRawResponse: + return AsyncWireTransfersWithRawResponse(self._simulations.wire_transfers) @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithStreamingResponse: - return InboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) + def cards(self) -> AsyncCardsWithRawResponse: + return AsyncCardsWithRawResponse(self._simulations.cards) @cached_property - def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: - return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: + return AsyncRealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: - return CheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) + def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: + return AsyncPhysicalCardsWithRawResponse(self._simulations.physical_cards) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: - return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: + return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: - return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: + return AsyncInboundInternationalACHTransfersWithRawResponse( + self._simulations.inbound_international_ach_transfers + ) - @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: - return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) - @cached_property - def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: - return WireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) +class SimulationsWithStreamingResponse: + def __init__(self, simulations: Simulations) -> None: + self._simulations = simulations - @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: - return InboundWireDrawdownRequestsResourceWithStreamingResponse( - self._simulations.inbound_wire_drawdown_requests + self.card_authorization_expirations = to_streamed_response_wrapper( + simulations.card_authorization_expirations, ) - - @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.inbound_real_time_payments_transfers + self.card_fuel_confirmations = to_streamed_response_wrapper( + simulations.card_fuel_confirmations, + ) + self.card_increments = to_streamed_response_wrapper( + simulations.card_increments, + ) + self.card_reversals = to_streamed_response_wrapper( + simulations.card_reversals, ) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: - return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) - - @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: - return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) + def account_transfers(self) -> AccountTransfersWithStreamingResponse: + return AccountTransfersWithStreamingResponse(self._simulations.account_transfers) @cached_property - def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: - return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + def account_statements(self) -> AccountStatementsWithStreamingResponse: + return AccountStatementsWithStreamingResponse(self._simulations.account_statements) @cached_property - def card_settlements(self) -> CardSettlementsResourceWithStreamingResponse: - return CardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) + def ach_transfers(self) -> ACHTransfersWithStreamingResponse: + return ACHTransfersWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def card_reversals(self) -> CardReversalsResourceWithStreamingResponse: - return CardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) + def card_disputes(self) -> CardDisputesWithStreamingResponse: + return CardDisputesWithStreamingResponse(self._simulations.card_disputes) @cached_property - def card_increments(self) -> CardIncrementsResourceWithStreamingResponse: - return CardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) + def card_refunds(self) -> CardRefundsWithStreamingResponse: + return CardRefundsWithStreamingResponse(self._simulations.card_refunds) @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: - return CardAuthorizationExpirationsResourceWithStreamingResponse( - self._simulations.card_authorization_expirations - ) + def check_transfers(self) -> CheckTransfersWithStreamingResponse: + return CheckTransfersWithStreamingResponse(self._simulations.check_transfers) @cached_property - def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingResponse: - return CardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) + def documents(self) -> DocumentsWithStreamingResponse: + return DocumentsWithStreamingResponse(self._simulations.documents) @cached_property - def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: - return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithStreamingResponse: + return DigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) @cached_property - def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: - return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + def check_deposits(self) -> CheckDepositsWithStreamingResponse: + return CheckDepositsWithStreamingResponse(self._simulations.check_deposits) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: - return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) + def programs(self) -> ProgramsWithStreamingResponse: + return ProgramsWithStreamingResponse(self._simulations.programs) @cached_property - def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: - return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithStreamingResponse: + return InboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: - return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + def inbound_funds_holds(self) -> InboundFundsHoldsWithStreamingResponse: + return InboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: - return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + def interest_payments(self) -> InterestPaymentsWithStreamingResponse: + return InterestPaymentsWithStreamingResponse(self._simulations.interest_payments) @cached_property - def documents(self) -> DocumentsResourceWithStreamingResponse: - return DocumentsResourceWithStreamingResponse(self._simulations.documents) + def wire_transfers(self) -> WireTransfersWithStreamingResponse: + return WireTransfersWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def programs(self) -> ProgramsResourceWithStreamingResponse: - return ProgramsResourceWithStreamingResponse(self._simulations.programs) - - -class AsyncSimulationsResourceWithStreamingResponse: - def __init__(self, simulations: AsyncSimulationsResource) -> None: - self._simulations = simulations + def cards(self) -> CardsWithStreamingResponse: + return CardsWithStreamingResponse(self._simulations.cards) @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: - return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithStreamingResponse: + return RealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: - return AsyncInboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) + def physical_cards(self) -> PhysicalCardsWithStreamingResponse: + return PhysicalCardsWithStreamingResponse(self._simulations.physical_cards) @cached_property - def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: - return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) + def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: + return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: - return AsyncCheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithStreamingResponse: + return InboundInternationalACHTransfersWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) - @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: - return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) - @cached_property - def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: - return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) +class AsyncSimulationsWithStreamingResponse: + def __init__(self, simulations: AsyncSimulations) -> None: + self._simulations = simulations - @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: - return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + self.card_authorization_expirations = async_to_streamed_response_wrapper( + simulations.card_authorization_expirations, + ) + self.card_fuel_confirmations = async_to_streamed_response_wrapper( + simulations.card_fuel_confirmations, + ) + self.card_increments = async_to_streamed_response_wrapper( + simulations.card_increments, + ) + self.card_reversals = async_to_streamed_response_wrapper( + simulations.card_reversals, + ) @cached_property - def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: - return AsyncWireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) + def account_transfers(self) -> AsyncAccountTransfersWithStreamingResponse: + return AsyncAccountTransfersWithStreamingResponse(self._simulations.account_transfers) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - self._simulations.inbound_wire_drawdown_requests - ) + def account_statements(self) -> AsyncAccountStatementsWithStreamingResponse: + return AsyncAccountStatementsWithStreamingResponse(self._simulations.account_statements) @cached_property - def inbound_real_time_payments_transfers( - self, - ) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.inbound_real_time_payments_transfers - ) + def ach_transfers(self) -> AsyncACHTransfersWithStreamingResponse: + return AsyncACHTransfersWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def card_disputes(self) -> AsyncCardDisputesWithStreamingResponse: + return AsyncCardDisputesWithStreamingResponse(self._simulations.card_disputes) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.real_time_payments_transfers - ) + def card_refunds(self) -> AsyncCardRefundsWithStreamingResponse: + return AsyncCardRefundsWithStreamingResponse(self._simulations.card_refunds) @cached_property - def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: - return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + def check_transfers(self) -> AsyncCheckTransfersWithStreamingResponse: + return AsyncCheckTransfersWithStreamingResponse(self._simulations.check_transfers) @cached_property - def card_settlements(self) -> AsyncCardSettlementsResourceWithStreamingResponse: - return AsyncCardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) + def documents(self) -> AsyncDocumentsWithStreamingResponse: + return AsyncDocumentsWithStreamingResponse(self._simulations.documents) @cached_property - def card_reversals(self) -> AsyncCardReversalsResourceWithStreamingResponse: - return AsyncCardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) @cached_property - def card_increments(self) -> AsyncCardIncrementsResourceWithStreamingResponse: - return AsyncCardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) + def check_deposits(self) -> AsyncCheckDepositsWithStreamingResponse: + return AsyncCheckDepositsWithStreamingResponse(self._simulations.check_deposits) @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: - return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( - self._simulations.card_authorization_expirations - ) + def programs(self) -> AsyncProgramsWithStreamingResponse: + return AsyncProgramsWithStreamingResponse(self._simulations.programs) @cached_property - def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: - return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: - return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithStreamingResponse: + return AsyncInboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: - return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + def interest_payments(self) -> AsyncInterestPaymentsWithStreamingResponse: + return AsyncInterestPaymentsWithStreamingResponse(self._simulations.interest_payments) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse( - self._simulations.digital_wallet_token_requests - ) + def wire_transfers(self) -> AsyncWireTransfersWithStreamingResponse: + return AsyncWireTransfersWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: - return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + def cards(self) -> AsyncCardsWithStreamingResponse: + return AsyncCardsWithStreamingResponse(self._simulations.cards) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: - return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: + return AsyncRealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) @cached_property - def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: - return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: + return AsyncPhysicalCardsWithStreamingResponse(self._simulations.physical_cards) @cached_property - def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: - return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: + return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def programs(self) -> AsyncProgramsResourceWithStreamingResponse: - return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: + return AsyncInboundInternationalACHTransfersWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 9cece56fc..66fcba3dc 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -4,34 +4,50 @@ import httpx +from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..._base_client import make_request_options -from ...types.wire_transfer import WireTransfer +from ...types.simulations import wire_transfer_create_inbound_params +from ...types.inbound_wire_transfer import InboundWireTransfer -__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] +__all__ = ["WireTransfers", "AsyncWireTransfers"] -class WireTransfersResource(SyncAPIResource): +class WireTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersResourceWithRawResponse: - return WireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> WireTransfersWithRawResponse: + return WireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: - return WireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersWithStreamingResponse: + return WireTransfersWithStreamingResponse(self) - def reverse( + def create_inbound( self, - wire_transfer_id: str, *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -39,59 +55,56 @@ def reverse( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> WireTransfer: + ) -> InboundWireTransfer: """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. + Simulates an inbound Wire Transfer to your account. Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - extra_headers: Send extra headers + amount: The transfer amount in cents. Must be positive. - extra_query: Add additional query parameters to the request + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. - extra_body: Add additional JSON properties to the request + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. - timeout: Override the client-level default timeout for this request, in seconds + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. - def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. extra_headers: Send extra headers @@ -103,10 +116,29 @@ def submit( idempotency_key: Specify a custom idempotency key for this request """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", + "/simulations/inbound_wire_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + }, + wire_transfer_create_inbound_params.WireTransferCreateInboundParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -114,23 +146,38 @@ def submit( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=WireTransfer, + cast_to=InboundWireTransfer, ) -class AsyncWireTransfersResource(AsyncAPIResource): +class AsyncWireTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: - return AsyncWireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: + return AsyncWireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: - return AsyncWireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: + return AsyncWireTransfersWithStreamingResponse(self) - async def reverse( + async def create_inbound( self, - wire_transfer_id: str, *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -138,59 +185,56 @@ async def reverse( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> WireTransfer: + ) -> InboundWireTransfer: """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. + Simulates an inbound Wire Transfer to your account. Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - extra_headers: Send extra headers + amount: The transfer amount in cents. Must be positive. - extra_query: Add additional query parameters to the request + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. - extra_body: Add additional JSON properties to the request + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. - timeout: Override the client-level default timeout for this request, in seconds + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. - async def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. extra_headers: Send extra headers @@ -202,10 +246,29 @@ async def submit( idempotency_key: Specify a custom idempotency key for this request """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", + "/simulations/inbound_wire_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + }, + wire_transfer_create_inbound_params.WireTransferCreateInboundParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -213,53 +276,41 @@ async def submit( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=WireTransfer, + cast_to=InboundWireTransfer, ) -class WireTransfersResourceWithRawResponse: - def __init__(self, wire_transfers: WireTransfersResource) -> None: +class WireTransfersWithRawResponse: + def __init__(self, wire_transfers: WireTransfers) -> None: self._wire_transfers = wire_transfers - self.reverse = to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = to_raw_response_wrapper( - wire_transfers.submit, + self.create_inbound = _legacy_response.to_raw_response_wrapper( + wire_transfers.create_inbound, ) -class AsyncWireTransfersResourceWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: +class AsyncWireTransfersWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self._wire_transfers = wire_transfers - self.reverse = async_to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = async_to_raw_response_wrapper( - wire_transfers.submit, + self.create_inbound = _legacy_response.async_to_raw_response_wrapper( + wire_transfers.create_inbound, ) -class WireTransfersResourceWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfersResource) -> None: +class WireTransfersWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfers) -> None: self._wire_transfers = wire_transfers - self.reverse = to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = to_streamed_response_wrapper( - wire_transfers.submit, + self.create_inbound = to_streamed_response_wrapper( + wire_transfers.create_inbound, ) -class AsyncWireTransfersResourceWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: +class AsyncWireTransfersWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self._wire_transfers = wire_transfers - self.reverse = async_to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = async_to_streamed_response_wrapper( - wire_transfers.submit, + self.create_inbound = async_to_streamed_response_wrapper( + wire_transfers.create_inbound, ) diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index 029e2d703..cba7da871 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -4,32 +4,28 @@ import httpx +from .. import _legacy_response from ..types import transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.transaction import Transaction -__all__ = ["TransactionsResource", "AsyncTransactionsResource"] +__all__ = ["Transactions", "AsyncTransactions"] -class TransactionsResource(SyncAPIResource): +class Transactions(SyncAPIResource): @cached_property - def with_raw_response(self) -> TransactionsResourceWithRawResponse: - return TransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> TransactionsWithRawResponse: + return TransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> TransactionsResourceWithStreamingResponse: - return TransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> TransactionsWithStreamingResponse: + return TransactionsWithStreamingResponse(self) def retrieve( self, @@ -128,14 +124,14 @@ def list( ) -class AsyncTransactionsResource(AsyncAPIResource): +class AsyncTransactions(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncTransactionsResourceWithRawResponse: - return AsyncTransactionsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncTransactionsWithRawResponse: + return AsyncTransactionsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncTransactionsResourceWithStreamingResponse: - return AsyncTransactionsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncTransactionsWithStreamingResponse: + return AsyncTransactionsWithStreamingResponse(self) async def retrieve( self, @@ -234,32 +230,32 @@ def list( ) -class TransactionsResourceWithRawResponse: - def __init__(self, transactions: TransactionsResource) -> None: +class TransactionsWithRawResponse: + def __init__(self, transactions: Transactions) -> None: self._transactions = transactions - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( transactions.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( transactions.list, ) -class AsyncTransactionsResourceWithRawResponse: - def __init__(self, transactions: AsyncTransactionsResource) -> None: +class AsyncTransactionsWithRawResponse: + def __init__(self, transactions: AsyncTransactions) -> None: self._transactions = transactions - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( transactions.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( transactions.list, ) -class TransactionsResourceWithStreamingResponse: - def __init__(self, transactions: TransactionsResource) -> None: +class TransactionsWithStreamingResponse: + def __init__(self, transactions: Transactions) -> None: self._transactions = transactions self.retrieve = to_streamed_response_wrapper( @@ -270,8 +266,8 @@ def __init__(self, transactions: TransactionsResource) -> None: ) -class AsyncTransactionsResourceWithStreamingResponse: - def __init__(self, transactions: AsyncTransactionsResource) -> None: +class AsyncTransactionsWithStreamingResponse: + def __init__(self, transactions: AsyncTransactions) -> None: self._transactions = transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index ccbc2de1a..473aeb874 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -6,6 +6,7 @@ import httpx +from .. import _legacy_response from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -14,27 +15,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest -__all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] +__all__ = ["WireDrawdownRequests", "AsyncWireDrawdownRequests"] -class WireDrawdownRequestsResource(SyncAPIResource): +class WireDrawdownRequests(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: - return WireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> WireDrawdownRequestsWithRawResponse: + return WireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireDrawdownRequestsResourceWithStreamingResponse: - return WireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> WireDrawdownRequestsWithStreamingResponse: + return WireDrawdownRequestsWithStreamingResponse(self) def create( self, @@ -242,14 +238,14 @@ def list( ) -class AsyncWireDrawdownRequestsResource(AsyncAPIResource): +class AsyncWireDrawdownRequests(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: - return AsyncWireDrawdownRequestsResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncWireDrawdownRequestsWithRawResponse: + return AsyncWireDrawdownRequestsWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: - return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireDrawdownRequestsWithStreamingResponse: + return AsyncWireDrawdownRequestsWithStreamingResponse(self) async def create( self, @@ -457,38 +453,38 @@ def list( ) -class WireDrawdownRequestsResourceWithRawResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: +class WireDrawdownRequestsWithRawResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( wire_drawdown_requests.list, ) -class AsyncWireDrawdownRequestsResourceWithRawResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: +class AsyncWireDrawdownRequestsWithRawResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( wire_drawdown_requests.list, ) -class WireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: +class WireDrawdownRequestsWithStreamingResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -502,8 +498,8 @@ def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None ) -class AsyncWireDrawdownRequestsResourceWithStreamingResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: +class AsyncWireDrawdownRequestsWithStreamingResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 90d041e0e..2e90dd06f 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -4,6 +4,7 @@ import httpx +from .. import _legacy_response from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -12,27 +13,22 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) +from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_transfer import WireTransfer -__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] +__all__ = ["WireTransfers", "AsyncWireTransfers"] -class WireTransfersResource(SyncAPIResource): +class WireTransfers(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersResourceWithRawResponse: - return WireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> WireTransfersWithRawResponse: + return WireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: - return WireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersWithStreamingResponse: + return WireTransfersWithStreamingResponse(self) def create( self, @@ -326,15 +322,104 @@ def cancel( cast_to=WireTransfer, ) + def reverse( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request -class AsyncWireTransfersResource(AsyncAPIResource): + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) + + def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/submit", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) + + +class AsyncWireTransfers(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: - return AsyncWireTransfersResourceWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: + return AsyncWireTransfersWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: - return AsyncWireTransfersResourceWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: + return AsyncWireTransfersWithStreamingResponse(self) async def create( self, @@ -628,51 +713,152 @@ async def cancel( cast_to=WireTransfer, ) + async def reverse( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return await self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) + + async def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. + + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return await self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/submit", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) + -class WireTransfersResourceWithRawResponse: - def __init__(self, wire_transfers: WireTransfersResource) -> None: +class WireTransfersWithRawResponse: + def __init__(self, wire_transfers: WireTransfers) -> None: self._wire_transfers = wire_transfers - self.create = to_raw_response_wrapper( + self.create = _legacy_response.to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = to_raw_response_wrapper( + self.retrieve = _legacy_response.to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = to_raw_response_wrapper( + self.list = _legacy_response.to_raw_response_wrapper( wire_transfers.list, ) - self.approve = to_raw_response_wrapper( + self.approve = _legacy_response.to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = to_raw_response_wrapper( + self.cancel = _legacy_response.to_raw_response_wrapper( wire_transfers.cancel, ) + self.reverse = _legacy_response.to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = _legacy_response.to_raw_response_wrapper( + wire_transfers.submit, + ) -class AsyncWireTransfersResourceWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: +class AsyncWireTransfersWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self._wire_transfers = wire_transfers - self.create = async_to_raw_response_wrapper( + self.create = _legacy_response.async_to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = async_to_raw_response_wrapper( + self.retrieve = _legacy_response.async_to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = async_to_raw_response_wrapper( + self.list = _legacy_response.async_to_raw_response_wrapper( wire_transfers.list, ) - self.approve = async_to_raw_response_wrapper( + self.approve = _legacy_response.async_to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = async_to_raw_response_wrapper( + self.cancel = _legacy_response.async_to_raw_response_wrapper( wire_transfers.cancel, ) + self.reverse = _legacy_response.async_to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = _legacy_response.async_to_raw_response_wrapper( + wire_transfers.submit, + ) -class WireTransfersResourceWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfersResource) -> None: +class WireTransfersWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfers) -> None: self._wire_transfers = wire_transfers self.create = to_streamed_response_wrapper( @@ -690,10 +876,16 @@ def __init__(self, wire_transfers: WireTransfersResource) -> None: self.cancel = to_streamed_response_wrapper( wire_transfers.cancel, ) + self.reverse = to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = to_streamed_response_wrapper( + wire_transfers.submit, + ) -class AsyncWireTransfersResourceWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: +class AsyncWireTransfersWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self._wire_transfers = wire_transfers self.create = async_to_streamed_response_wrapper( @@ -711,3 +903,9 @@ def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self.cancel = async_to_streamed_response_wrapper( wire_transfers.cancel, ) + self.reverse = async_to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = async_to_streamed_response_wrapper( + wire_transfers.submit, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 412ea7621..c643cfabc 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -18,13 +18,14 @@ from .card_details import CardDetails as CardDetails from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment +from .lockbox_list import LockboxList as LockboxList from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard from .wire_transfer import WireTransfer as WireTransfer from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer -from .intrafi_balance import IntrafiBalance as IntrafiBalance +from .routing_number import RoutingNumber as RoutingNumber from .account_transfer import AccountTransfer as AccountTransfer from .card_list_params import CardListParams as CardListParams from .external_account import ExternalAccount as ExternalAccount @@ -34,7 +35,6 @@ from .bookkeeping_entry import BookkeepingEntry as BookkeepingEntry from .event_list_params import EventListParams as EventListParams from .inbound_mail_item import InboundMailItem as InboundMailItem -from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams @@ -66,6 +66,7 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams +from .inbound_mail_item_list import InboundMailItemList as InboundMailItemList from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams @@ -80,7 +81,6 @@ from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams -from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams @@ -91,16 +91,13 @@ from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams -from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams -from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest -from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams @@ -108,7 +105,6 @@ from .proof_of_authorization_request import ProofOfAuthorizationRequest as ProofOfAuthorizationRequest from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams -from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams @@ -117,6 +113,7 @@ from .event_subscription_update_params import EventSubscriptionUpdateParams as EventSubscriptionUpdateParams from .inbound_ach_transfer_list_params import InboundACHTransferListParams as InboundACHTransferListParams from .real_time_decision_action_params import RealTimeDecisionActionParams as RealTimeDecisionActionParams +from .simulation_card_reversals_params import SimulationCardReversalsParams as SimulationCardReversalsParams from .ach_prenotification_create_params import ACHPrenotificationCreateParams as ACHPrenotificationCreateParams from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams @@ -125,37 +122,22 @@ from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams -from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams +from .simulation_card_increments_params import SimulationCardIncrementsParams as SimulationCardIncrementsParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams -from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams -from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams -from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams -from .entity_create_beneficial_owner_params import ( - EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, -) -from .entity_archive_beneficial_owner_params import ( - EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, -) -from .intrafi_account_enrollment_list_params import ( - IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, -) from .real_time_payments_request_for_payment import ( RealTimePaymentsRequestForPayment as RealTimePaymentsRequestForPayment, ) from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) -from .intrafi_account_enrollment_create_params import ( - IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, -) from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) @@ -165,14 +147,20 @@ from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) +from .simulation_card_fuel_confirmations_params import ( + SimulationCardFuelConfirmationsParams as SimulationCardFuelConfirmationsParams, +) from .proof_of_authorization_request_list_params import ( ProofOfAuthorizationRequestListParams as ProofOfAuthorizationRequestListParams, ) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) -from .entity_update_beneficial_owner_address_params import ( - EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, +from .simulation_card_authorization_expirations_params import ( + SimulationCardAuthorizationExpirationsParams as SimulationCardAuthorizationExpirationsParams, +) +from .inbound_ach_transfer_notification_of_change_params import ( + InboundACHTransferNotificationOfChangeParams as InboundACHTransferNotificationOfChangeParams, ) from .real_time_payments_request_for_payment_list_params import ( RealTimePaymentsRequestForPaymentListParams as RealTimePaymentsRequestForPaymentListParams, @@ -186,6 +174,3 @@ from .proof_of_authorization_request_submission_create_params import ( ProofOfAuthorizationRequestSubmissionCreateParams as ProofOfAuthorizationRequestSubmissionCreateParams, ) -from .inbound_ach_transfer_create_notification_of_change_params import ( - InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, -) diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 689b6cd4d..9fe9fc08b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -20,6 +20,7 @@ "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", + "SourceInternationalACHDecline", "SourceWireDecline", ] @@ -655,6 +656,252 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The Real-Time Payments network identification of the declined transfer.""" +class SourceInternationalACHDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -699,6 +946,7 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", @@ -716,6 +964,8 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. + - `international_ach_decline` - International ACH Decline: details will be under + the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -745,6 +995,13 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ + international_ach_decline: Optional[SourceInternationalACHDecline] = None + """An International ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `international_ach_decline`. + """ + wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index 0a4ca27b8..e79abff89 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,6 +41,7 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/entities/__init__.py b/src/increase/types/entities/__init__.py new file mode 100644 index 000000000..e7b6ad184 --- /dev/null +++ b/src/increase/types/entities/__init__.py @@ -0,0 +1,13 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .supplemental_document import SupplementalDocument as SupplementalDocument +from .industry_code_create_params import IndustryCodeCreateParams as IndustryCodeCreateParams +from .beneficial_owner_create_params import BeneficialOwnerCreateParams as BeneficialOwnerCreateParams +from .beneficial_owner_archive_params import BeneficialOwnerArchiveParams as BeneficialOwnerArchiveParams +from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams +from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams +from .beneficial_owner_update_address_params import ( + BeneficialOwnerUpdateAddressParams as BeneficialOwnerUpdateAddressParams, +) diff --git a/src/increase/types/entity_archive_beneficial_owner_params.py b/src/increase/types/entities/beneficial_owner_archive_params.py similarity index 63% rename from src/increase/types/entity_archive_beneficial_owner_params.py rename to src/increase/types/entities/beneficial_owner_archive_params.py index d430cf7e4..cd13deb9c 100644 --- a/src/increase/types/entity_archive_beneficial_owner_params.py +++ b/src/increase/types/entities/beneficial_owner_archive_params.py @@ -4,12 +4,15 @@ from typing_extensions import Required, TypedDict -__all__ = ["EntityArchiveBeneficialOwnerParams"] +__all__ = ["BeneficialOwnerArchiveParams"] -class EntityArchiveBeneficialOwnerParams(TypedDict, total=False): +class BeneficialOwnerArchiveParams(TypedDict, total=False): beneficial_owner_id: Required[str] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ + + entity_id: Required[str] + """The identifier of the Entity to retrieve.""" diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entities/beneficial_owner_create_params.py similarity index 95% rename from src/increase/types/entity_create_beneficial_owner_params.py rename to src/increase/types/entities/beneficial_owner_create_params.py index 7c95dc04b..1aee87eff 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entities/beneficial_owner_create_params.py @@ -6,10 +6,10 @@ from datetime import date from typing_extensions import Literal, Required, Annotated, TypedDict -from .._utils import PropertyInfo +from ..._utils import PropertyInfo __all__ = [ - "EntityCreateBeneficialOwnerParams", + "BeneficialOwnerCreateParams", "BeneficialOwner", "BeneficialOwnerIndividual", "BeneficialOwnerIndividualAddress", @@ -20,13 +20,16 @@ ] -class EntityCreateBeneficialOwnerParams(TypedDict, total=False): +class BeneficialOwnerCreateParams(TypedDict, total=False): beneficial_owner: Required[BeneficialOwner] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ + entity_id: Required[str] + """The identifier of the Entity to associate with the new Beneficial Owner.""" + class BeneficialOwnerIndividualAddress(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entities/beneficial_owner_update_address_params.py similarity index 82% rename from src/increase/types/entity_update_beneficial_owner_address_params.py rename to src/increase/types/entities/beneficial_owner_update_address_params.py index 862389978..00db2088a 100644 --- a/src/increase/types/entity_update_beneficial_owner_address_params.py +++ b/src/increase/types/entities/beneficial_owner_update_address_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["EntityUpdateBeneficialOwnerAddressParams", "Address"] +__all__ = ["BeneficialOwnerUpdateAddressParams", "Address"] -class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): +class BeneficialOwnerUpdateAddressParams(TypedDict, total=False): address: Required[Address] """The individual's physical address. @@ -20,6 +20,9 @@ class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): corporation. """ + entity_id: Required[str] + """The identifier of the Entity to retrieve.""" + class Address(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entity_update_industry_code_params.py b/src/increase/types/entities/industry_code_create_params.py similarity index 84% rename from src/increase/types/entity_update_industry_code_params.py rename to src/increase/types/entities/industry_code_create_params.py index 7843d7137..254bbbf3e 100644 --- a/src/increase/types/entity_update_industry_code_params.py +++ b/src/increase/types/entities/industry_code_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["EntityUpdateIndustryCodeParams"] +__all__ = ["IndustryCodeCreateParams"] -class EntityUpdateIndustryCodeParams(TypedDict, total=False): +class IndustryCodeCreateParams(TypedDict, total=False): industry_code: Required[str] """ The North American Industry Classification System (NAICS) code for the diff --git a/src/increase/types/entity_supplemental_document.py b/src/increase/types/entities/supplemental_document.py similarity index 81% rename from src/increase/types/entity_supplemental_document.py rename to src/increase/types/entities/supplemental_document.py index 695107f9d..fbee31bb4 100644 --- a/src/increase/types/entity_supplemental_document.py +++ b/src/increase/types/entities/supplemental_document.py @@ -4,21 +4,18 @@ from datetime import datetime from typing_extensions import Literal -from .._models import BaseModel +from ..._models import BaseModel -__all__ = ["EntitySupplementalDocument"] +__all__ = ["SupplementalDocument"] -class EntitySupplementalDocument(BaseModel): +class SupplementalDocument(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Supplemental Document was created. """ - entity_id: str - """The Entity the supplemental document is attached to.""" - file_id: str """The File containing the document.""" diff --git a/src/increase/types/supplemental_document_create_params.py b/src/increase/types/entities/supplemental_document_create_params.py similarity index 76% rename from src/increase/types/supplemental_document_create_params.py rename to src/increase/types/entities/supplemental_document_create_params.py index 50169258d..74939db4e 100644 --- a/src/increase/types/supplemental_document_create_params.py +++ b/src/increase/types/entities/supplemental_document_create_params.py @@ -8,8 +8,5 @@ class SupplementalDocumentCreateParams(TypedDict, total=False): - entity_id: Required[str] - """The identifier of the Entity to associate with the supplemental document.""" - file_id: Required[str] """The identifier of the File containing the document.""" diff --git a/src/increase/types/supplemental_document_list_params.py b/src/increase/types/entities/supplemental_document_list_params.py similarity index 100% rename from src/increase/types/supplemental_document_list_params.py rename to src/increase/types/entities/supplemental_document_list_params.py diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index afeb6da56..7f0974807 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -5,7 +5,6 @@ from typing_extensions import Literal from .._models import BaseModel -from .entity_supplemental_document import EntitySupplementalDocument __all__ = [ "Entity", @@ -25,6 +24,7 @@ "NaturalPerson", "NaturalPersonAddress", "NaturalPersonIdentification", + "SupplementalDocument", "Trust", "TrustAddress", "TrustGrantor", @@ -333,6 +333,31 @@ class NaturalPerson(BaseModel): """The person's legal name.""" +class SupplementalDocument(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the + Supplemental Document was created. + """ + + file_id: str + """The File containing the document.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + type: Literal["entity_supplemental_document"] + """A constant representing the object's type. + + For this resource it will always be `entity_supplemental_document`. + """ + + class TrustAddress(BaseModel): city: str """The city of the address.""" @@ -581,7 +606,7 @@ class Entity(BaseModel): - `government_authority` - A government authority. """ - supplemental_documents: List[EntitySupplementalDocument] + supplemental_documents: List[SupplementalDocument] """Additional documentation associated with the entity. This is limited to the first 10 documents for an entity. If an entity has more diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 12f7c5d90..237b1b61a 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -13,7 +13,6 @@ "AddendaFreeform", "AddendaFreeformEntry", "Decline", - "InternationalAddenda", "NotificationOfChange", "TransferReturn", ] @@ -99,234 +98,6 @@ class Decline(BaseModel): """ -class InternationalAddenda(BaseModel): - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - class NotificationOfChange(BaseModel): updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -413,12 +184,6 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ - international_addenda: Optional[InternationalAddenda] = None - """ - If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will - contain fields pertaining to the International ACH Transaction. - """ - notification_of_change: Optional[NotificationOfChange] = None """ If you initiate a notification of change in response to the transfer, this will @@ -468,7 +233,6 @@ class InboundACHTransfer(BaseModel): "point_of_purchase", "check_truncation", "destroyed_check", - "international_ach_transaction", ] """The Standard Entry Class (SEC) code of the transfer. @@ -487,7 +251,6 @@ class InboundACHTransfer(BaseModel): - `point_of_purchase` - Point of Purchase (POP). - `check_truncation` - Check Truncation (TRC). - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). """ status: Literal["pending", "declined", "accepted", "returned"] diff --git a/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py b/src/increase/types/inbound_ach_transfer_notification_of_change_params.py similarity index 72% rename from src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py rename to src/increase/types/inbound_ach_transfer_notification_of_change_params.py index 73920dc71..239820edc 100644 --- a/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py +++ b/src/increase/types/inbound_ach_transfer_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["InboundACHTransferCreateNotificationOfChangeParams"] +__all__ = ["InboundACHTransferNotificationOfChangeParams"] -class InboundACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): +class InboundACHTransferNotificationOfChangeParams(TypedDict, total=False): updated_account_number: str """The updated account number to send in the notification of change.""" diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index b75b6e5a5..44ae731ff 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,14 +10,6 @@ class DepositReturn(BaseModel): - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] - """The reason the deposit was returned. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - """ - returned_at: datetime """The time at which the deposit was returned.""" @@ -106,13 +98,12 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined", "returned"] + status: Literal["pending", "accepted", "declined"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. - - `returned` - The Inbound Check Deposit was returned. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py deleted file mode 100644 index 169cc55aa..000000000 --- a/src/increase/types/inbound_check_deposit_return_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["InboundCheckDepositReturnParams"] - - -class InboundCheckDepositReturnParams(TypedDict, total=False): - reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] - """The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - """ diff --git a/src/increase/types/inbound_mail_item_list.py b/src/increase/types/inbound_mail_item_list.py new file mode 100644 index 000000000..5831477ec --- /dev/null +++ b/src/increase/types/inbound_mail_item_list.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .._models import BaseModel +from .inbound_mail_item import InboundMailItem + +__all__ = ["InboundMailItemList"] + + +class InboundMailItemList(BaseModel): + data: List[InboundMailItem] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index c2d381d36..75e36f1a3 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -79,9 +79,6 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire transfer.""" - status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. diff --git a/src/increase/types/intrafi/__init__.py b/src/increase/types/intrafi/__init__.py new file mode 100644 index 000000000..89dd10101 --- /dev/null +++ b/src/increase/types/intrafi/__init__.py @@ -0,0 +1,11 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from .intrafi_balance import IntrafiBalance as IntrafiBalance +from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion +from .exclusion_list_params import ExclusionListParams as ExclusionListParams +from .exclusion_create_params import ExclusionCreateParams as ExclusionCreateParams +from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment +from .account_enrollment_list_params import AccountEnrollmentListParams as AccountEnrollmentListParams +from .account_enrollment_create_params import AccountEnrollmentCreateParams as AccountEnrollmentCreateParams diff --git a/src/increase/types/intrafi_account_enrollment_create_params.py b/src/increase/types/intrafi/account_enrollment_create_params.py similarity index 76% rename from src/increase/types/intrafi_account_enrollment_create_params.py rename to src/increase/types/intrafi/account_enrollment_create_params.py index 0445b37ae..a213e0882 100644 --- a/src/increase/types/intrafi_account_enrollment_create_params.py +++ b/src/increase/types/intrafi/account_enrollment_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["IntrafiAccountEnrollmentCreateParams"] +__all__ = ["AccountEnrollmentCreateParams"] -class IntrafiAccountEnrollmentCreateParams(TypedDict, total=False): +class AccountEnrollmentCreateParams(TypedDict, total=False): account_id: Required[str] """The identifier for the account to be added to IntraFi.""" diff --git a/src/increase/types/intrafi_account_enrollment_list_params.py b/src/increase/types/intrafi/account_enrollment_list_params.py similarity index 90% rename from src/increase/types/intrafi_account_enrollment_list_params.py rename to src/increase/types/intrafi/account_enrollment_list_params.py index a20c00571..86247eb1c 100644 --- a/src/increase/types/intrafi_account_enrollment_list_params.py +++ b/src/increase/types/intrafi/account_enrollment_list_params.py @@ -5,10 +5,10 @@ from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["IntrafiAccountEnrollmentListParams", "Status"] +__all__ = ["AccountEnrollmentListParams", "Status"] -class IntrafiAccountEnrollmentListParams(TypedDict, total=False): +class AccountEnrollmentListParams(TypedDict, total=False): account_id: str """Filter IntraFi Account Enrollments to the one belonging to an account.""" diff --git a/src/increase/types/intrafi_exclusion_create_params.py b/src/increase/types/intrafi/exclusion_create_params.py similarity index 78% rename from src/increase/types/intrafi_exclusion_create_params.py rename to src/increase/types/intrafi/exclusion_create_params.py index 1a0c78dc3..8075260bd 100644 --- a/src/increase/types/intrafi_exclusion_create_params.py +++ b/src/increase/types/intrafi/exclusion_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["IntrafiExclusionCreateParams"] +__all__ = ["ExclusionCreateParams"] -class IntrafiExclusionCreateParams(TypedDict, total=False): +class ExclusionCreateParams(TypedDict, total=False): bank_name: Required[str] """The name of the financial institution to be excluded.""" diff --git a/src/increase/types/intrafi_exclusion_list_params.py b/src/increase/types/intrafi/exclusion_list_params.py similarity index 88% rename from src/increase/types/intrafi_exclusion_list_params.py rename to src/increase/types/intrafi/exclusion_list_params.py index 8b20a277e..07d9859fb 100644 --- a/src/increase/types/intrafi_exclusion_list_params.py +++ b/src/increase/types/intrafi/exclusion_list_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["IntrafiExclusionListParams"] +__all__ = ["ExclusionListParams"] -class IntrafiExclusionListParams(TypedDict, total=False): +class ExclusionListParams(TypedDict, total=False): cursor: str """Return the page of entries after this one.""" diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi/intrafi_account_enrollment.py similarity index 98% rename from src/increase/types/intrafi_account_enrollment.py rename to src/increase/types/intrafi/intrafi_account_enrollment.py index 4f7eb73d5..bf22fe514 100644 --- a/src/increase/types/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi/intrafi_account_enrollment.py @@ -3,7 +3,7 @@ from typing import Optional from typing_extensions import Literal -from .._models import BaseModel +from ..._models import BaseModel __all__ = ["IntrafiAccountEnrollment"] diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi/intrafi_balance.py similarity index 98% rename from src/increase/types/intrafi_balance.py rename to src/increase/types/intrafi/intrafi_balance.py index 7c79445d6..e93235731 100644 --- a/src/increase/types/intrafi_balance.py +++ b/src/increase/types/intrafi/intrafi_balance.py @@ -4,7 +4,7 @@ from datetime import date from typing_extensions import Literal -from .._models import BaseModel +from ..._models import BaseModel __all__ = ["IntrafiBalance", "Balance", "BalanceBankLocation"] diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi/intrafi_exclusion.py similarity index 98% rename from src/increase/types/intrafi_exclusion.py rename to src/increase/types/intrafi/intrafi_exclusion.py index 6b1c35abd..775fbfae3 100644 --- a/src/increase/types/intrafi_exclusion.py +++ b/src/increase/types/intrafi/intrafi_exclusion.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from .._models import BaseModel +from ..._models import BaseModel __all__ = ["IntrafiExclusion"] diff --git a/src/increase/types/lockbox_list.py b/src/increase/types/lockbox_list.py new file mode 100644 index 000000000..52bb1ef89 --- /dev/null +++ b/src/increase/types/lockbox_list.py @@ -0,0 +1,16 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional + +from .lockbox import Lockbox +from .._models import BaseModel + +__all__ = ["LockboxList"] + + +class LockboxList(BaseModel): + data: List[Lockbox] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number.py similarity index 94% rename from src/increase/types/routing_number_list_response.py rename to src/increase/types/routing_number.py index 7fbca1e8d..f9bab1249 100644 --- a/src/increase/types/routing_number_list_response.py +++ b/src/increase/types/routing_number.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["RoutingNumberListResponse"] +__all__ = ["RoutingNumber"] -class RoutingNumberListResponse(BaseModel): +class RoutingNumber(BaseModel): ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. diff --git a/src/increase/types/simulations/card_authorization_expiration_create_params.py b/src/increase/types/simulation_card_authorization_expirations_params.py similarity index 66% rename from src/increase/types/simulations/card_authorization_expiration_create_params.py rename to src/increase/types/simulation_card_authorization_expirations_params.py index 1fda3504d..00aa2e09f 100644 --- a/src/increase/types/simulations/card_authorization_expiration_create_params.py +++ b/src/increase/types/simulation_card_authorization_expirations_params.py @@ -4,9 +4,9 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardAuthorizationExpirationCreateParams"] +__all__ = ["SimulationCardAuthorizationExpirationsParams"] -class CardAuthorizationExpirationCreateParams(TypedDict, total=False): +class SimulationCardAuthorizationExpirationsParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to expire.""" diff --git a/src/increase/types/simulations/card_fuel_confirmation_create_params.py b/src/increase/types/simulation_card_fuel_confirmations_params.py similarity index 78% rename from src/increase/types/simulations/card_fuel_confirmation_create_params.py rename to src/increase/types/simulation_card_fuel_confirmations_params.py index 4ebfc413a..90af445be 100644 --- a/src/increase/types/simulations/card_fuel_confirmation_create_params.py +++ b/src/increase/types/simulation_card_fuel_confirmations_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardFuelConfirmationCreateParams"] +__all__ = ["SimulationCardFuelConfirmationsParams"] -class CardFuelConfirmationCreateParams(TypedDict, total=False): +class SimulationCardFuelConfirmationsParams(TypedDict, total=False): amount: Required[int] """ The amount of the fuel_confirmation in minor units in the card authorization's diff --git a/src/increase/types/simulations/card_increment_create_params.py b/src/increase/types/simulation_card_increments_params.py similarity index 87% rename from src/increase/types/simulations/card_increment_create_params.py rename to src/increase/types/simulation_card_increments_params.py index 85f2aafc5..564c0631c 100644 --- a/src/increase/types/simulations/card_increment_create_params.py +++ b/src/increase/types/simulation_card_increments_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardIncrementCreateParams"] +__all__ = ["SimulationCardIncrementsParams"] -class CardIncrementCreateParams(TypedDict, total=False): +class SimulationCardIncrementsParams(TypedDict, total=False): amount: Required[int] """ The amount of the increment in minor units in the card authorization's currency. diff --git a/src/increase/types/simulations/card_reversal_create_params.py b/src/increase/types/simulation_card_reversals_params.py similarity index 80% rename from src/increase/types/simulations/card_reversal_create_params.py rename to src/increase/types/simulation_card_reversals_params.py index ad0b9c8d2..3ee6bdc91 100644 --- a/src/increase/types/simulations/card_reversal_create_params.py +++ b/src/increase/types/simulation_card_reversals_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardReversalCreateParams"] +__all__ = ["SimulationCardReversalsParams"] -class CardReversalCreateParams(TypedDict, total=False): +class SimulationCardReversalsParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to create a reversal on.""" diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 3d3e77b31..ccd925666 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -2,32 +2,30 @@ from __future__ import annotations +from .card_authorize_params import CardAuthorizeParams as CardAuthorizeParams from .program_create_params import ProgramCreateParams as ProgramCreateParams +from .card_settlement_params import CardSettlementParams as CardSettlementParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams -from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams -from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams -from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams +from .card_authorization_simulation import CardAuthorizationSimulation as CardAuthorizationSimulation from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams -from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams -from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse -from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams +from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams +from .inbound_international_ach_transfer import InboundInternationalACHTransfer as InboundInternationalACHTransfer from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse -from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams -from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams -from .physical_card_advance_shipment_params import ( - PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, +from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams +from .physical_card_shipment_advance_params import ( + PhysicalCardShipmentAdvanceParams as PhysicalCardShipmentAdvanceParams, +) +from .ach_transfer_notification_of_change_params import ( + ACHTransferNotificationOfChangeParams as ACHTransferNotificationOfChangeParams, ) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) -from .card_authorization_expiration_create_params import ( - CardAuthorizationExpirationCreateParams as CardAuthorizationExpirationCreateParams, -) from .inbound_wire_drawdown_request_create_params import ( InboundWireDrawdownRequestCreateParams as InboundWireDrawdownRequestCreateParams, ) @@ -37,12 +35,12 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) -from .ach_transfer_create_notification_of_change_params import ( - ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, +from .inbound_international_ach_transfer_create_params import ( + InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, ) -from .inbound_real_time_payments_transfer_create_params import ( - InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, +from .real_time_payments_transfer_create_inbound_params import ( + RealTimePaymentsTransferCreateInboundParams as RealTimePaymentsTransferCreateInboundParams, ) -from .inbound_real_time_payments_transfer_create_response import ( - InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, +from .inbound_real_time_payments_transfer_simulation_result import ( + InboundRealTimePaymentsTransferSimulationResult as InboundRealTimePaymentsTransferSimulationResult, ) diff --git a/src/increase/types/simulations/ach_transfer_create_inbound_params.py b/src/increase/types/simulations/ach_transfer_create_inbound_params.py new file mode 100644 index 000000000..077cea994 --- /dev/null +++ b/src/increase/types/simulations/ach_transfer_create_inbound_params.py @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["ACHTransferCreateInboundParams"] + + +class ACHTransferCreateInboundParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the inbound ACH Transfer is for.""" + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + company_descriptive_date: str + """The description of the date of the transfer.""" + + company_discretionary_data: str + """Data associated with the transfer set by the sender.""" + + company_entry_description: str + """The description of the transfer set by the sender.""" + + company_id: str + """The sender's company ID.""" + + company_name: str + """The name of the sender.""" + + receiver_id_number: str + """The ID of the receiver of the transfer.""" + + receiver_name: str + """The name of the receiver of the transfer.""" + + resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The time at which the transfer should be resolved. + + If not provided will resolve immediately. + """ diff --git a/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_notification_of_change_params.py similarity index 96% rename from src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py rename to src/increase/types/simulations/ach_transfer_notification_of_change_params.py index 13a1f88d9..c08626084 100644 --- a/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py +++ b/src/increase/types/simulations/ach_transfer_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ACHTransferCreateNotificationOfChangeParams"] +__all__ = ["ACHTransferNotificationOfChangeParams"] -class ACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): +class ACHTransferNotificationOfChangeParams(TypedDict, total=False): change_code: Required[ Literal[ "incorrect_account_number", diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py deleted file mode 100644 index 5944bf00d..000000000 --- a/src/increase/types/simulations/card_authorization_create_response.py +++ /dev/null @@ -1,33 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel -from ..pending_transaction import PendingTransaction -from ..declined_transaction import DeclinedTransaction - -__all__ = ["CardAuthorizationCreateResponse"] - - -class CardAuthorizationCreateResponse(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the authorization attempt fails, this will contain the resulting - [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of `category: card_decline`. - """ - - pending_transaction: Optional[PendingTransaction] = None - """ - If the authorization attempt succeeds, this will contain the resulting Pending - Transaction object. The Pending Transaction's `source` will be of - `category: card_authorization`. - """ - - type: Literal["inbound_card_authorization_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_card_authorization_simulation_result`. - """ diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py new file mode 100644 index 000000000..7676b2b33 --- /dev/null +++ b/src/increase/types/simulations/card_authorization_simulation.py @@ -0,0 +1,1817 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = [ + "CardAuthorizationSimulation", + "DeclinedTransaction", + "DeclinedTransactionSource", + "DeclinedTransactionSourceACHDecline", + "DeclinedTransactionSourceCardDecline", + "DeclinedTransactionSourceCardDeclineNetworkDetails", + "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", + "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", + "DeclinedTransactionSourceCardDeclineVerification", + "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", + "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", + "DeclinedTransactionSourceCheckDecline", + "DeclinedTransactionSourceCheckDepositRejection", + "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", + "DeclinedTransactionSourceInternationalACHDecline", + "DeclinedTransactionSourceWireDecline", + "PendingTransaction", + "PendingTransactionSource", + "PendingTransactionSourceAccountTransferInstruction", + "PendingTransactionSourceACHTransferInstruction", + "PendingTransactionSourceCardAuthorization", + "PendingTransactionSourceCardAuthorizationNetworkDetails", + "PendingTransactionSourceCardAuthorizationNetworkDetailsVisa", + "PendingTransactionSourceCardAuthorizationNetworkIdentifiers", + "PendingTransactionSourceCardAuthorizationVerification", + "PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode", + "PendingTransactionSourceCardAuthorizationVerificationCardholderAddress", + "PendingTransactionSourceCheckDepositInstruction", + "PendingTransactionSourceCheckTransferInstruction", + "PendingTransactionSourceInboundFundsHold", + "PendingTransactionSourceRealTimePaymentsTransferInstruction", + "PendingTransactionSourceWireTransferInstruction", +] + + +class DeclinedTransactionSourceACHDecline(BaseModel): + id: str + """The ACH Decline's identifier.""" + + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + + originator_company_descriptive_date: Optional[str] = None + """The descriptive date of the transfer.""" + + originator_company_discretionary_data: Optional[str] = None + """The additional information included with the transfer.""" + + originator_company_id: str + """The identifier of the company that initiated the transfer.""" + + originator_company_name: str + """The name of the company that initiated the transfer.""" + + reason: Literal[ + "ach_route_canceled", + "ach_route_disabled", + "breaches_limit", + "credit_entry_refused_by_receiver", + "duplicate_return", + "entity_not_active", + "field_error", + "group_locked", + "insufficient_funds", + "misrouted_return", + "return_of_erroneous_or_reversing_debit", + "no_ach_route", + "originator_request", + "transaction_not_allowed", + "user_initiated", + ] + """Why the ACH transfer was declined. + + - `ach_route_canceled` - The account number is canceled. + - `ach_route_disabled` - The account number is disabled. + - `breaches_limit` - The transaction would cause an Increase limit to be + exceeded. + - `credit_entry_refused_by_receiver` - A credit was refused. This is a + reasonable default reason for decline of credits. + - `duplicate_return` - A rare return reason. The return this message refers to + was a duplicate. + - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. + - `group_locked` - Your account is inactive. + - `insufficient_funds` - Your account contains insufficient funds. + - `misrouted_return` - A rare return reason. The return this message refers to + was misrouted. + - `return_of_erroneous_or_reversing_debit` - The originating financial + institution made a mistake and this return corrects it. + - `no_ach_route` - The account number that was debited does not exist. + - `originator_request` - The originating financial institution asked for this + transfer to be returned. + - `transaction_not_allowed` - The transaction is not allowed per Increase's + terms. + - `user_initiated` - Your integration declined this transfer via the API. + """ + + receiver_id_number: Optional[str] = None + """The id of the receiver of the transfer.""" + + receiver_name: Optional[str] = None + """The name of the receiver of the transfer.""" + + trace_number: str + """The trace number of the transfer.""" + + type: Literal["ach_decline"] + """A constant representing the object's type. + + For this resource it will always be `ach_decline`. + """ + + +class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however , cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + +class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): + category: Literal["visa"] + """The payment network used to process this card authorization. + + - `visa` - Visa + """ + + visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + ] + """The address verification result returned to the card network. + + - `not_checked` - No adress was provided in the authorization request. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + """ + + +class DeclinedTransactionSourceCardDeclineVerification(BaseModel): + card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class DeclinedTransactionSourceCardDecline(BaseModel): + id: str + """The Card Decline identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this authorization was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + account currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: Optional[str] = None + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: Optional[str] = None + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: DeclinedTransactionSourceCardDeclineNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + ] + """ + The processing category describes the intent behind the authorization, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + reason: Literal[ + "card_not_active", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "suspected_fraud", + ] + """Why the transaction was declined. + + - `card_not_active` - The Card was not active. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + """ + + verification: DeclinedTransactionSourceCardDeclineVerification + """Fields related to verification of cardholder-provided values.""" + + +class DeclinedTransactionSourceCheckDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + auxiliary_on_us: Optional[str] = None + """ + A computer-readable number printed on the MICR line of business checks, usually + the check number. This is useful for positive pay checks, but can be unreliably + transmitted by the bank of first deposit. + """ + + back_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the back of the + declined check. + """ + + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + + front_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the front of the + declined check. + """ + + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + + reason: Literal[ + "ach_route_disabled", + "ach_route_canceled", + "altered_or_fictitious", + "breaches_limit", + "entity_not_active", + "group_locked", + "insufficient_funds", + "stop_payment_requested", + "duplicate_presentment", + "not_authorized", + "amount_mismatch", + "not_our_item", + "no_account_number_found", + "refer_to_image", + "unable_to_process", + "user_initiated", + ] + """Why the check was declined. + + - `ach_route_disabled` - The account number is disabled. + - `ach_route_canceled` - The account number is canceled. + - `altered_or_fictitious` - The deposited check was altered or fictitious. + - `breaches_limit` - The transaction would cause a limit to be exceeded. + - `entity_not_active` - The account's entity is not active. + - `group_locked` - Your account is inactive. + - `insufficient_funds` - Your account contains insufficient funds. + - `stop_payment_requested` - Stop payment requested for this check. + - `duplicate_presentment` - The check was a duplicate deposit. + - `not_authorized` - The check was not authorized. + - `amount_mismatch` - The amount the receiving bank is attempting to deposit + does not match the amount on the check. + - `not_our_item` - The check attempting to be deposited does not belong to + Increase. + - `no_account_number_found` - The account number on the check does not exist at + Increase. + - `refer_to_image` - The check is not readable. Please refer to the image. + - `unable_to_process` - The check cannot be processed. This is rare: please + contact support. + - `user_initiated` - Your integration declined this check via the API. + """ + + +class DeclinedTransactionSourceCheckDepositRejection(BaseModel): + amount: int + """The rejected amount in the minor unit of check's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "incomplete_image", + "duplicate", + "poor_image_quality", + "incorrect_amount", + "incorrect_recipient", + "not_eligible_for_mobile_deposit", + "missing_required_data_elements", + "suspected_fraud", + "deposit_window_expired", + "unknown", + ] + """Why the check deposit was rejected. + + - `incomplete_image` - The check's image is incomplete. + - `duplicate` - This is a duplicate check submission. + - `poor_image_quality` - This check has poor image quality. + - `incorrect_amount` - The check was deposited with the incorrect amount. + - `incorrect_recipient` - The check is made out to someone other than the + account holder. + - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile + deposit. + - `missing_required_data_elements` - This check is missing at least one required + field. + - `suspected_fraud` - This check is suspected to be fraudulent. + - `deposit_window_expired` - This check's deposit window has expired. + - `unknown` - The check was rejected for an unknown reason. + """ + + rejected_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was rejected. + """ + + +class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined + transfer's currency. This will always be "USD" for a Real-Time Payments + transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "real_time_payments_not_enabled", + ] + """Why the transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `real_time_payments_not_enabled` - Your account is not enabled to receive + Real-Time Payments transfers. + """ + + remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + transaction_identification: str + """The Real-Time Payments network identification of the declined transfer.""" + + +class DeclinedTransactionSourceInternationalACHDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + +class DeclinedTransactionSourceWireDecline(BaseModel): + inbound_wire_transfer_id: str + """The identifier of the Inbound Wire Transfer that was declined.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "entity_not_active", + "group_locked", + "no_account_number", + "transaction_not_allowed", + ] + """Why the wire transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `entity_not_active` - The account's entity is not active. + - `group_locked` - Your account is inactive. + - `no_account_number` - The beneficiary account number does not exist. + - `transaction_not_allowed` - The transaction is not allowed per Increase's + terms. + """ + + +class DeclinedTransactionSource(BaseModel): + ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None + """An ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_decline`. + """ + + card_decline: Optional[DeclinedTransactionSourceCardDecline] = None + """A Card Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_decline`. + """ + + category: Literal[ + "ach_decline", + "card_decline", + "check_decline", + "inbound_real_time_payments_transfer_decline", + "international_ach_decline", + "wire_decline", + "check_deposit_rejection", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. + - `card_decline` - Card Decline: details will be under the `card_decline` + object. + - `check_decline` - Check Decline: details will be under the `check_decline` + object. + - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments + Transfer Decline: details will be under the + `inbound_real_time_payments_transfer_decline` object. + - `international_ach_decline` - International ACH Decline: details will be under + the `international_ach_decline` object. + - `wire_decline` - Wire Decline: details will be under the `wire_decline` + object. + - `check_deposit_rejection` - Check Deposit Rejection: details will be under the + `check_deposit_rejection` object. + - `other` - The Declined Transaction was made for an undocumented or deprecated + reason. + """ + + check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None + """A Check Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_decline`. + """ + + check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_rejection`. + """ + + inbound_real_time_payments_transfer_decline: Optional[ + DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline + ] = None + """An Inbound Real-Time Payments Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_real_time_payments_transfer_decline`. + """ + + international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None + """An International ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `international_ach_decline`. + """ + + wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None + """A Wire Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `wire_decline`. + """ + + +class DeclinedTransaction(BaseModel): + id: str + """The Declined Transaction identifier.""" + + account_id: str + """The identifier for the Account the Declined Transaction belongs to.""" + + amount: int + """The Declined Transaction amount in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the + Transaction occurred. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined + Transaction's currency. This will match the currency on the Declined + Transaction's Account. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + description: str + """This is the description the vendor provides.""" + + route_id: Optional[str] = None + """The identifier for the route this Declined Transaction came through. + + Routes are things like cards and ACH details. + """ + + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None + """The type of the route this Declined Transaction came through. + + - `account_number` - An Account Number. + - `card` - A Card. + - `lockbox` - A Lockbox. + """ + + source: DeclinedTransactionSource + """ + This is an object giving more details on the network-level event that caused the + Declined Transaction. For example, for a card transaction this lists the + merchant's industry and location. Note that for backwards compatibility reasons, + additional undocumented keys may appear in this object. These should be treated + as deprecated and will be removed in the future. + """ + + type: Literal["declined_transaction"] + """A constant representing the object's type. + + For this resource it will always be `declined_transaction`. + """ + + +class PendingTransactionSourceAccountTransferInstruction(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + account currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + transfer_id: str + """The identifier of the Account Transfer that led to this Pending Transaction.""" + + +class PendingTransactionSourceACHTransferInstruction(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + transfer_id: str + """The identifier of the ACH Transfer that led to this Pending Transaction.""" + + +class PendingTransactionSourceCardAuthorizationNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however , cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + +class PendingTransactionSourceCardAuthorizationNetworkDetails(BaseModel): + category: Literal["visa"] + """The payment network used to process this card authorization. + + - `visa` - Visa + """ + + visa: Optional[PendingTransactionSourceCardAuthorizationNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class PendingTransactionSourceCardAuthorizationNetworkIdentifiers(BaseModel): + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class PendingTransactionSourceCardAuthorizationVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + ] + """The address verification result returned to the card network. + + - `not_checked` - No adress was provided in the authorization request. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + """ + + +class PendingTransactionSourceCardAuthorizationVerification(BaseModel): + card_verification_code: PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: PendingTransactionSourceCardAuthorizationVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class PendingTransactionSourceCardAuthorization(BaseModel): + id: str + """The Card Authorization identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this authorization was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + direction: Literal["settlement", "refund"] + """ + The direction descibes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + expires_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) when this authorization + will expire and the pending transaction will be released. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: Optional[str] = None + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: Optional[str] = None + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + network_details: PendingTransactionSourceCardAuthorizationNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: PendingTransactionSourceCardAuthorizationNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + pending_transaction_id: Optional[str] = None + """The identifier of the Pending Transaction associated with this Transaction.""" + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + ] + """ + The processing category describes the intent behind the authorization, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + type: Literal["card_authorization"] + """A constant representing the object's type. + + For this resource it will always be `card_authorization`. + """ + + verification: PendingTransactionSourceCardAuthorizationVerification + """Fields related to verification of cardholder-provided values.""" + + +class PendingTransactionSourceCheckDepositInstruction(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + back_image_file_id: Optional[str] = None + """ + The identifier of the File containing the image of the back of the check that + was deposited. + """ + + check_deposit_id: Optional[str] = None + """The identifier of the Check Deposit.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + front_image_file_id: str + """ + The identifier of the File containing the image of the front of the check that + was deposited. + """ + + +class PendingTransactionSourceCheckTransferInstruction(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + transfer_id: str + """The identifier of the Check Transfer that led to this Pending Transaction.""" + + +class PendingTransactionSourceInboundFundsHold(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + + amount: int + """The held amount in the minor unit of the account's currency. + + For dollars, for example, this is cents. + """ + + automatically_releases_at: datetime + """When the hold will be released automatically. + + Certain conditions may cause it to be released before this time. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold + was created. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + held_transaction_id: Optional[str] = None + """The ID of the Transaction for which funds were held.""" + + pending_transaction_id: Optional[str] = None + """The ID of the Pending Transaction representing the held funds.""" + + released_at: Optional[datetime] = None + """When the hold was released (if it has been released).""" + + status: Literal["held", "complete"] + """The status of the hold. + + - `held` - Funds are still being held. + - `complete` - Funds have been released. + """ + + type: Literal["inbound_funds_hold"] + """A constant representing the object's type. + + For this resource it will always be `inbound_funds_hold`. + """ + + +class PendingTransactionSourceRealTimePaymentsTransferInstruction(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + transfer_id: str + """ + The identifier of the Real-Time Payments Transfer that led to this Pending + Transaction. + """ + + +class PendingTransactionSourceWireTransferInstruction(BaseModel): + account_number: str + """The account number for the destination account.""" + + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + message_to_recipient: str + """The message that will show on the recipient's bank statement.""" + + routing_number: str + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + destination account. + """ + + transfer_id: str + """The identifier of the Wire Transfer that led to this Pending Transaction.""" + + +class PendingTransactionSource(BaseModel): + account_transfer_instruction: Optional[PendingTransactionSourceAccountTransferInstruction] = None + """An Account Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `account_transfer_instruction`. + """ + + ach_transfer_instruction: Optional[PendingTransactionSourceACHTransferInstruction] = None + """An ACH Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_transfer_instruction`. + """ + + card_authorization: Optional[PendingTransactionSourceCardAuthorization] = None + """A Card Authorization object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_authorization`. + """ + + category: Literal[ + "account_transfer_instruction", + "ach_transfer_instruction", + "card_authorization", + "check_deposit_instruction", + "check_transfer_instruction", + "inbound_funds_hold", + "real_time_payments_transfer_instruction", + "wire_transfer_instruction", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `account_transfer_instruction` - Account Transfer Instruction: details will be + under the `account_transfer_instruction` object. + - `ach_transfer_instruction` - ACH Transfer Instruction: details will be under + the `ach_transfer_instruction` object. + - `card_authorization` - Card Authorization: details will be under the + `card_authorization` object. + - `check_deposit_instruction` - Check Deposit Instruction: details will be under + the `check_deposit_instruction` object. + - `check_transfer_instruction` - Check Transfer Instruction: details will be + under the `check_transfer_instruction` object. + - `inbound_funds_hold` - Inbound Funds Hold: details will be under the + `inbound_funds_hold` object. + - `real_time_payments_transfer_instruction` - Real-Time Payments Transfer + Instruction: details will be under the + `real_time_payments_transfer_instruction` object. + - `wire_transfer_instruction` - Wire Transfer Instruction: details will be under + the `wire_transfer_instruction` object. + - `other` - The Pending Transaction was made for an undocumented or deprecated + reason. + """ + + check_deposit_instruction: Optional[PendingTransactionSourceCheckDepositInstruction] = None + """A Check Deposit Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_instruction`. + """ + + check_transfer_instruction: Optional[PendingTransactionSourceCheckTransferInstruction] = None + """A Check Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_transfer_instruction`. + """ + + inbound_funds_hold: Optional[PendingTransactionSourceInboundFundsHold] = None + """An Inbound Funds Hold object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_funds_hold`. + """ + + real_time_payments_transfer_instruction: Optional[ + PendingTransactionSourceRealTimePaymentsTransferInstruction + ] = None + """A Real-Time Payments Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `real_time_payments_transfer_instruction`. + """ + + wire_transfer_instruction: Optional[PendingTransactionSourceWireTransferInstruction] = None + """A Wire Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `wire_transfer_instruction`. + """ + + +class PendingTransaction(BaseModel): + id: str + """The Pending Transaction identifier.""" + + account_id: str + """The identifier for the account this Pending Transaction belongs to.""" + + amount: int + """The Pending Transaction amount in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + completed_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending + Transaction was completed. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending + Transaction occurred. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending + Transaction's currency. This will match the currency on the Pending + Transaction's Account. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + description: str + """ + For a Pending Transaction related to a transfer, this is the description you + provide. For a Pending Transaction related to a payment, this is the description + the vendor provides. + """ + + route_id: Optional[str] = None + """The identifier for the route this Pending Transaction came through. + + Routes are things like cards and ACH details. + """ + + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None + """The type of the route this Pending Transaction came through. + + - `account_number` - An Account Number. + - `card` - A Card. + - `lockbox` - A Lockbox. + """ + + source: PendingTransactionSource + """ + This is an object giving more details on the network-level event that caused the + Pending Transaction. For example, for a card transaction this lists the + merchant's industry and location. + """ + + status: Literal["pending", "complete"] + """ + Whether the Pending Transaction has been confirmed and has an associated + Transaction. + + - `pending` - The Pending Transaction is still awaiting confirmation. + - `complete` - The Pending Transaction is confirmed. An associated Transaction + exists for this object. The Pending Transaction will no longer count against + your balance and can generally be hidden from UIs, etc. + """ + + type: Literal["pending_transaction"] + """A constant representing the object's type. + + For this resource it will always be `pending_transaction`. + """ + + +class CardAuthorizationSimulation(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the authorization attempt fails, this will contain the resulting + [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of `category: card_decline`. + """ + + pending_transaction: Optional[PendingTransaction] = None + """ + If the authorization attempt succeeds, this will contain the resulting Pending + Transaction object. The Pending Transaction's `source` will be of + `category: card_authorization`. + """ + + type: Literal["inbound_card_authorization_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_card_authorization_simulation_result`. + """ diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorize_params.py similarity index 93% rename from src/increase/types/simulations/card_authorization_create_params.py rename to src/increase/types/simulations/card_authorize_params.py index 875f3cf23..ec64c91be 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorize_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardAuthorizationCreateParams"] +__all__ = ["CardAuthorizeParams"] -class CardAuthorizationCreateParams(TypedDict, total=False): +class CardAuthorizeParams(TypedDict, total=False): amount: Required[int] """The authorization amount in cents.""" diff --git a/src/increase/types/simulations/card_settlement_create_params.py b/src/increase/types/simulations/card_settlement_params.py similarity index 84% rename from src/increase/types/simulations/card_settlement_create_params.py rename to src/increase/types/simulations/card_settlement_params.py index f93244b00..53aa972b8 100644 --- a/src/increase/types/simulations/card_settlement_create_params.py +++ b/src/increase/types/simulations/card_settlement_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardSettlementCreateParams"] +__all__ = ["CardSettlementParams"] -class CardSettlementCreateParams(TypedDict, total=False): +class CardSettlementParams(TypedDict, total=False): card_id: Required[str] """The identifier of the Card to create a settlement on.""" diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py deleted file mode 100644 index fa743818c..000000000 --- a/src/increase/types/simulations/inbound_ach_transfer_create_params.py +++ /dev/null @@ -1,89 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Literal, Required, Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["InboundACHTransferCreateParams"] - - -class InboundACHTransferCreateParams(TypedDict, total=False): - account_number_id: Required[str] - """The identifier of the Account Number the inbound ACH Transfer is for.""" - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - company_descriptive_date: str - """The description of the date of the transfer.""" - - company_discretionary_data: str - """Data associated with the transfer set by the sender.""" - - company_entry_description: str - """The description of the transfer set by the sender.""" - - company_id: str - """The sender's company ID.""" - - company_name: str - """The name of the sender.""" - - receiver_id_number: str - """The ID of the receiver of the transfer.""" - - receiver_name: str - """The name of the receiver of the transfer.""" - - resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """The time at which the transfer should be resolved. - - If not provided will resolve immediately. - """ - - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - """The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer.py b/src/increase/types/simulations/inbound_international_ach_transfer.py new file mode 100644 index 000000000..f7ccb3353 --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer.py @@ -0,0 +1,260 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["InboundInternationalACHTransfer"] + + +class InboundInternationalACHTransfer(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py new file mode 100644 index 000000000..3cf052e3b --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundInternationalACHTransferCreateParams"] + + +class InboundInternationalACHTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """ + The identifier of the Account Number the inbound international ACH Transfer is + for. + """ + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + foreign_payment_amount: Required[int] + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + originating_currency_code: Required[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + receiver_identification_number: str + """An identification number the originator uses for the receiver.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py deleted file mode 100644 index 2e254b388..000000000 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel -from ..transaction import Transaction -from ..declined_transaction import DeclinedTransaction - -__all__ = ["InboundRealTimePaymentsTransferCreateResponse"] - - -class InboundRealTimePaymentsTransferCreateResponse(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the Real-Time Payments Transfer attempt fails, this will contain the - resulting [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of - `category: inbound_real_time_payments_transfer_decline`. - """ - - transaction: Optional[Transaction] = None - """ - If the Real-Time Payments Transfer attempt succeeds, this will contain the - resulting [Transaction](#transactions) object. The Transaction's `source` will - be of `category: inbound_real_time_payments_transfer_confirmation`. - """ - - type: Literal["inbound_real_time_payments_transfer_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_real_time_payments_transfer_simulation_result`. - """ diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py new file mode 100644 index 000000000..f1f43a1e5 --- /dev/null +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py @@ -0,0 +1,3857 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import date, datetime +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = [ + "InboundRealTimePaymentsTransferSimulationResult", + "DeclinedTransaction", + "DeclinedTransactionSource", + "DeclinedTransactionSourceACHDecline", + "DeclinedTransactionSourceCardDecline", + "DeclinedTransactionSourceCardDeclineNetworkDetails", + "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", + "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", + "DeclinedTransactionSourceCardDeclineVerification", + "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", + "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", + "DeclinedTransactionSourceCheckDecline", + "DeclinedTransactionSourceCheckDepositRejection", + "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", + "DeclinedTransactionSourceInternationalACHDecline", + "DeclinedTransactionSourceWireDecline", + "Transaction", + "TransactionSource", + "TransactionSourceAccountTransferIntention", + "TransactionSourceACHTransferIntention", + "TransactionSourceACHTransferRejection", + "TransactionSourceACHTransferReturn", + "TransactionSourceCardDisputeAcceptance", + "TransactionSourceCardDisputeLoss", + "TransactionSourceCardRefund", + "TransactionSourceCardRefundNetworkIdentifiers", + "TransactionSourceCardRefundPurchaseDetails", + "TransactionSourceCardRefundPurchaseDetailsCarRental", + "TransactionSourceCardRefundPurchaseDetailsLodging", + "TransactionSourceCardRefundPurchaseDetailsTravel", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", + "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", + "TransactionSourceCardRevenuePayment", + "TransactionSourceCardSettlement", + "TransactionSourceCardSettlementNetworkIdentifiers", + "TransactionSourceCardSettlementPurchaseDetails", + "TransactionSourceCardSettlementPurchaseDetailsCarRental", + "TransactionSourceCardSettlementPurchaseDetailsLodging", + "TransactionSourceCardSettlementPurchaseDetailsTravel", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", + "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", + "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", + "TransactionSourceCashbackPayment", + "TransactionSourceCheckDepositAcceptance", + "TransactionSourceCheckDepositReturn", + "TransactionSourceCheckTransferDeposit", + "TransactionSourceCheckTransferStopPaymentRequest", + "TransactionSourceFeePayment", + "TransactionSourceInboundACHTransfer", + "TransactionSourceInboundACHTransferAddenda", + "TransactionSourceInboundACHTransferAddendaFreeform", + "TransactionSourceInboundACHTransferAddendaFreeformEntry", + "TransactionSourceInboundInternationalACHTransfer", + "TransactionSourceInboundRealTimePaymentsTransferConfirmation", + "TransactionSourceInboundWireDrawdownPayment", + "TransactionSourceInboundWireReversal", + "TransactionSourceInboundWireTransfer", + "TransactionSourceInterestPayment", + "TransactionSourceInternalSource", + "TransactionSourceRealTimePaymentsTransferAcknowledgement", + "TransactionSourceSampleFunds", + "TransactionSourceWireTransferIntention", + "TransactionSourceWireTransferRejection", +] + + +class DeclinedTransactionSourceACHDecline(BaseModel): + id: str + """The ACH Decline's identifier.""" + + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + inbound_ach_transfer_id: str + """The identifier of the Inbound ACH Transfer object associated with this decline.""" + + originator_company_descriptive_date: Optional[str] = None + """The descriptive date of the transfer.""" + + originator_company_discretionary_data: Optional[str] = None + """The additional information included with the transfer.""" + + originator_company_id: str + """The identifier of the company that initiated the transfer.""" + + originator_company_name: str + """The name of the company that initiated the transfer.""" + + reason: Literal[ + "ach_route_canceled", + "ach_route_disabled", + "breaches_limit", + "credit_entry_refused_by_receiver", + "duplicate_return", + "entity_not_active", + "field_error", + "group_locked", + "insufficient_funds", + "misrouted_return", + "return_of_erroneous_or_reversing_debit", + "no_ach_route", + "originator_request", + "transaction_not_allowed", + "user_initiated", + ] + """Why the ACH transfer was declined. + + - `ach_route_canceled` - The account number is canceled. + - `ach_route_disabled` - The account number is disabled. + - `breaches_limit` - The transaction would cause an Increase limit to be + exceeded. + - `credit_entry_refused_by_receiver` - A credit was refused. This is a + reasonable default reason for decline of credits. + - `duplicate_return` - A rare return reason. The return this message refers to + was a duplicate. + - `entity_not_active` - The account's entity is not active. + - `field_error` - There was an error with one of the required fields. + - `group_locked` - Your account is inactive. + - `insufficient_funds` - Your account contains insufficient funds. + - `misrouted_return` - A rare return reason. The return this message refers to + was misrouted. + - `return_of_erroneous_or_reversing_debit` - The originating financial + institution made a mistake and this return corrects it. + - `no_ach_route` - The account number that was debited does not exist. + - `originator_request` - The originating financial institution asked for this + transfer to be returned. + - `transaction_not_allowed` - The transaction is not allowed per Increase's + terms. + - `user_initiated` - Your integration declined this transfer via the API. + """ + + receiver_id_number: Optional[str] = None + """The id of the receiver of the transfer.""" + + receiver_name: Optional[str] = None + """The name of the receiver of the transfer.""" + + trace_number: str + """The trace number of the transfer.""" + + type: Literal["ach_decline"] + """A constant representing the object's type. + + For this resource it will always be `ach_decline`. + """ + + +class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however , cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + +class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): + category: Literal["visa"] + """The payment network used to process this card authorization. + + - `visa` - Visa + """ + + visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + ] + """The address verification result returned to the card network. + + - `not_checked` - No adress was provided in the authorization request. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + """ + + +class DeclinedTransactionSourceCardDeclineVerification(BaseModel): + card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class DeclinedTransactionSourceCardDecline(BaseModel): + id: str + """The Card Decline identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this authorization was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + account currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + declined_transaction_id: str + """The identifier of the declined transaction created for this Card Decline.""" + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: Optional[str] = None + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: Optional[str] = None + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: DeclinedTransactionSourceCardDeclineNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """ + The declined amount in the minor unit of the transaction's presentment currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + ] + """ + The processing category describes the intent behind the authorization, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + reason: Literal[ + "card_not_active", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "suspected_fraud", + ] + """Why the transaction was declined. + + - `card_not_active` - The Card was not active. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + """ + + verification: DeclinedTransactionSourceCardDeclineVerification + """Fields related to verification of cardholder-provided values.""" + + +class DeclinedTransactionSourceCheckDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + auxiliary_on_us: Optional[str] = None + """ + A computer-readable number printed on the MICR line of business checks, usually + the check number. This is useful for positive pay checks, but can be unreliably + transmitted by the bank of first deposit. + """ + + back_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the back of the + declined check. + """ + + check_transfer_id: Optional[str] = None + """The identifier of the Check Transfer object associated with this decline.""" + + front_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the front of the + declined check. + """ + + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this decline. + """ + + reason: Literal[ + "ach_route_disabled", + "ach_route_canceled", + "altered_or_fictitious", + "breaches_limit", + "entity_not_active", + "group_locked", + "insufficient_funds", + "stop_payment_requested", + "duplicate_presentment", + "not_authorized", + "amount_mismatch", + "not_our_item", + "no_account_number_found", + "refer_to_image", + "unable_to_process", + "user_initiated", + ] + """Why the check was declined. + + - `ach_route_disabled` - The account number is disabled. + - `ach_route_canceled` - The account number is canceled. + - `altered_or_fictitious` - The deposited check was altered or fictitious. + - `breaches_limit` - The transaction would cause a limit to be exceeded. + - `entity_not_active` - The account's entity is not active. + - `group_locked` - Your account is inactive. + - `insufficient_funds` - Your account contains insufficient funds. + - `stop_payment_requested` - Stop payment requested for this check. + - `duplicate_presentment` - The check was a duplicate deposit. + - `not_authorized` - The check was not authorized. + - `amount_mismatch` - The amount the receiving bank is attempting to deposit + does not match the amount on the check. + - `not_our_item` - The check attempting to be deposited does not belong to + Increase. + - `no_account_number_found` - The account number on the check does not exist at + Increase. + - `refer_to_image` - The check is not readable. Please refer to the image. + - `unable_to_process` - The check cannot be processed. This is rare: please + contact support. + - `user_initiated` - Your integration declined this check via the API. + """ + + +class DeclinedTransactionSourceCheckDepositRejection(BaseModel): + amount: int + """The rejected amount in the minor unit of check's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was rejected.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "incomplete_image", + "duplicate", + "poor_image_quality", + "incorrect_amount", + "incorrect_recipient", + "not_eligible_for_mobile_deposit", + "missing_required_data_elements", + "suspected_fraud", + "deposit_window_expired", + "unknown", + ] + """Why the check deposit was rejected. + + - `incomplete_image` - The check's image is incomplete. + - `duplicate` - This is a duplicate check submission. + - `poor_image_quality` - This check has poor image quality. + - `incorrect_amount` - The check was deposited with the incorrect amount. + - `incorrect_recipient` - The check is made out to someone other than the + account holder. + - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile + deposit. + - `missing_required_data_elements` - This check is missing at least one required + field. + - `suspected_fraud` - This check is suspected to be fraudulent. + - `deposit_window_expired` - This check's deposit window has expired. + - `unknown` - The check was rejected for an unknown reason. + """ + + rejected_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was rejected. + """ + + +class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined + transfer's currency. This will always be "USD" for a Real-Time Payments + transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "real_time_payments_not_enabled", + ] + """Why the transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `real_time_payments_not_enabled` - Your account is not enabled to receive + Real-Time Payments transfers. + """ + + remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + transaction_identification: str + """The Real-Time Payments network identification of the declined transfer.""" + + +class DeclinedTransactionSourceInternationalACHDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + +class DeclinedTransactionSourceWireDecline(BaseModel): + inbound_wire_transfer_id: str + """The identifier of the Inbound Wire Transfer that was declined.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "entity_not_active", + "group_locked", + "no_account_number", + "transaction_not_allowed", + ] + """Why the wire transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `entity_not_active` - The account's entity is not active. + - `group_locked` - Your account is inactive. + - `no_account_number` - The beneficiary account number does not exist. + - `transaction_not_allowed` - The transaction is not allowed per Increase's + terms. + """ + + +class DeclinedTransactionSource(BaseModel): + ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None + """An ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_decline`. + """ + + card_decline: Optional[DeclinedTransactionSourceCardDecline] = None + """A Card Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_decline`. + """ + + category: Literal[ + "ach_decline", + "card_decline", + "check_decline", + "inbound_real_time_payments_transfer_decline", + "international_ach_decline", + "wire_decline", + "check_deposit_rejection", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. + - `card_decline` - Card Decline: details will be under the `card_decline` + object. + - `check_decline` - Check Decline: details will be under the `check_decline` + object. + - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments + Transfer Decline: details will be under the + `inbound_real_time_payments_transfer_decline` object. + - `international_ach_decline` - International ACH Decline: details will be under + the `international_ach_decline` object. + - `wire_decline` - Wire Decline: details will be under the `wire_decline` + object. + - `check_deposit_rejection` - Check Deposit Rejection: details will be under the + `check_deposit_rejection` object. + - `other` - The Declined Transaction was made for an undocumented or deprecated + reason. + """ + + check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None + """A Check Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_decline`. + """ + + check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_rejection`. + """ + + inbound_real_time_payments_transfer_decline: Optional[ + DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline + ] = None + """An Inbound Real-Time Payments Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_real_time_payments_transfer_decline`. + """ + + international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None + """An International ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `international_ach_decline`. + """ + + wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None + """A Wire Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `wire_decline`. + """ + + +class DeclinedTransaction(BaseModel): + id: str + """The Declined Transaction identifier.""" + + account_id: str + """The identifier for the Account the Declined Transaction belongs to.""" + + amount: int + """The Declined Transaction amount in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the + Transaction occurred. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined + Transaction's currency. This will match the currency on the Declined + Transaction's Account. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + description: str + """This is the description the vendor provides.""" + + route_id: Optional[str] = None + """The identifier for the route this Declined Transaction came through. + + Routes are things like cards and ACH details. + """ + + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None + """The type of the route this Declined Transaction came through. + + - `account_number` - An Account Number. + - `card` - A Card. + - `lockbox` - A Lockbox. + """ + + source: DeclinedTransactionSource + """ + This is an object giving more details on the network-level event that caused the + Declined Transaction. For example, for a card transaction this lists the + merchant's industry and location. Note that for backwards compatibility reasons, + additional undocumented keys may appear in this object. These should be treated + as deprecated and will be removed in the future. + """ + + type: Literal["declined_transaction"] + """A constant representing the object's type. + + For this resource it will always be `declined_transaction`. + """ + + +class TransactionSourceAccountTransferIntention(BaseModel): + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination + account currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + description: str + """The description you chose to give the transfer.""" + + destination_account_id: str + """The identifier of the Account to where the Account Transfer was sent.""" + + source_account_id: str + """The identifier of the Account from where the Account Transfer was sent.""" + + transfer_id: str + """The identifier of the Account Transfer that led to this Pending Transaction.""" + + +class TransactionSourceACHTransferIntention(BaseModel): + account_number: str + """The account number for the destination account.""" + + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + routing_number: str + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + destination account. + """ + + statement_descriptor: str + """A description set when the ACH Transfer was created.""" + + transfer_id: str + """The identifier of the ACH Transfer that led to this Transaction.""" + + +class TransactionSourceACHTransferRejection(BaseModel): + transfer_id: str + """The identifier of the ACH Transfer that led to this Transaction.""" + + +class TransactionSourceACHTransferReturn(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + raw_return_reason_code: str + """The three character ACH return code, in the range R01 to R85.""" + + return_reason_code: Literal[ + "insufficient_fund", + "no_account", + "account_closed", + "invalid_account_number_structure", + "account_frozen_entry_returned_per_ofac_instruction", + "credit_entry_refused_by_receiver", + "unauthorized_debit_to_consumer_account_using_corporate_sec_code", + "corporate_customer_advised_not_authorized", + "payment_stopped", + "non_transaction_account", + "uncollected_funds", + "routing_number_check_digit_error", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "amount_field_error", + "authorization_revoked_by_customer", + "invalid_ach_routing_number", + "file_record_edit_criteria", + "enr_invalid_individual_name", + "returned_per_odfi_request", + "limited_participation_dfi", + "incorrectly_coded_outbound_international_payment", + "account_sold_to_another_dfi", + "addenda_error", + "beneficiary_or_account_holder_deceased", + "customer_advised_not_within_authorization_terms", + "corrected_return", + "duplicate_entry", + "duplicate_return", + "enr_duplicate_enrollment", + "enr_invalid_dfi_account_number", + "enr_invalid_individual_id_number", + "enr_invalid_representative_payee_indicator", + "enr_invalid_transaction_code", + "enr_return_of_enr_entry", + "enr_routing_number_check_digit_error", + "entry_not_processed_by_gateway", + "field_error", + "foreign_receiving_dfi_unable_to_settle", + "iat_entry_coding_error", + "improper_effective_entry_date", + "improper_source_document_source_document_presented", + "invalid_company_id", + "invalid_foreign_receiving_dfi_identification", + "invalid_individual_id_number", + "item_and_rck_entry_presented_for_payment", + "item_related_to_rck_entry_is_ineligible", + "mandatory_field_error", + "misrouted_dishonored_return", + "misrouted_return", + "no_errors_found", + "non_acceptance_of_r62_dishonored_return", + "non_participant_in_iat_program", + "permissible_return_entry", + "permissible_return_entry_not_accepted", + "rdfi_non_settlement", + "rdfi_participant_in_check_truncation_program", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "return_not_a_duplicate", + "return_of_erroneous_or_reversing_debit", + "return_of_improper_credit_entry", + "return_of_improper_debit_entry", + "return_of_xck_entry", + "source_document_presented_for_payment", + "state_law_affecting_rck_acceptance", + "stop_payment_on_item_related_to_rck_entry", + "stop_payment_on_source_document", + "timely_original_return", + "trace_number_error", + "untimely_dishonored_return", + "untimely_return", + ] + """Why the ACH Transfer was returned. + + This reason code is sent by the receiving bank back to Increase. + + - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. + Sometimes abbreviated to NSF. + - `no_account` - Code R03. The account does not exist or the receiving bank was + unable to locate it. + - `account_closed` - Code R02. The account is closed at the receiving bank. + - `invalid_account_number_structure` - Code R04. The account number is invalid + at the receiving bank. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account + at the receiving bank was frozen per the Office of Foreign Assets Control. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account + refused a credit transfer. + - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. + The receiving bank rejected because of an incorrect Standard Entry Class code. + - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer + at the receiving bank reversed the transfer. + - `payment_stopped` - Code R08. The receiving bank stopped payment on this + transfer. + - `non_transaction_account` - Code R20. The receiving bank account does not + perform transfers. + - `uncollected_funds` - Code R09. The receiving bank account does not have + enough available balance for the transfer. + - `routing_number_check_digit_error` - Code R28. The routing number is + incorrect. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. + The customer at the receiving bank reversed the transfer. + - `amount_field_error` - Code R19. The amount field is incorrect or too large. + - `authorization_revoked_by_customer` - Code R07. The customer at the receiving + institution informed their bank that they have revoked authorization for a + previously authorized transfer. + - `invalid_ach_routing_number` - Code R13. The routing number is invalid. + - `file_record_edit_criteria` - Code R17. The receiving bank is unable to + process a field in the transfer. + - `enr_invalid_individual_name` - Code R45. The individual name field was + invalid. + - `returned_per_odfi_request` - Code R06. The originating financial institution + asked for this transfer to be returned. The receiving bank is complying with + the request. + - `limited_participation_dfi` - Code R34. The receiving bank's regulatory + supervisor has limited their participation in the ACH network. + - `incorrectly_coded_outbound_international_payment` - Code R85. The outbound + international ACH transfer was incorrect. + - `account_sold_to_another_dfi` - Code R12. A rare return reason. The account + was sold to another bank. + - `addenda_error` - Code R25. The addenda record is incorrect or missing. + - `beneficiary_or_account_holder_deceased` - Code R15. A rare return reason. The + account holder is deceased. + - `customer_advised_not_within_authorization_terms` - Code R11. A rare return + reason. The customer authorized some payment to the sender, but this payment + was not in error. + - `corrected_return` - Code R74. A rare return reason. Sent in response to a + return that was returned with code `field_error`. The latest return should + include the corrected field(s). + - `duplicate_entry` - Code R24. A rare return reason. The receiving bank + received an exact duplicate entry with the same trace number and amount. + - `duplicate_return` - Code R67. A rare return reason. The return this message + refers to was a duplicate. + - `enr_duplicate_enrollment` - Code R47. A rare return reason. Only used for US + Government agency non-monetary automatic enrollment messages. + - `enr_invalid_dfi_account_number` - Code R43. A rare return reason. Only used + for US Government agency non-monetary automatic enrollment messages. + - `enr_invalid_individual_id_number` - Code R44. A rare return reason. Only used + for US Government agency non-monetary automatic enrollment messages. + - `enr_invalid_representative_payee_indicator` - Code R46. A rare return reason. + Only used for US Government agency non-monetary automatic enrollment messages. + - `enr_invalid_transaction_code` - Code R41. A rare return reason. Only used for + US Government agency non-monetary automatic enrollment messages. + - `enr_return_of_enr_entry` - Code R40. A rare return reason. Only used for US + Government agency non-monetary automatic enrollment messages. + - `enr_routing_number_check_digit_error` - Code R42. A rare return reason. Only + used for US Government agency non-monetary automatic enrollment messages. + - `entry_not_processed_by_gateway` - Code R84. A rare return reason. The + International ACH Transfer cannot be processed by the gateway. + - `field_error` - Code R69. A rare return reason. One or more of the fields in + the ACH were malformed. + - `foreign_receiving_dfi_unable_to_settle` - Code R83. A rare return reason. The + Foreign receiving bank was unable to settle this ACH transfer. + - `iat_entry_coding_error` - Code R80. A rare return reason. The International + ACH Transfer is malformed. + - `improper_effective_entry_date` - Code R18. A rare return reason. The ACH has + an improper effective entry date field. + - `improper_source_document_source_document_presented` - Code R39. A rare return + reason. The source document related to this ACH, usually an ACH check + conversion, was presented to the bank. + - `invalid_company_id` - Code R21. A rare return reason. The Company ID field of + the ACH was invalid. + - `invalid_foreign_receiving_dfi_identification` - Code R82. A rare return + reason. The foreign receiving bank identifier for an International ACH + Transfer was invalid. + - `invalid_individual_id_number` - Code R22. A rare return reason. The + Individual ID number field of the ACH was invalid. + - `item_and_rck_entry_presented_for_payment` - Code R53. A rare return reason. + Both the Represented Check ("RCK") entry and the original check were presented + to the bank. + - `item_related_to_rck_entry_is_ineligible` - Code R51. A rare return reason. + The Represented Check ("RCK") entry is ineligible. + - `mandatory_field_error` - Code R26. A rare return reason. The ACH is missing a + required field. + - `misrouted_dishonored_return` - Code R71. A rare return reason. The receiving + bank does not recognize the routing number in a dishonored return entry. + - `misrouted_return` - Code R61. A rare return reason. The receiving bank does + not recognize the routing number in a return entry. + - `no_errors_found` - Code R76. A rare return reason. Sent in response to a + return, the bank does not find the errors alleged by the returning bank. + - `non_acceptance_of_r62_dishonored_return` - Code R77. A rare return reason. + The receiving bank does not accept the return of the erroneous debit. The + funds are not available at the receiving bank. + - `non_participant_in_iat_program` - Code R81. A rare return reason. The + receiving bank does not accept International ACH Transfers. + - `permissible_return_entry` - Code R31. A rare return reason. A return that has + been agreed to be accepted by the receiving bank, despite falling outside of + the usual return timeframe. + - `permissible_return_entry_not_accepted` - Code R70. A rare return reason. The + receiving bank had not approved this return. + - `rdfi_non_settlement` - Code R32. A rare return reason. The receiving bank + could not settle this transaction. + - `rdfi_participant_in_check_truncation_program` - Code R30. A rare return + reason. The receiving bank does not accept Check Truncation ACH transfers. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - Code + R14. A rare return reason. The payee is deceased. + - `return_not_a_duplicate` - Code R75. A rare return reason. The originating + bank disputes that an earlier `duplicate_entry` return was actually a + duplicate. + - `return_of_erroneous_or_reversing_debit` - Code R62. A rare return reason. The + originating financial institution made a mistake and this return corrects it. + - `return_of_improper_credit_entry` - Code R36. A rare return reason. Return of + a malformed credit entry. + - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a + malformed debit entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed + Check ("XKC") entry. + - `source_document_presented_for_payment` - Code R37. A rare return reason. The + source document related to this ACH, usually an ACH check conversion, was + presented to the bank. + - `state_law_affecting_rck_acceptance` - Code R50. A rare return reason. State + law prevents the bank from accepting the Represented Check ("RCK") entry. + - `stop_payment_on_item_related_to_rck_entry` - Code R52. A rare return reason. + A stop payment was issued on a Represented Check ("RCK") entry. + - `stop_payment_on_source_document` - Code R38. A rare return reason. The source + attached to the ACH, usually an ACH check conversion, includes a stop payment. + - `timely_original_return` - Code R73. A rare return reason. The bank receiving + an `untimely_return` believes it was on time. + - `trace_number_error` - Code R27. A rare return reason. An ACH return's trace + number does not match an originated ACH. + - `untimely_dishonored_return` - Code R72. A rare return reason. The dishonored + return was sent too late. + - `untimely_return` - Code R68. A rare return reason. The return was sent too + late. + """ + + trace_number: str + """A 15 digit number that was generated by the bank that initiated the return. + + The trace number of the return is different than that of the original transfer. + ACH trace numbers are not unique, but along with the amount and date this number + can be used to identify the ACH return at the bank that initiated it. + """ + + transaction_id: str + """The identifier of the Transaction associated with this return.""" + + transfer_id: str + """The identifier of the ACH Transfer associated with this return.""" + + +class TransactionSourceCardDisputeAcceptance(BaseModel): + accepted_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was accepted. + """ + + card_dispute_id: str + """The identifier of the Card Dispute that was accepted.""" + + transaction_id: str + """ + The identifier of the Transaction that was created to return the disputed funds + to your account. + """ + + +class TransactionSourceCardDisputeLoss(BaseModel): + card_dispute_id: str + """The identifier of the Card Dispute that was lost.""" + + explanation: str + """Why the Card Dispute was lost.""" + + lost_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was lost. + """ + + transaction_id: str + """ + The identifier of the Transaction that was created to debit the disputed funds + from your account. + """ + + +class TransactionSourceCardRefundNetworkIdentifiers(BaseModel): + acquirer_business_id: str + """ + A network assigned business ID that identifies the acquirer that processed this + transaction. + """ + + acquirer_reference_number: str + """A globally unique identifier for this settlement.""" + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] = None + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] = None + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] = None + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] = None + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] = None + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] = None + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] = None + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] = None + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] = None + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] = None + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] = None + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] = None + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] = None + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] = None + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] = None + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] = None + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] = None + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] = None + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] = None + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] = None + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] = None + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] = None + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] = None + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] = None + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] = None + """Ticket document number.""" + + +class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] = None + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] = None + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] = None + """Fare basis code.""" + + flight_number: Optional[str] = None + """Flight number.""" + + service_class: Optional[str] = None + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] = None + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] = None + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] = None + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] = None + """Date of departure.""" + + origination_city_airport_code: Optional[str] = None + """Code for the originating city or airport.""" + + passenger_name: Optional[str] = None + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] = None + """Ticket number.""" + + travel_agency_code: Optional[str] = None + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] = None + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] = None + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardRefundPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] = None + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] = None + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] = None + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] = None + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] = None + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] = None + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] = None + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] = None + """Fields specific to travel.""" + + +class TransactionSourceCardRefund(BaseModel): + id: str + """The Card Refund identifier.""" + + amount: int + """The amount in the minor unit of the transaction's settlement currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's settlement currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + merchant_acceptor_id: Optional[str] = None + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """The 4-digit MCC describing the merchant's business.""" + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: Optional[str] = None + """The name of the merchant.""" + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_identifiers: TransactionSourceCardRefundNetworkIdentifiers + """Network-specific identifiers for this refund.""" + + presentment_amount: int + """The amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] = None + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + + transaction_id: str + """The identifier of the Transaction associated with this Transaction.""" + + type: Literal["card_refund"] + """A constant representing the object's type. + + For this resource it will always be `card_refund`. + """ + + +class TransactionSourceCardRevenuePayment(BaseModel): + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + period_end: datetime + """The end of the period for which this transaction paid interest.""" + + period_start: datetime + """The start of the period for which this transaction paid interest.""" + + transacted_on_account_id: Optional[str] = None + """The account the card belonged to.""" + + +class TransactionSourceCardSettlementNetworkIdentifiers(BaseModel): + acquirer_business_id: str + """ + A network assigned business ID that identifies the acquirer that processed this + transaction. + """ + + acquirer_reference_number: str + """A globally unique identifier for this settlement.""" + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): + car_class_code: Optional[str] = None + """Code indicating the vehicle's class.""" + + checkout_date: Optional[date] = None + """ + Date the customer picked up the car or, in the case of a no-show or pre-pay + transaction, the scheduled pick up date. + """ + + daily_rental_rate_amount: Optional[int] = None + """Daily rate being charged for the vehicle.""" + + daily_rental_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental + rate. + """ + + days_rented: Optional[int] = None + """Number of days the vehicle was rented.""" + + extra_charges: Optional[ + Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] + ] = None + """Additional charges (gas, late fee, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `gas` - Gas + - `extra_mileage` - Extra mileage + - `late_return` - Late return + - `one_way_service_fee` - One way service fee + - `parking_violation` - Parking violation + """ + + fuel_charges_amount: Optional[int] = None + """Fuel charges for the vehicle.""" + + fuel_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges + assessed. + """ + + insurance_charges_amount: Optional[int] = None + """Any insurance being charged for the vehicle.""" + + insurance_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance + charges assessed. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None + """ + An indicator that the cardholder is being billed for a reserved vehicle that was + not actually rented (that is, a "no-show" charge). + + - `not_applicable` - Not applicable + - `no_show_for_specialized_vehicle` - No show for specialized vehicle + """ + + one_way_drop_off_charges_amount: Optional[int] = None + """ + Charges for returning the vehicle at a different location than where it was + picked up. + """ + + one_way_drop_off_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way + drop-off charges assessed. + """ + + renter_name: Optional[str] = None + """Name of the person renting the vehicle.""" + + weekly_rental_rate_amount: Optional[int] = None + """Weekly rate being charged for the vehicle.""" + + weekly_rental_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly + rental rate. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): + check_in_date: Optional[date] = None + """Date the customer checked in.""" + + daily_room_rate_amount: Optional[int] = None + """Daily rate being charged for the room.""" + + daily_room_rate_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room + rate. + """ + + extra_charges: Optional[ + Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] + ] = None + """Additional charges (phone, late check-out, etc.) being billed. + + - `no_extra_charge` - No extra charge + - `restaurant` - Restaurant + - `gift_shop` - Gift shop + - `mini_bar` - Mini bar + - `telephone` - Telephone + - `other` - Other + - `laundry` - Laundry + """ + + folio_cash_advances_amount: Optional[int] = None + """Folio cash advances for the room.""" + + folio_cash_advances_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash + advances. + """ + + food_beverage_charges_amount: Optional[int] = None + """Food and beverage charges for the room.""" + + food_beverage_charges_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and + beverage charges. + """ + + no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None + """ + Indicator that the cardholder is being billed for a reserved room that was not + actually used. + + - `not_applicable` - Not applicable + - `no_show` - No show + """ + + prepaid_expenses_amount: Optional[int] = None + """Prepaid expenses being charged for the room.""" + + prepaid_expenses_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid + expenses. + """ + + room_nights: Optional[int] = None + """Number of nights the room was rented.""" + + total_room_tax_amount: Optional[int] = None + """Total room tax being charged.""" + + total_room_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room + tax. + """ + + total_tax_amount: Optional[int] = None + """Total tax being charged for the room.""" + + total_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax + assessed. + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): + category: Optional[ + Literal[ + "none", + "bundled_service", + "baggage_fee", + "change_fee", + "cargo", + "carbon_offset", + "frequent_flyer", + "gift_card", + "ground_transport", + "in_flight_entertainment", + "lounge", + "medical", + "meal_beverage", + "other", + "passenger_assist_fee", + "pets", + "seat_fees", + "standby", + "service_fee", + "store", + "travel_service", + "unaccompanied_travel", + "upgrades", + "wifi", + ] + ] = None + """Category of the ancillary service. + + - `none` - None + - `bundled_service` - Bundled service + - `baggage_fee` - Baggage fee + - `change_fee` - Change fee + - `cargo` - Cargo + - `carbon_offset` - Carbon offset + - `frequent_flyer` - Frequent flyer + - `gift_card` - Gift card + - `ground_transport` - Ground transport + - `in_flight_entertainment` - In-flight entertainment + - `lounge` - Lounge + - `medical` - Medical + - `meal_beverage` - Meal beverage + - `other` - Other + - `passenger_assist_fee` - Passenger assist fee + - `pets` - Pets + - `seat_fees` - Seat fees + - `standby` - Standby + - `service_fee` - Service fee + - `store` - Store + - `travel_service` - Travel service + - `unaccompanied_travel` - Unaccompanied travel + - `upgrades` - Upgrades + - `wifi` - Wi-fi + """ + + sub_category: Optional[str] = None + """Sub-category of the ancillary service, free-form.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + connected_ticket_document_number: Optional[str] = None + """ + If this purchase has a connection or relationship to another purchase, such as a + baggage fee for a passenger transport ticket, this field should contain the + ticket document number for the other purchase. + """ + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "other", + ] + ] = None + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `other` - Other + """ + + passenger_name_or_description: Optional[str] = None + """Name of the passenger or description of the ancillary purchase.""" + + services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] + """Additional travel charges, such as baggage fees.""" + + ticket_document_number: Optional[str] = None + """Ticket document number.""" + + +class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): + carrier_code: Optional[str] = None + """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" + + destination_city_airport_code: Optional[str] = None + """Code for the destination city or airport.""" + + fare_basis_code: Optional[str] = None + """Fare basis code.""" + + flight_number: Optional[str] = None + """Flight number.""" + + service_class: Optional[str] = None + """Service class (e.g., first class, business class, etc.).""" + + stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None + """Indicates whether a stopover is allowed on this ticket. + + - `none` - None + - `stop_over_allowed` - Stop over allowed + - `stop_over_not_allowed` - Stop over not allowed + """ + + +class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): + ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] = None + """Ancillary purchases in addition to the airfare.""" + + computerized_reservation_system: Optional[str] = None + """Indicates the computerized reservation system used to book the ticket.""" + + credit_reason_indicator: Optional[ + Literal[ + "no_credit", + "passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", + "airline_ticket_cancellation", + "other", + "partial_refund_of_airline_ticket", + ] + ] = None + """Indicates the reason for a credit to the cardholder. + + - `no_credit` - No credit + - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport + ancillary purchase cancellation + - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - + Airline ticket and passenger transport ancillary purchase cancellation + - `airline_ticket_cancellation` - Airline ticket cancellation + - `other` - Other + - `partial_refund_of_airline_ticket` - Partial refund of airline ticket + """ + + departure_date: Optional[date] = None + """Date of departure.""" + + origination_city_airport_code: Optional[str] = None + """Code for the originating city or airport.""" + + passenger_name: Optional[str] = None + """Name of the passenger.""" + + restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None + """Indicates whether this ticket is non-refundable. + + - `no_restrictions` - No restrictions + - `restricted_non_refundable_ticket` - Restricted non-refundable ticket + """ + + ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None + """Indicates why a ticket was changed. + + - `none` - None + - `change_to_existing_ticket` - Change to existing ticket + - `new_ticket` - New ticket + """ + + ticket_number: Optional[str] = None + """Ticket number.""" + + travel_agency_code: Optional[str] = None + """Code for the travel agency if the ticket was issued by a travel agency.""" + + travel_agency_name: Optional[str] = None + """Name of the travel agency if the ticket was issued by a travel agency.""" + + trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] = None + """Fields specific to each leg of the journey.""" + + +class TransactionSourceCardSettlementPurchaseDetails(BaseModel): + car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] = None + """Fields specific to car rentals.""" + + customer_reference_identifier: Optional[str] = None + """An identifier from the merchant for the customer or consumer.""" + + local_tax_amount: Optional[int] = None + """The state or provincial tax amount in minor units.""" + + local_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] = None + """Fields specific to lodging.""" + + national_tax_amount: Optional[int] = None + """The national tax amount in minor units.""" + + national_tax_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax + assessed. + """ + + purchase_identifier: Optional[str] = None + """An identifier from the merchant for the purchase to the issuer and cardholder.""" + + purchase_identifier_format: Optional[ + Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] + ] = None + """The format of the purchase identifier. + + - `free_text` - Free text + - `order_number` - Order number + - `rental_agreement_number` - Rental agreement number + - `hotel_folio_number` - Hotel folio number + - `invoice_number` - Invoice number + """ + + travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] = None + """Fields specific to travel.""" + + +class TransactionSourceCardSettlement(BaseModel): + id: str + """The Card Settlement identifier.""" + + amount: int + """The amount in the minor unit of the transaction's settlement currency. + + For dollars, for example, this is cents. + """ + + card_authorization: Optional[str] = None + """ + The Card Authorization that was created prior to this Card Settlement, if one + exists. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's settlement currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + merchant_acceptor_id: Optional[str] = None + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """The 4-digit MCC describing the merchant's business.""" + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: Optional[str] = None + """The name of the merchant.""" + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_identifiers: TransactionSourceCardSettlementNetworkIdentifiers + """Network-specific identifiers for this refund.""" + + pending_transaction_id: Optional[str] = None + """The identifier of the Pending Transaction associated with this Transaction.""" + + presentment_amount: int + """The amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] = None + """ + Additional details about the card purchase, such as tax and industry-specific + fields. + """ + + transaction_id: str + """The identifier of the Transaction associated with this Transaction.""" + + type: Literal["card_settlement"] + """A constant representing the object's type. + + For this resource it will always be `card_settlement`. + """ + + +class TransactionSourceCashbackPayment(BaseModel): + accrued_on_card_id: Optional[str] = None + """The card on which the cashback was accrued.""" + + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + period_end: datetime + """The end of the period for which this transaction paid cashback.""" + + period_start: datetime + """The start of the period for which this transaction paid cashback.""" + + +class TransactionSourceCheckDepositAcceptance(BaseModel): + account_number: str + """The account number printed on the check.""" + + amount: int + """The amount to be deposited in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + auxiliary_on_us: Optional[str] = None + """An additional line of metadata printed on the check. + + This typically includes the check number for business checks. + """ + + check_deposit_id: str + """The ID of the Check Deposit that was accepted.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + routing_number: str + """The routing number printed on the check.""" + + serial_number: Optional[str] = None + """The check serial number, if present, for consumer checks. + + For business checks, the serial number is usually in the `auxiliary_on_us` + field. + """ + + +class TransactionSourceCheckDepositReturn(BaseModel): + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + check_deposit_id: str + """The identifier of the Check Deposit that was returned.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + return_reason: Literal[ + "ach_conversion_not_supported", + "closed_account", + "duplicate_submission", + "insufficient_funds", + "no_account", + "not_authorized", + "stale_dated", + "stop_payment", + "unknown_reason", + "unmatched_details", + "unreadable_image", + "endorsement_irregular", + "altered_or_fictitious_item", + "frozen_or_blocked_account", + "post_dated", + "endorsement_missing", + "signature_missing", + "stop_payment_suspect", + "unusable_image", + "image_fails_security_check", + "cannot_determine_amount", + "signature_irregular", + "non_cash_item", + "unable_to_process", + "item_exceeds_dollar_limit", + "branch_or_account_sold", + ] + """ + Why this check was returned by the bank holding the account it was drawn + against. + + - `ach_conversion_not_supported` - The check doesn't allow ACH conversion. + - `closed_account` - The account is closed. + - `duplicate_submission` - The check has already been deposited. + - `insufficient_funds` - Insufficient funds + - `no_account` - No account was found matching the check details. + - `not_authorized` - The check was not authorized. + - `stale_dated` - The check is too old. + - `stop_payment` - The payment has been stopped by the account holder. + - `unknown_reason` - The reason for the return is unknown. + - `unmatched_details` - The image doesn't match the details submitted. + - `unreadable_image` - The image could not be read. + - `endorsement_irregular` - The check endorsement was irregular. + - `altered_or_fictitious_item` - The check present was either altered or fake. + - `frozen_or_blocked_account` - The account this check is drawn on is frozen. + - `post_dated` - The check is post dated. + - `endorsement_missing` - The endorsement was missing. + - `signature_missing` - The check signature was missing. + - `stop_payment_suspect` - The bank suspects a stop payment will be placed. + - `unusable_image` - The bank cannot read the image. + - `image_fails_security_check` - The check image fails the bank's security + check. + - `cannot_determine_amount` - The bank cannot determine the amount. + - `signature_irregular` - The signature is inconsistent with prior signatures. + - `non_cash_item` - The check is a non-cash item and cannot be drawn against the + account. + - `unable_to_process` - The bank is unable to process this check. + - `item_exceeds_dollar_limit` - The check exceeds the bank or customer's limit. + - `branch_or_account_sold` - The bank sold this account and no longer services + this customer. + """ + + returned_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the check deposit was returned. + """ + + transaction_id: str + """ + The identifier of the transaction that reversed the original check deposit + transaction. + """ + + +class TransactionSourceCheckTransferDeposit(BaseModel): + back_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the back of the + deposited check. + """ + + bank_of_first_deposit_routing_number: Optional[str] = None + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + bank depositing this check. In some rare cases, this is not transmitted via + Check21 and the value will be null. + """ + + deposited_at: datetime + """When the check was deposited.""" + + front_image_file_id: Optional[str] = None + """ + The identifier of the API File object containing an image of the front of the + deposited check. + """ + + inbound_check_deposit_id: Optional[str] = None + """ + The identifier of the Inbound Check Deposit object associated with this + transaction. + """ + + transaction_id: Optional[str] = None + """The identifier of the Transaction object created when the check was deposited.""" + + transfer_id: Optional[str] = None + """The identifier of the Check Transfer object that was deposited.""" + + type: Literal["check_transfer_deposit"] + """A constant representing the object's type. + + For this resource it will always be `check_transfer_deposit`. + """ + + +class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): + reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] + """The reason why this transfer was stopped. + + - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was canceled by an Increase operator who + will provide details out-of-band. + - `not_authorized` - The check was not authorized. + - `unknown` - The check was stopped for another reason. + """ + + requested_at: datetime + """The time the stop-payment was requested.""" + + transfer_id: str + """The ID of the check transfer that was stopped.""" + + type: Literal["check_transfer_stop_payment_request"] + """A constant representing the object's type. + + For this resource it will always be `check_transfer_stop_payment_request`. + """ + + +class TransactionSourceFeePayment(BaseModel): + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + fee_period_start: date + """The start of this payment's fee period, usually the first day of a month.""" + + +class TransactionSourceInboundACHTransferAddendaFreeformEntry(BaseModel): + payment_related_information: str + """The payment related information passed in the addendum.""" + + +class TransactionSourceInboundACHTransferAddendaFreeform(BaseModel): + entries: List[TransactionSourceInboundACHTransferAddendaFreeformEntry] + """Each entry represents an addendum received from the originator.""" + + +class TransactionSourceInboundACHTransferAddenda(BaseModel): + category: Literal["freeform"] + """The type of addendum. + + - `freeform` - Unstructured addendum. + """ + + freeform: Optional[TransactionSourceInboundACHTransferAddendaFreeform] = None + """Unstructured `payment_related_information` passed through by the originator.""" + + +class TransactionSourceInboundACHTransfer(BaseModel): + addenda: Optional[TransactionSourceInboundACHTransferAddenda] = None + """Additional information sent from the originator.""" + + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + originator_company_descriptive_date: Optional[str] = None + """The description of the date of the transfer, usually in the format `YYMMDD`.""" + + originator_company_discretionary_data: Optional[str] = None + """Data set by the originator.""" + + originator_company_entry_description: str + """An informational description of the transfer.""" + + originator_company_id: str + """An identifier for the originating company. + + This is generally, but not always, a stable identifier across multiple + transfers. + """ + + originator_company_name: str + """A name set by the originator to identify themselves.""" + + receiver_id_number: Optional[str] = None + """The originator's identifier for the transfer receipient.""" + + receiver_name: Optional[str] = None + """The name of the transfer recipient. + + This value is informational and not verified by Increase. + """ + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + transfer_id: str + """The Inbound ACH Transfer's identifier.""" + + +class TransactionSourceInboundInternationalACHTransfer(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ + + +class TransactionSourceInboundRealTimePaymentsTransferConfirmation(BaseModel): + amount: int + """The amount in the minor unit of the transfer's currency. + + For dollars, for example, this is cents. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's + currency. This will always be "USD" for a Real-Time Payments transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + transaction_identification: str + """The Real-Time Payments network identification of the transfer.""" + + +class TransactionSourceInboundWireDrawdownPayment(BaseModel): + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + beneficiary_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_name: Optional[str] = None + """A name set by the sender.""" + + beneficiary_reference: Optional[str] = None + """A free-form reference string set by the sender, to help identify the transfer.""" + + description: str + """An Increase-constructed description of the transfer.""" + + input_message_accountability_data: Optional[str] = None + """ + A unique identifier available to the originating and receiving banks, commonly + abbreviated as IMAD. It is created when the wire is submitted to the Fedwire + service and is helpful when debugging wires with the receiving bank. + """ + + originator_address_line1: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_address_line2: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_address_line3: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_name: Optional[str] = None + """The originator of the wire, set by the sending bank.""" + + originator_routing_number: Optional[str] = None + """ + The American Banking Association (ABA) routing number of the bank originating + the transfer. + """ + + originator_to_beneficiary_information: Optional[str] = None + """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" + + originator_to_beneficiary_information_line1: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line2: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line3: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line4: Optional[str] = None + """A free-form message set by the wire originator.""" + + +class TransactionSourceInboundWireReversal(BaseModel): + amount: int + """The amount that was reversed in USD cents.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the reversal was created. + """ + + description: str + """ + The description on the reversal message from Fedwire, set by the reversing bank. + """ + + financial_institution_to_financial_institution_information: Optional[str] = None + """Additional financial institution information included in the wire reversal.""" + + input_cycle_date: date + """The Fedwire cycle date for the wire reversal. + + The "Fedwire day" begins at 9:00 PM Eastern Time on the evening before the + `cycle date`. + """ + + input_message_accountability_data: str + """The Fedwire transaction identifier.""" + + input_sequence_number: str + """The Fedwire sequence number.""" + + input_source: str + """The Fedwire input source identifier.""" + + originator_routing_number: Optional[str] = None + """ + The American Banking Association (ABA) routing number of the bank originating + the transfer. + """ + + previous_message_input_cycle_date: date + """ + The Fedwire cycle date for the wire transfer that is being reversed by this + message. + """ + + previous_message_input_message_accountability_data: str + """The Fedwire transaction identifier for the wire transfer that was reversed.""" + + previous_message_input_sequence_number: str + """The Fedwire sequence number for the wire transfer that was reversed.""" + + previous_message_input_source: str + """The Fedwire input source identifier for the wire transfer that was reversed.""" + + receiver_financial_institution_information: Optional[str] = None + """ + Information included in the wire reversal for the receiving financial + institution. + """ + + transaction_id: str + """The ID for the Transaction associated with the transfer reversal.""" + + wire_transfer_id: str + """The ID for the Wire Transfer that is being reversed.""" + + +class TransactionSourceInboundWireTransfer(BaseModel): + amount: int + """The amount in USD cents.""" + + beneficiary_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" + + beneficiary_name: Optional[str] = None + """A name set by the sender.""" + + beneficiary_reference: Optional[str] = None + """A free-form reference string set by the sender, to help identify the transfer.""" + + description: str + """An Increase-constructed description of the transfer.""" + + input_message_accountability_data: Optional[str] = None + """ + A unique identifier available to the originating and receiving banks, commonly + abbreviated as IMAD. It is created when the wire is submitted to the Fedwire + service and is helpful when debugging wires with the originating bank. + """ + + originator_address_line1: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_address_line2: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_address_line3: Optional[str] = None + """The address of the wire originator, set by the sending bank.""" + + originator_name: Optional[str] = None + """The originator of the wire, set by the sending bank.""" + + originator_routing_number: Optional[str] = None + """ + The American Banking Association (ABA) routing number of the bank originating + the transfer. + """ + + originator_to_beneficiary_information: Optional[str] = None + """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" + + originator_to_beneficiary_information_line1: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line2: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line3: Optional[str] = None + """A free-form message set by the wire originator.""" + + originator_to_beneficiary_information_line4: Optional[str] = None + """A free-form message set by the wire originator.""" + + transfer_id: str + """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" + + +class TransactionSourceInterestPayment(BaseModel): + accrued_on_account_id: Optional[str] = None + """The account on which the interest was accrued.""" + + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + period_end: datetime + """The end of the period for which this transaction paid interest.""" + + period_start: datetime + """The start of the period for which this transaction paid interest.""" + + +class TransactionSourceInternalSource(BaseModel): + amount: int + """The amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + reason: Literal[ + "account_closure", + "bank_migration", + "check_adjustment", + "collection_payment", + "collection_receivable", + "empyreal_adjustment", + "error", + "error_correction", + "fees", + "interest", + "negative_balance_forgiveness", + "sample_funds", + "sample_funds_return", + ] + """An Internal Source is a transaction between you and Increase. + + This describes the reason for the transaction. + + - `account_closure` - Account closure + - `bank_migration` - Bank migration + - `check_adjustment` - Check adjustment + - `collection_payment` - Collection payment + - `collection_receivable` - Collection receivable + - `empyreal_adjustment` - Empyreal adjustment + - `error` - Error + - `error_correction` - Error correction + - `fees` - Fees + - `interest` - Interest + - `negative_balance_forgiveness` - Negative balance forgiveness + - `sample_funds` - Sample funds + - `sample_funds_return` - Sample funds return + """ + + +class TransactionSourceRealTimePaymentsTransferAcknowledgement(BaseModel): + amount: int + """The transfer amount in USD cents.""" + + destination_account_number: str + """The destination account number.""" + + destination_routing_number: str + """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" + + remittance_information: str + """Unstructured information that will show on the recipient's bank statement.""" + + transfer_id: str + """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + + +class TransactionSourceSampleFunds(BaseModel): + originator: str + """Where the sample funds came from.""" + + +class TransactionSourceWireTransferIntention(BaseModel): + account_number: str + """The destination account number.""" + + amount: int + """The transfer amount in USD cents.""" + + message_to_recipient: str + """The message that will show on the recipient's bank statement.""" + + routing_number: str + """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" + + transfer_id: str + """The identifier of the Wire Transfer that led to this Transaction.""" + + +class TransactionSourceWireTransferRejection(BaseModel): + transfer_id: str + """The identifier of the Wire Transfer that led to this Transaction.""" + + +class TransactionSource(BaseModel): + account_transfer_intention: Optional[TransactionSourceAccountTransferIntention] = None + """An Account Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `account_transfer_intention`. + """ + + ach_transfer_intention: Optional[TransactionSourceACHTransferIntention] = None + """An ACH Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_transfer_intention`. + """ + + ach_transfer_rejection: Optional[TransactionSourceACHTransferRejection] = None + """An ACH Transfer Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_transfer_rejection`. + """ + + ach_transfer_return: Optional[TransactionSourceACHTransferReturn] = None + """An ACH Transfer Return object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_transfer_return`. + """ + + card_dispute_acceptance: Optional[TransactionSourceCardDisputeAcceptance] = None + """A Card Dispute Acceptance object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_dispute_acceptance`. + """ + + card_dispute_loss: Optional[TransactionSourceCardDisputeLoss] = None + """A Card Dispute Loss object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_dispute_loss`. + """ + + card_refund: Optional[TransactionSourceCardRefund] = None + """A Card Refund object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_refund`. + """ + + card_revenue_payment: Optional[TransactionSourceCardRevenuePayment] = None + """A Card Revenue Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_revenue_payment`. + """ + + card_settlement: Optional[TransactionSourceCardSettlement] = None + """A Card Settlement object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_settlement`. + """ + + cashback_payment: Optional[TransactionSourceCashbackPayment] = None + """A Cashback Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `cashback_payment`. + """ + + category: Literal[ + "account_transfer_intention", + "ach_transfer_intention", + "ach_transfer_rejection", + "ach_transfer_return", + "cashback_payment", + "card_dispute_acceptance", + "card_dispute_loss", + "card_refund", + "card_settlement", + "card_revenue_payment", + "check_deposit_acceptance", + "check_deposit_return", + "check_transfer_deposit", + "check_transfer_stop_payment_request", + "fee_payment", + "inbound_ach_transfer", + "inbound_ach_transfer_return_intention", + "inbound_check_deposit_return_intention", + "inbound_international_ach_transfer", + "inbound_real_time_payments_transfer_confirmation", + "inbound_wire_drawdown_payment", + "inbound_wire_reversal", + "inbound_wire_transfer", + "inbound_wire_transfer_reversal", + "interest_payment", + "internal_source", + "real_time_payments_transfer_acknowledgement", + "sample_funds", + "wire_transfer_intention", + "wire_transfer_rejection", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `account_transfer_intention` - Account Transfer Intention: details will be + under the `account_transfer_intention` object. + - `ach_transfer_intention` - ACH Transfer Intention: details will be under the + `ach_transfer_intention` object. + - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the + `ach_transfer_rejection` object. + - `ach_transfer_return` - ACH Transfer Return: details will be under the + `ach_transfer_return` object. + - `cashback_payment` - Cashback Payment: details will be under the + `cashback_payment` object. + - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the + `card_dispute_acceptance` object. + - `card_dispute_loss` - Card Dispute Loss: details will be under the + `card_dispute_loss` object. + - `card_refund` - Card Refund: details will be under the `card_refund` object. + - `card_settlement` - Card Settlement: details will be under the + `card_settlement` object. + - `card_revenue_payment` - Card Revenue Payment: details will be under the + `card_revenue_payment` object. + - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under + the `check_deposit_acceptance` object. + - `check_deposit_return` - Check Deposit Return: details will be under the + `check_deposit_return` object. + - `check_transfer_deposit` - Check Transfer Deposit: details will be under the + `check_transfer_deposit` object. + - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: + details will be under the `check_transfer_stop_payment_request` object. + - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. + - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under + the `inbound_ach_transfer` object. + - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return + Intention: details will be under the `inbound_ach_transfer_return_intention` + object. + - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return + Intention: details will be under the `inbound_check_deposit_return_intention` + object. + - `inbound_international_ach_transfer` - Inbound International ACH Transfer: + details will be under the `inbound_international_ach_transfer` object. + - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time + Payments Transfer Confirmation: details will be under the + `inbound_real_time_payments_transfer_confirmation` object. + - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will + be under the `inbound_wire_drawdown_payment` object. + - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the + `inbound_wire_reversal` object. + - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be + under the `inbound_wire_transfer` object. + - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention: + details will be under the `inbound_wire_transfer_reversal` object. + - `interest_payment` - Interest Payment: details will be under the + `interest_payment` object. + - `internal_source` - Internal Source: details will be under the + `internal_source` object. + - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer + Acknowledgement: details will be under the + `real_time_payments_transfer_acknowledgement` object. + - `sample_funds` - Sample Funds: details will be under the `sample_funds` + object. + - `wire_transfer_intention` - Wire Transfer Intention: details will be under the + `wire_transfer_intention` object. + - `wire_transfer_rejection` - Wire Transfer Rejection: details will be under the + `wire_transfer_rejection` object. + - `other` - The Transaction was made for an undocumented or deprecated reason. + """ + + check_deposit_acceptance: Optional[TransactionSourceCheckDepositAcceptance] = None + """A Check Deposit Acceptance object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_acceptance`. + """ + + check_deposit_return: Optional[TransactionSourceCheckDepositReturn] = None + """A Check Deposit Return object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_deposit_return`. + """ + + check_transfer_deposit: Optional[TransactionSourceCheckTransferDeposit] = None + """A Check Transfer Deposit object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_transfer_deposit`. + """ + + check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] = None + """A Check Transfer Stop Payment Request object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_transfer_stop_payment_request`. + """ + + fee_payment: Optional[TransactionSourceFeePayment] = None + """A Fee Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `fee_payment`. + """ + + inbound_ach_transfer: Optional[TransactionSourceInboundACHTransfer] = None + """An Inbound ACH Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_ach_transfer`. + """ + + inbound_international_ach_transfer: Optional[TransactionSourceInboundInternationalACHTransfer] = None + """An Inbound International ACH Transfer object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_international_ach_transfer`. + """ + + inbound_real_time_payments_transfer_confirmation: Optional[ + TransactionSourceInboundRealTimePaymentsTransferConfirmation + ] = None + """An Inbound Real-Time Payments Transfer Confirmation object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_real_time_payments_transfer_confirmation`. + """ + + inbound_wire_drawdown_payment: Optional[TransactionSourceInboundWireDrawdownPayment] = None + """An Inbound Wire Drawdown Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_drawdown_payment`. + """ + + inbound_wire_reversal: Optional[TransactionSourceInboundWireReversal] = None + """An Inbound Wire Reversal object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_reversal`. + """ + + inbound_wire_transfer: Optional[TransactionSourceInboundWireTransfer] = None + """An Inbound Wire Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_transfer`. + """ + + interest_payment: Optional[TransactionSourceInterestPayment] = None + """An Interest Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `interest_payment`. + """ + + internal_source: Optional[TransactionSourceInternalSource] = None + """An Internal Source object. + + This field will be present in the JSON response if and only if `category` is + equal to `internal_source`. + """ + + real_time_payments_transfer_acknowledgement: Optional[ + TransactionSourceRealTimePaymentsTransferAcknowledgement + ] = None + """A Real-Time Payments Transfer Acknowledgement object. + + This field will be present in the JSON response if and only if `category` is + equal to `real_time_payments_transfer_acknowledgement`. + """ + + sample_funds: Optional[TransactionSourceSampleFunds] = None + """A Sample Funds object. + + This field will be present in the JSON response if and only if `category` is + equal to `sample_funds`. + """ + + wire_transfer_intention: Optional[TransactionSourceWireTransferIntention] = None + """A Wire Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `wire_transfer_intention`. + """ + + wire_transfer_rejection: Optional[TransactionSourceWireTransferRejection] = None + """A Wire Transfer Rejection object. + + This field will be present in the JSON response if and only if `category` is + equal to `wire_transfer_rejection`. + """ + + +class Transaction(BaseModel): + id: str + """The Transaction identifier.""" + + account_id: str + """The identifier for the Account the Transaction belongs to.""" + + amount: int + """The Transaction amount in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the + Transaction occurred. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + Transaction's currency. This will match the currency on the Transaction's + Account. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + description: str + """An informational message describing this transaction. + + Use the fields in `source` to get more detailed information. This field appears + as the line-item on the statement. + """ + + route_id: Optional[str] = None + """The identifier for the route this Transaction came through. + + Routes are things like cards and ACH details. + """ + + route_type: Optional[Literal["account_number", "card", "lockbox"]] = None + """The type of the route this Transaction came through. + + - `account_number` - An Account Number. + - `card` - A Card. + - `lockbox` - A Lockbox. + """ + + source: TransactionSource + """ + This is an object giving more details on the network-level event that caused the + Transaction. Note that for backwards compatibility reasons, additional + undocumented keys may appear in this object. These should be treated as + deprecated and will be removed in the future. + """ + + type: Literal["transaction"] + """A constant representing the object's type. + + For this resource it will always be `transaction`. + """ + + +class InboundRealTimePaymentsTransferSimulationResult(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the Real-Time Payments Transfer attempt fails, this will contain the + resulting [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of + `category: inbound_real_time_payments_transfer_decline`. + """ + + transaction: Optional[Transaction] = None + """ + If the Real-Time Payments Transfer attempt succeeds, this will contain the + resulting [Transaction](#transactions) object. The Transaction's `source` will + be of `category: inbound_real_time_payments_transfer_confirmation`. + """ + + type: Literal["inbound_real_time_payments_transfer_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_real_time_payments_transfer_simulation_result`. + """ diff --git a/src/increase/types/simulations/physical_card_advance_shipment_params.py b/src/increase/types/simulations/physical_card_shipment_advance_params.py similarity index 90% rename from src/increase/types/simulations/physical_card_advance_shipment_params.py rename to src/increase/types/simulations/physical_card_shipment_advance_params.py index 8d3d45e5f..58e44d41c 100644 --- a/src/increase/types/simulations/physical_card_advance_shipment_params.py +++ b/src/increase/types/simulations/physical_card_shipment_advance_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["PhysicalCardAdvanceShipmentParams"] +__all__ = ["PhysicalCardShipmentAdvanceParams"] -class PhysicalCardAdvanceShipmentParams(TypedDict, total=False): +class PhysicalCardShipmentAdvanceParams(TypedDict, total=False): shipment_status: Required[ Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"] ] diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py b/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py similarity index 88% rename from src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py rename to src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py index 78d9b323e..f4dfec4a0 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py +++ b/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["InboundRealTimePaymentsTransferCreateParams"] +__all__ = ["RealTimePaymentsTransferCreateInboundParams"] -class InboundRealTimePaymentsTransferCreateParams(TypedDict, total=False): +class RealTimePaymentsTransferCreateInboundParams(TypedDict, total=False): account_number_id: Required[str] """ The identifier of the Account Number the inbound Real-Time Payments Transfer is diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/wire_transfer_create_inbound_params.py similarity index 91% rename from src/increase/types/simulations/inbound_wire_transfer_create_params.py rename to src/increase/types/simulations/wire_transfer_create_inbound_params.py index 6e25dc5a8..7357261b3 100644 --- a/src/increase/types/simulations/inbound_wire_transfer_create_params.py +++ b/src/increase/types/simulations/wire_transfer_create_inbound_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["InboundWireTransferCreateParams"] +__all__ = ["WireTransferCreateInboundParams"] -class InboundWireTransferCreateParams(TypedDict, total=False): +class WireTransferCreateInboundParams(TypedDict, total=False): account_number_id: Required[str] """The identifier of the Account Number the inbound Wire Transfer is for.""" @@ -97,9 +97,3 @@ class InboundWireTransferCreateParams(TypedDict, total=False): The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. """ - - sender_reference: str - """The sending bank will set sender_reference in production. - - You can simulate any value here. - """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ce9ff4f7d..6da2ae804 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,11 +38,13 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", + "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", + "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", @@ -1655,6 +1657,30 @@ class SourceCheckTransferDeposit(BaseModel): """ +class SourceCheckTransferStopPaymentRequest(BaseModel): + reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] + """The reason why this transfer was stopped. + + - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was canceled by an Increase operator who + will provide details out-of-band. + - `not_authorized` - The check was not authorized. + - `unknown` - The check was stopped for another reason. + """ + + requested_at: datetime + """The time the stop-payment was requested.""" + + transfer_id: str + """The ID of the check transfer that was stopped.""" + + type: Literal["check_transfer_stop_payment_request"] + """A constant representing the object's type. + + For this resource it will always be `check_transfer_stop_payment_request`. + """ + + class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -1751,6 +1777,258 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" +class SourceInboundInternationalACHTransfer(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ + + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -1917,9 +2195,6 @@ class SourceInboundWireReversal(BaseModel): institution. """ - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" - transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" @@ -2207,10 +2482,12 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", + "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", @@ -2254,6 +2531,8 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. + - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: + details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under the `inbound_ach_transfer` object. @@ -2263,6 +2542,8 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. + - `inbound_international_ach_transfer` - Inbound International ACH Transfer: + details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2311,6 +2592,13 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ + check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None + """A Check Transfer Stop Payment Request object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_transfer_stop_payment_request`. + """ + fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. @@ -2325,6 +2613,13 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ + inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None + """An Inbound International ACH Transfer object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_international_ach_transfer`. + """ + inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 324e0f00e..78e79eec1 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,10 +53,12 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", + "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index fdab38799..0d17f1364 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -144,9 +144,6 @@ class Reversal(BaseModel): institution. """ - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" - transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/tests/api_resources/entities/__init__.py b/tests/api_resources/entities/__init__.py new file mode 100644 index 000000000..fd8019a9a --- /dev/null +++ b/tests/api_resources/entities/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py new file mode 100644 index 000000000..e62f68ade --- /dev/null +++ b/tests/api_resources/entities/test_beneficial_owners.py @@ -0,0 +1,479 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Entity +from increase._utils import parse_date + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBeneficialOwners: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.create( + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.entities.beneficial_owners.with_raw_response.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.entities.beneficial_owners.with_streaming_response.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_archive(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_archive(self, client: Increase) -> None: + response = client.entities.beneficial_owners.with_raw_response.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_archive(self, client: Increase) -> None: + with client.entities.beneficial_owners.with_streaming_response.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_update_address(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_method_update_address_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.entities.beneficial_owners.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_update_address(self, client: Increase) -> None: + response = client.entities.beneficial_owners.with_raw_response.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_update_address(self, client: Increase) -> None: + with client.entities.beneficial_owners.with_streaming_response.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncBeneficialOwners: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.entities.beneficial_owners.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.entities.beneficial_owners.create( + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.beneficial_owners.with_raw_response.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.beneficial_owners.with_streaming_response.create( + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_archive(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.entities.beneficial_owners.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.beneficial_owners.with_raw_response.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.beneficial_owners.with_streaming_response.archive( + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_update_address(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.entities.beneficial_owners.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.entities.beneficial_owners.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.beneficial_owners.with_raw_response.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.beneficial_owners.with_streaming_response.update_address( + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(Entity, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py new file mode 100644 index 000000000..c4589caa8 --- /dev/null +++ b/tests/api_resources/entities/test_industry_code.py @@ -0,0 +1,106 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Entity + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestIndustryCode: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + industry_code = client.entities.industry_code.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, industry_code, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.entities.industry_code.with_raw_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + industry_code = response.parse() + assert_matches_type(Entity, industry_code, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.entities.industry_code.with_streaming_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + industry_code = response.parse() + assert_matches_type(Entity, industry_code, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.industry_code.with_raw_response.create( + entity_id="", + industry_code="5132", + ) + + +class TestAsyncIndustryCode: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + industry_code = await async_client.entities.industry_code.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, industry_code, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.industry_code.with_raw_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + industry_code = response.parse() + assert_matches_type(Entity, industry_code, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.industry_code.with_streaming_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + industry_code = await response.parse() + assert_matches_type(Entity, industry_code, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.industry_code.with_raw_response.create( + entity_id="", + industry_code="5132", + ) diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/entities/test_supplemental_documents.py similarity index 58% rename from tests/api_resources/test_supplemental_documents.py rename to tests/api_resources/entities/test_supplemental_documents.py index e20cb1bb5..4b97f4110 100644 --- a/tests/api_resources/test_supplemental_documents.py +++ b/tests/api_resources/entities/test_supplemental_documents.py @@ -9,10 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - EntitySupplementalDocument, -) +from increase.types import Entity from increase.pagination import SyncPage, AsyncPage +from increase.types.entities import ( + SupplementalDocument, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,15 +23,15 @@ class TestSupplementalDocuments: @parametrize def test_method_create(self, client: Increase) -> None: - supplemental_document = client.supplemental_documents.create( + supplemental_document = client.entities.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + assert_matches_type(Entity, supplemental_document, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.supplemental_documents.with_raw_response.create( + response = client.entities.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) @@ -38,11 +39,11 @@ def test_raw_response_create(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + assert_matches_type(Entity, supplemental_document, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.supplemental_documents.with_streaming_response.create( + with client.entities.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -50,48 +51,56 @@ def test_streaming_response_create(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + assert_matches_type(Entity, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True + @parametrize + def test_path_params_create(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.supplemental_documents.with_raw_response.create( + entity_id="", + file_id="file_makxrc67oh9l6sg7w9yc", + ) + @parametrize def test_method_list(self, client: Increase) -> None: - supplemental_document = client.supplemental_documents.list( + supplemental_document = client.entities.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - supplemental_document = client.supplemental_documents.list( + supplemental_document = client.entities.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.supplemental_documents.with_raw_response.list( + response = client.entities.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.supplemental_documents.with_streaming_response.list( + with client.entities.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -101,27 +110,27 @@ class TestAsyncSupplementalDocuments: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.supplemental_documents.create( + supplemental_document = await async_client.entities.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + assert_matches_type(Entity, supplemental_document, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.supplemental_documents.with_raw_response.create( + response = await async_client.entities.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = await response.parse() - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + supplemental_document = response.parse() + assert_matches_type(Entity, supplemental_document, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.supplemental_documents.with_streaming_response.create( + async with async_client.entities.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -129,47 +138,55 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) + assert_matches_type(Entity, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True + @parametrize + async def test_path_params_create(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.supplemental_documents.with_raw_response.create( + entity_id="", + file_id="file_makxrc67oh9l6sg7w9yc", + ) + @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.supplemental_documents.list( + supplemental_document = await async_client.entities.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.supplemental_documents.list( + supplemental_document = await async_client.entities.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.supplemental_documents.with_raw_response.list( + response = await async_client.entities.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = await response.parse() - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + supplemental_document = response.parse() + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.supplemental_documents.with_streaming_response.list( + async with async_client.entities.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/intrafi/__init__.py b/tests/api_resources/intrafi/__init__.py new file mode 100644 index 000000000..fd8019a9a --- /dev/null +++ b/tests/api_resources/intrafi/__init__.py @@ -0,0 +1 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/intrafi/test_account_enrollments.py similarity index 63% rename from tests/api_resources/test_intrafi_account_enrollments.py rename to tests/api_resources/intrafi/test_account_enrollments.py index d595132f9..1b37f1c5a 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/intrafi/test_account_enrollments.py @@ -9,79 +9,79 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( +from increase.pagination import SyncPage, AsyncPage +from increase.types.intrafi import ( IntrafiAccountEnrollment, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestIntrafiAccountEnrollments: +class TestAccountEnrollments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - intrafi_account_enrollment = client.intrafi_account_enrollments.create( + account_enrollment = client.intrafi.account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi_account_enrollments.with_raw_response.create( + response = client.intrafi.account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi_account_enrollments.with_streaming_response.create( + with client.intrafi.account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - intrafi_account_enrollment = client.intrafi_account_enrollments.retrieve( + account_enrollment = client.intrafi.account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi_account_enrollments.with_raw_response.retrieve( + response = client.intrafi.account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi_account_enrollments.with_streaming_response.retrieve( + with client.intrafi.account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,74 +90,74 @@ def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi_account_enrollments.with_raw_response.retrieve( + client.intrafi.account_enrollments.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - intrafi_account_enrollment = client.intrafi_account_enrollments.list() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = client.intrafi.account_enrollments.list() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - intrafi_account_enrollment = client.intrafi_account_enrollments.list( + account_enrollment = client.intrafi.account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi_account_enrollments.with_raw_response.list() + response = client.intrafi.account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi_account_enrollments.with_streaming_response.list() as response: + with client.intrafi.account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_unenroll(self, client: Increase) -> None: - intrafi_account_enrollment = client.intrafi_account_enrollments.unenroll( + account_enrollment = client.intrafi.account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_raw_response_unenroll(self, client: Increase) -> None: - response = client.intrafi_account_enrollments.with_raw_response.unenroll( + response = client.intrafi.account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize def test_streaming_response_unenroll(self, client: Increase) -> None: - with client.intrafi_account_enrollments.with_streaming_response.unenroll( + with client.intrafi.account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -166,76 +166,76 @@ def test_path_params_unenroll(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi_account_enrollments.with_raw_response.unenroll( + client.intrafi.account_enrollments.with_raw_response.unenroll( "", ) -class TestAsyncIntrafiAccountEnrollments: +class TestAsyncAccountEnrollments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - intrafi_account_enrollment = await async_client.intrafi_account_enrollments.create( + account_enrollment = await async_client.intrafi.account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_account_enrollments.with_raw_response.create( + response = await async_client.intrafi.account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_account_enrollments.with_streaming_response.create( + async with async_client.intrafi.account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - intrafi_account_enrollment = await async_client.intrafi_account_enrollments.retrieve( + account_enrollment = await async_client.intrafi.account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_account_enrollments.with_raw_response.retrieve( + response = await async_client.intrafi.account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_account_enrollments.with_streaming_response.retrieve( + async with async_client.intrafi.account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,74 +244,74 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi_account_enrollments.with_raw_response.retrieve( + await async_client.intrafi.account_enrollments.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = await async_client.intrafi.account_enrollments.list() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list( + account_enrollment = await async_client.intrafi.account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_account_enrollments.with_raw_response.list() + response = await async_client.intrafi.account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_account_enrollments.with_streaming_response.list() as response: + async with async_client.intrafi.account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + account_enrollment = await response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_unenroll(self, async_client: AsyncIncrease) -> None: - intrafi_account_enrollment = await async_client.intrafi_account_enrollments.unenroll( + account_enrollment = await async_client.intrafi.account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_account_enrollments.with_raw_response.unenroll( + response = await async_client.intrafi.account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) @parametrize async def test_streaming_response_unenroll(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_account_enrollments.with_streaming_response.unenroll( + async with async_client.intrafi.account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) + account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,6 +320,6 @@ async def test_path_params_unenroll(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi_account_enrollments.with_raw_response.unenroll( + await async_client.intrafi.account_enrollments.with_raw_response.unenroll( "", ) diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/intrafi/test_balances.py similarity index 66% rename from tests/api_resources/test_intrafi_balances.py rename to tests/api_resources/intrafi/test_balances.py index 4e3f99c2b..72d34bcdc 100644 --- a/tests/api_resources/test_intrafi_balances.py +++ b/tests/api_resources/intrafi/test_balances.py @@ -9,90 +9,90 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import IntrafiBalance +from increase.types.intrafi import IntrafiBalance base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestIntrafiBalances: +class TestBalances: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_retrieve(self, client: Increase) -> None: - intrafi_balance = client.intrafi_balances.retrieve( + balance = client.intrafi.balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi_balances.with_raw_response.retrieve( + response = client.intrafi.balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_balance = response.parse() - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + balance = response.parse() + assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi_balances.with_streaming_response.retrieve( + with client.intrafi.balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_balance = response.parse() - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + balance = response.parse() + assert_matches_type(IntrafiBalance, balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.intrafi_balances.with_raw_response.retrieve( + client.intrafi.balances.with_raw_response.retrieve( "", ) -class TestAsyncIntrafiBalances: +class TestAsyncBalances: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - intrafi_balance = await async_client.intrafi_balances.retrieve( + balance = await async_client.intrafi.balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_balances.with_raw_response.retrieve( + response = await async_client.intrafi.balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_balance = await response.parse() - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + balance = response.parse() + assert_matches_type(IntrafiBalance, balance, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_balances.with_streaming_response.retrieve( + async with async_client.intrafi.balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_balance = await response.parse() - assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) + balance = await response.parse() + assert_matches_type(IntrafiBalance, balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.intrafi_balances.with_raw_response.retrieve( + await async_client.intrafi.balances.with_raw_response.retrieve( "", ) diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/intrafi/test_exclusions.py similarity index 61% rename from tests/api_resources/test_intrafi_exclusions.py rename to tests/api_resources/intrafi/test_exclusions.py index 46c12e185..ff29e3655 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/intrafi/test_exclusions.py @@ -9,305 +9,305 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import IntrafiExclusion from increase.pagination import SyncPage, AsyncPage +from increase.types.intrafi import IntrafiExclusion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestIntrafiExclusions: +class TestExclusions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - intrafi_exclusion = client.intrafi_exclusions.create( + exclusion = client.intrafi.exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi_exclusions.with_raw_response.create( + response = client.intrafi.exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi_exclusions.with_streaming_response.create( + with client.intrafi.exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - intrafi_exclusion = client.intrafi_exclusions.retrieve( + exclusion = client.intrafi.exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi_exclusions.with_raw_response.retrieve( + response = client.intrafi.exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi_exclusions.with_streaming_response.retrieve( + with client.intrafi.exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi_exclusions.with_raw_response.retrieve( + client.intrafi.exclusions.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - intrafi_exclusion = client.intrafi_exclusions.list() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = client.intrafi.exclusions.list() + assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - intrafi_exclusion = client.intrafi_exclusions.list( + exclusion = client.intrafi.exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi_exclusions.with_raw_response.list() + response = client.intrafi.exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi_exclusions.with_streaming_response.list() as response: + with client.intrafi.exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_archive(self, client: Increase) -> None: - intrafi_exclusion = client.intrafi_exclusions.archive( + exclusion = client.intrafi.exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: - response = client.intrafi_exclusions.with_raw_response.archive( + response = client.intrafi.exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize def test_streaming_response_archive(self, client: Increase) -> None: - with client.intrafi_exclusions.with_streaming_response.archive( + with client.intrafi.exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_archive(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi_exclusions.with_raw_response.archive( + client.intrafi.exclusions.with_raw_response.archive( "", ) -class TestAsyncIntrafiExclusions: +class TestAsyncExclusions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - intrafi_exclusion = await async_client.intrafi_exclusions.create( + exclusion = await async_client.intrafi.exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_exclusions.with_raw_response.create( + response = await async_client.intrafi.exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_exclusions.with_streaming_response.create( + async with async_client.intrafi.exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - intrafi_exclusion = await async_client.intrafi_exclusions.retrieve( + exclusion = await async_client.intrafi.exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_exclusions.with_raw_response.retrieve( + response = await async_client.intrafi.exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_exclusions.with_streaming_response.retrieve( + async with async_client.intrafi.exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi_exclusions.with_raw_response.retrieve( + await async_client.intrafi.exclusions.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - intrafi_exclusion = await async_client.intrafi_exclusions.list() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = await async_client.intrafi.exclusions.list() + assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - intrafi_exclusion = await async_client.intrafi_exclusions.list( + exclusion = await async_client.intrafi.exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_exclusions.with_raw_response.list() + response = await async_client.intrafi.exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_exclusions.with_streaming_response.list() as response: + async with async_client.intrafi.exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + exclusion = await response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: - intrafi_exclusion = await async_client.intrafi_exclusions.archive( + exclusion = await async_client.intrafi.exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_exclusions.with_raw_response.archive( + response = await async_client.intrafi.exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_exclusions.with_streaming_response.archive( + async with async_client.intrafi.exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) + exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi_exclusions.with_raw_response.archive( + await async_client.intrafi.exclusions.with_raw_response.archive( "", ) diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index 69276d274..619881fcb 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = await response.parse() + account_statement = response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index 6f5818e11..fa6cf3101 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -17,6 +17,7 @@ class TestAccountTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_complete(self, client: Increase) -> None: account_transfer = client.simulations.account_transfers.complete( @@ -24,6 +25,7 @@ def test_method_complete(self, client: Increase) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.account_transfers.with_raw_response.complete( @@ -35,6 +37,7 @@ def test_raw_response_complete(self, client: Increase) -> None: account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.account_transfers.with_streaming_response.complete( @@ -48,6 +51,7 @@ def test_streaming_response_complete(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_complete(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): @@ -59,6 +63,7 @@ def test_path_params_complete(self, client: Increase) -> None: class TestAsyncAccountTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.simulations.account_transfers.complete( @@ -66,6 +71,7 @@ async def test_method_complete(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.account_transfers.with_raw_response.complete( @@ -74,9 +80,10 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.account_transfers.with_streaming_response.complete( @@ -90,6 +97,7 @@ async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 52ea026c1..221370a67 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -9,7 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer +from increase.types import ACHTransfer, InboundACHTransfer +from increase._utils import parse_datetime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,46 +19,58 @@ class TestACHTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_acknowledge(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.acknowledge( - "ach_transfer_id", + def test_method_create_inbound(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_method_create_inbound_with_all_params(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_acknowledge(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.acknowledge( - "ach_transfer_id", + def test_raw_response_create_inbound(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_acknowledge(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.acknowledge( - "ach_transfer_id", + def test_streaming_response_create_inbound(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_acknowledge(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - client.simulations.ach_transfers.with_raw_response.acknowledge( - "", - ) - - @parametrize - def test_method_create_notification_of_change(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.create_notification_of_change( + def test_method_notification_of_change(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -65,8 +78,8 @@ def test_method_create_notification_of_change(self, client: Increase) -> None: assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_create_notification_of_change(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change( + def test_raw_response_notification_of_change(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -78,8 +91,8 @@ def test_raw_response_create_notification_of_change(self, client: Increase) -> N assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( + def test_streaming_response_notification_of_change(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -93,14 +106,15 @@ def test_streaming_response_create_notification_of_change(self, client: Increase assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_create_notification_of_change(self, client: Increase) -> None: + def test_path_params_notification_of_change(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - client.simulations.ach_transfers.with_raw_response.create_notification_of_change( + client.simulations.ach_transfers.with_raw_response.notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -108,6 +122,7 @@ def test_method_return(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return_with_all_params(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -116,6 +131,7 @@ def test_method_return_with_all_params(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.return_( @@ -127,6 +143,7 @@ def test_raw_response_return(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.return_( @@ -140,6 +157,7 @@ def test_streaming_response_return(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_return(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -147,6 +165,7 @@ def test_path_params_return(self, client: Increase) -> None: ach_transfer_id="", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( @@ -154,6 +173,7 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.submit( @@ -165,6 +185,7 @@ def test_raw_response_submit(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.submit( @@ -178,6 +199,7 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -190,46 +212,58 @@ class TestAsyncACHTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_acknowledge(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.acknowledge( - "ach_transfer_id", + async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_acknowledge(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.acknowledge( - "ach_transfer_id", + async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + ach_transfer = response.parse() + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_acknowledge(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.acknowledge( - "ach_transfer_id", + async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - await async_client.simulations.ach_transfers.with_raw_response.acknowledge( - "", - ) - - @parametrize - async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change( + async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -237,8 +271,8 @@ async def test_method_create_notification_of_change(self, async_client: AsyncInc assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( + async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -246,12 +280,12 @@ async def test_raw_response_create_notification_of_change(self, async_client: As assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( + async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -265,14 +299,15 @@ async def test_streaming_response_create_notification_of_change(self, async_clie assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( + await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -280,6 +315,7 @@ async def test_method_return(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return_with_all_params(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -288,6 +324,7 @@ async def test_method_return_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.return_( @@ -296,9 +333,10 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.return_( @@ -312,6 +350,7 @@ async def test_streaming_response_return(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_return(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -319,6 +358,7 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: ach_transfer_id="", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( @@ -326,6 +366,7 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.submit( @@ -334,9 +375,10 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.submit( @@ -350,6 +392,7 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py deleted file mode 100644 index a0a1f1316..000000000 --- a/tests/api_resources/simulations/test_card_authorization_expirations.py +++ /dev/null @@ -1,84 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardPayment - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardAuthorizationExpirations: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_authorization_expiration = client.simulations.card_authorization_expirations.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_authorization_expirations.with_raw_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_authorization_expiration = response.parse() - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_authorization_expirations.with_streaming_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_authorization_expiration = response.parse() - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardAuthorizationExpirations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_authorization_expiration = await async_client.simulations.card_authorization_expirations.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_authorization_expirations.with_raw_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_authorization_expiration = await response.parse() - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_authorization_expirations.with_streaming_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_authorization_expiration = await response.parse() - assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py deleted file mode 100644 index 83067015a..000000000 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ /dev/null @@ -1,116 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import CardAuthorizationCreateResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardAuthorizations: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_authorization = client.simulations.card_authorizations.create( - amount=1000, - ) - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - card_authorization = client.simulations.card_authorizations.create( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_authorizations.with_raw_response.create( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_authorization = response.parse() - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_authorizations.with_streaming_response.create( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_authorization = response.parse() - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardAuthorizations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_authorization = await async_client.simulations.card_authorizations.create( - amount=1000, - ) - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - card_authorization = await async_client.simulations.card_authorizations.create( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_authorizations.with_raw_response.create( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_authorization = await response.parse() - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_authorizations.with_streaming_response.create( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_authorization = await response.parse() - assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 15ed4aebc..05c9c8271 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -98,7 +98,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() + card_dispute = response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py deleted file mode 100644 index e7edbab71..000000000 --- a/tests/api_resources/simulations/test_card_fuel_confirmations.py +++ /dev/null @@ -1,90 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardPayment - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardFuelConfirmations: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_fuel_confirmation = client.simulations.card_fuel_confirmations.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_fuel_confirmations.with_raw_response.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_fuel_confirmation = response.parse() - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_fuel_confirmations.with_streaming_response.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_fuel_confirmation = response.parse() - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardFuelConfirmations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_fuel_confirmation = await async_client.simulations.card_fuel_confirmations.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_fuel_confirmations.with_raw_response.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_fuel_confirmation = await response.parse() - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_fuel_confirmations.with_streaming_response.create( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_fuel_confirmation = await response.parse() - assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py deleted file mode 100644 index 188652e84..000000000 --- a/tests/api_resources/simulations/test_card_increments.py +++ /dev/null @@ -1,108 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardPayment - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardIncrements: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_increment = client.simulations.card_increments.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - card_increment = client.simulations.card_increments.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_increments.with_raw_response.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_increment = response.parse() - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_increments.with_streaming_response.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_increment = response.parse() - assert_matches_type(CardPayment, card_increment, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardIncrements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_increment = await async_client.simulations.card_increments.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - card_increment = await async_client.simulations.card_increments.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_increments.with_raw_response.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_increment = await response.parse() - assert_matches_type(CardPayment, card_increment, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_increments.with_streaming_response.create( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_increment = await response.parse() - assert_matches_type(CardPayment, card_increment, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index ccbec8f1e..979ddd02c 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_refund = await response.parse() + card_refund = response.parse() assert_matches_type(Transaction, card_refund, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py deleted file mode 100644 index 0d7122ce7..000000000 --- a/tests/api_resources/simulations/test_card_reversals.py +++ /dev/null @@ -1,100 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardPayment - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardReversals: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_reversal = client.simulations.card_reversals.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - card_reversal = client.simulations.card_reversals.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_reversals.with_raw_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_reversal = response.parse() - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_reversals.with_streaming_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_reversal = response.parse() - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardReversals: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_reversal = await async_client.simulations.card_reversals.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - card_reversal = await async_client.simulations.card_reversals.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_reversals.with_raw_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_reversal = await response.parse() - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_reversals.with_streaming_response.create( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_reversal = await response.parse() - assert_matches_type(CardPayment, card_reversal, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py deleted file mode 100644 index c994fdf29..000000000 --- a/tests/api_resources/simulations/test_card_settlements.py +++ /dev/null @@ -1,108 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Transaction - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardSettlements: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_settlement = client.simulations.card_settlements.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - card_settlement = client.simulations.card_settlements.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_settlements.with_raw_response.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_settlement = response.parse() - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_settlements.with_streaming_response.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_settlement = response.parse() - assert_matches_type(Transaction, card_settlement, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardSettlements: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - card_settlement = await async_client.simulations.card_settlements.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - card_settlement = await async_client.simulations.card_settlements.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_settlements.with_raw_response.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_settlement = await response.parse() - assert_matches_type(Transaction, card_settlement, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_settlements.with_streaming_response.create( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_settlement = await response.parse() - assert_matches_type(Transaction, card_settlement, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py new file mode 100644 index 000000000..0510f563f --- /dev/null +++ b/tests/api_resources/simulations/test_cards.py @@ -0,0 +1,203 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Transaction +from increase.types.simulations import CardAuthorizationSimulation + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCards: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_authorize(self, client: Increase) -> None: + card = client.simulations.cards.authorize( + amount=1000, + ) + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + def test_method_authorize_with_all_params(self, client: Increase) -> None: + card = client.simulations.cards.authorize( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + def test_raw_response_authorize(self, client: Increase) -> None: + response = client.simulations.cards.with_raw_response.authorize( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + def test_streaming_response_authorize(self, client: Increase) -> None: + with client.simulations.cards.with_streaming_response.authorize( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_settlement(self, client: Increase) -> None: + card = client.simulations.cards.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + def test_method_settlement_with_all_params(self, client: Increase) -> None: + card = client.simulations.cards.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + def test_raw_response_settlement(self, client: Increase) -> None: + response = client.simulations.cards.with_raw_response.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + def test_streaming_response_settlement(self, client: Increase) -> None: + with client.simulations.cards.with_streaming_response.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(Transaction, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCards: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_authorize(self, async_client: AsyncIncrease) -> None: + card = await async_client.simulations.cards.authorize( + amount=1000, + ) + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + async def test_method_authorize_with_all_params(self, async_client: AsyncIncrease) -> None: + card = await async_client.simulations.cards.authorize( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + async def test_raw_response_authorize(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.cards.with_raw_response.authorize( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + @parametrize + async def test_streaming_response_authorize(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.cards.with_streaming_response.authorize( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_settlement(self, async_client: AsyncIncrease) -> None: + card = await async_client.simulations.cards.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + async def test_method_settlement_with_all_params(self, async_client: AsyncIncrease) -> None: + card = await async_client.simulations.cards.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + async def test_raw_response_settlement(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.cards.with_raw_response.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(Transaction, card, path=["response"]) + + @parametrize + async def test_streaming_response_settlement(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.cards.with_streaming_response.settlement( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(Transaction, card, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index b77fa8782..0dc091c92 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -17,6 +17,7 @@ class TestCheckDeposits: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( @@ -24,6 +25,7 @@ def test_method_reject(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_reject(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.reject( @@ -35,6 +37,7 @@ def test_raw_response_reject(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_reject(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.reject( @@ -48,6 +51,7 @@ def test_streaming_response_reject(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_reject(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -93,6 +97,7 @@ def test_path_params_return(self, client: Increase) -> None: "", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( @@ -100,6 +105,7 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( @@ -111,6 +117,7 @@ def test_raw_response_submit(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( @@ -124,6 +131,7 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -135,6 +143,7 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( @@ -142,6 +151,7 @@ async def test_method_reject(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.reject( @@ -150,9 +160,10 @@ async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.reject( @@ -166,6 +177,7 @@ async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_reject(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -188,7 +200,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -211,6 +223,7 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: "", ) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( @@ -218,6 +231,7 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( @@ -226,9 +240,10 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( @@ -242,6 +257,7 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 7afae4013..93834eb5e 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -17,6 +17,7 @@ class TestCheckTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_mail(self, client: Increase) -> None: check_transfer = client.simulations.check_transfers.mail( @@ -24,6 +25,7 @@ def test_method_mail(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_mail(self, client: Increase) -> None: response = client.simulations.check_transfers.with_raw_response.mail( @@ -35,6 +37,7 @@ def test_raw_response_mail(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_mail(self, client: Increase) -> None: with client.simulations.check_transfers.with_streaming_response.mail( @@ -48,6 +51,7 @@ def test_streaming_response_mail(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_mail(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -59,6 +63,7 @@ def test_path_params_mail(self, client: Increase) -> None: class TestAsyncCheckTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.simulations.check_transfers.mail( @@ -66,6 +71,7 @@ async def test_method_mail(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_transfers.with_raw_response.mail( @@ -74,9 +80,10 @@ async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_transfers.with_streaming_response.mail( @@ -90,6 +97,7 @@ async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_mail(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): 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..7d4d8cb36 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -71,7 +71,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token_request = await response.parse() + digital_wallet_token_request = response.parse() assert_matches_type(DigitalWalletTokenRequestCreateResponse, digital_wallet_token_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 189905342..3eedf06da 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() + document = response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py deleted file mode 100644 index 69291ab83..000000000 --- a/tests/api_resources/simulations/test_inbound_ach_transfers.py +++ /dev/null @@ -1,125 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import InboundACHTransfer -from increase._utils import parse_datetime - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundACHTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), - standard_entry_class_code="corporate_credit_or_debit", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), - standard_entry_class_code="corporate_credit_or_debit", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_ach_transfer = await response.parse() - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index fdd11f49e..48760003f 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -77,7 +77,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() + inbound_check_deposit = response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index 9a2285c51..aa7a859dc 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -74,7 +74,7 @@ async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = await response.parse() + inbound_funds_hold = response.parse() assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py new file mode 100644 index 000000000..c54b501f5 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py @@ -0,0 +1,130 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import InboundInternationalACHTransfer + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiver_identification_number="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiver_identification_number="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = await response.parse() + assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True 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 deleted file mode 100644 index 7e547d239..000000000 --- a/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py +++ /dev/null @@ -1,138 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import ( - InboundRealTimePaymentsTransferCreateResponse, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundRealTimePaymentsTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_real_time_payments_transfer = ( - await async_client.simulations.inbound_real_time_payments_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_real_time_payments_transfer = ( - await async_client.simulations.inbound_real_time_payments_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True 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..e03b70c12 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -154,7 +154,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = await response.parse() + inbound_wire_drawdown_request = response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py deleted file mode 100644 index f1893dbe4..000000000 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ /dev/null @@ -1,136 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundWireTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", - sender_reference="x", - ) - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_wire_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_wire_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundWireTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", - sender_reference="x", - ) - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_wire_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = await response.parse() - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_wire_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_wire_transfer = await response.parse() - assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index e51d2e67d..d755d9a81 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -93,7 +93,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - interest_payment = await response.parse() + interest_payment = response.parse() assert_matches_type(Transaction, interest_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 419377273..9762d794f 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -18,16 +18,16 @@ class TestPhysicalCards: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_advance_shipment(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.advance_shipment( + def test_method_shipment_advance(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_raw_response_advance_shipment(self, client: Increase) -> None: - response = client.simulations.physical_cards.with_raw_response.advance_shipment( + def test_raw_response_shipment_advance(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) @@ -38,8 +38,8 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None: assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_streaming_response_advance_shipment(self, client: Increase) -> None: - with client.simulations.physical_cards.with_streaming_response.advance_shipment( + def test_streaming_response_shipment_advance(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -52,9 +52,9 @@ def test_streaming_response_advance_shipment(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_advance_shipment(self, client: Increase) -> None: + def test_path_params_shipment_advance(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - client.simulations.physical_cards.with_raw_response.advance_shipment( + client.simulations.physical_cards.with_raw_response.shipment_advance( physical_card_id="", shipment_status="shipped", ) @@ -64,28 +64,28 @@ class TestAsyncPhysicalCards: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.advance_shipment( + async def test_method_shipment_advance(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( + async def test_raw_response_shipment_advance(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = await response.parse() + physical_card = response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( + async def test_streaming_response_shipment_advance(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.shipment_advance( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -98,9 +98,9 @@ async def test_streaming_response_advance_shipment(self, async_client: AsyncIncr assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None: + async def test_path_params_shipment_advance(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - await async_client.simulations.physical_cards.with_raw_response.advance_shipment( + await async_client.simulations.physical_cards.with_raw_response.shipment_advance( physical_card_id="", shipment_status="shipped", ) diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 22734a13f..348c8bdf6 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = await response.parse() + program = response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize 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..7835c8efc 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -10,6 +10,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import RealTimePaymentsTransfer +from increase.types.simulations import ( + InboundRealTimePaymentsTransferSimulationResult, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -65,6 +68,61 @@ def test_path_params_complete(self, client: Increase) -> None: real_time_payments_transfer_id="", ) + @parametrize + def test_method_create_inbound(self, client: Increase) -> None: + real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_method_create_inbound_with_all_params(self, client: Increase) -> None: + real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_raw_response_create_inbound(self, client: Increase) -> None: + response = client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_streaming_response_create_inbound(self, client: Increase) -> None: + with client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True + class TestAsyncRealTimePaymentsTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -92,7 +150,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = await response.parse() + real_time_payments_transfer = response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -116,3 +174,58 @@ async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: await async_client.simulations.real_time_payments_transfers.with_raw_response.complete( real_time_payments_transfer_id="", ) + + @parametrize + async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: + real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: + real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = await response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index a3a380865..8a699bc38 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import WireTransfer +from increase.types import InboundWireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,157 +18,117 @@ class TestWireTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_reverse(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.reverse( - "wire_transfer_id", + def test_method_create_inbound(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @parametrize - def test_raw_response_reverse(self, client: Increase) -> None: - response = client.simulations.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @parametrize - def test_streaming_response_reverse(self, client: Increase) -> None: - with client.simulations.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_reverse(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.simulations.wire_transfers.with_raw_response.reverse( - "", - ) - - @parametrize - def test_method_submit(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.submit( - "wire_transfer_id", + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + + @parametrize + def test_method_create_inbound_with_all_params(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) @parametrize - def test_raw_response_submit(self, client: Increase) -> None: - response = client.simulations.wire_transfers.with_raw_response.submit( - "wire_transfer_id", + def test_raw_response_create_inbound(self, client: Increase) -> None: + response = client.simulations.wire_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) @parametrize - def test_streaming_response_submit(self, client: Increase) -> None: - with client.simulations.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", + def test_streaming_response_create_inbound(self, client: Increase) -> None: + with client.simulations.wire_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True - @parametrize - def test_path_params_submit(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.simulations.wire_transfers.with_raw_response.submit( - "", - ) - class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_reverse(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.reverse( - "wire_transfer_id", + async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @parametrize - async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.simulations.wire_transfers.with_raw_response.reverse( - "", - ) - - @parametrize - async def test_method_submit(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.submit( - "wire_transfer_id", + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + + @parametrize + async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.wire_transfers.with_raw_response.submit( - "wire_transfer_id", + async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_transfers.with_raw_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", + async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_transfers.with_streaming_response.create_inbound( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.simulations.wire_transfers.with_raw_response.submit( - "", - ) diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 16237cb72..831a7d63d 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -226,7 +226,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = await response.parse() + account_number = response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = await response.parse() + account_number = response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = await response.parse() + account_number = response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -359,7 +359,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = await response.parse() + account_number = response.parse() assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index bb8567116..3e10525b4 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = await response.parse() + account_statement = response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = await response.parse() + account_statement = response.parse() assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 10647a3db..583d3bb1a 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -261,7 +261,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -295,7 +295,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -345,7 +345,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -412,7 +412,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = await response.parse() + account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 3f80d108f..fd8212eb7 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -236,6 +236,7 @@ def test_path_params_balance(self, client: Increase) -> None: account_id="", ) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_close(self, client: Increase) -> None: account = client.accounts.close( @@ -243,6 +244,7 @@ def test_method_close(self, client: Increase) -> None: ) assert_matches_type(Account, account, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_close(self, client: Increase) -> None: response = client.accounts.with_raw_response.close( @@ -254,6 +256,7 @@ def test_raw_response_close(self, client: Increase) -> None: account = response.parse() assert_matches_type(Account, account, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_close(self, client: Increase) -> None: with client.accounts.with_streaming_response.close( @@ -267,6 +270,7 @@ def test_streaming_response_close(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_close(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -303,7 +307,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -334,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -380,7 +384,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -432,7 +436,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize @@ -469,7 +473,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(BalanceLookup, account, path=["response"]) @parametrize @@ -492,6 +496,7 @@ async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: account_id="", ) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_close(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.close( @@ -499,6 +504,7 @@ async def test_method_close(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(Account, account, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.close( @@ -507,9 +513,10 @@ async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = await response.parse() + account = response.parse() assert_matches_type(Account, account, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_close(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.close( @@ -523,6 +530,7 @@ async def test_streaming_response_close(self, async_client: AsyncIncrease) -> No assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_close(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 67c8ab1f9..00305a15f 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -197,7 +197,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = await response.parse() + ach_prenotification = response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -230,7 +230,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = await response.parse() + ach_prenotification = response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -281,7 +281,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = await response.parse() + ach_prenotification = response.parse() assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 1012385b3..847819f0a 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -341,7 +341,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -425,7 +425,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize @@ -454,7 +454,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -492,7 +492,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = await response.parse() + ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index 6b59f1696..aae5586f5 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -218,7 +218,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = await response.parse() + bookkeeping_account = response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -251,7 +251,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = await response.parse() + bookkeeping_account = response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -298,7 +298,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = await response.parse() + bookkeeping_account = response.parse() assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = await response.parse() + bookkeeping_account = response.parse() assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 8d7b8942e..b6385c70e 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = await response.parse() + bookkeeping_entry = response.parse() assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = await response.parse() + bookkeeping_entry = response.parse() assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index c1ed6de1b..1fab3a87d 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = await response.parse() + bookkeeping_entry_set = response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = await response.parse() + bookkeeping_entry_set = response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -311,7 +311,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = await response.parse() + bookkeeping_entry_set = response.parse() assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 1f75f3301..2cb7b1d91 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -153,7 +153,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() + card_dispute = response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -185,7 +185,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() + card_dispute = response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -235,7 +235,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() + card_dispute = response.parse() assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 64ce7f77d..b18e4bac9 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = await response.parse() + card_payment = response.parse() assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = await response.parse() + card_payment = response.parse() assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 172656d19..7483ce1f7 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = await response.parse() + card_purchase_supplement = response.parse() assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = await response.parse() + card_purchase_supplement = response.parse() assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 03606b54a..45b5abd5d 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -211,15 +211,15 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_details(self, client: Increase) -> None: - card = client.cards.details( + def test_method_retrieve_sensitive_details(self, client: Increase) -> None: + card = client.cards.retrieve_sensitive_details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_raw_response_details(self, client: Increase) -> None: - response = client.cards.with_raw_response.details( + def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None: + response = client.cards.with_raw_response.retrieve_sensitive_details( "card_id", ) @@ -229,8 +229,8 @@ def test_raw_response_details(self, client: Increase) -> None: assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_streaming_response_details(self, client: Increase) -> None: - with client.cards.with_streaming_response.details( + def test_streaming_response_retrieve_sensitive_details(self, client: Increase) -> None: + with client.cards.with_streaming_response.retrieve_sensitive_details( "card_id", ) as response: assert not response.is_closed @@ -242,9 +242,9 @@ def test_streaming_response_details(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_details(self, client: Increase) -> None: + def test_path_params_retrieve_sensitive_details(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.cards.with_raw_response.details( + client.cards.with_raw_response.retrieve_sensitive_details( "", ) @@ -288,7 +288,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() + card = response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -319,7 +319,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() + card = response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() + card = response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -429,7 +429,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() + card = response.parse() assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize @@ -444,26 +444,26 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_details(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.details( + async def test_method_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.retrieve_sensitive_details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.cards.with_raw_response.details( + async def test_raw_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.retrieve_sensitive_details( "card_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() + card = response.parse() assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: - async with async_client.cards.with_streaming_response.details( + async def test_streaming_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.retrieve_sensitive_details( "card_id", ) as response: assert not response.is_closed @@ -475,8 +475,8 @@ async def test_streaming_response_details(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_details(self, async_client: AsyncIncrease) -> None: + async def test_path_params_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.cards.with_raw_response.details( + await async_client.cards.with_raw_response.retrieve_sensitive_details( "", ) diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index adab057c6..1ec22ea43 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -185,7 +185,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -219,7 +219,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -269,7 +269,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = await response.parse() + check_deposit = response.parse() assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 0f21979ea..efb753353 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -247,6 +247,7 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -254,6 +255,7 @@ def test_method_stop_payment(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -262,6 +264,7 @@ def test_method_stop_payment_with_all_params(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_raw_response_stop_payment(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.stop_payment( @@ -273,6 +276,7 @@ def test_raw_response_stop_payment(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_streaming_response_stop_payment(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.stop_payment( @@ -286,6 +290,7 @@ def test_streaming_response_stop_payment(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_path_params_stop_payment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -350,7 +355,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -383,7 +388,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -433,7 +438,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize @@ -462,7 +467,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -500,7 +505,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -523,6 +528,7 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: "", ) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -530,6 +536,7 @@ async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -538,6 +545,7 @@ async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncr ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.stop_payment( @@ -546,9 +554,10 @@ async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> N assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = await response.parse() + check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.stop_payment( @@ -562,6 +571,7 @@ async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease assert cast(Any, response.is_closed) is True + @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_path_params_stop_payment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 105398249..91eb1f8e4 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = await response.parse() + declined_transaction = response.parse() assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = await response.parse() + declined_transaction = response.parse() assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 743166a0a..d1e2e7e37 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = await response.parse() + digital_card_profile = response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -338,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = await response.parse() + digital_card_profile = response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -384,7 +384,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = await response.parse() + digital_card_profile = response.parse() assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize @@ -413,7 +413,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = await response.parse() + digital_card_profile = response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -473,7 +473,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = await response.parse() + digital_card_profile = response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 368ff689c..13d3eb9e8 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = await response.parse() + digital_wallet_token = response.parse() assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = await response.parse() + digital_wallet_token = response.parse() assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index ed0699d51..d8eedd34e 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() + document = response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() + document = response.parse() assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 29bd4ef39..05589eafa 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -548,48 +548,6 @@ def test_path_params_archive(self, client: Increase) -> None: "", ) - @parametrize - def test_method_archive_beneficial_owner(self, client: Increase) -> None: - entity = client.entities.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_archive_beneficial_owner(self, client: Increase) -> None: - response = client.entities.with_raw_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_archive_beneficial_owner(self, client: Increase) -> None: - with client.entities.with_streaming_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_archive_beneficial_owner(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.archive_beneficial_owner( - entity_id="", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - @parametrize def test_method_confirm(self, client: Increase) -> None: entity = client.entities.confirm( @@ -636,157 +594,6 @@ def test_path_params_confirm(self, client: Increase) -> None: entity_id="", ) - @parametrize - def test_method_create_beneficial_owner(self, client: Increase) -> None: - entity = client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_create_beneficial_owner_with_all_params(self, client: Increase) -> None: - entity = client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: - response = client.entities.with_raw_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_create_beneficial_owner(self, client: Increase) -> None: - with client.entities.with_streaming_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create_beneficial_owner(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.create_beneficial_owner( - entity_id="", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - @parametrize def test_method_update_address(self, client: Increase) -> None: entity = client.entities.update_address( @@ -863,129 +670,6 @@ def test_path_params_update_address(self, client: Increase) -> None: }, ) - @parametrize - def test_method_update_beneficial_owner_address(self, client: Increase) -> None: - entity = client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_update_beneficial_owner_address_with_all_params(self, client: Increase) -> None: - entity = client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> None: - response = client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_update_beneficial_owner_address(self, client: Increase) -> None: - with client.entities.with_streaming_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update_beneficial_owner_address(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - @parametrize - def test_method_update_industry_code(self, client: Increase) -> None: - entity = client.entities.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_update_industry_code(self, client: Increase) -> None: - response = client.entities.with_raw_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_update_industry_code(self, client: Increase) -> None: - with client.entities.with_streaming_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update_industry_code(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.update_industry_code( - entity_id="", - industry_code="5132", - ) - class TestAsyncEntities: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -1384,7 +1068,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1415,7 +1099,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1465,7 +1149,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize @@ -1494,7 +1178,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1517,48 +1201,6 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: "", ) - @parametrize - async def test_method_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.archive_beneficial_owner( - entity_id="", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - @parametrize async def test_method_confirm(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.confirm( @@ -1582,7 +1224,7 @@ async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1605,157 +1247,6 @@ async def test_path_params_confirm(self, async_client: AsyncIncrease) -> None: entity_id="", ) - @parametrize - async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_create_beneficial_owner_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.create_beneficial_owner( - entity_id="", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - @parametrize async def test_method_update_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( @@ -1797,7 +1288,7 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() + entity = response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1831,126 +1322,3 @@ async def test_path_params_update_address(self, async_client: AsyncIncrease) -> "zip": "10045", }, ) - - @parametrize - async def test_method_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_update_beneficial_owner_address_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - @parametrize - async def test_method_update_industry_code(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_update_industry_code(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_update_industry_code(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update_industry_code(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.update_industry_code( - entity_id="", - industry_code="5132", - ) diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 877e24f0f..1106f1fdf 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -208,7 +208,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = await response.parse() + event_subscription = response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -239,7 +239,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = await response.parse() + event_subscription = response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -285,7 +285,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = await response.parse() + event_subscription = response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -328,7 +328,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = await response.parse() + event_subscription = response.parse() assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index d750217e1..4a4ffb2e0 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = await response.parse() + event = response.parse() assert_matches_type(Event, event, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = await response.parse() + event = response.parse() assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index ff2ef1b62..c51bc3931 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -239,7 +239,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = await response.parse() + export = response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -270,7 +270,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = await response.parse() + export = response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -321,7 +321,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = await response.parse() + export = response.parse() assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 6e17b34d0..8a7d82b66 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = await response.parse() + external_account = response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = await response.parse() + external_account = response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = await response.parse() + external_account = response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -352,7 +352,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = await response.parse() + external_account = response.parse() assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index e8cac448b..44d842d97 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -171,7 +171,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = await response.parse() + file = response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -203,7 +203,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = await response.parse() + file = response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -253,7 +253,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = await response.parse() + file = response.parse() assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index 08e11a8db..f0b1a4e4d 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -18,13 +18,13 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve(self, client: Increase) -> None: - group = client.groups.retrieve() + def test_method_retrieve_details(self, client: Increase) -> None: + group = client.groups.retrieve_details() assert_matches_type(Group, group, path=["response"]) @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.groups.with_raw_response.retrieve() + def test_raw_response_retrieve_details(self, client: Increase) -> None: + response = client.groups.with_raw_response.retrieve_details() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -32,8 +32,8 @@ def test_raw_response_retrieve(self, client: Increase) -> None: assert_matches_type(Group, group, path=["response"]) @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.groups.with_streaming_response.retrieve() as response: + def test_streaming_response_retrieve_details(self, client: Increase) -> None: + with client.groups.with_streaming_response.retrieve_details() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -47,22 +47,22 @@ class TestAsyncGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - group = await async_client.groups.retrieve() + async def test_method_retrieve_details(self, async_client: AsyncIncrease) -> None: + group = await async_client.groups.retrieve_details() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.groups.with_raw_response.retrieve() + async def test_raw_response_retrieve_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.groups.with_raw_response.retrieve_details() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - group = await response.parse() + group = response.parse() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.groups.with_streaming_response.retrieve() as response: + async def test_streaming_response_retrieve_details(self, async_client: AsyncIncrease) -> None: + async with async_client.groups.with_streaming_response.retrieve_details() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index ba9abf32d..d82fcb32d 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -104,25 +104,16 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_create_notification_of_change(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_method_create_notification_of_change_with_all_params(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + def test_method_decline(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_create_notification_of_change(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_raw_response_decline(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -131,9 +122,9 @@ def test_raw_response_create_notification_of_change(self, client: Increase) -> N assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_streaming_response_decline(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -144,25 +135,34 @@ def test_streaming_response_create_notification_of_change(self, client: Increase assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_create_notification_of_change(self, client: Increase) -> None: + def test_path_params_decline(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.create_notification_of_change( - inbound_ach_transfer_id="", + client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize - def test_method_decline(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + def test_method_notification_of_change(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_decline(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + def test_method_notification_of_change_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_notification_of_change(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -171,9 +171,9 @@ def test_raw_response_decline(self, client: Increase) -> None: assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_decline(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + def test_streaming_response_notification_of_change(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,12 +184,12 @@ def test_streaming_response_decline(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_decline(self, client: Increase) -> None: + def test_path_params_notification_of_change(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.decline( - "", + client.inbound_ach_transfers.with_raw_response.notification_of_change( + inbound_ach_transfer_id="", ) @parametrize @@ -255,7 +255,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() + inbound_ach_transfer = response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize @@ -308,7 +308,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() + inbound_ach_transfer = response.parse() assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize @@ -323,36 +323,27 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + async def test_method_decline(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() + inbound_ach_transfer = response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -363,36 +354,45 @@ async def test_streaming_response_create_notification_of_change(self, async_clie assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( - inbound_ach_transfer_id="", + await async_client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize - async def test_method_decline(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + async def test_method_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() + inbound_ach_transfer = response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,12 +403,12 @@ async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: + async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.decline( - "", + await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( + inbound_ach_transfer_id="", ) @parametrize @@ -428,7 +428,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = await response.parse() + inbound_ach_transfer = response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 54109446a..c723a8457 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -140,50 +140,6 @@ def test_path_params_decline(self, client: Increase) -> None: "", ) - @parametrize - def test_method_return(self, client: Increase) -> None: - inbound_check_deposit = client.inbound_check_deposits.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - def test_raw_response_return(self, client: Increase) -> None: - response = client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - def test_streaming_response_return(self, client: Increase) -> None: - with client.inbound_check_deposits.with_streaming_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_return(self, client: Increase) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" - ): - client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="", - reason="altered_or_fictitious", - ) - class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -203,7 +159,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() + inbound_check_deposit = response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -255,7 +211,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() + inbound_check_deposit = response.parse() assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize @@ -284,7 +240,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() + inbound_check_deposit = response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -308,47 +264,3 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: await async_client.inbound_check_deposits.with_raw_response.decline( "", ) - - @parametrize - async def test_method_return(self, async_client: AsyncIncrease) -> None: - inbound_check_deposit = await async_client.inbound_check_deposits.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_check_deposits.with_streaming_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_return(self, async_client: AsyncIncrease) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" - ): - await async_client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="", - reason="altered_or_fictitious", - ) diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index eed29b796..37b399b81 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = await response.parse() + inbound_mail_item = response.parse() assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = await response.parse() + inbound_mail_item = response.parse() assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 6fa65219f..48ec873d2 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -110,7 +110,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = await response.parse() + inbound_wire_drawdown_request = response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize @@ -154,7 +154,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = await response.parse() + inbound_wire_drawdown_request = response.parse() assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 2ed890683..99f2454cc 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = await response.parse() + inbound_wire_transfer = response.parse() assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = await response.parse() + inbound_wire_transfer = response.parse() assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index 60459796b..f2080a6f8 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -211,7 +211,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = await response.parse() + lockbox = response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -242,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = await response.parse() + lockbox = response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = await response.parse() + lockbox = response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -339,7 +339,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = await response.parse() + lockbox = response.parse() assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 83ca7370a..2de34e5ea 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -109,7 +109,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = await response.parse() + oauth_connection = response.parse() assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize @@ -152,7 +152,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = await response.parse() + oauth_connection = response.parse() assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index 1ac7113db..fac339dc0 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -89,7 +89,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_token = await response.parse() + oauth_token = response.parse() assert_matches_type(OAuthToken, oauth_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 0147f5a77..ee91ef1e2 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -122,7 +122,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = await response.parse() + pending_transaction = response.parse() assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize @@ -177,7 +177,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = await response.parse() + pending_transaction = response.parse() assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 0289dea89..8208a1991 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -255,7 +255,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = await response.parse() + physical_card_profile = response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = await response.parse() + physical_card_profile = response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = await response.parse() + physical_card_profile = response.parse() assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize @@ -364,7 +364,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = await response.parse() + physical_card_profile = response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -419,7 +419,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = await response.parse() + physical_card_profile = response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index a9c8fafda..fd97f23b7 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -312,7 +312,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = await response.parse() + physical_card = response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -357,7 +357,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = await response.parse() + physical_card = response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -397,7 +397,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = await response.parse() + physical_card = response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -449,7 +449,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = await response.parse() + physical_card = response.parse() assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index e78fd1cdb..92f6d417f 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = await response.parse() + program = response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = await response.parse() + program = response.parse() assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index 3e30c8f76..edd1d1c1c 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -259,7 +259,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() + proof_of_authorization_request_submission = response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -306,7 +306,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() + proof_of_authorization_request_submission = response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -365,7 +365,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() + proof_of_authorization_request_submission = response.parse() assert_matches_type( AsyncPage[ProofOfAuthorizationRequestSubmission], proof_of_authorization_request_submission, diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index 67f041080..3ea91f58e 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -119,7 +119,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = await response.parse() + proof_of_authorization_request = response.parse() assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = await response.parse() + proof_of_authorization_request = response.parse() assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index e85150cdb..3fb14837f 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = await response.parse() + real_time_decision = response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize @@ -182,7 +182,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = await response.parse() + real_time_decision = response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index de382db0d..5d719a69c 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -219,7 +219,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() + real_time_payments_request_for_payment = response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() + real_time_payments_request_for_payment = response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -325,7 +325,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() + real_time_payments_request_for_payment = response.parse() assert_matches_type( AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] ) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 8e90ed78e..1e84a5648 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -202,7 +202,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = await response.parse() + real_time_payments_transfer = response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -236,7 +236,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = await response.parse() + real_time_payments_transfer = response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = await response.parse() + real_time_payments_transfer = response.parse() assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index f635f5d1a..c0896e7cd 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RoutingNumberListResponse +from increase.types import RoutingNumber from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_list(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -32,7 +32,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -43,7 +43,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -54,7 +54,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -67,7 +67,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -76,7 +76,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -86,8 +86,8 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + routing_number = response.parse() + assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -98,6 +98,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py new file mode 100644 index 000000000..0e4ff50ae --- /dev/null +++ b/tests/api_resources/test_simulations.py @@ -0,0 +1,318 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import ( + CardPayment, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestSimulations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_card_authorization_expirations(self, client: Increase) -> None: + simulation = client.simulations.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_raw_response_card_authorization_expirations(self, client: Increase) -> None: + response = client.simulations.with_raw_response.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_streaming_response_card_authorization_expirations(self, client: Increase) -> None: + with client.simulations.with_streaming_response.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_card_fuel_confirmations(self, client: Increase) -> None: + simulation = client.simulations.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_raw_response_card_fuel_confirmations(self, client: Increase) -> None: + response = client.simulations.with_raw_response.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_streaming_response_card_fuel_confirmations(self, client: Increase) -> None: + with client.simulations.with_streaming_response.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_card_increments(self, client: Increase) -> None: + simulation = client.simulations.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_method_card_increments_with_all_params(self, client: Increase) -> None: + simulation = client.simulations.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_raw_response_card_increments(self, client: Increase) -> None: + response = client.simulations.with_raw_response.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_streaming_response_card_increments(self, client: Increase) -> None: + with client.simulations.with_streaming_response.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_card_reversals(self, client: Increase) -> None: + simulation = client.simulations.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_method_card_reversals_with_all_params(self, client: Increase) -> None: + simulation = client.simulations.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_raw_response_card_reversals(self, client: Increase) -> None: + response = client.simulations.with_raw_response.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + def test_streaming_response_card_reversals(self, client: Increase) -> None: + with client.simulations.with_streaming_response.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncSimulations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_raw_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.with_raw_response.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_streaming_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.with_streaming_response.card_authorization_expirations( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = await response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_raw_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.with_raw_response.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_streaming_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.with_streaming_response.card_fuel_confirmations( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = await response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_card_increments(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_method_card_increments_with_all_params(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_raw_response_card_increments(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.with_raw_response.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_streaming_response_card_increments(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.with_streaming_response.card_increments( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = await response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_card_reversals(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_method_card_reversals_with_all_params(self, async_client: AsyncIncrease) -> None: + simulation = await async_client.simulations.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_raw_response_card_reversals(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.with_raw_response.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + simulation = response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + @parametrize + async def test_streaming_response_card_reversals(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.with_streaming_response.card_reversals( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + simulation = await response.parse() + assert_matches_type(CardPayment, simulation, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index b8dea8d52..2f1f3522e 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = await response.parse() + transaction = response.parse() assert_matches_type(Transaction, transaction, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = await response.parse() + transaction = response.parse() assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 0acdbcd09..4ed4db948 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -18,6 +18,7 @@ class TestWireDrawdownRequests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -30,6 +31,7 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -49,6 +51,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.create( @@ -65,6 +68,7 @@ def test_raw_response_create(self, client: Increase) -> None: wire_drawdown_request = response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.create( @@ -162,6 +166,7 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncWireDrawdownRequests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -174,6 +179,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -193,6 +199,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.create( @@ -206,9 +213,10 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = await response.parse() + wire_drawdown_request = response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.wire_drawdown_requests.with_streaming_response.create( @@ -242,7 +250,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = await response.parse() + wire_drawdown_request = response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize @@ -288,7 +296,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = await response.parse() + wire_drawdown_request = response.parse() assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 3419dbccf..98d7c85e6 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -236,6 +236,90 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_method_reverse(self, client: Increase) -> None: + wire_transfer = client.wire_transfers.reverse( + "wire_transfer_id", + ) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_raw_response_reverse(self, client: Increase) -> None: + response = client.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_streaming_response_reverse(self, client: Increase) -> None: + with client.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_path_params_reverse(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.wire_transfers.with_raw_response.reverse( + "", + ) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_method_submit(self, client: Increase) -> None: + wire_transfer = client.wire_transfers.submit( + "wire_transfer_id", + ) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_raw_response_submit(self, client: Increase) -> None: + response = client.wire_transfers.with_raw_response.submit( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_streaming_response_submit(self, client: Increase) -> None: + with client.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + def test_path_params_submit(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.wire_transfers.with_raw_response.submit( + "", + ) + class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -282,7 +366,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() + wire_transfer = response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -316,7 +400,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() + wire_transfer = response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -367,7 +451,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() + wire_transfer = response.parse() assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize @@ -396,7 +480,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() + wire_transfer = response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -434,7 +518,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = await response.parse() + wire_transfer = response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -456,3 +540,87 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: await async_client.wire_transfers.with_raw_response.cancel( "", ) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_method_reverse(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.wire_transfers.reverse( + "wire_transfer_id", + ) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: + response = await async_client.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: + async with async_client.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.wire_transfers.with_raw_response.reverse( + "", + ) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_method_submit(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.wire_transfers.submit( + "wire_transfer_id", + ) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: + response = await async_client.wire_transfers.with_raw_response.submit( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: + async with async_client.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @pytest.mark.skip(reason="Prism tests are broken") + @parametrize + async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.wire_transfers.with_raw_response.submit( + "", + ) diff --git a/tests/conftest.py b/tests/conftest.py index 120908a4c..731a67982 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,16 +1,18 @@ from __future__ import annotations -import os import asyncio import logging -from typing import TYPE_CHECKING, Iterator, AsyncIterator +from typing import Iterator import pytest +import os +from typing import TYPE_CHECKING, AsyncIterator + from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -28,22 +30,20 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" - @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") + raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client - @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {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: + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client diff --git a/tests/test_client.py b/tests/test_client.py index 874f4fc0a..230905c3f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -661,6 +661,97 @@ def test_absolute_request_url(self, client: Increase) -> None: ) assert request.url == "https://myapi.com/foo" + def test_transport_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", + ): + transport = httpx.MockTransport( + lambda: None, # type: ignore + ) + + client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport) + + assert client._client._transport is transport + + def test_transport_option_mutually_exclusive_with_http_client(self) -> None: + with httpx.Client() as http_client: + with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): + with pytest.warns(DeprecationWarning): + Increase( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + transport=httpx.MockTransport( + lambda: None, # type: ignore + ), + http_client=http_client, + ) + + def test_connection_pool_limits_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", + ): + connection_pool_limits = httpx.Limits( + max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 + ) + + client = Increase( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + connection_pool_limits=connection_pool_limits, + ) + + assert isinstance(client._client._transport, httpx.HTTPTransport) + assert client._client._transport._pool._max_connections == 101 + assert client._client._transport._pool._max_keepalive_connections == 76 + assert client._client._transport._pool._keepalive_expiry == 23 + + def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: + with httpx.Client() as http_client: + with pytest.raises( + ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" + ): + with pytest.warns(DeprecationWarning): + Increase( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + connection_pool_limits=httpx.Limits( + max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 + ), + http_client=http_client, + ) + + def test_proxies_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", + ): + proxies = "https://www.example.com/proxy" + + client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies) + + mounts = list(client._client._mounts.keys()) + assert len(mounts) == 1 + + pattern = mounts[0].pattern + assert pattern == "all://" + + def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: + with httpx.Client() as http_client: + with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): + with pytest.warns(DeprecationWarning): + Increase( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + proxies="https://www.example.com/proxy", + http_client=http_client, + ) + def test_copied_client_does_not_close_http(self) -> None: client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -750,14 +841,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No with pytest.raises(APITimeoutError): self.client.post( "/accounts", - body=cast( - object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - ), + body=cast(object, dict(name="My First Increase Account")), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -772,14 +856,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non with pytest.raises(APIStatusError): self.client.post( "/accounts", - body=cast( - object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - ), + body=cast(object, dict(name="My First Increase Account")), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1407,6 +1484,101 @@ def test_absolute_request_url(self, client: AsyncIncrease) -> None: ) assert request.url == "https://myapi.com/foo" + def test_transport_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", + ): + transport = httpx.MockTransport( + lambda: None, # type: ignore + ) + + client = AsyncIncrease( + base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport + ) + + assert client._client._transport is transport + + async def test_transport_option_mutually_exclusive_with_http_client(self) -> None: + async with httpx.AsyncClient() as http_client: + with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): + with pytest.warns(DeprecationWarning): + AsyncIncrease( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + transport=httpx.MockTransport( + lambda: None, # type: ignore + ), + http_client=http_client, + ) + + def test_connection_pool_limits_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", + ): + connection_pool_limits = httpx.Limits( + max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 + ) + + client = AsyncIncrease( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + connection_pool_limits=connection_pool_limits, + ) + + assert isinstance(client._client._transport, httpx.AsyncHTTPTransport) + assert client._client._transport._pool._max_connections == 101 + assert client._client._transport._pool._max_keepalive_connections == 76 + assert client._client._transport._pool._keepalive_expiry == 23 + + async def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: + async with httpx.AsyncClient() as http_client: + with pytest.raises( + ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" + ): + with pytest.warns(DeprecationWarning): + AsyncIncrease( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + connection_pool_limits=httpx.Limits( + max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 + ), + http_client=http_client, + ) + + def test_proxies_option_is_deprecated(self) -> None: + with pytest.warns( + DeprecationWarning, + match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", + ): + proxies = "https://www.example.com/proxy" + + client = AsyncIncrease( + base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies + ) + + mounts = list(client._client._mounts.keys()) + assert len(mounts) == 1 + + pattern = mounts[0].pattern + assert pattern == "all://" + + async def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: + async with httpx.AsyncClient() as http_client: + with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): + with pytest.warns(DeprecationWarning): + AsyncIncrease( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + proxies="https://www.example.com/proxy", + http_client=http_client, + ) + async def test_copied_client_does_not_close_http(self) -> None: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -1502,14 +1674,7 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APITimeoutError): await self.client.post( "/accounts", - body=cast( - object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - ), + body=cast(object, dict(name="My First Increase Account")), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1524,14 +1689,7 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APIStatusError): await self.client.post( "/accounts", - body=cast( - object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ), - ), + body=cast(object, dict(name="My First Increase Account")), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) diff --git a/tests/test_files.py b/tests/test_files.py index f46618d02..42fa7ae0a 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path = Path(__file__).parent.parent.joinpath("README.md") +readme_path =Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([("file", readme_path)]) + result = to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([("file", readme_path)]) + result = await async_to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) def test_string_not_allowed() -> None: @@ -49,3 +49,4 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) + diff --git a/tests/test_legacy_response.py b/tests/test_legacy_response.py new file mode 100644 index 000000000..f1199aa64 --- /dev/null +++ b/tests/test_legacy_response.py @@ -0,0 +1,84 @@ +import json +from typing import cast +from typing_extensions import Annotated + +import httpx +import pytest +import pydantic + +from increase import Increase, BaseModel +from increase._streaming import Stream +from increase._base_client import FinalRequestOptions +from increase._legacy_response import LegacyAPIResponse + + +class PydanticModel(pydantic.BaseModel): + ... + + +def test_response_parse_mismatched_basemodel(client: Increase) -> None: + response = LegacyAPIResponse( + raw=httpx.Response(200, content=b"foo"), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + with pytest.raises( + TypeError, + match="Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`", + ): + response.parse(to=PydanticModel) + + +def test_response_parse_custom_stream(client: Increase) -> None: + response = LegacyAPIResponse( + raw=httpx.Response(200, content=b"foo"), + client=client, + stream=True, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + stream = response.parse(to=Stream[int]) + assert stream._cast_to == int + + +class CustomModel(BaseModel): + foo: str + bar: int + + +def test_response_parse_custom_model(client: Increase) -> None: + response = LegacyAPIResponse( + raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + obj = response.parse(to=CustomModel) + assert obj.foo == "hello!" + assert obj.bar == 2 + + +def test_response_parse_annotated_type(client: Increase) -> None: + response = LegacyAPIResponse( + raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + obj = response.parse( + to=cast("type[CustomModel]", Annotated[CustomModel, "random metadata"]), + ) + assert obj.foo == "hello!" + assert obj.bar == 2 diff --git a/tests/test_response.py b/tests/test_response.py index 7da95c19c..e743d69e2 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import Increase, BaseModel, AsyncIncrease +from increase import BaseModel, Increase, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 4dd59699e..ac4693911 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,7 +28,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_missing_event( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -44,7 +46,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_event_missing_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -60,7 +64,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -82,7 +88,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events_with_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -106,7 +114,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines_with_empty_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -128,7 +138,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_json_escaped_double_new_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -145,7 +157,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From f204c0364939552a6e0f58ea1e7aa38c70872108 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:32:02 +0100 Subject: [PATCH 0089/1325] chore: fixes --- .release-please-manifest.json | 2 +- README.md | 35 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 +- src/increase/_base_client.py | 83 +- src/increase/_client.py | 757 +++- src/increase/_compat.py | 6 +- src/increase/_legacy_response.py | 456 -- src/increase/_qs.py | 26 +- src/increase/_response.py | 12 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 - src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- src/increase/resources/__init__.py | 1222 +++--- src/increase/resources/account_numbers.py | 62 +- src/increase/resources/account_statements.py | 54 +- src/increase/resources/account_transfers.py | 66 +- src/increase/resources/accounts.py | 70 +- .../resources/ach_prenotifications.py | 58 +- src/increase/resources/ach_transfers.py | 66 +- .../resources/bookkeeping_accounts.py | 62 +- src/increase/resources/bookkeeping_entries.py | 54 +- .../resources/bookkeeping_entry_sets.py | 58 +- src/increase/resources/card_disputes.py | 58 +- src/increase/resources/card_payments.py | 54 +- .../resources/card_purchase_supplements.py | 54 +- src/increase/resources/cards.py | 82 +- src/increase/resources/check_deposits.py | 58 +- src/increase/resources/check_transfers.py | 70 +- .../resources/declined_transactions.py | 54 +- .../resources/digital_card_profiles.py | 66 +- .../resources/digital_wallet_tokens.py | 54 +- src/increase/resources/documents.py | 54 +- .../resources/{entities => }/entities.py | 656 ++- src/increase/resources/entities/__init__.py | 61 - .../resources/entities/beneficial_owners.py | 420 -- .../resources/entities/industry_code.py | 180 - src/increase/resources/event_subscriptions.py | 62 +- src/increase/resources/events.py | 54 +- src/increase/resources/exports.py | 58 +- src/increase/resources/external_accounts.py | 62 +- src/increase/resources/files.py | 58 +- src/increase/resources/groups.py | 66 +- .../resources/inbound_ach_transfers.py | 176 +- .../resources/inbound_check_deposits.py | 187 +- src/increase/resources/inbound_mail_items.py | 54 +- .../inbound_wire_drawdown_requests.py | 54 +- .../resources/inbound_wire_transfers.py | 54 +- src/increase/resources/intrafi/__init__.py | 61 - src/increase/resources/intrafi/intrafi.py | 144 - ...ents.py => intrafi_account_enrollments.py} | 130 +- .../balances.py => intrafi_balances.py} | 82 +- .../exclusions.py => intrafi_exclusions.py} | 126 +- src/increase/resources/lockboxes.py | 62 +- src/increase/resources/oauth_connections.py | 54 +- src/increase/resources/oauth_tokens.py | 50 +- .../resources/pending_transactions.py | 54 +- .../resources/physical_card_profiles.py | 66 +- src/increase/resources/physical_cards.py | 62 +- src/increase/resources/programs.py | 54 +- ...of_of_authorization_request_submissions.py | 66 +- .../proof_of_authorization_requests.py | 54 +- src/increase/resources/real_time_decisions.py | 54 +- ...real_time_payments_request_for_payments.py | 62 +- .../resources/real_time_payments_transfers.py | 58 +- src/increase/resources/routing_numbers.py | 64 +- .../resources/simulations/__init__.py | 584 +-- .../simulations/account_statements.py | 50 +- .../simulations/account_transfers.py | 50 +- .../resources/simulations/ach_transfers.py | 263 +- .../card_authorization_expirations.py | 168 + .../{cards.py => card_authorizations.py} | 225 +- .../resources/simulations/card_disputes.py | 50 +- .../simulations/card_fuel_confirmations.py | 188 + .../resources/simulations/card_increments.py | 198 + .../resources/simulations/card_refunds.py | 50 +- .../resources/simulations/card_reversals.py | 190 + .../resources/simulations/card_settlements.py | 202 + .../resources/simulations/check_deposits.py | 58 +- .../resources/simulations/check_transfers.py | 50 +- .../digital_wallet_token_requests.py | 50 +- .../resources/simulations/documents.py | 50 +- .../simulations/inbound_ach_transfers.py | 352 ++ .../simulations/inbound_check_deposits.py | 50 +- .../simulations/inbound_funds_holds.py | 50 +- .../inbound_international_ach_transfers.py | 244 -- .../inbound_real_time_payments_transfers.py | 228 + .../inbound_wire_drawdown_requests.py | 50 +- .../simulations/inbound_wire_transfers.py | 330 ++ .../simulations/interest_payments.py | 54 +- .../resources/simulations/physical_cards.py | 76 +- .../resources/simulations/programs.py | 50 +- .../real_time_payments_transfers.py | 216 +- .../resources/simulations/simulations.py | 1449 +++---- .../resources/simulations/wire_transfers.py | 339 +- .../{entities => }/supplemental_documents.py | 115 +- src/increase/resources/transactions.py | 54 +- .../resources/wire_drawdown_requests.py | 58 +- src/increase/resources/wire_transfers.py | 268 +- src/increase/types/__init__.py | 41 +- src/increase/types/declined_transaction.py | 257 -- .../types/declined_transaction_list_params.py | 1 - src/increase/types/entities/__init__.py | 13 - src/increase/types/entity.py | 29 +- ...entity_archive_beneficial_owner_params.py} | 7 +- ... entity_create_beneficial_owner_params.py} | 9 +- ...ent.py => entity_supplemental_document.py} | 9 +- ...update_beneficial_owner_address_params.py} | 7 +- ... => entity_update_industry_code_params.py} | 4 +- src/increase/types/inbound_ach_transfer.py | 237 + ...r_create_notification_of_change_params.py} | 4 +- src/increase/types/inbound_check_deposit.py | 11 +- .../inbound_check_deposit_return_params.py | 17 + src/increase/types/inbound_mail_item_list.py | 16 - src/increase/types/inbound_wire_transfer.py | 3 + src/increase/types/intrafi/__init__.py | 11 - .../intrafi_account_enrollment.py | 2 +- ...trafi_account_enrollment_create_params.py} | 4 +- ...intrafi_account_enrollment_list_params.py} | 4 +- .../types/{intrafi => }/intrafi_balance.py | 2 +- .../types/{intrafi => }/intrafi_exclusion.py | 2 +- ....py => intrafi_exclusion_create_params.py} | 4 +- ...ms.py => intrafi_exclusion_list_params.py} | 4 +- src/increase/types/lockbox_list.py | 16 - ...ber.py => routing_number_list_response.py} | 4 +- src/increase/types/simulations/__init__.py | 36 +- .../ach_transfer_create_inbound_params.py | 51 - ...r_create_notification_of_change_params.py} | 4 +- ...py => card_authorization_create_params.py} | 4 +- .../card_authorization_create_response.py | 33 + ...authorization_expiration_create_params.py} | 4 +- .../card_authorization_simulation.py | 1817 -------- .../card_fuel_confirmation_create_params.py} | 4 +- .../card_increment_create_params.py} | 4 +- .../card_reversal_create_params.py} | 4 +- ...ms.py => card_settlement_create_params.py} | 4 +- .../inbound_ach_transfer_create_params.py | 89 + .../inbound_international_ach_transfer.py | 260 -- ...nternational_ach_transfer_create_params.py | 47 - ...l_time_payments_transfer_create_params.py} | 4 +- ..._time_payments_transfer_create_response.py | 34 + ...ime_payments_transfer_simulation_result.py | 3857 ----------------- ...=> inbound_wire_transfer_create_params.py} | 10 +- ... physical_card_advance_shipment_params.py} | 4 +- .../supplemental_document_create_params.py | 3 + .../supplemental_document_list_params.py | 0 src/increase/types/transaction.py | 301 +- src/increase/types/transaction_list_params.py | 2 - src/increase/types/wire_transfer.py | 3 + tests/api_resources/entities/__init__.py | 1 - .../entities/test_beneficial_owners.py | 479 -- .../entities/test_industry_code.py | 106 - tests/api_resources/intrafi/__init__.py | 1 - .../simulations/test_account_statements.py | 2 +- .../simulations/test_account_transfers.py | 10 +- .../simulations/test_ach_transfers.py | 161 +- .../test_card_authorization_expirations.py | 84 + .../simulations/test_card_authorizations.py | 116 + .../simulations/test_card_disputes.py | 2 +- .../test_card_fuel_confirmations.py | 90 + .../simulations/test_card_increments.py | 108 + .../simulations/test_card_refunds.py | 2 +- .../simulations/test_card_reversals.py | 100 + .../simulations/test_card_settlements.py | 108 + tests/api_resources/simulations/test_cards.py | 203 - .../simulations/test_check_deposits.py | 22 +- .../simulations/test_check_transfers.py | 10 +- .../test_digital_wallet_token_requests.py | 2 +- .../simulations/test_documents.py | 2 +- .../simulations/test_inbound_ach_transfers.py | 125 + .../test_inbound_check_deposits.py | 2 +- .../simulations/test_inbound_funds_holds.py | 2 +- ...est_inbound_international_ach_transfers.py | 130 - ...st_inbound_real_time_payments_transfers.py | 138 + .../test_inbound_wire_drawdown_requests.py | 2 +- .../test_inbound_wire_transfers.py | 136 + .../simulations/test_interest_payments.py | 2 +- .../simulations/test_physical_cards.py | 34 +- .../simulations/test_programs.py | 2 +- .../test_real_time_payments_transfers.py | 115 +- .../simulations/test_wire_transfers.py | 188 +- tests/api_resources/test_account_numbers.py | 8 +- .../api_resources/test_account_statements.py | 4 +- tests/api_resources/test_account_transfers.py | 10 +- tests/api_resources/test_accounts.py | 20 +- .../test_ach_prenotifications.py | 6 +- tests/api_resources/test_ach_transfers.py | 10 +- .../test_bookkeeping_accounts.py | 8 +- .../api_resources/test_bookkeeping_entries.py | 4 +- .../test_bookkeeping_entry_sets.py | 6 +- tests/api_resources/test_card_disputes.py | 6 +- tests/api_resources/test_card_payments.py | 4 +- .../test_card_purchase_supplements.py | 4 +- tests/api_resources/test_cards.py | 42 +- tests/api_resources/test_check_deposits.py | 6 +- tests/api_resources/test_check_transfers.py | 22 +- .../test_declined_transactions.py | 4 +- .../test_digital_card_profiles.py | 10 +- .../test_digital_wallet_tokens.py | 4 +- tests/api_resources/test_documents.py | 4 +- tests/api_resources/test_entities.py | 644 ++- .../api_resources/test_event_subscriptions.py | 8 +- tests/api_resources/test_events.py | 4 +- tests/api_resources/test_exports.py | 6 +- tests/api_resources/test_external_accounts.py | 8 +- tests/api_resources/test_files.py | 6 +- tests/api_resources/test_groups.py | 26 +- .../test_inbound_ach_transfers.py | 142 +- .../test_inbound_check_deposits.py | 94 +- .../api_resources/test_inbound_mail_items.py | 4 +- .../test_inbound_wire_drawdown_requests.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- ...py => test_intrafi_account_enrollments.py} | 152 +- ...t_balances.py => test_intrafi_balances.py} | 42 +- ...clusions.py => test_intrafi_exclusions.py} | 150 +- tests/api_resources/test_lockboxes.py | 8 +- tests/api_resources/test_oauth_connections.py | 4 +- tests/api_resources/test_oauth_tokens.py | 2 +- .../test_pending_transactions.py | 4 +- .../test_physical_card_profiles.py | 10 +- tests/api_resources/test_physical_cards.py | 8 +- tests/api_resources/test_programs.py | 4 +- ...of_of_authorization_request_submissions.py | 6 +- .../test_proof_of_authorization_requests.py | 4 +- .../api_resources/test_real_time_decisions.py | 4 +- ...real_time_payments_request_for_payments.py | 6 +- .../test_real_time_payments_transfers.py | 6 +- tests/api_resources/test_routing_numbers.py | 20 +- tests/api_resources/test_simulations.py | 318 -- .../test_supplemental_documents.py | 83 +- tests/api_resources/test_transactions.py | 4 +- .../test_wire_drawdown_requests.py | 14 +- tests/api_resources/test_wire_transfers.py | 178 +- tests/conftest.py | 22 +- tests/test_client.py | 222 +- tests/test_files.py | 11 +- tests/test_legacy_response.py | 84 - tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 243 files changed, 10241 insertions(+), 15909 deletions(-) delete mode 100644 src/increase/_legacy_response.py rename src/increase/resources/{entities => }/entities.py (56%) delete mode 100644 src/increase/resources/entities/__init__.py delete mode 100644 src/increase/resources/entities/beneficial_owners.py delete mode 100644 src/increase/resources/entities/industry_code.py delete mode 100644 src/increase/resources/intrafi/__init__.py delete mode 100644 src/increase/resources/intrafi/intrafi.py rename src/increase/resources/{intrafi/account_enrollments.py => intrafi_account_enrollments.py} (79%) rename src/increase/resources/{intrafi/balances.py => intrafi_balances.py} (59%) rename src/increase/resources/{intrafi/exclusions.py => intrafi_exclusions.py} (81%) create mode 100644 src/increase/resources/simulations/card_authorization_expirations.py rename src/increase/resources/simulations/{cards.py => card_authorizations.py} (54%) create mode 100644 src/increase/resources/simulations/card_fuel_confirmations.py create mode 100644 src/increase/resources/simulations/card_increments.py create mode 100644 src/increase/resources/simulations/card_reversals.py create mode 100644 src/increase/resources/simulations/card_settlements.py create mode 100644 src/increase/resources/simulations/inbound_ach_transfers.py delete mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py create mode 100644 src/increase/resources/simulations/inbound_real_time_payments_transfers.py create mode 100644 src/increase/resources/simulations/inbound_wire_transfers.py rename src/increase/resources/{entities => }/supplemental_documents.py (75%) delete mode 100644 src/increase/types/entities/__init__.py rename src/increase/types/{entities/beneficial_owner_archive_params.py => entity_archive_beneficial_owner_params.py} (63%) rename src/increase/types/{entities/beneficial_owner_create_params.py => entity_create_beneficial_owner_params.py} (95%) rename src/increase/types/{entities/supplemental_document.py => entity_supplemental_document.py} (81%) rename src/increase/types/{entities/beneficial_owner_update_address_params.py => entity_update_beneficial_owner_address_params.py} (82%) rename src/increase/types/{entities/industry_code_create_params.py => entity_update_industry_code_params.py} (84%) rename src/increase/types/{inbound_ach_transfer_notification_of_change_params.py => inbound_ach_transfer_create_notification_of_change_params.py} (72%) create mode 100644 src/increase/types/inbound_check_deposit_return_params.py delete mode 100644 src/increase/types/inbound_mail_item_list.py delete mode 100644 src/increase/types/intrafi/__init__.py rename src/increase/types/{intrafi => }/intrafi_account_enrollment.py (98%) rename src/increase/types/{intrafi/account_enrollment_create_params.py => intrafi_account_enrollment_create_params.py} (76%) rename src/increase/types/{intrafi/account_enrollment_list_params.py => intrafi_account_enrollment_list_params.py} (90%) rename src/increase/types/{intrafi => }/intrafi_balance.py (98%) rename src/increase/types/{intrafi => }/intrafi_exclusion.py (98%) rename src/increase/types/{intrafi/exclusion_create_params.py => intrafi_exclusion_create_params.py} (78%) rename src/increase/types/{intrafi/exclusion_list_params.py => intrafi_exclusion_list_params.py} (88%) delete mode 100644 src/increase/types/lockbox_list.py rename src/increase/types/{routing_number.py => routing_number_list_response.py} (94%) delete mode 100644 src/increase/types/simulations/ach_transfer_create_inbound_params.py rename src/increase/types/simulations/{ach_transfer_notification_of_change_params.py => ach_transfer_create_notification_of_change_params.py} (96%) rename src/increase/types/simulations/{card_authorize_params.py => card_authorization_create_params.py} (93%) create mode 100644 src/increase/types/simulations/card_authorization_create_response.py rename src/increase/types/{simulation_card_authorization_expirations_params.py => simulations/card_authorization_expiration_create_params.py} (66%) delete mode 100644 src/increase/types/simulations/card_authorization_simulation.py rename src/increase/types/{simulation_card_fuel_confirmations_params.py => simulations/card_fuel_confirmation_create_params.py} (78%) rename src/increase/types/{simulation_card_increments_params.py => simulations/card_increment_create_params.py} (87%) rename src/increase/types/{simulation_card_reversals_params.py => simulations/card_reversal_create_params.py} (80%) rename src/increase/types/simulations/{card_settlement_params.py => card_settlement_create_params.py} (84%) create mode 100644 src/increase/types/simulations/inbound_ach_transfer_create_params.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py rename src/increase/types/simulations/{real_time_payments_transfer_create_inbound_params.py => inbound_real_time_payments_transfer_create_params.py} (88%) create mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py delete mode 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py rename src/increase/types/simulations/{wire_transfer_create_inbound_params.py => inbound_wire_transfer_create_params.py} (91%) rename src/increase/types/simulations/{physical_card_shipment_advance_params.py => physical_card_advance_shipment_params.py} (90%) rename src/increase/types/{entities => }/supplemental_document_create_params.py (76%) rename src/increase/types/{entities => }/supplemental_document_list_params.py (100%) delete mode 100644 tests/api_resources/entities/__init__.py delete mode 100644 tests/api_resources/entities/test_beneficial_owners.py delete mode 100644 tests/api_resources/entities/test_industry_code.py delete mode 100644 tests/api_resources/intrafi/__init__.py create mode 100644 tests/api_resources/simulations/test_card_authorization_expirations.py create mode 100644 tests/api_resources/simulations/test_card_authorizations.py create mode 100644 tests/api_resources/simulations/test_card_fuel_confirmations.py create mode 100644 tests/api_resources/simulations/test_card_increments.py create mode 100644 tests/api_resources/simulations/test_card_reversals.py create mode 100644 tests/api_resources/simulations/test_card_settlements.py delete mode 100644 tests/api_resources/simulations/test_cards.py create mode 100644 tests/api_resources/simulations/test_inbound_ach_transfers.py delete mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py create mode 100644 tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py create mode 100644 tests/api_resources/simulations/test_inbound_wire_transfers.py rename tests/api_resources/{intrafi/test_account_enrollments.py => test_intrafi_account_enrollments.py} (63%) rename tests/api_resources/{intrafi/test_balances.py => test_intrafi_balances.py} (66%) rename tests/api_resources/{intrafi/test_exclusions.py => test_intrafi_exclusions.py} (61%) delete mode 100644 tests/api_resources/test_simulations.py rename tests/api_resources/{entities => }/test_supplemental_documents.py (58%) delete mode 100644 tests/test_legacy_response.py diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7e971ead..6772f01dc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.61.0" + ".": "0.71.0" } \ No newline at end of file diff --git a/README.md b/README.md index 2dc0b9cba..1f137aa0e 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,15 @@ client = AsyncIncrease( environment="sandbox", ) + async def main() -> None: - account = await client.accounts.create( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ) - print(account.id) + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) + asyncio.run(main()) ``` @@ -110,6 +112,7 @@ import increase client = AsyncIncrease() + async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -117,6 +120,7 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) + asyncio.run(main()) ``` @@ -137,7 +141,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -198,7 +202,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -238,7 +242,7 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries = 5).accounts.create( +client.with_options(max_retries=5).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -265,7 +269,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout = 5.0).accounts.create( +client.with_options(timeout=5.0).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -334,11 +338,11 @@ with client.accounts.with_streaming_response.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", -) as response : - print(response.headers.get('X-My-Header')) +) as response: + print(response.headers.get("X-My-Header")) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -392,7 +396,10 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), + http_client=DefaultHttpxClient( + proxies="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), ) ``` diff --git a/requirements-dev.lock b/requirements-dev.lock index 33440059e..f6f54a23d 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 + # via increase # via respx - # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio + # via increase # via mypy # via pydantic # via pydantic-core - # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index 094dd754e..daa54a31b 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via sdk-pythonpackagename + # via increase idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase typing-extensions==4.8.0 # via anyio + # via increase # via pydantic # via pydantic-core - # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 238f453e6..519cb0b5a 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,18 +1,105 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._version import __version__, __title__ -from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS -from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError -from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN +from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes from ._utils import file_from_path +from ._client import ( + ENVIRONMENTS, + Client, + Stream, + Timeout, + Increase, + Transport, + AsyncClient, + AsyncStream, + AsyncIncrease, + RequestOptions, +) from ._models import BaseModel -from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS -from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient -from ._utils._logs import setup_logging as _setup_logging +from ._version import __title__, __version__ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse +from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS +from ._exceptions import ( + APIError, + ConflictError, + IncreaseError, + NotFoundError, + APIStatusError, + RateLimitError, + APITimeoutError, + BadRequestError, + RateLimitedError, + APIConnectionError, + InvalidAPIKeyError, + AuthenticationError, + InternalServerError, + ObjectNotFoundError, + PrivateFeatureError, + InvalidOperationError, + MalformedRequestError, + PermissionDeniedError, + APIMethodNotFoundError, + InvalidParametersError, + EnvironmentMismatchError, + UnprocessableEntityError, + APIResponseValidationError, + InsufficientPermissionsError, + IdempotencyKeyAlreadyUsedError, +) +from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._utils._logs import setup_logging as _setup_logging -__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] +__all__ = [ + "types", + "__version__", + "__title__", + "NoneType", + "Transport", + "ProxiesTypes", + "NotGiven", + "NOT_GIVEN", + "IncreaseError", + "APIError", + "APIStatusError", + "APITimeoutError", + "APIConnectionError", + "APIResponseValidationError", + "BadRequestError", + "AuthenticationError", + "PermissionDeniedError", + "NotFoundError", + "ConflictError", + "UnprocessableEntityError", + "RateLimitError", + "InternalServerError", + "APIMethodNotFoundError", + "EnvironmentMismatchError", + "IdempotencyKeyAlreadyUsedError", + "InsufficientPermissionsError", + "InvalidAPIKeyError", + "InvalidOperationError", + "InvalidParametersError", + "MalformedRequestError", + "ObjectNotFoundError", + "PrivateFeatureError", + "RateLimitedError", + "Timeout", + "RequestOptions", + "Client", + "AsyncClient", + "Stream", + "AsyncStream", + "Increase", + "AsyncIncrease", + "ENVIRONMENTS", + "file_from_path", + "BaseModel", + "DEFAULT_TIMEOUT", + "DEFAULT_MAX_RETRIES", + "DEFAULT_CONNECTION_LIMITS", + "DefaultHttpxClient", + "DefaultAsyncHttpxClient", +] _setup_logging() @@ -24,7 +111,7 @@ for __name in __all__: if not __name.startswith("__"): try: - setattr(__locals[__name], "__module__", "increase") + __locals[__name].__module__ = "increase" except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass \ No newline at end of file + pass diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 73f141e55..fe3c6e1d8 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,7 +86,6 @@ APIConnectionError, APIResponseValidationError, ) -from ._legacy_response import LegacyAPIResponse log: logging.Logger = logging.getLogger(__name__) @@ -125,14 +124,16 @@ def __init__( self, *, url: URL, - ) -> None: ... + ) -> None: + ... @overload def __init__( self, *, params: Query, - ) -> None: ... + ) -> None: + ... def __init__( self, @@ -165,7 +166,8 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: ... + def next_page_info(self) -> Optional[PageInfo]: + ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -597,7 +599,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, -**self.platform_headers(), + **self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -877,9 +879,9 @@ def __exit__( def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options def _prepare_request( self, @@ -901,7 +903,8 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def request( @@ -911,7 +914,8 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def request( @@ -922,7 +926,8 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def request( self, @@ -956,7 +961,7 @@ def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - self._prepare_options(options) + options = self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1013,7 +1018,6 @@ def _request( response.reason_phrase, response.headers, ) - try: response.raise_for_status() @@ -1087,8 +1091,6 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1150,7 +1152,8 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def get( @@ -1161,7 +1164,8 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def get( @@ -1172,7 +1176,8 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def get( self, @@ -1198,7 +1203,8 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def post( @@ -1211,7 +1217,8 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def post( @@ -1224,7 +1231,8 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def post( self, @@ -1434,9 +1442,9 @@ async def __aexit__( async def _prepare_options( self, options: FinalRequestOptions, # noqa: ARG002 - ) -> None: + ) -> FinalRequestOptions: """Hook for mutating the given options""" - return None + return options async def _prepare_request( self, @@ -1457,7 +1465,8 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def request( @@ -1468,7 +1477,8 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def request( @@ -1479,7 +1489,8 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def request( self, @@ -1518,7 +1529,7 @@ async def _request( input_options = model_copy(options) cast_to = self._maybe_override_cast_to(cast_to, options) - await self._prepare_options(options) + options = await self._prepare_options(options) retries = self._remaining_retries(remaining_retries, options) request = self._build_request(options) @@ -1639,8 +1650,6 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1692,7 +1701,8 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def get( @@ -1703,7 +1713,8 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def get( @@ -1714,7 +1725,8 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def get( self, @@ -1738,7 +1750,8 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def post( @@ -1751,7 +1764,8 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def post( @@ -1764,7 +1778,8 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index d3f890574..311788c4f 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,55 +2,56 @@ from __future__ import annotations -import httpx - -import os - -from ._streaming import AsyncStream as AsyncStream, Stream as Stream - -from ._exceptions import IncreaseError, APIStatusError - -from typing_extensions import override, Self - -from typing import Any - -from ._utils import is_mapping, get_async_library - -from . import _exceptions - import os -import asyncio -import warnings -from typing import Optional, Union, Dict, Any, Mapping, overload, cast -from typing_extensions import Literal +from typing import Any, Dict, Union, Mapping, cast +from typing_extensions import Self, Literal, override import httpx -from ._version import __version__ +from . import resources, _exceptions from ._qs import Querystring -from .types import shared_params -from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given -from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN +from ._types import ( + NOT_GIVEN, + Omit, + Timeout, + NotGiven, + Transport, + ProxiesTypes, + RequestOptions, +) +from ._utils import ( + is_given, + is_mapping, + get_async_library, +) +from ._version import __version__ +from ._streaming import Stream as Stream, AsyncStream as AsyncStream +from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( - DEFAULT_CONNECTION_LIMITS, - DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, - ResponseT, - SyncHttpxClientWrapper, - AsyncHttpxClientWrapper, SyncAPIClient, AsyncAPIClient, - make_request_options, ) -from . import resources -__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] +__all__ = [ + "ENVIRONMENTS", + "Timeout", + "Transport", + "ProxiesTypes", + "RequestOptions", + "resources", + "Increase", + "AsyncIncrease", + "Client", + "AsyncClient", +] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } + class Increase(SyncAPIClient): accounts: resources.AccountsResource account_numbers: resources.AccountNumbersResource @@ -111,22 +112,33 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -134,44 +146,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -239,32 +260,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.Client | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -279,14 +309,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -324,12 +371,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -353,6 +404,7 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class AsyncIncrease(AsyncAPIClient): accounts: resources.AsyncAccountsResource account_numbers: resources.AsyncAccountNumbersResource @@ -413,22 +465,33 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -436,44 +499,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -510,7 +582,9 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) self.programs = resources.AsyncProgramsResource(self) self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( + self + ) self.account_statements = resources.AsyncAccountStatementsResource(self) self.files = resources.AsyncFilesResource(self) self.documents = resources.AsyncDocumentsResource(self) @@ -541,32 +615,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f'async:{get_async_library()}', - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f"async:{get_async_library()}", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.AsyncClient | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -581,14 +664,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -626,12 +726,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -655,17 +759,22 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.CardsResourceWithRawResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) @@ -675,22 +784,40 @@ def __init__(self, client: Increase) -> None: self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.FilesResourceWithRawResponse(client.files) self.documents = resources.DocumentsResourceWithRawResponse(client.documents) @@ -699,53 +826,96 @@ def __init__(self, client: Increase) -> None: self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) + class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithRawResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) @@ -753,54 +923,99 @@ def __init__(self, client: AsyncIncrease) -> None: self.events = resources.AsyncEventsResourceWithRawResponse(client.events) self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) + class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.CardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.FilesResourceWithStreamingResponse(client.files) self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) @@ -808,73 +1023,141 @@ def __init__(self, client: Increase) -> None: self.events = resources.EventsResourceWithStreamingResponse(client.events) self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) + class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( + client.inbound_mail_items + ) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( + client.account_statements + ) self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( + client.event_subscriptions + ) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( + client.bookkeeping_entries + ) self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( + client.intrafi_exclusions + ) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) + Client = Increase -AsyncClient = AsyncIncrease \ No newline at end of file +AsyncClient = AsyncIncrease diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 74c7639b4..c919b5adb 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -118,10 +118,10 @@ def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: return model.__fields__ # type: ignore -def model_copy(model: _ModelT) -> _ModelT: +def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: if PYDANTIC_V2: - return model.model_copy() - return model.copy() # type: ignore + return model.model_copy(deep=deep) + return model.copy(deep=deep) # type: ignore def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: diff --git a/src/increase/_legacy_response.py b/src/increase/_legacy_response.py deleted file mode 100644 index fecb9b503..000000000 --- a/src/increase/_legacy_response.py +++ /dev/null @@ -1,456 +0,0 @@ -from __future__ import annotations - -import os -import inspect -import logging -import datetime -import functools -from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, Iterator, AsyncIterator, cast, overload -from typing_extensions import Awaitable, ParamSpec, override, deprecated, get_origin - -import anyio -import httpx -import pydantic - -from ._types import NoneType -from ._utils import is_given, extract_type_arg, is_annotated_type -from ._models import BaseModel, is_basemodel -from ._constants import RAW_RESPONSE_HEADER -from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type -from ._exceptions import APIResponseValidationError - -if TYPE_CHECKING: - from ._models import FinalRequestOptions - from ._base_client import BaseClient - - -P = ParamSpec("P") -R = TypeVar("R") -_T = TypeVar("_T") - -log: logging.Logger = logging.getLogger(__name__) - - -class LegacyAPIResponse(Generic[R]): - """This is a legacy class as it will be replaced by `APIResponse` - and `AsyncAPIResponse` in the `_response.py` file in the next major - release. - - For the sync client this will mostly be the same with the exception - of `content` & `text` will be methods instead of properties. In the - async client, all methods will be async. - - A migration script will be provided & the migration in general should - be smooth. - """ - - _cast_to: type[R] - _client: BaseClient[Any, Any] - _parsed_by_type: dict[type[Any], Any] - _stream: bool - _stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None - _options: FinalRequestOptions - - http_response: httpx.Response - - def __init__( - self, - *, - raw: httpx.Response, - cast_to: type[R], - client: BaseClient[Any, Any], - stream: bool, - stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, - options: FinalRequestOptions, - ) -> None: - self._cast_to = cast_to - self._client = client - self._parsed_by_type = {} - self._stream = stream - self._stream_cls = stream_cls - self._options = options - self.http_response = raw - - @overload - def parse(self, *, to: type[_T]) -> _T: - ... - - @overload - def parse(self) -> R: - ... - - def parse(self, *, to: type[_T] | None = None) -> R | _T: - """Returns the rich python representation of this response's data. - - NOTE: For the async client: this will become a coroutine in the next major version. - - For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`. - - You can customise the type that the response is parsed into through - the `to` argument, e.g. - - ```py - from increase import BaseModel - - - class MyModel(BaseModel): - foo: str - - - obj = response.parse(to=MyModel) - print(obj.foo) - ``` - - We support parsing: - - `BaseModel` - - `dict` - - `list` - - `Union` - - `str` - - `int` - - `float` - - `httpx.Response` - """ - cache_key = to if to is not None else self._cast_to - cached = self._parsed_by_type.get(cache_key) - if cached is not None: - return cached # type: ignore[no-any-return] - - parsed = self._parse(to=to) - if is_given(self._options.post_parser): - parsed = self._options.post_parser(parsed) - - self._parsed_by_type[cache_key] = parsed - return parsed - - @property - def headers(self) -> httpx.Headers: - return self.http_response.headers - - @property - def http_request(self) -> httpx.Request: - return self.http_response.request - - @property - def status_code(self) -> int: - return self.http_response.status_code - - @property - def url(self) -> httpx.URL: - return self.http_response.url - - @property - def method(self) -> str: - return self.http_request.method - - @property - def content(self) -> bytes: - """Return the binary response content. - - NOTE: this will be removed in favour of `.read()` in the - next major version. - """ - return self.http_response.content - - @property - def text(self) -> str: - """Return the decoded response content. - - NOTE: this will be turned into a method in the next major version. - """ - return self.http_response.text - - @property - def http_version(self) -> str: - return self.http_response.http_version - - @property - def is_closed(self) -> bool: - return self.http_response.is_closed - - @property - def elapsed(self) -> datetime.timedelta: - """The time taken for the complete request/response cycle to complete.""" - return self.http_response.elapsed - - def _parse(self, *, to: type[_T] | None = None) -> R | _T: - # unwrap `Annotated[T, ...]` -> `T` - if to and is_annotated_type(to): - to = extract_type_arg(to, 0) - - if self._stream: - if to: - if not is_stream_class_type(to): - raise TypeError(f"Expected custom parse type to be a subclass of {Stream} or {AsyncStream}") - - return cast( - _T, - to( - cast_to=extract_stream_chunk_type( - to, - failure_message="Expected custom stream type to be passed with a type argument, e.g. Stream[ChunkType]", - ), - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - if self._stream_cls: - return cast( - R, - self._stream_cls( - cast_to=extract_stream_chunk_type(self._stream_cls), - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - stream_cls = cast("type[Stream[Any]] | type[AsyncStream[Any]] | None", self._client._default_stream_cls) - if stream_cls is None: - raise MissingStreamClassError() - - return cast( - R, - stream_cls( - cast_to=self._cast_to, - response=self.http_response, - client=cast(Any, self._client), - ), - ) - - cast_to = to if to is not None else self._cast_to - - # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(cast_to): - cast_to = extract_type_arg(cast_to, 0) - - if cast_to is NoneType: - return cast(R, None) - - response = self.http_response - if cast_to == str: - return cast(R, response.text) - - if cast_to == int: - return cast(R, int(response.text)) - - if cast_to == float: - return cast(R, float(response.text)) - - origin = get_origin(cast_to) or cast_to - - if inspect.isclass(origin) and issubclass(origin, HttpxBinaryResponseContent): - return cast(R, cast_to(response)) # type: ignore - - if origin == LegacyAPIResponse: - raise RuntimeError("Unexpected state - cast_to is `APIResponse`") - - if inspect.isclass(origin) and issubclass(origin, httpx.Response): - # Because of the invariance of our ResponseT TypeVar, users can subclass httpx.Response - # and pass that class to our request functions. We cannot change the variance to be either - # covariant or contravariant as that makes our usage of ResponseT illegal. We could construct - # the response class ourselves but that is something that should be supported directly in httpx - # as it would be easy to incorrectly construct the Response object due to the multitude of arguments. - if cast_to != httpx.Response: - raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`") - return cast(R, response) - - if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") - - if ( - cast_to is not object - and not origin is list - and not origin is dict - and not origin is Union - and not issubclass(origin, BaseModel) - ): - raise RuntimeError( - f"Unsupported type, expected {cast_to} to be a subclass of {BaseModel}, {dict}, {list}, {Union}, {NoneType}, {str} or {httpx.Response}." - ) - - # split is required to handle cases where additional information is included - # in the response, e.g. application/json; charset=utf-8 - content_type, *_ = response.headers.get("content-type", "*").split(";") - if content_type != "application/json": - if is_basemodel(cast_to): - try: - data = response.json() - except Exception as exc: - log.debug("Could not read JSON from response data due to %s - %s", type(exc), exc) - else: - return self._client._process_response_data( - data=data, - cast_to=cast_to, # type: ignore - response=response, - ) - - if self._client._strict_response_validation: - raise APIResponseValidationError( - response=response, - message=f"Expected Content-Type response header to be `application/json` but received `{content_type}` instead.", - body=response.text, - ) - - # If the API responds with content that isn't JSON then we just return - # the (decoded) text without performing any parsing so that you can still - # handle the response however you need to. - return response.text # type: ignore - - data = response.json() - - return self._client._process_response_data( - data=data, - cast_to=cast_to, # type: ignore - response=response, - ) - - @override - def __repr__(self) -> str: - return f"" - - -class MissingStreamClassError(TypeError): - def __init__(self) -> None: - super().__init__( - "The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `increase._streaming` for reference", - ) - - -def to_raw_response_wrapper(func: Callable[P, R]) -> Callable[P, LegacyAPIResponse[R]]: - """Higher order function that takes one of our bound API methods and wraps it - to support returning the raw `APIResponse` object directly. - """ - - @functools.wraps(func) - def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: - extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} - extra_headers[RAW_RESPONSE_HEADER] = "true" - - kwargs["extra_headers"] = extra_headers - - return cast(LegacyAPIResponse[R], func(*args, **kwargs)) - - return wrapped - - -def async_to_raw_response_wrapper(func: Callable[P, Awaitable[R]]) -> Callable[P, Awaitable[LegacyAPIResponse[R]]]: - """Higher order function that takes one of our bound API methods and wraps it - to support returning the raw `APIResponse` object directly. - """ - - @functools.wraps(func) - async def wrapped(*args: P.args, **kwargs: P.kwargs) -> LegacyAPIResponse[R]: - extra_headers: dict[str, str] = {**(cast(Any, kwargs.get("extra_headers")) or {})} - extra_headers[RAW_RESPONSE_HEADER] = "true" - - kwargs["extra_headers"] = extra_headers - - return cast(LegacyAPIResponse[R], await func(*args, **kwargs)) - - return wrapped - - -class HttpxBinaryResponseContent: - response: httpx.Response - - def __init__(self, response: httpx.Response) -> None: - self.response = response - - @property - def content(self) -> bytes: - return self.response.content - - @property - def text(self) -> str: - return self.response.text - - @property - def encoding(self) -> str | None: - return self.response.encoding - - @property - def charset_encoding(self) -> str | None: - return self.response.charset_encoding - - def json(self, **kwargs: Any) -> Any: - return self.response.json(**kwargs) - - def read(self) -> bytes: - return self.response.read() - - def iter_bytes(self, chunk_size: int | None = None) -> Iterator[bytes]: - return self.response.iter_bytes(chunk_size) - - def iter_text(self, chunk_size: int | None = None) -> Iterator[str]: - return self.response.iter_text(chunk_size) - - def iter_lines(self) -> Iterator[str]: - return self.response.iter_lines() - - def iter_raw(self, chunk_size: int | None = None) -> Iterator[bytes]: - return self.response.iter_raw(chunk_size) - - def write_to_file( - self, - file: str | os.PathLike[str], - ) -> None: - """Write the output to the given file. - - Accepts a filename or any path-like object, e.g. pathlib.Path - - Note: if you want to stream the data to the file instead of writing - all at once then you should use `.with_streaming_response` when making - the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')` - """ - with open(file, mode="wb") as f: - for data in self.response.iter_bytes(): - f.write(data) - - @deprecated( - "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" - ) - def stream_to_file( - self, - file: str | os.PathLike[str], - *, - chunk_size: int | None = None, - ) -> None: - with open(file, mode="wb") as f: - for data in self.response.iter_bytes(chunk_size): - f.write(data) - - def close(self) -> None: - return self.response.close() - - async def aread(self) -> bytes: - return await self.response.aread() - - async def aiter_bytes(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: - return self.response.aiter_bytes(chunk_size) - - async def aiter_text(self, chunk_size: int | None = None) -> AsyncIterator[str]: - return self.response.aiter_text(chunk_size) - - async def aiter_lines(self) -> AsyncIterator[str]: - return self.response.aiter_lines() - - async def aiter_raw(self, chunk_size: int | None = None) -> AsyncIterator[bytes]: - return self.response.aiter_raw(chunk_size) - - @deprecated( - "Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used instead" - ) - async def astream_to_file( - self, - file: str | os.PathLike[str], - *, - chunk_size: int | None = None, - ) -> None: - path = anyio.Path(file) - async with await path.open(mode="wb") as f: - async for data in self.response.aiter_bytes(chunk_size): - await f.write(data) - - async def aclose(self) -> None: - return await self.response.aclose() diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 54a98364f..274320ca5 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,9 +64,7 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten( - [self._stringify_item(key, value, opts) for key, value in params.items()] - ) + return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) def _stringify_item( self, @@ -81,9 +79,7 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" - if nested_format == "dots" - else f"{key}[{subkey}]", + f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", subvalue, opts, ) @@ -96,11 +92,7 @@ def _stringify_item( return [ ( key, - ",".join( - self._primitive_value_to_str(item) - for item in value - if item is not None - ), + ",".join(self._primitive_value_to_str(item) for item in value if item is not None), ), ] elif array_format == "repeat": @@ -109,9 +101,7 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError( - "The array indices format is not supported yet" - ) + raise NotImplementedError("The array indices format is not supported yet") elif array_format == "brackets": items = [] key = key + "[]" @@ -156,9 +146,5 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = ( - qs.array_format if isinstance(array_format, NotGiven) else array_format - ) - self.nested_format = ( - qs.nested_format if isinstance(nested_format, NotGiven) else nested_format - ) + self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format + self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/increase/_response.py b/src/increase/_response.py index 5d4268a31..fd4bff802 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin +from typing_extensions import Awaitable, ParamSpec, override, get_origin import anyio import httpx @@ -26,7 +26,6 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base -from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -190,7 +189,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to - if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -205,9 +203,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError( - "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" - ) + raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") if ( cast_to is not object @@ -258,8 +254,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): - - @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -364,8 +358,6 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): - - @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 357b42be0..7b5fc6503 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,9 +9,7 @@ import httpx -from ._utils import is_mapping, is_dict, extract_type_var_from_base -from ._exceptions import APIError -from ._response import APIResponse, AsyncAPIResponse +from ._utils import extract_type_var_from_base if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -55,10 +53,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -119,10 +117,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index 0efc60a5e..510d266d3 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,7 +1,6 @@ from __future__ import annotations from os import PathLike -from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -14,10 +13,8 @@ Mapping, TypeVar, Callable, - Iterator, Optional, Sequence, - AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -28,7 +25,6 @@ if TYPE_CHECKING: from ._models import BaseModel from ._response import APIResponse, AsyncAPIResponse - from ._legacy_response import HttpxBinaryResponseContent Transport = BaseTransport AsyncTransport = AsyncBaseTransport @@ -193,7 +189,6 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", - ], ) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index ffd883e9d..c46a62a69 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,4 +59,5 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: ... + def __load__(self) -> T: + ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index 238e54ada..d0d810337 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): + if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 2fc5a1c65..34797c290 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,17 +211,20 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: ... + def foo(*, a: str) -> str: + ... @overload - def foo(*, b: bool) -> str: ... + def foo(*, b: bool) -> str: + ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: + ... ``` """ @@ -283,15 +286,18 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: ... +def strip_not_given(obj: None) -> None: + ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: + ... @overload -def strip_not_given(obj: object) -> object: ... +def strip_not_given(obj: object) -> object: + ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index e880ca207..9b556589f 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.71.0" # x-release-please-version \ No newline at end of file +__version__ = "0.71.0" # x-release-please-version diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 62201c0bc..ea6da25e1 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -1,691 +1,733 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, + CardsResource, + AsyncCardsResource, + CardsResourceWithRawResponse, + AsyncCardsResourceWithRawResponse, + CardsResourceWithStreamingResponse, + AsyncCardsResourceWithStreamingResponse, ) from .files import ( - Files, - AsyncFiles, - FilesWithRawResponse, - AsyncFilesWithRawResponse, - FilesWithStreamingResponse, - AsyncFilesWithStreamingResponse, + FilesResource, + AsyncFilesResource, + FilesResourceWithRawResponse, + AsyncFilesResourceWithRawResponse, + FilesResourceWithStreamingResponse, + AsyncFilesResourceWithStreamingResponse, ) from .events import ( - Events, - AsyncEvents, - EventsWithRawResponse, - AsyncEventsWithRawResponse, - EventsWithStreamingResponse, - AsyncEventsWithStreamingResponse, + EventsResource, + AsyncEventsResource, + EventsResourceWithRawResponse, + AsyncEventsResourceWithRawResponse, + EventsResourceWithStreamingResponse, + AsyncEventsResourceWithStreamingResponse, ) from .groups import ( - Groups, - AsyncGroups, - GroupsWithRawResponse, - AsyncGroupsWithRawResponse, - GroupsWithStreamingResponse, - AsyncGroupsWithStreamingResponse, + GroupsResource, + AsyncGroupsResource, + GroupsResourceWithRawResponse, + AsyncGroupsResourceWithRawResponse, + GroupsResourceWithStreamingResponse, + AsyncGroupsResourceWithStreamingResponse, ) from .exports import ( - Exports, - AsyncExports, - ExportsWithRawResponse, - AsyncExportsWithRawResponse, - ExportsWithStreamingResponse, - AsyncExportsWithStreamingResponse, -) -from .intrafi import ( - Intrafi, - AsyncIntrafi, - IntrafiWithRawResponse, - AsyncIntrafiWithRawResponse, - IntrafiWithStreamingResponse, - AsyncIntrafiWithStreamingResponse, + ExportsResource, + AsyncExportsResource, + ExportsResourceWithRawResponse, + AsyncExportsResourceWithRawResponse, + ExportsResourceWithStreamingResponse, + AsyncExportsResourceWithStreamingResponse, ) from .accounts import ( - Accounts, - AsyncAccounts, - AccountsWithRawResponse, - AsyncAccountsWithRawResponse, - AccountsWithStreamingResponse, - AsyncAccountsWithStreamingResponse, + AccountsResource, + AsyncAccountsResource, + AccountsResourceWithRawResponse, + AsyncAccountsResourceWithRawResponse, + AccountsResourceWithStreamingResponse, + AsyncAccountsResourceWithStreamingResponse, ) from .entities import ( - Entities, - AsyncEntities, - EntitiesWithRawResponse, - AsyncEntitiesWithRawResponse, - EntitiesWithStreamingResponse, - AsyncEntitiesWithStreamingResponse, + EntitiesResource, + AsyncEntitiesResource, + EntitiesResourceWithRawResponse, + AsyncEntitiesResourceWithRawResponse, + EntitiesResourceWithStreamingResponse, + AsyncEntitiesResourceWithStreamingResponse, ) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from .lockboxes import ( - Lockboxes, - AsyncLockboxes, - LockboxesWithRawResponse, - AsyncLockboxesWithRawResponse, - LockboxesWithStreamingResponse, - AsyncLockboxesWithStreamingResponse, + LockboxesResource, + AsyncLockboxesResource, + LockboxesResourceWithRawResponse, + AsyncLockboxesResourceWithRawResponse, + LockboxesResourceWithStreamingResponse, + AsyncLockboxesResourceWithStreamingResponse, ) from .simulations import ( - Simulations, - AsyncSimulations, - SimulationsWithRawResponse, - AsyncSimulationsWithRawResponse, - SimulationsWithStreamingResponse, - AsyncSimulationsWithStreamingResponse, + SimulationsResource, + AsyncSimulationsResource, + SimulationsResourceWithRawResponse, + AsyncSimulationsResourceWithRawResponse, + SimulationsResourceWithStreamingResponse, + AsyncSimulationsResourceWithStreamingResponse, ) from .oauth_tokens import ( - OAuthTokens, - AsyncOAuthTokens, - OAuthTokensWithRawResponse, - AsyncOAuthTokensWithRawResponse, - OAuthTokensWithStreamingResponse, - AsyncOAuthTokensWithStreamingResponse, + OAuthTokensResource, + AsyncOAuthTokensResource, + OAuthTokensResourceWithRawResponse, + AsyncOAuthTokensResourceWithRawResponse, + OAuthTokensResourceWithStreamingResponse, + AsyncOAuthTokensResourceWithStreamingResponse, ) from .transactions import ( - Transactions, - AsyncTransactions, - TransactionsWithRawResponse, - AsyncTransactionsWithRawResponse, - TransactionsWithStreamingResponse, - AsyncTransactionsWithStreamingResponse, + TransactionsResource, + AsyncTransactionsResource, + TransactionsResourceWithRawResponse, + AsyncTransactionsResourceWithRawResponse, + TransactionsResourceWithStreamingResponse, + AsyncTransactionsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, ) from .card_payments import ( - CardPayments, - AsyncCardPayments, - CardPaymentsWithRawResponse, - AsyncCardPaymentsWithRawResponse, - CardPaymentsWithStreamingResponse, - AsyncCardPaymentsWithStreamingResponse, + CardPaymentsResource, + AsyncCardPaymentsResource, + CardPaymentsResourceWithRawResponse, + AsyncCardPaymentsResourceWithRawResponse, + CardPaymentsResourceWithStreamingResponse, + AsyncCardPaymentsResourceWithStreamingResponse, ) from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, ) from .account_numbers import ( - AccountNumbers, - AsyncAccountNumbers, - AccountNumbersWithRawResponse, - AsyncAccountNumbersWithRawResponse, - AccountNumbersWithStreamingResponse, - AsyncAccountNumbersWithStreamingResponse, + AccountNumbersResource, + AsyncAccountNumbersResource, + AccountNumbersResourceWithRawResponse, + AsyncAccountNumbersResourceWithRawResponse, + AccountNumbersResourceWithStreamingResponse, + AsyncAccountNumbersResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, ) from .routing_numbers import ( - RoutingNumbers, - AsyncRoutingNumbers, - RoutingNumbersWithRawResponse, - AsyncRoutingNumbersWithRawResponse, - RoutingNumbersWithStreamingResponse, - AsyncRoutingNumbersWithStreamingResponse, + RoutingNumbersResource, + AsyncRoutingNumbersResource, + RoutingNumbersResourceWithRawResponse, + AsyncRoutingNumbersResourceWithRawResponse, + RoutingNumbersResourceWithStreamingResponse, + AsyncRoutingNumbersResourceWithStreamingResponse, +) +from .intrafi_balances import ( + IntrafiBalancesResource, + AsyncIntrafiBalancesResource, + IntrafiBalancesResourceWithRawResponse, + AsyncIntrafiBalancesResourceWithRawResponse, + IntrafiBalancesResourceWithStreamingResponse, + AsyncIntrafiBalancesResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .external_accounts import ( - ExternalAccounts, - AsyncExternalAccounts, - ExternalAccountsWithRawResponse, - AsyncExternalAccountsWithRawResponse, - ExternalAccountsWithStreamingResponse, - AsyncExternalAccountsWithStreamingResponse, + ExternalAccountsResource, + AsyncExternalAccountsResource, + ExternalAccountsResourceWithRawResponse, + AsyncExternalAccountsResourceWithRawResponse, + ExternalAccountsResourceWithStreamingResponse, + AsyncExternalAccountsResourceWithStreamingResponse, ) from .oauth_connections import ( - OAuthConnections, - AsyncOAuthConnections, - OAuthConnectionsWithRawResponse, - AsyncOAuthConnectionsWithRawResponse, - OAuthConnectionsWithStreamingResponse, - AsyncOAuthConnectionsWithStreamingResponse, + OAuthConnectionsResource, + AsyncOAuthConnectionsResource, + OAuthConnectionsResourceWithRawResponse, + AsyncOAuthConnectionsResourceWithRawResponse, + OAuthConnectionsResourceWithStreamingResponse, + AsyncOAuthConnectionsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, ) from .inbound_mail_items import ( - InboundMailItems, - AsyncInboundMailItems, - InboundMailItemsWithRawResponse, - AsyncInboundMailItemsWithRawResponse, - InboundMailItemsWithStreamingResponse, - AsyncInboundMailItemsWithStreamingResponse, + InboundMailItemsResource, + AsyncInboundMailItemsResource, + InboundMailItemsResourceWithRawResponse, + AsyncInboundMailItemsResourceWithRawResponse, + InboundMailItemsResourceWithStreamingResponse, + AsyncInboundMailItemsResourceWithStreamingResponse, +) +from .intrafi_exclusions import ( + IntrafiExclusionsResource, + AsyncIntrafiExclusionsResource, + IntrafiExclusionsResourceWithRawResponse, + AsyncIntrafiExclusionsResourceWithRawResponse, + IntrafiExclusionsResourceWithStreamingResponse, + AsyncIntrafiExclusionsResourceWithStreamingResponse, ) from .bookkeeping_entries import ( - BookkeepingEntries, - AsyncBookkeepingEntries, - BookkeepingEntriesWithRawResponse, - AsyncBookkeepingEntriesWithRawResponse, - BookkeepingEntriesWithStreamingResponse, - AsyncBookkeepingEntriesWithStreamingResponse, + BookkeepingEntriesResource, + AsyncBookkeepingEntriesResource, + BookkeepingEntriesResourceWithRawResponse, + AsyncBookkeepingEntriesResourceWithRawResponse, + BookkeepingEntriesResourceWithStreamingResponse, + AsyncBookkeepingEntriesResourceWithStreamingResponse, ) from .event_subscriptions import ( - EventSubscriptions, - AsyncEventSubscriptions, - EventSubscriptionsWithRawResponse, - AsyncEventSubscriptionsWithRawResponse, - EventSubscriptionsWithStreamingResponse, - AsyncEventSubscriptionsWithStreamingResponse, + EventSubscriptionsResource, + AsyncEventSubscriptionsResource, + EventSubscriptionsResourceWithRawResponse, + AsyncEventSubscriptionsResourceWithRawResponse, + EventSubscriptionsResourceWithStreamingResponse, + AsyncEventSubscriptionsResourceWithStreamingResponse, ) from .real_time_decisions import ( - RealTimeDecisions, - AsyncRealTimeDecisions, - RealTimeDecisionsWithRawResponse, - AsyncRealTimeDecisionsWithRawResponse, - RealTimeDecisionsWithStreamingResponse, - AsyncRealTimeDecisionsWithStreamingResponse, + RealTimeDecisionsResource, + AsyncRealTimeDecisionsResource, + RealTimeDecisionsResourceWithRawResponse, + AsyncRealTimeDecisionsResourceWithRawResponse, + RealTimeDecisionsResourceWithStreamingResponse, + AsyncRealTimeDecisionsResourceWithStreamingResponse, ) from .ach_prenotifications import ( - ACHPrenotifications, - AsyncACHPrenotifications, - ACHPrenotificationsWithRawResponse, - AsyncACHPrenotificationsWithRawResponse, - ACHPrenotificationsWithStreamingResponse, - AsyncACHPrenotificationsWithStreamingResponse, + ACHPrenotificationsResource, + AsyncACHPrenotificationsResource, + ACHPrenotificationsResourceWithRawResponse, + AsyncACHPrenotificationsResourceWithRawResponse, + ACHPrenotificationsResourceWithStreamingResponse, + AsyncACHPrenotificationsResourceWithStreamingResponse, ) from .bookkeeping_accounts import ( - BookkeepingAccounts, - AsyncBookkeepingAccounts, - BookkeepingAccountsWithRawResponse, - AsyncBookkeepingAccountsWithRawResponse, - BookkeepingAccountsWithStreamingResponse, - AsyncBookkeepingAccountsWithStreamingResponse, + BookkeepingAccountsResource, + AsyncBookkeepingAccountsResource, + BookkeepingAccountsResourceWithRawResponse, + AsyncBookkeepingAccountsResourceWithRawResponse, + BookkeepingAccountsResourceWithStreamingResponse, + AsyncBookkeepingAccountsResourceWithStreamingResponse, ) from .pending_transactions import ( - PendingTransactions, - AsyncPendingTransactions, - PendingTransactionsWithRawResponse, - AsyncPendingTransactionsWithRawResponse, - PendingTransactionsWithStreamingResponse, - AsyncPendingTransactionsWithStreamingResponse, + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .declined_transactions import ( - DeclinedTransactions, - AsyncDeclinedTransactions, - DeclinedTransactionsWithRawResponse, - AsyncDeclinedTransactionsWithRawResponse, - DeclinedTransactionsWithStreamingResponse, - AsyncDeclinedTransactionsWithStreamingResponse, + DeclinedTransactionsResource, + AsyncDeclinedTransactionsResource, + DeclinedTransactionsResourceWithRawResponse, + AsyncDeclinedTransactionsResourceWithRawResponse, + DeclinedTransactionsResourceWithStreamingResponse, + AsyncDeclinedTransactionsResourceWithStreamingResponse, ) from .digital_card_profiles import ( - DigitalCardProfiles, - AsyncDigitalCardProfiles, - DigitalCardProfilesWithRawResponse, - AsyncDigitalCardProfilesWithRawResponse, - DigitalCardProfilesWithStreamingResponse, - AsyncDigitalCardProfilesWithStreamingResponse, + DigitalCardProfilesResource, + AsyncDigitalCardProfilesResource, + DigitalCardProfilesResourceWithRawResponse, + AsyncDigitalCardProfilesResourceWithRawResponse, + DigitalCardProfilesResourceWithStreamingResponse, + AsyncDigitalCardProfilesResourceWithStreamingResponse, ) from .digital_wallet_tokens import ( - DigitalWalletTokens, - AsyncDigitalWalletTokens, - DigitalWalletTokensWithRawResponse, - AsyncDigitalWalletTokensWithRawResponse, - DigitalWalletTokensWithStreamingResponse, - AsyncDigitalWalletTokensWithStreamingResponse, + DigitalWalletTokensResource, + AsyncDigitalWalletTokensResource, + DigitalWalletTokensResourceWithRawResponse, + AsyncDigitalWalletTokensResourceWithRawResponse, + DigitalWalletTokensResourceWithStreamingResponse, + AsyncDigitalWalletTokensResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( - InboundACHTransfers, - AsyncInboundACHTransfers, - InboundACHTransfersWithRawResponse, - AsyncInboundACHTransfersWithRawResponse, - InboundACHTransfersWithStreamingResponse, - AsyncInboundACHTransfersWithStreamingResponse, + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) from .bookkeeping_entry_sets import ( - BookkeepingEntrySets, - AsyncBookkeepingEntrySets, - BookkeepingEntrySetsWithRawResponse, - AsyncBookkeepingEntrySetsWithRawResponse, - BookkeepingEntrySetsWithStreamingResponse, - AsyncBookkeepingEntrySetsWithStreamingResponse, + BookkeepingEntrySetsResource, + AsyncBookkeepingEntrySetsResource, + BookkeepingEntrySetsResourceWithRawResponse, + AsyncBookkeepingEntrySetsResourceWithRawResponse, + BookkeepingEntrySetsResourceWithStreamingResponse, + AsyncBookkeepingEntrySetsResourceWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, ) from .inbound_wire_transfers import ( - InboundWireTransfers, - AsyncInboundWireTransfers, - InboundWireTransfersWithRawResponse, - AsyncInboundWireTransfersWithRawResponse, - InboundWireTransfersWithStreamingResponse, - AsyncInboundWireTransfersWithStreamingResponse, + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, ) from .physical_card_profiles import ( - PhysicalCardProfiles, - AsyncPhysicalCardProfiles, - PhysicalCardProfilesWithRawResponse, - AsyncPhysicalCardProfilesWithRawResponse, - PhysicalCardProfilesWithStreamingResponse, - AsyncPhysicalCardProfilesWithStreamingResponse, + PhysicalCardProfilesResource, + AsyncPhysicalCardProfilesResource, + PhysicalCardProfilesResourceWithRawResponse, + AsyncPhysicalCardProfilesResourceWithRawResponse, + PhysicalCardProfilesResourceWithStreamingResponse, + AsyncPhysicalCardProfilesResourceWithStreamingResponse, +) +from .supplemental_documents import ( + SupplementalDocumentsResource, + AsyncSupplementalDocumentsResource, + SupplementalDocumentsResourceWithRawResponse, + AsyncSupplementalDocumentsResourceWithRawResponse, + SupplementalDocumentsResourceWithStreamingResponse, + AsyncSupplementalDocumentsResourceWithStreamingResponse, ) from .wire_drawdown_requests import ( - WireDrawdownRequests, - AsyncWireDrawdownRequests, - WireDrawdownRequestsWithRawResponse, - AsyncWireDrawdownRequestsWithRawResponse, - WireDrawdownRequestsWithStreamingResponse, - AsyncWireDrawdownRequestsWithStreamingResponse, + WireDrawdownRequestsResource, + AsyncWireDrawdownRequestsResource, + WireDrawdownRequestsResourceWithRawResponse, + AsyncWireDrawdownRequestsResourceWithRawResponse, + WireDrawdownRequestsResourceWithStreamingResponse, + AsyncWireDrawdownRequestsResourceWithStreamingResponse, ) from .card_purchase_supplements import ( - CardPurchaseSupplements, - AsyncCardPurchaseSupplements, - CardPurchaseSupplementsWithRawResponse, - AsyncCardPurchaseSupplementsWithRawResponse, - CardPurchaseSupplementsWithStreamingResponse, - AsyncCardPurchaseSupplementsWithStreamingResponse, + CardPurchaseSupplementsResource, + AsyncCardPurchaseSupplementsResource, + CardPurchaseSupplementsResourceWithRawResponse, + AsyncCardPurchaseSupplementsResourceWithRawResponse, + CardPurchaseSupplementsResourceWithStreamingResponse, + AsyncCardPurchaseSupplementsResourceWithStreamingResponse, +) +from .intrafi_account_enrollments import ( + IntrafiAccountEnrollmentsResource, + AsyncIntrafiAccountEnrollmentsResource, + IntrafiAccountEnrollmentsResourceWithRawResponse, + AsyncIntrafiAccountEnrollmentsResourceWithRawResponse, + IntrafiAccountEnrollmentsResourceWithStreamingResponse, + AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) from .proof_of_authorization_requests import ( - ProofOfAuthorizationRequests, - AsyncProofOfAuthorizationRequests, - ProofOfAuthorizationRequestsWithRawResponse, - AsyncProofOfAuthorizationRequestsWithRawResponse, - ProofOfAuthorizationRequestsWithStreamingResponse, - AsyncProofOfAuthorizationRequestsWithStreamingResponse, + ProofOfAuthorizationRequestsResource, + AsyncProofOfAuthorizationRequestsResource, + ProofOfAuthorizationRequestsResourceWithRawResponse, + AsyncProofOfAuthorizationRequestsResourceWithRawResponse, + ProofOfAuthorizationRequestsResourceWithStreamingResponse, + AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse, ) from .real_time_payments_request_for_payments import ( - RealTimePaymentsRequestForPayments, - AsyncRealTimePaymentsRequestForPayments, - RealTimePaymentsRequestForPaymentsWithRawResponse, - AsyncRealTimePaymentsRequestForPaymentsWithRawResponse, - RealTimePaymentsRequestForPaymentsWithStreamingResponse, - AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse, + RealTimePaymentsRequestForPaymentsResource, + AsyncRealTimePaymentsRequestForPaymentsResource, + RealTimePaymentsRequestForPaymentsResourceWithRawResponse, + AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse, + RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, + AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, ) from .proof_of_authorization_request_submissions import ( - ProofOfAuthorizationRequestSubmissions, - AsyncProofOfAuthorizationRequestSubmissions, - ProofOfAuthorizationRequestSubmissionsWithRawResponse, - AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse, - ProofOfAuthorizationRequestSubmissionsWithStreamingResponse, - AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse, + ProofOfAuthorizationRequestSubmissionsResource, + AsyncProofOfAuthorizationRequestSubmissionsResource, + ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, + AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, + ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, + AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, ) __all__ = [ - "Accounts", - "AsyncAccounts", - "AccountsWithRawResponse", - "AsyncAccountsWithRawResponse", - "AccountsWithStreamingResponse", - "AsyncAccountsWithStreamingResponse", - "AccountNumbers", - "AsyncAccountNumbers", - "AccountNumbersWithRawResponse", - "AsyncAccountNumbersWithRawResponse", - "AccountNumbersWithStreamingResponse", - "AsyncAccountNumbersWithStreamingResponse", - "BookkeepingAccounts", - "AsyncBookkeepingAccounts", - "BookkeepingAccountsWithRawResponse", - "AsyncBookkeepingAccountsWithRawResponse", - "BookkeepingAccountsWithStreamingResponse", - "AsyncBookkeepingAccountsWithStreamingResponse", - "BookkeepingEntrySets", - "AsyncBookkeepingEntrySets", - "BookkeepingEntrySetsWithRawResponse", - "AsyncBookkeepingEntrySetsWithRawResponse", - "BookkeepingEntrySetsWithStreamingResponse", - "AsyncBookkeepingEntrySetsWithStreamingResponse", - "BookkeepingEntries", - "AsyncBookkeepingEntries", - "BookkeepingEntriesWithRawResponse", - "AsyncBookkeepingEntriesWithRawResponse", - "BookkeepingEntriesWithStreamingResponse", - "AsyncBookkeepingEntriesWithStreamingResponse", - "RealTimeDecisions", - "AsyncRealTimeDecisions", - "RealTimeDecisionsWithRawResponse", - "AsyncRealTimeDecisionsWithRawResponse", - "RealTimeDecisionsWithStreamingResponse", - "AsyncRealTimeDecisionsWithStreamingResponse", - "RealTimePaymentsTransfers", - "AsyncRealTimePaymentsTransfers", - "RealTimePaymentsTransfersWithRawResponse", - "AsyncRealTimePaymentsTransfersWithRawResponse", - "RealTimePaymentsTransfersWithStreamingResponse", - "AsyncRealTimePaymentsTransfersWithStreamingResponse", - "Cards", - "AsyncCards", - "CardsWithRawResponse", - "AsyncCardsWithRawResponse", - "CardsWithStreamingResponse", - "AsyncCardsWithStreamingResponse", - "CardDisputes", - "AsyncCardDisputes", - "CardDisputesWithRawResponse", - "AsyncCardDisputesWithRawResponse", - "CardDisputesWithStreamingResponse", - "AsyncCardDisputesWithStreamingResponse", - "CardPurchaseSupplements", - "AsyncCardPurchaseSupplements", - "CardPurchaseSupplementsWithRawResponse", - "AsyncCardPurchaseSupplementsWithRawResponse", - "CardPurchaseSupplementsWithStreamingResponse", - "AsyncCardPurchaseSupplementsWithStreamingResponse", - "ExternalAccounts", - "AsyncExternalAccounts", - "ExternalAccountsWithRawResponse", - "AsyncExternalAccountsWithRawResponse", - "ExternalAccountsWithStreamingResponse", - "AsyncExternalAccountsWithStreamingResponse", - "Exports", - "AsyncExports", - "ExportsWithRawResponse", - "AsyncExportsWithRawResponse", - "ExportsWithStreamingResponse", - "AsyncExportsWithStreamingResponse", - "DigitalWalletTokens", - "AsyncDigitalWalletTokens", - "DigitalWalletTokensWithRawResponse", - "AsyncDigitalWalletTokensWithRawResponse", - "DigitalWalletTokensWithStreamingResponse", - "AsyncDigitalWalletTokensWithStreamingResponse", - "Transactions", - "AsyncTransactions", - "TransactionsWithRawResponse", - "AsyncTransactionsWithRawResponse", - "TransactionsWithStreamingResponse", - "AsyncTransactionsWithStreamingResponse", - "PendingTransactions", - "AsyncPendingTransactions", - "PendingTransactionsWithRawResponse", - "AsyncPendingTransactionsWithRawResponse", - "PendingTransactionsWithStreamingResponse", - "AsyncPendingTransactionsWithStreamingResponse", - "Programs", - "AsyncPrograms", - "ProgramsWithRawResponse", - "AsyncProgramsWithRawResponse", - "ProgramsWithStreamingResponse", - "AsyncProgramsWithStreamingResponse", - "DeclinedTransactions", - "AsyncDeclinedTransactions", - "DeclinedTransactionsWithRawResponse", - "AsyncDeclinedTransactionsWithRawResponse", - "DeclinedTransactionsWithStreamingResponse", - "AsyncDeclinedTransactionsWithStreamingResponse", - "AccountTransfers", - "AsyncAccountTransfers", - "AccountTransfersWithRawResponse", - "AsyncAccountTransfersWithRawResponse", - "AccountTransfersWithStreamingResponse", - "AsyncAccountTransfersWithStreamingResponse", - "ACHTransfers", - "AsyncACHTransfers", - "ACHTransfersWithRawResponse", - "AsyncACHTransfersWithRawResponse", - "ACHTransfersWithStreamingResponse", - "AsyncACHTransfersWithStreamingResponse", - "ACHPrenotifications", - "AsyncACHPrenotifications", - "ACHPrenotificationsWithRawResponse", - "AsyncACHPrenotificationsWithRawResponse", - "ACHPrenotificationsWithStreamingResponse", - "AsyncACHPrenotificationsWithStreamingResponse", - "Documents", - "AsyncDocuments", - "DocumentsWithRawResponse", - "AsyncDocumentsWithRawResponse", - "DocumentsWithStreamingResponse", - "AsyncDocumentsWithStreamingResponse", - "WireTransfers", - "AsyncWireTransfers", - "WireTransfersWithRawResponse", - "AsyncWireTransfersWithRawResponse", - "WireTransfersWithStreamingResponse", - "AsyncWireTransfersWithStreamingResponse", - "CheckTransfers", - "AsyncCheckTransfers", - "CheckTransfersWithRawResponse", - "AsyncCheckTransfersWithRawResponse", - "CheckTransfersWithStreamingResponse", - "AsyncCheckTransfersWithStreamingResponse", - "Entities", - "AsyncEntities", - "EntitiesWithRawResponse", - "AsyncEntitiesWithRawResponse", - "EntitiesWithStreamingResponse", - "AsyncEntitiesWithStreamingResponse", - "InboundACHTransfers", - "AsyncInboundACHTransfers", - "InboundACHTransfersWithRawResponse", - "AsyncInboundACHTransfersWithRawResponse", - "InboundACHTransfersWithStreamingResponse", - "AsyncInboundACHTransfersWithStreamingResponse", - "InboundWireDrawdownRequests", - "AsyncInboundWireDrawdownRequests", - "InboundWireDrawdownRequestsWithRawResponse", - "AsyncInboundWireDrawdownRequestsWithRawResponse", - "InboundWireDrawdownRequestsWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsWithStreamingResponse", - "WireDrawdownRequests", - "AsyncWireDrawdownRequests", - "WireDrawdownRequestsWithRawResponse", - "AsyncWireDrawdownRequestsWithRawResponse", - "WireDrawdownRequestsWithStreamingResponse", - "AsyncWireDrawdownRequestsWithStreamingResponse", - "Events", - "AsyncEvents", - "EventsWithRawResponse", - "AsyncEventsWithRawResponse", - "EventsWithStreamingResponse", - "AsyncEventsWithStreamingResponse", - "EventSubscriptions", - "AsyncEventSubscriptions", - "EventSubscriptionsWithRawResponse", - "AsyncEventSubscriptionsWithRawResponse", - "EventSubscriptionsWithStreamingResponse", - "AsyncEventSubscriptionsWithStreamingResponse", - "Files", - "AsyncFiles", - "FilesWithRawResponse", - "AsyncFilesWithRawResponse", - "FilesWithStreamingResponse", - "AsyncFilesWithStreamingResponse", - "Groups", - "AsyncGroups", - "GroupsWithRawResponse", - "AsyncGroupsWithRawResponse", - "GroupsWithStreamingResponse", - "AsyncGroupsWithStreamingResponse", - "OAuthConnections", - "AsyncOAuthConnections", - "OAuthConnectionsWithRawResponse", - "AsyncOAuthConnectionsWithRawResponse", - "OAuthConnectionsWithStreamingResponse", - "AsyncOAuthConnectionsWithStreamingResponse", - "CheckDeposits", - "AsyncCheckDeposits", - "CheckDepositsWithRawResponse", - "AsyncCheckDepositsWithRawResponse", - "CheckDepositsWithStreamingResponse", - "AsyncCheckDepositsWithStreamingResponse", - "RoutingNumbers", - "AsyncRoutingNumbers", - "RoutingNumbersWithRawResponse", - "AsyncRoutingNumbersWithRawResponse", - "RoutingNumbersWithStreamingResponse", - "AsyncRoutingNumbersWithStreamingResponse", - "AccountStatements", - "AsyncAccountStatements", - "AccountStatementsWithRawResponse", - "AsyncAccountStatementsWithRawResponse", - "AccountStatementsWithStreamingResponse", - "AsyncAccountStatementsWithStreamingResponse", - "Simulations", - "AsyncSimulations", - "SimulationsWithRawResponse", - "AsyncSimulationsWithRawResponse", - "SimulationsWithStreamingResponse", - "AsyncSimulationsWithStreamingResponse", - "PhysicalCards", - "AsyncPhysicalCards", - "PhysicalCardsWithRawResponse", - "AsyncPhysicalCardsWithRawResponse", - "PhysicalCardsWithStreamingResponse", - "AsyncPhysicalCardsWithStreamingResponse", - "CardPayments", - "AsyncCardPayments", - "CardPaymentsWithRawResponse", - "AsyncCardPaymentsWithRawResponse", - "CardPaymentsWithStreamingResponse", - "AsyncCardPaymentsWithStreamingResponse", - "ProofOfAuthorizationRequests", - "AsyncProofOfAuthorizationRequests", - "ProofOfAuthorizationRequestsWithRawResponse", - "AsyncProofOfAuthorizationRequestsWithRawResponse", - "ProofOfAuthorizationRequestsWithStreamingResponse", - "AsyncProofOfAuthorizationRequestsWithStreamingResponse", - "ProofOfAuthorizationRequestSubmissions", - "AsyncProofOfAuthorizationRequestSubmissions", - "ProofOfAuthorizationRequestSubmissionsWithRawResponse", - "AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse", - "ProofOfAuthorizationRequestSubmissionsWithStreamingResponse", - "AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse", - "Intrafi", - "AsyncIntrafi", - "IntrafiWithRawResponse", - "AsyncIntrafiWithRawResponse", - "IntrafiWithStreamingResponse", - "AsyncIntrafiWithStreamingResponse", - "RealTimePaymentsRequestForPayments", - "AsyncRealTimePaymentsRequestForPayments", - "RealTimePaymentsRequestForPaymentsWithRawResponse", - "AsyncRealTimePaymentsRequestForPaymentsWithRawResponse", - "RealTimePaymentsRequestForPaymentsWithStreamingResponse", - "AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse", - "OAuthTokens", - "AsyncOAuthTokens", - "OAuthTokensWithRawResponse", - "AsyncOAuthTokensWithRawResponse", - "OAuthTokensWithStreamingResponse", - "AsyncOAuthTokensWithStreamingResponse", - "InboundWireTransfers", - "AsyncInboundWireTransfers", - "InboundWireTransfersWithRawResponse", - "AsyncInboundWireTransfersWithRawResponse", - "InboundWireTransfersWithStreamingResponse", - "AsyncInboundWireTransfersWithStreamingResponse", - "DigitalCardProfiles", - "AsyncDigitalCardProfiles", - "DigitalCardProfilesWithRawResponse", - "AsyncDigitalCardProfilesWithRawResponse", - "DigitalCardProfilesWithStreamingResponse", - "AsyncDigitalCardProfilesWithStreamingResponse", - "PhysicalCardProfiles", - "AsyncPhysicalCardProfiles", - "PhysicalCardProfilesWithRawResponse", - "AsyncPhysicalCardProfilesWithRawResponse", - "PhysicalCardProfilesWithStreamingResponse", - "AsyncPhysicalCardProfilesWithStreamingResponse", - "InboundCheckDeposits", - "AsyncInboundCheckDeposits", - "InboundCheckDepositsWithRawResponse", - "AsyncInboundCheckDepositsWithRawResponse", - "InboundCheckDepositsWithStreamingResponse", - "AsyncInboundCheckDepositsWithStreamingResponse", - "InboundMailItems", - "AsyncInboundMailItems", - "InboundMailItemsWithRawResponse", - "AsyncInboundMailItemsWithRawResponse", - "InboundMailItemsWithStreamingResponse", - "AsyncInboundMailItemsWithStreamingResponse", - "Lockboxes", - "AsyncLockboxes", - "LockboxesWithRawResponse", - "AsyncLockboxesWithRawResponse", - "LockboxesWithStreamingResponse", - "AsyncLockboxesWithStreamingResponse", + "AccountsResource", + "AsyncAccountsResource", + "AccountsResourceWithRawResponse", + "AsyncAccountsResourceWithRawResponse", + "AccountsResourceWithStreamingResponse", + "AsyncAccountsResourceWithStreamingResponse", + "AccountNumbersResource", + "AsyncAccountNumbersResource", + "AccountNumbersResourceWithRawResponse", + "AsyncAccountNumbersResourceWithRawResponse", + "AccountNumbersResourceWithStreamingResponse", + "AsyncAccountNumbersResourceWithStreamingResponse", + "CardsResource", + "AsyncCardsResource", + "CardsResourceWithRawResponse", + "AsyncCardsResourceWithRawResponse", + "CardsResourceWithStreamingResponse", + "AsyncCardsResourceWithStreamingResponse", + "CardPaymentsResource", + "AsyncCardPaymentsResource", + "CardPaymentsResourceWithRawResponse", + "AsyncCardPaymentsResourceWithRawResponse", + "CardPaymentsResourceWithStreamingResponse", + "AsyncCardPaymentsResourceWithStreamingResponse", + "CardPurchaseSupplementsResource", + "AsyncCardPurchaseSupplementsResource", + "CardPurchaseSupplementsResourceWithRawResponse", + "AsyncCardPurchaseSupplementsResourceWithRawResponse", + "CardPurchaseSupplementsResourceWithStreamingResponse", + "AsyncCardPurchaseSupplementsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", + "PhysicalCardsResource", + "AsyncPhysicalCardsResource", + "PhysicalCardsResourceWithRawResponse", + "AsyncPhysicalCardsResourceWithRawResponse", + "PhysicalCardsResourceWithStreamingResponse", + "AsyncPhysicalCardsResourceWithStreamingResponse", + "DigitalCardProfilesResource", + "AsyncDigitalCardProfilesResource", + "DigitalCardProfilesResourceWithRawResponse", + "AsyncDigitalCardProfilesResourceWithRawResponse", + "DigitalCardProfilesResourceWithStreamingResponse", + "AsyncDigitalCardProfilesResourceWithStreamingResponse", + "PhysicalCardProfilesResource", + "AsyncPhysicalCardProfilesResource", + "PhysicalCardProfilesResourceWithRawResponse", + "AsyncPhysicalCardProfilesResourceWithRawResponse", + "PhysicalCardProfilesResourceWithStreamingResponse", + "AsyncPhysicalCardProfilesResourceWithStreamingResponse", + "DigitalWalletTokensResource", + "AsyncDigitalWalletTokensResource", + "DigitalWalletTokensResourceWithRawResponse", + "AsyncDigitalWalletTokensResourceWithRawResponse", + "DigitalWalletTokensResourceWithStreamingResponse", + "AsyncDigitalWalletTokensResourceWithStreamingResponse", + "TransactionsResource", + "AsyncTransactionsResource", + "TransactionsResourceWithRawResponse", + "AsyncTransactionsResourceWithRawResponse", + "TransactionsResourceWithStreamingResponse", + "AsyncTransactionsResourceWithStreamingResponse", + "PendingTransactionsResource", + "AsyncPendingTransactionsResource", + "PendingTransactionsResourceWithRawResponse", + "AsyncPendingTransactionsResourceWithRawResponse", + "PendingTransactionsResourceWithStreamingResponse", + "AsyncPendingTransactionsResourceWithStreamingResponse", + "DeclinedTransactionsResource", + "AsyncDeclinedTransactionsResource", + "DeclinedTransactionsResourceWithRawResponse", + "AsyncDeclinedTransactionsResourceWithRawResponse", + "DeclinedTransactionsResourceWithStreamingResponse", + "AsyncDeclinedTransactionsResourceWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", + "ACHTransfersResource", + "AsyncACHTransfersResource", + "ACHTransfersResourceWithRawResponse", + "AsyncACHTransfersResourceWithRawResponse", + "ACHTransfersResourceWithStreamingResponse", + "AsyncACHTransfersResourceWithStreamingResponse", + "ACHPrenotificationsResource", + "AsyncACHPrenotificationsResource", + "ACHPrenotificationsResourceWithRawResponse", + "AsyncACHPrenotificationsResourceWithRawResponse", + "ACHPrenotificationsResourceWithStreamingResponse", + "AsyncACHPrenotificationsResourceWithStreamingResponse", + "InboundACHTransfersResource", + "AsyncInboundACHTransfersResource", + "InboundACHTransfersResourceWithRawResponse", + "AsyncInboundACHTransfersResourceWithRawResponse", + "InboundACHTransfersResourceWithStreamingResponse", + "AsyncInboundACHTransfersResourceWithStreamingResponse", + "WireTransfersResource", + "AsyncWireTransfersResource", + "WireTransfersResourceWithRawResponse", + "AsyncWireTransfersResourceWithRawResponse", + "WireTransfersResourceWithStreamingResponse", + "AsyncWireTransfersResourceWithStreamingResponse", + "InboundWireTransfersResource", + "AsyncInboundWireTransfersResource", + "InboundWireTransfersResourceWithRawResponse", + "AsyncInboundWireTransfersResourceWithRawResponse", + "InboundWireTransfersResourceWithStreamingResponse", + "AsyncInboundWireTransfersResourceWithStreamingResponse", + "WireDrawdownRequestsResource", + "AsyncWireDrawdownRequestsResource", + "WireDrawdownRequestsResourceWithRawResponse", + "AsyncWireDrawdownRequestsResourceWithRawResponse", + "WireDrawdownRequestsResourceWithStreamingResponse", + "AsyncWireDrawdownRequestsResourceWithStreamingResponse", + "InboundWireDrawdownRequestsResource", + "AsyncInboundWireDrawdownRequestsResource", + "InboundWireDrawdownRequestsResourceWithRawResponse", + "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", + "InboundWireDrawdownRequestsResourceWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", + "CheckTransfersResource", + "AsyncCheckTransfersResource", + "CheckTransfersResourceWithRawResponse", + "AsyncCheckTransfersResourceWithRawResponse", + "CheckTransfersResourceWithStreamingResponse", + "AsyncCheckTransfersResourceWithStreamingResponse", + "InboundCheckDepositsResource", + "AsyncInboundCheckDepositsResource", + "InboundCheckDepositsResourceWithRawResponse", + "AsyncInboundCheckDepositsResourceWithRawResponse", + "InboundCheckDepositsResourceWithStreamingResponse", + "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "RealTimePaymentsTransfersResource", + "AsyncRealTimePaymentsTransfersResource", + "RealTimePaymentsTransfersResourceWithRawResponse", + "AsyncRealTimePaymentsTransfersResourceWithRawResponse", + "RealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "CheckDepositsResource", + "AsyncCheckDepositsResource", + "CheckDepositsResourceWithRawResponse", + "AsyncCheckDepositsResourceWithRawResponse", + "CheckDepositsResourceWithStreamingResponse", + "AsyncCheckDepositsResourceWithStreamingResponse", + "LockboxesResource", + "AsyncLockboxesResource", + "LockboxesResourceWithRawResponse", + "AsyncLockboxesResourceWithRawResponse", + "LockboxesResourceWithStreamingResponse", + "AsyncLockboxesResourceWithStreamingResponse", + "InboundMailItemsResource", + "AsyncInboundMailItemsResource", + "InboundMailItemsResourceWithRawResponse", + "AsyncInboundMailItemsResourceWithRawResponse", + "InboundMailItemsResourceWithStreamingResponse", + "AsyncInboundMailItemsResourceWithStreamingResponse", + "RoutingNumbersResource", + "AsyncRoutingNumbersResource", + "RoutingNumbersResourceWithRawResponse", + "AsyncRoutingNumbersResourceWithRawResponse", + "RoutingNumbersResourceWithStreamingResponse", + "AsyncRoutingNumbersResourceWithStreamingResponse", + "ExternalAccountsResource", + "AsyncExternalAccountsResource", + "ExternalAccountsResourceWithRawResponse", + "AsyncExternalAccountsResourceWithRawResponse", + "ExternalAccountsResourceWithStreamingResponse", + "AsyncExternalAccountsResourceWithStreamingResponse", + "EntitiesResource", + "AsyncEntitiesResource", + "EntitiesResourceWithRawResponse", + "AsyncEntitiesResourceWithRawResponse", + "EntitiesResourceWithStreamingResponse", + "AsyncEntitiesResourceWithStreamingResponse", + "SupplementalDocumentsResource", + "AsyncSupplementalDocumentsResource", + "SupplementalDocumentsResourceWithRawResponse", + "AsyncSupplementalDocumentsResourceWithRawResponse", + "SupplementalDocumentsResourceWithStreamingResponse", + "AsyncSupplementalDocumentsResourceWithStreamingResponse", + "ProgramsResource", + "AsyncProgramsResource", + "ProgramsResourceWithRawResponse", + "AsyncProgramsResourceWithRawResponse", + "ProgramsResourceWithStreamingResponse", + "AsyncProgramsResourceWithStreamingResponse", + "ProofOfAuthorizationRequestsResource", + "AsyncProofOfAuthorizationRequestsResource", + "ProofOfAuthorizationRequestsResourceWithRawResponse", + "AsyncProofOfAuthorizationRequestsResourceWithRawResponse", + "ProofOfAuthorizationRequestsResourceWithStreamingResponse", + "AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse", + "ProofOfAuthorizationRequestSubmissionsResource", + "AsyncProofOfAuthorizationRequestSubmissionsResource", + "ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", + "AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", + "ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", + "AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", + "AccountStatementsResource", + "AsyncAccountStatementsResource", + "AccountStatementsResourceWithRawResponse", + "AsyncAccountStatementsResourceWithRawResponse", + "AccountStatementsResourceWithStreamingResponse", + "AsyncAccountStatementsResourceWithStreamingResponse", + "FilesResource", + "AsyncFilesResource", + "FilesResourceWithRawResponse", + "AsyncFilesResourceWithRawResponse", + "FilesResourceWithStreamingResponse", + "AsyncFilesResourceWithStreamingResponse", + "DocumentsResource", + "AsyncDocumentsResource", + "DocumentsResourceWithRawResponse", + "AsyncDocumentsResourceWithRawResponse", + "DocumentsResourceWithStreamingResponse", + "AsyncDocumentsResourceWithStreamingResponse", + "ExportsResource", + "AsyncExportsResource", + "ExportsResourceWithRawResponse", + "AsyncExportsResourceWithRawResponse", + "ExportsResourceWithStreamingResponse", + "AsyncExportsResourceWithStreamingResponse", + "EventsResource", + "AsyncEventsResource", + "EventsResourceWithRawResponse", + "AsyncEventsResourceWithRawResponse", + "EventsResourceWithStreamingResponse", + "AsyncEventsResourceWithStreamingResponse", + "EventSubscriptionsResource", + "AsyncEventSubscriptionsResource", + "EventSubscriptionsResourceWithRawResponse", + "AsyncEventSubscriptionsResourceWithRawResponse", + "EventSubscriptionsResourceWithStreamingResponse", + "AsyncEventSubscriptionsResourceWithStreamingResponse", + "RealTimeDecisionsResource", + "AsyncRealTimeDecisionsResource", + "RealTimeDecisionsResourceWithRawResponse", + "AsyncRealTimeDecisionsResourceWithRawResponse", + "RealTimeDecisionsResourceWithStreamingResponse", + "AsyncRealTimeDecisionsResourceWithStreamingResponse", + "BookkeepingAccountsResource", + "AsyncBookkeepingAccountsResource", + "BookkeepingAccountsResourceWithRawResponse", + "AsyncBookkeepingAccountsResourceWithRawResponse", + "BookkeepingAccountsResourceWithStreamingResponse", + "AsyncBookkeepingAccountsResourceWithStreamingResponse", + "BookkeepingEntrySetsResource", + "AsyncBookkeepingEntrySetsResource", + "BookkeepingEntrySetsResourceWithRawResponse", + "AsyncBookkeepingEntrySetsResourceWithRawResponse", + "BookkeepingEntrySetsResourceWithStreamingResponse", + "AsyncBookkeepingEntrySetsResourceWithStreamingResponse", + "BookkeepingEntriesResource", + "AsyncBookkeepingEntriesResource", + "BookkeepingEntriesResourceWithRawResponse", + "AsyncBookkeepingEntriesResourceWithRawResponse", + "BookkeepingEntriesResourceWithStreamingResponse", + "AsyncBookkeepingEntriesResourceWithStreamingResponse", + "GroupsResource", + "AsyncGroupsResource", + "GroupsResourceWithRawResponse", + "AsyncGroupsResourceWithRawResponse", + "GroupsResourceWithStreamingResponse", + "AsyncGroupsResourceWithStreamingResponse", + "OAuthConnectionsResource", + "AsyncOAuthConnectionsResource", + "OAuthConnectionsResourceWithRawResponse", + "AsyncOAuthConnectionsResourceWithRawResponse", + "OAuthConnectionsResourceWithStreamingResponse", + "AsyncOAuthConnectionsResourceWithStreamingResponse", + "OAuthTokensResource", + "AsyncOAuthTokensResource", + "OAuthTokensResourceWithRawResponse", + "AsyncOAuthTokensResourceWithRawResponse", + "OAuthTokensResourceWithStreamingResponse", + "AsyncOAuthTokensResourceWithStreamingResponse", + "IntrafiAccountEnrollmentsResource", + "AsyncIntrafiAccountEnrollmentsResource", + "IntrafiAccountEnrollmentsResourceWithRawResponse", + "AsyncIntrafiAccountEnrollmentsResourceWithRawResponse", + "IntrafiAccountEnrollmentsResourceWithStreamingResponse", + "AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse", + "IntrafiBalancesResource", + "AsyncIntrafiBalancesResource", + "IntrafiBalancesResourceWithRawResponse", + "AsyncIntrafiBalancesResourceWithRawResponse", + "IntrafiBalancesResourceWithStreamingResponse", + "AsyncIntrafiBalancesResourceWithStreamingResponse", + "IntrafiExclusionsResource", + "AsyncIntrafiExclusionsResource", + "IntrafiExclusionsResourceWithRawResponse", + "AsyncIntrafiExclusionsResourceWithRawResponse", + "IntrafiExclusionsResourceWithStreamingResponse", + "AsyncIntrafiExclusionsResourceWithStreamingResponse", + "RealTimePaymentsRequestForPaymentsResource", + "AsyncRealTimePaymentsRequestForPaymentsResource", + "RealTimePaymentsRequestForPaymentsResourceWithRawResponse", + "AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse", + "RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", + "AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", + "SimulationsResource", + "AsyncSimulationsResource", + "SimulationsResourceWithRawResponse", + "AsyncSimulationsResourceWithRawResponse", + "SimulationsResourceWithStreamingResponse", + "AsyncSimulationsResourceWithStreamingResponse", ] diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 6823bc66c..37125226b 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( account_number_list_params, account_number_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_number import AccountNumber -__all__ = ["AccountNumbers", "AsyncAccountNumbers"] +__all__ = ["AccountNumbersResource", "AsyncAccountNumbersResource"] -class AccountNumbers(SyncAPIResource): +class AccountNumbersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountNumbersWithRawResponse: - return AccountNumbersWithRawResponse(self) + def with_raw_response(self) -> AccountNumbersResourceWithRawResponse: + return AccountNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountNumbersWithStreamingResponse: - return AccountNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountNumbersResourceWithStreamingResponse: + return AccountNumbersResourceWithStreamingResponse(self) def create( self, @@ -275,14 +279,14 @@ def list( ) -class AsyncAccountNumbers(AsyncAPIResource): +class AsyncAccountNumbersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountNumbersWithRawResponse: - return AsyncAccountNumbersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountNumbersResourceWithRawResponse: + return AsyncAccountNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountNumbersWithStreamingResponse: - return AsyncAccountNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountNumbersResourceWithStreamingResponse: + return AsyncAccountNumbersResourceWithStreamingResponse(self) async def create( self, @@ -523,44 +527,44 @@ def list( ) -class AccountNumbersWithRawResponse: - def __init__(self, account_numbers: AccountNumbers) -> None: +class AccountNumbersResourceWithRawResponse: + def __init__(self, account_numbers: AccountNumbersResource) -> None: self._account_numbers = account_numbers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( account_numbers.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_numbers.list, ) -class AsyncAccountNumbersWithRawResponse: - def __init__(self, account_numbers: AsyncAccountNumbers) -> None: +class AsyncAccountNumbersResourceWithRawResponse: + def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: self._account_numbers = account_numbers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_numbers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_numbers.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( account_numbers.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_numbers.list, ) -class AccountNumbersWithStreamingResponse: - def __init__(self, account_numbers: AccountNumbers) -> None: +class AccountNumbersResourceWithStreamingResponse: + def __init__(self, account_numbers: AccountNumbersResource) -> None: self._account_numbers = account_numbers self.create = to_streamed_response_wrapper( @@ -577,8 +581,8 @@ def __init__(self, account_numbers: AccountNumbers) -> None: ) -class AsyncAccountNumbersWithStreamingResponse: - def __init__(self, account_numbers: AsyncAccountNumbers) -> None: +class AsyncAccountNumbersResourceWithStreamingResponse: + def __init__(self, account_numbers: AsyncAccountNumbersResource) -> None: self._account_numbers = account_numbers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 1a21e706a..1ea474854 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import account_statement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_statement import AccountStatement -__all__ = ["AccountStatements", "AsyncAccountStatements"] +__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] -class AccountStatements(SyncAPIResource): +class AccountStatementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncAccountStatements(AsyncAPIResource): +class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class AccountStatementsWithRawResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_statements.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_statements.list, ) -class AsyncAccountStatementsWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_statements.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_statements.list, ) -class AccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, account_statements: AccountStatements) -> None: ) -class AsyncAccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 8b2c357b6..ef942a740 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import account_transfer_list_params, account_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account_transfer import AccountTransfer -__all__ = ["AccountTransfers", "AsyncAccountTransfers"] +__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] -class AccountTransfers(SyncAPIResource): +class AccountTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self) def create( self, @@ -280,14 +284,14 @@ def cancel( ) -class AsyncAccountTransfers(AsyncAPIResource): +class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self) async def create( self, @@ -539,50 +543,50 @@ async def cancel( ) -class AccountTransfersWithRawResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( account_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( account_transfers.cancel, ) -class AsyncAccountTransfersWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( account_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( account_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( account_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( account_transfers.cancel, ) -class AccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers self.create = to_streamed_response_wrapper( @@ -602,8 +606,8 @@ def __init__(self, account_transfers: AccountTransfers) -> None: ) -class AsyncAccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 19efac5de..11537977d 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ( account_list_params, account_create_params, @@ -22,23 +21,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup -__all__ = ["Accounts", "AsyncAccounts"] +__all__ = ["AccountsResource", "AsyncAccountsResource"] -class Accounts(SyncAPIResource): +class AccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountsWithRawResponse: - return AccountsWithRawResponse(self) + def with_raw_response(self) -> AccountsResourceWithRawResponse: + return AccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountsWithStreamingResponse: - return AccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountsResourceWithStreamingResponse: + return AccountsResourceWithStreamingResponse(self) def create( self, @@ -339,14 +343,14 @@ def close( ) -class AsyncAccounts(AsyncAPIResource): +class AsyncAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountsWithRawResponse: - return AsyncAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: + return AsyncAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountsWithStreamingResponse: - return AsyncAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse: + return AsyncAccountsResourceWithStreamingResponse(self) async def create( self, @@ -647,56 +651,56 @@ async def close( ) -class AccountsWithRawResponse: - def __init__(self, accounts: Accounts) -> None: +class AccountsResourceWithRawResponse: + def __init__(self, accounts: AccountsResource) -> None: self._accounts = accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( accounts.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( accounts.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( accounts.list, ) - self.balance = _legacy_response.to_raw_response_wrapper( + self.balance = to_raw_response_wrapper( accounts.balance, ) - self.close = _legacy_response.to_raw_response_wrapper( + self.close = to_raw_response_wrapper( accounts.close, ) -class AsyncAccountsWithRawResponse: - def __init__(self, accounts: AsyncAccounts) -> None: +class AsyncAccountsResourceWithRawResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: self._accounts = accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( accounts.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( accounts.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( accounts.list, ) - self.balance = _legacy_response.async_to_raw_response_wrapper( + self.balance = async_to_raw_response_wrapper( accounts.balance, ) - self.close = _legacy_response.async_to_raw_response_wrapper( + self.close = async_to_raw_response_wrapper( accounts.close, ) -class AccountsWithStreamingResponse: - def __init__(self, accounts: Accounts) -> None: +class AccountsResourceWithStreamingResponse: + def __init__(self, accounts: AccountsResource) -> None: self._accounts = accounts self.create = to_streamed_response_wrapper( @@ -719,8 +723,8 @@ def __init__(self, accounts: Accounts) -> None: ) -class AsyncAccountsWithStreamingResponse: - def __init__(self, accounts: AsyncAccounts) -> None: +class AsyncAccountsResourceWithStreamingResponse: + def __init__(self, accounts: AsyncAccountsResource) -> None: self._accounts = accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 8e0e1332f..b53f8c1b0 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_prenotification import ACHPrenotification -__all__ = ["ACHPrenotifications", "AsyncACHPrenotifications"] +__all__ = ["ACHPrenotificationsResource", "AsyncACHPrenotificationsResource"] -class ACHPrenotifications(SyncAPIResource): +class ACHPrenotificationsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHPrenotificationsWithRawResponse: - return ACHPrenotificationsWithRawResponse(self) + def with_raw_response(self) -> ACHPrenotificationsResourceWithRawResponse: + return ACHPrenotificationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHPrenotificationsWithStreamingResponse: - return ACHPrenotificationsWithStreamingResponse(self) + def with_streaming_response(self) -> ACHPrenotificationsResourceWithStreamingResponse: + return ACHPrenotificationsResourceWithStreamingResponse(self) def create( self, @@ -240,14 +244,14 @@ def list( ) -class AsyncACHPrenotifications(AsyncAPIResource): +class AsyncACHPrenotificationsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHPrenotificationsWithRawResponse: - return AsyncACHPrenotificationsWithRawResponse(self) + def with_raw_response(self) -> AsyncACHPrenotificationsResourceWithRawResponse: + return AsyncACHPrenotificationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHPrenotificationsWithStreamingResponse: - return AsyncACHPrenotificationsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHPrenotificationsResourceWithStreamingResponse: + return AsyncACHPrenotificationsResourceWithStreamingResponse(self) async def create( self, @@ -455,38 +459,38 @@ def list( ) -class ACHPrenotificationsWithRawResponse: - def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: +class ACHPrenotificationsResourceWithRawResponse: + def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( ach_prenotifications.list, ) -class AsyncACHPrenotificationsWithRawResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: +class AsyncACHPrenotificationsResourceWithRawResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( ach_prenotifications.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( ach_prenotifications.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( ach_prenotifications.list, ) -class ACHPrenotificationsWithStreamingResponse: - def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: +class ACHPrenotificationsResourceWithStreamingResponse: + def __init__(self, ach_prenotifications: ACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications self.create = to_streamed_response_wrapper( @@ -500,8 +504,8 @@ def __init__(self, ach_prenotifications: ACHPrenotifications) -> None: ) -class AsyncACHPrenotificationsWithStreamingResponse: - def __init__(self, ach_prenotifications: AsyncACHPrenotifications) -> None: +class AsyncACHPrenotificationsResourceWithStreamingResponse: + def __init__(self, ach_prenotifications: AsyncACHPrenotificationsResource) -> None: self._ach_prenotifications = ach_prenotifications self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index b1b178175..6df03a4fd 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.ach_transfer import ACHTransfer -__all__ = ["ACHTransfers", "AsyncACHTransfers"] +__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] -class ACHTransfers(SyncAPIResource): +class ACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self) def create( self, @@ -375,14 +379,14 @@ def cancel( ) -class AsyncACHTransfers(AsyncAPIResource): +class AsyncACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self) async def create( self, @@ -725,50 +729,50 @@ async def cancel( ) -class ACHTransfersWithRawResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( ach_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( ach_transfers.cancel, ) -class AsyncACHTransfersWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( ach_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( ach_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( ach_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( ach_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( ach_transfers.cancel, ) -class ACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers self.create = to_streamed_response_wrapper( @@ -788,8 +792,8 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: ) -class AsyncACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 558af0946..7fad31d1f 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -8,7 +8,6 @@ import httpx -from .. import _legacy_response from ..types import ( bookkeeping_account_list_params, bookkeeping_account_create_params, @@ -22,23 +21,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup -__all__ = ["BookkeepingAccounts", "AsyncBookkeepingAccounts"] +__all__ = ["BookkeepingAccountsResource", "AsyncBookkeepingAccountsResource"] -class BookkeepingAccounts(SyncAPIResource): +class BookkeepingAccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingAccountsWithRawResponse: - return BookkeepingAccountsWithRawResponse(self) + def with_raw_response(self) -> BookkeepingAccountsResourceWithRawResponse: + return BookkeepingAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingAccountsWithStreamingResponse: - return BookkeepingAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingAccountsResourceWithStreamingResponse: + return BookkeepingAccountsResourceWithStreamingResponse(self) def create( self, @@ -251,14 +255,14 @@ def balance( ) -class AsyncBookkeepingAccounts(AsyncAPIResource): +class AsyncBookkeepingAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingAccountsWithRawResponse: - return AsyncBookkeepingAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingAccountsResourceWithRawResponse: + return AsyncBookkeepingAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingAccountsWithStreamingResponse: - return AsyncBookkeepingAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingAccountsResourceWithStreamingResponse: + return AsyncBookkeepingAccountsResourceWithStreamingResponse(self) async def create( self, @@ -473,44 +477,44 @@ async def balance( ) -class BookkeepingAccountsWithRawResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: +class BookkeepingAccountsResourceWithRawResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = _legacy_response.to_raw_response_wrapper( + self.balance = to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class AsyncBookkeepingAccountsWithRawResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: +class AsyncBookkeepingAccountsResourceWithRawResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( bookkeeping_accounts.create, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( bookkeeping_accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_accounts.list, ) - self.balance = _legacy_response.async_to_raw_response_wrapper( + self.balance = async_to_raw_response_wrapper( bookkeeping_accounts.balance, ) -class BookkeepingAccountsWithStreamingResponse: - def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: +class BookkeepingAccountsResourceWithStreamingResponse: + def __init__(self, bookkeeping_accounts: BookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = to_streamed_response_wrapper( @@ -527,8 +531,8 @@ def __init__(self, bookkeeping_accounts: BookkeepingAccounts) -> None: ) -class AsyncBookkeepingAccountsWithStreamingResponse: - def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccounts) -> None: +class AsyncBookkeepingAccountsResourceWithStreamingResponse: + def __init__(self, bookkeeping_accounts: AsyncBookkeepingAccountsResource) -> None: self._bookkeeping_accounts = bookkeeping_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index dacbd168e..d774cda33 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import bookkeeping_entry_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry import BookkeepingEntry -__all__ = ["BookkeepingEntries", "AsyncBookkeepingEntries"] +__all__ = ["BookkeepingEntriesResource", "AsyncBookkeepingEntriesResource"] -class BookkeepingEntries(SyncAPIResource): +class BookkeepingEntriesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntriesWithRawResponse: - return BookkeepingEntriesWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntriesResourceWithRawResponse: + return BookkeepingEntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntriesWithStreamingResponse: - return BookkeepingEntriesWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntriesResourceWithStreamingResponse: + return BookkeepingEntriesResourceWithStreamingResponse(self) def retrieve( self, @@ -113,14 +117,14 @@ def list( ) -class AsyncBookkeepingEntries(AsyncAPIResource): +class AsyncBookkeepingEntriesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntriesWithRawResponse: - return AsyncBookkeepingEntriesWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntriesResourceWithRawResponse: + return AsyncBookkeepingEntriesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntriesWithStreamingResponse: - return AsyncBookkeepingEntriesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntriesResourceWithStreamingResponse: + return AsyncBookkeepingEntriesResourceWithStreamingResponse(self) async def retrieve( self, @@ -208,32 +212,32 @@ def list( ) -class BookkeepingEntriesWithRawResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: +class BookkeepingEntriesResourceWithRawResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_entries.list, ) -class AsyncBookkeepingEntriesWithRawResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: +class AsyncBookkeepingEntriesResourceWithRawResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( bookkeeping_entries.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_entries.list, ) -class BookkeepingEntriesWithStreamingResponse: - def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: +class BookkeepingEntriesResourceWithStreamingResponse: + def __init__(self, bookkeeping_entries: BookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = to_streamed_response_wrapper( @@ -244,8 +248,8 @@ def __init__(self, bookkeeping_entries: BookkeepingEntries) -> None: ) -class AsyncBookkeepingEntriesWithStreamingResponse: - def __init__(self, bookkeeping_entries: AsyncBookkeepingEntries) -> None: +class AsyncBookkeepingEntriesResourceWithStreamingResponse: + def __init__(self, bookkeeping_entries: AsyncBookkeepingEntriesResource) -> None: self._bookkeeping_entries = bookkeeping_entries self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index d264d675b..1aa8b68e3 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -16,22 +15,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet -__all__ = ["BookkeepingEntrySets", "AsyncBookkeepingEntrySets"] +__all__ = ["BookkeepingEntrySetsResource", "AsyncBookkeepingEntrySetsResource"] -class BookkeepingEntrySets(SyncAPIResource): +class BookkeepingEntrySetsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BookkeepingEntrySetsWithRawResponse: - return BookkeepingEntrySetsWithRawResponse(self) + def with_raw_response(self) -> BookkeepingEntrySetsResourceWithRawResponse: + return BookkeepingEntrySetsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BookkeepingEntrySetsWithStreamingResponse: - return BookkeepingEntrySetsWithStreamingResponse(self) + def with_streaming_response(self) -> BookkeepingEntrySetsResourceWithStreamingResponse: + return BookkeepingEntrySetsResourceWithStreamingResponse(self) def create( self, @@ -185,14 +189,14 @@ def list( ) -class AsyncBookkeepingEntrySets(AsyncAPIResource): +class AsyncBookkeepingEntrySetsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBookkeepingEntrySetsWithRawResponse: - return AsyncBookkeepingEntrySetsWithRawResponse(self) + def with_raw_response(self) -> AsyncBookkeepingEntrySetsResourceWithRawResponse: + return AsyncBookkeepingEntrySetsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBookkeepingEntrySetsWithStreamingResponse: - return AsyncBookkeepingEntrySetsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + return AsyncBookkeepingEntrySetsResourceWithStreamingResponse(self) async def create( self, @@ -346,38 +350,38 @@ def list( ) -class BookkeepingEntrySetsWithRawResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: +class BookkeepingEntrySetsResourceWithRawResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class AsyncBookkeepingEntrySetsWithRawResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: +class AsyncBookkeepingEntrySetsResourceWithRawResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( bookkeeping_entry_sets.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( bookkeeping_entry_sets.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( bookkeeping_entry_sets.list, ) -class BookkeepingEntrySetsWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: +class BookkeepingEntrySetsResourceWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = to_streamed_response_wrapper( @@ -391,8 +395,8 @@ def __init__(self, bookkeeping_entry_sets: BookkeepingEntrySets) -> None: ) -class AsyncBookkeepingEntrySetsWithStreamingResponse: - def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySets) -> None: +class AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + def __init__(self, bookkeeping_entry_sets: AsyncBookkeepingEntrySetsResource) -> None: self._bookkeeping_entry_sets = bookkeeping_entry_sets self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index d34070755..45c8e8b73 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import card_dispute_list_params, card_dispute_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_dispute import CardDispute -__all__ = ["CardDisputes", "AsyncCardDisputes"] +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] -class CardDisputes(SyncAPIResource): +class CardDisputesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self) + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self) def create( self, @@ -176,14 +180,14 @@ def list( ) -class AsyncCardDisputes(AsyncAPIResource): +class AsyncCardDisputesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self) async def create( self, @@ -331,38 +335,38 @@ def list( ) -class CardDisputesWithRawResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_disputes.list, ) -class AsyncCardDisputesWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( card_disputes.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_disputes.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_disputes.list, ) -class CardDisputesWithStreamingResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes self.create = to_streamed_response_wrapper( @@ -376,8 +380,8 @@ def __init__(self, card_disputes: CardDisputes) -> None: ) -class AsyncCardDisputesWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 1cc066da6..9f70437e6 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import card_payment_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_payment import CardPayment -__all__ = ["CardPayments", "AsyncCardPayments"] +__all__ = ["CardPaymentsResource", "AsyncCardPaymentsResource"] -class CardPayments(SyncAPIResource): +class CardPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPaymentsWithRawResponse: - return CardPaymentsWithRawResponse(self) + def with_raw_response(self) -> CardPaymentsResourceWithRawResponse: + return CardPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPaymentsWithStreamingResponse: - return CardPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> CardPaymentsResourceWithStreamingResponse: + return CardPaymentsResourceWithStreamingResponse(self) def retrieve( self, @@ -121,14 +125,14 @@ def list( ) -class AsyncCardPayments(AsyncAPIResource): +class AsyncCardPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPaymentsWithRawResponse: - return AsyncCardPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPaymentsResourceWithRawResponse: + return AsyncCardPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPaymentsWithStreamingResponse: - return AsyncCardPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPaymentsResourceWithStreamingResponse: + return AsyncCardPaymentsResourceWithStreamingResponse(self) async def retrieve( self, @@ -224,32 +228,32 @@ def list( ) -class CardPaymentsWithRawResponse: - def __init__(self, card_payments: CardPayments) -> None: +class CardPaymentsResourceWithRawResponse: + def __init__(self, card_payments: CardPaymentsResource) -> None: self._card_payments = card_payments - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_payments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_payments.list, ) -class AsyncCardPaymentsWithRawResponse: - def __init__(self, card_payments: AsyncCardPayments) -> None: +class AsyncCardPaymentsResourceWithRawResponse: + def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: self._card_payments = card_payments - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_payments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_payments.list, ) -class CardPaymentsWithStreamingResponse: - def __init__(self, card_payments: CardPayments) -> None: +class CardPaymentsResourceWithStreamingResponse: + def __init__(self, card_payments: CardPaymentsResource) -> None: self._card_payments = card_payments self.retrieve = to_streamed_response_wrapper( @@ -260,8 +264,8 @@ def __init__(self, card_payments: CardPayments) -> None: ) -class AsyncCardPaymentsWithStreamingResponse: - def __init__(self, card_payments: AsyncCardPayments) -> None: +class AsyncCardPaymentsResourceWithStreamingResponse: + def __init__(self, card_payments: AsyncCardPaymentsResource) -> None: self._card_payments = card_payments self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 8c5cc6aa3..20a7f41c2 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import card_purchase_supplement_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement -__all__ = ["CardPurchaseSupplements", "AsyncCardPurchaseSupplements"] +__all__ = ["CardPurchaseSupplementsResource", "AsyncCardPurchaseSupplementsResource"] -class CardPurchaseSupplements(SyncAPIResource): +class CardPurchaseSupplementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardPurchaseSupplementsWithRawResponse: - return CardPurchaseSupplementsWithRawResponse(self) + def with_raw_response(self) -> CardPurchaseSupplementsResourceWithRawResponse: + return CardPurchaseSupplementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardPurchaseSupplementsWithStreamingResponse: - return CardPurchaseSupplementsWithStreamingResponse(self) + def with_streaming_response(self) -> CardPurchaseSupplementsResourceWithStreamingResponse: + return CardPurchaseSupplementsResourceWithStreamingResponse(self) def retrieve( self, @@ -120,14 +124,14 @@ def list( ) -class AsyncCardPurchaseSupplements(AsyncAPIResource): +class AsyncCardPurchaseSupplementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardPurchaseSupplementsWithRawResponse: - return AsyncCardPurchaseSupplementsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardPurchaseSupplementsResourceWithRawResponse: + return AsyncCardPurchaseSupplementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardPurchaseSupplementsWithStreamingResponse: - return AsyncCardPurchaseSupplementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + return AsyncCardPurchaseSupplementsResourceWithStreamingResponse(self) async def retrieve( self, @@ -222,32 +226,32 @@ def list( ) -class CardPurchaseSupplementsWithRawResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: +class CardPurchaseSupplementsResourceWithRawResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( card_purchase_supplements.list, ) -class AsyncCardPurchaseSupplementsWithRawResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: +class AsyncCardPurchaseSupplementsResourceWithRawResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( card_purchase_supplements.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( card_purchase_supplements.list, ) -class CardPurchaseSupplementsWithStreamingResponse: - def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: +class CardPurchaseSupplementsResourceWithStreamingResponse: + def __init__(self, card_purchase_supplements: CardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = to_streamed_response_wrapper( @@ -258,8 +262,8 @@ def __init__(self, card_purchase_supplements: CardPurchaseSupplements) -> None: ) -class AsyncCardPurchaseSupplementsWithStreamingResponse: - def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplements) -> None: +class AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + def __init__(self, card_purchase_supplements: AsyncCardPurchaseSupplementsResource) -> None: self._card_purchase_supplements = card_purchase_supplements self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 687b5df75..fd16aac16 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import card_list_params, card_create_params, card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,23 +14,28 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails -__all__ = ["Cards", "AsyncCards"] +__all__ = ["CardsResource", "AsyncCardsResource"] -class Cards(SyncAPIResource): +class CardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self) + def with_raw_response(self) -> CardsResourceWithRawResponse: + return CardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self) + def with_streaming_response(self) -> CardsResourceWithStreamingResponse: + return CardsResourceWithStreamingResponse(self) def create( self, @@ -270,7 +274,7 @@ def list( model=Card, ) - def retrieve_sensitive_details( + def details( self, card_id: str, *, @@ -306,14 +310,14 @@ def retrieve_sensitive_details( ) -class AsyncCards(AsyncAPIResource): +class AsyncCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardsResourceWithRawResponse: + return AsyncCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardsResourceWithStreamingResponse: + return AsyncCardsResourceWithStreamingResponse(self) async def create( self, @@ -552,7 +556,7 @@ def list( model=Card, ) - async def retrieve_sensitive_details( + async def details( self, card_id: str, *, @@ -588,50 +592,50 @@ async def retrieve_sensitive_details( ) -class CardsWithRawResponse: - def __init__(self, cards: Cards) -> None: +class CardsResourceWithRawResponse: + def __init__(self, cards: CardsResource) -> None: self._cards = cards - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( cards.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( cards.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( cards.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = _legacy_response.to_raw_response_wrapper( - cards.retrieve_sensitive_details, + self.details = to_raw_response_wrapper( + cards.details, ) -class AsyncCardsWithRawResponse: - def __init__(self, cards: AsyncCards) -> None: +class AsyncCardsResourceWithRawResponse: + def __init__(self, cards: AsyncCardsResource) -> None: self._cards = cards - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( cards.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( cards.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( cards.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = _legacy_response.async_to_raw_response_wrapper( - cards.retrieve_sensitive_details, + self.details = async_to_raw_response_wrapper( + cards.details, ) -class CardsWithStreamingResponse: - def __init__(self, cards: Cards) -> None: +class CardsResourceWithStreamingResponse: + def __init__(self, cards: CardsResource) -> None: self._cards = cards self.create = to_streamed_response_wrapper( @@ -646,13 +650,13 @@ def __init__(self, cards: Cards) -> None: self.list = to_streamed_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = to_streamed_response_wrapper( - cards.retrieve_sensitive_details, + self.details = to_streamed_response_wrapper( + cards.details, ) -class AsyncCardsWithStreamingResponse: - def __init__(self, cards: AsyncCards) -> None: +class AsyncCardsResourceWithStreamingResponse: + def __init__(self, cards: AsyncCardsResource) -> None: self._cards = cards self.create = async_to_streamed_response_wrapper( @@ -667,6 +671,6 @@ def __init__(self, cards: AsyncCards) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) - self.retrieve_sensitive_details = async_to_streamed_response_wrapper( - cards.retrieve_sensitive_details, + self.details = async_to_streamed_response_wrapper( + cards.details, ) diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 407a36a92..ec91d342b 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import check_deposit_list_params, check_deposit_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_deposit import CheckDeposit -__all__ = ["CheckDeposits", "AsyncCheckDeposits"] +__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] -class CheckDeposits(SyncAPIResource): +class CheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self) def create( self, @@ -190,14 +194,14 @@ def list( ) -class AsyncCheckDeposits(AsyncAPIResource): +class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self) async def create( self, @@ -359,38 +363,38 @@ def list( ) -class CheckDepositsWithRawResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( check_deposits.list, ) -class AsyncCheckDepositsWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( check_deposits.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( check_deposits.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( check_deposits.list, ) -class CheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits self.create = to_streamed_response_wrapper( @@ -404,8 +408,8 @@ def __init__(self, check_deposits: CheckDeposits) -> None: ) -class AsyncCheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index ef39c4a2b..6a1322e28 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( check_transfer_list_params, check_transfer_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.check_transfer import CheckTransfer -__all__ = ["CheckTransfers", "AsyncCheckTransfers"] +__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] -class CheckTransfers(SyncAPIResource): +class CheckTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self) def create( self, @@ -347,14 +351,14 @@ def stop_payment( ) -class AsyncCheckTransfers(AsyncAPIResource): +class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self) async def create( self, @@ -669,56 +673,56 @@ async def stop_payment( ) -class CheckTransfersWithRawResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( check_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = _legacy_response.to_raw_response_wrapper( + self.stop_payment = to_raw_response_wrapper( check_transfers.stop_payment, ) -class AsyncCheckTransfersWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( check_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( check_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( check_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( check_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( check_transfers.cancel, ) - self.stop_payment = _legacy_response.async_to_raw_response_wrapper( + self.stop_payment = async_to_raw_response_wrapper( check_transfers.stop_payment, ) -class CheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers self.create = to_streamed_response_wrapper( @@ -741,8 +745,8 @@ def __init__(self, check_transfers: CheckTransfers) -> None: ) -class AsyncCheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index b02bbb8c2..330395cf6 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import declined_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.declined_transaction import DeclinedTransaction -__all__ = ["DeclinedTransactions", "AsyncDeclinedTransactions"] +__all__ = ["DeclinedTransactionsResource", "AsyncDeclinedTransactionsResource"] -class DeclinedTransactions(SyncAPIResource): +class DeclinedTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DeclinedTransactionsWithRawResponse: - return DeclinedTransactionsWithRawResponse(self) + def with_raw_response(self) -> DeclinedTransactionsResourceWithRawResponse: + return DeclinedTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DeclinedTransactionsWithStreamingResponse: - return DeclinedTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> DeclinedTransactionsResourceWithStreamingResponse: + return DeclinedTransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -125,14 +129,14 @@ def list( ) -class AsyncDeclinedTransactions(AsyncAPIResource): +class AsyncDeclinedTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDeclinedTransactionsWithRawResponse: - return AsyncDeclinedTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncDeclinedTransactionsResourceWithRawResponse: + return AsyncDeclinedTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDeclinedTransactionsWithStreamingResponse: - return AsyncDeclinedTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDeclinedTransactionsResourceWithStreamingResponse: + return AsyncDeclinedTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -232,32 +236,32 @@ def list( ) -class DeclinedTransactionsWithRawResponse: - def __init__(self, declined_transactions: DeclinedTransactions) -> None: +class DeclinedTransactionsResourceWithRawResponse: + def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( declined_transactions.list, ) -class AsyncDeclinedTransactionsWithRawResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: +class AsyncDeclinedTransactionsResourceWithRawResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( declined_transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( declined_transactions.list, ) -class DeclinedTransactionsWithStreamingResponse: - def __init__(self, declined_transactions: DeclinedTransactions) -> None: +class DeclinedTransactionsResourceWithStreamingResponse: + def __init__(self, declined_transactions: DeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions self.retrieve = to_streamed_response_wrapper( @@ -268,8 +272,8 @@ def __init__(self, declined_transactions: DeclinedTransactions) -> None: ) -class AsyncDeclinedTransactionsWithStreamingResponse: - def __init__(self, declined_transactions: AsyncDeclinedTransactions) -> None: +class AsyncDeclinedTransactionsResourceWithStreamingResponse: + def __init__(self, declined_transactions: AsyncDeclinedTransactionsResource) -> None: self._declined_transactions = declined_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index e93543736..bd07b9cd0 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import ( digital_card_profile_list_params, digital_card_profile_clone_params, @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_card_profile import DigitalCardProfile -__all__ = ["DigitalCardProfiles", "AsyncDigitalCardProfiles"] +__all__ = ["DigitalCardProfilesResource", "AsyncDigitalCardProfilesResource"] -class DigitalCardProfiles(SyncAPIResource): +class DigitalCardProfilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalCardProfilesWithRawResponse: - return DigitalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> DigitalCardProfilesResourceWithRawResponse: + return DigitalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalCardProfilesWithStreamingResponse: - return DigitalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalCardProfilesResourceWithStreamingResponse: + return DigitalCardProfilesResourceWithStreamingResponse(self) def create( self, @@ -336,14 +340,14 @@ def clone( ) -class AsyncDigitalCardProfiles(AsyncAPIResource): +class AsyncDigitalCardProfilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalCardProfilesWithRawResponse: - return AsyncDigitalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalCardProfilesResourceWithRawResponse: + return AsyncDigitalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalCardProfilesWithStreamingResponse: - return AsyncDigitalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalCardProfilesResourceWithStreamingResponse: + return AsyncDigitalCardProfilesResourceWithStreamingResponse(self) async def create( self, @@ -647,50 +651,50 @@ async def clone( ) -class DigitalCardProfilesWithRawResponse: - def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: +class DigitalCardProfilesResourceWithRawResponse: + def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = _legacy_response.to_raw_response_wrapper( + self.clone = to_raw_response_wrapper( digital_card_profiles.clone, ) -class AsyncDigitalCardProfilesWithRawResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: +class AsyncDigitalCardProfilesResourceWithRawResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( digital_card_profiles.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( digital_card_profiles.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( digital_card_profiles.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( digital_card_profiles.archive, ) - self.clone = _legacy_response.async_to_raw_response_wrapper( + self.clone = async_to_raw_response_wrapper( digital_card_profiles.clone, ) -class DigitalCardProfilesWithStreamingResponse: - def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: +class DigitalCardProfilesResourceWithStreamingResponse: + def __init__(self, digital_card_profiles: DigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles self.create = to_streamed_response_wrapper( @@ -710,8 +714,8 @@ def __init__(self, digital_card_profiles: DigitalCardProfiles) -> None: ) -class AsyncDigitalCardProfilesWithStreamingResponse: - def __init__(self, digital_card_profiles: AsyncDigitalCardProfiles) -> None: +class AsyncDigitalCardProfilesResourceWithStreamingResponse: + def __init__(self, digital_card_profiles: AsyncDigitalCardProfilesResource) -> None: self._digital_card_profiles = digital_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 6e4cd775a..eca69456c 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import digital_wallet_token_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.digital_wallet_token import DigitalWalletToken -__all__ = ["DigitalWalletTokens", "AsyncDigitalWalletTokens"] +__all__ = ["DigitalWalletTokensResource", "AsyncDigitalWalletTokensResource"] -class DigitalWalletTokens(SyncAPIResource): +class DigitalWalletTokensResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokensWithRawResponse: - return DigitalWalletTokensWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokensResourceWithRawResponse: + return DigitalWalletTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokensWithStreamingResponse: - return DigitalWalletTokensWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokensResourceWithStreamingResponse: + return DigitalWalletTokensResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncDigitalWalletTokens(AsyncAPIResource): +class AsyncDigitalWalletTokensResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokensWithRawResponse: - return AsyncDigitalWalletTokensWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokensResourceWithRawResponse: + return AsyncDigitalWalletTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokensWithStreamingResponse: - return AsyncDigitalWalletTokensWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokensResourceWithStreamingResponse: + return AsyncDigitalWalletTokensResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class DigitalWalletTokensWithRawResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: +class DigitalWalletTokensResourceWithRawResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( digital_wallet_tokens.list, ) -class AsyncDigitalWalletTokensWithRawResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: +class AsyncDigitalWalletTokensResourceWithRawResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( digital_wallet_tokens.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( digital_wallet_tokens.list, ) -class DigitalWalletTokensWithStreamingResponse: - def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: +class DigitalWalletTokensResourceWithStreamingResponse: + def __init__(self, digital_wallet_tokens: DigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, digital_wallet_tokens: DigitalWalletTokens) -> None: ) -class AsyncDigitalWalletTokensWithStreamingResponse: - def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokens) -> None: +class AsyncDigitalWalletTokensResourceWithStreamingResponse: + def __init__(self, digital_wallet_tokens: AsyncDigitalWalletTokensResource) -> None: self._digital_wallet_tokens = digital_wallet_tokens self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 412db0c0f..d805ad9ac 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import document_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.document import Document -__all__ = ["Documents", "AsyncDocuments"] +__all__ = ["DocumentsResource", "AsyncDocumentsResource"] -class Documents(SyncAPIResource): +class DocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self) + def with_raw_response(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncDocuments(AsyncAPIResource): +class AsyncDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class DocumentsWithRawResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithRawResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( documents.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( documents.list, ) -class AsyncDocumentsWithRawResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithRawResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( documents.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( documents.list, ) -class DocumentsWithStreamingResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithStreamingResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, documents: Documents) -> None: ) -class AsyncDocumentsWithStreamingResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithStreamingResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/entities/entities.py b/src/increase/resources/entities.py similarity index 56% rename from src/increase/resources/entities/entities.py rename to src/increase/resources/entities.py index 4477c84e9..bab96cc22 100644 --- a/src/increase/resources/entities/entities.py +++ b/src/increase/resources/entities.py @@ -8,72 +8,44 @@ import httpx -from ... import _legacy_response -from ...types import ( +from ..types import ( entity_list_params, entity_create_params, entity_confirm_params, entity_update_address_params, + entity_update_industry_code_params, + entity_create_beneficial_owner_params, + entity_archive_beneficial_owner_params, + entity_update_beneficial_owner_address_params, ) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from .industry_code import ( - IndustryCode, - AsyncIndustryCode, - IndustryCodeWithRawResponse, - AsyncIndustryCodeWithRawResponse, - IndustryCodeWithStreamingResponse, - AsyncIndustryCodeWithStreamingResponse, +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) -from ..._base_client import AsyncPaginator, make_request_options -from ...types.entity import Entity -from .beneficial_owners import ( - BeneficialOwners, - AsyncBeneficialOwners, - BeneficialOwnersWithRawResponse, - AsyncBeneficialOwnersWithRawResponse, - BeneficialOwnersWithStreamingResponse, - AsyncBeneficialOwnersWithStreamingResponse, -) -from .supplemental_documents import ( - SupplementalDocuments, - AsyncSupplementalDocuments, - SupplementalDocumentsWithRawResponse, - AsyncSupplementalDocumentsWithRawResponse, - SupplementalDocumentsWithStreamingResponse, - AsyncSupplementalDocumentsWithStreamingResponse, -) - -__all__ = ["Entities", "AsyncEntities"] - - -class Entities(SyncAPIResource): - @cached_property - def beneficial_owners(self) -> BeneficialOwners: - return BeneficialOwners(self._client) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity import Entity - @cached_property - def supplemental_documents(self) -> SupplementalDocuments: - return SupplementalDocuments(self._client) +__all__ = ["EntitiesResource", "AsyncEntitiesResource"] - @cached_property - def industry_code(self) -> IndustryCode: - return IndustryCode(self._client) +class EntitiesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EntitiesWithRawResponse: - return EntitiesWithRawResponse(self) + def with_raw_response(self) -> EntitiesResourceWithRawResponse: + return EntitiesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EntitiesWithStreamingResponse: - return EntitiesWithStreamingResponse(self) + def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse: + return EntitiesResourceWithStreamingResponse(self) def create( self, @@ -300,6 +272,57 @@ def archive( cast_to=Entity, ) + def archive_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner that is being + archived. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/archive_beneficial_owner", + body=maybe_transform( + {"beneficial_owner_id": beneficial_owner_id}, + entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def confirm( self, entity_id: str, @@ -349,6 +372,56 @@ def confirm( cast_to=Entity, ) + def create_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/create_beneficial_owner", + body=maybe_transform( + {"beneficial_owner": beneficial_owner}, + entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def update_address( self, entity_id: str, @@ -366,7 +439,7 @@ def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity to archive. + entity_id: The identifier of the Entity whose address is being updated. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -384,7 +457,7 @@ def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/address", + f"/entities/{entity_id}/update_address", body=maybe_transform({"address": address}, entity_update_address_params.EntityUpdateAddressParams), options=make_request_options( extra_headers=extra_headers, @@ -396,27 +469,125 @@ def update_address( cast_to=Entity, ) + def update_beneficial_owner_address( + self, + entity_id: str, + *, + address: entity_update_beneficial_owner_address_params.Address, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner whose address + is being updated. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/update_beneficial_owner_address", + body=maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + }, + entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + def update_industry_code( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. -class AsyncEntities(AsyncAPIResource): - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwners: - return AsyncBeneficialOwners(self._client) + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocuments: - return AsyncSupplementalDocuments(self._client) + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._post( + f"/entities/{entity_id}/update_industry_code", + body=maybe_transform( + {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) - @cached_property - def industry_code(self) -> AsyncIndustryCode: - return AsyncIndustryCode(self._client) +class AsyncEntitiesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEntitiesWithRawResponse: - return AsyncEntitiesWithRawResponse(self) + def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse: + return AsyncEntitiesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEntitiesWithStreamingResponse: - return AsyncEntitiesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse: + return AsyncEntitiesResourceWithStreamingResponse(self) async def create( self, @@ -643,6 +814,57 @@ async def archive( cast_to=Entity, ) + async def archive_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Archive a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner that is being + archived. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/archive_beneficial_owner", + body=await async_maybe_transform( + {"beneficial_owner_id": beneficial_owner_id}, + entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + async def confirm( self, entity_id: str, @@ -692,6 +914,56 @@ async def confirm( cast_to=Entity, ) + async def create_beneficial_owner( + self, + entity_id: str, + *, + beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Create a beneficial owner for a corporate Entity + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/create_beneficial_owner", + body=await async_maybe_transform( + {"beneficial_owner": beneficial_owner}, + entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + async def update_address( self, entity_id: str, @@ -709,7 +981,7 @@ async def update_address( Update a Natural Person or Corporation's address Args: - entity_id: The identifier of the Entity to archive. + entity_id: The identifier of the Entity whose address is being updated. address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. @@ -727,7 +999,7 @@ async def update_address( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/address", + f"/entities/{entity_id}/update_address", body=await async_maybe_transform( {"address": address}, entity_update_address_params.EntityUpdateAddressParams ), @@ -741,81 +1013,191 @@ async def update_address( cast_to=Entity, ) + async def update_beneficial_owner_address( + self, + entity_id: str, + *, + address: entity_update_beneficial_owner_address_params.Address, + beneficial_owner_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the address for a beneficial owner belonging to a corporate Entity + + Args: + entity_id: The identifier of the Entity associated with the Beneficial Owner whose address + is being updated. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the + corporation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/update_beneficial_owner_address", + body=await async_maybe_transform( + { + "address": address, + "beneficial_owner_id": beneficial_owner_id, + }, + entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + + async def update_industry_code( + self, + entity_id: str, + *, + industry_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update the industry code for a corporate Entity + + Args: + entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` + entities. + + industry_code: The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._post( + f"/entities/{entity_id}/update_industry_code", + body=await async_maybe_transform( + {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + -class EntitiesWithRawResponse: - def __init__(self, entities: Entities) -> None: +class EntitiesResourceWithRawResponse: + def __init__(self, entities: EntitiesResource) -> None: self._entities = entities - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( entities.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( entities.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( entities.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( entities.archive, ) - self.confirm = _legacy_response.to_raw_response_wrapper( + self.archive_beneficial_owner = to_raw_response_wrapper( + entities.archive_beneficial_owner, + ) + self.confirm = to_raw_response_wrapper( entities.confirm, ) - self.update_address = _legacy_response.to_raw_response_wrapper( + self.create_beneficial_owner = to_raw_response_wrapper( + entities.create_beneficial_owner, + ) + self.update_address = to_raw_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> BeneficialOwnersWithRawResponse: - return BeneficialOwnersWithRawResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> SupplementalDocumentsWithRawResponse: - return SupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> IndustryCodeWithRawResponse: - return IndustryCodeWithRawResponse(self._entities.industry_code) + self.update_beneficial_owner_address = to_raw_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = to_raw_response_wrapper( + entities.update_industry_code, + ) -class AsyncEntitiesWithRawResponse: - def __init__(self, entities: AsyncEntities) -> None: +class AsyncEntitiesResourceWithRawResponse: + def __init__(self, entities: AsyncEntitiesResource) -> None: self._entities = entities - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( entities.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( entities.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( entities.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( entities.archive, ) - self.confirm = _legacy_response.async_to_raw_response_wrapper( + self.archive_beneficial_owner = async_to_raw_response_wrapper( + entities.archive_beneficial_owner, + ) + self.confirm = async_to_raw_response_wrapper( entities.confirm, ) - self.update_address = _legacy_response.async_to_raw_response_wrapper( + self.create_beneficial_owner = async_to_raw_response_wrapper( + entities.create_beneficial_owner, + ) + self.update_address = async_to_raw_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwnersWithRawResponse: - return AsyncBeneficialOwnersWithRawResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocumentsWithRawResponse: - return AsyncSupplementalDocumentsWithRawResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> AsyncIndustryCodeWithRawResponse: - return AsyncIndustryCodeWithRawResponse(self._entities.industry_code) + self.update_beneficial_owner_address = async_to_raw_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = async_to_raw_response_wrapper( + entities.update_industry_code, + ) -class EntitiesWithStreamingResponse: - def __init__(self, entities: Entities) -> None: +class EntitiesResourceWithStreamingResponse: + def __init__(self, entities: EntitiesResource) -> None: self._entities = entities self.create = to_streamed_response_wrapper( @@ -830,28 +1212,28 @@ def __init__(self, entities: Entities) -> None: self.archive = to_streamed_response_wrapper( entities.archive, ) + self.archive_beneficial_owner = to_streamed_response_wrapper( + entities.archive_beneficial_owner, + ) self.confirm = to_streamed_response_wrapper( entities.confirm, ) + self.create_beneficial_owner = to_streamed_response_wrapper( + entities.create_beneficial_owner, + ) self.update_address = to_streamed_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> BeneficialOwnersWithStreamingResponse: - return BeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> SupplementalDocumentsWithStreamingResponse: - return SupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> IndustryCodeWithStreamingResponse: - return IndustryCodeWithStreamingResponse(self._entities.industry_code) + self.update_beneficial_owner_address = to_streamed_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = to_streamed_response_wrapper( + entities.update_industry_code, + ) -class AsyncEntitiesWithStreamingResponse: - def __init__(self, entities: AsyncEntities) -> None: +class AsyncEntitiesResourceWithStreamingResponse: + def __init__(self, entities: AsyncEntitiesResource) -> None: self._entities = entities self.create = async_to_streamed_response_wrapper( @@ -866,21 +1248,21 @@ def __init__(self, entities: AsyncEntities) -> None: self.archive = async_to_streamed_response_wrapper( entities.archive, ) + self.archive_beneficial_owner = async_to_streamed_response_wrapper( + entities.archive_beneficial_owner, + ) self.confirm = async_to_streamed_response_wrapper( entities.confirm, ) + self.create_beneficial_owner = async_to_streamed_response_wrapper( + entities.create_beneficial_owner, + ) self.update_address = async_to_streamed_response_wrapper( entities.update_address, ) - - @cached_property - def beneficial_owners(self) -> AsyncBeneficialOwnersWithStreamingResponse: - return AsyncBeneficialOwnersWithStreamingResponse(self._entities.beneficial_owners) - - @cached_property - def supplemental_documents(self) -> AsyncSupplementalDocumentsWithStreamingResponse: - return AsyncSupplementalDocumentsWithStreamingResponse(self._entities.supplemental_documents) - - @cached_property - def industry_code(self) -> AsyncIndustryCodeWithStreamingResponse: - return AsyncIndustryCodeWithStreamingResponse(self._entities.industry_code) + self.update_beneficial_owner_address = async_to_streamed_response_wrapper( + entities.update_beneficial_owner_address, + ) + self.update_industry_code = async_to_streamed_response_wrapper( + entities.update_industry_code, + ) diff --git a/src/increase/resources/entities/__init__.py b/src/increase/resources/entities/__init__.py deleted file mode 100644 index 67780ab76..000000000 --- a/src/increase/resources/entities/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .entities import ( - Entities, - AsyncEntities, - EntitiesWithRawResponse, - AsyncEntitiesWithRawResponse, - EntitiesWithStreamingResponse, - AsyncEntitiesWithStreamingResponse, -) -from .industry_code import ( - IndustryCode, - AsyncIndustryCode, - IndustryCodeWithRawResponse, - AsyncIndustryCodeWithRawResponse, - IndustryCodeWithStreamingResponse, - AsyncIndustryCodeWithStreamingResponse, -) -from .beneficial_owners import ( - BeneficialOwners, - AsyncBeneficialOwners, - BeneficialOwnersWithRawResponse, - AsyncBeneficialOwnersWithRawResponse, - BeneficialOwnersWithStreamingResponse, - AsyncBeneficialOwnersWithStreamingResponse, -) -from .supplemental_documents import ( - SupplementalDocuments, - AsyncSupplementalDocuments, - SupplementalDocumentsWithRawResponse, - AsyncSupplementalDocumentsWithRawResponse, - SupplementalDocumentsWithStreamingResponse, - AsyncSupplementalDocumentsWithStreamingResponse, -) - -__all__ = [ - "BeneficialOwners", - "AsyncBeneficialOwners", - "BeneficialOwnersWithRawResponse", - "AsyncBeneficialOwnersWithRawResponse", - "BeneficialOwnersWithStreamingResponse", - "AsyncBeneficialOwnersWithStreamingResponse", - "SupplementalDocuments", - "AsyncSupplementalDocuments", - "SupplementalDocumentsWithRawResponse", - "AsyncSupplementalDocumentsWithRawResponse", - "SupplementalDocumentsWithStreamingResponse", - "AsyncSupplementalDocumentsWithStreamingResponse", - "IndustryCode", - "AsyncIndustryCode", - "IndustryCodeWithRawResponse", - "AsyncIndustryCodeWithRawResponse", - "IndustryCodeWithStreamingResponse", - "AsyncIndustryCodeWithStreamingResponse", - "Entities", - "AsyncEntities", - "EntitiesWithRawResponse", - "AsyncEntitiesWithRawResponse", - "EntitiesWithStreamingResponse", - "AsyncEntitiesWithStreamingResponse", -] diff --git a/src/increase/resources/entities/beneficial_owners.py b/src/increase/resources/entities/beneficial_owners.py deleted file mode 100644 index bd3924c8a..000000000 --- a/src/increase/resources/entities/beneficial_owners.py +++ /dev/null @@ -1,420 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.entity import Entity -from ...types.entities import ( - beneficial_owner_create_params, - beneficial_owner_archive_params, - beneficial_owner_update_address_params, -) - -__all__ = ["BeneficialOwners", "AsyncBeneficialOwners"] - - -class BeneficialOwners(SyncAPIResource): - @cached_property - def with_raw_response(self) -> BeneficialOwnersWithRawResponse: - return BeneficialOwnersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> BeneficialOwnersWithStreamingResponse: - return BeneficialOwnersWithStreamingResponse(self) - - def create( - self, - *, - beneficial_owner: beneficial_owner_create_params.BeneficialOwner, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners", - body=maybe_transform( - { - "beneficial_owner": beneficial_owner, - "entity_id": entity_id, - }, - beneficial_owner_create_params.BeneficialOwnerCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - def archive( - self, - *, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners/archive", - body=maybe_transform( - { - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_archive_params.BeneficialOwnerArchiveParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - def update_address( - self, - *, - address: beneficial_owner_update_address_params.Address, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/entity_beneficial_owners/address", - body=maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class AsyncBeneficialOwners(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncBeneficialOwnersWithRawResponse: - return AsyncBeneficialOwnersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncBeneficialOwnersWithStreamingResponse: - return AsyncBeneficialOwnersWithStreamingResponse(self) - - async def create( - self, - *, - beneficial_owner: beneficial_owner_create_params.BeneficialOwner, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners", - body=await async_maybe_transform( - { - "beneficial_owner": beneficial_owner, - "entity_id": entity_id, - }, - beneficial_owner_create_params.BeneficialOwnerCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - async def archive( - self, - *, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners/archive", - body=await async_maybe_transform( - { - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_archive_params.BeneficialOwnerArchiveParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - async def update_address( - self, - *, - address: beneficial_owner_update_address_params.Address, - beneficial_owner_id: str, - entity_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - entity_id: The identifier of the Entity to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/entity_beneficial_owners/address", - body=await async_maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - "entity_id": entity_id, - }, - beneficial_owner_update_address_params.BeneficialOwnerUpdateAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class BeneficialOwnersWithRawResponse: - def __init__(self, beneficial_owners: BeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = _legacy_response.to_raw_response_wrapper( - beneficial_owners.create, - ) - self.archive = _legacy_response.to_raw_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = _legacy_response.to_raw_response_wrapper( - beneficial_owners.update_address, - ) - - -class AsyncBeneficialOwnersWithRawResponse: - def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.create, - ) - self.archive = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = _legacy_response.async_to_raw_response_wrapper( - beneficial_owners.update_address, - ) - - -class BeneficialOwnersWithStreamingResponse: - def __init__(self, beneficial_owners: BeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = to_streamed_response_wrapper( - beneficial_owners.create, - ) - self.archive = to_streamed_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = to_streamed_response_wrapper( - beneficial_owners.update_address, - ) - - -class AsyncBeneficialOwnersWithStreamingResponse: - def __init__(self, beneficial_owners: AsyncBeneficialOwners) -> None: - self._beneficial_owners = beneficial_owners - - self.create = async_to_streamed_response_wrapper( - beneficial_owners.create, - ) - self.archive = async_to_streamed_response_wrapper( - beneficial_owners.archive, - ) - self.update_address = async_to_streamed_response_wrapper( - beneficial_owners.update_address, - ) diff --git a/src/increase/resources/entities/industry_code.py b/src/increase/resources/entities/industry_code.py deleted file mode 100644 index 056389eb2..000000000 --- a/src/increase/resources/entities/industry_code.py +++ /dev/null @@ -1,180 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.entity import Entity -from ...types.entities import industry_code_create_params - -__all__ = ["IndustryCode", "AsyncIndustryCode"] - - -class IndustryCode(SyncAPIResource): - @cached_property - def with_raw_response(self) -> IndustryCodeWithRawResponse: - return IndustryCodeWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IndustryCodeWithStreamingResponse: - return IndustryCodeWithStreamingResponse(self) - - def create( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/industry_code", - body=maybe_transform( - {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class AsyncIndustryCode(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncIndustryCodeWithRawResponse: - return AsyncIndustryCodeWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIndustryCodeWithStreamingResponse: - return AsyncIndustryCodeWithStreamingResponse(self) - - async def create( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/industry_code", - body=await async_maybe_transform( - {"industry_code": industry_code}, industry_code_create_params.IndustryCodeCreateParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - - -class IndustryCodeWithRawResponse: - def __init__(self, industry_code: IndustryCode) -> None: - self._industry_code = industry_code - - self.create = _legacy_response.to_raw_response_wrapper( - industry_code.create, - ) - - -class AsyncIndustryCodeWithRawResponse: - def __init__(self, industry_code: AsyncIndustryCode) -> None: - self._industry_code = industry_code - - self.create = _legacy_response.async_to_raw_response_wrapper( - industry_code.create, - ) - - -class IndustryCodeWithStreamingResponse: - def __init__(self, industry_code: IndustryCode) -> None: - self._industry_code = industry_code - - self.create = to_streamed_response_wrapper( - industry_code.create, - ) - - -class AsyncIndustryCodeWithStreamingResponse: - def __init__(self, industry_code: AsyncIndustryCode) -> None: - self._industry_code = industry_code - - self.create = async_to_streamed_response_wrapper( - industry_code.create, - ) diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 4bf474533..835fda6ee 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( event_subscription_list_params, event_subscription_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.event_subscription import EventSubscription -__all__ = ["EventSubscriptions", "AsyncEventSubscriptions"] +__all__ = ["EventSubscriptionsResource", "AsyncEventSubscriptionsResource"] -class EventSubscriptions(SyncAPIResource): +class EventSubscriptionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventSubscriptionsWithRawResponse: - return EventSubscriptionsWithRawResponse(self) + def with_raw_response(self) -> EventSubscriptionsResourceWithRawResponse: + return EventSubscriptionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventSubscriptionsWithStreamingResponse: - return EventSubscriptionsWithStreamingResponse(self) + def with_streaming_response(self) -> EventSubscriptionsResourceWithStreamingResponse: + return EventSubscriptionsResourceWithStreamingResponse(self) def create( self, @@ -459,14 +463,14 @@ def list( ) -class AsyncEventSubscriptions(AsyncAPIResource): +class AsyncEventSubscriptionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventSubscriptionsWithRawResponse: - return AsyncEventSubscriptionsWithRawResponse(self) + def with_raw_response(self) -> AsyncEventSubscriptionsResourceWithRawResponse: + return AsyncEventSubscriptionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventSubscriptionsWithStreamingResponse: - return AsyncEventSubscriptionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventSubscriptionsResourceWithStreamingResponse: + return AsyncEventSubscriptionsResourceWithStreamingResponse(self) async def create( self, @@ -893,44 +897,44 @@ def list( ) -class EventSubscriptionsWithRawResponse: - def __init__(self, event_subscriptions: EventSubscriptions) -> None: +class EventSubscriptionsResourceWithRawResponse: + def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( event_subscriptions.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( event_subscriptions.list, ) -class AsyncEventSubscriptionsWithRawResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: +class AsyncEventSubscriptionsResourceWithRawResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( event_subscriptions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( event_subscriptions.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( event_subscriptions.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( event_subscriptions.list, ) -class EventSubscriptionsWithStreamingResponse: - def __init__(self, event_subscriptions: EventSubscriptions) -> None: +class EventSubscriptionsResourceWithStreamingResponse: + def __init__(self, event_subscriptions: EventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions self.create = to_streamed_response_wrapper( @@ -947,8 +951,8 @@ def __init__(self, event_subscriptions: EventSubscriptions) -> None: ) -class AsyncEventSubscriptionsWithStreamingResponse: - def __init__(self, event_subscriptions: AsyncEventSubscriptions) -> None: +class AsyncEventSubscriptionsResourceWithStreamingResponse: + def __init__(self, event_subscriptions: AsyncEventSubscriptionsResource) -> None: self._event_subscriptions = event_subscriptions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 9d8f7b794..0c40e6359 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import event_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.event import Event from .._base_client import AsyncPaginator, make_request_options -__all__ = ["Events", "AsyncEvents"] +__all__ = ["EventsResource", "AsyncEventsResource"] -class Events(SyncAPIResource): +class EventsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> EventsWithRawResponse: - return EventsWithRawResponse(self) + def with_raw_response(self) -> EventsResourceWithRawResponse: + return EventsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> EventsWithStreamingResponse: - return EventsWithStreamingResponse(self) + def with_streaming_response(self) -> EventsResourceWithStreamingResponse: + return EventsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncEvents(AsyncAPIResource): +class AsyncEventsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncEventsWithRawResponse: - return AsyncEventsWithRawResponse(self) + def with_raw_response(self) -> AsyncEventsResourceWithRawResponse: + return AsyncEventsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncEventsWithStreamingResponse: - return AsyncEventsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncEventsResourceWithStreamingResponse: + return AsyncEventsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class EventsWithRawResponse: - def __init__(self, events: Events) -> None: +class EventsResourceWithRawResponse: + def __init__(self, events: EventsResource) -> None: self._events = events - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( events.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( events.list, ) -class AsyncEventsWithRawResponse: - def __init__(self, events: AsyncEvents) -> None: +class AsyncEventsResourceWithRawResponse: + def __init__(self, events: AsyncEventsResource) -> None: self._events = events - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( events.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( events.list, ) -class EventsWithStreamingResponse: - def __init__(self, events: Events) -> None: +class EventsResourceWithStreamingResponse: + def __init__(self, events: EventsResource) -> None: self._events = events self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, events: Events) -> None: ) -class AsyncEventsWithStreamingResponse: - def __init__(self, events: AsyncEvents) -> None: +class AsyncEventsResourceWithStreamingResponse: + def __init__(self, events: AsyncEventsResource) -> None: self._events = events self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index d446f23f6..7b88ee376 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import export_list_params, export_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.export import Export -__all__ = ["Exports", "AsyncExports"] +__all__ = ["ExportsResource", "AsyncExportsResource"] -class Exports(SyncAPIResource): +class ExportsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExportsWithRawResponse: - return ExportsWithRawResponse(self) + def with_raw_response(self) -> ExportsResourceWithRawResponse: + return ExportsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExportsWithStreamingResponse: - return ExportsWithStreamingResponse(self) + def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: + return ExportsResourceWithStreamingResponse(self) def create( self, @@ -221,14 +225,14 @@ def list( ) -class AsyncExports(AsyncAPIResource): +class AsyncExportsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExportsWithRawResponse: - return AsyncExportsWithRawResponse(self) + def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: + return AsyncExportsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExportsWithStreamingResponse: - return AsyncExportsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: + return AsyncExportsResourceWithStreamingResponse(self) async def create( self, @@ -419,38 +423,38 @@ def list( ) -class ExportsWithRawResponse: - def __init__(self, exports: Exports) -> None: +class ExportsResourceWithRawResponse: + def __init__(self, exports: ExportsResource) -> None: self._exports = exports - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( exports.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( exports.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( exports.list, ) -class AsyncExportsWithRawResponse: - def __init__(self, exports: AsyncExports) -> None: +class AsyncExportsResourceWithRawResponse: + def __init__(self, exports: AsyncExportsResource) -> None: self._exports = exports - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( exports.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( exports.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( exports.list, ) -class ExportsWithStreamingResponse: - def __init__(self, exports: Exports) -> None: +class ExportsResourceWithStreamingResponse: + def __init__(self, exports: ExportsResource) -> None: self._exports = exports self.create = to_streamed_response_wrapper( @@ -464,8 +468,8 @@ def __init__(self, exports: Exports) -> None: ) -class AsyncExportsWithStreamingResponse: - def __init__(self, exports: AsyncExports) -> None: +class AsyncExportsResourceWithStreamingResponse: + def __init__(self, exports: AsyncExportsResource) -> None: self._exports = exports self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 8e7cde5af..a335b048c 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import ( external_account_list_params, external_account_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.external_account import ExternalAccount -__all__ = ["ExternalAccounts", "AsyncExternalAccounts"] +__all__ = ["ExternalAccountsResource", "AsyncExternalAccountsResource"] -class ExternalAccounts(SyncAPIResource): +class ExternalAccountsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExternalAccountsWithRawResponse: - return ExternalAccountsWithRawResponse(self) + def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse: + return ExternalAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExternalAccountsWithStreamingResponse: - return ExternalAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> ExternalAccountsResourceWithStreamingResponse: + return ExternalAccountsResourceWithStreamingResponse(self) def create( self, @@ -282,14 +286,14 @@ def list( ) -class AsyncExternalAccounts(AsyncAPIResource): +class AsyncExternalAccountsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExternalAccountsWithRawResponse: - return AsyncExternalAccountsWithRawResponse(self) + def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse: + return AsyncExternalAccountsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExternalAccountsWithStreamingResponse: - return AsyncExternalAccountsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncExternalAccountsResourceWithStreamingResponse: + return AsyncExternalAccountsResourceWithStreamingResponse(self) async def create( self, @@ -537,44 +541,44 @@ def list( ) -class ExternalAccountsWithRawResponse: - def __init__(self, external_accounts: ExternalAccounts) -> None: +class ExternalAccountsResourceWithRawResponse: + def __init__(self, external_accounts: ExternalAccountsResource) -> None: self._external_accounts = external_accounts - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( external_accounts.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( external_accounts.list, ) -class AsyncExternalAccountsWithRawResponse: - def __init__(self, external_accounts: AsyncExternalAccounts) -> None: +class AsyncExternalAccountsResourceWithRawResponse: + def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: self._external_accounts = external_accounts - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( external_accounts.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( external_accounts.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( external_accounts.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( external_accounts.list, ) -class ExternalAccountsWithStreamingResponse: - def __init__(self, external_accounts: ExternalAccounts) -> None: +class ExternalAccountsResourceWithStreamingResponse: + def __init__(self, external_accounts: ExternalAccountsResource) -> None: self._external_accounts = external_accounts self.create = to_streamed_response_wrapper( @@ -591,8 +595,8 @@ def __init__(self, external_accounts: ExternalAccounts) -> None: ) -class AsyncExternalAccountsWithStreamingResponse: - def __init__(self, external_accounts: AsyncExternalAccounts) -> None: +class AsyncExternalAccountsResourceWithStreamingResponse: + def __init__(self, external_accounts: AsyncExternalAccountsResource) -> None: self._external_accounts = external_accounts self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index e74d6ee4d..c10fb9bdb 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import file_list_params, file_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes from .._utils import ( @@ -18,22 +17,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from ..types.file import File from .._base_client import AsyncPaginator, make_request_options -__all__ = ["Files", "AsyncFiles"] +__all__ = ["FilesResource", "AsyncFilesResource"] -class Files(SyncAPIResource): +class FilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> FilesWithRawResponse: - return FilesWithRawResponse(self) + def with_raw_response(self) -> FilesResourceWithRawResponse: + return FilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> FilesWithStreamingResponse: - return FilesWithStreamingResponse(self) + def with_streaming_response(self) -> FilesResourceWithStreamingResponse: + return FilesResourceWithStreamingResponse(self) def create( self, @@ -232,14 +236,14 @@ def list( ) -class AsyncFiles(AsyncAPIResource): +class AsyncFilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncFilesWithRawResponse: - return AsyncFilesWithRawResponse(self) + def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: + return AsyncFilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncFilesWithStreamingResponse: - return AsyncFilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: + return AsyncFilesResourceWithStreamingResponse(self) async def create( self, @@ -438,38 +442,38 @@ def list( ) -class FilesWithRawResponse: - def __init__(self, files: Files) -> None: +class FilesResourceWithRawResponse: + def __init__(self, files: FilesResource) -> None: self._files = files - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( files.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( files.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( files.list, ) -class AsyncFilesWithRawResponse: - def __init__(self, files: AsyncFiles) -> None: +class AsyncFilesResourceWithRawResponse: + def __init__(self, files: AsyncFilesResource) -> None: self._files = files - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( files.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( files.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( files.list, ) -class FilesWithStreamingResponse: - def __init__(self, files: Files) -> None: +class FilesResourceWithStreamingResponse: + def __init__(self, files: FilesResource) -> None: self._files = files self.create = to_streamed_response_wrapper( @@ -483,8 +487,8 @@ def __init__(self, files: Files) -> None: ) -class AsyncFilesWithStreamingResponse: - def __init__(self, files: AsyncFiles) -> None: +class AsyncFilesResourceWithStreamingResponse: + def __init__(self, files: AsyncFilesResource) -> None: self._files = files self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 839d988d7..84a2f1aff 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -4,27 +4,31 @@ import httpx -from .. import _legacy_response from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..types.group import Group from .._base_client import make_request_options -__all__ = ["Groups", "AsyncGroups"] +__all__ = ["GroupsResource", "AsyncGroupsResource"] -class Groups(SyncAPIResource): +class GroupsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> GroupsWithRawResponse: - return GroupsWithRawResponse(self) + def with_raw_response(self) -> GroupsResourceWithRawResponse: + return GroupsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> GroupsWithStreamingResponse: - return GroupsWithStreamingResponse(self) + def with_streaming_response(self) -> GroupsResourceWithStreamingResponse: + return GroupsResourceWithStreamingResponse(self) - def retrieve_details( + def retrieve( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -44,16 +48,16 @@ def retrieve_details( ) -class AsyncGroups(AsyncAPIResource): +class AsyncGroupsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncGroupsWithRawResponse: - return AsyncGroupsWithRawResponse(self) + def with_raw_response(self) -> AsyncGroupsResourceWithRawResponse: + return AsyncGroupsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncGroupsWithStreamingResponse: - return AsyncGroupsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncGroupsResourceWithStreamingResponse: + return AsyncGroupsResourceWithStreamingResponse(self) - async def retrieve_details( + async def retrieve( self, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -73,37 +77,37 @@ async def retrieve_details( ) -class GroupsWithRawResponse: - def __init__(self, groups: Groups) -> None: +class GroupsResourceWithRawResponse: + def __init__(self, groups: GroupsResource) -> None: self._groups = groups - self.retrieve_details = _legacy_response.to_raw_response_wrapper( - groups.retrieve_details, + self.retrieve = to_raw_response_wrapper( + groups.retrieve, ) -class AsyncGroupsWithRawResponse: - def __init__(self, groups: AsyncGroups) -> None: +class AsyncGroupsResourceWithRawResponse: + def __init__(self, groups: AsyncGroupsResource) -> None: self._groups = groups - self.retrieve_details = _legacy_response.async_to_raw_response_wrapper( - groups.retrieve_details, + self.retrieve = async_to_raw_response_wrapper( + groups.retrieve, ) -class GroupsWithStreamingResponse: - def __init__(self, groups: Groups) -> None: +class GroupsResourceWithStreamingResponse: + def __init__(self, groups: GroupsResource) -> None: self._groups = groups - self.retrieve_details = to_streamed_response_wrapper( - groups.retrieve_details, + self.retrieve = to_streamed_response_wrapper( + groups.retrieve, ) -class AsyncGroupsWithStreamingResponse: - def __init__(self, groups: AsyncGroups) -> None: +class AsyncGroupsResourceWithStreamingResponse: + def __init__(self, groups: AsyncGroupsResource) -> None: self._groups = groups - self.retrieve_details = async_to_streamed_response_wrapper( - groups.retrieve_details, + self.retrieve = async_to_streamed_response_wrapper( + groups.retrieve, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index f76ea1972..efa002682 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -6,11 +6,10 @@ import httpx -from .. import _legacy_response from ..types import ( inbound_ach_transfer_list_params, inbound_ach_transfer_transfer_return_params, - inbound_ach_transfer_notification_of_change_params, + inbound_ach_transfer_create_notification_of_change_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["InboundACHTransfers", "AsyncInboundACHTransfers"] +__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] -class InboundACHTransfers(SyncAPIResource): +class InboundACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundACHTransfersWithRawResponse: - return InboundACHTransfersWithRawResponse(self) + def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundACHTransfersWithStreamingResponse: - return InboundACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self) def retrieve( self, @@ -141,10 +145,12 @@ def list( model=InboundACHTransfer, ) - def decline( + def create_notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -154,10 +160,15 @@ def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -174,7 +185,14 @@ def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + body=maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -185,12 +203,10 @@ def decline( cast_to=InboundACHTransfer, ) - def notification_of_change( + def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -200,15 +216,10 @@ def notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -225,14 +236,7 @@ def notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", - body=maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -330,14 +334,14 @@ def transfer_return( ) -class AsyncInboundACHTransfers(AsyncAPIResource): +class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundACHTransfersWithRawResponse: - return AsyncInboundACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundACHTransfersWithStreamingResponse: - return AsyncInboundACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self) async def retrieve( self, @@ -444,10 +448,12 @@ def list( model=InboundACHTransfer, ) - async def decline( + async def create_notification_of_change( self, inbound_ach_transfer_id: str, *, + updated_account_number: str | NotGiven = NOT_GIVEN, + updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -457,10 +463,15 @@ async def decline( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Decline an Inbound ACH Transfer + Create a notification of change for an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of + change. + + updated_account_number: The updated account number to send in the notification of change. + + updated_routing_number: The updated routing number to send in the notification of change. extra_headers: Send extra headers @@ -477,7 +488,14 @@ async def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + body=await async_maybe_transform( + { + "updated_account_number": updated_account_number, + "updated_routing_number": updated_routing_number, + }, + inbound_ach_transfer_create_notification_of_change_params.InboundACHTransferCreateNotificationOfChangeParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -488,12 +506,10 @@ async def decline( cast_to=InboundACHTransfer, ) - async def notification_of_change( + async def decline( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -503,15 +519,10 @@ async def notification_of_change( idempotency_key: str | None = None, ) -> InboundACHTransfer: """ - Create a notification of change for an Inbound ACH Transfer + Decline an Inbound ACH Transfer Args: - inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer for which to create a notification of - change. - - updated_account_number: The updated account number to send in the notification of change. - - updated_routing_number: The updated routing number to send in the notification of change. + inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. extra_headers: Send extra headers @@ -528,14 +539,7 @@ async def notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/notification_of_change", - body=await async_maybe_transform( - { - "updated_account_number": updated_account_number, - "updated_routing_number": updated_routing_number, - }, - inbound_ach_transfer_notification_of_change_params.InboundACHTransferNotificationOfChangeParams, - ), + f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -633,50 +637,50 @@ async def transfer_return( ) -class InboundACHTransfersWithRawResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: +class InboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.decline = _legacy_response.to_raw_response_wrapper( - inbound_ach_transfers.decline, + self.create_notification_of_change = to_raw_response_wrapper( + inbound_ach_transfers.create_notification_of_change, ) - self.notification_of_change = _legacy_response.to_raw_response_wrapper( - inbound_ach_transfers.notification_of_change, + self.decline = to_raw_response_wrapper( + inbound_ach_transfers.decline, ) - self.transfer_return = _legacy_response.to_raw_response_wrapper( + self.transfer_return = to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersWithRawResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: +class AsyncInboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_ach_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_ach_transfers.list, ) - self.decline = _legacy_response.async_to_raw_response_wrapper( - inbound_ach_transfers.decline, + self.create_notification_of_change = async_to_raw_response_wrapper( + inbound_ach_transfers.create_notification_of_change, ) - self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( - inbound_ach_transfers.notification_of_change, + self.decline = async_to_raw_response_wrapper( + inbound_ach_transfers.decline, ) - self.transfer_return = _legacy_response.async_to_raw_response_wrapper( + self.transfer_return = async_to_raw_response_wrapper( inbound_ach_transfers.transfer_return, ) -class InboundACHTransfersWithStreamingResponse: - def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: +class InboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = to_streamed_response_wrapper( @@ -685,19 +689,19 @@ def __init__(self, inbound_ach_transfers: InboundACHTransfers) -> None: self.list = to_streamed_response_wrapper( inbound_ach_transfers.list, ) + self.create_notification_of_change = to_streamed_response_wrapper( + inbound_ach_transfers.create_notification_of_change, + ) self.decline = to_streamed_response_wrapper( inbound_ach_transfers.decline, ) - self.notification_of_change = to_streamed_response_wrapper( - inbound_ach_transfers.notification_of_change, - ) self.transfer_return = to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) -class AsyncInboundACHTransfersWithStreamingResponse: - def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: +class AsyncInboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: self._inbound_ach_transfers = inbound_ach_transfers self.retrieve = async_to_streamed_response_wrapper( @@ -706,12 +710,12 @@ def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfers) -> None: self.list = async_to_streamed_response_wrapper( inbound_ach_transfers.list, ) + self.create_notification_of_change = async_to_streamed_response_wrapper( + inbound_ach_transfers.create_notification_of_change, + ) self.decline = async_to_streamed_response_wrapper( inbound_ach_transfers.decline, ) - self.notification_of_change = async_to_streamed_response_wrapper( - inbound_ach_transfers.notification_of_change, - ) self.transfer_return = async_to_streamed_response_wrapper( inbound_ach_transfers.transfer_return, ) diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index e6ed2844a..de312acae 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -2,30 +2,39 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from .. import _legacy_response -from ..types import inbound_check_deposit_list_params +from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import ( + maybe_transform, + async_maybe_transform, +) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] +__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] -class InboundCheckDeposits(SyncAPIResource): +class InboundCheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self) def retrieve( self, @@ -167,15 +176,69 @@ def decline( cast_to=InboundCheckDeposit, ) + def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. + + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + -class AsyncInboundCheckDeposits(AsyncAPIResource): +class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def retrieve( self, @@ -317,39 +380,99 @@ async def decline( cast_to=InboundCheckDeposit, ) + async def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. -class InboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=await async_maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + + +class InboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = _legacy_response.to_raw_response_wrapper( + self.decline = to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_raw_response_wrapper( + inbound_check_deposits.return_, + ) -class AsyncInboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_check_deposits.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_check_deposits.list, ) - self.decline = _legacy_response.async_to_raw_response_wrapper( + self.decline = async_to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_raw_response_wrapper( + inbound_check_deposits.return_, + ) -class InboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = to_streamed_response_wrapper( @@ -361,10 +484,13 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: self.decline = to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) -class AsyncInboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.retrieve = async_to_streamed_response_wrapper( @@ -376,3 +502,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: self.decline = async_to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 878f4b57b..13c914c60 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_mail_item_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_mail_item import InboundMailItem -__all__ = ["InboundMailItems", "AsyncInboundMailItems"] +__all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] -class InboundMailItems(SyncAPIResource): +class InboundMailItemsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundMailItemsWithRawResponse: - return InboundMailItemsWithRawResponse(self) + def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundMailItemsWithStreamingResponse: - return InboundMailItemsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self) def retrieve( self, @@ -119,14 +123,14 @@ def list( ) -class AsyncInboundMailItems(AsyncAPIResource): +class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundMailItemsWithRawResponse: - return AsyncInboundMailItemsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundMailItemsWithStreamingResponse: - return AsyncInboundMailItemsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + return AsyncInboundMailItemsResourceWithStreamingResponse(self) async def retrieve( self, @@ -220,32 +224,32 @@ def list( ) -class InboundMailItemsWithRawResponse: - def __init__(self, inbound_mail_items: InboundMailItems) -> None: +class InboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_mail_items.list, ) -class AsyncInboundMailItemsWithRawResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: +class AsyncInboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_mail_items.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_mail_items.list, ) -class InboundMailItemsWithStreamingResponse: - def __init__(self, inbound_mail_items: InboundMailItems) -> None: +class InboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = to_streamed_response_wrapper( @@ -256,8 +260,8 @@ def __init__(self, inbound_mail_items: InboundMailItems) -> None: ) -class AsyncInboundMailItemsWithStreamingResponse: - def __init__(self, inbound_mail_items: AsyncInboundMailItems) -> None: +class AsyncInboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self._inbound_mail_items = inbound_mail_items self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index e61b99d06..91f3bda03 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_wire_drawdown_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] +__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] -class InboundWireDrawdownRequests(SyncAPIResource): +class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def retrieve( self, @@ -113,14 +117,14 @@ def list( ) -class AsyncInboundWireDrawdownRequests(AsyncAPIResource): +class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def retrieve( self, @@ -208,32 +212,32 @@ def list( ) -class InboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class AsyncInboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.list, ) -class InboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = to_streamed_response_wrapper( @@ -244,8 +248,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) ) -class AsyncInboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index c02112989..45d53fc7a 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -6,28 +6,32 @@ import httpx -from .. import _legacy_response from ..types import inbound_wire_transfer_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer -__all__ = ["InboundWireTransfers", "AsyncInboundWireTransfers"] +__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] -class InboundWireTransfers(SyncAPIResource): +class InboundWireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireTransfersWithRawResponse: - return InboundWireTransfersWithRawResponse(self) + def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireTransfersWithStreamingResponse: - return InboundWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self) def retrieve( self, @@ -135,14 +139,14 @@ def list( ) -class AsyncInboundWireTransfers(AsyncAPIResource): +class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireTransfersWithRawResponse: - return AsyncInboundWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireTransfersWithStreamingResponse: - return AsyncInboundWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self) async def retrieve( self, @@ -250,32 +254,32 @@ def list( ) -class InboundWireTransfersWithRawResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: +class InboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( inbound_wire_transfers.list, ) -class AsyncInboundWireTransfersWithRawResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: +class AsyncInboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( inbound_wire_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( inbound_wire_transfers.list, ) -class InboundWireTransfersWithStreamingResponse: - def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: +class InboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = to_streamed_response_wrapper( @@ -286,8 +290,8 @@ def __init__(self, inbound_wire_transfers: InboundWireTransfers) -> None: ) -class AsyncInboundWireTransfersWithStreamingResponse: - def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfers) -> None: +class AsyncInboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: self._inbound_wire_transfers = inbound_wire_transfers self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/intrafi/__init__.py b/src/increase/resources/intrafi/__init__.py deleted file mode 100644 index 95d677c98..000000000 --- a/src/increase/resources/intrafi/__init__.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from .intrafi import ( - Intrafi, - AsyncIntrafi, - IntrafiWithRawResponse, - AsyncIntrafiWithRawResponse, - IntrafiWithStreamingResponse, - AsyncIntrafiWithStreamingResponse, -) -from .balances import ( - Balances, - AsyncBalances, - BalancesWithRawResponse, - AsyncBalancesWithRawResponse, - BalancesWithStreamingResponse, - AsyncBalancesWithStreamingResponse, -) -from .exclusions import ( - Exclusions, - AsyncExclusions, - ExclusionsWithRawResponse, - AsyncExclusionsWithRawResponse, - ExclusionsWithStreamingResponse, - AsyncExclusionsWithStreamingResponse, -) -from .account_enrollments import ( - AccountEnrollments, - AsyncAccountEnrollments, - AccountEnrollmentsWithRawResponse, - AsyncAccountEnrollmentsWithRawResponse, - AccountEnrollmentsWithStreamingResponse, - AsyncAccountEnrollmentsWithStreamingResponse, -) - -__all__ = [ - "AccountEnrollments", - "AsyncAccountEnrollments", - "AccountEnrollmentsWithRawResponse", - "AsyncAccountEnrollmentsWithRawResponse", - "AccountEnrollmentsWithStreamingResponse", - "AsyncAccountEnrollmentsWithStreamingResponse", - "Balances", - "AsyncBalances", - "BalancesWithRawResponse", - "AsyncBalancesWithRawResponse", - "BalancesWithStreamingResponse", - "AsyncBalancesWithStreamingResponse", - "Exclusions", - "AsyncExclusions", - "ExclusionsWithRawResponse", - "AsyncExclusionsWithRawResponse", - "ExclusionsWithStreamingResponse", - "AsyncExclusionsWithStreamingResponse", - "Intrafi", - "AsyncIntrafi", - "IntrafiWithRawResponse", - "AsyncIntrafiWithRawResponse", - "IntrafiWithStreamingResponse", - "AsyncIntrafiWithStreamingResponse", -] diff --git a/src/increase/resources/intrafi/intrafi.py b/src/increase/resources/intrafi/intrafi.py deleted file mode 100644 index 6c978b037..000000000 --- a/src/increase/resources/intrafi/intrafi.py +++ /dev/null @@ -1,144 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .balances import ( - Balances, - AsyncBalances, - BalancesWithRawResponse, - AsyncBalancesWithRawResponse, - BalancesWithStreamingResponse, - AsyncBalancesWithStreamingResponse, -) -from ..._compat import cached_property -from .exclusions import ( - Exclusions, - AsyncExclusions, - ExclusionsWithRawResponse, - AsyncExclusionsWithRawResponse, - ExclusionsWithStreamingResponse, - AsyncExclusionsWithStreamingResponse, -) -from ..._resource import SyncAPIResource, AsyncAPIResource -from .account_enrollments import ( - AccountEnrollments, - AsyncAccountEnrollments, - AccountEnrollmentsWithRawResponse, - AsyncAccountEnrollmentsWithRawResponse, - AccountEnrollmentsWithStreamingResponse, - AsyncAccountEnrollmentsWithStreamingResponse, -) - -__all__ = ["Intrafi", "AsyncIntrafi"] - - -class Intrafi(SyncAPIResource): - @cached_property - def account_enrollments(self) -> AccountEnrollments: - return AccountEnrollments(self._client) - - @cached_property - def balances(self) -> Balances: - return Balances(self._client) - - @cached_property - def exclusions(self) -> Exclusions: - return Exclusions(self._client) - - @cached_property - def with_raw_response(self) -> IntrafiWithRawResponse: - return IntrafiWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> IntrafiWithStreamingResponse: - return IntrafiWithStreamingResponse(self) - - -class AsyncIntrafi(AsyncAPIResource): - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollments: - return AsyncAccountEnrollments(self._client) - - @cached_property - def balances(self) -> AsyncBalances: - return AsyncBalances(self._client) - - @cached_property - def exclusions(self) -> AsyncExclusions: - return AsyncExclusions(self._client) - - @cached_property - def with_raw_response(self) -> AsyncIntrafiWithRawResponse: - return AsyncIntrafiWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncIntrafiWithStreamingResponse: - return AsyncIntrafiWithStreamingResponse(self) - - -class IntrafiWithRawResponse: - def __init__(self, intrafi: Intrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AccountEnrollmentsWithRawResponse: - return AccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> BalancesWithRawResponse: - return BalancesWithRawResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> ExclusionsWithRawResponse: - return ExclusionsWithRawResponse(self._intrafi.exclusions) - - -class AsyncIntrafiWithRawResponse: - def __init__(self, intrafi: AsyncIntrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollmentsWithRawResponse: - return AsyncAccountEnrollmentsWithRawResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> AsyncBalancesWithRawResponse: - return AsyncBalancesWithRawResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> AsyncExclusionsWithRawResponse: - return AsyncExclusionsWithRawResponse(self._intrafi.exclusions) - - -class IntrafiWithStreamingResponse: - def __init__(self, intrafi: Intrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AccountEnrollmentsWithStreamingResponse: - return AccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> BalancesWithStreamingResponse: - return BalancesWithStreamingResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> ExclusionsWithStreamingResponse: - return ExclusionsWithStreamingResponse(self._intrafi.exclusions) - - -class AsyncIntrafiWithStreamingResponse: - def __init__(self, intrafi: AsyncIntrafi) -> None: - self._intrafi = intrafi - - @cached_property - def account_enrollments(self) -> AsyncAccountEnrollmentsWithStreamingResponse: - return AsyncAccountEnrollmentsWithStreamingResponse(self._intrafi.account_enrollments) - - @cached_property - def balances(self) -> AsyncBalancesWithStreamingResponse: - return AsyncBalancesWithStreamingResponse(self._intrafi.balances) - - @cached_property - def exclusions(self) -> AsyncExclusionsWithStreamingResponse: - return AsyncExclusionsWithStreamingResponse(self._intrafi.exclusions) diff --git a/src/increase/resources/intrafi/account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py similarity index 79% rename from src/increase/resources/intrafi/account_enrollments.py rename to src/increase/resources/intrafi_account_enrollments.py index 00a03d615..7e5aae937 100644 --- a/src/increase/resources/intrafi/account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -4,31 +4,35 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.intrafi import account_enrollment_list_params, account_enrollment_create_params -from ...types.intrafi.intrafi_account_enrollment import IntrafiAccountEnrollment +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.intrafi_account_enrollment import IntrafiAccountEnrollment -__all__ = ["AccountEnrollments", "AsyncAccountEnrollments"] +__all__ = ["IntrafiAccountEnrollmentsResource", "AsyncIntrafiAccountEnrollmentsResource"] -class AccountEnrollments(SyncAPIResource): +class IntrafiAccountEnrollmentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountEnrollmentsWithRawResponse: - return AccountEnrollmentsWithRawResponse(self) + def with_raw_response(self) -> IntrafiAccountEnrollmentsResourceWithRawResponse: + return IntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountEnrollmentsWithStreamingResponse: - return AccountEnrollmentsWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiAccountEnrollmentsResourceWithStreamingResponse: + return IntrafiAccountEnrollmentsResourceWithStreamingResponse(self) def create( self, @@ -68,7 +72,7 @@ def create( "account_id": account_id, "email_address": email_address, }, - account_enrollment_create_params.AccountEnrollmentCreateParams, + intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -124,7 +128,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -172,7 +176,7 @@ def list( "limit": limit, "status": status, }, - account_enrollment_list_params.AccountEnrollmentListParams, + intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -223,14 +227,14 @@ def unenroll( ) -class AsyncAccountEnrollments(AsyncAPIResource): +class AsyncIntrafiAccountEnrollmentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountEnrollmentsWithRawResponse: - return AsyncAccountEnrollmentsWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + return AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountEnrollmentsWithStreamingResponse: - return AsyncAccountEnrollmentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + return AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(self) async def create( self, @@ -270,7 +274,7 @@ async def create( "account_id": account_id, "email_address": email_address, }, - account_enrollment_create_params.AccountEnrollmentCreateParams, + intrafi_account_enrollment_create_params.IntrafiAccountEnrollmentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -326,7 +330,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -374,7 +378,7 @@ def list( "limit": limit, "status": status, }, - account_enrollment_list_params.AccountEnrollmentListParams, + intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), model=IntrafiAccountEnrollment, @@ -425,73 +429,73 @@ async def unenroll( ) -class AccountEnrollmentsWithRawResponse: - def __init__(self, account_enrollments: AccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class IntrafiAccountEnrollmentsResourceWithRawResponse: + def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments - self.create = _legacy_response.to_raw_response_wrapper( - account_enrollments.create, + self.create = to_raw_response_wrapper( + intrafi_account_enrollments.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( - account_enrollments.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_account_enrollments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( - account_enrollments.list, + self.list = to_raw_response_wrapper( + intrafi_account_enrollments.list, ) - self.unenroll = _legacy_response.to_raw_response_wrapper( - account_enrollments.unenroll, + self.unenroll = to_raw_response_wrapper( + intrafi_account_enrollments.unenroll, ) -class AsyncAccountEnrollmentsWithRawResponse: - def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments - self.create = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.create, + self.create = async_to_raw_response_wrapper( + intrafi_account_enrollments.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_account_enrollments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.list, + self.list = async_to_raw_response_wrapper( + intrafi_account_enrollments.list, ) - self.unenroll = _legacy_response.async_to_raw_response_wrapper( - account_enrollments.unenroll, + self.unenroll = async_to_raw_response_wrapper( + intrafi_account_enrollments.unenroll, ) -class AccountEnrollmentsWithStreamingResponse: - def __init__(self, account_enrollments: AccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class IntrafiAccountEnrollmentsResourceWithStreamingResponse: + def __init__(self, intrafi_account_enrollments: IntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments self.create = to_streamed_response_wrapper( - account_enrollments.create, + intrafi_account_enrollments.create, ) self.retrieve = to_streamed_response_wrapper( - account_enrollments.retrieve, + intrafi_account_enrollments.retrieve, ) self.list = to_streamed_response_wrapper( - account_enrollments.list, + intrafi_account_enrollments.list, ) self.unenroll = to_streamed_response_wrapper( - account_enrollments.unenroll, + intrafi_account_enrollments.unenroll, ) -class AsyncAccountEnrollmentsWithStreamingResponse: - def __init__(self, account_enrollments: AsyncAccountEnrollments) -> None: - self._account_enrollments = account_enrollments +class AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + def __init__(self, intrafi_account_enrollments: AsyncIntrafiAccountEnrollmentsResource) -> None: + self._intrafi_account_enrollments = intrafi_account_enrollments self.create = async_to_streamed_response_wrapper( - account_enrollments.create, + intrafi_account_enrollments.create, ) self.retrieve = async_to_streamed_response_wrapper( - account_enrollments.retrieve, + intrafi_account_enrollments.retrieve, ) self.list = async_to_streamed_response_wrapper( - account_enrollments.list, + intrafi_account_enrollments.list, ) self.unenroll = async_to_streamed_response_wrapper( - account_enrollments.unenroll, + intrafi_account_enrollments.unenroll, ) diff --git a/src/increase/resources/intrafi/balances.py b/src/increase/resources/intrafi_balances.py similarity index 59% rename from src/increase/resources/intrafi/balances.py rename to src/increase/resources/intrafi_balances.py index 0a6f3c141..3cd064011 100644 --- a/src/increase/resources/intrafi/balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.intrafi.intrafi_balance import IntrafiBalance - -__all__ = ["Balances", "AsyncBalances"] - - -class Balances(SyncAPIResource): +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from .._base_client import make_request_options +from ..types.intrafi_balance import IntrafiBalance + +__all__ = ["IntrafiBalancesResource", "AsyncIntrafiBalancesResource"] + + +class IntrafiBalancesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> BalancesWithRawResponse: - return BalancesWithRawResponse(self) + def with_raw_response(self) -> IntrafiBalancesResourceWithRawResponse: + return IntrafiBalancesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> BalancesWithStreamingResponse: - return BalancesWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiBalancesResourceWithStreamingResponse: + return IntrafiBalancesResourceWithStreamingResponse(self) def retrieve( self, @@ -60,14 +64,14 @@ def retrieve( ) -class AsyncBalances(AsyncAPIResource): +class AsyncIntrafiBalancesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncBalancesWithRawResponse: - return AsyncBalancesWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiBalancesResourceWithRawResponse: + return AsyncIntrafiBalancesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncBalancesWithStreamingResponse: - return AsyncBalancesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiBalancesResourceWithStreamingResponse: + return AsyncIntrafiBalancesResourceWithStreamingResponse(self) async def retrieve( self, @@ -105,37 +109,37 @@ async def retrieve( ) -class BalancesWithRawResponse: - def __init__(self, balances: Balances) -> None: - self._balances = balances +class IntrafiBalancesResourceWithRawResponse: + def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances - self.retrieve = _legacy_response.to_raw_response_wrapper( - balances.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_balances.retrieve, ) -class AsyncBalancesWithRawResponse: - def __init__(self, balances: AsyncBalances) -> None: - self._balances = balances +class AsyncIntrafiBalancesResourceWithRawResponse: + def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - balances.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_balances.retrieve, ) -class BalancesWithStreamingResponse: - def __init__(self, balances: Balances) -> None: - self._balances = balances +class IntrafiBalancesResourceWithStreamingResponse: + def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances self.retrieve = to_streamed_response_wrapper( - balances.retrieve, + intrafi_balances.retrieve, ) -class AsyncBalancesWithStreamingResponse: - def __init__(self, balances: AsyncBalances) -> None: - self._balances = balances +class AsyncIntrafiBalancesResourceWithStreamingResponse: + def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: + self._intrafi_balances = intrafi_balances self.retrieve = async_to_streamed_response_wrapper( - balances.retrieve, + intrafi_balances.retrieve, ) diff --git a/src/increase/resources/intrafi/exclusions.py b/src/increase/resources/intrafi_exclusions.py similarity index 81% rename from src/increase/resources/intrafi/exclusions.py rename to src/increase/resources/intrafi_exclusions.py index 872227889..e45ff5536 100644 --- a/src/increase/resources/intrafi/exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -4,31 +4,35 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.intrafi import exclusion_list_params, exclusion_create_params -from ...types.intrafi.intrafi_exclusion import IntrafiExclusion +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.intrafi_exclusion import IntrafiExclusion -__all__ = ["Exclusions", "AsyncExclusions"] +__all__ = ["IntrafiExclusionsResource", "AsyncIntrafiExclusionsResource"] -class Exclusions(SyncAPIResource): +class IntrafiExclusionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ExclusionsWithRawResponse: - return ExclusionsWithRawResponse(self) + def with_raw_response(self) -> IntrafiExclusionsResourceWithRawResponse: + return IntrafiExclusionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ExclusionsWithStreamingResponse: - return ExclusionsWithStreamingResponse(self) + def with_streaming_response(self) -> IntrafiExclusionsResourceWithStreamingResponse: + return IntrafiExclusionsResourceWithStreamingResponse(self) def create( self, @@ -68,7 +72,7 @@ def create( "bank_name": bank_name, "entity_id": entity_id, }, - exclusion_create_params.ExclusionCreateParams, + intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -170,7 +174,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - exclusion_list_params.ExclusionListParams, + intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), model=IntrafiExclusion, @@ -223,14 +227,14 @@ def archive( ) -class AsyncExclusions(AsyncAPIResource): +class AsyncIntrafiExclusionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncExclusionsWithRawResponse: - return AsyncExclusionsWithRawResponse(self) + def with_raw_response(self) -> AsyncIntrafiExclusionsResourceWithRawResponse: + return AsyncIntrafiExclusionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncExclusionsWithStreamingResponse: - return AsyncExclusionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncIntrafiExclusionsResourceWithStreamingResponse: + return AsyncIntrafiExclusionsResourceWithStreamingResponse(self) async def create( self, @@ -270,7 +274,7 @@ async def create( "bank_name": bank_name, "entity_id": entity_id, }, - exclusion_create_params.ExclusionCreateParams, + intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -372,7 +376,7 @@ def list( "idempotency_key": idempotency_key, "limit": limit, }, - exclusion_list_params.ExclusionListParams, + intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), model=IntrafiExclusion, @@ -425,73 +429,73 @@ async def archive( ) -class ExclusionsWithRawResponse: - def __init__(self, exclusions: Exclusions) -> None: - self._exclusions = exclusions +class IntrafiExclusionsResourceWithRawResponse: + def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions - self.create = _legacy_response.to_raw_response_wrapper( - exclusions.create, + self.create = to_raw_response_wrapper( + intrafi_exclusions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( - exclusions.retrieve, + self.retrieve = to_raw_response_wrapper( + intrafi_exclusions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( - exclusions.list, + self.list = to_raw_response_wrapper( + intrafi_exclusions.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( - exclusions.archive, + self.archive = to_raw_response_wrapper( + intrafi_exclusions.archive, ) -class AsyncExclusionsWithRawResponse: - def __init__(self, exclusions: AsyncExclusions) -> None: - self._exclusions = exclusions +class AsyncIntrafiExclusionsResourceWithRawResponse: + def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions - self.create = _legacy_response.async_to_raw_response_wrapper( - exclusions.create, + self.create = async_to_raw_response_wrapper( + intrafi_exclusions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( - exclusions.retrieve, + self.retrieve = async_to_raw_response_wrapper( + intrafi_exclusions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( - exclusions.list, + self.list = async_to_raw_response_wrapper( + intrafi_exclusions.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( - exclusions.archive, + self.archive = async_to_raw_response_wrapper( + intrafi_exclusions.archive, ) -class ExclusionsWithStreamingResponse: - def __init__(self, exclusions: Exclusions) -> None: - self._exclusions = exclusions +class IntrafiExclusionsResourceWithStreamingResponse: + def __init__(self, intrafi_exclusions: IntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions self.create = to_streamed_response_wrapper( - exclusions.create, + intrafi_exclusions.create, ) self.retrieve = to_streamed_response_wrapper( - exclusions.retrieve, + intrafi_exclusions.retrieve, ) self.list = to_streamed_response_wrapper( - exclusions.list, + intrafi_exclusions.list, ) self.archive = to_streamed_response_wrapper( - exclusions.archive, + intrafi_exclusions.archive, ) -class AsyncExclusionsWithStreamingResponse: - def __init__(self, exclusions: AsyncExclusions) -> None: - self._exclusions = exclusions +class AsyncIntrafiExclusionsResourceWithStreamingResponse: + def __init__(self, intrafi_exclusions: AsyncIntrafiExclusionsResource) -> None: + self._intrafi_exclusions = intrafi_exclusions self.create = async_to_streamed_response_wrapper( - exclusions.create, + intrafi_exclusions.create, ) self.retrieve = async_to_streamed_response_wrapper( - exclusions.retrieve, + intrafi_exclusions.retrieve, ) self.list = async_to_streamed_response_wrapper( - exclusions.list, + intrafi_exclusions.list, ) self.archive = async_to_streamed_response_wrapper( - exclusions.archive, + intrafi_exclusions.archive, ) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index de190d725..56eb00f6d 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.lockbox import Lockbox -__all__ = ["Lockboxes", "AsyncLockboxes"] +__all__ = ["LockboxesResource", "AsyncLockboxesResource"] -class Lockboxes(SyncAPIResource): +class LockboxesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> LockboxesWithRawResponse: - return LockboxesWithRawResponse(self) + def with_raw_response(self) -> LockboxesResourceWithRawResponse: + return LockboxesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> LockboxesWithStreamingResponse: - return LockboxesWithStreamingResponse(self) + def with_streaming_response(self) -> LockboxesResourceWithStreamingResponse: + return LockboxesResourceWithStreamingResponse(self) def create( self, @@ -239,14 +243,14 @@ def list( ) -class AsyncLockboxes(AsyncAPIResource): +class AsyncLockboxesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncLockboxesWithRawResponse: - return AsyncLockboxesWithRawResponse(self) + def with_raw_response(self) -> AsyncLockboxesResourceWithRawResponse: + return AsyncLockboxesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncLockboxesWithStreamingResponse: - return AsyncLockboxesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncLockboxesResourceWithStreamingResponse: + return AsyncLockboxesResourceWithStreamingResponse(self) async def create( self, @@ -455,44 +459,44 @@ def list( ) -class LockboxesWithRawResponse: - def __init__(self, lockboxes: Lockboxes) -> None: +class LockboxesResourceWithRawResponse: + def __init__(self, lockboxes: LockboxesResource) -> None: self._lockboxes = lockboxes - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( lockboxes.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( lockboxes.list, ) -class AsyncLockboxesWithRawResponse: - def __init__(self, lockboxes: AsyncLockboxes) -> None: +class AsyncLockboxesResourceWithRawResponse: + def __init__(self, lockboxes: AsyncLockboxesResource) -> None: self._lockboxes = lockboxes - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( lockboxes.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( lockboxes.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( lockboxes.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( lockboxes.list, ) -class LockboxesWithStreamingResponse: - def __init__(self, lockboxes: Lockboxes) -> None: +class LockboxesResourceWithStreamingResponse: + def __init__(self, lockboxes: LockboxesResource) -> None: self._lockboxes = lockboxes self.create = to_streamed_response_wrapper( @@ -509,8 +513,8 @@ def __init__(self, lockboxes: Lockboxes) -> None: ) -class AsyncLockboxesWithStreamingResponse: - def __init__(self, lockboxes: AsyncLockboxes) -> None: +class AsyncLockboxesResourceWithStreamingResponse: + def __init__(self, lockboxes: AsyncLockboxesResource) -> None: self._lockboxes = lockboxes self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index 4098d669b..f33e94a47 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import oauth_connection_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_connection import OAuthConnection -__all__ = ["OAuthConnections", "AsyncOAuthConnections"] +__all__ = ["OAuthConnectionsResource", "AsyncOAuthConnectionsResource"] -class OAuthConnections(SyncAPIResource): +class OAuthConnectionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthConnectionsWithRawResponse: - return OAuthConnectionsWithRawResponse(self) + def with_raw_response(self) -> OAuthConnectionsResourceWithRawResponse: + return OAuthConnectionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthConnectionsWithStreamingResponse: - return OAuthConnectionsWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthConnectionsResourceWithStreamingResponse: + return OAuthConnectionsResourceWithStreamingResponse(self) def retrieve( self, @@ -115,14 +119,14 @@ def list( ) -class AsyncOAuthConnections(AsyncAPIResource): +class AsyncOAuthConnectionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthConnectionsWithRawResponse: - return AsyncOAuthConnectionsWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthConnectionsResourceWithRawResponse: + return AsyncOAuthConnectionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthConnectionsWithStreamingResponse: - return AsyncOAuthConnectionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthConnectionsResourceWithStreamingResponse: + return AsyncOAuthConnectionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +216,32 @@ def list( ) -class OAuthConnectionsWithRawResponse: - def __init__(self, oauth_connections: OAuthConnections) -> None: +class OAuthConnectionsResourceWithRawResponse: + def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( oauth_connections.list, ) -class AsyncOAuthConnectionsWithRawResponse: - def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: +class AsyncOAuthConnectionsResourceWithRawResponse: + def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( oauth_connections.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( oauth_connections.list, ) -class OAuthConnectionsWithStreamingResponse: - def __init__(self, oauth_connections: OAuthConnections) -> None: +class OAuthConnectionsResourceWithStreamingResponse: + def __init__(self, oauth_connections: OAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections self.retrieve = to_streamed_response_wrapper( @@ -248,8 +252,8 @@ def __init__(self, oauth_connections: OAuthConnections) -> None: ) -class AsyncOAuthConnectionsWithStreamingResponse: - def __init__(self, oauth_connections: AsyncOAuthConnections) -> None: +class AsyncOAuthConnectionsResourceWithStreamingResponse: + def __init__(self, oauth_connections: AsyncOAuthConnectionsResource) -> None: self._oauth_connections = oauth_connections self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index d0d7e3c02..e2c2f1ca9 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import oauth_token_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,21 +14,26 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from .._base_client import make_request_options from ..types.oauth_token import OAuthToken -__all__ = ["OAuthTokens", "AsyncOAuthTokens"] +__all__ = ["OAuthTokensResource", "AsyncOAuthTokensResource"] -class OAuthTokens(SyncAPIResource): +class OAuthTokensResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> OAuthTokensWithRawResponse: - return OAuthTokensWithRawResponse(self) + def with_raw_response(self) -> OAuthTokensResourceWithRawResponse: + return OAuthTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> OAuthTokensWithStreamingResponse: - return OAuthTokensWithStreamingResponse(self) + def with_streaming_response(self) -> OAuthTokensResourceWithStreamingResponse: + return OAuthTokensResourceWithStreamingResponse(self) def create( self, @@ -103,14 +107,14 @@ def create( ) -class AsyncOAuthTokens(AsyncAPIResource): +class AsyncOAuthTokensResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncOAuthTokensWithRawResponse: - return AsyncOAuthTokensWithRawResponse(self) + def with_raw_response(self) -> AsyncOAuthTokensResourceWithRawResponse: + return AsyncOAuthTokensResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncOAuthTokensWithStreamingResponse: - return AsyncOAuthTokensWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncOAuthTokensResourceWithStreamingResponse: + return AsyncOAuthTokensResourceWithStreamingResponse(self) async def create( self, @@ -184,26 +188,26 @@ async def create( ) -class OAuthTokensWithRawResponse: - def __init__(self, oauth_tokens: OAuthTokens) -> None: +class OAuthTokensResourceWithRawResponse: + def __init__(self, oauth_tokens: OAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( oauth_tokens.create, ) -class AsyncOAuthTokensWithRawResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: +class AsyncOAuthTokensResourceWithRawResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( oauth_tokens.create, ) -class OAuthTokensWithStreamingResponse: - def __init__(self, oauth_tokens: OAuthTokens) -> None: +class OAuthTokensResourceWithStreamingResponse: + def __init__(self, oauth_tokens: OAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens self.create = to_streamed_response_wrapper( @@ -211,8 +215,8 @@ def __init__(self, oauth_tokens: OAuthTokens) -> None: ) -class AsyncOAuthTokensWithStreamingResponse: - def __init__(self, oauth_tokens: AsyncOAuthTokens) -> None: +class AsyncOAuthTokensResourceWithStreamingResponse: + def __init__(self, oauth_tokens: AsyncOAuthTokensResource) -> None: self._oauth_tokens = oauth_tokens self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index b09b09a05..1480a95ce 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import pending_transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.pending_transaction import PendingTransaction -__all__ = ["PendingTransactions", "AsyncPendingTransactions"] +__all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] -class PendingTransactions(SyncAPIResource): +class PendingTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PendingTransactionsWithRawResponse: - return PendingTransactionsWithRawResponse(self) + def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: + return PendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PendingTransactionsWithStreamingResponse: - return PendingTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: + return PendingTransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -131,14 +135,14 @@ def list( ) -class AsyncPendingTransactions(AsyncAPIResource): +class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPendingTransactionsWithRawResponse: - return AsyncPendingTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: + return AsyncPendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPendingTransactionsWithStreamingResponse: - return AsyncPendingTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: + return AsyncPendingTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -244,32 +248,32 @@ def list( ) -class PendingTransactionsWithRawResponse: - def __init__(self, pending_transactions: PendingTransactions) -> None: +class PendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( pending_transactions.list, ) -class AsyncPendingTransactionsWithRawResponse: - def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: +class AsyncPendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( pending_transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( pending_transactions.list, ) -class PendingTransactionsWithStreamingResponse: - def __init__(self, pending_transactions: PendingTransactions) -> None: +class PendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions self.retrieve = to_streamed_response_wrapper( @@ -280,8 +284,8 @@ def __init__(self, pending_transactions: PendingTransactions) -> None: ) -class AsyncPendingTransactionsWithStreamingResponse: - def __init__(self, pending_transactions: AsyncPendingTransactions) -> None: +class AsyncPendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 09ea6c423..c66db39d0 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import ( physical_card_profile_list_params, physical_card_profile_clone_params, @@ -17,22 +16,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card_profile import PhysicalCardProfile -__all__ = ["PhysicalCardProfiles", "AsyncPhysicalCardProfiles"] +__all__ = ["PhysicalCardProfilesResource", "AsyncPhysicalCardProfilesResource"] -class PhysicalCardProfiles(SyncAPIResource): +class PhysicalCardProfilesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardProfilesWithRawResponse: - return PhysicalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardProfilesResourceWithRawResponse: + return PhysicalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardProfilesWithStreamingResponse: - return PhysicalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardProfilesResourceWithStreamingResponse: + return PhysicalCardProfilesResourceWithStreamingResponse(self) def create( self, @@ -301,14 +305,14 @@ def clone( ) -class AsyncPhysicalCardProfiles(AsyncAPIResource): +class AsyncPhysicalCardProfilesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardProfilesWithRawResponse: - return AsyncPhysicalCardProfilesWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardProfilesResourceWithRawResponse: + return AsyncPhysicalCardProfilesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardProfilesWithStreamingResponse: - return AsyncPhysicalCardProfilesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardProfilesResourceWithStreamingResponse: + return AsyncPhysicalCardProfilesResourceWithStreamingResponse(self) async def create( self, @@ -577,50 +581,50 @@ async def clone( ) -class PhysicalCardProfilesWithRawResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: +class PhysicalCardProfilesResourceWithRawResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = _legacy_response.to_raw_response_wrapper( + self.archive = to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = _legacy_response.to_raw_response_wrapper( + self.clone = to_raw_response_wrapper( physical_card_profiles.clone, ) -class AsyncPhysicalCardProfilesWithRawResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: +class AsyncPhysicalCardProfilesResourceWithRawResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( physical_card_profiles.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( physical_card_profiles.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( physical_card_profiles.list, ) - self.archive = _legacy_response.async_to_raw_response_wrapper( + self.archive = async_to_raw_response_wrapper( physical_card_profiles.archive, ) - self.clone = _legacy_response.async_to_raw_response_wrapper( + self.clone = async_to_raw_response_wrapper( physical_card_profiles.clone, ) -class PhysicalCardProfilesWithStreamingResponse: - def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: +class PhysicalCardProfilesResourceWithStreamingResponse: + def __init__(self, physical_card_profiles: PhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles self.create = to_streamed_response_wrapper( @@ -640,8 +644,8 @@ def __init__(self, physical_card_profiles: PhysicalCardProfiles) -> None: ) -class AsyncPhysicalCardProfilesWithStreamingResponse: - def __init__(self, physical_card_profiles: AsyncPhysicalCardProfiles) -> None: +class AsyncPhysicalCardProfilesResourceWithStreamingResponse: + def __init__(self, physical_card_profiles: AsyncPhysicalCardProfilesResource) -> None: self._physical_card_profiles = physical_card_profiles self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 17fad6e6e..4ba94b56c 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card import PhysicalCard -__all__ = ["PhysicalCards", "AsyncPhysicalCards"] +__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] -class PhysicalCards(SyncAPIResource): +class PhysicalCardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self) def create( self, @@ -238,14 +242,14 @@ def list( ) -class AsyncPhysicalCards(AsyncAPIResource): +class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self) async def create( self, @@ -453,44 +457,44 @@ def list( ) -class PhysicalCardsWithRawResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = _legacy_response.to_raw_response_wrapper( + self.update = to_raw_response_wrapper( physical_cards.update, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( physical_cards.list, ) -class AsyncPhysicalCardsWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( physical_cards.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( physical_cards.retrieve, ) - self.update = _legacy_response.async_to_raw_response_wrapper( + self.update = async_to_raw_response_wrapper( physical_cards.update, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( physical_cards.list, ) -class PhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards self.create = to_streamed_response_wrapper( @@ -507,8 +511,8 @@ def __init__(self, physical_cards: PhysicalCards) -> None: ) -class AsyncPhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index c91affa1f..009d322b1 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import program_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.program import Program -__all__ = ["Programs", "AsyncPrograms"] +__all__ = ["ProgramsResource", "AsyncProgramsResource"] -class Programs(SyncAPIResource): +class ProgramsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self) + def with_raw_response(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self) def retrieve( self, @@ -111,14 +115,14 @@ def list( ) -class AsyncPrograms(AsyncAPIResource): +class AsyncProgramsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self) async def retrieve( self, @@ -204,32 +208,32 @@ def list( ) -class ProgramsWithRawResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithRawResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( programs.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( programs.list, ) -class AsyncProgramsWithRawResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithRawResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( programs.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( programs.list, ) -class ProgramsWithStreamingResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithStreamingResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs self.retrieve = to_streamed_response_wrapper( @@ -240,8 +244,8 @@ def __init__(self, programs: Programs) -> None: ) -class AsyncProgramsWithStreamingResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithStreamingResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index 044777f16..d8319ab58 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import ( proof_of_authorization_request_submission_list_params, proof_of_authorization_request_submission_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission -__all__ = ["ProofOfAuthorizationRequestSubmissions", "AsyncProofOfAuthorizationRequestSubmissions"] +__all__ = ["ProofOfAuthorizationRequestSubmissionsResource", "AsyncProofOfAuthorizationRequestSubmissionsResource"] -class ProofOfAuthorizationRequestSubmissions(SyncAPIResource): +class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsWithRawResponse: - return ProofOfAuthorizationRequestSubmissionsWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + return ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - return ProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + return ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) def create( self, @@ -219,14 +223,14 @@ def list( ) -class AsyncProofOfAuthorizationRequestSubmissions(AsyncAPIResource): +class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: - return AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + return AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - return AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + return AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) async def create( self, @@ -411,38 +415,44 @@ def list( ) -class ProofOfAuthorizationRequestSubmissionsWithRawResponse: - def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: +class ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + def __init__( + self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class AsyncProofOfAuthorizationRequestSubmissionsWithRawResponse: - def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + def __init__( + self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( proof_of_authorization_request_submissions.list, ) -class ProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissions) -> None: +class ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + def __init__( + self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = to_streamed_response_wrapper( @@ -456,8 +466,10 @@ def __init__(self, proof_of_authorization_request_submissions: ProofOfAuthorizat ) -class AsyncProofOfAuthorizationRequestSubmissionsWithStreamingResponse: - def __init__(self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissions) -> None: +class AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + def __init__( + self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource + ) -> None: self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index 1b0d14c54..337457a5f 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import proof_of_authorization_request_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest -__all__ = ["ProofOfAuthorizationRequests", "AsyncProofOfAuthorizationRequests"] +__all__ = ["ProofOfAuthorizationRequestsResource", "AsyncProofOfAuthorizationRequestsResource"] -class ProofOfAuthorizationRequests(SyncAPIResource): +class ProofOfAuthorizationRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestsWithRawResponse: - return ProofOfAuthorizationRequestsWithRawResponse(self) + def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: + return ProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestsWithStreamingResponse: - return ProofOfAuthorizationRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> ProofOfAuthorizationRequestsResourceWithStreamingResponse: + return ProofOfAuthorizationRequestsResourceWithStreamingResponse(self) def retrieve( self, @@ -115,14 +119,14 @@ def list( ) -class AsyncProofOfAuthorizationRequests(AsyncAPIResource): +class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsWithRawResponse: - return AsyncProofOfAuthorizationRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: + return AsyncProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsWithStreamingResponse: - return AsyncProofOfAuthorizationRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: + return AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(self) async def retrieve( self, @@ -212,32 +216,32 @@ def list( ) -class ProofOfAuthorizationRequestsWithRawResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: +class ProofOfAuthorizationRequestsResourceWithRawResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class AsyncProofOfAuthorizationRequestsWithRawResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: +class AsyncProofOfAuthorizationRequestsResourceWithRawResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( proof_of_authorization_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( proof_of_authorization_requests.list, ) -class ProofOfAuthorizationRequestsWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests) -> None: +class ProofOfAuthorizationRequestsResourceWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = to_streamed_response_wrapper( @@ -248,8 +252,8 @@ def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequests ) -class AsyncProofOfAuthorizationRequestsWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequests) -> None: +class AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: + def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: self._proof_of_authorization_requests = proof_of_authorization_requests self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 9f8d2bb0c..93980b4d7 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import real_time_decision_action_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,21 +12,26 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from .._base_client import make_request_options from ..types.real_time_decision import RealTimeDecision -__all__ = ["RealTimeDecisions", "AsyncRealTimeDecisions"] +__all__ = ["RealTimeDecisionsResource", "AsyncRealTimeDecisionsResource"] -class RealTimeDecisions(SyncAPIResource): +class RealTimeDecisionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimeDecisionsWithRawResponse: - return RealTimeDecisionsWithRawResponse(self) + def with_raw_response(self) -> RealTimeDecisionsResourceWithRawResponse: + return RealTimeDecisionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimeDecisionsWithStreamingResponse: - return RealTimeDecisionsWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimeDecisionsResourceWithStreamingResponse: + return RealTimeDecisionsResourceWithStreamingResponse(self) def retrieve( self, @@ -132,14 +136,14 @@ def action( ) -class AsyncRealTimeDecisions(AsyncAPIResource): +class AsyncRealTimeDecisionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimeDecisionsWithRawResponse: - return AsyncRealTimeDecisionsWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimeDecisionsResourceWithRawResponse: + return AsyncRealTimeDecisionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimeDecisionsWithStreamingResponse: - return AsyncRealTimeDecisionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimeDecisionsResourceWithStreamingResponse: + return AsyncRealTimeDecisionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -244,32 +248,32 @@ async def action( ) -class RealTimeDecisionsWithRawResponse: - def __init__(self, real_time_decisions: RealTimeDecisions) -> None: +class RealTimeDecisionsResourceWithRawResponse: + def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = _legacy_response.to_raw_response_wrapper( + self.action = to_raw_response_wrapper( real_time_decisions.action, ) -class AsyncRealTimeDecisionsWithRawResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: +class AsyncRealTimeDecisionsResourceWithRawResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_decisions.retrieve, ) - self.action = _legacy_response.async_to_raw_response_wrapper( + self.action = async_to_raw_response_wrapper( real_time_decisions.action, ) -class RealTimeDecisionsWithStreamingResponse: - def __init__(self, real_time_decisions: RealTimeDecisions) -> None: +class RealTimeDecisionsResourceWithStreamingResponse: + def __init__(self, real_time_decisions: RealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions self.retrieve = to_streamed_response_wrapper( @@ -280,8 +284,8 @@ def __init__(self, real_time_decisions: RealTimeDecisions) -> None: ) -class AsyncRealTimeDecisionsWithStreamingResponse: - def __init__(self, real_time_decisions: AsyncRealTimeDecisions) -> None: +class AsyncRealTimeDecisionsResourceWithStreamingResponse: + def __init__(self, real_time_decisions: AsyncRealTimeDecisionsResource) -> None: self._real_time_decisions = real_time_decisions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index 3cef6e5ec..a5e170678 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -7,7 +7,6 @@ import httpx -from .. import _legacy_response from ..types import ( real_time_payments_request_for_payment_list_params, real_time_payments_request_for_payment_create_params, @@ -19,22 +18,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment -__all__ = ["RealTimePaymentsRequestForPayments", "AsyncRealTimePaymentsRequestForPayments"] +__all__ = ["RealTimePaymentsRequestForPaymentsResource", "AsyncRealTimePaymentsRequestForPaymentsResource"] -class RealTimePaymentsRequestForPayments(SyncAPIResource): +class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsWithRawResponse: - return RealTimePaymentsRequestForPaymentsWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: + return RealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsWithStreamingResponse: - return RealTimePaymentsRequestForPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + return RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) def create( self, @@ -208,14 +212,14 @@ def list( ) -class AsyncRealTimePaymentsRequestForPayments(AsyncAPIResource): +class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: - return AsyncRealTimePaymentsRequestForPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: + return AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: - return AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + return AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) async def create( self, @@ -389,38 +393,40 @@ def list( ) -class RealTimePaymentsRequestForPaymentsWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: +class RealTimePaymentsRequestForPaymentsResourceWithRawResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class AsyncRealTimePaymentsRequestForPaymentsWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: +class AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: + def __init__( + self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource + ) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( real_time_payments_request_for_payments.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_payments_request_for_payments.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( real_time_payments_request_for_payments.list, ) -class RealTimePaymentsRequestForPaymentsWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPayments) -> None: +class RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = to_streamed_response_wrapper( @@ -434,8 +440,10 @@ def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequ ) -class AsyncRealTimePaymentsRequestForPaymentsWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPayments) -> None: +class AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + def __init__( + self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource + ) -> None: self._real_time_payments_request_for_payments = real_time_payments_request_for_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 5294ce28d..b62b0d10f 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer -__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] +__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] -class RealTimePaymentsTransfers(SyncAPIResource): +class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def create( self, @@ -227,14 +231,14 @@ def list( ) -class AsyncRealTimePaymentsTransfers(AsyncAPIResource): +class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def create( self, @@ -433,38 +437,38 @@ def list( ) -class RealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( real_time_payments_transfers.list, ) -class AsyncRealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( real_time_payments_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( real_time_payments_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( real_time_payments_transfers.list, ) -class RealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = to_streamed_response_wrapper( @@ -478,8 +482,8 @@ def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> N ) -class AsyncRealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index d31389f3b..f485b4d2e 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import routing_number_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options -from ..types.routing_number import RoutingNumber +from ..types.routing_number_list_response import RoutingNumberListResponse -__all__ = ["RoutingNumbers", "AsyncRoutingNumbers"] +__all__ = ["RoutingNumbersResource", "AsyncRoutingNumbersResource"] -class RoutingNumbers(SyncAPIResource): +class RoutingNumbersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RoutingNumbersWithRawResponse: - return RoutingNumbersWithRawResponse(self) + def with_raw_response(self) -> RoutingNumbersResourceWithRawResponse: + return RoutingNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RoutingNumbersWithStreamingResponse: - return RoutingNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> RoutingNumbersResourceWithStreamingResponse: + return RoutingNumbersResourceWithStreamingResponse(self) def list( self, @@ -39,7 +43,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[RoutingNumber]: + ) -> SyncPage[RoutingNumberListResponse]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -64,7 +68,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=SyncPage[RoutingNumber], + page=SyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -79,18 +83,18 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumber, + model=RoutingNumberListResponse, ) -class AsyncRoutingNumbers(AsyncAPIResource): +class AsyncRoutingNumbersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRoutingNumbersWithRawResponse: - return AsyncRoutingNumbersWithRawResponse(self) + def with_raw_response(self) -> AsyncRoutingNumbersResourceWithRawResponse: + return AsyncRoutingNumbersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRoutingNumbersWithStreamingResponse: - return AsyncRoutingNumbersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingResponse: + return AsyncRoutingNumbersResourceWithStreamingResponse(self) def list( self, @@ -104,7 +108,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RoutingNumber, AsyncPage[RoutingNumber]]: + ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -129,7 +133,7 @@ def list( """ return self._get_api_list( "/routing_numbers", - page=AsyncPage[RoutingNumber], + page=AsyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -144,30 +148,30 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumber, + model=RoutingNumberListResponse, ) -class RoutingNumbersWithRawResponse: - def __init__(self, routing_numbers: RoutingNumbers) -> None: +class RoutingNumbersResourceWithRawResponse: + def __init__(self, routing_numbers: RoutingNumbersResource) -> None: self._routing_numbers = routing_numbers - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( routing_numbers.list, ) -class AsyncRoutingNumbersWithRawResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: +class AsyncRoutingNumbersResourceWithRawResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: self._routing_numbers = routing_numbers - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( routing_numbers.list, ) -class RoutingNumbersWithStreamingResponse: - def __init__(self, routing_numbers: RoutingNumbers) -> None: +class RoutingNumbersResourceWithStreamingResponse: + def __init__(self, routing_numbers: RoutingNumbersResource) -> None: self._routing_numbers = routing_numbers self.list = to_streamed_response_wrapper( @@ -175,8 +179,8 @@ def __init__(self, routing_numbers: RoutingNumbers) -> None: ) -class AsyncRoutingNumbersWithStreamingResponse: - def __init__(self, routing_numbers: AsyncRoutingNumbers) -> None: +class AsyncRoutingNumbersResourceWithStreamingResponse: + def __init__(self, routing_numbers: AsyncRoutingNumbersResource) -> None: self._routing_numbers = routing_numbers self.list = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index ce4ec0a36..e3c4105b5 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -1,285 +1,383 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, -) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from .simulations import ( - Simulations, - AsyncSimulations, - SimulationsWithRawResponse, - AsyncSimulationsWithRawResponse, - SimulationsWithStreamingResponse, - AsyncSimulationsWithStreamingResponse, + SimulationsResource, + AsyncSimulationsResource, + SimulationsResourceWithRawResponse, + AsyncSimulationsResourceWithRawResponse, + SimulationsResourceWithStreamingResponse, + AsyncSimulationsResourceWithStreamingResponse, ) from .card_refunds import ( - CardRefunds, - AsyncCardRefunds, - CardRefundsWithRawResponse, - AsyncCardRefundsWithRawResponse, - CardRefundsWithStreamingResponse, - AsyncCardRefundsWithStreamingResponse, + CardRefundsResource, + AsyncCardRefundsResource, + CardRefundsResourceWithRawResponse, + AsyncCardRefundsResourceWithRawResponse, + CardRefundsResourceWithStreamingResponse, + AsyncCardRefundsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) +from .card_reversals import ( + CardReversalsResource, + AsyncCardReversalsResource, + CardReversalsResourceWithRawResponse, + AsyncCardReversalsResourceWithRawResponse, + CardReversalsResourceWithStreamingResponse, + AsyncCardReversalsResourceWithStreamingResponse, ) from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, +) +from .card_increments import ( + CardIncrementsResource, + AsyncCardIncrementsResource, + CardIncrementsResourceWithRawResponse, + AsyncCardIncrementsResourceWithRawResponse, + CardIncrementsResourceWithStreamingResponse, + AsyncCardIncrementsResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, +) +from .card_settlements import ( + CardSettlementsResource, + AsyncCardSettlementsResource, + CardSettlementsResourceWithRawResponse, + AsyncCardSettlementsResourceWithRawResponse, + CardSettlementsResourceWithStreamingResponse, + AsyncCardSettlementsResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .interest_payments import ( - InterestPayments, - AsyncInterestPayments, - InterestPaymentsWithRawResponse, - AsyncInterestPaymentsWithRawResponse, - InterestPaymentsWithStreamingResponse, - AsyncInterestPaymentsWithStreamingResponse, + InterestPaymentsResource, + AsyncInterestPaymentsResource, + InterestPaymentsResourceWithRawResponse, + AsyncInterestPaymentsResourceWithRawResponse, + InterestPaymentsResourceWithStreamingResponse, + AsyncInterestPaymentsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, +) +from .card_authorizations import ( + CardAuthorizationsResource, + AsyncCardAuthorizationsResource, + CardAuthorizationsResourceWithRawResponse, + AsyncCardAuthorizationsResourceWithRawResponse, + CardAuthorizationsResourceWithStreamingResponse, + AsyncCardAuthorizationsResourceWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHolds, - AsyncInboundFundsHolds, - InboundFundsHoldsWithRawResponse, - AsyncInboundFundsHoldsWithRawResponse, - InboundFundsHoldsWithStreamingResponse, - AsyncInboundFundsHoldsWithStreamingResponse, + InboundFundsHoldsResource, + AsyncInboundFundsHoldsResource, + InboundFundsHoldsResourceWithRawResponse, + AsyncInboundFundsHoldsResourceWithRawResponse, + InboundFundsHoldsResourceWithStreamingResponse, + AsyncInboundFundsHoldsResourceWithStreamingResponse, +) +from .inbound_ach_transfers import ( + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, +) +from .inbound_wire_transfers import ( + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, +) +from .card_fuel_confirmations import ( + CardFuelConfirmationsResource, + AsyncCardFuelConfirmationsResource, + CardFuelConfirmationsResourceWithRawResponse, + AsyncCardFuelConfirmationsResourceWithRawResponse, + CardFuelConfirmationsResourceWithStreamingResponse, + AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequests, - AsyncDigitalWalletTokenRequests, - DigitalWalletTokenRequestsWithRawResponse, - AsyncDigitalWalletTokenRequestsWithRawResponse, - DigitalWalletTokenRequestsWithStreamingResponse, - AsyncDigitalWalletTokenRequestsWithStreamingResponse, + DigitalWalletTokenRequestsResource, + AsyncDigitalWalletTokenRequestsResource, + DigitalWalletTokenRequestsResourceWithRawResponse, + AsyncDigitalWalletTokenRequestsResourceWithRawResponse, + DigitalWalletTokenRequestsResourceWithStreamingResponse, + AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, +) +from .card_authorization_expirations import ( + CardAuthorizationExpirationsResource, + AsyncCardAuthorizationExpirationsResource, + CardAuthorizationExpirationsResourceWithRawResponse, + AsyncCardAuthorizationExpirationsResourceWithRawResponse, + CardAuthorizationExpirationsResourceWithStreamingResponse, + AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfers, - AsyncInboundInternationalACHTransfers, - InboundInternationalACHTransfersWithRawResponse, - AsyncInboundInternationalACHTransfersWithRawResponse, - InboundInternationalACHTransfersWithStreamingResponse, - AsyncInboundInternationalACHTransfersWithStreamingResponse, +from .inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + InboundRealTimePaymentsTransfersResourceWithRawResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) __all__ = [ - "AccountTransfers", - "AsyncAccountTransfers", - "AccountTransfersWithRawResponse", - "AsyncAccountTransfersWithRawResponse", - "AccountTransfersWithStreamingResponse", - "AsyncAccountTransfersWithStreamingResponse", - "AccountStatements", - "AsyncAccountStatements", - "AccountStatementsWithRawResponse", - "AsyncAccountStatementsWithRawResponse", - "AccountStatementsWithStreamingResponse", - "AsyncAccountStatementsWithStreamingResponse", - "ACHTransfers", - "AsyncACHTransfers", - "ACHTransfersWithRawResponse", - "AsyncACHTransfersWithRawResponse", - "ACHTransfersWithStreamingResponse", - "AsyncACHTransfersWithStreamingResponse", - "CardDisputes", - "AsyncCardDisputes", - "CardDisputesWithRawResponse", - "AsyncCardDisputesWithRawResponse", - "CardDisputesWithStreamingResponse", - "AsyncCardDisputesWithStreamingResponse", - "CardRefunds", - "AsyncCardRefunds", - "CardRefundsWithRawResponse", - "AsyncCardRefundsWithRawResponse", - "CardRefundsWithStreamingResponse", - "AsyncCardRefundsWithStreamingResponse", - "CheckTransfers", - "AsyncCheckTransfers", - "CheckTransfersWithRawResponse", - "AsyncCheckTransfersWithRawResponse", - "CheckTransfersWithStreamingResponse", - "AsyncCheckTransfersWithStreamingResponse", - "Documents", - "AsyncDocuments", - "DocumentsWithRawResponse", - "AsyncDocumentsWithRawResponse", - "DocumentsWithStreamingResponse", - "AsyncDocumentsWithStreamingResponse", - "DigitalWalletTokenRequests", - "AsyncDigitalWalletTokenRequests", - "DigitalWalletTokenRequestsWithRawResponse", - "AsyncDigitalWalletTokenRequestsWithRawResponse", - "DigitalWalletTokenRequestsWithStreamingResponse", - "AsyncDigitalWalletTokenRequestsWithStreamingResponse", - "CheckDeposits", - "AsyncCheckDeposits", - "CheckDepositsWithRawResponse", - "AsyncCheckDepositsWithRawResponse", - "CheckDepositsWithStreamingResponse", - "AsyncCheckDepositsWithStreamingResponse", - "Programs", - "AsyncPrograms", - "ProgramsWithRawResponse", - "AsyncProgramsWithRawResponse", - "ProgramsWithStreamingResponse", - "AsyncProgramsWithStreamingResponse", - "InboundWireDrawdownRequests", - "AsyncInboundWireDrawdownRequests", - "InboundWireDrawdownRequestsWithRawResponse", - "AsyncInboundWireDrawdownRequestsWithRawResponse", - "InboundWireDrawdownRequestsWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsWithStreamingResponse", - "InboundFundsHolds", - "AsyncInboundFundsHolds", - "InboundFundsHoldsWithRawResponse", - "AsyncInboundFundsHoldsWithRawResponse", - "InboundFundsHoldsWithStreamingResponse", - "AsyncInboundFundsHoldsWithStreamingResponse", - "InterestPayments", - "AsyncInterestPayments", - "InterestPaymentsWithRawResponse", - "AsyncInterestPaymentsWithRawResponse", - "InterestPaymentsWithStreamingResponse", - "AsyncInterestPaymentsWithStreamingResponse", - "WireTransfers", - "AsyncWireTransfers", - "WireTransfersWithRawResponse", - "AsyncWireTransfersWithRawResponse", - "WireTransfersWithStreamingResponse", - "AsyncWireTransfersWithStreamingResponse", - "Cards", - "AsyncCards", - "CardsWithRawResponse", - "AsyncCardsWithRawResponse", - "CardsWithStreamingResponse", - "AsyncCardsWithStreamingResponse", - "RealTimePaymentsTransfers", - "AsyncRealTimePaymentsTransfers", - "RealTimePaymentsTransfersWithRawResponse", - "AsyncRealTimePaymentsTransfersWithRawResponse", - "RealTimePaymentsTransfersWithStreamingResponse", - "AsyncRealTimePaymentsTransfersWithStreamingResponse", - "PhysicalCards", - "AsyncPhysicalCards", - "PhysicalCardsWithRawResponse", - "AsyncPhysicalCardsWithRawResponse", - "PhysicalCardsWithStreamingResponse", - "AsyncPhysicalCardsWithStreamingResponse", - "InboundCheckDeposits", - "AsyncInboundCheckDeposits", - "InboundCheckDepositsWithRawResponse", - "AsyncInboundCheckDepositsWithRawResponse", - "InboundCheckDepositsWithStreamingResponse", - "AsyncInboundCheckDepositsWithStreamingResponse", - "InboundInternationalACHTransfers", - "AsyncInboundInternationalACHTransfers", - "InboundInternationalACHTransfersWithRawResponse", - "AsyncInboundInternationalACHTransfersWithRawResponse", - "InboundInternationalACHTransfersWithStreamingResponse", - "AsyncInboundInternationalACHTransfersWithStreamingResponse", - "Simulations", - "AsyncSimulations", - "SimulationsWithRawResponse", - "AsyncSimulationsWithRawResponse", - "SimulationsWithStreamingResponse", - "AsyncSimulationsWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", + "InboundACHTransfersResource", + "AsyncInboundACHTransfersResource", + "InboundACHTransfersResourceWithRawResponse", + "AsyncInboundACHTransfersResourceWithRawResponse", + "InboundACHTransfersResourceWithStreamingResponse", + "AsyncInboundACHTransfersResourceWithStreamingResponse", + "ACHTransfersResource", + "AsyncACHTransfersResource", + "ACHTransfersResourceWithRawResponse", + "AsyncACHTransfersResourceWithRawResponse", + "ACHTransfersResourceWithStreamingResponse", + "AsyncACHTransfersResourceWithStreamingResponse", + "CheckTransfersResource", + "AsyncCheckTransfersResource", + "CheckTransfersResourceWithRawResponse", + "AsyncCheckTransfersResourceWithRawResponse", + "CheckTransfersResourceWithStreamingResponse", + "AsyncCheckTransfersResourceWithStreamingResponse", + "InboundCheckDepositsResource", + "AsyncInboundCheckDepositsResource", + "InboundCheckDepositsResourceWithRawResponse", + "AsyncInboundCheckDepositsResourceWithRawResponse", + "InboundCheckDepositsResourceWithStreamingResponse", + "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "CheckDepositsResource", + "AsyncCheckDepositsResource", + "CheckDepositsResourceWithRawResponse", + "AsyncCheckDepositsResourceWithRawResponse", + "CheckDepositsResourceWithStreamingResponse", + "AsyncCheckDepositsResourceWithStreamingResponse", + "InboundWireTransfersResource", + "AsyncInboundWireTransfersResource", + "InboundWireTransfersResourceWithRawResponse", + "AsyncInboundWireTransfersResourceWithRawResponse", + "InboundWireTransfersResourceWithStreamingResponse", + "AsyncInboundWireTransfersResourceWithStreamingResponse", + "WireTransfersResource", + "AsyncWireTransfersResource", + "WireTransfersResourceWithRawResponse", + "AsyncWireTransfersResourceWithRawResponse", + "WireTransfersResourceWithStreamingResponse", + "AsyncWireTransfersResourceWithStreamingResponse", + "InboundWireDrawdownRequestsResource", + "AsyncInboundWireDrawdownRequestsResource", + "InboundWireDrawdownRequestsResourceWithRawResponse", + "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", + "InboundWireDrawdownRequestsResourceWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", + "InboundRealTimePaymentsTransfersResource", + "AsyncInboundRealTimePaymentsTransfersResource", + "InboundRealTimePaymentsTransfersResourceWithRawResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", + "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundFundsHoldsResource", + "AsyncInboundFundsHoldsResource", + "InboundFundsHoldsResourceWithRawResponse", + "AsyncInboundFundsHoldsResourceWithRawResponse", + "InboundFundsHoldsResourceWithStreamingResponse", + "AsyncInboundFundsHoldsResourceWithStreamingResponse", + "RealTimePaymentsTransfersResource", + "AsyncRealTimePaymentsTransfersResource", + "RealTimePaymentsTransfersResourceWithRawResponse", + "AsyncRealTimePaymentsTransfersResourceWithRawResponse", + "RealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "CardAuthorizationsResource", + "AsyncCardAuthorizationsResource", + "CardAuthorizationsResourceWithRawResponse", + "AsyncCardAuthorizationsResourceWithRawResponse", + "CardAuthorizationsResourceWithStreamingResponse", + "AsyncCardAuthorizationsResourceWithStreamingResponse", + "CardSettlementsResource", + "AsyncCardSettlementsResource", + "CardSettlementsResourceWithRawResponse", + "AsyncCardSettlementsResourceWithRawResponse", + "CardSettlementsResourceWithStreamingResponse", + "AsyncCardSettlementsResourceWithStreamingResponse", + "CardReversalsResource", + "AsyncCardReversalsResource", + "CardReversalsResourceWithRawResponse", + "AsyncCardReversalsResourceWithRawResponse", + "CardReversalsResourceWithStreamingResponse", + "AsyncCardReversalsResourceWithStreamingResponse", + "CardIncrementsResource", + "AsyncCardIncrementsResource", + "CardIncrementsResourceWithRawResponse", + "AsyncCardIncrementsResourceWithRawResponse", + "CardIncrementsResourceWithStreamingResponse", + "AsyncCardIncrementsResourceWithStreamingResponse", + "CardAuthorizationExpirationsResource", + "AsyncCardAuthorizationExpirationsResource", + "CardAuthorizationExpirationsResourceWithRawResponse", + "AsyncCardAuthorizationExpirationsResourceWithRawResponse", + "CardAuthorizationExpirationsResourceWithStreamingResponse", + "AsyncCardAuthorizationExpirationsResourceWithStreamingResponse", + "CardFuelConfirmationsResource", + "AsyncCardFuelConfirmationsResource", + "CardFuelConfirmationsResourceWithRawResponse", + "AsyncCardFuelConfirmationsResourceWithRawResponse", + "CardFuelConfirmationsResourceWithStreamingResponse", + "AsyncCardFuelConfirmationsResourceWithStreamingResponse", + "CardRefundsResource", + "AsyncCardRefundsResource", + "CardRefundsResourceWithRawResponse", + "AsyncCardRefundsResourceWithRawResponse", + "CardRefundsResourceWithStreamingResponse", + "AsyncCardRefundsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", + "DigitalWalletTokenRequestsResource", + "AsyncDigitalWalletTokenRequestsResource", + "DigitalWalletTokenRequestsResourceWithRawResponse", + "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", + "DigitalWalletTokenRequestsResourceWithStreamingResponse", + "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", + "PhysicalCardsResource", + "AsyncPhysicalCardsResource", + "PhysicalCardsResourceWithRawResponse", + "AsyncPhysicalCardsResourceWithRawResponse", + "PhysicalCardsResourceWithStreamingResponse", + "AsyncPhysicalCardsResourceWithStreamingResponse", + "InterestPaymentsResource", + "AsyncInterestPaymentsResource", + "InterestPaymentsResourceWithRawResponse", + "AsyncInterestPaymentsResourceWithRawResponse", + "InterestPaymentsResourceWithStreamingResponse", + "AsyncInterestPaymentsResourceWithStreamingResponse", + "AccountStatementsResource", + "AsyncAccountStatementsResource", + "AccountStatementsResourceWithRawResponse", + "AsyncAccountStatementsResourceWithRawResponse", + "AccountStatementsResourceWithStreamingResponse", + "AsyncAccountStatementsResourceWithStreamingResponse", + "DocumentsResource", + "AsyncDocumentsResource", + "DocumentsResourceWithRawResponse", + "AsyncDocumentsResourceWithRawResponse", + "DocumentsResourceWithStreamingResponse", + "AsyncDocumentsResourceWithStreamingResponse", + "ProgramsResource", + "AsyncProgramsResource", + "ProgramsResourceWithRawResponse", + "AsyncProgramsResourceWithRawResponse", + "ProgramsResourceWithStreamingResponse", + "AsyncProgramsResourceWithStreamingResponse", + "SimulationsResource", + "AsyncSimulationsResource", + "SimulationsResourceWithRawResponse", + "AsyncSimulationsResourceWithRawResponse", + "SimulationsResourceWithStreamingResponse", + "AsyncSimulationsResourceWithStreamingResponse", ] diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index 5e682e3fd..85080b70d 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import account_statement_create_params from ...types.account_statement import AccountStatement -__all__ = ["AccountStatements", "AsyncAccountStatements"] +__all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] -class AccountStatements(SyncAPIResource): +class AccountStatementsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncAccountStatements(AsyncAPIResource): +class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class AccountStatementsWithRawResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( account_statements.create, ) -class AsyncAccountStatementsWithRawResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithRawResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( account_statements.create, ) -class AccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AccountStatements) -> None: +class AccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AccountStatementsResource) -> None: self._account_statements = account_statements self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, account_statements: AccountStatements) -> None: ) -class AsyncAccountStatementsWithStreamingResponse: - def __init__(self, account_statements: AsyncAccountStatements) -> None: +class AsyncAccountStatementsResourceWithStreamingResponse: + def __init__(self, account_statements: AsyncAccountStatementsResource) -> None: self._account_statements = account_statements self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index ef347df1c..7495451ca 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.account_transfer import AccountTransfer -__all__ = ["AccountTransfers", "AsyncAccountTransfers"] +__all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] -class AccountTransfers(SyncAPIResource): +class AccountTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self) def complete( self, @@ -72,14 +76,14 @@ def complete( ) -class AsyncAccountTransfers(AsyncAPIResource): +class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self) async def complete( self, @@ -129,26 +133,26 @@ async def complete( ) -class AccountTransfersWithRawResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers - self.complete = _legacy_response.to_raw_response_wrapper( + self.complete = to_raw_response_wrapper( account_transfers.complete, ) -class AsyncAccountTransfersWithRawResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithRawResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers - self.complete = _legacy_response.async_to_raw_response_wrapper( + self.complete = async_to_raw_response_wrapper( account_transfers.complete, ) -class AccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AccountTransfers) -> None: +class AccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AccountTransfersResource) -> None: self._account_transfers = account_transfers self.complete = to_streamed_response_wrapper( @@ -156,8 +160,8 @@ def __init__(self, account_transfers: AccountTransfers) -> None: ) -class AsyncAccountTransfersWithStreamingResponse: - def __init__(self, account_transfers: AsyncAccountTransfers) -> None: +class AsyncAccountTransfersResourceWithStreamingResponse: + def __init__(self, account_transfers: AsyncAccountTransfersResource) -> None: self._account_transfers = account_transfers self.complete = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index c0247fa89..21c1c0c2a 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -2,13 +2,10 @@ from __future__ import annotations -from typing import Union -from datetime import datetime from typing_extensions import Literal import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -16,41 +13,32 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import ( - ach_transfer_return_params, - ach_transfer_create_inbound_params, - ach_transfer_notification_of_change_params, +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) +from ..._base_client import make_request_options +from ...types.simulations import ach_transfer_return_params, ach_transfer_create_notification_of_change_params from ...types.ach_transfer import ACHTransfer -from ...types.inbound_ach_transfer import InboundACHTransfer -__all__ = ["ACHTransfers", "AsyncACHTransfers"] +__all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] -class ACHTransfers(SyncAPIResource): +class ACHTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self) + def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self) - def create_inbound( + def acknowledge( self, + ach_transfer_id: str, *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -58,43 +46,17 @@ def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. + ) -> ACHTransfer: + """ + Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the + Federal Reserve. This transfer must first have a `status` of `submitted` . In + production, the Federal Reserve generally acknowledges submitted ACH files + within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal + Reserve, this endpoint allows you to skip that delay and add the acknowledgment + subresource to the ACH Transfer. Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. + ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. extra_headers: Send extra headers @@ -106,23 +68,10 @@ def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - "/simulations/inbound_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - }, - ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, - ), + f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,10 +79,10 @@ def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundACHTransfer, + cast_to=ACHTransfer, ) - def notification_of_change( + def create_notification_of_change( self, ach_transfer_id: str, *, @@ -227,13 +176,13 @@ def notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", body=maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -562,28 +511,19 @@ def submit( ) -class AsyncACHTransfers(AsyncAPIResource): +class AsyncACHTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self) - async def create_inbound( + async def acknowledge( self, + ach_transfer_id: str, *, - account_number_id: str, - amount: int, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -591,43 +531,17 @@ async def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundACHTransfer: - """Simulates an inbound ACH transfer to your account. - - This imitates initiating a - transfer to an Increase account from a different financial institution. The - transfer may be either a credit or a debit depending on if the `amount` is - positive or negative. The result of calling this API will contain the created - transfer. You can pass a `resolve_at` parameter to allow for a window to - [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). - Alternatively, if you don't pass the `resolve_at` parameter the result will - contain either a [Transaction](#transactions) or a - [Declined Transaction](#declined-transactions) depending on whether or not the - transfer is allowed. + ) -> ACHTransfer: + """ + Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the + Federal Reserve. This transfer must first have a `status` of `submitted` . In + production, the Federal Reserve generally acknowledges submitted ACH files + within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal + Reserve, this endpoint allows you to skip that delay and add the acknowledgment + subresource to the ACH Transfer. Args: - account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - company_descriptive_date: The description of the date of the transfer. - - company_discretionary_data: Data associated with the transfer set by the sender. - - company_entry_description: The description of the transfer set by the sender. - - company_id: The sender's company ID. - - company_name: The name of the sender. - - receiver_id_number: The ID of the receiver of the transfer. - - receiver_name: The name of the receiver of the transfer. - - resolve_at: The time at which the transfer should be resolved. If not provided will resolve - immediately. + ach_transfer_id: The identifier of the ACH Transfer you wish to become acknowledged. extra_headers: Send extra headers @@ -639,23 +553,10 @@ async def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - "/simulations/inbound_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "company_descriptive_date": company_descriptive_date, - "company_discretionary_data": company_discretionary_data, - "company_entry_description": company_entry_description, - "company_id": company_id, - "company_name": company_name, - "receiver_id_number": receiver_id_number, - "receiver_name": receiver_name, - "resolve_at": resolve_at, - }, - ach_transfer_create_inbound_params.ACHTransferCreateInboundParams, - ), + f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -663,10 +564,10 @@ async def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundACHTransfer, + cast_to=ACHTransfer, ) - async def notification_of_change( + async def create_notification_of_change( self, ach_transfer_id: str, *, @@ -760,13 +661,13 @@ async def notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/notification_of_change", + f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", body=await async_maybe_transform( { "change_code": change_code, "corrected_data": corrected_data, }, - ach_transfer_notification_of_change_params.ACHTransferNotificationOfChangeParams, + ach_transfer_create_notification_of_change_params.ACHTransferCreateNotificationOfChangeParams, ), options=make_request_options( extra_headers=extra_headers, @@ -1095,51 +996,51 @@ async def submit( ) -class ACHTransfersWithRawResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = _legacy_response.to_raw_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = to_raw_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = _legacy_response.to_raw_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = to_raw_response_wrapper( + ach_transfers.create_notification_of_change, ) - self.return_ = _legacy_response.to_raw_response_wrapper( + self.return_ = to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = _legacy_response.to_raw_response_wrapper( + self.submit = to_raw_response_wrapper( ach_transfers.submit, ) -class AsyncACHTransfersWithRawResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithRawResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = async_to_raw_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = _legacy_response.async_to_raw_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = async_to_raw_response_wrapper( + ach_transfers.create_notification_of_change, ) - self.return_ = _legacy_response.async_to_raw_response_wrapper( + self.return_ = async_to_raw_response_wrapper( ach_transfers.return_, ) - self.submit = _legacy_response.async_to_raw_response_wrapper( + self.submit = async_to_raw_response_wrapper( ach_transfers.submit, ) -class ACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: ACHTransfers) -> None: +class ACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: ACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = to_streamed_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = to_streamed_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = to_streamed_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = to_streamed_response_wrapper( + ach_transfers.create_notification_of_change, ) self.return_ = to_streamed_response_wrapper( ach_transfers.return_, @@ -1149,15 +1050,15 @@ def __init__(self, ach_transfers: ACHTransfers) -> None: ) -class AsyncACHTransfersWithStreamingResponse: - def __init__(self, ach_transfers: AsyncACHTransfers) -> None: +class AsyncACHTransfersResourceWithStreamingResponse: + def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self._ach_transfers = ach_transfers - self.create_inbound = async_to_streamed_response_wrapper( - ach_transfers.create_inbound, + self.acknowledge = async_to_streamed_response_wrapper( + ach_transfers.acknowledge, ) - self.notification_of_change = async_to_streamed_response_wrapper( - ach_transfers.notification_of_change, + self.create_notification_of_change = async_to_streamed_response_wrapper( + ach_transfers.create_notification_of_change, ) self.return_ = async_to_streamed_response_wrapper( ach_transfers.return_, diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py new file mode 100644 index 000000000..bd2a5c020 --- /dev/null +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -0,0 +1,168 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_authorization_expiration_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardAuthorizationExpirationsResource", "AsyncCardAuthorizationExpirationsResource"] + + +class CardAuthorizationExpirationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + return CardAuthorizationExpirationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + return CardAuthorizationExpirationsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_authorization_expirations", + body=maybe_transform( + {"card_payment_id": card_payment_id}, + card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardAuthorizationExpirationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + return AsyncCardAuthorizationExpirationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates expiring a card authorization immediately. + + Args: + card_payment_id: The identifier of the Card Payment to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_authorization_expirations", + body=await async_maybe_transform( + {"card_payment_id": card_payment_id}, + card_authorization_expiration_create_params.CardAuthorizationExpirationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardAuthorizationExpirationsResourceWithRawResponse: + def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = to_raw_response_wrapper( + card_authorization_expirations.create, + ) + + +class AsyncCardAuthorizationExpirationsResourceWithRawResponse: + def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = async_to_raw_response_wrapper( + card_authorization_expirations.create, + ) + + +class CardAuthorizationExpirationsResourceWithStreamingResponse: + def __init__(self, card_authorization_expirations: CardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = to_streamed_response_wrapper( + card_authorization_expirations.create, + ) + + +class AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + def __init__(self, card_authorization_expirations: AsyncCardAuthorizationExpirationsResource) -> None: + self._card_authorization_expirations = card_authorization_expirations + + self.create = async_to_streamed_response_wrapper( + card_authorization_expirations.create, + ) diff --git a/src/increase/resources/simulations/cards.py b/src/increase/resources/simulations/card_authorizations.py similarity index 54% rename from src/increase/resources/simulations/cards.py rename to src/increase/resources/simulations/card_authorizations.py index b4e6e7186..6089829c9 100644 --- a/src/increase/resources/simulations/cards.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,25 +11,29 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import card_authorize_params, card_settlement_params -from ...types.transaction import Transaction -from ...types.simulations.card_authorization_simulation import CardAuthorizationSimulation +from ...types.simulations import card_authorization_create_params +from ...types.simulations.card_authorization_create_response import CardAuthorizationCreateResponse -__all__ = ["Cards", "AsyncCards"] +__all__ = ["CardAuthorizationsResource", "AsyncCardAuthorizationsResource"] -class Cards(SyncAPIResource): +class CardAuthorizationsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self) + def with_raw_response(self) -> CardAuthorizationsResourceWithRawResponse: + return CardAuthorizationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self) + def with_streaming_response(self) -> CardAuthorizationsResourceWithStreamingResponse: + return CardAuthorizationsResourceWithStreamingResponse(self) - def authorize( + def create( self, *, amount: int, @@ -50,7 +53,7 @@ def authorize( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationSimulation: + ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -112,68 +115,7 @@ def authorize( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorize_params.CardAuthorizeParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardAuthorizationSimulation, - ) - - def settlement( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_settlements", - body=maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_params.CardSettlementParams, + card_authorization_create_params.CardAuthorizationCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -182,20 +124,20 @@ def settlement( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Transaction, + cast_to=CardAuthorizationCreateResponse, ) -class AsyncCards(AsyncAPIResource): +class AsyncCardAuthorizationsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + return AsyncCardAuthorizationsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: + return AsyncCardAuthorizationsResourceWithStreamingResponse(self) - async def authorize( + async def create( self, *, amount: int, @@ -215,7 +157,7 @@ async def authorize( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> CardAuthorizationSimulation: + ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). Depending on the balance @@ -277,7 +219,7 @@ async def authorize( "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, }, - card_authorize_params.CardAuthorizeParams, + card_authorization_create_params.CardAuthorizationCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -286,114 +228,41 @@ async def authorize( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=CardAuthorizationSimulation, + cast_to=CardAuthorizationCreateResponse, ) - async def settlement( - self, - *, - card_id: str, - pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """Simulates the settlement of an authorization by a card acquirer. - - After a card - authorization is created, the merchant will eventually send a settlement. This - simulates that event, which may occur many days after the purchase in - production. The amount settled can be different from the amount originally - authorized, for example, when adding a tip to a restaurant bill. - - Args: - card_id: The identifier of the Card to create a settlement on. - - pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to - settle. - amount: The amount to be settled. This defaults to the amount of the Pending Transaction - being settled. +class CardAuthorizationsResourceWithRawResponse: + def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_settlements", - body=await async_maybe_transform( - { - "card_id": card_id, - "pending_transaction_id": pending_transaction_id, - "amount": amount, - }, - card_settlement_params.CardSettlementParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class CardsWithRawResponse: - def __init__(self, cards: Cards) -> None: - self._cards = cards - - self.authorize = _legacy_response.to_raw_response_wrapper( - cards.authorize, - ) - self.settlement = _legacy_response.to_raw_response_wrapper( - cards.settlement, + self.create = to_raw_response_wrapper( + card_authorizations.create, ) -class AsyncCardsWithRawResponse: - def __init__(self, cards: AsyncCards) -> None: - self._cards = cards +class AsyncCardAuthorizationsResourceWithRawResponse: + def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = _legacy_response.async_to_raw_response_wrapper( - cards.authorize, - ) - self.settlement = _legacy_response.async_to_raw_response_wrapper( - cards.settlement, + self.create = async_to_raw_response_wrapper( + card_authorizations.create, ) -class CardsWithStreamingResponse: - def __init__(self, cards: Cards) -> None: - self._cards = cards +class CardAuthorizationsResourceWithStreamingResponse: + def __init__(self, card_authorizations: CardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = to_streamed_response_wrapper( - cards.authorize, - ) - self.settlement = to_streamed_response_wrapper( - cards.settlement, + self.create = to_streamed_response_wrapper( + card_authorizations.create, ) -class AsyncCardsWithStreamingResponse: - def __init__(self, cards: AsyncCards) -> None: - self._cards = cards +class AsyncCardAuthorizationsResourceWithStreamingResponse: + def __init__(self, card_authorizations: AsyncCardAuthorizationsResource) -> None: + self._card_authorizations = card_authorizations - self.authorize = async_to_streamed_response_wrapper( - cards.authorize, - ) - self.settlement = async_to_streamed_response_wrapper( - cards.settlement, + self.create = async_to_streamed_response_wrapper( + card_authorizations.create, ) diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 27f373762..ec48f6924 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -6,7 +6,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -14,22 +13,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import card_dispute_action_params from ...types.card_dispute import CardDispute -__all__ = ["CardDisputes", "AsyncCardDisputes"] +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] -class CardDisputes(SyncAPIResource): +class CardDisputesResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self) + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self) def action( self, @@ -98,14 +102,14 @@ def action( ) -class AsyncCardDisputes(AsyncAPIResource): +class AsyncCardDisputesResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self) + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self) async def action( self, @@ -174,26 +178,26 @@ async def action( ) -class CardDisputesWithRawResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes - self.action = _legacy_response.to_raw_response_wrapper( + self.action = to_raw_response_wrapper( card_disputes.action, ) -class AsyncCardDisputesWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes - self.action = _legacy_response.async_to_raw_response_wrapper( + self.action = async_to_raw_response_wrapper( card_disputes.action, ) -class CardDisputesWithStreamingResponse: - def __init__(self, card_disputes: CardDisputes) -> None: +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: self._card_disputes = card_disputes self.action = to_streamed_response_wrapper( @@ -201,8 +205,8 @@ def __init__(self, card_disputes: CardDisputes) -> None: ) -class AsyncCardDisputesWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputes) -> None: +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: self._card_disputes = card_disputes self.action = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py new file mode 100644 index 000000000..fe62793ec --- /dev/null +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -0,0 +1,188 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_fuel_confirmation_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardFuelConfirmationsResource", "AsyncCardFuelConfirmationsResource"] + + +class CardFuelConfirmationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardFuelConfirmationsResourceWithRawResponse: + return CardFuelConfirmationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardFuelConfirmationsResourceWithStreamingResponse: + return CardFuelConfirmationsResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_fuel_confirmations", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardFuelConfirmationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: + return AsyncCardFuelConfirmationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: + return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + card_payment_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the fuel confirmation of an authorization by a card acquirer. + + This + happens asynchronously right after a fuel pump transaction is completed. A fuel + confirmation can only happen once per authorization. + + Args: + amount: The amount of the fuel_confirmation in minor units in the card authorization's + currency. + + card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_fuel_confirmations", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + }, + card_fuel_confirmation_create_params.CardFuelConfirmationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardFuelConfirmationsResourceWithRawResponse: + def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = to_raw_response_wrapper( + card_fuel_confirmations.create, + ) + + +class AsyncCardFuelConfirmationsResourceWithRawResponse: + def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = async_to_raw_response_wrapper( + card_fuel_confirmations.create, + ) + + +class CardFuelConfirmationsResourceWithStreamingResponse: + def __init__(self, card_fuel_confirmations: CardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = to_streamed_response_wrapper( + card_fuel_confirmations.create, + ) + + +class AsyncCardFuelConfirmationsResourceWithStreamingResponse: + def __init__(self, card_fuel_confirmations: AsyncCardFuelConfirmationsResource) -> None: + self._card_fuel_confirmations = card_fuel_confirmations + + self.create = async_to_streamed_response_wrapper( + card_fuel_confirmations.create, + ) diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py new file mode 100644 index 000000000..24e8ab4e5 --- /dev/null +++ b/src/increase/resources/simulations/card_increments.py @@ -0,0 +1,198 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_increment_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardIncrementsResource", "AsyncCardIncrementsResource"] + + +class CardIncrementsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardIncrementsResourceWithRawResponse: + return CardIncrementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardIncrementsResourceWithStreamingResponse: + return CardIncrementsResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_increments", + body=maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + card_increment_create_params.CardIncrementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardIncrementsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardIncrementsResourceWithRawResponse: + return AsyncCardIncrementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardIncrementsResourceWithStreamingResponse: + return AsyncCardIncrementsResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + card_payment_id: str, + event_subscription_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the increment of an authorization by a card acquirer. + + An authorization + can be incremented multiple times. + + Args: + amount: The amount of the increment in minor units in the card authorization's currency. + + card_payment_id: The identifier of the Card Payment to create a increment on. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_increments", + body=await async_maybe_transform( + { + "amount": amount, + "card_payment_id": card_payment_id, + "event_subscription_id": event_subscription_id, + }, + card_increment_create_params.CardIncrementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardIncrementsResourceWithRawResponse: + def __init__(self, card_increments: CardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = to_raw_response_wrapper( + card_increments.create, + ) + + +class AsyncCardIncrementsResourceWithRawResponse: + def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = async_to_raw_response_wrapper( + card_increments.create, + ) + + +class CardIncrementsResourceWithStreamingResponse: + def __init__(self, card_increments: CardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = to_streamed_response_wrapper( + card_increments.create, + ) + + +class AsyncCardIncrementsResourceWithStreamingResponse: + def __init__(self, card_increments: AsyncCardIncrementsResource) -> None: + self._card_increments = card_increments + + self.create = async_to_streamed_response_wrapper( + card_increments.create, + ) diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 6c01e48c6..7ab498340 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import card_refund_create_params from ...types.transaction import Transaction -__all__ = ["CardRefunds", "AsyncCardRefunds"] +__all__ = ["CardRefundsResource", "AsyncCardRefundsResource"] -class CardRefunds(SyncAPIResource): +class CardRefundsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CardRefundsWithRawResponse: - return CardRefundsWithRawResponse(self) + def with_raw_response(self) -> CardRefundsResourceWithRawResponse: + return CardRefundsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CardRefundsWithStreamingResponse: - return CardRefundsWithStreamingResponse(self) + def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: + return CardRefundsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncCardRefunds(AsyncAPIResource): +class AsyncCardRefundsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCardRefundsWithRawResponse: - return AsyncCardRefundsWithRawResponse(self) + def with_raw_response(self) -> AsyncCardRefundsResourceWithRawResponse: + return AsyncCardRefundsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCardRefundsWithStreamingResponse: - return AsyncCardRefundsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingResponse: + return AsyncCardRefundsResourceWithStreamingResponse(self) async def create( self, @@ -130,26 +134,26 @@ async def create( ) -class CardRefundsWithRawResponse: - def __init__(self, card_refunds: CardRefunds) -> None: +class CardRefundsResourceWithRawResponse: + def __init__(self, card_refunds: CardRefundsResource) -> None: self._card_refunds = card_refunds - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( card_refunds.create, ) -class AsyncCardRefundsWithRawResponse: - def __init__(self, card_refunds: AsyncCardRefunds) -> None: +class AsyncCardRefundsResourceWithRawResponse: + def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: self._card_refunds = card_refunds - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( card_refunds.create, ) -class CardRefundsWithStreamingResponse: - def __init__(self, card_refunds: CardRefunds) -> None: +class CardRefundsResourceWithStreamingResponse: + def __init__(self, card_refunds: CardRefundsResource) -> None: self._card_refunds = card_refunds self.create = to_streamed_response_wrapper( @@ -157,8 +161,8 @@ def __init__(self, card_refunds: CardRefunds) -> None: ) -class AsyncCardRefundsWithStreamingResponse: - def __init__(self, card_refunds: AsyncCardRefunds) -> None: +class AsyncCardRefundsResourceWithStreamingResponse: + def __init__(self, card_refunds: AsyncCardRefundsResource) -> None: self._card_refunds = card_refunds self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py new file mode 100644 index 000000000..ff8bd9515 --- /dev/null +++ b/src/increase/resources/simulations/card_reversals.py @@ -0,0 +1,190 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_reversal_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardReversalsResource", "AsyncCardReversalsResource"] + + +class CardReversalsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardReversalsResourceWithRawResponse: + return CardReversalsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardReversalsResourceWithStreamingResponse: + return CardReversalsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_reversals", + body=maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + card_reversal_create_params.CardReversalCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardReversalsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardReversalsResourceWithRawResponse: + return AsyncCardReversalsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardReversalsResourceWithStreamingResponse: + return AsyncCardReversalsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_payment_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates the reversal of an authorization by a card acquirer. + + An authorization + can be partially reversed multiple times, up until the total authorized amount. + Marks the pending transaction as complete if the authorization is fully + reversed. + + Args: + card_payment_id: The identifier of the Card Payment to create a reversal on. + + amount: The amount of the reversal in minor units in the card authorization's currency. + This defaults to the authorization amount. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_reversals", + body=await async_maybe_transform( + { + "card_payment_id": card_payment_id, + "amount": amount, + }, + card_reversal_create_params.CardReversalCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardReversalsResourceWithRawResponse: + def __init__(self, card_reversals: CardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = to_raw_response_wrapper( + card_reversals.create, + ) + + +class AsyncCardReversalsResourceWithRawResponse: + def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = async_to_raw_response_wrapper( + card_reversals.create, + ) + + +class CardReversalsResourceWithStreamingResponse: + def __init__(self, card_reversals: CardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = to_streamed_response_wrapper( + card_reversals.create, + ) + + +class AsyncCardReversalsResourceWithStreamingResponse: + def __init__(self, card_reversals: AsyncCardReversalsResource) -> None: + self._card_reversals = card_reversals + + self.create = async_to_streamed_response_wrapper( + card_reversals.create, + ) diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py new file mode 100644 index 000000000..84399485f --- /dev/null +++ b/src/increase/resources/simulations/card_settlements.py @@ -0,0 +1,202 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_settlement_create_params +from ...types.transaction import Transaction + +__all__ = ["CardSettlementsResource", "AsyncCardSettlementsResource"] + + +class CardSettlementsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardSettlementsResourceWithRawResponse: + return CardSettlementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardSettlementsResourceWithStreamingResponse: + return CardSettlementsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. + + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_settlements", + body=maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_create_params.CardSettlementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class AsyncCardSettlementsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardSettlementsResourceWithRawResponse: + return AsyncCardSettlementsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardSettlementsResourceWithStreamingResponse: + return AsyncCardSettlementsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_id: str, + pending_transaction_id: str, + amount: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """Simulates the settlement of an authorization by a card acquirer. + + After a card + authorization is created, the merchant will eventually send a settlement. This + simulates that event, which may occur many days after the purchase in + production. The amount settled can be different from the amount originally + authorized, for example, when adding a tip to a restaurant bill. + + Args: + card_id: The identifier of the Card to create a settlement on. + + pending_transaction_id: The identifier of the Pending Transaction for the Card Authorization you wish to + settle. + + amount: The amount to be settled. This defaults to the amount of the Pending Transaction + being settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_settlements", + body=await async_maybe_transform( + { + "card_id": card_id, + "pending_transaction_id": pending_transaction_id, + "amount": amount, + }, + card_settlement_create_params.CardSettlementCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class CardSettlementsResourceWithRawResponse: + def __init__(self, card_settlements: CardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = to_raw_response_wrapper( + card_settlements.create, + ) + + +class AsyncCardSettlementsResourceWithRawResponse: + def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = async_to_raw_response_wrapper( + card_settlements.create, + ) + + +class CardSettlementsResourceWithStreamingResponse: + def __init__(self, card_settlements: CardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = to_streamed_response_wrapper( + card_settlements.create, + ) + + +class AsyncCardSettlementsResourceWithStreamingResponse: + def __init__(self, card_settlements: AsyncCardSettlementsResource) -> None: + self._card_settlements = card_settlements + + self.create = async_to_streamed_response_wrapper( + card_settlements.create, + ) diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 76230a77c..862029b70 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.check_deposit import CheckDeposit -__all__ = ["CheckDeposits", "AsyncCheckDeposits"] +__all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] -class CheckDeposits(SyncAPIResource): +class CheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self) + def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self) def reject( self, @@ -156,14 +160,14 @@ def submit( ) -class AsyncCheckDeposits(AsyncAPIResource): +class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self) async def reject( self, @@ -297,38 +301,38 @@ async def submit( ) -class CheckDepositsWithRawResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits - self.reject = _legacy_response.to_raw_response_wrapper( + self.reject = to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = _legacy_response.to_raw_response_wrapper( + self.return_ = to_raw_response_wrapper( check_deposits.return_, ) - self.submit = _legacy_response.to_raw_response_wrapper( + self.submit = to_raw_response_wrapper( check_deposits.submit, ) -class AsyncCheckDepositsWithRawResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithRawResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits - self.reject = _legacy_response.async_to_raw_response_wrapper( + self.reject = async_to_raw_response_wrapper( check_deposits.reject, ) - self.return_ = _legacy_response.async_to_raw_response_wrapper( + self.return_ = async_to_raw_response_wrapper( check_deposits.return_, ) - self.submit = _legacy_response.async_to_raw_response_wrapper( + self.submit = async_to_raw_response_wrapper( check_deposits.submit, ) -class CheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: CheckDeposits) -> None: +class CheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits self.reject = to_streamed_response_wrapper( @@ -342,8 +346,8 @@ def __init__(self, check_deposits: CheckDeposits) -> None: ) -class AsyncCheckDepositsWithStreamingResponse: - def __init__(self, check_deposits: AsyncCheckDeposits) -> None: +class AsyncCheckDepositsResourceWithStreamingResponse: + def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits self.reject = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index 8f3ac9af3..a0299f97f 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.check_transfer import CheckTransfer -__all__ = ["CheckTransfers", "AsyncCheckTransfers"] +__all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] -class CheckTransfers(SyncAPIResource): +class CheckTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self) + def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self) def mail( self, @@ -69,14 +73,14 @@ def mail( ) -class AsyncCheckTransfers(AsyncAPIResource): +class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self) async def mail( self, @@ -123,26 +127,26 @@ async def mail( ) -class CheckTransfersWithRawResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers - self.mail = _legacy_response.to_raw_response_wrapper( + self.mail = to_raw_response_wrapper( check_transfers.mail, ) -class AsyncCheckTransfersWithRawResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithRawResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers - self.mail = _legacy_response.async_to_raw_response_wrapper( + self.mail = async_to_raw_response_wrapper( check_transfers.mail, ) -class CheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: CheckTransfers) -> None: +class CheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: CheckTransfersResource) -> None: self._check_transfers = check_transfers self.mail = to_streamed_response_wrapper( @@ -150,8 +154,8 @@ def __init__(self, check_transfers: CheckTransfers) -> None: ) -class AsyncCheckTransfersWithStreamingResponse: - def __init__(self, check_transfers: AsyncCheckTransfers) -> None: +class AsyncCheckTransfersResourceWithStreamingResponse: + def __init__(self, check_transfers: AsyncCheckTransfersResource) -> None: self._check_transfers = check_transfers self.mail = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 6a7407aa9..7576f7708 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import digital_wallet_token_request_create_params from ...types.simulations.digital_wallet_token_request_create_response import DigitalWalletTokenRequestCreateResponse -__all__ = ["DigitalWalletTokenRequests", "AsyncDigitalWalletTokenRequests"] +__all__ = ["DigitalWalletTokenRequestsResource", "AsyncDigitalWalletTokenRequestsResource"] -class DigitalWalletTokenRequests(SyncAPIResource): +class DigitalWalletTokenRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DigitalWalletTokenRequestsWithRawResponse: - return DigitalWalletTokenRequestsWithRawResponse(self) + def with_raw_response(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + return DigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DigitalWalletTokenRequestsWithStreamingResponse: - return DigitalWalletTokenRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + return DigitalWalletTokenRequestsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncDigitalWalletTokenRequests(AsyncAPIResource): +class AsyncDigitalWalletTokenRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: - return AsyncDigitalWalletTokenRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class DigitalWalletTokenRequestsWithRawResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: +class DigitalWalletTokenRequestsResourceWithRawResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class AsyncDigitalWalletTokenRequestsWithRawResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: +class AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( digital_wallet_token_requests.create, ) -class DigitalWalletTokenRequestsWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> None: +class DigitalWalletTokenRequestsResourceWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, digital_wallet_token_requests: DigitalWalletTokenRequests) -> ) -class AsyncDigitalWalletTokenRequestsWithStreamingResponse: - def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequests) -> None: +class AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + def __init__(self, digital_wallet_token_requests: AsyncDigitalWalletTokenRequestsResource) -> None: self._digital_wallet_token_requests = digital_wallet_token_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 3228ade65..b2f455a28 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.document import Document from ...types.simulations import document_create_params -__all__ = ["Documents", "AsyncDocuments"] +__all__ = ["DocumentsResource", "AsyncDocumentsResource"] -class Documents(SyncAPIResource): +class DocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self) + def with_raw_response(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self) def create( self, @@ -71,14 +75,14 @@ def create( ) -class AsyncDocuments(AsyncAPIResource): +class AsyncDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self) async def create( self, @@ -122,26 +126,26 @@ async def create( ) -class DocumentsWithRawResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithRawResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( documents.create, ) -class AsyncDocumentsWithRawResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithRawResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( documents.create, ) -class DocumentsWithStreamingResponse: - def __init__(self, documents: Documents) -> None: +class DocumentsResourceWithStreamingResponse: + def __init__(self, documents: DocumentsResource) -> None: self._documents = documents self.create = to_streamed_response_wrapper( @@ -149,8 +153,8 @@ def __init__(self, documents: Documents) -> None: ) -class AsyncDocumentsWithStreamingResponse: - def __init__(self, documents: AsyncDocuments) -> None: +class AsyncDocumentsResourceWithStreamingResponse: + def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py new file mode 100644 index 000000000..87a5f33a7 --- /dev/null +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -0,0 +1,352 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_ach_transfer_create_params +from ...types.inbound_ach_transfer import InboundACHTransfer + +__all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] + + +class InboundACHTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. + + Args: + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. + + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, + }, + inbound_ach_transfer_create_params.InboundACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundACHTransfer, + ) + + +class AsyncInboundACHTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + company_descriptive_date: str | NotGiven = NOT_GIVEN, + company_discretionary_data: str | NotGiven = NOT_GIVEN, + company_entry_description: str | NotGiven = NOT_GIVEN, + company_id: str | NotGiven = NOT_GIVEN, + company_name: str | NotGiven = NOT_GIVEN, + receiver_id_number: str | NotGiven = NOT_GIVEN, + receiver_name: str | NotGiven = NOT_GIVEN, + resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundACHTransfer: + """Simulates an inbound ACH transfer to your account. + + This imitates initiating a + transfer to an Increase account from a different financial institution. The + transfer may be either a credit or a debit depending on if the `amount` is + positive or negative. The result of calling this API will contain the created + transfer. You can pass a `resolve_at` parameter to allow for a window to + [action on the Inbound ACH Transfer](https://increase.com/documentation/receiving-ach-transfers). + Alternatively, if you don't pass the `resolve_at` parameter the result will + contain either a [Transaction](#transactions) or a + [Declined Transaction](#declined-transactions) depending on whether or not the + transfer is allowed. + + Args: + account_number_id: The identifier of the Account Number the inbound ACH Transfer is for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + company_descriptive_date: The description of the date of the transfer. + + company_discretionary_data: Data associated with the transfer set by the sender. + + company_entry_description: The description of the transfer set by the sender. + + company_id: The sender's company ID. + + company_name: The name of the sender. + + receiver_id_number: The ID of the receiver of the transfer. + + receiver_name: The name of the receiver of the transfer. + + resolve_at: The time at which the transfer should be resolved. If not provided will resolve + immediately. + + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "company_descriptive_date": company_descriptive_date, + "company_discretionary_data": company_discretionary_data, + "company_entry_description": company_entry_description, + "company_id": company_id, + "company_name": company_name, + "receiver_id_number": receiver_id_number, + "receiver_name": receiver_name, + "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, + }, + inbound_ach_transfer_create_params.InboundACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundACHTransfer, + ) + + +class InboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = to_raw_response_wrapper( + inbound_ach_transfers.create, + ) + + +class AsyncInboundACHTransfersResourceWithRawResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = async_to_raw_response_wrapper( + inbound_ach_transfers.create, + ) + + +class InboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: InboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = to_streamed_response_wrapper( + inbound_ach_transfers.create, + ) + + +class AsyncInboundACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_ach_transfers: AsyncInboundACHTransfersResource) -> None: + self._inbound_ach_transfers = inbound_ach_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_ach_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 2d37d6f23..902853eb3 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import inbound_check_deposit_create_params from ...types.inbound_check_deposit import InboundCheckDeposit -__all__ = ["InboundCheckDeposits", "AsyncInboundCheckDeposits"] +__all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] -class InboundCheckDeposits(SyncAPIResource): +class InboundCheckDepositsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self) def create( self, @@ -90,14 +94,14 @@ def create( ) -class AsyncInboundCheckDeposits(AsyncAPIResource): +class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def create( self, @@ -160,26 +164,26 @@ async def create( ) -class InboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( inbound_check_deposits.create, ) -class AsyncInboundCheckDepositsWithRawResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithRawResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( inbound_check_deposits.create, ) -class InboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: +class InboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = to_streamed_response_wrapper( @@ -187,8 +191,8 @@ def __init__(self, inbound_check_deposits: InboundCheckDeposits) -> None: ) -class AsyncInboundCheckDepositsWithStreamingResponse: - def __init__(self, inbound_check_deposits: AsyncInboundCheckDeposits) -> None: +class AsyncInboundCheckDepositsResourceWithStreamingResponse: + def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> None: self._inbound_check_deposits = inbound_check_deposits self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index ff7d43726..6cb3ad65a 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -4,25 +4,29 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse -__all__ = ["InboundFundsHolds", "AsyncInboundFundsHolds"] +__all__ = ["InboundFundsHoldsResource", "AsyncInboundFundsHoldsResource"] -class InboundFundsHolds(SyncAPIResource): +class InboundFundsHoldsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundFundsHoldsWithRawResponse: - return InboundFundsHoldsWithRawResponse(self) + def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: + return InboundFundsHoldsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundFundsHoldsWithStreamingResponse: - return InboundFundsHoldsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: + return InboundFundsHoldsResourceWithStreamingResponse(self) def release( self, @@ -70,14 +74,14 @@ def release( ) -class AsyncInboundFundsHolds(AsyncAPIResource): +class AsyncInboundFundsHoldsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundFundsHoldsWithRawResponse: - return AsyncInboundFundsHoldsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + return AsyncInboundFundsHoldsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundFundsHoldsWithStreamingResponse: - return AsyncInboundFundsHoldsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + return AsyncInboundFundsHoldsResourceWithStreamingResponse(self) async def release( self, @@ -125,26 +129,26 @@ async def release( ) -class InboundFundsHoldsWithRawResponse: - def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: +class InboundFundsHoldsResourceWithRawResponse: + def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = _legacy_response.to_raw_response_wrapper( + self.release = to_raw_response_wrapper( inbound_funds_holds.release, ) -class AsyncInboundFundsHoldsWithRawResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: +class AsyncInboundFundsHoldsResourceWithRawResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds - self.release = _legacy_response.async_to_raw_response_wrapper( + self.release = async_to_raw_response_wrapper( inbound_funds_holds.release, ) -class InboundFundsHoldsWithStreamingResponse: - def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: +class InboundFundsHoldsResourceWithStreamingResponse: + def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = to_streamed_response_wrapper( @@ -152,8 +156,8 @@ def __init__(self, inbound_funds_holds: InboundFundsHolds) -> None: ) -class AsyncInboundFundsHoldsWithStreamingResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHolds) -> None: +class AsyncInboundFundsHoldsResourceWithStreamingResponse: + def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: self._inbound_funds_holds = inbound_funds_holds self.release = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py deleted file mode 100644 index 6c0109920..000000000 --- a/src/increase/resources/simulations/inbound_international_ach_transfers.py +++ /dev/null @@ -1,244 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import inbound_international_ach_transfer_create_params -from ...types.simulations.inbound_international_ach_transfer import InboundInternationalACHTransfer - -__all__ = ["InboundInternationalACHTransfers", "AsyncInboundInternationalACHTransfers"] - - -class InboundInternationalACHTransfers(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundInternationalACHTransfersWithRawResponse: - return InboundInternationalACHTransfersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundInternationalACHTransfersWithStreamingResponse: - return InboundInternationalACHTransfersWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransfer: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_international_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransfer, - ) - - -class AsyncInboundInternationalACHTransfers(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: - return AsyncInboundInternationalACHTransfersWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: - return AsyncInboundInternationalACHTransfersWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransfer: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_international_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransfer, - ) - - -class InboundInternationalACHTransfersWithRawResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = _legacy_response.to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersWithRawResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = _legacy_response.async_to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class InboundInternationalACHTransfersWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfers) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py new file mode 100644 index 000000000..209db6144 --- /dev/null +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -0,0 +1,228 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_real_time_payments_transfer_create_params +from ...types.simulations.inbound_real_time_payments_transfer_create_response import ( + InboundRealTimePaymentsTransferCreateResponse, +) + +__all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] + + +class InboundRealTimePaymentsTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferCreateResponse: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_real_time_payments_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferCreateResponse, + ) + + +class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + remittance_information: str | NotGiven = NOT_GIVEN, + request_for_payment_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundRealTimePaymentsTransferCreateResponse: + """Simulates an inbound Real-Time Payments transfer to your account. + + Real-Time + Payments are a beta feature. + + Args: + account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is + for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + remittance_information: Additional information included with the transfer. + + request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_real_time_payments_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "remittance_information": remittance_information, + "request_for_payment_id": request_for_payment_id, + }, + inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundRealTimePaymentsTransferCreateResponse, + ) + + +class InboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = to_raw_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = async_to_raw_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = to_streamed_response_wrapper( + inbound_real_time_payments_transfers.create, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_real_time_payments_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 90dae10a0..61f2d8b4a 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import inbound_wire_drawdown_request_create_params from ...types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -__all__ = ["InboundWireDrawdownRequests", "AsyncInboundWireDrawdownRequests"] +__all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] -class InboundWireDrawdownRequests(SyncAPIResource): +class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def create( self, @@ -159,14 +163,14 @@ def create( ) -class AsyncInboundWireDrawdownRequests(AsyncAPIResource): +class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( self, @@ -298,26 +302,26 @@ async def create( ) -class InboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class AsyncInboundWireDrawdownRequestsWithRawResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( inbound_wire_drawdown_requests.create, ) -class InboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) -> None: +class InboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -325,8 +329,8 @@ def __init__(self, inbound_wire_drawdown_requests: InboundWireDrawdownRequests) ) -class AsyncInboundWireDrawdownRequestsWithStreamingResponse: - def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequests) -> None: +class AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, inbound_wire_drawdown_requests: AsyncInboundWireDrawdownRequestsResource) -> None: self._inbound_wire_drawdown_requests = inbound_wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py new file mode 100644 index 000000000..3501f7328 --- /dev/null +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -0,0 +1,330 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_wire_transfer_create_params +from ...types.inbound_wire_transfer import InboundWireTransfer + +__all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] + + +class InboundWireTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Simulates an inbound Wire Transfer to your account. + + Args: + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. + + amount: The transfer amount in cents. Must be positive. + + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. + + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. + + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. + + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. + + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. + + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. + + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_wire_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, + }, + inbound_wire_transfer_create_params.InboundWireTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + + +class AsyncInboundWireTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + beneficiary_address_line1: str | NotGiven = NOT_GIVEN, + beneficiary_address_line2: str | NotGiven = NOT_GIVEN, + beneficiary_address_line3: str | NotGiven = NOT_GIVEN, + beneficiary_name: str | NotGiven = NOT_GIVEN, + beneficiary_reference: str | NotGiven = NOT_GIVEN, + originator_address_line1: str | NotGiven = NOT_GIVEN, + originator_address_line2: str | NotGiven = NOT_GIVEN, + originator_address_line3: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + originator_routing_number: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, + originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Simulates an inbound Wire Transfer to your account. + + Args: + account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. + + amount: The transfer amount in cents. Must be positive. + + beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can + simulate any value here. + + beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can + simulate any value here. + + beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can + simulate any value here. + + beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + value here. + + beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + any value here. + + originator_address_line1: The sending bank will set originator_address_line1 in production. You can + simulate any value here. + + originator_address_line2: The sending bank will set originator_address_line2 in production. You can + simulate any value here. + + originator_address_line3: The sending bank will set originator_address_line3 in production. You can + simulate any value here. + + originator_name: The sending bank will set originator_name in production. You can simulate any + value here. + + originator_routing_number: The sending bank will set originator_routing_number in production. You can + simulate any value here. + + originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in + production. You can simulate any value here. + + originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in + production. You can simulate any value here. + + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_wire_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "beneficiary_address_line1": beneficiary_address_line1, + "beneficiary_address_line2": beneficiary_address_line2, + "beneficiary_address_line3": beneficiary_address_line3, + "beneficiary_name": beneficiary_name, + "beneficiary_reference": beneficiary_reference, + "originator_address_line1": originator_address_line1, + "originator_address_line2": originator_address_line2, + "originator_address_line3": originator_address_line3, + "originator_name": originator_name, + "originator_routing_number": originator_routing_number, + "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, + "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, + "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, + "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, + }, + inbound_wire_transfer_create_params.InboundWireTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + + +class InboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = to_raw_response_wrapper( + inbound_wire_transfers.create, + ) + + +class AsyncInboundWireTransfersResourceWithRawResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = async_to_raw_response_wrapper( + inbound_wire_transfers.create, + ) + + +class InboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = to_streamed_response_wrapper( + inbound_wire_transfers.create, + ) + + +class AsyncInboundWireTransfersResourceWithStreamingResponse: + def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> None: + self._inbound_wire_transfers = inbound_wire_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_wire_transfers.create, + ) diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index b7bd0a17f..b129e1563 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -7,7 +7,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -15,22 +14,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.simulations import interest_payment_create_params from ...types.transaction import Transaction -__all__ = ["InterestPayments", "AsyncInterestPayments"] +__all__ = ["InterestPaymentsResource", "AsyncInterestPaymentsResource"] -class InterestPayments(SyncAPIResource): +class InterestPaymentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InterestPaymentsWithRawResponse: - return InterestPaymentsWithRawResponse(self) + def with_raw_response(self) -> InterestPaymentsResourceWithRawResponse: + return InterestPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InterestPaymentsWithStreamingResponse: - return InterestPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> InterestPaymentsResourceWithStreamingResponse: + return InterestPaymentsResourceWithStreamingResponse(self) def create( self, @@ -72,7 +76,7 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ return self._post( - "/simulations/interest_payment", + "/simulations/interest_payments", body=maybe_transform( { "account_id": account_id, @@ -93,14 +97,14 @@ def create( ) -class AsyncInterestPayments(AsyncAPIResource): +class AsyncInterestPaymentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInterestPaymentsWithRawResponse: - return AsyncInterestPaymentsWithRawResponse(self) + def with_raw_response(self) -> AsyncInterestPaymentsResourceWithRawResponse: + return AsyncInterestPaymentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInterestPaymentsWithStreamingResponse: - return AsyncInterestPaymentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + return AsyncInterestPaymentsResourceWithStreamingResponse(self) async def create( self, @@ -142,7 +146,7 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ return await self._post( - "/simulations/interest_payment", + "/simulations/interest_payments", body=await async_maybe_transform( { "account_id": account_id, @@ -163,26 +167,26 @@ async def create( ) -class InterestPaymentsWithRawResponse: - def __init__(self, interest_payments: InterestPayments) -> None: +class InterestPaymentsResourceWithRawResponse: + def __init__(self, interest_payments: InterestPaymentsResource) -> None: self._interest_payments = interest_payments - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( interest_payments.create, ) -class AsyncInterestPaymentsWithRawResponse: - def __init__(self, interest_payments: AsyncInterestPayments) -> None: +class AsyncInterestPaymentsResourceWithRawResponse: + def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: self._interest_payments = interest_payments - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( interest_payments.create, ) -class InterestPaymentsWithStreamingResponse: - def __init__(self, interest_payments: InterestPayments) -> None: +class InterestPaymentsResourceWithStreamingResponse: + def __init__(self, interest_payments: InterestPaymentsResource) -> None: self._interest_payments = interest_payments self.create = to_streamed_response_wrapper( @@ -190,8 +194,8 @@ def __init__(self, interest_payments: InterestPayments) -> None: ) -class AsyncInterestPaymentsWithStreamingResponse: - def __init__(self, interest_payments: AsyncInterestPayments) -> None: +class AsyncInterestPaymentsResourceWithStreamingResponse: + def __init__(self, interest_payments: AsyncInterestPaymentsResource) -> None: self._interest_payments = interest_payments self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 02c7f6459..a3eac10ff 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -6,7 +6,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -14,24 +13,29 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import physical_card_shipment_advance_params +from ...types.simulations import physical_card_advance_shipment_params from ...types.physical_card import PhysicalCard -__all__ = ["PhysicalCards", "AsyncPhysicalCards"] +__all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] -class PhysicalCards(SyncAPIResource): +class PhysicalCardsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self) - def shipment_advance( + def advance_shipment( self, physical_card_id: str, *, @@ -79,10 +83,10 @@ def shipment_advance( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._post( - f"/simulations/physical_cards/{physical_card_id}/shipment_advance", + f"/simulations/physical_cards/{physical_card_id}/advance_shipment", body=maybe_transform( {"shipment_status": shipment_status}, - physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, + physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), options=make_request_options( extra_headers=extra_headers, @@ -95,16 +99,16 @@ def shipment_advance( ) -class AsyncPhysicalCards(AsyncAPIResource): +class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self) + def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self) - async def shipment_advance( + async def advance_shipment( self, physical_card_id: str, *, @@ -152,10 +156,10 @@ async def shipment_advance( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._post( - f"/simulations/physical_cards/{physical_card_id}/shipment_advance", + f"/simulations/physical_cards/{physical_card_id}/advance_shipment", body=await async_maybe_transform( {"shipment_status": shipment_status}, - physical_card_shipment_advance_params.PhysicalCardShipmentAdvanceParams, + physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), options=make_request_options( extra_headers=extra_headers, @@ -168,37 +172,37 @@ async def shipment_advance( ) -class PhysicalCardsWithRawResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = _legacy_response.to_raw_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = to_raw_response_wrapper( + physical_cards.advance_shipment, ) -class AsyncPhysicalCardsWithRawResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithRawResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = _legacy_response.async_to_raw_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = async_to_raw_response_wrapper( + physical_cards.advance_shipment, ) -class PhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: PhysicalCards) -> None: +class PhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = to_streamed_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = to_streamed_response_wrapper( + physical_cards.advance_shipment, ) -class AsyncPhysicalCardsWithStreamingResponse: - def __init__(self, physical_cards: AsyncPhysicalCards) -> None: +class AsyncPhysicalCardsResourceWithStreamingResponse: + def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards - self.shipment_advance = async_to_streamed_response_wrapper( - physical_cards.shipment_advance, + self.advance_shipment = async_to_streamed_response_wrapper( + physical_cards.advance_shipment, ) diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index f5877f8bd..ee78aebbe 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,22 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options from ...types.program import Program from ...types.simulations import program_create_params -__all__ = ["Programs", "AsyncPrograms"] +__all__ = ["ProgramsResource", "AsyncProgramsResource"] -class Programs(SyncAPIResource): +class ProgramsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self) + def with_raw_response(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self) def create( self, @@ -74,14 +78,14 @@ def create( ) -class AsyncPrograms(AsyncAPIResource): +class AsyncProgramsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self) + def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self) async def create( self, @@ -128,26 +132,26 @@ async def create( ) -class ProgramsWithRawResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithRawResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( programs.create, ) -class AsyncProgramsWithRawResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithRawResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( programs.create, ) -class ProgramsWithStreamingResponse: - def __init__(self, programs: Programs) -> None: +class ProgramsResourceWithStreamingResponse: + def __init__(self, programs: ProgramsResource) -> None: self._programs = programs self.create = to_streamed_response_wrapper( @@ -155,8 +159,8 @@ def __init__(self, programs: Programs) -> None: ) -class AsyncProgramsWithStreamingResponse: - def __init__(self, programs: AsyncPrograms) -> None: +class AsyncProgramsResourceWithStreamingResponse: + def __init__(self, programs: AsyncProgramsResource) -> None: self._programs = programs self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 4759f543c..9df107fe3 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -4,7 +4,6 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven from ..._utils import ( maybe_transform, @@ -12,28 +11,27 @@ ) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ..._base_client import make_request_options -from ...types.simulations import ( - real_time_payments_transfer_complete_params, - real_time_payments_transfer_create_inbound_params, +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, ) +from ..._base_client import make_request_options +from ...types.simulations import real_time_payments_transfer_complete_params from ...types.real_time_payments_transfer import RealTimePaymentsTransfer -from ...types.simulations.inbound_real_time_payments_transfer_simulation_result import ( - InboundRealTimePaymentsTransferSimulationResult, -) -__all__ = ["RealTimePaymentsTransfers", "AsyncRealTimePaymentsTransfers"] +__all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] -class RealTimePaymentsTransfers(SyncAPIResource): +class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def complete( self, @@ -88,88 +86,15 @@ def complete( cast_to=RealTimePaymentsTransfer, ) - def create_inbound( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferSimulationResult: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_real_time_payments_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferSimulationResult, - ) - - -class AsyncRealTimePaymentsTransfers(AsyncAPIResource): +class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def complete( self, @@ -224,123 +149,38 @@ async def complete( cast_to=RealTimePaymentsTransfer, ) - async def create_inbound( - self, - *, - account_number_id: str, - amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferSimulationResult: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. - - Args: - account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is - for. - - amount: The transfer amount in USD cents. Must be positive. - - debtor_account_number: The account number of the account that sent the transfer. - - debtor_name: The name provided by the sender of the transfer. - - debtor_routing_number: The routing number of the account that sent the transfer. - - remittance_information: Additional information included with the transfer. - - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_real_time_payments_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "debtor_account_number": debtor_account_number, - "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, - "request_for_payment_id": request_for_payment_id, - }, - real_time_payments_transfer_create_inbound_params.RealTimePaymentsTransferCreateInboundParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundRealTimePaymentsTransferSimulationResult, - ) - -class RealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = _legacy_response.to_raw_response_wrapper( + self.complete = to_raw_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = _legacy_response.to_raw_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class AsyncRealTimePaymentsTransfersWithRawResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers - self.complete = _legacy_response.async_to_raw_response_wrapper( + self.complete = async_to_raw_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class RealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfers) -> None: +class RealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = to_streamed_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = to_streamed_response_wrapper( - real_time_payments_transfers.create_inbound, - ) -class AsyncRealTimePaymentsTransfersWithStreamingResponse: - def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfers) -> None: +class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersResource) -> None: self._real_time_payments_transfers = real_time_payments_transfers self.complete = async_to_streamed_response_wrapper( real_time_payments_transfers.complete, ) - self.create_inbound = async_to_streamed_response_wrapper( - real_time_payments_transfers.create_inbound, - ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index cbf003d01..0da1a353d 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -2,1154 +2,903 @@ from __future__ import annotations -import httpx - -from ... import _legacy_response -from .cards import ( - Cards, - AsyncCards, - CardsWithRawResponse, - AsyncCardsWithRawResponse, - CardsWithStreamingResponse, - AsyncCardsWithStreamingResponse, -) -from ...types import ( - simulation_card_reversals_params, - simulation_card_increments_params, - simulation_card_fuel_confirmations_params, - simulation_card_authorization_expirations_params, -) -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from .programs import ( - Programs, - AsyncPrograms, - ProgramsWithRawResponse, - AsyncProgramsWithRawResponse, - ProgramsWithStreamingResponse, - AsyncProgramsWithStreamingResponse, + ProgramsResource, + AsyncProgramsResource, + ProgramsResourceWithRawResponse, + AsyncProgramsResourceWithRawResponse, + ProgramsResourceWithStreamingResponse, + AsyncProgramsResourceWithStreamingResponse, ) from ..._compat import cached_property from .documents import ( - Documents, - AsyncDocuments, - DocumentsWithRawResponse, - AsyncDocumentsWithRawResponse, - DocumentsWithStreamingResponse, - AsyncDocumentsWithStreamingResponse, + DocumentsResource, + AsyncDocumentsResource, + DocumentsResourceWithRawResponse, + AsyncDocumentsResourceWithRawResponse, + DocumentsResourceWithStreamingResponse, + AsyncDocumentsResourceWithStreamingResponse, ) from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper from .card_refunds import ( - CardRefunds, - AsyncCardRefunds, - CardRefundsWithRawResponse, - AsyncCardRefundsWithRawResponse, - CardRefundsWithStreamingResponse, - AsyncCardRefundsWithStreamingResponse, + CardRefundsResource, + AsyncCardRefundsResource, + CardRefundsResourceWithRawResponse, + AsyncCardRefundsResourceWithRawResponse, + CardRefundsResourceWithStreamingResponse, + AsyncCardRefundsResourceWithStreamingResponse, ) from .ach_transfers import ( - ACHTransfers, - AsyncACHTransfers, - ACHTransfersWithRawResponse, - AsyncACHTransfersWithRawResponse, - ACHTransfersWithStreamingResponse, - AsyncACHTransfersWithStreamingResponse, + ACHTransfersResource, + AsyncACHTransfersResource, + ACHTransfersResourceWithRawResponse, + AsyncACHTransfersResourceWithRawResponse, + ACHTransfersResourceWithStreamingResponse, + AsyncACHTransfersResourceWithStreamingResponse, ) from .card_disputes import ( - CardDisputes, - AsyncCardDisputes, - CardDisputesWithRawResponse, - AsyncCardDisputesWithRawResponse, - CardDisputesWithStreamingResponse, - AsyncCardDisputesWithStreamingResponse, + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) +from .card_reversals import ( + CardReversalsResource, + AsyncCardReversalsResource, + CardReversalsResourceWithRawResponse, + AsyncCardReversalsResourceWithRawResponse, + CardReversalsResourceWithStreamingResponse, + AsyncCardReversalsResourceWithStreamingResponse, ) -from ..._base_client import make_request_options from .check_deposits import ( - CheckDeposits, - AsyncCheckDeposits, - CheckDepositsWithRawResponse, - AsyncCheckDepositsWithRawResponse, - CheckDepositsWithStreamingResponse, - AsyncCheckDepositsWithStreamingResponse, + CheckDepositsResource, + AsyncCheckDepositsResource, + CheckDepositsResourceWithRawResponse, + AsyncCheckDepositsResourceWithRawResponse, + CheckDepositsResourceWithStreamingResponse, + AsyncCheckDepositsResourceWithStreamingResponse, ) from .physical_cards import ( - PhysicalCards, - AsyncPhysicalCards, - PhysicalCardsWithRawResponse, - AsyncPhysicalCardsWithRawResponse, - PhysicalCardsWithStreamingResponse, - AsyncPhysicalCardsWithStreamingResponse, + PhysicalCardsResource, + AsyncPhysicalCardsResource, + PhysicalCardsResourceWithRawResponse, + AsyncPhysicalCardsResourceWithRawResponse, + PhysicalCardsResourceWithStreamingResponse, + AsyncPhysicalCardsResourceWithStreamingResponse, ) from .wire_transfers import ( - WireTransfers, - AsyncWireTransfers, - WireTransfersWithRawResponse, - AsyncWireTransfersWithRawResponse, - WireTransfersWithStreamingResponse, - AsyncWireTransfersWithStreamingResponse, + WireTransfersResource, + AsyncWireTransfersResource, + WireTransfersResourceWithRawResponse, + AsyncWireTransfersResourceWithRawResponse, + WireTransfersResourceWithStreamingResponse, + AsyncWireTransfersResourceWithStreamingResponse, +) +from .card_increments import ( + CardIncrementsResource, + AsyncCardIncrementsResource, + CardIncrementsResourceWithRawResponse, + AsyncCardIncrementsResourceWithRawResponse, + CardIncrementsResourceWithStreamingResponse, + AsyncCardIncrementsResourceWithStreamingResponse, ) from .check_transfers import ( - CheckTransfers, - AsyncCheckTransfers, - CheckTransfersWithRawResponse, - AsyncCheckTransfersWithRawResponse, - CheckTransfersWithStreamingResponse, - AsyncCheckTransfersWithStreamingResponse, + CheckTransfersResource, + AsyncCheckTransfersResource, + CheckTransfersResourceWithRawResponse, + AsyncCheckTransfersResourceWithRawResponse, + CheckTransfersResourceWithStreamingResponse, + AsyncCheckTransfersResourceWithStreamingResponse, +) +from .card_settlements import ( + CardSettlementsResource, + AsyncCardSettlementsResource, + CardSettlementsResourceWithRawResponse, + AsyncCardSettlementsResourceWithRawResponse, + CardSettlementsResourceWithStreamingResponse, + AsyncCardSettlementsResourceWithStreamingResponse, ) from .account_transfers import ( - AccountTransfers, - AsyncAccountTransfers, - AccountTransfersWithRawResponse, - AsyncAccountTransfersWithRawResponse, - AccountTransfersWithStreamingResponse, - AsyncAccountTransfersWithStreamingResponse, + AccountTransfersResource, + AsyncAccountTransfersResource, + AccountTransfersResourceWithRawResponse, + AsyncAccountTransfersResourceWithRawResponse, + AccountTransfersResourceWithStreamingResponse, + AsyncAccountTransfersResourceWithStreamingResponse, ) from .interest_payments import ( - InterestPayments, - AsyncInterestPayments, - InterestPaymentsWithRawResponse, - AsyncInterestPaymentsWithRawResponse, - InterestPaymentsWithStreamingResponse, - AsyncInterestPaymentsWithStreamingResponse, + InterestPaymentsResource, + AsyncInterestPaymentsResource, + InterestPaymentsResourceWithRawResponse, + AsyncInterestPaymentsResourceWithRawResponse, + InterestPaymentsResourceWithStreamingResponse, + AsyncInterestPaymentsResourceWithStreamingResponse, ) from .account_statements import ( - AccountStatements, - AsyncAccountStatements, - AccountStatementsWithRawResponse, - AsyncAccountStatementsWithRawResponse, - AccountStatementsWithStreamingResponse, - AsyncAccountStatementsWithStreamingResponse, + AccountStatementsResource, + AsyncAccountStatementsResource, + AccountStatementsResourceWithRawResponse, + AsyncAccountStatementsResourceWithRawResponse, + AccountStatementsResourceWithStreamingResponse, + AsyncAccountStatementsResourceWithStreamingResponse, +) +from .card_authorizations import ( + CardAuthorizationsResource, + AsyncCardAuthorizationsResource, + CardAuthorizationsResourceWithRawResponse, + AsyncCardAuthorizationsResourceWithRawResponse, + CardAuthorizationsResourceWithStreamingResponse, + AsyncCardAuthorizationsResourceWithStreamingResponse, ) from .inbound_funds_holds import ( - InboundFundsHolds, - AsyncInboundFundsHolds, - InboundFundsHoldsWithRawResponse, - AsyncInboundFundsHoldsWithRawResponse, - InboundFundsHoldsWithStreamingResponse, - AsyncInboundFundsHoldsWithStreamingResponse, + InboundFundsHoldsResource, + AsyncInboundFundsHoldsResource, + InboundFundsHoldsResourceWithRawResponse, + AsyncInboundFundsHoldsResourceWithRawResponse, + InboundFundsHoldsResourceWithStreamingResponse, + AsyncInboundFundsHoldsResourceWithStreamingResponse, +) +from .inbound_ach_transfers import ( + InboundACHTransfersResource, + AsyncInboundACHTransfersResource, + InboundACHTransfersResourceWithRawResponse, + AsyncInboundACHTransfersResourceWithRawResponse, + InboundACHTransfersResourceWithStreamingResponse, + AsyncInboundACHTransfersResourceWithStreamingResponse, ) -from ...types.card_payment import CardPayment from .inbound_check_deposits import ( - InboundCheckDeposits, - AsyncInboundCheckDeposits, - InboundCheckDepositsWithRawResponse, - AsyncInboundCheckDepositsWithRawResponse, - InboundCheckDepositsWithStreamingResponse, - AsyncInboundCheckDepositsWithStreamingResponse, + InboundCheckDepositsResource, + AsyncInboundCheckDepositsResource, + InboundCheckDepositsResourceWithRawResponse, + AsyncInboundCheckDepositsResourceWithRawResponse, + InboundCheckDepositsResourceWithStreamingResponse, + AsyncInboundCheckDepositsResourceWithStreamingResponse, +) +from .inbound_wire_transfers import ( + InboundWireTransfersResource, + AsyncInboundWireTransfersResource, + InboundWireTransfersResourceWithRawResponse, + AsyncInboundWireTransfersResourceWithRawResponse, + InboundWireTransfersResourceWithStreamingResponse, + AsyncInboundWireTransfersResourceWithStreamingResponse, +) +from .card_fuel_confirmations import ( + CardFuelConfirmationsResource, + AsyncCardFuelConfirmationsResource, + CardFuelConfirmationsResourceWithRawResponse, + AsyncCardFuelConfirmationsResourceWithRawResponse, + CardFuelConfirmationsResourceWithStreamingResponse, + AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) from .real_time_payments_transfers import ( - RealTimePaymentsTransfers, - AsyncRealTimePaymentsTransfers, - RealTimePaymentsTransfersWithRawResponse, - AsyncRealTimePaymentsTransfersWithRawResponse, - RealTimePaymentsTransfersWithStreamingResponse, - AsyncRealTimePaymentsTransfersWithStreamingResponse, + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + RealTimePaymentsTransfersResourceWithRawResponse, + AsyncRealTimePaymentsTransfersResourceWithRawResponse, + RealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncRealTimePaymentsTransfersResourceWithStreamingResponse, ) from .digital_wallet_token_requests import ( - DigitalWalletTokenRequests, - AsyncDigitalWalletTokenRequests, - DigitalWalletTokenRequestsWithRawResponse, - AsyncDigitalWalletTokenRequestsWithRawResponse, - DigitalWalletTokenRequestsWithStreamingResponse, - AsyncDigitalWalletTokenRequestsWithStreamingResponse, + DigitalWalletTokenRequestsResource, + AsyncDigitalWalletTokenRequestsResource, + DigitalWalletTokenRequestsResourceWithRawResponse, + AsyncDigitalWalletTokenRequestsResourceWithRawResponse, + DigitalWalletTokenRequestsResourceWithStreamingResponse, + AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse, +) +from .card_authorization_expirations import ( + CardAuthorizationExpirationsResource, + AsyncCardAuthorizationExpirationsResource, + CardAuthorizationExpirationsResourceWithRawResponse, + AsyncCardAuthorizationExpirationsResourceWithRawResponse, + CardAuthorizationExpirationsResourceWithStreamingResponse, + AsyncCardAuthorizationExpirationsResourceWithStreamingResponse, ) from .inbound_wire_drawdown_requests import ( - InboundWireDrawdownRequests, - AsyncInboundWireDrawdownRequests, - InboundWireDrawdownRequestsWithRawResponse, - AsyncInboundWireDrawdownRequestsWithRawResponse, - InboundWireDrawdownRequestsWithStreamingResponse, - AsyncInboundWireDrawdownRequestsWithStreamingResponse, + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + InboundWireDrawdownRequestsResourceWithRawResponse, + AsyncInboundWireDrawdownRequestsResourceWithRawResponse, + InboundWireDrawdownRequestsResourceWithStreamingResponse, + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfers, - AsyncInboundInternationalACHTransfers, - InboundInternationalACHTransfersWithRawResponse, - AsyncInboundInternationalACHTransfersWithRawResponse, - InboundInternationalACHTransfersWithStreamingResponse, - AsyncInboundInternationalACHTransfersWithStreamingResponse, +from .inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + InboundRealTimePaymentsTransfersResourceWithRawResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) -__all__ = ["Simulations", "AsyncSimulations"] +__all__ = ["SimulationsResource", "AsyncSimulationsResource"] -class Simulations(SyncAPIResource): +class SimulationsResource(SyncAPIResource): @cached_property - def account_transfers(self) -> AccountTransfers: - return AccountTransfers(self._client) + def account_transfers(self) -> AccountTransfersResource: + return AccountTransfersResource(self._client) @cached_property - def account_statements(self) -> AccountStatements: - return AccountStatements(self._client) + def inbound_ach_transfers(self) -> InboundACHTransfersResource: + return InboundACHTransfersResource(self._client) @cached_property - def ach_transfers(self) -> ACHTransfers: - return ACHTransfers(self._client) + def ach_transfers(self) -> ACHTransfersResource: + return ACHTransfersResource(self._client) @cached_property - def card_disputes(self) -> CardDisputes: - return CardDisputes(self._client) + def check_transfers(self) -> CheckTransfersResource: + return CheckTransfersResource(self._client) @cached_property - def card_refunds(self) -> CardRefunds: - return CardRefunds(self._client) + def inbound_check_deposits(self) -> InboundCheckDepositsResource: + return InboundCheckDepositsResource(self._client) @cached_property - def check_transfers(self) -> CheckTransfers: - return CheckTransfers(self._client) + def check_deposits(self) -> CheckDepositsResource: + return CheckDepositsResource(self._client) @cached_property - def documents(self) -> Documents: - return Documents(self._client) + def inbound_wire_transfers(self) -> InboundWireTransfersResource: + return InboundWireTransfersResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequests: - return DigitalWalletTokenRequests(self._client) + def wire_transfers(self) -> WireTransfersResource: + return WireTransfersResource(self._client) @cached_property - def check_deposits(self) -> CheckDeposits: - return CheckDeposits(self._client) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: + return InboundWireDrawdownRequestsResource(self._client) @cached_property - def programs(self) -> Programs: - return Programs(self._client) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: + return InboundRealTimePaymentsTransfersResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequests: - return InboundWireDrawdownRequests(self._client) + def inbound_funds_holds(self) -> InboundFundsHoldsResource: + return InboundFundsHoldsResource(self._client) @cached_property - def inbound_funds_holds(self) -> InboundFundsHolds: - return InboundFundsHolds(self._client) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: + return RealTimePaymentsTransfersResource(self._client) @cached_property - def interest_payments(self) -> InterestPayments: - return InterestPayments(self._client) + def card_authorizations(self) -> CardAuthorizationsResource: + return CardAuthorizationsResource(self._client) @cached_property - def wire_transfers(self) -> WireTransfers: - return WireTransfers(self._client) + def card_settlements(self) -> CardSettlementsResource: + return CardSettlementsResource(self._client) @cached_property - def cards(self) -> Cards: - return Cards(self._client) + def card_reversals(self) -> CardReversalsResource: + return CardReversalsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfers: - return RealTimePaymentsTransfers(self._client) + def card_increments(self) -> CardIncrementsResource: + return CardIncrementsResource(self._client) @cached_property - def physical_cards(self) -> PhysicalCards: - return PhysicalCards(self._client) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: + return CardAuthorizationExpirationsResource(self._client) @cached_property - def inbound_check_deposits(self) -> InboundCheckDeposits: - return InboundCheckDeposits(self._client) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: + return CardFuelConfirmationsResource(self._client) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfers: - return InboundInternationalACHTransfers(self._client) + def card_refunds(self) -> CardRefundsResource: + return CardRefundsResource(self._client) @cached_property - def with_raw_response(self) -> SimulationsWithRawResponse: - return SimulationsWithRawResponse(self) + def card_disputes(self) -> CardDisputesResource: + return CardDisputesResource(self._client) @cached_property - def with_streaming_response(self) -> SimulationsWithStreamingResponse: - return SimulationsWithStreamingResponse(self) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: + return DigitalWalletTokenRequestsResource(self._client) - def card_authorization_expirations( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_authorization_expirations", - body=maybe_transform( - {"card_payment_id": card_payment_id}, - simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def physical_cards(self) -> PhysicalCardsResource: + return PhysicalCardsResource(self._client) - def card_fuel_confirmations( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_fuel_confirmations", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def interest_payments(self) -> InterestPaymentsResource: + return InterestPaymentsResource(self._client) - def card_increments( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_increments", - body=maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - simulation_card_increments_params.SimulationCardIncrementsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def account_statements(self) -> AccountStatementsResource: + return AccountStatementsResource(self._client) - def card_reversals( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/card_reversals", - body=maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - simulation_card_reversals_params.SimulationCardReversalsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def documents(self) -> DocumentsResource: + return DocumentsResource(self._client) + @cached_property + def programs(self) -> ProgramsResource: + return ProgramsResource(self._client) -class AsyncSimulations(AsyncAPIResource): @cached_property - def account_transfers(self) -> AsyncAccountTransfers: - return AsyncAccountTransfers(self._client) + def with_raw_response(self) -> SimulationsResourceWithRawResponse: + return SimulationsResourceWithRawResponse(self) @cached_property - def account_statements(self) -> AsyncAccountStatements: - return AsyncAccountStatements(self._client) + def with_streaming_response(self) -> SimulationsResourceWithStreamingResponse: + return SimulationsResourceWithStreamingResponse(self) + +class AsyncSimulationsResource(AsyncAPIResource): @cached_property - def ach_transfers(self) -> AsyncACHTransfers: - return AsyncACHTransfers(self._client) + def account_transfers(self) -> AsyncAccountTransfersResource: + return AsyncAccountTransfersResource(self._client) @cached_property - def card_disputes(self) -> AsyncCardDisputes: - return AsyncCardDisputes(self._client) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: + return AsyncInboundACHTransfersResource(self._client) @cached_property - def card_refunds(self) -> AsyncCardRefunds: - return AsyncCardRefunds(self._client) + def ach_transfers(self) -> AsyncACHTransfersResource: + return AsyncACHTransfersResource(self._client) @cached_property - def check_transfers(self) -> AsyncCheckTransfers: - return AsyncCheckTransfers(self._client) + def check_transfers(self) -> AsyncCheckTransfersResource: + return AsyncCheckTransfersResource(self._client) @cached_property - def documents(self) -> AsyncDocuments: - return AsyncDocuments(self._client) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: + return AsyncInboundCheckDepositsResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequests: - return AsyncDigitalWalletTokenRequests(self._client) + def check_deposits(self) -> AsyncCheckDepositsResource: + return AsyncCheckDepositsResource(self._client) @cached_property - def check_deposits(self) -> AsyncCheckDeposits: - return AsyncCheckDeposits(self._client) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: + return AsyncInboundWireTransfersResource(self._client) @cached_property - def programs(self) -> AsyncPrograms: - return AsyncPrograms(self._client) + def wire_transfers(self) -> AsyncWireTransfersResource: + return AsyncWireTransfersResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequests: - return AsyncInboundWireDrawdownRequests(self._client) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: + return AsyncInboundWireDrawdownRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHolds: - return AsyncInboundFundsHolds(self._client) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: + return AsyncInboundRealTimePaymentsTransfersResource(self._client) @cached_property - def interest_payments(self) -> AsyncInterestPayments: - return AsyncInterestPayments(self._client) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: + return AsyncInboundFundsHoldsResource(self._client) @cached_property - def wire_transfers(self) -> AsyncWireTransfers: - return AsyncWireTransfers(self._client) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: + return AsyncRealTimePaymentsTransfersResource(self._client) @cached_property - def cards(self) -> AsyncCards: - return AsyncCards(self._client) + def card_authorizations(self) -> AsyncCardAuthorizationsResource: + return AsyncCardAuthorizationsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfers: - return AsyncRealTimePaymentsTransfers(self._client) + def card_settlements(self) -> AsyncCardSettlementsResource: + return AsyncCardSettlementsResource(self._client) @cached_property - def physical_cards(self) -> AsyncPhysicalCards: - return AsyncPhysicalCards(self._client) + def card_reversals(self) -> AsyncCardReversalsResource: + return AsyncCardReversalsResource(self._client) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDeposits: - return AsyncInboundCheckDeposits(self._client) + def card_increments(self) -> AsyncCardIncrementsResource: + return AsyncCardIncrementsResource(self._client) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfers: - return AsyncInboundInternationalACHTransfers(self._client) + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: + return AsyncCardAuthorizationExpirationsResource(self._client) @cached_property - def with_raw_response(self) -> AsyncSimulationsWithRawResponse: - return AsyncSimulationsWithRawResponse(self) + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: + return AsyncCardFuelConfirmationsResource(self._client) @cached_property - def with_streaming_response(self) -> AsyncSimulationsWithStreamingResponse: - return AsyncSimulationsWithStreamingResponse(self) + def card_refunds(self) -> AsyncCardRefundsResource: + return AsyncCardRefundsResource(self._client) - async def card_authorization_expirations( - self, - *, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """ - Simulates expiring a card authorization immediately. - - Args: - card_payment_id: The identifier of the Card Payment to expire. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_authorization_expirations", - body=await async_maybe_transform( - {"card_payment_id": card_payment_id}, - simulation_card_authorization_expirations_params.SimulationCardAuthorizationExpirationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResource: + return AsyncCardDisputesResource(self._client) - async def card_fuel_confirmations( - self, - *, - amount: int, - card_payment_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the fuel confirmation of an authorization by a card acquirer. - - This - happens asynchronously right after a fuel pump transaction is completed. A fuel - confirmation can only happen once per authorization. - - Args: - amount: The amount of the fuel_confirmation in minor units in the card authorization's - currency. - - card_payment_id: The identifier of the Card Payment to create a fuel_confirmation on. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_fuel_confirmations", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - }, - simulation_card_fuel_confirmations_params.SimulationCardFuelConfirmationsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResource: + return AsyncDigitalWalletTokenRequestsResource(self._client) - async def card_increments( - self, - *, - amount: int, - card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the increment of an authorization by a card acquirer. - - An authorization - can be incremented multiple times. - - Args: - amount: The amount of the increment in minor units in the card authorization's currency. - - card_payment_id: The identifier of the Card Payment to create a increment on. - - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the - default real time event subscription. Because you can only create one real time - decision event subscription, you can use this field to route events to any - specified event subscription for testing purposes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_increments", - body=await async_maybe_transform( - { - "amount": amount, - "card_payment_id": card_payment_id, - "event_subscription_id": event_subscription_id, - }, - simulation_card_increments_params.SimulationCardIncrementsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResource: + return AsyncPhysicalCardsResource(self._client) - async def card_reversals( - self, - *, - card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardPayment: - """Simulates the reversal of an authorization by a card acquirer. - - An authorization - can be partially reversed multiple times, up until the total authorized amount. - Marks the pending transaction as complete if the authorization is fully - reversed. - - Args: - card_payment_id: The identifier of the Card Payment to create a reversal on. - - amount: The amount of the reversal in minor units in the card authorization's currency. - This defaults to the authorization amount. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/card_reversals", - body=await async_maybe_transform( - { - "card_payment_id": card_payment_id, - "amount": amount, - }, - simulation_card_reversals_params.SimulationCardReversalsParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardPayment, - ) + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResource: + return AsyncInterestPaymentsResource(self._client) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResource: + return AsyncAccountStatementsResource(self._client) + + @cached_property + def documents(self) -> AsyncDocumentsResource: + return AsyncDocumentsResource(self._client) + + @cached_property + def programs(self) -> AsyncProgramsResource: + return AsyncProgramsResource(self._client) + + @cached_property + def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: + return AsyncSimulationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSimulationsResourceWithStreamingResponse: + return AsyncSimulationsResourceWithStreamingResponse(self) -class SimulationsWithRawResponse: - def __init__(self, simulations: Simulations) -> None: +class SimulationsResourceWithRawResponse: + def __init__(self, simulations: SimulationsResource) -> None: self._simulations = simulations - self.card_authorization_expirations = _legacy_response.to_raw_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = _legacy_response.to_raw_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = _legacy_response.to_raw_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = _legacy_response.to_raw_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def account_transfers(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def account_transfers(self) -> AccountTransfersWithRawResponse: - return AccountTransfersWithRawResponse(self._simulations.account_transfers) + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) @cached_property - def account_statements(self) -> AccountStatementsWithRawResponse: - return AccountStatementsWithRawResponse(self._simulations.account_statements) + def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def ach_transfers(self) -> ACHTransfersWithRawResponse: - return ACHTransfersWithRawResponse(self._simulations.ach_transfers) + def check_transfers(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def card_disputes(self) -> CardDisputesWithRawResponse: - return CardDisputesWithRawResponse(self._simulations.card_disputes) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def card_refunds(self) -> CardRefundsWithRawResponse: - return CardRefundsWithRawResponse(self._simulations.card_refunds) + def check_deposits(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def check_transfers(self) -> CheckTransfersWithRawResponse: - return CheckTransfersWithRawResponse(self._simulations.check_transfers) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def documents(self) -> DocumentsWithRawResponse: - return DocumentsWithRawResponse(self._simulations.documents) + def wire_transfers(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithRawResponse: - return DigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def check_deposits(self) -> CheckDepositsWithRawResponse: - return CheckDepositsWithRawResponse(self._simulations.check_deposits) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def programs(self) -> ProgramsWithRawResponse: - return ProgramsWithRawResponse(self._simulations.programs) + def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: + return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithRawResponse: - return InboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsWithRawResponse: - return InboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) + def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: + return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def interest_payments(self) -> InterestPaymentsWithRawResponse: - return InterestPaymentsWithRawResponse(self._simulations.interest_payments) + def card_settlements(self) -> CardSettlementsResourceWithRawResponse: + return CardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @cached_property - def wire_transfers(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self._simulations.wire_transfers) + def card_reversals(self) -> CardReversalsResourceWithRawResponse: + return CardReversalsResourceWithRawResponse(self._simulations.card_reversals) @cached_property - def cards(self) -> CardsWithRawResponse: - return CardsWithRawResponse(self._simulations.cards) + def card_increments(self) -> CardIncrementsResourceWithRawResponse: + return CardIncrementsResourceWithRawResponse(self._simulations.card_increments) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithRawResponse: - return RealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) @cached_property - def physical_cards(self) -> PhysicalCardsWithRawResponse: - return PhysicalCardsWithRawResponse(self._simulations.physical_cards) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawResponse: + return CardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsWithRawResponse: - return InboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + def card_refunds(self) -> CardRefundsResourceWithRawResponse: + return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithRawResponse: - return InboundInternationalACHTransfersWithRawResponse(self._simulations.inbound_international_ach_transfers) + def card_disputes(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) -class AsyncSimulationsWithRawResponse: - def __init__(self, simulations: AsyncSimulations) -> None: - self._simulations = simulations + @cached_property + def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) - self.card_authorization_expirations = _legacy_response.async_to_raw_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = _legacy_response.async_to_raw_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = _legacy_response.async_to_raw_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = _legacy_response.async_to_raw_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: + return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AccountStatementsResourceWithRawResponse: + return AccountStatementsResourceWithRawResponse(self._simulations.account_statements) @cached_property - def account_transfers(self) -> AsyncAccountTransfersWithRawResponse: - return AsyncAccountTransfersWithRawResponse(self._simulations.account_transfers) + def documents(self) -> DocumentsResourceWithRawResponse: + return DocumentsResourceWithRawResponse(self._simulations.documents) @cached_property - def account_statements(self) -> AsyncAccountStatementsWithRawResponse: - return AsyncAccountStatementsWithRawResponse(self._simulations.account_statements) + def programs(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self._simulations.programs) + + +class AsyncSimulationsResourceWithRawResponse: + def __init__(self, simulations: AsyncSimulationsResource) -> None: + self._simulations = simulations @cached_property - def ach_transfers(self) -> AsyncACHTransfersWithRawResponse: - return AsyncACHTransfersWithRawResponse(self._simulations.ach_transfers) + def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def card_disputes(self) -> AsyncCardDisputesWithRawResponse: - return AsyncCardDisputesWithRawResponse(self._simulations.card_disputes) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) @cached_property - def card_refunds(self) -> AsyncCardRefundsWithRawResponse: - return AsyncCardRefundsWithRawResponse(self._simulations.card_refunds) + def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def check_transfers(self) -> AsyncCheckTransfersWithRawResponse: - return AsyncCheckTransfersWithRawResponse(self._simulations.check_transfers) + def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def documents(self) -> AsyncDocumentsWithRawResponse: - return AsyncDocumentsWithRawResponse(self._simulations.documents) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithRawResponse: - return AsyncDigitalWalletTokenRequestsWithRawResponse(self._simulations.digital_wallet_token_requests) + def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def check_deposits(self) -> AsyncCheckDepositsWithRawResponse: - return AsyncCheckDepositsWithRawResponse(self._simulations.check_deposits) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def programs(self) -> AsyncProgramsWithRawResponse: - return AsyncProgramsWithRawResponse(self._simulations.programs) + def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithRawResponse: - return AsyncInboundWireDrawdownRequestsWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithRawResponse: - return AsyncInboundFundsHoldsWithRawResponse(self._simulations.inbound_funds_holds) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsWithRawResponse: - return AsyncInterestPaymentsWithRawResponse(self._simulations.interest_payments) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def wire_transfers(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self._simulations.wire_transfers) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def cards(self) -> AsyncCardsWithRawResponse: - return AsyncCardsWithRawResponse(self._simulations.cards) + def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithRawResponse: - return AsyncRealTimePaymentsTransfersWithRawResponse(self._simulations.real_time_payments_transfers) + def card_settlements(self) -> AsyncCardSettlementsResourceWithRawResponse: + return AsyncCardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsWithRawResponse: - return AsyncPhysicalCardsWithRawResponse(self._simulations.physical_cards) + def card_reversals(self) -> AsyncCardReversalsResourceWithRawResponse: + return AsyncCardReversalsResourceWithRawResponse(self._simulations.card_reversals) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithRawResponse: - return AsyncInboundCheckDepositsWithRawResponse(self._simulations.inbound_check_deposits) + def card_increments(self) -> AsyncCardIncrementsResourceWithRawResponse: + return AsyncCardIncrementsResourceWithRawResponse(self._simulations.card_increments) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithRawResponse: - return AsyncInboundInternationalACHTransfersWithRawResponse( - self._simulations.inbound_international_ach_transfers + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + return AsyncCardAuthorizationExpirationsResourceWithRawResponse( + self._simulations.card_authorization_expirations ) + @cached_property + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: + return AsyncCardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) -class SimulationsWithStreamingResponse: - def __init__(self, simulations: Simulations) -> None: - self._simulations = simulations + @cached_property + def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: + return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) - self.card_authorization_expirations = to_streamed_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = to_streamed_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = to_streamed_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = to_streamed_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) + + @cached_property + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) + + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: + return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: + return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) @cached_property - def account_transfers(self) -> AccountTransfersWithStreamingResponse: - return AccountTransfersWithStreamingResponse(self._simulations.account_transfers) + def documents(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) @cached_property - def account_statements(self) -> AccountStatementsWithStreamingResponse: - return AccountStatementsWithStreamingResponse(self._simulations.account_statements) + def programs(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self._simulations.programs) + + +class SimulationsResourceWithStreamingResponse: + def __init__(self, simulations: SimulationsResource) -> None: + self._simulations = simulations @cached_property - def ach_transfers(self) -> ACHTransfersWithStreamingResponse: - return ACHTransfersWithStreamingResponse(self._simulations.ach_transfers) + def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) @cached_property - def card_disputes(self) -> CardDisputesWithStreamingResponse: - return CardDisputesWithStreamingResponse(self._simulations.card_disputes) + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) @cached_property - def card_refunds(self) -> CardRefundsWithStreamingResponse: - return CardRefundsWithStreamingResponse(self._simulations.card_refunds) + def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def check_transfers(self) -> CheckTransfersWithStreamingResponse: - return CheckTransfersWithStreamingResponse(self._simulations.check_transfers) + def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) @cached_property - def documents(self) -> DocumentsWithStreamingResponse: - return DocumentsWithStreamingResponse(self._simulations.documents) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsWithStreamingResponse: - return DigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) + def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property - def check_deposits(self) -> CheckDepositsWithStreamingResponse: - return CheckDepositsWithStreamingResponse(self._simulations.check_deposits) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) @cached_property - def programs(self) -> ProgramsWithStreamingResponse: - return ProgramsWithStreamingResponse(self._simulations.programs) + def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsWithStreamingResponse: - return InboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsWithStreamingResponse: - return InboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def interest_payments(self) -> InterestPaymentsWithStreamingResponse: - return InterestPaymentsWithStreamingResponse(self._simulations.interest_payments) + def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: + return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def wire_transfers(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self._simulations.wire_transfers) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) @cached_property - def cards(self) -> CardsWithStreamingResponse: - return CardsWithStreamingResponse(self._simulations.cards) + def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: + return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersWithStreamingResponse: - return RealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) + def card_settlements(self) -> CardSettlementsResourceWithStreamingResponse: + return CardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @cached_property - def physical_cards(self) -> PhysicalCardsWithStreamingResponse: - return PhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + def card_reversals(self) -> CardReversalsResourceWithStreamingResponse: + return CardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsWithStreamingResponse: - return InboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + def card_increments(self) -> CardIncrementsResourceWithStreamingResponse: + return CardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersWithStreamingResponse: - return InboundInternationalACHTransfersWithStreamingResponse( - self._simulations.inbound_international_ach_transfers + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + return CardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations ) + @cached_property + def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingResponse: + return CardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) + + @cached_property + def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: + return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + + @cached_property + def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) + + @cached_property + def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: + return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: + return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + + @cached_property + def documents(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self._simulations.documents) + + @cached_property + def programs(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self._simulations.programs) + -class AsyncSimulationsWithStreamingResponse: - def __init__(self, simulations: AsyncSimulations) -> None: +class AsyncSimulationsResourceWithStreamingResponse: + def __init__(self, simulations: AsyncSimulationsResource) -> None: self._simulations = simulations - self.card_authorization_expirations = async_to_streamed_response_wrapper( - simulations.card_authorization_expirations, - ) - self.card_fuel_confirmations = async_to_streamed_response_wrapper( - simulations.card_fuel_confirmations, - ) - self.card_increments = async_to_streamed_response_wrapper( - simulations.card_increments, - ) - self.card_reversals = async_to_streamed_response_wrapper( - simulations.card_reversals, - ) + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + + @cached_property + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) @cached_property - def account_transfers(self) -> AsyncAccountTransfersWithStreamingResponse: - return AsyncAccountTransfersWithStreamingResponse(self._simulations.account_transfers) + def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def account_statements(self) -> AsyncAccountStatementsWithStreamingResponse: - return AsyncAccountStatementsWithStreamingResponse(self._simulations.account_statements) + def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) @cached_property - def ach_transfers(self) -> AsyncACHTransfersWithStreamingResponse: - return AsyncACHTransfersWithStreamingResponse(self._simulations.ach_transfers) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def card_disputes(self) -> AsyncCardDisputesWithStreamingResponse: - return AsyncCardDisputesWithStreamingResponse(self._simulations.card_disputes) + def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property - def card_refunds(self) -> AsyncCardRefundsWithStreamingResponse: - return AsyncCardRefundsWithStreamingResponse(self._simulations.card_refunds) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) @cached_property - def check_transfers(self) -> AsyncCheckTransfersWithStreamingResponse: - return AsyncCheckTransfersWithStreamingResponse(self._simulations.check_transfers) + def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def documents(self) -> AsyncDocumentsWithStreamingResponse: - return AsyncDocumentsWithStreamingResponse(self._simulations.documents) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsWithStreamingResponse: - return AsyncDigitalWalletTokenRequestsWithStreamingResponse(self._simulations.digital_wallet_token_requests) + def inbound_real_time_payments_transfers( + self, + ) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def check_deposits(self) -> AsyncCheckDepositsWithStreamingResponse: - return AsyncCheckDepositsWithStreamingResponse(self._simulations.check_deposits) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def programs(self) -> AsyncProgramsWithStreamingResponse: - return AsyncProgramsWithStreamingResponse(self._simulations.programs) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.real_time_payments_transfers + ) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsWithStreamingResponse(self._simulations.inbound_wire_drawdown_requests) + def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: + return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsWithStreamingResponse: - return AsyncInboundFundsHoldsWithStreamingResponse(self._simulations.inbound_funds_holds) + def card_settlements(self) -> AsyncCardSettlementsResourceWithStreamingResponse: + return AsyncCardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsWithStreamingResponse: - return AsyncInterestPaymentsWithStreamingResponse(self._simulations.interest_payments) + def card_reversals(self) -> AsyncCardReversalsResourceWithStreamingResponse: + return AsyncCardReversalsResourceWithStreamingResponse(self._simulations.card_reversals) @cached_property - def wire_transfers(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self._simulations.wire_transfers) + def card_increments(self) -> AsyncCardIncrementsResourceWithStreamingResponse: + return AsyncCardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) @cached_property - def cards(self) -> AsyncCardsWithStreamingResponse: - return AsyncCardsWithStreamingResponse(self._simulations.cards) + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations + ) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersWithStreamingResponse: - return AsyncRealTimePaymentsTransfersWithStreamingResponse(self._simulations.real_time_payments_transfers) + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: + return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsWithStreamingResponse: - return AsyncPhysicalCardsWithStreamingResponse(self._simulations.physical_cards) + def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: + return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsWithStreamingResponse: - return AsyncInboundCheckDepositsWithStreamingResponse(self._simulations.inbound_check_deposits) + def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersWithStreamingResponse: - return AsyncInboundInternationalACHTransfersWithStreamingResponse( - self._simulations.inbound_international_ach_transfers + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse( + self._simulations.digital_wallet_token_requests ) + + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + + @cached_property + def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + + @cached_property + def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + + @cached_property + def programs(self) -> AsyncProgramsResourceWithStreamingResponse: + return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 66fcba3dc..9cece56fc 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -4,50 +4,34 @@ import httpx -from ... import _legacy_response from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..._base_client import make_request_options -from ...types.simulations import wire_transfer_create_inbound_params -from ...types.inbound_wire_transfer import InboundWireTransfer +from ...types.wire_transfer import WireTransfer -__all__ = ["WireTransfers", "AsyncWireTransfers"] +__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] -class WireTransfers(SyncAPIResource): +class WireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self) + def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self) - def create_inbound( + def reverse( self, + wire_transfer_id: str, *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -55,56 +39,59 @@ def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundWireTransfer: + ) -> WireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. - - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + extra_headers: Send extra headers - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + extra_query: Add additional query parameters to the request - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. + extra_body: Add additional JSON properties to the request - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. + timeout: Override the client-level default timeout for this request, in seconds - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. extra_headers: Send extra headers @@ -116,29 +103,10 @@ def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - "/simulations/inbound_wire_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - }, - wire_transfer_create_inbound_params.WireTransferCreateInboundParams, - ), + f"/simulations/wire_transfers/{wire_transfer_id}/submit", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -146,38 +114,23 @@ def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundWireTransfer, + cast_to=WireTransfer, ) -class AsyncWireTransfers(AsyncAPIResource): +class AsyncWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self) - async def create_inbound( + async def reverse( self, + wire_transfer_id: str, *, - account_number_id: str, - amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -185,56 +138,59 @@ async def create_inbound( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundWireTransfer: + ) -> WireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal + Reserve due to error conditions. This will also create a + [Transaction](#transaction) to account for the returned funds. This Wire + Transfer must first have a `status` of `complete`. Args: - account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. - - amount: The transfer amount in cents. Must be positive. + wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. - - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. - - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. - - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any - value here. - - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate - any value here. - - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. - - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + extra_headers: Send extra headers - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + extra_query: Add additional query parameters to the request - originator_routing_number: The sending bank will set originator_routing_number in production. You can - simulate any value here. + extra_body: Add additional JSON properties to the request - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. + timeout: Override the client-level default timeout for this request, in seconds - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") + return await self._post( + f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireTransfer, + ) - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + async def submit( + self, + wire_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireTransfer: + """ + Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal + Reserve. This transfer must first have a `status` of `pending_approval` or + `pending_creating`. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + Args: + wire_transfer_id: The identifier of the Wire Transfer you wish to submit. extra_headers: Send extra headers @@ -246,29 +202,10 @@ async def create_inbound( idempotency_key: Specify a custom idempotency key for this request """ + if not wire_transfer_id: + raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - "/simulations/inbound_wire_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - }, - wire_transfer_create_inbound_params.WireTransferCreateInboundParams, - ), + f"/simulations/wire_transfers/{wire_transfer_id}/submit", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -276,41 +213,53 @@ async def create_inbound( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundWireTransfer, + cast_to=WireTransfer, ) -class WireTransfersWithRawResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = _legacy_response.to_raw_response_wrapper( - wire_transfers.create_inbound, + self.reverse = to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = to_raw_response_wrapper( + wire_transfers.submit, ) -class AsyncWireTransfersWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.create_inbound, + self.reverse = async_to_raw_response_wrapper( + wire_transfers.reverse, + ) + self.submit = async_to_raw_response_wrapper( + wire_transfers.submit, ) -class WireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = to_streamed_response_wrapper( - wire_transfers.create_inbound, + self.reverse = to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = to_streamed_response_wrapper( + wire_transfers.submit, ) -class AsyncWireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create_inbound = async_to_streamed_response_wrapper( - wire_transfers.create_inbound, + self.reverse = async_to_streamed_response_wrapper( + wire_transfers.reverse, + ) + self.submit = async_to_streamed_response_wrapper( + wire_transfers.submit, ) diff --git a/src/increase/resources/entities/supplemental_documents.py b/src/increase/resources/supplemental_documents.py similarity index 75% rename from src/increase/resources/entities/supplemental_documents.py rename to src/increase/resources/supplemental_documents.py index 8cadca695..1ce6adbaa 100644 --- a/src/increase/resources/entities/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -4,37 +4,40 @@ import httpx -from ... import _legacy_response -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( +from ..types import supplemental_document_list_params, supplemental_document_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( maybe_transform, async_maybe_transform, ) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper -from ...pagination import SyncPage, AsyncPage -from ..._base_client import AsyncPaginator, make_request_options -from ...types.entity import Entity -from ...types.entities import supplemental_document_list_params, supplemental_document_create_params -from ...types.entities.supplemental_document import SupplementalDocument +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity_supplemental_document import EntitySupplementalDocument -__all__ = ["SupplementalDocuments", "AsyncSupplementalDocuments"] +__all__ = ["SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource"] -class SupplementalDocuments(SyncAPIResource): +class SupplementalDocumentsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> SupplementalDocumentsWithRawResponse: - return SupplementalDocumentsWithRawResponse(self) + def with_raw_response(self) -> SupplementalDocumentsResourceWithRawResponse: + return SupplementalDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> SupplementalDocumentsWithStreamingResponse: - return SupplementalDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> SupplementalDocumentsResourceWithStreamingResponse: + return SupplementalDocumentsResourceWithStreamingResponse(self) def create( self, - entity_id: str, *, + entity_id: str, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -43,7 +46,7 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> Entity: + ) -> EntitySupplementalDocument: """ Create a supplemental document for an Entity @@ -62,12 +65,14 @@ def create( idempotency_key: Specify a custom idempotency key for this request """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/supplemental_documents", + "/entity_supplemental_documents", body=maybe_transform( - {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams + { + "entity_id": entity_id, + "file_id": file_id, + }, + supplemental_document_create_params.SupplementalDocumentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -76,7 +81,7 @@ def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Entity, + cast_to=EntitySupplementalDocument, ) def list( @@ -92,7 +97,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[SupplementalDocument]: + ) -> SyncPage[EntitySupplementalDocument]: """ List Entity Supplemental Document Submissions @@ -119,7 +124,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=SyncPage[SupplementalDocument], + page=SyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,23 +140,23 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=SupplementalDocument, + model=EntitySupplementalDocument, ) -class AsyncSupplementalDocuments(AsyncAPIResource): +class AsyncSupplementalDocumentsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncSupplementalDocumentsWithRawResponse: - return AsyncSupplementalDocumentsWithRawResponse(self) + def with_raw_response(self) -> AsyncSupplementalDocumentsResourceWithRawResponse: + return AsyncSupplementalDocumentsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncSupplementalDocumentsWithStreamingResponse: - return AsyncSupplementalDocumentsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncSupplementalDocumentsResourceWithStreamingResponse: + return AsyncSupplementalDocumentsResourceWithStreamingResponse(self) async def create( self, - entity_id: str, *, + entity_id: str, file_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -160,7 +165,7 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> Entity: + ) -> EntitySupplementalDocument: """ Create a supplemental document for an Entity @@ -179,12 +184,14 @@ async def create( idempotency_key: Specify a custom idempotency key for this request """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/supplemental_documents", + "/entity_supplemental_documents", body=await async_maybe_transform( - {"file_id": file_id}, supplemental_document_create_params.SupplementalDocumentCreateParams + { + "entity_id": entity_id, + "file_id": file_id, + }, + supplemental_document_create_params.SupplementalDocumentCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -193,7 +200,7 @@ async def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=Entity, + cast_to=EntitySupplementalDocument, ) def list( @@ -209,7 +216,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[SupplementalDocument, AsyncPage[SupplementalDocument]]: + ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: """ List Entity Supplemental Document Submissions @@ -236,7 +243,7 @@ def list( """ return self._get_api_list( "/entity_supplemental_documents", - page=AsyncPage[SupplementalDocument], + page=AsyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -252,36 +259,36 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=SupplementalDocument, + model=EntitySupplementalDocument, ) -class SupplementalDocumentsWithRawResponse: - def __init__(self, supplemental_documents: SupplementalDocuments) -> None: +class SupplementalDocumentsResourceWithRawResponse: + def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( supplemental_documents.create, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( supplemental_documents.list, ) -class AsyncSupplementalDocumentsWithRawResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: +class AsyncSupplementalDocumentsResourceWithRawResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( supplemental_documents.create, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( supplemental_documents.list, ) -class SupplementalDocumentsWithStreamingResponse: - def __init__(self, supplemental_documents: SupplementalDocuments) -> None: +class SupplementalDocumentsResourceWithStreamingResponse: + def __init__(self, supplemental_documents: SupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents self.create = to_streamed_response_wrapper( @@ -292,8 +299,8 @@ def __init__(self, supplemental_documents: SupplementalDocuments) -> None: ) -class AsyncSupplementalDocumentsWithStreamingResponse: - def __init__(self, supplemental_documents: AsyncSupplementalDocuments) -> None: +class AsyncSupplementalDocumentsResourceWithStreamingResponse: + def __init__(self, supplemental_documents: AsyncSupplementalDocumentsResource) -> None: self._supplemental_documents = supplemental_documents self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index cba7da871..029e2d703 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -4,28 +4,32 @@ import httpx -from .. import _legacy_response from ..types import transaction_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.transaction import Transaction -__all__ = ["Transactions", "AsyncTransactions"] +__all__ = ["TransactionsResource", "AsyncTransactionsResource"] -class Transactions(SyncAPIResource): +class TransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> TransactionsWithRawResponse: - return TransactionsWithRawResponse(self) + def with_raw_response(self) -> TransactionsResourceWithRawResponse: + return TransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> TransactionsWithStreamingResponse: - return TransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> TransactionsResourceWithStreamingResponse: + return TransactionsResourceWithStreamingResponse(self) def retrieve( self, @@ -124,14 +128,14 @@ def list( ) -class AsyncTransactions(AsyncAPIResource): +class AsyncTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncTransactionsWithRawResponse: - return AsyncTransactionsWithRawResponse(self) + def with_raw_response(self) -> AsyncTransactionsResourceWithRawResponse: + return AsyncTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncTransactionsWithStreamingResponse: - return AsyncTransactionsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncTransactionsResourceWithStreamingResponse: + return AsyncTransactionsResourceWithStreamingResponse(self) async def retrieve( self, @@ -230,32 +234,32 @@ def list( ) -class TransactionsWithRawResponse: - def __init__(self, transactions: Transactions) -> None: +class TransactionsResourceWithRawResponse: + def __init__(self, transactions: TransactionsResource) -> None: self._transactions = transactions - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( transactions.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( transactions.list, ) -class AsyncTransactionsWithRawResponse: - def __init__(self, transactions: AsyncTransactions) -> None: +class AsyncTransactionsResourceWithRawResponse: + def __init__(self, transactions: AsyncTransactionsResource) -> None: self._transactions = transactions - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( transactions.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( transactions.list, ) -class TransactionsWithStreamingResponse: - def __init__(self, transactions: Transactions) -> None: +class TransactionsResourceWithStreamingResponse: + def __init__(self, transactions: TransactionsResource) -> None: self._transactions = transactions self.retrieve = to_streamed_response_wrapper( @@ -266,8 +270,8 @@ def __init__(self, transactions: Transactions) -> None: ) -class AsyncTransactionsWithStreamingResponse: - def __init__(self, transactions: AsyncTransactions) -> None: +class AsyncTransactionsResourceWithStreamingResponse: + def __init__(self, transactions: AsyncTransactionsResource) -> None: self._transactions = transactions self.retrieve = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 473aeb874..ccbc2de1a 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -6,7 +6,6 @@ import httpx -from .. import _legacy_response from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -15,22 +14,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest -__all__ = ["WireDrawdownRequests", "AsyncWireDrawdownRequests"] +__all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] -class WireDrawdownRequests(SyncAPIResource): +class WireDrawdownRequestsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireDrawdownRequestsWithRawResponse: - return WireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: + return WireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireDrawdownRequestsWithStreamingResponse: - return WireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> WireDrawdownRequestsResourceWithStreamingResponse: + return WireDrawdownRequestsResourceWithStreamingResponse(self) def create( self, @@ -238,14 +242,14 @@ def list( ) -class AsyncWireDrawdownRequests(AsyncAPIResource): +class AsyncWireDrawdownRequestsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireDrawdownRequestsWithRawResponse: - return AsyncWireDrawdownRequestsWithRawResponse(self) + def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: + return AsyncWireDrawdownRequestsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireDrawdownRequestsWithStreamingResponse: - return AsyncWireDrawdownRequestsWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( self, @@ -453,38 +457,38 @@ def list( ) -class WireDrawdownRequestsWithRawResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: +class WireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( wire_drawdown_requests.list, ) -class AsyncWireDrawdownRequestsWithRawResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: +class AsyncWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( wire_drawdown_requests.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( wire_drawdown_requests.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( wire_drawdown_requests.list, ) -class WireDrawdownRequestsWithStreamingResponse: - def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: +class WireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = to_streamed_response_wrapper( @@ -498,8 +502,8 @@ def __init__(self, wire_drawdown_requests: WireDrawdownRequests) -> None: ) -class AsyncWireDrawdownRequestsWithStreamingResponse: - def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequests) -> None: +class AsyncWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: self._wire_drawdown_requests = wire_drawdown_requests self.create = async_to_streamed_response_wrapper( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 2e90dd06f..90d041e0e 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -4,7 +4,6 @@ import httpx -from .. import _legacy_response from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( @@ -13,22 +12,27 @@ ) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import to_streamed_response_wrapper, async_to_streamed_response_wrapper +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) from ..pagination import SyncPage, AsyncPage from .._base_client import AsyncPaginator, make_request_options from ..types.wire_transfer import WireTransfer -__all__ = ["WireTransfers", "AsyncWireTransfers"] +__all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] -class WireTransfers(SyncAPIResource): +class WireTransfersResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> WireTransfersWithRawResponse: - return WireTransfersWithRawResponse(self) + def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> WireTransfersWithStreamingResponse: - return WireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self) def create( self, @@ -322,104 +326,15 @@ def cancel( cast_to=WireTransfer, ) - def reverse( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - -class AsyncWireTransfers(AsyncAPIResource): +class AsyncWireTransfersResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncWireTransfersWithRawResponse: - return AsyncWireTransfersWithRawResponse(self) + def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncWireTransfersWithStreamingResponse: - return AsyncWireTransfersWithStreamingResponse(self) + def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self) async def create( self, @@ -713,152 +628,51 @@ async def cancel( cast_to=WireTransfer, ) - async def reverse( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the reversal of a [Wire Transfer](#wire-transfers) by the Federal - Reserve due to error conditions. This will also create a - [Transaction](#transaction) to account for the returned funds. This Wire - Transfer must first have a `status` of `complete`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to reverse. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - - async def submit( - self, - wire_transfer_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> WireTransfer: - """ - Simulates the submission of a [Wire Transfer](#wire-transfers) to the Federal - Reserve. This transfer must first have a `status` of `pending_approval` or - `pending_creating`. - - Args: - wire_transfer_id: The identifier of the Wire Transfer you wish to submit. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not wire_transfer_id: - raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") - return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=WireTransfer, - ) - -class WireTransfersWithRawResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create = _legacy_response.to_raw_response_wrapper( + self.create = to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = _legacy_response.to_raw_response_wrapper( + self.retrieve = to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = _legacy_response.to_raw_response_wrapper( + self.list = to_raw_response_wrapper( wire_transfers.list, ) - self.approve = _legacy_response.to_raw_response_wrapper( + self.approve = to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = _legacy_response.to_raw_response_wrapper( + self.cancel = to_raw_response_wrapper( wire_transfers.cancel, ) - self.reverse = _legacy_response.to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = _legacy_response.to_raw_response_wrapper( - wire_transfers.submit, - ) -class AsyncWireTransfersWithRawResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithRawResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers - self.create = _legacy_response.async_to_raw_response_wrapper( + self.create = async_to_raw_response_wrapper( wire_transfers.create, ) - self.retrieve = _legacy_response.async_to_raw_response_wrapper( + self.retrieve = async_to_raw_response_wrapper( wire_transfers.retrieve, ) - self.list = _legacy_response.async_to_raw_response_wrapper( + self.list = async_to_raw_response_wrapper( wire_transfers.list, ) - self.approve = _legacy_response.async_to_raw_response_wrapper( + self.approve = async_to_raw_response_wrapper( wire_transfers.approve, ) - self.cancel = _legacy_response.async_to_raw_response_wrapper( + self.cancel = async_to_raw_response_wrapper( wire_transfers.cancel, ) - self.reverse = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.reverse, - ) - self.submit = _legacy_response.async_to_raw_response_wrapper( - wire_transfers.submit, - ) -class WireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: WireTransfers) -> None: +class WireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: WireTransfersResource) -> None: self._wire_transfers = wire_transfers self.create = to_streamed_response_wrapper( @@ -876,16 +690,10 @@ def __init__(self, wire_transfers: WireTransfers) -> None: self.cancel = to_streamed_response_wrapper( wire_transfers.cancel, ) - self.reverse = to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = to_streamed_response_wrapper( - wire_transfers.submit, - ) -class AsyncWireTransfersWithStreamingResponse: - def __init__(self, wire_transfers: AsyncWireTransfers) -> None: +class AsyncWireTransfersResourceWithStreamingResponse: + def __init__(self, wire_transfers: AsyncWireTransfersResource) -> None: self._wire_transfers = wire_transfers self.create = async_to_streamed_response_wrapper( @@ -903,9 +711,3 @@ def __init__(self, wire_transfers: AsyncWireTransfers) -> None: self.cancel = async_to_streamed_response_wrapper( wire_transfers.cancel, ) - self.reverse = async_to_streamed_response_wrapper( - wire_transfers.reverse, - ) - self.submit = async_to_streamed_response_wrapper( - wire_transfers.submit, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c643cfabc..412ea7621 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -18,14 +18,13 @@ from .card_details import CardDetails as CardDetails from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment -from .lockbox_list import LockboxList as LockboxList from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard from .wire_transfer import WireTransfer as WireTransfer from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer -from .routing_number import RoutingNumber as RoutingNumber +from .intrafi_balance import IntrafiBalance as IntrafiBalance from .account_transfer import AccountTransfer as AccountTransfer from .card_list_params import CardListParams as CardListParams from .external_account import ExternalAccount as ExternalAccount @@ -35,6 +34,7 @@ from .bookkeeping_entry import BookkeepingEntry as BookkeepingEntry from .event_list_params import EventListParams as EventListParams from .inbound_mail_item import InboundMailItem as InboundMailItem +from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams @@ -66,7 +66,6 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams -from .inbound_mail_item_list import InboundMailItemList as InboundMailItemList from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams @@ -81,6 +80,7 @@ from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams +from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams @@ -91,13 +91,16 @@ from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams +from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams +from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest +from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams @@ -105,6 +108,7 @@ from .proof_of_authorization_request import ProofOfAuthorizationRequest as ProofOfAuthorizationRequest from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams +from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams @@ -113,7 +117,6 @@ from .event_subscription_update_params import EventSubscriptionUpdateParams as EventSubscriptionUpdateParams from .inbound_ach_transfer_list_params import InboundACHTransferListParams as InboundACHTransferListParams from .real_time_decision_action_params import RealTimeDecisionActionParams as RealTimeDecisionActionParams -from .simulation_card_reversals_params import SimulationCardReversalsParams as SimulationCardReversalsParams from .ach_prenotification_create_params import ACHPrenotificationCreateParams as ACHPrenotificationCreateParams from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams @@ -122,22 +125,37 @@ from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams -from .simulation_card_increments_params import SimulationCardIncrementsParams as SimulationCardIncrementsParams +from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams +from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams +from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams +from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams +from .entity_create_beneficial_owner_params import ( + EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, +) +from .entity_archive_beneficial_owner_params import ( + EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, +) +from .intrafi_account_enrollment_list_params import ( + IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, +) from .real_time_payments_request_for_payment import ( RealTimePaymentsRequestForPayment as RealTimePaymentsRequestForPayment, ) from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) +from .intrafi_account_enrollment_create_params import ( + IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, +) from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) @@ -147,20 +165,14 @@ from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) -from .simulation_card_fuel_confirmations_params import ( - SimulationCardFuelConfirmationsParams as SimulationCardFuelConfirmationsParams, -) from .proof_of_authorization_request_list_params import ( ProofOfAuthorizationRequestListParams as ProofOfAuthorizationRequestListParams, ) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) -from .simulation_card_authorization_expirations_params import ( - SimulationCardAuthorizationExpirationsParams as SimulationCardAuthorizationExpirationsParams, -) -from .inbound_ach_transfer_notification_of_change_params import ( - InboundACHTransferNotificationOfChangeParams as InboundACHTransferNotificationOfChangeParams, +from .entity_update_beneficial_owner_address_params import ( + EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, ) from .real_time_payments_request_for_payment_list_params import ( RealTimePaymentsRequestForPaymentListParams as RealTimePaymentsRequestForPaymentListParams, @@ -174,3 +186,6 @@ from .proof_of_authorization_request_submission_create_params import ( ProofOfAuthorizationRequestSubmissionCreateParams as ProofOfAuthorizationRequestSubmissionCreateParams, ) +from .inbound_ach_transfer_create_notification_of_change_params import ( + InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, +) diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9fe9fc08b..689b6cd4d 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -20,7 +20,6 @@ "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", - "SourceInternationalACHDecline", "SourceWireDecline", ] @@ -656,252 +655,6 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The Real-Time Payments network identification of the declined transfer.""" -class SourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -946,7 +699,6 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", @@ -964,8 +716,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -995,13 +745,6 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ - international_ach_decline: Optional[SourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index e79abff89..0a4ca27b8 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,7 +41,6 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/entities/__init__.py b/src/increase/types/entities/__init__.py deleted file mode 100644 index e7b6ad184..000000000 --- a/src/increase/types/entities/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .supplemental_document import SupplementalDocument as SupplementalDocument -from .industry_code_create_params import IndustryCodeCreateParams as IndustryCodeCreateParams -from .beneficial_owner_create_params import BeneficialOwnerCreateParams as BeneficialOwnerCreateParams -from .beneficial_owner_archive_params import BeneficialOwnerArchiveParams as BeneficialOwnerArchiveParams -from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams -from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams -from .beneficial_owner_update_address_params import ( - BeneficialOwnerUpdateAddressParams as BeneficialOwnerUpdateAddressParams, -) diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 7f0974807..afeb6da56 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -5,6 +5,7 @@ from typing_extensions import Literal from .._models import BaseModel +from .entity_supplemental_document import EntitySupplementalDocument __all__ = [ "Entity", @@ -24,7 +25,6 @@ "NaturalPerson", "NaturalPersonAddress", "NaturalPersonIdentification", - "SupplementalDocument", "Trust", "TrustAddress", "TrustGrantor", @@ -333,31 +333,6 @@ class NaturalPerson(BaseModel): """The person's legal name.""" -class SupplementalDocument(BaseModel): - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - Supplemental Document was created. - """ - - file_id: str - """The File containing the document.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - type: Literal["entity_supplemental_document"] - """A constant representing the object's type. - - For this resource it will always be `entity_supplemental_document`. - """ - - class TrustAddress(BaseModel): city: str """The city of the address.""" @@ -606,7 +581,7 @@ class Entity(BaseModel): - `government_authority` - A government authority. """ - supplemental_documents: List[SupplementalDocument] + supplemental_documents: List[EntitySupplementalDocument] """Additional documentation associated with the entity. This is limited to the first 10 documents for an entity. If an entity has more diff --git a/src/increase/types/entities/beneficial_owner_archive_params.py b/src/increase/types/entity_archive_beneficial_owner_params.py similarity index 63% rename from src/increase/types/entities/beneficial_owner_archive_params.py rename to src/increase/types/entity_archive_beneficial_owner_params.py index cd13deb9c..d430cf7e4 100644 --- a/src/increase/types/entities/beneficial_owner_archive_params.py +++ b/src/increase/types/entity_archive_beneficial_owner_params.py @@ -4,15 +4,12 @@ from typing_extensions import Required, TypedDict -__all__ = ["BeneficialOwnerArchiveParams"] +__all__ = ["EntityArchiveBeneficialOwnerParams"] -class BeneficialOwnerArchiveParams(TypedDict, total=False): +class EntityArchiveBeneficialOwnerParams(TypedDict, total=False): beneficial_owner_id: Required[str] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ - - entity_id: Required[str] - """The identifier of the Entity to retrieve.""" diff --git a/src/increase/types/entities/beneficial_owner_create_params.py b/src/increase/types/entity_create_beneficial_owner_params.py similarity index 95% rename from src/increase/types/entities/beneficial_owner_create_params.py rename to src/increase/types/entity_create_beneficial_owner_params.py index 1aee87eff..7c95dc04b 100644 --- a/src/increase/types/entities/beneficial_owner_create_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -6,10 +6,10 @@ from datetime import date from typing_extensions import Literal, Required, Annotated, TypedDict -from ..._utils import PropertyInfo +from .._utils import PropertyInfo __all__ = [ - "BeneficialOwnerCreateParams", + "EntityCreateBeneficialOwnerParams", "BeneficialOwner", "BeneficialOwnerIndividual", "BeneficialOwnerIndividualAddress", @@ -20,16 +20,13 @@ ] -class BeneficialOwnerCreateParams(TypedDict, total=False): +class EntityCreateBeneficialOwnerParams(TypedDict, total=False): beneficial_owner: Required[BeneficialOwner] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ - entity_id: Required[str] - """The identifier of the Entity to associate with the new Beneficial Owner.""" - class BeneficialOwnerIndividualAddress(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entities/supplemental_document.py b/src/increase/types/entity_supplemental_document.py similarity index 81% rename from src/increase/types/entities/supplemental_document.py rename to src/increase/types/entity_supplemental_document.py index fbee31bb4..695107f9d 100644 --- a/src/increase/types/entities/supplemental_document.py +++ b/src/increase/types/entity_supplemental_document.py @@ -4,18 +4,21 @@ from datetime import datetime from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel -__all__ = ["SupplementalDocument"] +__all__ = ["EntitySupplementalDocument"] -class SupplementalDocument(BaseModel): +class EntitySupplementalDocument(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Supplemental Document was created. """ + entity_id: str + """The Entity the supplemental document is attached to.""" + file_id: str """The File containing the document.""" diff --git a/src/increase/types/entities/beneficial_owner_update_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py similarity index 82% rename from src/increase/types/entities/beneficial_owner_update_address_params.py rename to src/increase/types/entity_update_beneficial_owner_address_params.py index 00db2088a..862389978 100644 --- a/src/increase/types/entities/beneficial_owner_update_address_params.py +++ b/src/increase/types/entity_update_beneficial_owner_address_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["BeneficialOwnerUpdateAddressParams", "Address"] +__all__ = ["EntityUpdateBeneficialOwnerAddressParams", "Address"] -class BeneficialOwnerUpdateAddressParams(TypedDict, total=False): +class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): address: Required[Address] """The individual's physical address. @@ -20,9 +20,6 @@ class BeneficialOwnerUpdateAddressParams(TypedDict, total=False): corporation. """ - entity_id: Required[str] - """The identifier of the Entity to retrieve.""" - class Address(TypedDict, total=False): city: Required[str] diff --git a/src/increase/types/entities/industry_code_create_params.py b/src/increase/types/entity_update_industry_code_params.py similarity index 84% rename from src/increase/types/entities/industry_code_create_params.py rename to src/increase/types/entity_update_industry_code_params.py index 254bbbf3e..7843d7137 100644 --- a/src/increase/types/entities/industry_code_create_params.py +++ b/src/increase/types/entity_update_industry_code_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["IndustryCodeCreateParams"] +__all__ = ["EntityUpdateIndustryCodeParams"] -class IndustryCodeCreateParams(TypedDict, total=False): +class EntityUpdateIndustryCodeParams(TypedDict, total=False): industry_code: Required[str] """ The North American Industry Classification System (NAICS) code for the diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 237b1b61a..12f7c5d90 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -13,6 +13,7 @@ "AddendaFreeform", "AddendaFreeformEntry", "Decline", + "InternationalAddenda", "NotificationOfChange", "TransferReturn", ] @@ -98,6 +99,234 @@ class Decline(BaseModel): """ +class InternationalAddenda(BaseModel): + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + class NotificationOfChange(BaseModel): updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -184,6 +413,12 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ + international_addenda: Optional[InternationalAddenda] = None + """ + If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will + contain fields pertaining to the International ACH Transaction. + """ + notification_of_change: Optional[NotificationOfChange] = None """ If you initiate a notification of change in response to the transfer, this will @@ -233,6 +468,7 @@ class InboundACHTransfer(BaseModel): "point_of_purchase", "check_truncation", "destroyed_check", + "international_ach_transaction", ] """The Standard Entry Class (SEC) code of the transfer. @@ -251,6 +487,7 @@ class InboundACHTransfer(BaseModel): - `point_of_purchase` - Point of Purchase (POP). - `check_truncation` - Check Truncation (TRC). - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). """ status: Literal["pending", "declined", "accepted", "returned"] diff --git a/src/increase/types/inbound_ach_transfer_notification_of_change_params.py b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py similarity index 72% rename from src/increase/types/inbound_ach_transfer_notification_of_change_params.py rename to src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py index 239820edc..73920dc71 100644 --- a/src/increase/types/inbound_ach_transfer_notification_of_change_params.py +++ b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["InboundACHTransferNotificationOfChangeParams"] +__all__ = ["InboundACHTransferCreateNotificationOfChangeParams"] -class InboundACHTransferNotificationOfChangeParams(TypedDict, total=False): +class InboundACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): updated_account_number: str """The updated account number to send in the notification of change.""" diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 44ae731ff..b75b6e5a5 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,6 +10,14 @@ class DepositReturn(BaseModel): + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] + """The reason the deposit was returned. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ + returned_at: datetime """The time at which the deposit was returned.""" @@ -98,12 +106,13 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined"] + status: Literal["pending", "accepted", "declined", "returned"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. + - `returned` - The Inbound Check Deposit was returned. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py new file mode 100644 index 000000000..169cc55aa --- /dev/null +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundCheckDepositReturnParams"] + + +class InboundCheckDepositReturnParams(TypedDict, total=False): + reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] + """The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ diff --git a/src/increase/types/inbound_mail_item_list.py b/src/increase/types/inbound_mail_item_list.py deleted file mode 100644 index 5831477ec..000000000 --- a/src/increase/types/inbound_mail_item_list.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .._models import BaseModel -from .inbound_mail_item import InboundMailItem - -__all__ = ["InboundMailItemList"] - - -class InboundMailItemList(BaseModel): - data: List[InboundMailItem] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 75e36f1a3..c2d381d36 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -79,6 +79,9 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire transfer.""" + status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. diff --git a/src/increase/types/intrafi/__init__.py b/src/increase/types/intrafi/__init__.py deleted file mode 100644 index 89dd10101..000000000 --- a/src/increase/types/intrafi/__init__.py +++ /dev/null @@ -1,11 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from .intrafi_balance import IntrafiBalance as IntrafiBalance -from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion -from .exclusion_list_params import ExclusionListParams as ExclusionListParams -from .exclusion_create_params import ExclusionCreateParams as ExclusionCreateParams -from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment -from .account_enrollment_list_params import AccountEnrollmentListParams as AccountEnrollmentListParams -from .account_enrollment_create_params import AccountEnrollmentCreateParams as AccountEnrollmentCreateParams diff --git a/src/increase/types/intrafi/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py similarity index 98% rename from src/increase/types/intrafi/intrafi_account_enrollment.py rename to src/increase/types/intrafi_account_enrollment.py index bf22fe514..4f7eb73d5 100644 --- a/src/increase/types/intrafi/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi_account_enrollment.py @@ -3,7 +3,7 @@ from typing import Optional from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiAccountEnrollment"] diff --git a/src/increase/types/intrafi/account_enrollment_create_params.py b/src/increase/types/intrafi_account_enrollment_create_params.py similarity index 76% rename from src/increase/types/intrafi/account_enrollment_create_params.py rename to src/increase/types/intrafi_account_enrollment_create_params.py index a213e0882..0445b37ae 100644 --- a/src/increase/types/intrafi/account_enrollment_create_params.py +++ b/src/increase/types/intrafi_account_enrollment_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["AccountEnrollmentCreateParams"] +__all__ = ["IntrafiAccountEnrollmentCreateParams"] -class AccountEnrollmentCreateParams(TypedDict, total=False): +class IntrafiAccountEnrollmentCreateParams(TypedDict, total=False): account_id: Required[str] """The identifier for the account to be added to IntraFi.""" diff --git a/src/increase/types/intrafi/account_enrollment_list_params.py b/src/increase/types/intrafi_account_enrollment_list_params.py similarity index 90% rename from src/increase/types/intrafi/account_enrollment_list_params.py rename to src/increase/types/intrafi_account_enrollment_list_params.py index 86247eb1c..a20c00571 100644 --- a/src/increase/types/intrafi/account_enrollment_list_params.py +++ b/src/increase/types/intrafi_account_enrollment_list_params.py @@ -5,10 +5,10 @@ from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["AccountEnrollmentListParams", "Status"] +__all__ = ["IntrafiAccountEnrollmentListParams", "Status"] -class AccountEnrollmentListParams(TypedDict, total=False): +class IntrafiAccountEnrollmentListParams(TypedDict, total=False): account_id: str """Filter IntraFi Account Enrollments to the one belonging to an account.""" diff --git a/src/increase/types/intrafi/intrafi_balance.py b/src/increase/types/intrafi_balance.py similarity index 98% rename from src/increase/types/intrafi/intrafi_balance.py rename to src/increase/types/intrafi_balance.py index e93235731..7c79445d6 100644 --- a/src/increase/types/intrafi/intrafi_balance.py +++ b/src/increase/types/intrafi_balance.py @@ -4,7 +4,7 @@ from datetime import date from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiBalance", "Balance", "BalanceBankLocation"] diff --git a/src/increase/types/intrafi/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py similarity index 98% rename from src/increase/types/intrafi/intrafi_exclusion.py rename to src/increase/types/intrafi_exclusion.py index 775fbfae3..6b1c35abd 100644 --- a/src/increase/types/intrafi/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -4,7 +4,7 @@ from datetime import datetime from typing_extensions import Literal -from ..._models import BaseModel +from .._models import BaseModel __all__ = ["IntrafiExclusion"] diff --git a/src/increase/types/intrafi/exclusion_create_params.py b/src/increase/types/intrafi_exclusion_create_params.py similarity index 78% rename from src/increase/types/intrafi/exclusion_create_params.py rename to src/increase/types/intrafi_exclusion_create_params.py index 8075260bd..1a0c78dc3 100644 --- a/src/increase/types/intrafi/exclusion_create_params.py +++ b/src/increase/types/intrafi_exclusion_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["ExclusionCreateParams"] +__all__ = ["IntrafiExclusionCreateParams"] -class ExclusionCreateParams(TypedDict, total=False): +class IntrafiExclusionCreateParams(TypedDict, total=False): bank_name: Required[str] """The name of the financial institution to be excluded.""" diff --git a/src/increase/types/intrafi/exclusion_list_params.py b/src/increase/types/intrafi_exclusion_list_params.py similarity index 88% rename from src/increase/types/intrafi/exclusion_list_params.py rename to src/increase/types/intrafi_exclusion_list_params.py index 07d9859fb..8b20a277e 100644 --- a/src/increase/types/intrafi/exclusion_list_params.py +++ b/src/increase/types/intrafi_exclusion_list_params.py @@ -4,10 +4,10 @@ from typing_extensions import TypedDict -__all__ = ["ExclusionListParams"] +__all__ = ["IntrafiExclusionListParams"] -class ExclusionListParams(TypedDict, total=False): +class IntrafiExclusionListParams(TypedDict, total=False): cursor: str """Return the page of entries after this one.""" diff --git a/src/increase/types/lockbox_list.py b/src/increase/types/lockbox_list.py deleted file mode 100644 index 52bb1ef89..000000000 --- a/src/increase/types/lockbox_list.py +++ /dev/null @@ -1,16 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional - -from .lockbox import Lockbox -from .._models import BaseModel - -__all__ = ["LockboxList"] - - -class LockboxList(BaseModel): - data: List[Lockbox] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" diff --git a/src/increase/types/routing_number.py b/src/increase/types/routing_number_list_response.py similarity index 94% rename from src/increase/types/routing_number.py rename to src/increase/types/routing_number_list_response.py index f9bab1249..7fbca1e8d 100644 --- a/src/increase/types/routing_number.py +++ b/src/increase/types/routing_number_list_response.py @@ -4,10 +4,10 @@ from .._models import BaseModel -__all__ = ["RoutingNumber"] +__all__ = ["RoutingNumberListResponse"] -class RoutingNumber(BaseModel): +class RoutingNumberListResponse(BaseModel): ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index ccd925666..3d3e77b31 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -2,30 +2,32 @@ from __future__ import annotations -from .card_authorize_params import CardAuthorizeParams as CardAuthorizeParams from .program_create_params import ProgramCreateParams as ProgramCreateParams -from .card_settlement_params import CardSettlementParams as CardSettlementParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams -from .card_authorization_simulation import CardAuthorizationSimulation as CardAuthorizationSimulation +from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams +from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams +from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams -from .ach_transfer_create_inbound_params import ACHTransferCreateInboundParams as ACHTransferCreateInboundParams -from .inbound_international_ach_transfer import InboundInternationalACHTransfer as InboundInternationalACHTransfer +from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams +from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse +from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse -from .wire_transfer_create_inbound_params import WireTransferCreateInboundParams as WireTransferCreateInboundParams -from .physical_card_shipment_advance_params import ( - PhysicalCardShipmentAdvanceParams as PhysicalCardShipmentAdvanceParams, -) -from .ach_transfer_notification_of_change_params import ( - ACHTransferNotificationOfChangeParams as ACHTransferNotificationOfChangeParams, +from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams +from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams +from .physical_card_advance_shipment_params import ( + PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) +from .card_authorization_expiration_create_params import ( + CardAuthorizationExpirationCreateParams as CardAuthorizationExpirationCreateParams, +) from .inbound_wire_drawdown_request_create_params import ( InboundWireDrawdownRequestCreateParams as InboundWireDrawdownRequestCreateParams, ) @@ -35,12 +37,12 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) -from .inbound_international_ach_transfer_create_params import ( - InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, +from .ach_transfer_create_notification_of_change_params import ( + ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, ) -from .real_time_payments_transfer_create_inbound_params import ( - RealTimePaymentsTransferCreateInboundParams as RealTimePaymentsTransferCreateInboundParams, +from .inbound_real_time_payments_transfer_create_params import ( + InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, ) -from .inbound_real_time_payments_transfer_simulation_result import ( - InboundRealTimePaymentsTransferSimulationResult as InboundRealTimePaymentsTransferSimulationResult, +from .inbound_real_time_payments_transfer_create_response import ( + InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, ) diff --git a/src/increase/types/simulations/ach_transfer_create_inbound_params.py b/src/increase/types/simulations/ach_transfer_create_inbound_params.py deleted file mode 100644 index 077cea994..000000000 --- a/src/increase/types/simulations/ach_transfer_create_inbound_params.py +++ /dev/null @@ -1,51 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict - -from ..._utils import PropertyInfo - -__all__ = ["ACHTransferCreateInboundParams"] - - -class ACHTransferCreateInboundParams(TypedDict, total=False): - account_number_id: Required[str] - """The identifier of the Account Number the inbound ACH Transfer is for.""" - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - company_descriptive_date: str - """The description of the date of the transfer.""" - - company_discretionary_data: str - """Data associated with the transfer set by the sender.""" - - company_entry_description: str - """The description of the transfer set by the sender.""" - - company_id: str - """The sender's company ID.""" - - company_name: str - """The name of the sender.""" - - receiver_id_number: str - """The ID of the receiver of the transfer.""" - - receiver_name: str - """The name of the receiver of the transfer.""" - - resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """The time at which the transfer should be resolved. - - If not provided will resolve immediately. - """ diff --git a/src/increase/types/simulations/ach_transfer_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py similarity index 96% rename from src/increase/types/simulations/ach_transfer_notification_of_change_params.py rename to src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py index c08626084..13a1f88d9 100644 --- a/src/increase/types/simulations/ach_transfer_notification_of_change_params.py +++ b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["ACHTransferNotificationOfChangeParams"] +__all__ = ["ACHTransferCreateNotificationOfChangeParams"] -class ACHTransferNotificationOfChangeParams(TypedDict, total=False): +class ACHTransferCreateNotificationOfChangeParams(TypedDict, total=False): change_code: Required[ Literal[ "incorrect_account_number", diff --git a/src/increase/types/simulations/card_authorize_params.py b/src/increase/types/simulations/card_authorization_create_params.py similarity index 93% rename from src/increase/types/simulations/card_authorize_params.py rename to src/increase/types/simulations/card_authorization_create_params.py index ec64c91be..875f3cf23 100644 --- a/src/increase/types/simulations/card_authorize_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardAuthorizeParams"] +__all__ = ["CardAuthorizationCreateParams"] -class CardAuthorizeParams(TypedDict, total=False): +class CardAuthorizationCreateParams(TypedDict, total=False): amount: Required[int] """The authorization amount in cents.""" diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py new file mode 100644 index 000000000..5944bf00d --- /dev/null +++ b/src/increase/types/simulations/card_authorization_create_response.py @@ -0,0 +1,33 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from ..pending_transaction import PendingTransaction +from ..declined_transaction import DeclinedTransaction + +__all__ = ["CardAuthorizationCreateResponse"] + + +class CardAuthorizationCreateResponse(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the authorization attempt fails, this will contain the resulting + [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of `category: card_decline`. + """ + + pending_transaction: Optional[PendingTransaction] = None + """ + If the authorization attempt succeeds, this will contain the resulting Pending + Transaction object. The Pending Transaction's `source` will be of + `category: card_authorization`. + """ + + type: Literal["inbound_card_authorization_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_card_authorization_simulation_result`. + """ diff --git a/src/increase/types/simulation_card_authorization_expirations_params.py b/src/increase/types/simulations/card_authorization_expiration_create_params.py similarity index 66% rename from src/increase/types/simulation_card_authorization_expirations_params.py rename to src/increase/types/simulations/card_authorization_expiration_create_params.py index 00aa2e09f..1fda3504d 100644 --- a/src/increase/types/simulation_card_authorization_expirations_params.py +++ b/src/increase/types/simulations/card_authorization_expiration_create_params.py @@ -4,9 +4,9 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardAuthorizationExpirationsParams"] +__all__ = ["CardAuthorizationExpirationCreateParams"] -class SimulationCardAuthorizationExpirationsParams(TypedDict, total=False): +class CardAuthorizationExpirationCreateParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to expire.""" diff --git a/src/increase/types/simulations/card_authorization_simulation.py b/src/increase/types/simulations/card_authorization_simulation.py deleted file mode 100644 index 7676b2b33..000000000 --- a/src/increase/types/simulations/card_authorization_simulation.py +++ /dev/null @@ -1,1817 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "CardAuthorizationSimulation", - "DeclinedTransaction", - "DeclinedTransactionSource", - "DeclinedTransactionSourceACHDecline", - "DeclinedTransactionSourceCardDecline", - "DeclinedTransactionSourceCardDeclineNetworkDetails", - "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", - "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", - "DeclinedTransactionSourceCardDeclineVerification", - "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", - "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", - "DeclinedTransactionSourceCheckDecline", - "DeclinedTransactionSourceCheckDepositRejection", - "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", - "DeclinedTransactionSourceInternationalACHDecline", - "DeclinedTransactionSourceWireDecline", - "PendingTransaction", - "PendingTransactionSource", - "PendingTransactionSourceAccountTransferInstruction", - "PendingTransactionSourceACHTransferInstruction", - "PendingTransactionSourceCardAuthorization", - "PendingTransactionSourceCardAuthorizationNetworkDetails", - "PendingTransactionSourceCardAuthorizationNetworkDetailsVisa", - "PendingTransactionSourceCardAuthorizationNetworkIdentifiers", - "PendingTransactionSourceCardAuthorizationVerification", - "PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode", - "PendingTransactionSourceCardAuthorizationVerificationCardholderAddress", - "PendingTransactionSourceCheckDepositInstruction", - "PendingTransactionSourceCheckTransferInstruction", - "PendingTransactionSourceInboundFundsHold", - "PendingTransactionSourceRealTimePaymentsTransferInstruction", - "PendingTransactionSourceWireTransferInstruction", -] - - -class DeclinedTransactionSourceACHDecline(BaseModel): - id: str - """The ACH Decline's identifier.""" - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - inbound_ach_transfer_id: str - """The identifier of the Inbound ACH Transfer object associated with this decline.""" - - originator_company_descriptive_date: Optional[str] = None - """The descriptive date of the transfer.""" - - originator_company_discretionary_data: Optional[str] = None - """The additional information included with the transfer.""" - - originator_company_id: str - """The identifier of the company that initiated the transfer.""" - - originator_company_name: str - """The name of the company that initiated the transfer.""" - - reason: Literal[ - "ach_route_canceled", - "ach_route_disabled", - "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", - "entity_not_active", - "field_error", - "group_locked", - "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", - "transaction_not_allowed", - "user_initiated", - ] - """Why the ACH transfer was declined. - - - `ach_route_canceled` - The account number is canceled. - - `ach_route_disabled` - The account number is disabled. - - `breaches_limit` - The transaction would cause an Increase limit to be - exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - - `user_initiated` - Your integration declined this transfer via the API. - """ - - receiver_id_number: Optional[str] = None - """The id of the receiver of the transfer.""" - - receiver_name: Optional[str] = None - """The name of the receiver of the transfer.""" - - trace_number: str - """The trace number of the transfer.""" - - type: Literal["ach_decline"] - """A constant representing the object's type. - - For this resource it will always be `ach_decline`. - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class DeclinedTransactionSourceCardDeclineVerification(BaseModel): - card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class DeclinedTransactionSourceCardDecline(BaseModel): - id: str - """The Card Decline identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - declined_transaction_id: str - """The identifier of the declined transaction created for this Card Decline.""" - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_details: DeclinedTransactionSourceCardDeclineNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """ - The declined amount in the minor unit of the transaction's presentment currency. - """ - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - reason: Literal[ - "card_not_active", - "physical_card_not_active", - "entity_not_active", - "group_locked", - "insufficient_funds", - "cvv2_mismatch", - "card_expiration_mismatch", - "transaction_not_allowed", - "breaches_limit", - "webhook_declined", - "webhook_timed_out", - "declined_by_stand_in_processing", - "invalid_physical_card", - "missing_original_authorization", - "suspected_fraud", - ] - """Why the transaction was declined. - - - `card_not_active` - The Card was not active. - - `physical_card_not_active` - The Physical Card was not active. - - `entity_not_active` - The account's entity was not active. - - `group_locked` - The account was inactive. - - `insufficient_funds` - The Card's Account did not have a sufficient available - balance. - - `cvv2_mismatch` - The given CVV2 did not match the card's value. - - `card_expiration_mismatch` - The given expiration date did not match the - card's value. Only applies when a CVV2 is present. - - `transaction_not_allowed` - The attempted card transaction is not allowed per - Increase's terms. - - `breaches_limit` - The transaction was blocked by a Limit. - - `webhook_declined` - Your application declined the transaction via webhook. - - `webhook_timed_out` - Your application webhook did not respond without the - required timeout. - - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. - - `missing_original_authorization` - The original card authorization for this - incremental authorization does not exist. - - `suspected_fraud` - The transaction was suspected to be fraudulent. Please - reach out to support@increase.com for more information. - """ - - verification: DeclinedTransactionSourceCardDeclineVerification - """Fields related to verification of cardholder-provided values.""" - - -class DeclinedTransactionSourceCheckDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """ - A computer-readable number printed on the MICR line of business checks, usually - the check number. This is useful for positive pay checks, but can be unreliably - transmitted by the bank of first deposit. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - declined check. - """ - - check_transfer_id: Optional[str] = None - """The identifier of the Check Transfer object associated with this decline.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - declined check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this decline. - """ - - reason: Literal[ - "ach_route_disabled", - "ach_route_canceled", - "altered_or_fictitious", - "breaches_limit", - "entity_not_active", - "group_locked", - "insufficient_funds", - "stop_payment_requested", - "duplicate_presentment", - "not_authorized", - "amount_mismatch", - "not_our_item", - "no_account_number_found", - "refer_to_image", - "unable_to_process", - "user_initiated", - ] - """Why the check was declined. - - - `ach_route_disabled` - The account number is disabled. - - `ach_route_canceled` - The account number is canceled. - - `altered_or_fictitious` - The deposited check was altered or fictitious. - - `breaches_limit` - The transaction would cause a limit to be exceeded. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `stop_payment_requested` - Stop payment requested for this check. - - `duplicate_presentment` - The check was a duplicate deposit. - - `not_authorized` - The check was not authorized. - - `amount_mismatch` - The amount the receiving bank is attempting to deposit - does not match the amount on the check. - - `not_our_item` - The check attempting to be deposited does not belong to - Increase. - - `no_account_number_found` - The account number on the check does not exist at - Increase. - - `refer_to_image` - The check is not readable. Please refer to the image. - - `unable_to_process` - The check cannot be processed. This is rare: please - contact support. - - `user_initiated` - Your integration declined this check via the API. - """ - - -class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - amount: int - """The rejected amount in the minor unit of check's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was rejected.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "incomplete_image", - "duplicate", - "poor_image_quality", - "incorrect_amount", - "incorrect_recipient", - "not_eligible_for_mobile_deposit", - "missing_required_data_elements", - "suspected_fraud", - "deposit_window_expired", - "unknown", - ] - """Why the check deposit was rejected. - - - `incomplete_image` - The check's image is incomplete. - - `duplicate` - This is a duplicate check submission. - - `poor_image_quality` - This check has poor image quality. - - `incorrect_amount` - The check was deposited with the incorrect amount. - - `incorrect_recipient` - The check is made out to someone other than the - account holder. - - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile - deposit. - - `missing_required_data_elements` - This check is missing at least one required - field. - - `suspected_fraud` - This check is suspected to be fraudulent. - - `deposit_window_expired` - This check's deposit window has expired. - - `unknown` - The check was rejected for an unknown reason. - """ - - rejected_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was rejected. - """ - - -class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined - transfer's currency. This will always be "USD" for a Real-Time Payments - transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "account_restricted", - "group_locked", - "entity_not_active", - "real_time_payments_not_enabled", - ] - """Why the transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `account_restricted` - Your account is restricted. - - `group_locked` - Your account is inactive. - - `entity_not_active` - The account's entity is not active. - - `real_time_payments_not_enabled` - Your account is not enabled to receive - Real-Time Payments transfers. - """ - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the declined transfer.""" - - -class DeclinedTransactionSourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - -class DeclinedTransactionSourceWireDecline(BaseModel): - inbound_wire_transfer_id: str - """The identifier of the Inbound Wire Transfer that was declined.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "entity_not_active", - "group_locked", - "no_account_number", - "transaction_not_allowed", - ] - """Why the wire transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `no_account_number` - The beneficiary account number does not exist. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - """ - - -class DeclinedTransactionSource(BaseModel): - ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None - """An ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_decline`. - """ - - card_decline: Optional[DeclinedTransactionSourceCardDecline] = None - """A Card Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_decline`. - """ - - category: Literal[ - "ach_decline", - "card_decline", - "check_decline", - "inbound_real_time_payments_transfer_decline", - "international_ach_decline", - "wire_decline", - "check_deposit_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. - - `card_decline` - Card Decline: details will be under the `card_decline` - object. - - `check_decline` - Check Decline: details will be under the `check_decline` - object. - - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments - Transfer Decline: details will be under the - `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - - `wire_decline` - Wire Decline: details will be under the `wire_decline` - object. - - `check_deposit_rejection` - Check Deposit Rejection: details will be under the - `check_deposit_rejection` object. - - `other` - The Declined Transaction was made for an undocumented or deprecated - reason. - """ - - check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None - """A Check Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_decline`. - """ - - check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None - """A Check Deposit Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_rejection`. - """ - - inbound_real_time_payments_transfer_decline: Optional[ - DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline - ] = None - """An Inbound Real-Time Payments Transfer Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_decline`. - """ - - international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - - wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None - """A Wire Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_decline`. - """ - - -class DeclinedTransaction(BaseModel): - id: str - """The Declined Transaction identifier.""" - - account_id: str - """The identifier for the Account the Declined Transaction belongs to.""" - - amount: int - """The Declined Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined - Transaction's currency. This will match the currency on the Declined - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """This is the description the vendor provides.""" - - route_id: Optional[str] = None - """The identifier for the route this Declined Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Declined Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: DeclinedTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Declined Transaction. For example, for a card transaction this lists the - merchant's industry and location. Note that for backwards compatibility reasons, - additional undocumented keys may appear in this object. These should be treated - as deprecated and will be removed in the future. - """ - - type: Literal["declined_transaction"] - """A constant representing the object's type. - - For this resource it will always be `declined_transaction`. - """ - - -class PendingTransactionSourceAccountTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - transfer_id: str - """The identifier of the Account Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceACHTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - transfer_id: str - """The identifier of the ACH Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceCardAuthorizationNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class PendingTransactionSourceCardAuthorizationNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[PendingTransactionSourceCardAuthorizationNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class PendingTransactionSourceCardAuthorizationNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class PendingTransactionSourceCardAuthorizationVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class PendingTransactionSourceCardAuthorizationVerification(BaseModel): - card_verification_code: PendingTransactionSourceCardAuthorizationVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: PendingTransactionSourceCardAuthorizationVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class PendingTransactionSourceCardAuthorization(BaseModel): - id: str - """The Card Authorization identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - direction: Literal["settlement", "refund"] - """ - The direction descibes the direction the funds will move, either from the - cardholder to the merchant or from the merchant to the cardholder. - - - `settlement` - A regular card authorization where funds are debited from the - cardholder. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - expires_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) when this authorization - will expire and the pending transaction will be released. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - network_details: PendingTransactionSourceCardAuthorizationNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: PendingTransactionSourceCardAuthorizationNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - pending_transaction_id: Optional[str] = None - """The identifier of the Pending Transaction associated with this Transaction.""" - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """The pending amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - type: Literal["card_authorization"] - """A constant representing the object's type. - - For this resource it will always be `card_authorization`. - """ - - verification: PendingTransactionSourceCardAuthorizationVerification - """Fields related to verification of cardholder-provided values.""" - - -class PendingTransactionSourceCheckDepositInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the File containing the image of the back of the check that - was deposited. - """ - - check_deposit_id: Optional[str] = None - """The identifier of the Check Deposit.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - front_image_file_id: str - """ - The identifier of the File containing the image of the front of the check that - was deposited. - """ - - -class PendingTransactionSourceCheckTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - transfer_id: str - """The identifier of the Check Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSourceInboundFundsHold(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - - amount: int - """The held amount in the minor unit of the account's currency. - - For dollars, for example, this is cents. - """ - - automatically_releases_at: datetime - """When the hold will be released automatically. - - Certain conditions may cause it to be released before this time. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - was created. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - held_transaction_id: Optional[str] = None - """The ID of the Transaction for which funds were held.""" - - pending_transaction_id: Optional[str] = None - """The ID of the Pending Transaction representing the held funds.""" - - released_at: Optional[datetime] = None - """When the hold was released (if it has been released).""" - - status: Literal["held", "complete"] - """The status of the hold. - - - `held` - Funds are still being held. - - `complete` - Funds have been released. - """ - - type: Literal["inbound_funds_hold"] - """A constant representing the object's type. - - For this resource it will always be `inbound_funds_hold`. - """ - - -class PendingTransactionSourceRealTimePaymentsTransferInstruction(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - transfer_id: str - """ - The identifier of the Real-Time Payments Transfer that led to this Pending - Transaction. - """ - - -class PendingTransactionSourceWireTransferInstruction(BaseModel): - account_number: str - """The account number for the destination account.""" - - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - message_to_recipient: str - """The message that will show on the recipient's bank statement.""" - - routing_number: str - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - destination account. - """ - - transfer_id: str - """The identifier of the Wire Transfer that led to this Pending Transaction.""" - - -class PendingTransactionSource(BaseModel): - account_transfer_instruction: Optional[PendingTransactionSourceAccountTransferInstruction] = None - """An Account Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_instruction`. - """ - - ach_transfer_instruction: Optional[PendingTransactionSourceACHTransferInstruction] = None - """An ACH Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_instruction`. - """ - - card_authorization: Optional[PendingTransactionSourceCardAuthorization] = None - """A Card Authorization object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_authorization`. - """ - - category: Literal[ - "account_transfer_instruction", - "ach_transfer_instruction", - "card_authorization", - "check_deposit_instruction", - "check_transfer_instruction", - "inbound_funds_hold", - "real_time_payments_transfer_instruction", - "wire_transfer_instruction", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `account_transfer_instruction` - Account Transfer Instruction: details will be - under the `account_transfer_instruction` object. - - `ach_transfer_instruction` - ACH Transfer Instruction: details will be under - the `ach_transfer_instruction` object. - - `card_authorization` - Card Authorization: details will be under the - `card_authorization` object. - - `check_deposit_instruction` - Check Deposit Instruction: details will be under - the `check_deposit_instruction` object. - - `check_transfer_instruction` - Check Transfer Instruction: details will be - under the `check_transfer_instruction` object. - - `inbound_funds_hold` - Inbound Funds Hold: details will be under the - `inbound_funds_hold` object. - - `real_time_payments_transfer_instruction` - Real-Time Payments Transfer - Instruction: details will be under the - `real_time_payments_transfer_instruction` object. - - `wire_transfer_instruction` - Wire Transfer Instruction: details will be under - the `wire_transfer_instruction` object. - - `other` - The Pending Transaction was made for an undocumented or deprecated - reason. - """ - - check_deposit_instruction: Optional[PendingTransactionSourceCheckDepositInstruction] = None - """A Check Deposit Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_instruction`. - """ - - check_transfer_instruction: Optional[PendingTransactionSourceCheckTransferInstruction] = None - """A Check Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_instruction`. - """ - - inbound_funds_hold: Optional[PendingTransactionSourceInboundFundsHold] = None - """An Inbound Funds Hold object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_funds_hold`. - """ - - real_time_payments_transfer_instruction: Optional[ - PendingTransactionSourceRealTimePaymentsTransferInstruction - ] = None - """A Real-Time Payments Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `real_time_payments_transfer_instruction`. - """ - - wire_transfer_instruction: Optional[PendingTransactionSourceWireTransferInstruction] = None - """A Wire Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_instruction`. - """ - - -class PendingTransaction(BaseModel): - id: str - """The Pending Transaction identifier.""" - - account_id: str - """The identifier for the account this Pending Transaction belongs to.""" - - amount: int - """The Pending Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - completed_at: Optional[datetime] = None - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending - Transaction was completed. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending - Transaction's currency. This will match the currency on the Pending - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """ - For a Pending Transaction related to a transfer, this is the description you - provide. For a Pending Transaction related to a payment, this is the description - the vendor provides. - """ - - route_id: Optional[str] = None - """The identifier for the route this Pending Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Pending Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: PendingTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Pending Transaction. For example, for a card transaction this lists the - merchant's industry and location. - """ - - status: Literal["pending", "complete"] - """ - Whether the Pending Transaction has been confirmed and has an associated - Transaction. - - - `pending` - The Pending Transaction is still awaiting confirmation. - - `complete` - The Pending Transaction is confirmed. An associated Transaction - exists for this object. The Pending Transaction will no longer count against - your balance and can generally be hidden from UIs, etc. - """ - - type: Literal["pending_transaction"] - """A constant representing the object's type. - - For this resource it will always be `pending_transaction`. - """ - - -class CardAuthorizationSimulation(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the authorization attempt fails, this will contain the resulting - [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of `category: card_decline`. - """ - - pending_transaction: Optional[PendingTransaction] = None - """ - If the authorization attempt succeeds, this will contain the resulting Pending - Transaction object. The Pending Transaction's `source` will be of - `category: card_authorization`. - """ - - type: Literal["inbound_card_authorization_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_card_authorization_simulation_result`. - """ diff --git a/src/increase/types/simulation_card_fuel_confirmations_params.py b/src/increase/types/simulations/card_fuel_confirmation_create_params.py similarity index 78% rename from src/increase/types/simulation_card_fuel_confirmations_params.py rename to src/increase/types/simulations/card_fuel_confirmation_create_params.py index 90af445be..4ebfc413a 100644 --- a/src/increase/types/simulation_card_fuel_confirmations_params.py +++ b/src/increase/types/simulations/card_fuel_confirmation_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardFuelConfirmationsParams"] +__all__ = ["CardFuelConfirmationCreateParams"] -class SimulationCardFuelConfirmationsParams(TypedDict, total=False): +class CardFuelConfirmationCreateParams(TypedDict, total=False): amount: Required[int] """ The amount of the fuel_confirmation in minor units in the card authorization's diff --git a/src/increase/types/simulation_card_increments_params.py b/src/increase/types/simulations/card_increment_create_params.py similarity index 87% rename from src/increase/types/simulation_card_increments_params.py rename to src/increase/types/simulations/card_increment_create_params.py index 564c0631c..85f2aafc5 100644 --- a/src/increase/types/simulation_card_increments_params.py +++ b/src/increase/types/simulations/card_increment_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardIncrementsParams"] +__all__ = ["CardIncrementCreateParams"] -class SimulationCardIncrementsParams(TypedDict, total=False): +class CardIncrementCreateParams(TypedDict, total=False): amount: Required[int] """ The amount of the increment in minor units in the card authorization's currency. diff --git a/src/increase/types/simulation_card_reversals_params.py b/src/increase/types/simulations/card_reversal_create_params.py similarity index 80% rename from src/increase/types/simulation_card_reversals_params.py rename to src/increase/types/simulations/card_reversal_create_params.py index 3ee6bdc91..ad0b9c8d2 100644 --- a/src/increase/types/simulation_card_reversals_params.py +++ b/src/increase/types/simulations/card_reversal_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["SimulationCardReversalsParams"] +__all__ = ["CardReversalCreateParams"] -class SimulationCardReversalsParams(TypedDict, total=False): +class CardReversalCreateParams(TypedDict, total=False): card_payment_id: Required[str] """The identifier of the Card Payment to create a reversal on.""" diff --git a/src/increase/types/simulations/card_settlement_params.py b/src/increase/types/simulations/card_settlement_create_params.py similarity index 84% rename from src/increase/types/simulations/card_settlement_params.py rename to src/increase/types/simulations/card_settlement_create_params.py index 53aa972b8..f93244b00 100644 --- a/src/increase/types/simulations/card_settlement_params.py +++ b/src/increase/types/simulations/card_settlement_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardSettlementParams"] +__all__ = ["CardSettlementCreateParams"] -class CardSettlementParams(TypedDict, total=False): +class CardSettlementCreateParams(TypedDict, total=False): card_id: Required[str] """The identifier of the Card to create a settlement on.""" diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py new file mode 100644 index 000000000..fa743818c --- /dev/null +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -0,0 +1,89 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["InboundACHTransferCreateParams"] + + +class InboundACHTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the inbound ACH Transfer is for.""" + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + company_descriptive_date: str + """The description of the date of the transfer.""" + + company_discretionary_data: str + """Data associated with the transfer set by the sender.""" + + company_entry_description: str + """The description of the transfer set by the sender.""" + + company_id: str + """The sender's company ID.""" + + company_name: str + """The name of the sender.""" + + receiver_id_number: str + """The ID of the receiver of the transfer.""" + + receiver_name: str + """The name of the receiver of the transfer.""" + + resolve_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The time at which the transfer should be resolved. + + If not provided will resolve immediately. + """ + + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + """The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer.py b/src/increase/types/simulations/inbound_international_ach_transfer.py deleted file mode 100644 index f7ccb3353..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer.py +++ /dev/null @@ -1,260 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["InboundInternationalACHTransfer"] - - -class InboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py deleted file mode 100644 index 3cf052e3b..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["InboundInternationalACHTransferCreateParams"] - - -class InboundInternationalACHTransferCreateParams(TypedDict, total=False): - account_number_id: Required[str] - """ - The identifier of the Account Number the inbound international ACH Transfer is - for. - """ - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - foreign_payment_amount: Required[int] - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - originating_currency_code: Required[str] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - receiver_identification_number: str - """An identification number the originator uses for the receiver.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py similarity index 88% rename from src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py rename to src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py index f4dfec4a0..78d9b323e 100644 --- a/src/increase/types/simulations/real_time_payments_transfer_create_inbound_params.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["RealTimePaymentsTransferCreateInboundParams"] +__all__ = ["InboundRealTimePaymentsTransferCreateParams"] -class RealTimePaymentsTransferCreateInboundParams(TypedDict, total=False): +class InboundRealTimePaymentsTransferCreateParams(TypedDict, total=False): account_number_id: Required[str] """ The identifier of the Account Number the inbound Real-Time Payments Transfer is diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py new file mode 100644 index 000000000..2e254b388 --- /dev/null +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py @@ -0,0 +1,34 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel +from ..transaction import Transaction +from ..declined_transaction import DeclinedTransaction + +__all__ = ["InboundRealTimePaymentsTransferCreateResponse"] + + +class InboundRealTimePaymentsTransferCreateResponse(BaseModel): + declined_transaction: Optional[DeclinedTransaction] = None + """ + If the Real-Time Payments Transfer attempt fails, this will contain the + resulting [Declined Transaction](#declined-transactions) object. The Declined + Transaction's `source` will be of + `category: inbound_real_time_payments_transfer_decline`. + """ + + transaction: Optional[Transaction] = None + """ + If the Real-Time Payments Transfer attempt succeeds, this will contain the + resulting [Transaction](#transactions) object. The Transaction's `source` will + be of `category: inbound_real_time_payments_transfer_confirmation`. + """ + + type: Literal["inbound_real_time_payments_transfer_simulation_result"] + """A constant representing the object's type. + + For this resource it will always be + `inbound_real_time_payments_transfer_simulation_result`. + """ diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py deleted file mode 100644 index f1f43a1e5..000000000 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_simulation_result.py +++ /dev/null @@ -1,3857 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import date, datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = [ - "InboundRealTimePaymentsTransferSimulationResult", - "DeclinedTransaction", - "DeclinedTransactionSource", - "DeclinedTransactionSourceACHDecline", - "DeclinedTransactionSourceCardDecline", - "DeclinedTransactionSourceCardDeclineNetworkDetails", - "DeclinedTransactionSourceCardDeclineNetworkDetailsVisa", - "DeclinedTransactionSourceCardDeclineNetworkIdentifiers", - "DeclinedTransactionSourceCardDeclineVerification", - "DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode", - "DeclinedTransactionSourceCardDeclineVerificationCardholderAddress", - "DeclinedTransactionSourceCheckDecline", - "DeclinedTransactionSourceCheckDepositRejection", - "DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline", - "DeclinedTransactionSourceInternationalACHDecline", - "DeclinedTransactionSourceWireDecline", - "Transaction", - "TransactionSource", - "TransactionSourceAccountTransferIntention", - "TransactionSourceACHTransferIntention", - "TransactionSourceACHTransferRejection", - "TransactionSourceACHTransferReturn", - "TransactionSourceCardDisputeAcceptance", - "TransactionSourceCardDisputeLoss", - "TransactionSourceCardRefund", - "TransactionSourceCardRefundNetworkIdentifiers", - "TransactionSourceCardRefundPurchaseDetails", - "TransactionSourceCardRefundPurchaseDetailsCarRental", - "TransactionSourceCardRefundPurchaseDetailsLodging", - "TransactionSourceCardRefundPurchaseDetailsTravel", - "TransactionSourceCardRefundPurchaseDetailsTravelAncillary", - "TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService", - "TransactionSourceCardRefundPurchaseDetailsTravelTripLeg", - "TransactionSourceCardRevenuePayment", - "TransactionSourceCardSettlement", - "TransactionSourceCardSettlementNetworkIdentifiers", - "TransactionSourceCardSettlementPurchaseDetails", - "TransactionSourceCardSettlementPurchaseDetailsCarRental", - "TransactionSourceCardSettlementPurchaseDetailsLodging", - "TransactionSourceCardSettlementPurchaseDetailsTravel", - "TransactionSourceCardSettlementPurchaseDetailsTravelAncillary", - "TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService", - "TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg", - "TransactionSourceCashbackPayment", - "TransactionSourceCheckDepositAcceptance", - "TransactionSourceCheckDepositReturn", - "TransactionSourceCheckTransferDeposit", - "TransactionSourceCheckTransferStopPaymentRequest", - "TransactionSourceFeePayment", - "TransactionSourceInboundACHTransfer", - "TransactionSourceInboundACHTransferAddenda", - "TransactionSourceInboundACHTransferAddendaFreeform", - "TransactionSourceInboundACHTransferAddendaFreeformEntry", - "TransactionSourceInboundInternationalACHTransfer", - "TransactionSourceInboundRealTimePaymentsTransferConfirmation", - "TransactionSourceInboundWireDrawdownPayment", - "TransactionSourceInboundWireReversal", - "TransactionSourceInboundWireTransfer", - "TransactionSourceInterestPayment", - "TransactionSourceInternalSource", - "TransactionSourceRealTimePaymentsTransferAcknowledgement", - "TransactionSourceSampleFunds", - "TransactionSourceWireTransferIntention", - "TransactionSourceWireTransferRejection", -] - - -class DeclinedTransactionSourceACHDecline(BaseModel): - id: str - """The ACH Decline's identifier.""" - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - inbound_ach_transfer_id: str - """The identifier of the Inbound ACH Transfer object associated with this decline.""" - - originator_company_descriptive_date: Optional[str] = None - """The descriptive date of the transfer.""" - - originator_company_discretionary_data: Optional[str] = None - """The additional information included with the transfer.""" - - originator_company_id: str - """The identifier of the company that initiated the transfer.""" - - originator_company_name: str - """The name of the company that initiated the transfer.""" - - reason: Literal[ - "ach_route_canceled", - "ach_route_disabled", - "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", - "entity_not_active", - "field_error", - "group_locked", - "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", - "transaction_not_allowed", - "user_initiated", - ] - """Why the ACH transfer was declined. - - - `ach_route_canceled` - The account number is canceled. - - `ach_route_disabled` - The account number is disabled. - - `breaches_limit` - The transaction would cause an Increase limit to be - exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - - `user_initiated` - Your integration declined this transfer via the API. - """ - - receiver_id_number: Optional[str] = None - """The id of the receiver of the transfer.""" - - receiver_name: Optional[str] = None - """The name of the receiver of the transfer.""" - - trace_number: str - """The trace number of the transfer.""" - - type: Literal["ach_decline"] - """A constant representing the object's type. - - For this resource it will always be `ach_decline`. - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetailsVisa(BaseModel): - electronic_commerce_indicator: Optional[ - Literal[ - "mail_phone_order", - "recurring", - "installment", - "unknown_mail_phone_order", - "secure_electronic_commerce", - "non_authenticated_security_transaction_at_3ds_capable_merchant", - "non_authenticated_security_transaction", - "non_secure_transaction", - ] - ] = None - """ - For electronic commerce transactions, this identifies the level of security used - in obtaining the customer's payment credential. For mail or telephone order - transactions, identifies the type of mail or telephone order. - - - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate - that the transaction is a mail/phone order purchase, not a recurring - transaction or installment payment. For domestic transactions in the US - region, this value may also indicate one bill payment transaction in the - card-present or card-absent environments. - - `recurring` - Recurring transaction: Payment indicator used to indicate a - recurring transaction that originates from an acquirer in the US region. - - `installment` - Installment payment: Payment indicator used to indicate one - purchase of goods or services that is billed to the account in multiple - charges over a period of time agreed upon by the cardholder and merchant from - transactions that originate from an acquirer in the US region. - - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to - indicate that the type of mail/telephone order is unknown. - - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to - indicate that the electronic commerce transaction has been authenticated using - e.g., 3-D Secure - - `non_authenticated_security_transaction_at_3ds_capable_merchant` - - Non-authenticated security transaction at a 3-D Secure-capable merchant, and - merchant attempted to authenticate the cardholder using 3-D Secure: Use to - identify an electronic commerce transaction where the merchant attempted to - authenticate the cardholder using 3-D Secure, but was unable to complete the - authentication because the issuer or cardholder does not participate in the - 3-D Secure program. - - `non_authenticated_security_transaction` - Non-authenticated security - transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed - using 3-D Secure. - - `non_secure_transaction` - Non-secure transaction: Use to identify an - electronic commerce transaction that has no data protection. - """ - - point_of_service_entry_mode: Optional[ - Literal[ - "unknown", - "manual", - "magnetic_stripe_no_cvv", - "optical_code", - "integrated_circuit_card", - "contactless", - "credential_on_file", - "magnetic_stripe", - "contactless_magnetic_stripe", - "integrated_circuit_card_no_cvv", - ] - ] = None - """ - The method used to enter the cardholder's primary account number and card - expiration date. - - - `unknown` - Unknown - - `manual` - Manual key entry - - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification - value - - `optical_code` - Optical code - - `integrated_circuit_card` - Contact chip card - - `contactless` - Contactless read of chip card - - `credential_on_file` - Transaction initiated using a credential that has - previously been stored on file - - `magnetic_stripe` - Magnetic stripe read - - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data - - `integrated_circuit_card_no_cvv` - Contact chip card, without card - verification value - """ - - -class DeclinedTransactionSourceCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] - """The payment network used to process this card authorization. - - - `visa` - Visa - """ - - visa: Optional[DeclinedTransactionSourceCardDeclineNetworkDetailsVisa] = None - """Fields specific to the `visa` network.""" - - -class DeclinedTransactionSourceCardDeclineNetworkIdentifiers(BaseModel): - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. - """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. - """ - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode(BaseModel): - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - - -class DeclinedTransactionSourceCardDeclineVerificationCardholderAddress(BaseModel): - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. - """ - - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - ] - """The address verification result returned to the card network. - - - `not_checked` - No adress was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - """ - - -class DeclinedTransactionSourceCardDeclineVerification(BaseModel): - card_verification_code: DeclinedTransactionSourceCardDeclineVerificationCardVerificationCode - """ - Fields related to verification of the Card Verification Code, a 3-digit code on - the back of the card. - """ - - cardholder_address: DeclinedTransactionSourceCardDeclineVerificationCardholderAddress - """ - Cardholder address provided in the authorization request and the address on file - we verified it against. - """ - - -class DeclinedTransactionSourceCardDecline(BaseModel): - id: str - """The Card Decline identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ - - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - declined_transaction_id: str - """The identifier of the declined transaction created for this Card Decline.""" - - digital_wallet_token_id: Optional[str] = None - """ - If the authorization was made via a Digital Wallet Token (such as an Apple Pay - purchase), the identifier of the token that was used. - """ - - merchant_acceptor_id: str - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: Optional[str] = None - """ - The Merchant Category Code (commonly abbreviated as MCC) of the merchant the - card is transacting with. - """ - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: Optional[str] = None - """The country the merchant resides in.""" - - merchant_descriptor: str - """The merchant descriptor of the merchant the card is transacting with.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_details: DeclinedTransactionSourceCardDeclineNetworkDetails - """Fields specific to the `network`.""" - - network_identifiers: DeclinedTransactionSourceCardDeclineNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - physical_card_id: Optional[str] = None - """ - If the authorization was made in-person with a physical card, the Physical Card - that was used. - """ - - presentment_amount: int - """ - The declined amount in the minor unit of the transaction's presentment currency. - """ - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" - ] - """ - The processing category describes the intent behind the authorization, such as - whether it was used for bill payments or an automatic fuel dispenser. - - - `account_funding` - Account funding transactions are transactions used to - e.g., fund an account or transfer funds between accounts. - - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur - when a card is used at a gas pump, prior to the actual transaction amount - being known. They are followed by an advice message that updates the amount of - the pending transaction. - - `bill_payment` - A transaction used to pay a bill. - - `purchase` - A regular purchase. - - `quasi_cash` - Quasi-cash transactions represent purchases of items which may - be convertible to cash. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - - real_time_decision_id: Optional[str] = None - """ - The identifier of the Real-Time Decision sent to approve or decline this - transaction. - """ - - reason: Literal[ - "card_not_active", - "physical_card_not_active", - "entity_not_active", - "group_locked", - "insufficient_funds", - "cvv2_mismatch", - "card_expiration_mismatch", - "transaction_not_allowed", - "breaches_limit", - "webhook_declined", - "webhook_timed_out", - "declined_by_stand_in_processing", - "invalid_physical_card", - "missing_original_authorization", - "suspected_fraud", - ] - """Why the transaction was declined. - - - `card_not_active` - The Card was not active. - - `physical_card_not_active` - The Physical Card was not active. - - `entity_not_active` - The account's entity was not active. - - `group_locked` - The account was inactive. - - `insufficient_funds` - The Card's Account did not have a sufficient available - balance. - - `cvv2_mismatch` - The given CVV2 did not match the card's value. - - `card_expiration_mismatch` - The given expiration date did not match the - card's value. Only applies when a CVV2 is present. - - `transaction_not_allowed` - The attempted card transaction is not allowed per - Increase's terms. - - `breaches_limit` - The transaction was blocked by a Limit. - - `webhook_declined` - Your application declined the transaction via webhook. - - `webhook_timed_out` - Your application webhook did not respond without the - required timeout. - - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. - - `missing_original_authorization` - The original card authorization for this - incremental authorization does not exist. - - `suspected_fraud` - The transaction was suspected to be fraudulent. Please - reach out to support@increase.com for more information. - """ - - verification: DeclinedTransactionSourceCardDeclineVerification - """Fields related to verification of cardholder-provided values.""" - - -class DeclinedTransactionSourceCheckDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """ - A computer-readable number printed on the MICR line of business checks, usually - the check number. This is useful for positive pay checks, but can be unreliably - transmitted by the bank of first deposit. - """ - - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - declined check. - """ - - check_transfer_id: Optional[str] = None - """The identifier of the Check Transfer object associated with this decline.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - declined check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this decline. - """ - - reason: Literal[ - "ach_route_disabled", - "ach_route_canceled", - "altered_or_fictitious", - "breaches_limit", - "entity_not_active", - "group_locked", - "insufficient_funds", - "stop_payment_requested", - "duplicate_presentment", - "not_authorized", - "amount_mismatch", - "not_our_item", - "no_account_number_found", - "refer_to_image", - "unable_to_process", - "user_initiated", - ] - """Why the check was declined. - - - `ach_route_disabled` - The account number is disabled. - - `ach_route_canceled` - The account number is canceled. - - `altered_or_fictitious` - The deposited check was altered or fictitious. - - `breaches_limit` - The transaction would cause a limit to be exceeded. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - - `stop_payment_requested` - Stop payment requested for this check. - - `duplicate_presentment` - The check was a duplicate deposit. - - `not_authorized` - The check was not authorized. - - `amount_mismatch` - The amount the receiving bank is attempting to deposit - does not match the amount on the check. - - `not_our_item` - The check attempting to be deposited does not belong to - Increase. - - `no_account_number_found` - The account number on the check does not exist at - Increase. - - `refer_to_image` - The check is not readable. Please refer to the image. - - `unable_to_process` - The check cannot be processed. This is rare: please - contact support. - - `user_initiated` - Your integration declined this check via the API. - """ - - -class DeclinedTransactionSourceCheckDepositRejection(BaseModel): - amount: int - """The rejected amount in the minor unit of check's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was rejected.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "incomplete_image", - "duplicate", - "poor_image_quality", - "incorrect_amount", - "incorrect_recipient", - "not_eligible_for_mobile_deposit", - "missing_required_data_elements", - "suspected_fraud", - "deposit_window_expired", - "unknown", - ] - """Why the check deposit was rejected. - - - `incomplete_image` - The check's image is incomplete. - - `duplicate` - This is a duplicate check submission. - - `poor_image_quality` - This check has poor image quality. - - `incorrect_amount` - The check was deposited with the incorrect amount. - - `incorrect_recipient` - The check is made out to someone other than the - account holder. - - `not_eligible_for_mobile_deposit` - This check was not eligible for mobile - deposit. - - `missing_required_data_elements` - This check is missing at least one required - field. - - `suspected_fraud` - This check is suspected to be fraudulent. - - `deposit_window_expired` - This check's deposit window has expired. - - `unknown` - The check was rejected for an unknown reason. - """ - - rejected_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was rejected. - """ - - -class DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined - transfer's currency. This will always be "USD" for a Real-Time Payments - transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "account_restricted", - "group_locked", - "entity_not_active", - "real_time_payments_not_enabled", - ] - """Why the transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `account_restricted` - Your account is restricted. - - `group_locked` - Your account is inactive. - - `entity_not_active` - The account's entity is not active. - - `real_time_payments_not_enabled` - Your account is not enabled to receive - Real-Time Payments transfers. - """ - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the declined transfer.""" - - -class DeclinedTransactionSourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - -class DeclinedTransactionSourceWireDecline(BaseModel): - inbound_wire_transfer_id: str - """The identifier of the Inbound Wire Transfer that was declined.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "entity_not_active", - "group_locked", - "no_account_number", - "transaction_not_allowed", - ] - """Why the wire transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `entity_not_active` - The account's entity is not active. - - `group_locked` - Your account is inactive. - - `no_account_number` - The beneficiary account number does not exist. - - `transaction_not_allowed` - The transaction is not allowed per Increase's - terms. - """ - - -class DeclinedTransactionSource(BaseModel): - ach_decline: Optional[DeclinedTransactionSourceACHDecline] = None - """An ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_decline`. - """ - - card_decline: Optional[DeclinedTransactionSourceCardDecline] = None - """A Card Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_decline`. - """ - - category: Literal[ - "ach_decline", - "card_decline", - "check_decline", - "inbound_real_time_payments_transfer_decline", - "international_ach_decline", - "wire_decline", - "check_deposit_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `ach_decline` - ACH Decline: details will be under the `ach_decline` object. - - `card_decline` - Card Decline: details will be under the `card_decline` - object. - - `check_decline` - Check Decline: details will be under the `check_decline` - object. - - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments - Transfer Decline: details will be under the - `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - - `wire_decline` - Wire Decline: details will be under the `wire_decline` - object. - - `check_deposit_rejection` - Check Deposit Rejection: details will be under the - `check_deposit_rejection` object. - - `other` - The Declined Transaction was made for an undocumented or deprecated - reason. - """ - - check_decline: Optional[DeclinedTransactionSourceCheckDecline] = None - """A Check Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_decline`. - """ - - check_deposit_rejection: Optional[DeclinedTransactionSourceCheckDepositRejection] = None - """A Check Deposit Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_rejection`. - """ - - inbound_real_time_payments_transfer_decline: Optional[ - DeclinedTransactionSourceInboundRealTimePaymentsTransferDecline - ] = None - """An Inbound Real-Time Payments Transfer Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_decline`. - """ - - international_ach_decline: Optional[DeclinedTransactionSourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - - wire_decline: Optional[DeclinedTransactionSourceWireDecline] = None - """A Wire Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_decline`. - """ - - -class DeclinedTransaction(BaseModel): - id: str - """The Declined Transaction identifier.""" - - account_id: str - """The identifier for the Account the Declined Transaction belongs to.""" - - amount: int - """The Declined Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined - Transaction's currency. This will match the currency on the Declined - Transaction's Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """This is the description the vendor provides.""" - - route_id: Optional[str] = None - """The identifier for the route this Declined Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Declined Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: DeclinedTransactionSource - """ - This is an object giving more details on the network-level event that caused the - Declined Transaction. For example, for a card transaction this lists the - merchant's industry and location. Note that for backwards compatibility reasons, - additional undocumented keys may appear in this object. These should be treated - as deprecated and will be removed in the future. - """ - - type: Literal["declined_transaction"] - """A constant representing the object's type. - - For this resource it will always be `declined_transaction`. - """ - - -class TransactionSourceAccountTransferIntention(BaseModel): - amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """The description you chose to give the transfer.""" - - destination_account_id: str - """The identifier of the Account to where the Account Transfer was sent.""" - - source_account_id: str - """The identifier of the Account from where the Account Transfer was sent.""" - - transfer_id: str - """The identifier of the Account Transfer that led to this Pending Transaction.""" - - -class TransactionSourceACHTransferIntention(BaseModel): - account_number: str - """The account number for the destination account.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - routing_number: str - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - destination account. - """ - - statement_descriptor: str - """A description set when the ACH Transfer was created.""" - - transfer_id: str - """The identifier of the ACH Transfer that led to this Transaction.""" - - -class TransactionSourceACHTransferRejection(BaseModel): - transfer_id: str - """The identifier of the ACH Transfer that led to this Transaction.""" - - -class TransactionSourceACHTransferReturn(BaseModel): - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the transfer was created. - """ - - raw_return_reason_code: str - """The three character ACH return code, in the range R01 to R85.""" - - return_reason_code: Literal[ - "insufficient_fund", - "no_account", - "account_closed", - "invalid_account_number_structure", - "account_frozen_entry_returned_per_ofac_instruction", - "credit_entry_refused_by_receiver", - "unauthorized_debit_to_consumer_account_using_corporate_sec_code", - "corporate_customer_advised_not_authorized", - "payment_stopped", - "non_transaction_account", - "uncollected_funds", - "routing_number_check_digit_error", - "customer_advised_unauthorized_improper_ineligible_or_incomplete", - "amount_field_error", - "authorization_revoked_by_customer", - "invalid_ach_routing_number", - "file_record_edit_criteria", - "enr_invalid_individual_name", - "returned_per_odfi_request", - "limited_participation_dfi", - "incorrectly_coded_outbound_international_payment", - "account_sold_to_another_dfi", - "addenda_error", - "beneficiary_or_account_holder_deceased", - "customer_advised_not_within_authorization_terms", - "corrected_return", - "duplicate_entry", - "duplicate_return", - "enr_duplicate_enrollment", - "enr_invalid_dfi_account_number", - "enr_invalid_individual_id_number", - "enr_invalid_representative_payee_indicator", - "enr_invalid_transaction_code", - "enr_return_of_enr_entry", - "enr_routing_number_check_digit_error", - "entry_not_processed_by_gateway", - "field_error", - "foreign_receiving_dfi_unable_to_settle", - "iat_entry_coding_error", - "improper_effective_entry_date", - "improper_source_document_source_document_presented", - "invalid_company_id", - "invalid_foreign_receiving_dfi_identification", - "invalid_individual_id_number", - "item_and_rck_entry_presented_for_payment", - "item_related_to_rck_entry_is_ineligible", - "mandatory_field_error", - "misrouted_dishonored_return", - "misrouted_return", - "no_errors_found", - "non_acceptance_of_r62_dishonored_return", - "non_participant_in_iat_program", - "permissible_return_entry", - "permissible_return_entry_not_accepted", - "rdfi_non_settlement", - "rdfi_participant_in_check_truncation_program", - "representative_payee_deceased_or_unable_to_continue_in_that_capacity", - "return_not_a_duplicate", - "return_of_erroneous_or_reversing_debit", - "return_of_improper_credit_entry", - "return_of_improper_debit_entry", - "return_of_xck_entry", - "source_document_presented_for_payment", - "state_law_affecting_rck_acceptance", - "stop_payment_on_item_related_to_rck_entry", - "stop_payment_on_source_document", - "timely_original_return", - "trace_number_error", - "untimely_dishonored_return", - "untimely_return", - ] - """Why the ACH Transfer was returned. - - This reason code is sent by the receiving bank back to Increase. - - - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. - - `no_account` - Code R03. The account does not exist or the receiving bank was - unable to locate it. - - `account_closed` - Code R02. The account is closed at the receiving bank. - - `invalid_account_number_structure` - Code R04. The account number is invalid - at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. - - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. - The receiving bank rejected because of an incorrect Standard Entry Class code. - - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer - at the receiving bank reversed the transfer. - - `payment_stopped` - Code R08. The receiving bank stopped payment on this - transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. - - `uncollected_funds` - Code R09. The receiving bank account does not have - enough available balance for the transfer. - - `routing_number_check_digit_error` - Code R28. The routing number is - incorrect. - - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. - The customer at the receiving bank reversed the transfer. - - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. - - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - - `file_record_edit_criteria` - Code R17. The receiving bank is unable to - process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. - - `returned_per_odfi_request` - Code R06. The originating financial institution - asked for this transfer to be returned. The receiving bank is complying with - the request. - - `limited_participation_dfi` - Code R34. The receiving bank's regulatory - supervisor has limited their participation in the ACH network. - - `incorrectly_coded_outbound_international_payment` - Code R85. The outbound - international ACH transfer was incorrect. - - `account_sold_to_another_dfi` - Code R12. A rare return reason. The account - was sold to another bank. - - `addenda_error` - Code R25. The addenda record is incorrect or missing. - - `beneficiary_or_account_holder_deceased` - Code R15. A rare return reason. The - account holder is deceased. - - `customer_advised_not_within_authorization_terms` - Code R11. A rare return - reason. The customer authorized some payment to the sender, but this payment - was not in error. - - `corrected_return` - Code R74. A rare return reason. Sent in response to a - return that was returned with code `field_error`. The latest return should - include the corrected field(s). - - `duplicate_entry` - Code R24. A rare return reason. The receiving bank - received an exact duplicate entry with the same trace number and amount. - - `duplicate_return` - Code R67. A rare return reason. The return this message - refers to was a duplicate. - - `enr_duplicate_enrollment` - Code R47. A rare return reason. Only used for US - Government agency non-monetary automatic enrollment messages. - - `enr_invalid_dfi_account_number` - Code R43. A rare return reason. Only used - for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_individual_id_number` - Code R44. A rare return reason. Only used - for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_representative_payee_indicator` - Code R46. A rare return reason. - Only used for US Government agency non-monetary automatic enrollment messages. - - `enr_invalid_transaction_code` - Code R41. A rare return reason. Only used for - US Government agency non-monetary automatic enrollment messages. - - `enr_return_of_enr_entry` - Code R40. A rare return reason. Only used for US - Government agency non-monetary automatic enrollment messages. - - `enr_routing_number_check_digit_error` - Code R42. A rare return reason. Only - used for US Government agency non-monetary automatic enrollment messages. - - `entry_not_processed_by_gateway` - Code R84. A rare return reason. The - International ACH Transfer cannot be processed by the gateway. - - `field_error` - Code R69. A rare return reason. One or more of the fields in - the ACH were malformed. - - `foreign_receiving_dfi_unable_to_settle` - Code R83. A rare return reason. The - Foreign receiving bank was unable to settle this ACH transfer. - - `iat_entry_coding_error` - Code R80. A rare return reason. The International - ACH Transfer is malformed. - - `improper_effective_entry_date` - Code R18. A rare return reason. The ACH has - an improper effective entry date field. - - `improper_source_document_source_document_presented` - Code R39. A rare return - reason. The source document related to this ACH, usually an ACH check - conversion, was presented to the bank. - - `invalid_company_id` - Code R21. A rare return reason. The Company ID field of - the ACH was invalid. - - `invalid_foreign_receiving_dfi_identification` - Code R82. A rare return - reason. The foreign receiving bank identifier for an International ACH - Transfer was invalid. - - `invalid_individual_id_number` - Code R22. A rare return reason. The - Individual ID number field of the ACH was invalid. - - `item_and_rck_entry_presented_for_payment` - Code R53. A rare return reason. - Both the Represented Check ("RCK") entry and the original check were presented - to the bank. - - `item_related_to_rck_entry_is_ineligible` - Code R51. A rare return reason. - The Represented Check ("RCK") entry is ineligible. - - `mandatory_field_error` - Code R26. A rare return reason. The ACH is missing a - required field. - - `misrouted_dishonored_return` - Code R71. A rare return reason. The receiving - bank does not recognize the routing number in a dishonored return entry. - - `misrouted_return` - Code R61. A rare return reason. The receiving bank does - not recognize the routing number in a return entry. - - `no_errors_found` - Code R76. A rare return reason. Sent in response to a - return, the bank does not find the errors alleged by the returning bank. - - `non_acceptance_of_r62_dishonored_return` - Code R77. A rare return reason. - The receiving bank does not accept the return of the erroneous debit. The - funds are not available at the receiving bank. - - `non_participant_in_iat_program` - Code R81. A rare return reason. The - receiving bank does not accept International ACH Transfers. - - `permissible_return_entry` - Code R31. A rare return reason. A return that has - been agreed to be accepted by the receiving bank, despite falling outside of - the usual return timeframe. - - `permissible_return_entry_not_accepted` - Code R70. A rare return reason. The - receiving bank had not approved this return. - - `rdfi_non_settlement` - Code R32. A rare return reason. The receiving bank - could not settle this transaction. - - `rdfi_participant_in_check_truncation_program` - Code R30. A rare return - reason. The receiving bank does not accept Check Truncation ACH transfers. - - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - Code - R14. A rare return reason. The payee is deceased. - - `return_not_a_duplicate` - Code R75. A rare return reason. The originating - bank disputes that an earlier `duplicate_entry` return was actually a - duplicate. - - `return_of_erroneous_or_reversing_debit` - Code R62. A rare return reason. The - originating financial institution made a mistake and this return corrects it. - - `return_of_improper_credit_entry` - Code R36. A rare return reason. Return of - a malformed credit entry. - - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a - malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. - - `source_document_presented_for_payment` - Code R37. A rare return reason. The - source document related to this ACH, usually an ACH check conversion, was - presented to the bank. - - `state_law_affecting_rck_acceptance` - Code R50. A rare return reason. State - law prevents the bank from accepting the Represented Check ("RCK") entry. - - `stop_payment_on_item_related_to_rck_entry` - Code R52. A rare return reason. - A stop payment was issued on a Represented Check ("RCK") entry. - - `stop_payment_on_source_document` - Code R38. A rare return reason. The source - attached to the ACH, usually an ACH check conversion, includes a stop payment. - - `timely_original_return` - Code R73. A rare return reason. The bank receiving - an `untimely_return` believes it was on time. - - `trace_number_error` - Code R27. A rare return reason. An ACH return's trace - number does not match an originated ACH. - - `untimely_dishonored_return` - Code R72. A rare return reason. The dishonored - return was sent too late. - - `untimely_return` - Code R68. A rare return reason. The return was sent too - late. - """ - - trace_number: str - """A 15 digit number that was generated by the bank that initiated the return. - - The trace number of the return is different than that of the original transfer. - ACH trace numbers are not unique, but along with the amount and date this number - can be used to identify the ACH return at the bank that initiated it. - """ - - transaction_id: str - """The identifier of the Transaction associated with this return.""" - - transfer_id: str - """The identifier of the ACH Transfer associated with this return.""" - - -class TransactionSourceCardDisputeAcceptance(BaseModel): - accepted_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was accepted. - """ - - card_dispute_id: str - """The identifier of the Card Dispute that was accepted.""" - - transaction_id: str - """ - The identifier of the Transaction that was created to return the disputed funds - to your account. - """ - - -class TransactionSourceCardDisputeLoss(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was lost.""" - - explanation: str - """Why the Card Dispute was lost.""" - - lost_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was lost. - """ - - transaction_id: str - """ - The identifier of the Transaction that was created to debit the disputed funds - from your account. - """ - - -class TransactionSourceCardRefundNetworkIdentifiers(BaseModel): - acquirer_business_id: str - """ - A network assigned business ID that identifies the acquirer that processed this - transaction. - """ - - acquirer_reference_number: str - """A globally unique identifier for this settlement.""" - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class TransactionSourceCardRefundPurchaseDetailsCarRental(BaseModel): - car_class_code: Optional[str] = None - """Code indicating the vehicle's class.""" - - checkout_date: Optional[date] = None - """ - Date the customer picked up the car or, in the case of a no-show or pre-pay - transaction, the scheduled pick up date. - """ - - daily_rental_rate_amount: Optional[int] = None - """Daily rate being charged for the vehicle.""" - - daily_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - rate. - """ - - days_rented: Optional[int] = None - """Number of days the vehicle was rented.""" - - extra_charges: Optional[ - Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] - ] = None - """Additional charges (gas, late fee, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `gas` - Gas - - `extra_mileage` - Extra mileage - - `late_return` - Late return - - `one_way_service_fee` - One way service fee - - `parking_violation` - Parking violation - """ - - fuel_charges_amount: Optional[int] = None - """Fuel charges for the vehicle.""" - - fuel_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - assessed. - """ - - insurance_charges_amount: Optional[int] = None - """Any insurance being charged for the vehicle.""" - - insurance_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - charges assessed. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None - """ - An indicator that the cardholder is being billed for a reserved vehicle that was - not actually rented (that is, a "no-show" charge). - - - `not_applicable` - Not applicable - - `no_show_for_specialized_vehicle` - No show for specialized vehicle - """ - - one_way_drop_off_charges_amount: Optional[int] = None - """ - Charges for returning the vehicle at a different location than where it was - picked up. - """ - - one_way_drop_off_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - drop-off charges assessed. - """ - - renter_name: Optional[str] = None - """Name of the person renting the vehicle.""" - - weekly_rental_rate_amount: Optional[int] = None - """Weekly rate being charged for the vehicle.""" - - weekly_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - rental rate. - """ - - -class TransactionSourceCardRefundPurchaseDetailsLodging(BaseModel): - check_in_date: Optional[date] = None - """Date the customer checked in.""" - - daily_room_rate_amount: Optional[int] = None - """Daily rate being charged for the room.""" - - daily_room_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - rate. - """ - - extra_charges: Optional[ - Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] - ] = None - """Additional charges (phone, late check-out, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `restaurant` - Restaurant - - `gift_shop` - Gift shop - - `mini_bar` - Mini bar - - `telephone` - Telephone - - `other` - Other - - `laundry` - Laundry - """ - - folio_cash_advances_amount: Optional[int] = None - """Folio cash advances for the room.""" - - folio_cash_advances_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - advances. - """ - - food_beverage_charges_amount: Optional[int] = None - """Food and beverage charges for the room.""" - - food_beverage_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - beverage charges. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None - """ - Indicator that the cardholder is being billed for a reserved room that was not - actually used. - - - `not_applicable` - Not applicable - - `no_show` - No show - """ - - prepaid_expenses_amount: Optional[int] = None - """Prepaid expenses being charged for the room.""" - - prepaid_expenses_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - expenses. - """ - - room_nights: Optional[int] = None - """Number of nights the room was rented.""" - - total_room_tax_amount: Optional[int] = None - """Total room tax being charged.""" - - total_room_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - tax. - """ - - total_tax_amount: Optional[int] = None - """Total tax being charged for the room.""" - - total_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - assessed. - """ - - -class TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): - category: Optional[ - Literal[ - "none", - "bundled_service", - "baggage_fee", - "change_fee", - "cargo", - "carbon_offset", - "frequent_flyer", - "gift_card", - "ground_transport", - "in_flight_entertainment", - "lounge", - "medical", - "meal_beverage", - "other", - "passenger_assist_fee", - "pets", - "seat_fees", - "standby", - "service_fee", - "store", - "travel_service", - "unaccompanied_travel", - "upgrades", - "wifi", - ] - ] = None - """Category of the ancillary service. - - - `none` - None - - `bundled_service` - Bundled service - - `baggage_fee` - Baggage fee - - `change_fee` - Change fee - - `cargo` - Cargo - - `carbon_offset` - Carbon offset - - `frequent_flyer` - Frequent flyer - - `gift_card` - Gift card - - `ground_transport` - Ground transport - - `in_flight_entertainment` - In-flight entertainment - - `lounge` - Lounge - - `medical` - Medical - - `meal_beverage` - Meal beverage - - `other` - Other - - `passenger_assist_fee` - Passenger assist fee - - `pets` - Pets - - `seat_fees` - Seat fees - - `standby` - Standby - - `service_fee` - Service fee - - `store` - Store - - `travel_service` - Travel service - - `unaccompanied_travel` - Unaccompanied travel - - `upgrades` - Upgrades - - `wifi` - Wi-fi - """ - - sub_category: Optional[str] = None - """Sub-category of the ancillary service, free-form.""" - - -class TransactionSourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): - connected_ticket_document_number: Optional[str] = None - """ - If this purchase has a connection or relationship to another purchase, such as a - baggage fee for a passenger transport ticket, this field should contain the - ticket document number for the other purchase. - """ - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "other", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `other` - Other - """ - - passenger_name_or_description: Optional[str] = None - """Name of the passenger or description of the ancillary purchase.""" - - services: List[TransactionSourceCardRefundPurchaseDetailsTravelAncillaryService] - """Additional travel charges, such as baggage fees.""" - - ticket_document_number: Optional[str] = None - """Ticket document number.""" - - -class TransactionSourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): - carrier_code: Optional[str] = None - """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" - - destination_city_airport_code: Optional[str] = None - """Code for the destination city or airport.""" - - fare_basis_code: Optional[str] = None - """Fare basis code.""" - - flight_number: Optional[str] = None - """Flight number.""" - - service_class: Optional[str] = None - """Service class (e.g., first class, business class, etc.).""" - - stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None - """Indicates whether a stopover is allowed on this ticket. - - - `none` - None - - `stop_over_allowed` - Stop over allowed - - `stop_over_not_allowed` - Stop over not allowed - """ - - -class TransactionSourceCardRefundPurchaseDetailsTravel(BaseModel): - ancillary: Optional[TransactionSourceCardRefundPurchaseDetailsTravelAncillary] = None - """Ancillary purchases in addition to the airfare.""" - - computerized_reservation_system: Optional[str] = None - """Indicates the computerized reservation system used to book the ticket.""" - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_cancellation", - "other", - "partial_refund_of_airline_ticket", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `airline_ticket_cancellation` - Airline ticket cancellation - - `other` - Other - - `partial_refund_of_airline_ticket` - Partial refund of airline ticket - """ - - departure_date: Optional[date] = None - """Date of departure.""" - - origination_city_airport_code: Optional[str] = None - """Code for the originating city or airport.""" - - passenger_name: Optional[str] = None - """Name of the passenger.""" - - restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None - """Indicates whether this ticket is non-refundable. - - - `no_restrictions` - No restrictions - - `restricted_non_refundable_ticket` - Restricted non-refundable ticket - """ - - ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None - """Indicates why a ticket was changed. - - - `none` - None - - `change_to_existing_ticket` - Change to existing ticket - - `new_ticket` - New ticket - """ - - ticket_number: Optional[str] = None - """Ticket number.""" - - travel_agency_code: Optional[str] = None - """Code for the travel agency if the ticket was issued by a travel agency.""" - - travel_agency_name: Optional[str] = None - """Name of the travel agency if the ticket was issued by a travel agency.""" - - trip_legs: Optional[List[TransactionSourceCardRefundPurchaseDetailsTravelTripLeg]] = None - """Fields specific to each leg of the journey.""" - - -class TransactionSourceCardRefundPurchaseDetails(BaseModel): - car_rental: Optional[TransactionSourceCardRefundPurchaseDetailsCarRental] = None - """Fields specific to car rentals.""" - - customer_reference_identifier: Optional[str] = None - """An identifier from the merchant for the customer or consumer.""" - - local_tax_amount: Optional[int] = None - """The state or provincial tax amount in minor units.""" - - local_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - lodging: Optional[TransactionSourceCardRefundPurchaseDetailsLodging] = None - """Fields specific to lodging.""" - - national_tax_amount: Optional[int] = None - """The national tax amount in minor units.""" - - national_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - purchase_identifier: Optional[str] = None - """An identifier from the merchant for the purchase to the issuer and cardholder.""" - - purchase_identifier_format: Optional[ - Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] - ] = None - """The format of the purchase identifier. - - - `free_text` - Free text - - `order_number` - Order number - - `rental_agreement_number` - Rental agreement number - - `hotel_folio_number` - Hotel folio number - - `invoice_number` - Invoice number - """ - - travel: Optional[TransactionSourceCardRefundPurchaseDetailsTravel] = None - """Fields specific to travel.""" - - -class TransactionSourceCardRefund(BaseModel): - id: str - """The Card Refund identifier.""" - - amount: int - """The amount in the minor unit of the transaction's settlement currency. - - For dollars, for example, this is cents. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's settlement currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - merchant_acceptor_id: Optional[str] = None - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: str - """The 4-digit MCC describing the merchant's business.""" - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: str - """The country the merchant resides in.""" - - merchant_name: Optional[str] = None - """The name of the merchant.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_identifiers: TransactionSourceCardRefundNetworkIdentifiers - """Network-specific identifiers for this refund.""" - - presentment_amount: int - """The amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - purchase_details: Optional[TransactionSourceCardRefundPurchaseDetails] = None - """ - Additional details about the card purchase, such as tax and industry-specific - fields. - """ - - transaction_id: str - """The identifier of the Transaction associated with this Transaction.""" - - type: Literal["card_refund"] - """A constant representing the object's type. - - For this resource it will always be `card_refund`. - """ - - -class TransactionSourceCardRevenuePayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid interest.""" - - period_start: datetime - """The start of the period for which this transaction paid interest.""" - - transacted_on_account_id: Optional[str] = None - """The account the card belonged to.""" - - -class TransactionSourceCardSettlementNetworkIdentifiers(BaseModel): - acquirer_business_id: str - """ - A network assigned business ID that identifies the acquirer that processed this - transaction. - """ - - acquirer_reference_number: str - """A globally unique identifier for this settlement.""" - - transaction_id: Optional[str] = None - """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsCarRental(BaseModel): - car_class_code: Optional[str] = None - """Code indicating the vehicle's class.""" - - checkout_date: Optional[date] = None - """ - Date the customer picked up the car or, in the case of a no-show or pre-pay - transaction, the scheduled pick up date. - """ - - daily_rental_rate_amount: Optional[int] = None - """Daily rate being charged for the vehicle.""" - - daily_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily rental - rate. - """ - - days_rented: Optional[int] = None - """Number of days the vehicle was rented.""" - - extra_charges: Optional[ - Literal["no_extra_charge", "gas", "extra_mileage", "late_return", "one_way_service_fee", "parking_violation"] - ] = None - """Additional charges (gas, late fee, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `gas` - Gas - - `extra_mileage` - Extra mileage - - `late_return` - Late return - - `one_way_service_fee` - One way service fee - - `parking_violation` - Parking violation - """ - - fuel_charges_amount: Optional[int] = None - """Fuel charges for the vehicle.""" - - fuel_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fuel charges - assessed. - """ - - insurance_charges_amount: Optional[int] = None - """Any insurance being charged for the vehicle.""" - - insurance_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the insurance - charges assessed. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show_for_specialized_vehicle"]] = None - """ - An indicator that the cardholder is being billed for a reserved vehicle that was - not actually rented (that is, a "no-show" charge). - - - `not_applicable` - Not applicable - - `no_show_for_specialized_vehicle` - No show for specialized vehicle - """ - - one_way_drop_off_charges_amount: Optional[int] = None - """ - Charges for returning the vehicle at a different location than where it was - picked up. - """ - - one_way_drop_off_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the one-way - drop-off charges assessed. - """ - - renter_name: Optional[str] = None - """Name of the person renting the vehicle.""" - - weekly_rental_rate_amount: Optional[int] = None - """Weekly rate being charged for the vehicle.""" - - weekly_rental_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the weekly - rental rate. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsLodging(BaseModel): - check_in_date: Optional[date] = None - """Date the customer checked in.""" - - daily_room_rate_amount: Optional[int] = None - """Daily rate being charged for the room.""" - - daily_room_rate_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the daily room - rate. - """ - - extra_charges: Optional[ - Literal["no_extra_charge", "restaurant", "gift_shop", "mini_bar", "telephone", "other", "laundry"] - ] = None - """Additional charges (phone, late check-out, etc.) being billed. - - - `no_extra_charge` - No extra charge - - `restaurant` - Restaurant - - `gift_shop` - Gift shop - - `mini_bar` - Mini bar - - `telephone` - Telephone - - `other` - Other - - `laundry` - Laundry - """ - - folio_cash_advances_amount: Optional[int] = None - """Folio cash advances for the room.""" - - folio_cash_advances_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the folio cash - advances. - """ - - food_beverage_charges_amount: Optional[int] = None - """Food and beverage charges for the room.""" - - food_beverage_charges_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the food and - beverage charges. - """ - - no_show_indicator: Optional[Literal["not_applicable", "no_show"]] = None - """ - Indicator that the cardholder is being billed for a reserved room that was not - actually used. - - - `not_applicable` - Not applicable - - `no_show` - No show - """ - - prepaid_expenses_amount: Optional[int] = None - """Prepaid expenses being charged for the room.""" - - prepaid_expenses_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the prepaid - expenses. - """ - - room_nights: Optional[int] = None - """Number of nights the room was rented.""" - - total_room_tax_amount: Optional[int] = None - """Total room tax being charged.""" - - total_room_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total room - tax. - """ - - total_tax_amount: Optional[int] = None - """Total tax being charged for the room.""" - - total_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the total tax - assessed. - """ - - -class TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): - category: Optional[ - Literal[ - "none", - "bundled_service", - "baggage_fee", - "change_fee", - "cargo", - "carbon_offset", - "frequent_flyer", - "gift_card", - "ground_transport", - "in_flight_entertainment", - "lounge", - "medical", - "meal_beverage", - "other", - "passenger_assist_fee", - "pets", - "seat_fees", - "standby", - "service_fee", - "store", - "travel_service", - "unaccompanied_travel", - "upgrades", - "wifi", - ] - ] = None - """Category of the ancillary service. - - - `none` - None - - `bundled_service` - Bundled service - - `baggage_fee` - Baggage fee - - `change_fee` - Change fee - - `cargo` - Cargo - - `carbon_offset` - Carbon offset - - `frequent_flyer` - Frequent flyer - - `gift_card` - Gift card - - `ground_transport` - Ground transport - - `in_flight_entertainment` - In-flight entertainment - - `lounge` - Lounge - - `medical` - Medical - - `meal_beverage` - Meal beverage - - `other` - Other - - `passenger_assist_fee` - Passenger assist fee - - `pets` - Pets - - `seat_fees` - Seat fees - - `standby` - Standby - - `service_fee` - Service fee - - `store` - Store - - `travel_service` - Travel service - - `unaccompanied_travel` - Unaccompanied travel - - `upgrades` - Upgrades - - `wifi` - Wi-fi - """ - - sub_category: Optional[str] = None - """Sub-category of the ancillary service, free-form.""" - - -class TransactionSourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): - connected_ticket_document_number: Optional[str] = None - """ - If this purchase has a connection or relationship to another purchase, such as a - baggage fee for a passenger transport ticket, this field should contain the - ticket document number for the other purchase. - """ - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "other", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `other` - Other - """ - - passenger_name_or_description: Optional[str] = None - """Name of the passenger or description of the ancillary purchase.""" - - services: List[TransactionSourceCardSettlementPurchaseDetailsTravelAncillaryService] - """Additional travel charges, such as baggage fees.""" - - ticket_document_number: Optional[str] = None - """Ticket document number.""" - - -class TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): - carrier_code: Optional[str] = None - """Carrier code (e.g., United Airlines, Jet Blue, etc.).""" - - destination_city_airport_code: Optional[str] = None - """Code for the destination city or airport.""" - - fare_basis_code: Optional[str] = None - """Fare basis code.""" - - flight_number: Optional[str] = None - """Flight number.""" - - service_class: Optional[str] = None - """Service class (e.g., first class, business class, etc.).""" - - stop_over_code: Optional[Literal["none", "stop_over_allowed", "stop_over_not_allowed"]] = None - """Indicates whether a stopover is allowed on this ticket. - - - `none` - None - - `stop_over_allowed` - Stop over allowed - - `stop_over_not_allowed` - Stop over not allowed - """ - - -class TransactionSourceCardSettlementPurchaseDetailsTravel(BaseModel): - ancillary: Optional[TransactionSourceCardSettlementPurchaseDetailsTravelAncillary] = None - """Ancillary purchases in addition to the airfare.""" - - computerized_reservation_system: Optional[str] = None - """Indicates the computerized reservation system used to book the ticket.""" - - credit_reason_indicator: Optional[ - Literal[ - "no_credit", - "passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_and_passenger_transport_ancillary_purchase_cancellation", - "airline_ticket_cancellation", - "other", - "partial_refund_of_airline_ticket", - ] - ] = None - """Indicates the reason for a credit to the cardholder. - - - `no_credit` - No credit - - `passenger_transport_ancillary_purchase_cancellation` - Passenger transport - ancillary purchase cancellation - - `airline_ticket_and_passenger_transport_ancillary_purchase_cancellation` - - Airline ticket and passenger transport ancillary purchase cancellation - - `airline_ticket_cancellation` - Airline ticket cancellation - - `other` - Other - - `partial_refund_of_airline_ticket` - Partial refund of airline ticket - """ - - departure_date: Optional[date] = None - """Date of departure.""" - - origination_city_airport_code: Optional[str] = None - """Code for the originating city or airport.""" - - passenger_name: Optional[str] = None - """Name of the passenger.""" - - restricted_ticket_indicator: Optional[Literal["no_restrictions", "restricted_non_refundable_ticket"]] = None - """Indicates whether this ticket is non-refundable. - - - `no_restrictions` - No restrictions - - `restricted_non_refundable_ticket` - Restricted non-refundable ticket - """ - - ticket_change_indicator: Optional[Literal["none", "change_to_existing_ticket", "new_ticket"]] = None - """Indicates why a ticket was changed. - - - `none` - None - - `change_to_existing_ticket` - Change to existing ticket - - `new_ticket` - New ticket - """ - - ticket_number: Optional[str] = None - """Ticket number.""" - - travel_agency_code: Optional[str] = None - """Code for the travel agency if the ticket was issued by a travel agency.""" - - travel_agency_name: Optional[str] = None - """Name of the travel agency if the ticket was issued by a travel agency.""" - - trip_legs: Optional[List[TransactionSourceCardSettlementPurchaseDetailsTravelTripLeg]] = None - """Fields specific to each leg of the journey.""" - - -class TransactionSourceCardSettlementPurchaseDetails(BaseModel): - car_rental: Optional[TransactionSourceCardSettlementPurchaseDetailsCarRental] = None - """Fields specific to car rentals.""" - - customer_reference_identifier: Optional[str] = None - """An identifier from the merchant for the customer or consumer.""" - - local_tax_amount: Optional[int] = None - """The state or provincial tax amount in minor units.""" - - local_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - lodging: Optional[TransactionSourceCardSettlementPurchaseDetailsLodging] = None - """Fields specific to lodging.""" - - national_tax_amount: Optional[int] = None - """The national tax amount in minor units.""" - - national_tax_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the local tax - assessed. - """ - - purchase_identifier: Optional[str] = None - """An identifier from the merchant for the purchase to the issuer and cardholder.""" - - purchase_identifier_format: Optional[ - Literal["free_text", "order_number", "rental_agreement_number", "hotel_folio_number", "invoice_number"] - ] = None - """The format of the purchase identifier. - - - `free_text` - Free text - - `order_number` - Order number - - `rental_agreement_number` - Rental agreement number - - `hotel_folio_number` - Hotel folio number - - `invoice_number` - Invoice number - """ - - travel: Optional[TransactionSourceCardSettlementPurchaseDetailsTravel] = None - """Fields specific to travel.""" - - -class TransactionSourceCardSettlement(BaseModel): - id: str - """The Card Settlement identifier.""" - - amount: int - """The amount in the minor unit of the transaction's settlement currency. - - For dollars, for example, this is cents. - """ - - card_authorization: Optional[str] = None - """ - The Card Authorization that was created prior to this Card Settlement, if one - exists. - """ - - card_payment_id: str - """The ID of the Card Payment this transaction belongs to.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's settlement currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - merchant_acceptor_id: Optional[str] = None - """ - The merchant identifier (commonly abbreviated as MID) of the merchant the card - is transacting with. - """ - - merchant_category_code: str - """The 4-digit MCC describing the merchant's business.""" - - merchant_city: Optional[str] = None - """The city the merchant resides in.""" - - merchant_country: str - """The country the merchant resides in.""" - - merchant_name: Optional[str] = None - """The name of the merchant.""" - - merchant_state: Optional[str] = None - """The state the merchant resides in.""" - - network_identifiers: TransactionSourceCardSettlementNetworkIdentifiers - """Network-specific identifiers for this refund.""" - - pending_transaction_id: Optional[str] = None - """The identifier of the Pending Transaction associated with this Transaction.""" - - presentment_amount: int - """The amount in the minor unit of the transaction's presentment currency.""" - - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. - """ - - purchase_details: Optional[TransactionSourceCardSettlementPurchaseDetails] = None - """ - Additional details about the card purchase, such as tax and industry-specific - fields. - """ - - transaction_id: str - """The identifier of the Transaction associated with this Transaction.""" - - type: Literal["card_settlement"] - """A constant representing the object's type. - - For this resource it will always be `card_settlement`. - """ - - -class TransactionSourceCashbackPayment(BaseModel): - accrued_on_card_id: Optional[str] = None - """The card on which the cashback was accrued.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid cashback.""" - - period_start: datetime - """The start of the period for which this transaction paid cashback.""" - - -class TransactionSourceCheckDepositAcceptance(BaseModel): - account_number: str - """The account number printed on the check.""" - - amount: int - """The amount to be deposited in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - auxiliary_on_us: Optional[str] = None - """An additional line of metadata printed on the check. - - This typically includes the check number for business checks. - """ - - check_deposit_id: str - """The ID of the Check Deposit that was accepted.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - routing_number: str - """The routing number printed on the check.""" - - serial_number: Optional[str] = None - """The check serial number, if present, for consumer checks. - - For business checks, the serial number is usually in the `auxiliary_on_us` - field. - """ - - -class TransactionSourceCheckDepositReturn(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - check_deposit_id: str - """The identifier of the Check Deposit that was returned.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - return_reason: Literal[ - "ach_conversion_not_supported", - "closed_account", - "duplicate_submission", - "insufficient_funds", - "no_account", - "not_authorized", - "stale_dated", - "stop_payment", - "unknown_reason", - "unmatched_details", - "unreadable_image", - "endorsement_irregular", - "altered_or_fictitious_item", - "frozen_or_blocked_account", - "post_dated", - "endorsement_missing", - "signature_missing", - "stop_payment_suspect", - "unusable_image", - "image_fails_security_check", - "cannot_determine_amount", - "signature_irregular", - "non_cash_item", - "unable_to_process", - "item_exceeds_dollar_limit", - "branch_or_account_sold", - ] - """ - Why this check was returned by the bank holding the account it was drawn - against. - - - `ach_conversion_not_supported` - The check doesn't allow ACH conversion. - - `closed_account` - The account is closed. - - `duplicate_submission` - The check has already been deposited. - - `insufficient_funds` - Insufficient funds - - `no_account` - No account was found matching the check details. - - `not_authorized` - The check was not authorized. - - `stale_dated` - The check is too old. - - `stop_payment` - The payment has been stopped by the account holder. - - `unknown_reason` - The reason for the return is unknown. - - `unmatched_details` - The image doesn't match the details submitted. - - `unreadable_image` - The image could not be read. - - `endorsement_irregular` - The check endorsement was irregular. - - `altered_or_fictitious_item` - The check present was either altered or fake. - - `frozen_or_blocked_account` - The account this check is drawn on is frozen. - - `post_dated` - The check is post dated. - - `endorsement_missing` - The endorsement was missing. - - `signature_missing` - The check signature was missing. - - `stop_payment_suspect` - The bank suspects a stop payment will be placed. - - `unusable_image` - The bank cannot read the image. - - `image_fails_security_check` - The check image fails the bank's security - check. - - `cannot_determine_amount` - The bank cannot determine the amount. - - `signature_irregular` - The signature is inconsistent with prior signatures. - - `non_cash_item` - The check is a non-cash item and cannot be drawn against the - account. - - `unable_to_process` - The bank is unable to process this check. - - `item_exceeds_dollar_limit` - The check exceeds the bank or customer's limit. - - `branch_or_account_sold` - The bank sold this account and no longer services - this customer. - """ - - returned_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the check deposit was returned. - """ - - transaction_id: str - """ - The identifier of the transaction that reversed the original check deposit - transaction. - """ - - -class TransactionSourceCheckTransferDeposit(BaseModel): - back_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the back of the - deposited check. - """ - - bank_of_first_deposit_routing_number: Optional[str] = None - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - bank depositing this check. In some rare cases, this is not transmitted via - Check21 and the value will be null. - """ - - deposited_at: datetime - """When the check was deposited.""" - - front_image_file_id: Optional[str] = None - """ - The identifier of the API File object containing an image of the front of the - deposited check. - """ - - inbound_check_deposit_id: Optional[str] = None - """ - The identifier of the Inbound Check Deposit object associated with this - transaction. - """ - - transaction_id: Optional[str] = None - """The identifier of the Transaction object created when the check was deposited.""" - - transfer_id: Optional[str] = None - """The identifier of the Check Transfer object that was deposited.""" - - type: Literal["check_transfer_deposit"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_deposit`. - """ - - -class TransactionSourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] - """The reason why this transfer was stopped. - - - `mail_delivery_failed` - The check could not be delivered. - - `rejected_by_increase` - The check was canceled by an Increase operator who - will provide details out-of-band. - - `not_authorized` - The check was not authorized. - - `unknown` - The check was stopped for another reason. - """ - - requested_at: datetime - """The time the stop-payment was requested.""" - - transfer_id: str - """The ID of the check transfer that was stopped.""" - - type: Literal["check_transfer_stop_payment_request"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_stop_payment_request`. - """ - - -class TransactionSourceFeePayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - fee_period_start: date - """The start of this payment's fee period, usually the first day of a month.""" - - -class TransactionSourceInboundACHTransferAddendaFreeformEntry(BaseModel): - payment_related_information: str - """The payment related information passed in the addendum.""" - - -class TransactionSourceInboundACHTransferAddendaFreeform(BaseModel): - entries: List[TransactionSourceInboundACHTransferAddendaFreeformEntry] - """Each entry represents an addendum received from the originator.""" - - -class TransactionSourceInboundACHTransferAddenda(BaseModel): - category: Literal["freeform"] - """The type of addendum. - - - `freeform` - Unstructured addendum. - """ - - freeform: Optional[TransactionSourceInboundACHTransferAddendaFreeform] = None - """Unstructured `payment_related_information` passed through by the originator.""" - - -class TransactionSourceInboundACHTransfer(BaseModel): - addenda: Optional[TransactionSourceInboundACHTransferAddenda] = None - """Additional information sent from the originator.""" - - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - originator_company_descriptive_date: Optional[str] = None - """The description of the date of the transfer, usually in the format `YYMMDD`.""" - - originator_company_discretionary_data: Optional[str] = None - """Data set by the originator.""" - - originator_company_entry_description: str - """An informational description of the transfer.""" - - originator_company_id: str - """An identifier for the originating company. - - This is generally, but not always, a stable identifier across multiple - transfers. - """ - - originator_company_name: str - """A name set by the originator to identify themselves.""" - - receiver_id_number: Optional[str] = None - """The originator's identifier for the transfer receipient.""" - - receiver_name: Optional[str] = None - """The name of the transfer recipient. - - This value is informational and not verified by Increase. - """ - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - transfer_id: str - """The Inbound ACH Transfer's identifier.""" - - -class TransactionSourceInboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ - - -class TransactionSourceInboundRealTimePaymentsTransferConfirmation(BaseModel): - amount: int - """The amount in the minor unit of the transfer's currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's - currency. This will always be "USD" for a Real-Time Payments transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the transfer.""" - - -class TransactionSourceInboundWireDrawdownPayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - - description: str - """An Increase-constructed description of the transfer.""" - - input_message_accountability_data: Optional[str] = None - """ - A unique identifier available to the originating and receiving banks, commonly - abbreviated as IMAD. It is created when the wire is submitted to the Fedwire - service and is helpful when debugging wires with the receiving bank. - """ - - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - - -class TransactionSourceInboundWireReversal(BaseModel): - amount: int - """The amount that was reversed in USD cents.""" - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the reversal was created. - """ - - description: str - """ - The description on the reversal message from Fedwire, set by the reversing bank. - """ - - financial_institution_to_financial_institution_information: Optional[str] = None - """Additional financial institution information included in the wire reversal.""" - - input_cycle_date: date - """The Fedwire cycle date for the wire reversal. - - The "Fedwire day" begins at 9:00 PM Eastern Time on the evening before the - `cycle date`. - """ - - input_message_accountability_data: str - """The Fedwire transaction identifier.""" - - input_sequence_number: str - """The Fedwire sequence number.""" - - input_source: str - """The Fedwire input source identifier.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - previous_message_input_cycle_date: date - """ - The Fedwire cycle date for the wire transfer that is being reversed by this - message. - """ - - previous_message_input_message_accountability_data: str - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: str - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - receiver_financial_institution_information: Optional[str] = None - """ - Information included in the wire reversal for the receiving financial - institution. - """ - - transaction_id: str - """The ID for the Transaction associated with the transfer reversal.""" - - wire_transfer_id: str - """The ID for the Wire Transfer that is being reversed.""" - - -class TransactionSourceInboundWireTransfer(BaseModel): - amount: int - """The amount in USD cents.""" - - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - - description: str - """An Increase-constructed description of the transfer.""" - - input_message_accountability_data: Optional[str] = None - """ - A unique identifier available to the originating and receiving banks, commonly - abbreviated as IMAD. It is created when the wire is submitted to the Fedwire - service and is helpful when debugging wires with the originating bank. - """ - - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - - transfer_id: str - """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" - - -class TransactionSourceInterestPayment(BaseModel): - accrued_on_account_id: Optional[str] = None - """The account on which the interest was accrued.""" - - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - period_end: datetime - """The end of the period for which this transaction paid interest.""" - - period_start: datetime - """The start of the period for which this transaction paid interest.""" - - -class TransactionSourceInternalSource(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - reason: Literal[ - "account_closure", - "bank_migration", - "check_adjustment", - "collection_payment", - "collection_receivable", - "empyreal_adjustment", - "error", - "error_correction", - "fees", - "interest", - "negative_balance_forgiveness", - "sample_funds", - "sample_funds_return", - ] - """An Internal Source is a transaction between you and Increase. - - This describes the reason for the transaction. - - - `account_closure` - Account closure - - `bank_migration` - Bank migration - - `check_adjustment` - Check adjustment - - `collection_payment` - Collection payment - - `collection_receivable` - Collection receivable - - `empyreal_adjustment` - Empyreal adjustment - - `error` - Error - - `error_correction` - Error correction - - `fees` - Fees - - `interest` - Interest - - `negative_balance_forgiveness` - Negative balance forgiveness - - `sample_funds` - Sample funds - - `sample_funds_return` - Sample funds return - """ - - -class TransactionSourceRealTimePaymentsTransferAcknowledgement(BaseModel): - amount: int - """The transfer amount in USD cents.""" - - destination_account_number: str - """The destination account number.""" - - destination_routing_number: str - """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" - - remittance_information: str - """Unstructured information that will show on the recipient's bank statement.""" - - transfer_id: str - """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" - - -class TransactionSourceSampleFunds(BaseModel): - originator: str - """Where the sample funds came from.""" - - -class TransactionSourceWireTransferIntention(BaseModel): - account_number: str - """The destination account number.""" - - amount: int - """The transfer amount in USD cents.""" - - message_to_recipient: str - """The message that will show on the recipient's bank statement.""" - - routing_number: str - """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" - - transfer_id: str - """The identifier of the Wire Transfer that led to this Transaction.""" - - -class TransactionSourceWireTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Wire Transfer that led to this Transaction.""" - - -class TransactionSource(BaseModel): - account_transfer_intention: Optional[TransactionSourceAccountTransferIntention] = None - """An Account Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_intention`. - """ - - ach_transfer_intention: Optional[TransactionSourceACHTransferIntention] = None - """An ACH Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_intention`. - """ - - ach_transfer_rejection: Optional[TransactionSourceACHTransferRejection] = None - """An ACH Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_rejection`. - """ - - ach_transfer_return: Optional[TransactionSourceACHTransferReturn] = None - """An ACH Transfer Return object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_return`. - """ - - card_dispute_acceptance: Optional[TransactionSourceCardDisputeAcceptance] = None - """A Card Dispute Acceptance object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_acceptance`. - """ - - card_dispute_loss: Optional[TransactionSourceCardDisputeLoss] = None - """A Card Dispute Loss object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_loss`. - """ - - card_refund: Optional[TransactionSourceCardRefund] = None - """A Card Refund object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_refund`. - """ - - card_revenue_payment: Optional[TransactionSourceCardRevenuePayment] = None - """A Card Revenue Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_revenue_payment`. - """ - - card_settlement: Optional[TransactionSourceCardSettlement] = None - """A Card Settlement object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_settlement`. - """ - - cashback_payment: Optional[TransactionSourceCashbackPayment] = None - """A Cashback Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `cashback_payment`. - """ - - category: Literal[ - "account_transfer_intention", - "ach_transfer_intention", - "ach_transfer_rejection", - "ach_transfer_return", - "cashback_payment", - "card_dispute_acceptance", - "card_dispute_loss", - "card_refund", - "card_settlement", - "card_revenue_payment", - "check_deposit_acceptance", - "check_deposit_return", - "check_transfer_deposit", - "check_transfer_stop_payment_request", - "fee_payment", - "inbound_ach_transfer", - "inbound_ach_transfer_return_intention", - "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", - "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment", - "inbound_wire_reversal", - "inbound_wire_transfer", - "inbound_wire_transfer_reversal", - "interest_payment", - "internal_source", - "real_time_payments_transfer_acknowledgement", - "sample_funds", - "wire_transfer_intention", - "wire_transfer_rejection", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `account_transfer_intention` - Account Transfer Intention: details will be - under the `account_transfer_intention` object. - - `ach_transfer_intention` - ACH Transfer Intention: details will be under the - `ach_transfer_intention` object. - - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the - `ach_transfer_rejection` object. - - `ach_transfer_return` - ACH Transfer Return: details will be under the - `ach_transfer_return` object. - - `cashback_payment` - Cashback Payment: details will be under the - `cashback_payment` object. - - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the - `card_dispute_acceptance` object. - - `card_dispute_loss` - Card Dispute Loss: details will be under the - `card_dispute_loss` object. - - `card_refund` - Card Refund: details will be under the `card_refund` object. - - `card_settlement` - Card Settlement: details will be under the - `card_settlement` object. - - `card_revenue_payment` - Card Revenue Payment: details will be under the - `card_revenue_payment` object. - - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under - the `check_deposit_acceptance` object. - - `check_deposit_return` - Check Deposit Return: details will be under the - `check_deposit_return` object. - - `check_transfer_deposit` - Check Transfer Deposit: details will be under the - `check_transfer_deposit` object. - - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: - details will be under the `check_transfer_stop_payment_request` object. - - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under - the `inbound_ach_transfer` object. - - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return - Intention: details will be under the `inbound_ach_transfer_return_intention` - object. - - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return - Intention: details will be under the `inbound_check_deposit_return_intention` - object. - - `inbound_international_ach_transfer` - Inbound International ACH Transfer: - details will be under the `inbound_international_ach_transfer` object. - - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time - Payments Transfer Confirmation: details will be under the - `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will - be under the `inbound_wire_drawdown_payment` object. - - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the - `inbound_wire_reversal` object. - - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be - under the `inbound_wire_transfer` object. - - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention: - details will be under the `inbound_wire_transfer_reversal` object. - - `interest_payment` - Interest Payment: details will be under the - `interest_payment` object. - - `internal_source` - Internal Source: details will be under the - `internal_source` object. - - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer - Acknowledgement: details will be under the - `real_time_payments_transfer_acknowledgement` object. - - `sample_funds` - Sample Funds: details will be under the `sample_funds` - object. - - `wire_transfer_intention` - Wire Transfer Intention: details will be under the - `wire_transfer_intention` object. - - `wire_transfer_rejection` - Wire Transfer Rejection: details will be under the - `wire_transfer_rejection` object. - - `other` - The Transaction was made for an undocumented or deprecated reason. - """ - - check_deposit_acceptance: Optional[TransactionSourceCheckDepositAcceptance] = None - """A Check Deposit Acceptance object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_acceptance`. - """ - - check_deposit_return: Optional[TransactionSourceCheckDepositReturn] = None - """A Check Deposit Return object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_return`. - """ - - check_transfer_deposit: Optional[TransactionSourceCheckTransferDeposit] = None - """A Check Transfer Deposit object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_deposit`. - """ - - check_transfer_stop_payment_request: Optional[TransactionSourceCheckTransferStopPaymentRequest] = None - """A Check Transfer Stop Payment Request object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_stop_payment_request`. - """ - - fee_payment: Optional[TransactionSourceFeePayment] = None - """A Fee Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `fee_payment`. - """ - - inbound_ach_transfer: Optional[TransactionSourceInboundACHTransfer] = None - """An Inbound ACH Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_ach_transfer`. - """ - - inbound_international_ach_transfer: Optional[TransactionSourceInboundInternationalACHTransfer] = None - """An Inbound International ACH Transfer object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_international_ach_transfer`. - """ - - inbound_real_time_payments_transfer_confirmation: Optional[ - TransactionSourceInboundRealTimePaymentsTransferConfirmation - ] = None - """An Inbound Real-Time Payments Transfer Confirmation object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_confirmation`. - """ - - inbound_wire_drawdown_payment: Optional[TransactionSourceInboundWireDrawdownPayment] = None - """An Inbound Wire Drawdown Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_drawdown_payment`. - """ - - inbound_wire_reversal: Optional[TransactionSourceInboundWireReversal] = None - """An Inbound Wire Reversal object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_reversal`. - """ - - inbound_wire_transfer: Optional[TransactionSourceInboundWireTransfer] = None - """An Inbound Wire Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_transfer`. - """ - - interest_payment: Optional[TransactionSourceInterestPayment] = None - """An Interest Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `interest_payment`. - """ - - internal_source: Optional[TransactionSourceInternalSource] = None - """An Internal Source object. - - This field will be present in the JSON response if and only if `category` is - equal to `internal_source`. - """ - - real_time_payments_transfer_acknowledgement: Optional[ - TransactionSourceRealTimePaymentsTransferAcknowledgement - ] = None - """A Real-Time Payments Transfer Acknowledgement object. - - This field will be present in the JSON response if and only if `category` is - equal to `real_time_payments_transfer_acknowledgement`. - """ - - sample_funds: Optional[TransactionSourceSampleFunds] = None - """A Sample Funds object. - - This field will be present in the JSON response if and only if `category` is - equal to `sample_funds`. - """ - - wire_transfer_intention: Optional[TransactionSourceWireTransferIntention] = None - """A Wire Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_intention`. - """ - - wire_transfer_rejection: Optional[TransactionSourceWireTransferRejection] = None - """A Wire Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_rejection`. - """ - - -class Transaction(BaseModel): - id: str - """The Transaction identifier.""" - - account_id: str - """The identifier for the Account the Transaction belongs to.""" - - amount: int - """The Transaction amount in the minor unit of its currency. - - For dollars, for example, this is cents. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the - Transaction occurred. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - Transaction's currency. This will match the currency on the Transaction's - Account. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - description: str - """An informational message describing this transaction. - - Use the fields in `source` to get more detailed information. This field appears - as the line-item on the statement. - """ - - route_id: Optional[str] = None - """The identifier for the route this Transaction came through. - - Routes are things like cards and ACH details. - """ - - route_type: Optional[Literal["account_number", "card", "lockbox"]] = None - """The type of the route this Transaction came through. - - - `account_number` - An Account Number. - - `card` - A Card. - - `lockbox` - A Lockbox. - """ - - source: TransactionSource - """ - This is an object giving more details on the network-level event that caused the - Transaction. Note that for backwards compatibility reasons, additional - undocumented keys may appear in this object. These should be treated as - deprecated and will be removed in the future. - """ - - type: Literal["transaction"] - """A constant representing the object's type. - - For this resource it will always be `transaction`. - """ - - -class InboundRealTimePaymentsTransferSimulationResult(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the Real-Time Payments Transfer attempt fails, this will contain the - resulting [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of - `category: inbound_real_time_payments_transfer_decline`. - """ - - transaction: Optional[Transaction] = None - """ - If the Real-Time Payments Transfer attempt succeeds, this will contain the - resulting [Transaction](#transactions) object. The Transaction's `source` will - be of `category: inbound_real_time_payments_transfer_confirmation`. - """ - - type: Literal["inbound_real_time_payments_transfer_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_real_time_payments_transfer_simulation_result`. - """ diff --git a/src/increase/types/simulations/wire_transfer_create_inbound_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py similarity index 91% rename from src/increase/types/simulations/wire_transfer_create_inbound_params.py rename to src/increase/types/simulations/inbound_wire_transfer_create_params.py index 7357261b3..6e25dc5a8 100644 --- a/src/increase/types/simulations/wire_transfer_create_inbound_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -4,10 +4,10 @@ from typing_extensions import Required, TypedDict -__all__ = ["WireTransferCreateInboundParams"] +__all__ = ["InboundWireTransferCreateParams"] -class WireTransferCreateInboundParams(TypedDict, total=False): +class InboundWireTransferCreateParams(TypedDict, total=False): account_number_id: Required[str] """The identifier of the Account Number the inbound Wire Transfer is for.""" @@ -97,3 +97,9 @@ class WireTransferCreateInboundParams(TypedDict, total=False): The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. """ + + sender_reference: str + """The sending bank will set sender_reference in production. + + You can simulate any value here. + """ diff --git a/src/increase/types/simulations/physical_card_shipment_advance_params.py b/src/increase/types/simulations/physical_card_advance_shipment_params.py similarity index 90% rename from src/increase/types/simulations/physical_card_shipment_advance_params.py rename to src/increase/types/simulations/physical_card_advance_shipment_params.py index 58e44d41c..8d3d45e5f 100644 --- a/src/increase/types/simulations/physical_card_shipment_advance_params.py +++ b/src/increase/types/simulations/physical_card_advance_shipment_params.py @@ -4,10 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["PhysicalCardShipmentAdvanceParams"] +__all__ = ["PhysicalCardAdvanceShipmentParams"] -class PhysicalCardShipmentAdvanceParams(TypedDict, total=False): +class PhysicalCardAdvanceShipmentParams(TypedDict, total=False): shipment_status: Required[ Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"] ] diff --git a/src/increase/types/entities/supplemental_document_create_params.py b/src/increase/types/supplemental_document_create_params.py similarity index 76% rename from src/increase/types/entities/supplemental_document_create_params.py rename to src/increase/types/supplemental_document_create_params.py index 74939db4e..50169258d 100644 --- a/src/increase/types/entities/supplemental_document_create_params.py +++ b/src/increase/types/supplemental_document_create_params.py @@ -8,5 +8,8 @@ class SupplementalDocumentCreateParams(TypedDict, total=False): + entity_id: Required[str] + """The identifier of the Entity to associate with the supplemental document.""" + file_id: Required[str] """The identifier of the File containing the document.""" diff --git a/src/increase/types/entities/supplemental_document_list_params.py b/src/increase/types/supplemental_document_list_params.py similarity index 100% rename from src/increase/types/entities/supplemental_document_list_params.py rename to src/increase/types/supplemental_document_list_params.py diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6da2ae804..ce9ff4f7d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,13 +38,11 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", - "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", - "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", @@ -1657,30 +1655,6 @@ class SourceCheckTransferDeposit(BaseModel): """ -class SourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] - """The reason why this transfer was stopped. - - - `mail_delivery_failed` - The check could not be delivered. - - `rejected_by_increase` - The check was canceled by an Increase operator who - will provide details out-of-band. - - `not_authorized` - The check was not authorized. - - `unknown` - The check was stopped for another reason. - """ - - requested_at: datetime - """The time the stop-payment was requested.""" - - transfer_id: str - """The ID of the check transfer that was stopped.""" - - type: Literal["check_transfer_stop_payment_request"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_stop_payment_request`. - """ - - class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -1777,258 +1751,6 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" -class SourceInboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ - - class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2195,6 +1917,9 @@ class SourceInboundWireReversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" @@ -2482,12 +2207,10 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", @@ -2531,8 +2254,6 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: - details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under the `inbound_ach_transfer` object. @@ -2542,8 +2263,6 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. - - `inbound_international_ach_transfer` - Inbound International ACH Transfer: - details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2592,13 +2311,6 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ - check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None - """A Check Transfer Stop Payment Request object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_stop_payment_request`. - """ - fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. @@ -2613,13 +2325,6 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ - inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None - """An Inbound International ACH Transfer object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_international_ach_transfer`. - """ - inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 78e79eec1..324e0f00e 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,12 +53,10 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 0d17f1364..fdab38799 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -144,6 +144,9 @@ class Reversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/tests/api_resources/entities/__init__.py b/tests/api_resources/entities/__init__.py deleted file mode 100644 index fd8019a9a..000000000 --- a/tests/api_resources/entities/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/entities/test_beneficial_owners.py b/tests/api_resources/entities/test_beneficial_owners.py deleted file mode 100644 index e62f68ade..000000000 --- a/tests/api_resources/entities/test_beneficial_owners.py +++ /dev/null @@ -1,479 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Entity -from increase._utils import parse_date - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestBeneficialOwners: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.create( - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_archive(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_archive(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_archive(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_update_address(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_method_update_address_with_all_params(self, client: Increase) -> None: - beneficial_owner = client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_raw_response_update_address(self, client: Increase) -> None: - response = client.entities.beneficial_owners.with_raw_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - def test_streaming_response_update_address(self, client: Increase) -> None: - with client.entities.beneficial_owners.with_streaming_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncBeneficialOwners: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.create( - beneficial_owner={ - "company_title": "CEO", - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "078051120", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.create( - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_archive(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.archive( - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_update_address(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: - beneficial_owner = await async_client.entities.beneficial_owners.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.beneficial_owners.with_raw_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - beneficial_owner = response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - @parametrize - async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.beneficial_owners.with_streaming_response.update_address( - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - beneficial_owner = await response.parse() - assert_matches_type(Entity, beneficial_owner, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/entities/test_industry_code.py b/tests/api_resources/entities/test_industry_code.py deleted file mode 100644 index c4589caa8..000000000 --- a/tests/api_resources/entities/test_industry_code.py +++ /dev/null @@ -1,106 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Entity - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestIndustryCode: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - industry_code = client.entities.industry_code.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.industry_code.with_raw_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.industry_code.with_streaming_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.industry_code.with_raw_response.create( - entity_id="", - industry_code="5132", - ) - - -class TestAsyncIndustryCode: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - industry_code = await async_client.entities.industry_code.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.industry_code.with_raw_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - industry_code = response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.industry_code.with_streaming_response.create( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - industry_code = await response.parse() - assert_matches_type(Entity, industry_code, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.industry_code.with_raw_response.create( - entity_id="", - industry_code="5132", - ) diff --git a/tests/api_resources/intrafi/__init__.py b/tests/api_resources/intrafi/__init__.py deleted file mode 100644 index fd8019a9a..000000000 --- a/tests/api_resources/intrafi/__init__.py +++ /dev/null @@ -1 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py index 619881fcb..69276d274 100644 --- a/tests/api_resources/simulations/test_account_statements.py +++ b/tests/api_resources/simulations/test_account_statements.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index fa6cf3101..6f5818e11 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -17,7 +17,6 @@ class TestAccountTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_complete(self, client: Increase) -> None: account_transfer = client.simulations.account_transfers.complete( @@ -25,7 +24,6 @@ def test_method_complete(self, client: Increase) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.account_transfers.with_raw_response.complete( @@ -37,7 +35,6 @@ def test_raw_response_complete(self, client: Increase) -> None: account_transfer = response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.account_transfers.with_streaming_response.complete( @@ -51,7 +48,6 @@ def test_streaming_response_complete(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_complete(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_complete(self, client: Increase) -> None: class TestAsyncAccountTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.simulations.account_transfers.complete( @@ -71,7 +66,6 @@ async def test_method_complete(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.account_transfers.with_raw_response.complete( @@ -80,10 +74,9 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.account_transfers.with_streaming_response.complete( @@ -97,7 +90,6 @@ async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 221370a67..52ea026c1 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -9,8 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer, InboundACHTransfer -from increase._utils import parse_datetime +from increase.types import ACHTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,58 +18,46 @@ class TestACHTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + def test_method_acknowledge(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.acknowledge( + "ach_transfer_id", ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_raw_response_acknowledge(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.acknowledge( + "ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_streaming_response_acknowledge(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.acknowledge( + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - def test_method_notification_of_change(self, client: Increase) -> None: - ach_transfer = client.simulations.ach_transfers.notification_of_change( + def test_path_params_acknowledge(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + client.simulations.ach_transfers.with_raw_response.acknowledge( + "", + ) + + @parametrize + def test_method_create_notification_of_change(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -78,8 +65,8 @@ def test_method_notification_of_change(self, client: Increase) -> None: assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_raw_response_notification_of_change(self, client: Increase) -> None: - response = client.simulations.ach_transfers.with_raw_response.notification_of_change( + def test_raw_response_create_notification_of_change(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -91,8 +78,8 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - def test_streaming_response_notification_of_change(self, client: Increase) -> None: - with client.simulations.ach_transfers.with_streaming_response.notification_of_change( + def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -106,15 +93,14 @@ def test_streaming_response_notification_of_change(self, client: Increase) -> No assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_notification_of_change(self, client: Increase) -> None: + def test_path_params_create_notification_of_change(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - client.simulations.ach_transfers.with_raw_response.notification_of_change( + client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -122,7 +108,6 @@ def test_method_return(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_return_with_all_params(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.return_( @@ -131,7 +116,6 @@ def test_method_return_with_all_params(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.return_( @@ -143,7 +127,6 @@ def test_raw_response_return(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.return_( @@ -157,7 +140,6 @@ def test_streaming_response_return(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_return(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -165,7 +147,6 @@ def test_path_params_return(self, client: Increase) -> None: ach_transfer_id="", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( @@ -173,7 +154,6 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.submit( @@ -185,7 +165,6 @@ def test_raw_response_submit(self, client: Increase) -> None: ach_transfer = response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.submit( @@ -199,7 +178,6 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -212,58 +190,46 @@ class TestAsyncACHTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - company_descriptive_date="x", - company_discretionary_data="x", - company_entry_description="x", - company_id="x", - company_name="x", - receiver_id_number="x", - receiver_name="x", - resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + async def test_method_acknowledge(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.acknowledge( + "ach_transfer_id", ) - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_raw_response_acknowledge(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.acknowledge( + "ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + ach_transfer = await response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_streaming_response_acknowledge(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.acknowledge( + "ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(InboundACHTransfer, ach_transfer, path=["response"]) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize - async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: - ach_transfer = await async_client.simulations.ach_transfers.notification_of_change( + async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + await async_client.simulations.ach_transfers.with_raw_response.acknowledge( + "", + ) + + @parametrize + async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -271,8 +237,8 @@ async def test_method_notification_of_change(self, async_client: AsyncIncrease) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -280,12 +246,12 @@ async def test_raw_response_notification_of_change(self, async_client: AsyncIncr assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.ach_transfers.with_streaming_response.notification_of_change( + async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", change_code="incorrect_routing_number", corrected_data="123456789", @@ -299,15 +265,14 @@ async def test_streaming_response_notification_of_change(self, async_client: Asy assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): - await async_client.simulations.ach_transfers.with_raw_response.notification_of_change( + await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", change_code="incorrect_routing_number", corrected_data="123456789", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -315,7 +280,6 @@ async def test_method_return(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_return_with_all_params(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.return_( @@ -324,7 +288,6 @@ async def test_method_return_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.return_( @@ -333,10 +296,9 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.return_( @@ -350,7 +312,6 @@ async def test_streaming_response_return(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_return(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): @@ -358,7 +319,6 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: ach_transfer_id="", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( @@ -366,7 +326,6 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.submit( @@ -375,10 +334,9 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.submit( @@ -392,7 +350,6 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py new file mode 100644 index 000000000..a0a1f1316 --- /dev/null +++ b/tests/api_resources/simulations/test_card_authorization_expirations.py @@ -0,0 +1,84 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardAuthorizationExpirations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_authorization_expiration = client.simulations.card_authorization_expirations.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_authorization_expirations.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization_expiration = response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_authorization_expirations.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization_expiration = response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardAuthorizationExpirations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_authorization_expiration = await async_client.simulations.card_authorization_expirations.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authorization_expirations.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization_expiration = await response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authorization_expirations.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization_expiration = await response.parse() + assert_matches_type(CardPayment, card_authorization_expiration, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py new file mode 100644 index 000000000..83067015a --- /dev/null +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -0,0 +1,116 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import CardAuthorizationCreateResponse + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardAuthorizations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_authorization = client.simulations.card_authorizations.create( + amount=1000, + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_authorization = client.simulations.card_authorizations.create( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_authorizations.with_raw_response.create( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization = response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_authorizations.with_streaming_response.create( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization = response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardAuthorizations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_authorization = await async_client.simulations.card_authorizations.create( + amount=1000, + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_authorization = await async_client.simulations.card_authorizations.create( + amount=1000, + card_id="card_oubs0hwk5rn6knuecxg2", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="AMAZON.COM", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authorizations.with_raw_response.create( + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authorization = await response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authorizations.with_streaming_response.create( + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authorization = await response.parse() + assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 05c9c8271..15ed4aebc 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -98,7 +98,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py new file mode 100644 index 000000000..e7edbab71 --- /dev/null +++ b/tests/api_resources/simulations/test_card_fuel_confirmations.py @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardFuelConfirmations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_fuel_confirmation = client.simulations.card_fuel_confirmations.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_fuel_confirmations.with_raw_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_fuel_confirmation = response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_fuel_confirmations.with_streaming_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_fuel_confirmation = response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardFuelConfirmations: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_fuel_confirmation = await async_client.simulations.card_fuel_confirmations.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_fuel_confirmations.with_raw_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_fuel_confirmation = await response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_fuel_confirmations.with_streaming_response.create( + amount=5000, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_fuel_confirmation = await response.parse() + assert_matches_type(CardPayment, card_fuel_confirmation, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py new file mode 100644 index 000000000..188652e84 --- /dev/null +++ b/tests/api_resources/simulations/test_card_increments.py @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardIncrements: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_increment = client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_increment = client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_increments.with_raw_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_increment = response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_increments.with_streaming_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_increment = response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardIncrements: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_increment = await async_client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_increment = await async_client.simulations.card_increments.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + event_subscription_id="event_subscription_id", + ) + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_increments.with_raw_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_increment = await response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_increments.with_streaming_response.create( + amount=500, + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_increment = await response.parse() + assert_matches_type(CardPayment, card_increment, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index 979ddd02c..ccbec8f1e 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_refund = response.parse() + card_refund = await response.parse() assert_matches_type(Transaction, card_refund, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py new file mode 100644 index 000000000..0d7122ce7 --- /dev/null +++ b/tests/api_resources/simulations/test_card_reversals.py @@ -0,0 +1,100 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardReversals: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_reversal = client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_reversal = client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_reversals.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_reversal = response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_reversals.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_reversal = response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardReversals: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_reversal = await async_client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_reversal = await async_client.simulations.card_reversals.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + amount=1, + ) + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_reversals.with_raw_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_reversal = await response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_reversals.with_streaming_response.create( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_reversal = await response.parse() + assert_matches_type(CardPayment, card_reversal, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py new file mode 100644 index 000000000..c994fdf29 --- /dev/null +++ b/tests/api_resources/simulations/test_card_settlements.py @@ -0,0 +1,108 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Transaction + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardSettlements: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_settlement = client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_settlement = client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_settlements.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_settlement = response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_settlements.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_settlement = response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardSettlements: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_settlement = await async_client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_settlement = await async_client.simulations.card_settlements.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + amount=1, + ) + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_settlements.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_settlement = await response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_settlements.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_settlement = await response.parse() + assert_matches_type(Transaction, card_settlement, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_cards.py b/tests/api_resources/simulations/test_cards.py deleted file mode 100644 index 0510f563f..000000000 --- a/tests/api_resources/simulations/test_cards.py +++ /dev/null @@ -1,203 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Transaction -from increase.types.simulations import CardAuthorizationSimulation - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCards: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_authorize(self, client: Increase) -> None: - card = client.simulations.cards.authorize( - amount=1000, - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_method_authorize_with_all_params(self, client: Increase) -> None: - card = client.simulations.cards.authorize( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_raw_response_authorize(self, client: Increase) -> None: - response = client.simulations.cards.with_raw_response.authorize( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - def test_streaming_response_authorize(self, client: Increase) -> None: - with client.simulations.cards.with_streaming_response.authorize( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_settlement(self, client: Increase) -> None: - card = client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_method_settlement_with_all_params(self, client: Increase) -> None: - card = client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_raw_response_settlement(self, client: Increase) -> None: - response = client.simulations.cards.with_raw_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - def test_streaming_response_settlement(self, client: Increase) -> None: - with client.simulations.cards.with_streaming_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCards: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_authorize(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.authorize( - amount=1000, - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_method_authorize_with_all_params(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.authorize( - amount=1000, - card_id="card_oubs0hwk5rn6knuecxg2", - digital_wallet_token_id="digital_wallet_token_id", - event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", - merchant_acceptor_id="5665270011000168", - merchant_category_code="5734", - merchant_city="New York", - merchant_country="US", - merchant_descriptor="AMAZON.COM", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_raw_response_authorize(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.cards.with_raw_response.authorize( - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - @parametrize - async def test_streaming_response_authorize(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.cards.with_streaming_response.authorize( - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(CardAuthorizationSimulation, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_settlement(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_method_settlement_with_all_params(self, async_client: AsyncIncrease) -> None: - card = await async_client.simulations.cards.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - amount=1, - ) - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_raw_response_settlement(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.cards.with_raw_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - @parametrize - async def test_streaming_response_settlement(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.cards.with_streaming_response.settlement( - card_id="card_oubs0hwk5rn6knuecxg2", - pending_transaction_id="pending_transaction_k1sfetcau2qbvjbzgju4", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(Transaction, card, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 0dc091c92..b77fa8782 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -17,7 +17,6 @@ class TestCheckDeposits: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( @@ -25,7 +24,6 @@ def test_method_reject(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_reject(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.reject( @@ -37,7 +35,6 @@ def test_raw_response_reject(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_reject(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.reject( @@ -51,7 +48,6 @@ def test_streaming_response_reject(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_reject(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -97,7 +93,6 @@ def test_path_params_return(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( @@ -105,7 +100,6 @@ def test_method_submit(self, client: Increase) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( @@ -117,7 +111,6 @@ def test_raw_response_submit(self, client: Increase) -> None: check_deposit = response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( @@ -131,7 +124,6 @@ def test_streaming_response_submit(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -143,7 +135,6 @@ def test_path_params_submit(self, client: Increase) -> None: class TestAsyncCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( @@ -151,7 +142,6 @@ async def test_method_reject(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.reject( @@ -160,10 +150,9 @@ async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.reject( @@ -177,7 +166,6 @@ async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_reject(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): @@ -200,7 +188,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -223,7 +211,6 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: "", ) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( @@ -231,7 +218,6 @@ async def test_method_submit(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( @@ -240,10 +226,9 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( @@ -257,7 +242,6 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 93834eb5e..7afae4013 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -17,7 +17,6 @@ class TestCheckTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_method_mail(self, client: Increase) -> None: check_transfer = client.simulations.check_transfers.mail( @@ -25,7 +24,6 @@ def test_method_mail(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_raw_response_mail(self, client: Increase) -> None: response = client.simulations.check_transfers.with_raw_response.mail( @@ -37,7 +35,6 @@ def test_raw_response_mail(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_streaming_response_mail(self, client: Increase) -> None: with client.simulations.check_transfers.with_streaming_response.mail( @@ -51,7 +48,6 @@ def test_streaming_response_mail(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize def test_path_params_mail(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -63,7 +59,6 @@ def test_path_params_mail(self, client: Increase) -> None: class TestAsyncCheckTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.simulations.check_transfers.mail( @@ -71,7 +66,6 @@ async def test_method_mail(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_transfers.with_raw_response.mail( @@ -80,10 +74,9 @@ async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_transfers.with_streaming_response.mail( @@ -97,7 +90,6 @@ async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism incorrectly returns an invalid JSON error") @parametrize async def test_path_params_mail(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): 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 7d4d8cb36..f3e72d5cc 100644 --- a/tests/api_resources/simulations/test_digital_wallet_token_requests.py +++ b/tests/api_resources/simulations/test_digital_wallet_token_requests.py @@ -71,7 +71,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token_request = response.parse() + digital_wallet_token_request = await response.parse() assert_matches_type(DigitalWalletTokenRequestCreateResponse, digital_wallet_token_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py index 3eedf06da..189905342 100644 --- a/tests/api_resources/simulations/test_documents.py +++ b/tests/api_resources/simulations/test_documents.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py new file mode 100644 index 000000000..69291ab83 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -0,0 +1,125 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundACHTransfer +from increase._utils import parse_datetime + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundACHTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_ach_transfer = response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_ach_transfer = response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundACHTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + company_descriptive_date="x", + company_discretionary_data="x", + company_entry_description="x", + company_id="x", + company_name="x", + receiver_id_number="x", + receiver_name="x", + resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_ach_transfer = await response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_ach_transfer = await response.parse() + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index 48760003f..fdd11f49e 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -77,7 +77,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py index aa7a859dc..9a2285c51 100644 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ b/tests/api_resources/simulations/test_inbound_funds_holds.py @@ -74,7 +74,7 @@ async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = response.parse() + inbound_funds_hold = await response.parse() assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py deleted file mode 100644 index c54b501f5..000000000 --- a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py +++ /dev/null @@ -1,130 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import InboundInternationalACHTransfer - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = await response.parse() - assert_matches_type(InboundInternationalACHTransfer, inbound_international_ach_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True 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 new file mode 100644 index 000000000..7e547d239 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py @@ -0,0 +1,138 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import ( + InboundRealTimePaymentsTransferCreateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = ( + await async_client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = ( + await async_client.simulations.inbound_real_time_payments_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + remittance_information="x", + request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + ) + ) + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_real_time_payments_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_real_time_payments_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True 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 e03b70c12..56a206a95 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -154,7 +154,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py new file mode 100644 index 000000000..f1893dbe4 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -0,0 +1,136 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundWireTransfer + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundWireTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", + sender_reference="x", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_wire_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_wire_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundWireTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + beneficiary_address_line1="x", + beneficiary_address_line2="x", + beneficiary_address_line3="x", + beneficiary_name="x", + beneficiary_reference="x", + originator_address_line1="x", + originator_address_line2="x", + originator_address_line3="x", + originator_name="x", + originator_routing_number="x", + originator_to_beneficiary_information_line1="x", + originator_to_beneficiary_information_line2="x", + originator_to_beneficiary_information_line3="x", + originator_to_beneficiary_information_line4="x", + sender_reference="x", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_wire_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_wire_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index d755d9a81..e51d2e67d 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -93,7 +93,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - interest_payment = response.parse() + interest_payment = await response.parse() assert_matches_type(Transaction, interest_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 9762d794f..419377273 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -18,16 +18,16 @@ class TestPhysicalCards: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_shipment_advance(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.shipment_advance( + def test_method_advance_shipment(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_raw_response_shipment_advance(self, client: Increase) -> None: - response = client.simulations.physical_cards.with_raw_response.shipment_advance( + def test_raw_response_advance_shipment(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) @@ -38,8 +38,8 @@ def test_raw_response_shipment_advance(self, client: Increase) -> None: assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_streaming_response_shipment_advance(self, client: Increase) -> None: - with client.simulations.physical_cards.with_streaming_response.shipment_advance( + def test_streaming_response_advance_shipment(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -52,9 +52,9 @@ def test_streaming_response_shipment_advance(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_shipment_advance(self, client: Increase) -> None: + def test_path_params_advance_shipment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - client.simulations.physical_cards.with_raw_response.shipment_advance( + client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", shipment_status="shipped", ) @@ -64,28 +64,28 @@ class TestAsyncPhysicalCards: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_shipment_advance(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.shipment_advance( + async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_raw_response_shipment_advance(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.physical_cards.with_raw_response.shipment_advance( + async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_streaming_response_shipment_advance(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.physical_cards.with_streaming_response.shipment_advance( + async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", shipment_status="shipped", ) as response: @@ -98,9 +98,9 @@ async def test_streaming_response_shipment_advance(self, async_client: AsyncIncr assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_shipment_advance(self, async_client: AsyncIncrease) -> None: + async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - await async_client.simulations.physical_cards.with_raw_response.shipment_advance( + await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", shipment_status="shipped", ) diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 348c8bdf6..22734a13f 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -67,7 +67,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize 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 7835c8efc..c9ec4eb72 100644 --- a/tests/api_resources/simulations/test_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_real_time_payments_transfers.py @@ -10,9 +10,6 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import RealTimePaymentsTransfer -from increase.types.simulations import ( - InboundRealTimePaymentsTransferSimulationResult, -) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -68,61 +65,6 @@ def test_path_params_complete(self, client: Increase) -> None: real_time_payments_transfer_id="", ) - @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - real_time_payments_transfer = client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - class TestAsyncRealTimePaymentsTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -150,7 +92,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -174,58 +116,3 @@ async def test_path_params_complete(self, async_client: AsyncIncrease) -> None: await async_client.simulations.real_time_payments_transfers.with_raw_response.complete( real_time_payments_transfer_id="", ) - - @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - real_time_payments_transfer = await async_client.simulations.real_time_payments_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - debtor_account_number="x", - debtor_name="x", - debtor_routing_number="xxxxxxxxx", - remittance_information="x", - request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", - ) - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.real_time_payments_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.real_time_payments_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferSimulationResult, real_time_payments_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index 8a699bc38..a3a380865 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer +from increase.types import WireTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -18,117 +18,157 @@ class TestWireTransfers: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_create_inbound(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_method_reverse(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.reverse( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) - - @parametrize - def test_method_create_inbound_with_all_params(self, client: Increase) -> None: - wire_transfer = client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + def test_raw_response_reverse(self, client: Increase) -> None: + response = client.simulations.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + def test_streaming_response_reverse(self, client: Increase) -> None: + with client.simulations.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_reverse(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.simulations.wire_transfers.with_raw_response.reverse( + "", + ) + + @parametrize + def test_method_submit(self, client: Increase) -> None: + wire_transfer = client.simulations.wire_transfers.submit( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - def test_raw_response_create_inbound(self, client: Increase) -> None: - response = client.simulations.wire_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_raw_response_submit(self, client: Increase) -> None: + response = client.simulations.wire_transfers.with_raw_response.submit( + "wire_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - def test_streaming_response_create_inbound(self, client: Increase) -> None: - with client.simulations.wire_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + def test_streaming_response_submit(self, client: Increase) -> None: + with client.simulations.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + @parametrize + def test_path_params_submit(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + client.simulations.wire_transfers.with_raw_response.submit( + "", + ) + class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_create_inbound(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_method_reverse(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.reverse( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) - - @parametrize - async def test_method_create_inbound_with_all_params(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.simulations.wire_transfers.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_transfers.with_raw_response.reverse( + "wire_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_transfers.with_streaming_response.reverse( + "wire_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.simulations.wire_transfers.with_raw_response.reverse( + "", + ) + + @parametrize + async def test_method_submit(self, async_client: AsyncIncrease) -> None: + wire_transfer = await async_client.simulations.wire_transfers.submit( + "wire_transfer_id", ) - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_raw_response_create_inbound(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.wire_transfers.with_raw_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_transfers.with_raw_response.submit( + "wire_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + wire_transfer = await response.parse() + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize - async def test_streaming_response_create_inbound(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.wire_transfers.with_streaming_response.create_inbound( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, + async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_transfers.with_streaming_response.submit( + "wire_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(InboundWireTransfer, wire_transfer, path=["response"]) + assert_matches_type(WireTransfer, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): + await async_client.simulations.wire_transfers.with_raw_response.submit( + "", + ) diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 831a7d63d..16237cb72 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -226,7 +226,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize @@ -359,7 +359,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_number = response.parse() + account_number = await response.parse() assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index 3e10525b4..bb8567116 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_statement = response.parse() + account_statement = await response.parse() assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 583d3bb1a..10647a3db 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -261,7 +261,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -295,7 +295,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -345,7 +345,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize @@ -412,7 +412,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_transfer = response.parse() + account_transfer = await response.parse() assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index fd8212eb7..3f80d108f 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -236,7 +236,6 @@ def test_path_params_balance(self, client: Increase) -> None: account_id="", ) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_close(self, client: Increase) -> None: account = client.accounts.close( @@ -244,7 +243,6 @@ def test_method_close(self, client: Increase) -> None: ) assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_close(self, client: Increase) -> None: response = client.accounts.with_raw_response.close( @@ -256,7 +254,6 @@ def test_raw_response_close(self, client: Increase) -> None: account = response.parse() assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_close(self, client: Increase) -> None: with client.accounts.with_streaming_response.close( @@ -270,7 +267,6 @@ def test_streaming_response_close(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_path_params_close(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): @@ -307,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -338,7 +334,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -384,7 +380,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) @parametrize @@ -436,7 +432,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize @@ -473,7 +469,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(BalanceLookup, account, path=["response"]) @parametrize @@ -496,7 +492,6 @@ async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: account_id="", ) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_close(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.close( @@ -504,7 +499,6 @@ async def test_method_close(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.close( @@ -513,10 +507,9 @@ async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account = response.parse() + account = await response.parse() assert_matches_type(Account, account, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_close(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.close( @@ -530,7 +523,6 @@ async def test_streaming_response_close(self, async_client: AsyncIncrease) -> No assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_path_params_close(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 00305a15f..67c8ab1f9 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -197,7 +197,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -230,7 +230,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize @@ -281,7 +281,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_prenotification = response.parse() + ach_prenotification = await response.parse() assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 847819f0a..1012385b3 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -341,7 +341,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -374,7 +374,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -425,7 +425,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize @@ -454,7 +454,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize @@ -492,7 +492,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - ach_transfer = response.parse() + ach_transfer = await response.parse() assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index aae5586f5..6b59f1696 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -218,7 +218,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -251,7 +251,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingAccount, bookkeeping_account, path=["response"]) @parametrize @@ -298,7 +298,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_balance(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_account = response.parse() + bookkeeping_account = await response.parse() assert_matches_type(BookkeepingBalanceLookup, bookkeeping_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index b6385c70e..8d7b8942e 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = response.parse() + bookkeeping_entry = await response.parse() assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry = response.parse() + bookkeeping_entry = await response.parse() assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 1fab3a87d..c1ed6de1b 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize @@ -311,7 +311,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - bookkeeping_entry_set = response.parse() + bookkeeping_entry_set = await response.parse() assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 2cb7b1d91..1f75f3301 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -153,7 +153,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -185,7 +185,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize @@ -235,7 +235,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() + card_dispute = await response.parse() assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index b18e4bac9..64ce7f77d 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = response.parse() + card_payment = await response.parse() assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_payment = response.parse() + card_payment = await response.parse() assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 7483ce1f7..172656d19 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = response.parse() + card_purchase_supplement = await response.parse() assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_purchase_supplement = response.parse() + card_purchase_supplement = await response.parse() assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 45b5abd5d..03606b54a 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -211,15 +211,15 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_retrieve_sensitive_details(self, client: Increase) -> None: - card = client.cards.retrieve_sensitive_details( + def test_method_details(self, client: Increase) -> None: + card = client.cards.details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None: - response = client.cards.with_raw_response.retrieve_sensitive_details( + def test_raw_response_details(self, client: Increase) -> None: + response = client.cards.with_raw_response.details( "card_id", ) @@ -229,8 +229,8 @@ def test_raw_response_retrieve_sensitive_details(self, client: Increase) -> None assert_matches_type(CardDetails, card, path=["response"]) @parametrize - def test_streaming_response_retrieve_sensitive_details(self, client: Increase) -> None: - with client.cards.with_streaming_response.retrieve_sensitive_details( + def test_streaming_response_details(self, client: Increase) -> None: + with client.cards.with_streaming_response.details( "card_id", ) as response: assert not response.is_closed @@ -242,9 +242,9 @@ def test_streaming_response_retrieve_sensitive_details(self, client: Increase) - assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_retrieve_sensitive_details(self, client: Increase) -> None: + def test_path_params_details(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.cards.with_raw_response.retrieve_sensitive_details( + client.cards.with_raw_response.details( "", ) @@ -288,7 +288,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -319,7 +319,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -379,7 +379,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(Card, card, path=["response"]) @parametrize @@ -429,7 +429,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize @@ -444,26 +444,26 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.retrieve_sensitive_details( + async def test_method_details(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.details( "card_id", ) assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_raw_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.cards.with_raw_response.retrieve_sensitive_details( + async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.details( "card_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() + card = await response.parse() assert_matches_type(CardDetails, card, path=["response"]) @parametrize - async def test_streaming_response_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: - async with async_client.cards.with_streaming_response.retrieve_sensitive_details( + async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.details( "card_id", ) as response: assert not response.is_closed @@ -475,8 +475,8 @@ async def test_streaming_response_retrieve_sensitive_details(self, async_client: assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_retrieve_sensitive_details(self, async_client: AsyncIncrease) -> None: + async def test_path_params_details(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.cards.with_raw_response.retrieve_sensitive_details( + await async_client.cards.with_raw_response.details( "", ) diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index 1ec22ea43..adab057c6 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -185,7 +185,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -219,7 +219,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize @@ -269,7 +269,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_deposit = response.parse() + check_deposit = await response.parse() assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index efb753353..0f21979ea 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -247,7 +247,6 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -255,7 +254,6 @@ def test_method_stop_payment(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_method_stop_payment_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.stop_payment( @@ -264,7 +262,6 @@ def test_method_stop_payment_with_all_params(self, client: Increase) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_raw_response_stop_payment(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.stop_payment( @@ -276,7 +273,6 @@ def test_raw_response_stop_payment(self, client: Increase) -> None: check_transfer = response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_streaming_response_stop_payment(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.stop_payment( @@ -290,7 +286,6 @@ def test_streaming_response_stop_payment(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize def test_path_params_stop_payment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): @@ -355,7 +350,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -388,7 +383,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -438,7 +433,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize @@ -467,7 +462,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -505,7 +500,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize @@ -528,7 +523,6 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: "", ) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -536,7 +530,6 @@ async def test_method_stop_payment(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.stop_payment( @@ -545,7 +538,6 @@ async def test_method_stop_payment_with_all_params(self, async_client: AsyncIncr ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.stop_payment( @@ -554,10 +546,9 @@ async def test_raw_response_stop_payment(self, async_client: AsyncIncrease) -> N assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - check_transfer = response.parse() + check_transfer = await response.parse() assert_matches_type(CheckTransfer, check_transfer, path=["response"]) - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.stop_payment( @@ -571,7 +562,6 @@ async def test_streaming_response_stop_payment(self, async_client: AsyncIncrease assert cast(Any, response.is_closed) is True - @pytest.mark.skip(reason="Prism doesn't accept no request body being sent but returns 415 if it is sent") @parametrize async def test_path_params_stop_payment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_transfer_id` but received ''"): diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 91eb1f8e4..105398249 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = response.parse() + declined_transaction = await response.parse() assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - declined_transaction = response.parse() + declined_transaction = await response.parse() assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index d1e2e7e37..743166a0a 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -303,7 +303,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -338,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -384,7 +384,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize @@ -413,7 +413,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize @@ -473,7 +473,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_card_profile = response.parse() + digital_card_profile = await response.parse() assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 13d3eb9e8..368ff689c 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = response.parse() + digital_wallet_token = await response.parse() assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - digital_wallet_token = response.parse() + digital_wallet_token = await response.parse() assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index d8eedd34e..ed0699d51 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(Document, document, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() + document = await response.parse() assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 05589eafa..29bd4ef39 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -548,6 +548,48 @@ def test_path_params_archive(self, client: Increase) -> None: "", ) + @parametrize + def test_method_archive_beneficial_owner(self, client: Increase) -> None: + entity = client.entities.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_archive_beneficial_owner(self, client: Increase) -> None: + response = client.entities.with_raw_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_archive_beneficial_owner(self, client: Increase) -> None: + with client.entities.with_streaming_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_archive_beneficial_owner(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.archive_beneficial_owner( + entity_id="", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + @parametrize def test_method_confirm(self, client: Increase) -> None: entity = client.entities.confirm( @@ -594,6 +636,157 @@ def test_path_params_confirm(self, client: Increase) -> None: entity_id="", ) + @parametrize + def test_method_create_beneficial_owner(self, client: Increase) -> None: + entity = client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_method_create_beneficial_owner_with_all_params(self, client: Increase) -> None: + entity = client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: + response = client.entities.with_raw_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_create_beneficial_owner(self, client: Increase) -> None: + with client.entities.with_streaming_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_beneficial_owner(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.create_beneficial_owner( + entity_id="", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + @parametrize def test_method_update_address(self, client: Increase) -> None: entity = client.entities.update_address( @@ -670,6 +863,129 @@ def test_path_params_update_address(self, client: Increase) -> None: }, ) + @parametrize + def test_method_update_beneficial_owner_address(self, client: Increase) -> None: + entity = client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_method_update_beneficial_owner_address_with_all_params(self, client: Increase) -> None: + entity = client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> None: + response = client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_update_beneficial_owner_address(self, client: Increase) -> None: + with client.entities.with_streaming_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_beneficial_owner_address(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + @parametrize + def test_method_update_industry_code(self, client: Increase) -> None: + entity = client.entities.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_update_industry_code(self, client: Increase) -> None: + response = client.entities.with_raw_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_update_industry_code(self, client: Increase) -> None: + with client.entities.with_streaming_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_industry_code(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.update_industry_code( + entity_id="", + industry_code="5132", + ) + class TestAsyncEntities: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -1068,7 +1384,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1099,7 +1415,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1149,7 +1465,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize @@ -1178,7 +1494,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1201,6 +1517,48 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: "", ) + @parametrize + async def test_method_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.archive_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.archive_beneficial_owner( + entity_id="", + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + @parametrize async def test_method_confirm(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.confirm( @@ -1224,7 +1582,7 @@ async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1247,6 +1605,157 @@ async def test_path_params_confirm(self, async_client: AsyncIncrease) -> None: entity_id="", ) + @parametrize + async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_method_create_beneficial_owner_with_all_params(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "company_title": "CEO", + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "confirmed_no_us_tax_id": True, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "drivers_license": { + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + }, + "method": "social_security_number", + "number": "078051120", + "other": { + "back_file_id": "back_file_id", + "country": "x", + "description": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.create_beneficial_owner( + entity_id="entity_n8y8tnk2p9339ti393yi", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.create_beneficial_owner( + entity_id="", + beneficial_owner={ + "individual": { + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + "prongs": ["control"], + }, + ) + @parametrize async def test_method_update_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_address( @@ -1288,7 +1797,7 @@ async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() + entity = await response.parse() assert_matches_type(Entity, entity, path=["response"]) @parametrize @@ -1322,3 +1831,126 @@ async def test_path_params_update_address(self, async_client: AsyncIncrease) -> "zip": "10045", }, ) + + @parametrize + async def test_method_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_method_update_beneficial_owner_address_with_all_params(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.update_beneficial_owner_address( + entity_id="entity_n8y8tnk2p9339ti393yi", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.update_beneficial_owner_address( + entity_id="", + address={ + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + }, + beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + @parametrize + async def test_method_update_industry_code(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_update_industry_code(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_update_industry_code(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.update_industry_code( + entity_id="entity_n8y8tnk2p9339ti393yi", + industry_code="5132", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_industry_code(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.update_industry_code( + entity_id="", + industry_code="5132", + ) diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 1106f1fdf..877e24f0f 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -208,7 +208,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -239,7 +239,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -285,7 +285,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize @@ -328,7 +328,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event_subscription = response.parse() + event_subscription = await response.parse() assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 4a4ffb2e0..d750217e1 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = response.parse() + event = await response.parse() assert_matches_type(Event, event, path=["response"]) @parametrize @@ -167,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - event = response.parse() + event = await response.parse() assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index c51bc3931..ff2ef1b62 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -239,7 +239,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -270,7 +270,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(Export, export, path=["response"]) @parametrize @@ -321,7 +321,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - export = response.parse() + export = await response.parse() assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 8a7d82b66..6e17b34d0 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -225,7 +225,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -258,7 +258,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -307,7 +307,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize @@ -352,7 +352,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - external_account = response.parse() + external_account = await response.parse() assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 44d842d97..e8cac448b 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -171,7 +171,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -203,7 +203,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(File, file, path=["response"]) @parametrize @@ -253,7 +253,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file = response.parse() + file = await response.parse() assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py index f0b1a4e4d..08e11a8db 100644 --- a/tests/api_resources/test_groups.py +++ b/tests/api_resources/test_groups.py @@ -18,13 +18,13 @@ class TestGroups: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve_details(self, client: Increase) -> None: - group = client.groups.retrieve_details() + def test_method_retrieve(self, client: Increase) -> None: + group = client.groups.retrieve() assert_matches_type(Group, group, path=["response"]) @parametrize - def test_raw_response_retrieve_details(self, client: Increase) -> None: - response = client.groups.with_raw_response.retrieve_details() + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.groups.with_raw_response.retrieve() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -32,8 +32,8 @@ def test_raw_response_retrieve_details(self, client: Increase) -> None: assert_matches_type(Group, group, path=["response"]) @parametrize - def test_streaming_response_retrieve_details(self, client: Increase) -> None: - with client.groups.with_streaming_response.retrieve_details() as response: + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.groups.with_streaming_response.retrieve() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -47,22 +47,22 @@ class TestAsyncGroups: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve_details(self, async_client: AsyncIncrease) -> None: - group = await async_client.groups.retrieve_details() + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + group = await async_client.groups.retrieve() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_raw_response_retrieve_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.groups.with_raw_response.retrieve_details() + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.groups.with_raw_response.retrieve() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - group = response.parse() + group = await response.parse() assert_matches_type(Group, group, path=["response"]) @parametrize - async def test_streaming_response_retrieve_details(self, async_client: AsyncIncrease) -> None: - async with async_client.groups.with_streaming_response.retrieve_details() as response: + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.groups.with_streaming_response.retrieve() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index d82fcb32d..ba9abf32d 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -104,16 +104,25 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_method_decline(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + def test_method_create_notification_of_change(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_decline(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + def test_method_create_notification_of_change_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_create_notification_of_change(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -122,9 +131,9 @@ def test_raw_response_decline(self, client: Increase) -> None: assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_decline(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -135,34 +144,25 @@ def test_streaming_response_decline(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_decline(self, client: Increase) -> None: + def test_path_params_create_notification_of_change(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.decline( - "", + client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="", ) @parametrize - def test_method_notification_of_change(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - def test_method_notification_of_change_with_all_params(self, client: Increase) -> None: - inbound_ach_transfer = client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + def test_method_decline(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_raw_response_notification_of_change(self, client: Increase) -> None: - response = client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_raw_response_decline(self, client: Increase) -> None: + response = client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True @@ -171,9 +171,9 @@ def test_raw_response_notification_of_change(self, client: Increase) -> None: assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - def test_streaming_response_notification_of_change(self, client: Increase) -> None: - with client.inbound_ach_transfers.with_streaming_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + def test_streaming_response_decline(self, client: Increase) -> None: + with client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,12 +184,12 @@ def test_streaming_response_notification_of_change(self, client: Increase) -> No assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_notification_of_change(self, client: Increase) -> None: + def test_path_params_decline(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="", + client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize @@ -255,7 +255,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize @@ -308,7 +308,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize @@ -323,27 +323,36 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True @parametrize - async def test_method_decline(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + async def test_method_create_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + updated_account_number="987654321", + updated_routing_number="101050001", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.create_notification_of_change( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -354,45 +363,36 @@ async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: + async def test_path_params_create_notification_of_change(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.decline( - "", + await async_client.inbound_ach_transfers.with_raw_response.create_notification_of_change( + inbound_ach_transfer_id="", ) @parametrize - async def test_method_notification_of_change(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - ) - assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) - - @parametrize - async def test_method_notification_of_change_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_ach_transfer = await async_client.inbound_ach_transfers.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - updated_account_number="987654321", - updated_routing_number="101050001", + async def test_method_decline(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( + "inbound_ach_transfer_id", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_raw_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_ach_transfers.with_raw_response.decline( + "inbound_ach_transfer_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize - async def test_streaming_response_notification_of_change(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_ach_transfers.with_streaming_response.notification_of_change( - inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_ach_transfers.with_streaming_response.decline( + "inbound_ach_transfer_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,12 +403,12 @@ async def test_streaming_response_notification_of_change(self, async_client: Asy assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_notification_of_change(self, async_client: AsyncIncrease) -> None: + async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): - await async_client.inbound_ach_transfers.with_raw_response.notification_of_change( - inbound_ach_transfer_id="", + await async_client.inbound_ach_transfers.with_raw_response.decline( + "", ) @parametrize @@ -428,7 +428,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_ach_transfer = response.parse() + inbound_ach_transfer = await response.parse() assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index c723a8457..54109446a 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -140,6 +140,50 @@ def test_path_params_decline(self, client: Increase) -> None: "", ) + @parametrize + def test_method_return(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_return(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_return(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_return(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) + class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -159,7 +203,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -211,7 +255,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize @@ -240,7 +284,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() + inbound_check_deposit = await response.parse() assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize @@ -264,3 +308,47 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: await async_client.inbound_check_deposits.with_raw_response.decline( "", ) + + @parametrize + async def test_method_return(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_return(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 37b399b81..eed29b796 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = response.parse() + inbound_mail_item = await response.parse() assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize @@ -165,7 +165,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_mail_item = response.parse() + inbound_mail_item = await response.parse() assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 48ec873d2..6fa65219f 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -110,7 +110,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize @@ -154,7 +154,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_drawdown_request = response.parse() + inbound_wire_drawdown_request = await response.parse() assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 99f2454cc..2ed890683 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -120,7 +120,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = response.parse() + inbound_wire_transfer = await response.parse() assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize @@ -173,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_wire_transfer = response.parse() + inbound_wire_transfer = await response.parse() assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/intrafi/test_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py similarity index 63% rename from tests/api_resources/intrafi/test_account_enrollments.py rename to tests/api_resources/test_intrafi_account_enrollments.py index 1b37f1c5a..d595132f9 100644 --- a/tests/api_resources/intrafi/test_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -9,79 +9,79 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import ( +from increase.types import ( IntrafiAccountEnrollment, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestAccountEnrollments: +class TestIntrafiAccountEnrollments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.create( + intrafi_account_enrollment = client.intrafi_account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.create( + response = client.intrafi_account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.create( + with client.intrafi_account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.retrieve( + intrafi_account_enrollment = client.intrafi_account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.retrieve( + response = client.intrafi_account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.retrieve( + with client.intrafi_account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -90,74 +90,74 @@ def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi.account_enrollments.with_raw_response.retrieve( + client.intrafi_account_enrollments.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.list() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = client.intrafi_account_enrollments.list() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.list( + intrafi_account_enrollment = client.intrafi_account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.list() + response = client.intrafi_account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.list() as response: + with client.intrafi_account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_unenroll(self, client: Increase) -> None: - account_enrollment = client.intrafi.account_enrollments.unenroll( + intrafi_account_enrollment = client.intrafi_account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_unenroll(self, client: Increase) -> None: - response = client.intrafi.account_enrollments.with_raw_response.unenroll( + response = client.intrafi_account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_unenroll(self, client: Increase) -> None: - with client.intrafi.account_enrollments.with_streaming_response.unenroll( + with client.intrafi_account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -166,76 +166,76 @@ def test_path_params_unenroll(self, client: Increase) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - client.intrafi.account_enrollments.with_raw_response.unenroll( + client.intrafi_account_enrollments.with_raw_response.unenroll( "", ) -class TestAsyncAccountEnrollments: +class TestAsyncIntrafiAccountEnrollments: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.create( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.create( + response = await async_client.intrafi_account_enrollments.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.create( + async with async_client.intrafi_account_enrollments.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", email_address="user@example.com", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.retrieve( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.retrieve( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.retrieve( + response = await async_client.intrafi_account_enrollments.with_raw_response.retrieve( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.retrieve( + async with async_client.intrafi_account_enrollments.with_streaming_response.retrieve( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,74 +244,74 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi.account_enrollments.with_raw_response.retrieve( + await async_client.intrafi_account_enrollments.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.list() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.list( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list( account_id="account_id", cursor="cursor", idempotency_key="x", limit=1, status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, ) - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.list() + response = await async_client.intrafi_account_enrollments.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.list() as response: + async with async_client.intrafi_account_enrollments.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_unenroll(self, async_client: AsyncIncrease) -> None: - account_enrollment = await async_client.intrafi.account_enrollments.unenroll( + intrafi_account_enrollment = await async_client.intrafi_account_enrollments.unenroll( "intrafi_account_enrollment_id", ) - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.account_enrollments.with_raw_response.unenroll( + response = await async_client.intrafi_account_enrollments.with_raw_response.unenroll( "intrafi_account_enrollment_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_unenroll(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.account_enrollments.with_streaming_response.unenroll( + async with async_client.intrafi_account_enrollments.with_streaming_response.unenroll( "intrafi_account_enrollment_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollment, account_enrollment, path=["response"]) + intrafi_account_enrollment = await response.parse() + assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -320,6 +320,6 @@ async def test_path_params_unenroll(self, async_client: AsyncIncrease) -> None: with pytest.raises( ValueError, match=r"Expected a non-empty value for `intrafi_account_enrollment_id` but received ''" ): - await async_client.intrafi.account_enrollments.with_raw_response.unenroll( + await async_client.intrafi_account_enrollments.with_raw_response.unenroll( "", ) diff --git a/tests/api_resources/intrafi/test_balances.py b/tests/api_resources/test_intrafi_balances.py similarity index 66% rename from tests/api_resources/intrafi/test_balances.py rename to tests/api_resources/test_intrafi_balances.py index 72d34bcdc..4e3f99c2b 100644 --- a/tests/api_resources/intrafi/test_balances.py +++ b/tests/api_resources/test_intrafi_balances.py @@ -9,90 +9,90 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.intrafi import IntrafiBalance +from increase.types import IntrafiBalance base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestBalances: +class TestIntrafiBalances: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_retrieve(self, client: Increase) -> None: - balance = client.intrafi.balances.retrieve( + intrafi_balance = client.intrafi_balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, balance, path=["response"]) + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.balances.with_raw_response.retrieve( + response = client.intrafi_balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.balances.with_streaming_response.retrieve( + with client.intrafi_balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.intrafi.balances.with_raw_response.retrieve( + client.intrafi_balances.with_raw_response.retrieve( "", ) -class TestAsyncBalances: +class TestAsyncIntrafiBalances: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - balance = await async_client.intrafi.balances.retrieve( + intrafi_balance = await async_client.intrafi_balances.retrieve( "account_id", ) - assert_matches_type(IntrafiBalance, balance, path=["response"]) + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.balances.with_raw_response.retrieve( + response = await async_client.intrafi_balances.with_raw_response.retrieve( "account_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = await response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.balances.with_streaming_response.retrieve( + async with async_client.intrafi_balances.with_streaming_response.retrieve( "account_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - balance = await response.parse() - assert_matches_type(IntrafiBalance, balance, path=["response"]) + intrafi_balance = await response.parse() + assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.intrafi.balances.with_raw_response.retrieve( + await async_client.intrafi_balances.with_raw_response.retrieve( "", ) diff --git a/tests/api_resources/intrafi/test_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py similarity index 61% rename from tests/api_resources/intrafi/test_exclusions.py rename to tests/api_resources/test_intrafi_exclusions.py index ff29e3655..46c12e185 100644 --- a/tests/api_resources/intrafi/test_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -9,305 +9,305 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type +from increase.types import IntrafiExclusion from increase.pagination import SyncPage, AsyncPage -from increase.types.intrafi import IntrafiExclusion base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") -class TestExclusions: +class TestIntrafiExclusions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize def test_method_create(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.create( + intrafi_exclusion = client.intrafi_exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.create( + response = client.intrafi_exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.create( + with client.intrafi_exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_retrieve(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.retrieve( + intrafi_exclusion = client.intrafi_exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.retrieve( + response = client.intrafi_exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.retrieve( + with client.intrafi_exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_retrieve(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi.exclusions.with_raw_response.retrieve( + client.intrafi_exclusions.with_raw_response.retrieve( "", ) @parametrize def test_method_list(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.list() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = client.intrafi_exclusions.list() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.list( + intrafi_exclusion = client.intrafi_exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.list() + response = client.intrafi_exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.list() as response: + with client.intrafi_exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_method_archive(self, client: Increase) -> None: - exclusion = client.intrafi.exclusions.archive( + intrafi_exclusion = client.intrafi_exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: - response = client.intrafi.exclusions.with_raw_response.archive( + response = client.intrafi_exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_archive(self, client: Increase) -> None: - with client.intrafi.exclusions.with_streaming_response.archive( + with client.intrafi_exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize def test_path_params_archive(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - client.intrafi.exclusions.with_raw_response.archive( + client.intrafi_exclusions.with_raw_response.archive( "", ) -class TestAsyncExclusions: +class TestAsyncIntrafiExclusions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.create( + intrafi_exclusion = await async_client.intrafi_exclusions.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.create( + response = await async_client.intrafi_exclusions.with_raw_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.create( + async with async_client.intrafi_exclusions.with_streaming_response.create( bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.retrieve( + intrafi_exclusion = await async_client.intrafi_exclusions.retrieve( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.retrieve( + response = await async_client.intrafi_exclusions.with_raw_response.retrieve( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.retrieve( + async with async_client.intrafi_exclusions.with_streaming_response.retrieve( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi.exclusions.with_raw_response.retrieve( + await async_client.intrafi_exclusions.with_raw_response.retrieve( "", ) @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.list() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await async_client.intrafi_exclusions.list() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.list( + intrafi_exclusion = await async_client.intrafi_exclusions.list( cursor="cursor", entity_id="entity_id", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.list() + response = await async_client.intrafi_exclusions.with_raw_response.list() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.list() as response: + async with async_client.intrafi_exclusions.with_streaming_response.list() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: - exclusion = await async_client.intrafi.exclusions.archive( + intrafi_exclusion = await async_client.intrafi_exclusions.archive( "intrafi_exclusion_id", ) - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi.exclusions.with_raw_response.archive( + response = await async_client.intrafi_exclusions.with_raw_response.archive( "intrafi_exclusion_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi.exclusions.with_streaming_response.archive( + async with async_client.intrafi_exclusions.with_streaming_response.archive( "intrafi_exclusion_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" - exclusion = await response.parse() - assert_matches_type(IntrafiExclusion, exclusion, path=["response"]) + intrafi_exclusion = await response.parse() + assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @parametrize async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `intrafi_exclusion_id` but received ''"): - await async_client.intrafi.exclusions.with_raw_response.archive( + await async_client.intrafi_exclusions.with_raw_response.archive( "", ) diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index f2080a6f8..60459796b 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -211,7 +211,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -242,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize @@ -339,7 +339,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - lockbox = response.parse() + lockbox = await response.parse() assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 2de34e5ea..83ca7370a 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -109,7 +109,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = response.parse() + oauth_connection = await response.parse() assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize @@ -152,7 +152,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_connection = response.parse() + oauth_connection = await response.parse() assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py index fac339dc0..1ac7113db 100644 --- a/tests/api_resources/test_oauth_tokens.py +++ b/tests/api_resources/test_oauth_tokens.py @@ -89,7 +89,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - oauth_token = response.parse() + oauth_token = await response.parse() assert_matches_type(OAuthToken, oauth_token, path=["response"]) @parametrize diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index ee91ef1e2..0147f5a77 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -122,7 +122,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = response.parse() + pending_transaction = await response.parse() assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize @@ -177,7 +177,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - pending_transaction = response.parse() + pending_transaction = await response.parse() assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 8208a1991..0289dea89 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -255,7 +255,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -335,7 +335,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize @@ -364,7 +364,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize @@ -419,7 +419,7 @@ async def test_raw_response_clone(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card_profile = response.parse() + physical_card_profile = await response.parse() assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index fd97f23b7..a9c8fafda 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -312,7 +312,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -357,7 +357,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -397,7 +397,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize @@ -449,7 +449,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - physical_card = response.parse() + physical_card = await response.parse() assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 92f6d417f..e78fd1cdb 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -108,7 +108,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(Program, program, path=["response"]) @parametrize @@ -150,7 +150,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - program = response.parse() + program = await response.parse() assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index edd1d1c1c..3e30c8f76 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -259,7 +259,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -306,7 +306,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] ) @@ -365,7 +365,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() + proof_of_authorization_request_submission = await response.parse() assert_matches_type( AsyncPage[ProofOfAuthorizationRequestSubmission], proof_of_authorization_request_submission, diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py index 3ea91f58e..67f041080 100644 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ b/tests/api_resources/test_proof_of_authorization_requests.py @@ -119,7 +119,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() + proof_of_authorization_request = await response.parse() assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() + proof_of_authorization_request = await response.parse() assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 3fb14837f..e85150cdb 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = response.parse() + real_time_decision = await response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize @@ -182,7 +182,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_decision = response.parse() + real_time_decision = await response.parse() assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index 5d719a69c..de382db0d 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -219,7 +219,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -265,7 +265,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] ) @@ -325,7 +325,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() + real_time_payments_request_for_payment = await response.parse() assert_matches_type( AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] ) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 1e84a5648..8e90ed78e 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -202,7 +202,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -236,7 +236,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize @@ -289,7 +289,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_transfer = response.parse() + real_time_payments_transfer = await response.parse() assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index c0896e7cd..f635f5d1a 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -9,7 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import RoutingNumber +from increase.types import RoutingNumberListResponse from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +23,7 @@ def test_method_list(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -32,7 +32,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -43,7 +43,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -54,7 +54,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -67,7 +67,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -76,7 +76,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -86,8 +86,8 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - routing_number = response.parse() - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + routing_number = await response.parse() + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -98,6 +98,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumber], routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_simulations.py b/tests/api_resources/test_simulations.py deleted file mode 100644 index 0e4ff50ae..000000000 --- a/tests/api_resources/test_simulations.py +++ /dev/null @@ -1,318 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ( - CardPayment, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestSimulations: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_card_authorization_expirations(self, client: Increase) -> None: - simulation = client.simulations.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_authorization_expirations(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_authorization_expirations(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_fuel_confirmations(self, client: Increase) -> None: - simulation = client.simulations.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_fuel_confirmations(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_fuel_confirmations(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_increments(self, client: Increase) -> None: - simulation = client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_method_card_increments_with_all_params(self, client: Increase) -> None: - simulation = client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_increments(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_increments(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_card_reversals(self, client: Increase) -> None: - simulation = client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_method_card_reversals_with_all_params(self, client: Increase) -> None: - simulation = client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_raw_response_card_reversals(self, client: Increase) -> None: - response = client.simulations.with_raw_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - def test_streaming_response_card_reversals(self, client: Increase) -> None: - with client.simulations.with_streaming_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncSimulations: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_authorization_expirations(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_authorization_expirations( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_fuel_confirmations(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_fuel_confirmations( - amount=5000, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_increments(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_method_card_increments_with_all_params(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - event_subscription_id="event_subscription_id", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_increments(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_increments(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_increments( - amount=500, - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_card_reversals(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_method_card_reversals_with_all_params(self, async_client: AsyncIncrease) -> None: - simulation = await async_client.simulations.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - amount=1, - ) - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_raw_response_card_reversals(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.with_raw_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - simulation = response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - @parametrize - async def test_streaming_response_card_reversals(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.with_streaming_response.card_reversals( - card_payment_id="card_payment_nd3k2kacrqjli8482ave", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - simulation = await response.parse() - assert_matches_type(CardPayment, simulation, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/entities/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py similarity index 58% rename from tests/api_resources/entities/test_supplemental_documents.py rename to tests/api_resources/test_supplemental_documents.py index 4b97f4110..e20cb1bb5 100644 --- a/tests/api_resources/entities/test_supplemental_documents.py +++ b/tests/api_resources/test_supplemental_documents.py @@ -9,11 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Entity -from increase.pagination import SyncPage, AsyncPage -from increase.types.entities import ( - SupplementalDocument, +from increase.types import ( + EntitySupplementalDocument, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,15 +22,15 @@ class TestSupplementalDocuments: @parametrize def test_method_create(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.create( + supplemental_document = client.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.entities.supplemental_documents.with_raw_response.create( + response = client.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) @@ -39,11 +38,11 @@ def test_raw_response_create(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.entities.supplemental_documents.with_streaming_response.create( + with client.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -51,56 +50,48 @@ def test_streaming_response_create(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True - @parametrize - def test_path_params_create(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.supplemental_documents.with_raw_response.create( - entity_id="", - file_id="file_makxrc67oh9l6sg7w9yc", - ) - @parametrize def test_method_list(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.list( + supplemental_document = client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: - supplemental_document = client.entities.supplemental_documents.list( + supplemental_document = client.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: - response = client.entities.supplemental_documents.with_raw_response.list( + response = client.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: - with client.entities.supplemental_documents.with_streaming_response.list( + with client.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -110,27 +101,27 @@ class TestAsyncSupplementalDocuments: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.create( + supplemental_document = await async_client.supplemental_documents.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.supplemental_documents.with_raw_response.create( + response = await async_client.supplemental_documents.with_raw_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + supplemental_document = await response.parse() + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.supplemental_documents.with_streaming_response.create( + async with async_client.supplemental_documents.with_streaming_response.create( entity_id="entity_n8y8tnk2p9339ti393yi", file_id="file_makxrc67oh9l6sg7w9yc", ) as response: @@ -138,55 +129,47 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(Entity, supplemental_document, path=["response"]) + assert_matches_type(EntitySupplementalDocument, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True - @parametrize - async def test_path_params_create(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.supplemental_documents.with_raw_response.create( - entity_id="", - file_id="file_makxrc67oh9l6sg7w9yc", - ) - @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.list( + supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - supplemental_document = await async_client.entities.supplemental_documents.list( + supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", cursor="cursor", idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.supplemental_documents.with_raw_response.list( + response = await async_client.supplemental_documents.with_raw_response.list( entity_id="entity_id", ) assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - supplemental_document = response.parse() - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + supplemental_document = await response.parse() + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.supplemental_documents.with_streaming_response.list( + async with async_client.supplemental_documents.with_streaming_response.list( entity_id="entity_id", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(AsyncPage[SupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 2f1f3522e..b8dea8d52 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = response.parse() + transaction = await response.parse() assert_matches_type(Transaction, transaction, path=["response"]) @parametrize @@ -169,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - transaction = response.parse() + transaction = await response.parse() assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 4ed4db948..0acdbcd09 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -18,7 +18,6 @@ class TestWireDrawdownRequests: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -31,7 +30,6 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( @@ -51,7 +49,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.create( @@ -68,7 +65,6 @@ def test_raw_response_create(self, client: Increase) -> None: wire_drawdown_request = response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.create( @@ -166,7 +162,6 @@ def test_streaming_response_list(self, client: Increase) -> None: class TestAsyncWireDrawdownRequests: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -179,7 +174,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( @@ -199,7 +193,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.create( @@ -213,10 +206,9 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) - @pytest.mark.skip(reason="Prism tests are broken") @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.wire_drawdown_requests.with_streaming_response.create( @@ -250,7 +242,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize @@ -296,7 +288,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_drawdown_request = response.parse() + wire_drawdown_request = await response.parse() assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 98d7c85e6..3419dbccf 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -236,90 +236,6 @@ def test_path_params_cancel(self, client: Increase) -> None: "", ) - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_method_reverse(self, client: Increase) -> None: - wire_transfer = client.wire_transfers.reverse( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_raw_response_reverse(self, client: Increase) -> None: - response = client.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_streaming_response_reverse(self, client: Increase) -> None: - with client.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_path_params_reverse(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.wire_transfers.with_raw_response.reverse( - "", - ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_method_submit(self, client: Increase) -> None: - wire_transfer = client.wire_transfers.submit( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_raw_response_submit(self, client: Increase) -> None: - response = client.wire_transfers.with_raw_response.submit( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_streaming_response_submit(self, client: Increase) -> None: - with client.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - def test_path_params_submit(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - client.wire_transfers.with_raw_response.submit( - "", - ) - class TestAsyncWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -366,7 +282,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -400,7 +316,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -451,7 +367,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize @@ -480,7 +396,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -518,7 +434,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() + wire_transfer = await response.parse() assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize @@ -540,87 +456,3 @@ async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: await async_client.wire_transfers.with_raw_response.cancel( "", ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_method_reverse(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.wire_transfers.reverse( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: - response = await async_client.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: - async with async_client.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.wire_transfers.with_raw_response.reverse( - "", - ) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_method_submit(self, async_client: AsyncIncrease) -> None: - wire_transfer = await async_client.wire_transfers.submit( - "wire_transfer_id", - ) - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: - response = await async_client.wire_transfers.with_raw_response.submit( - "wire_transfer_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - wire_transfer = response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: - async with async_client.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - wire_transfer = await response.parse() - assert_matches_type(WireTransfer, wire_transfer, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @pytest.mark.skip(reason="Prism tests are broken") - @parametrize - async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `wire_transfer_id` but received ''"): - await async_client.wire_transfers.with_raw_response.submit( - "", - ) diff --git a/tests/conftest.py b/tests/conftest.py index 731a67982..120908a4c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,18 +1,16 @@ from __future__ import annotations +import os import asyncio import logging -from typing import Iterator +from typing import TYPE_CHECKING, Iterator, AsyncIterator import pytest -import os -from typing import TYPE_CHECKING, AsyncIterator - from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -30,20 +28,22 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" + @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') + raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client + @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {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 : + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client diff --git a/tests/test_client.py b/tests/test_client.py index 230905c3f..874f4fc0a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -661,97 +661,6 @@ def test_absolute_request_url(self, client: Increase) -> None: ) assert request.url == "https://myapi.com/foo" - def test_transport_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", - ): - transport = httpx.MockTransport( - lambda: None, # type: ignore - ) - - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport) - - assert client._client._transport is transport - - def test_transport_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - transport=httpx.MockTransport( - lambda: None, # type: ignore - ), - http_client=http_client, - ) - - def test_connection_pool_limits_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - ): - connection_pool_limits = httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ) - - client = Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=connection_pool_limits, - ) - - assert isinstance(client._client._transport, httpx.HTTPTransport) - assert client._client._transport._pool._max_connections == 101 - assert client._client._transport._pool._max_keepalive_connections == 76 - assert client._client._transport._pool._keepalive_expiry == 23 - - def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises( - ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" - ): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ), - http_client=http_client, - ) - - def test_proxies_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - ): - proxies = "https://www.example.com/proxy" - - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies) - - mounts = list(client._client._mounts.keys()) - assert len(mounts) == 1 - - pattern = mounts[0].pattern - assert pattern == "all://" - - def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: - with httpx.Client() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): - with pytest.warns(DeprecationWarning): - Increase( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - proxies="https://www.example.com/proxy", - http_client=http_client, - ) - def test_copied_client_does_not_close_http(self) -> None: client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -841,7 +750,14 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No with pytest.raises(APITimeoutError): self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -856,7 +772,14 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non with pytest.raises(APIStatusError): self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1484,101 +1407,6 @@ def test_absolute_request_url(self, client: AsyncIncrease) -> None: ) assert request.url == "https://myapi.com/foo" - def test_transport_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `transport` argument is deprecated. The `http_client` argument should be passed instead", - ): - transport = httpx.MockTransport( - lambda: None, # type: ignore - ) - - client = AsyncIncrease( - base_url=base_url, api_key=api_key, _strict_response_validation=True, transport=transport - ) - - assert client._client._transport is transport - - async def test_transport_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `transport`"): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - transport=httpx.MockTransport( - lambda: None, # type: ignore - ), - http_client=http_client, - ) - - def test_connection_pool_limits_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - ): - connection_pool_limits = httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ) - - client = AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=connection_pool_limits, - ) - - assert isinstance(client._client._transport, httpx.AsyncHTTPTransport) - assert client._client._transport._pool._max_connections == 101 - assert client._client._transport._pool._max_keepalive_connections == 76 - assert client._client._transport._pool._keepalive_expiry == 23 - - async def test_connection_pool_limits_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises( - ValueError, match="The `http_client` argument is mutually exclusive with `connection_pool_limits`" - ): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - connection_pool_limits=httpx.Limits( - max_connections=101, max_keepalive_connections=76, keepalive_expiry=23 - ), - http_client=http_client, - ) - - def test_proxies_option_is_deprecated(self) -> None: - with pytest.warns( - DeprecationWarning, - match="The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - ): - proxies = "https://www.example.com/proxy" - - client = AsyncIncrease( - base_url=base_url, api_key=api_key, _strict_response_validation=True, proxies=proxies - ) - - mounts = list(client._client._mounts.keys()) - assert len(mounts) == 1 - - pattern = mounts[0].pattern - assert pattern == "all://" - - async def test_proxies_option_mutually_exclusive_with_http_client(self) -> None: - async with httpx.AsyncClient() as http_client: - with pytest.raises(ValueError, match="The `http_client` argument is mutually exclusive with `proxies`"): - with pytest.warns(DeprecationWarning): - AsyncIncrease( - base_url=base_url, - api_key=api_key, - _strict_response_validation=True, - proxies="https://www.example.com/proxy", - http_client=http_client, - ) - async def test_copied_client_does_not_close_http(self) -> None: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) assert not client.is_closed() @@ -1674,7 +1502,14 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APITimeoutError): await self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) @@ -1689,7 +1524,14 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) with pytest.raises(APIStatusError): await self.client.post( "/accounts", - body=cast(object, dict(name="My First Increase Account")), + body=cast( + object, + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + ), cast_to=httpx.Response, options={"headers": {RAW_RESPONSE_HEADER: "stream"}}, ) diff --git a/tests/test_files.py b/tests/test_files.py index 42fa7ae0a..f46618d02 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path =Path(__file__).parent.parent.joinpath("README.md") +readme_path = Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([('file', readme_path)]) + result = to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([('file', readme_path)]) + result = await async_to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) def test_string_not_allowed() -> None: @@ -49,4 +49,3 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) - diff --git a/tests/test_legacy_response.py b/tests/test_legacy_response.py deleted file mode 100644 index f1199aa64..000000000 --- a/tests/test_legacy_response.py +++ /dev/null @@ -1,84 +0,0 @@ -import json -from typing import cast -from typing_extensions import Annotated - -import httpx -import pytest -import pydantic - -from increase import Increase, BaseModel -from increase._streaming import Stream -from increase._base_client import FinalRequestOptions -from increase._legacy_response import LegacyAPIResponse - - -class PydanticModel(pydantic.BaseModel): - ... - - -def test_response_parse_mismatched_basemodel(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=b"foo"), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - with pytest.raises( - TypeError, - match="Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`", - ): - response.parse(to=PydanticModel) - - -def test_response_parse_custom_stream(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=b"foo"), - client=client, - stream=True, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - stream = response.parse(to=Stream[int]) - assert stream._cast_to == int - - -class CustomModel(BaseModel): - foo: str - bar: int - - -def test_response_parse_custom_model(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - obj = response.parse(to=CustomModel) - assert obj.foo == "hello!" - assert obj.bar == 2 - - -def test_response_parse_annotated_type(client: Increase) -> None: - response = LegacyAPIResponse( - raw=httpx.Response(200, content=json.dumps({"foo": "hello!", "bar": 2})), - client=client, - stream=False, - stream_cls=None, - cast_to=str, - options=FinalRequestOptions.construct(method="get", url="/foo"), - ) - - obj = response.parse( - to=cast("type[CustomModel]", Annotated[CustomModel, "random metadata"]), - ) - assert obj.foo == "hello!" - assert obj.bar == 2 diff --git a/tests/test_response.py b/tests/test_response.py index e743d69e2..7da95c19c 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import BaseModel, Increase, AsyncIncrease +from increase import Increase, BaseModel, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index ac4693911..4dd59699e 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,9 +28,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -46,9 +44,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -64,9 +60,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -88,9 +82,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -114,9 +106,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -138,9 +128,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -157,9 +145,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From e1349ef39057926230ea756a3c4fe686dc80053d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 15:50:31 +0000 Subject: [PATCH 0090/1325] chore: sync changes (#512) --- .stats.yml | 2 +- README.md | 35 +- api.md | 13 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 +---- src/increase/_base_client.py | 71 ++-- src/increase/_client.py | 757 +++++++++++----------------------- src/increase/_compat.py | 24 +- src/increase/_qs.py | 26 +- src/increase/_response.py | 12 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 + src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- tests/conftest.py | 22 +- tests/test_files.py | 11 +- tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 21 files changed, 412 insertions(+), 764 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97075707a..09d657875 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-425f6ed67cd1ce367e761ce06208e2053c6aecf90c53c42660c103d8d558c2c7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2588b2d4ec9f9d95f97daca21842a803949e3bd23385f4960f2be73f881357d2.yml diff --git a/README.md b/README.md index 1f137aa0e..2dc0b9cba 100644 --- a/README.md +++ b/README.md @@ -61,15 +61,13 @@ client = AsyncIncrease( environment="sandbox", ) - async def main() -> None: - account = await client.accounts.create( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ) - print(account.id) - + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) asyncio.run(main()) ``` @@ -112,7 +110,6 @@ import increase client = AsyncIncrease() - async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -120,7 +117,6 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) - asyncio.run(main()) ``` @@ -141,7 +137,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -202,7 +198,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -242,7 +238,7 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries=5).accounts.create( +client.with_options(max_retries = 5).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -269,7 +265,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout=5.0).accounts.create( +client.with_options(timeout = 5.0).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -338,11 +334,11 @@ with client.accounts.with_streaming_response.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", -) as response: - print(response.headers.get("X-My-Header")) +) as response : + print(response.headers.get('X-My-Header')) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -396,10 +392,7 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient( - proxies="http://my.test.proxy.example.com", - transport=httpx.HTTPTransport(local_address="0.0.0.0"), - ), + http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), ) ``` diff --git a/api.md b/api.md index db4588dba..723b74f86 100644 --- a/api.md +++ b/api.md @@ -333,7 +333,6 @@ Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] - client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit -- client.inbound*check_deposits.return*(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit # RealTimePaymentsTransfers @@ -814,6 +813,18 @@ Methods: - client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer +## InboundInternationalACHTransfers + +Types: + +```python +from increase.types.simulations import InboundInternationalACHTransferCreateResponse +``` + +Methods: + +- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransferCreateResponse + ## CardAuthorizations Types: diff --git a/requirements-dev.lock b/requirements-dev.lock index f6f54a23d..33440059e 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase # via respx + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio - # via increase # via mypy # via pydantic # via pydantic-core + # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index daa54a31b..094dd754e 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via increase + # via sdk-pythonpackagename certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via increase + # via sdk-pythonpackagename exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via increase + # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via increase + # via sdk-pythonpackagename pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via increase + # via sdk-pythonpackagename typing-extensions==4.8.0 # via anyio - # via increase # via pydantic # via pydantic-core + # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 519cb0b5a..238f453e6 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,105 +1,18 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes +from ._version import __version__, __title__ +from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS +from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError +from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN from ._utils import file_from_path -from ._client import ( - ENVIRONMENTS, - Client, - Stream, - Timeout, - Increase, - Transport, - AsyncClient, - AsyncStream, - AsyncIncrease, - RequestOptions, -) from ._models import BaseModel -from ._version import __title__, __version__ -from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS -from ._exceptions import ( - APIError, - ConflictError, - IncreaseError, - NotFoundError, - APIStatusError, - RateLimitError, - APITimeoutError, - BadRequestError, - RateLimitedError, - APIConnectionError, - InvalidAPIKeyError, - AuthenticationError, - InternalServerError, - ObjectNotFoundError, - PrivateFeatureError, - InvalidOperationError, - MalformedRequestError, - PermissionDeniedError, - APIMethodNotFoundError, - InvalidParametersError, - EnvironmentMismatchError, - UnprocessableEntityError, - APIResponseValidationError, - InsufficientPermissionsError, - IdempotencyKeyAlreadyUsedError, -) -from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS +from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient from ._utils._logs import setup_logging as _setup_logging +from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse -__all__ = [ - "types", - "__version__", - "__title__", - "NoneType", - "Transport", - "ProxiesTypes", - "NotGiven", - "NOT_GIVEN", - "IncreaseError", - "APIError", - "APIStatusError", - "APITimeoutError", - "APIConnectionError", - "APIResponseValidationError", - "BadRequestError", - "AuthenticationError", - "PermissionDeniedError", - "NotFoundError", - "ConflictError", - "UnprocessableEntityError", - "RateLimitError", - "InternalServerError", - "APIMethodNotFoundError", - "EnvironmentMismatchError", - "IdempotencyKeyAlreadyUsedError", - "InsufficientPermissionsError", - "InvalidAPIKeyError", - "InvalidOperationError", - "InvalidParametersError", - "MalformedRequestError", - "ObjectNotFoundError", - "PrivateFeatureError", - "RateLimitedError", - "Timeout", - "RequestOptions", - "Client", - "AsyncClient", - "Stream", - "AsyncStream", - "Increase", - "AsyncIncrease", - "ENVIRONMENTS", - "file_from_path", - "BaseModel", - "DEFAULT_TIMEOUT", - "DEFAULT_MAX_RETRIES", - "DEFAULT_CONNECTION_LIMITS", - "DefaultHttpxClient", - "DefaultAsyncHttpxClient", -] +__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] _setup_logging() @@ -111,7 +24,7 @@ for __name in __all__: if not __name.startswith("__"): try: - __locals[__name].__module__ = "increase" + setattr(__locals[__name], "__module__", "increase") except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass + pass \ No newline at end of file diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index fe3c6e1d8..32fbacef4 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,6 +86,7 @@ APIConnectionError, APIResponseValidationError, ) +from ._legacy_response import LegacyAPIResponse log: logging.Logger = logging.getLogger(__name__) @@ -124,16 +125,14 @@ def __init__( self, *, url: URL, - ) -> None: - ... + ) -> None: ... @overload def __init__( self, *, params: Query, - ) -> None: - ... + ) -> None: ... def __init__( self, @@ -166,8 +165,7 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: - ... + def next_page_info(self) -> Optional[PageInfo]: ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -599,7 +597,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, - **self.platform_headers(), +**self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -903,8 +901,7 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def request( @@ -914,8 +911,7 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def request( @@ -926,8 +922,7 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def request( self, @@ -1018,6 +1013,7 @@ def _request( response.reason_phrase, response.headers, ) + try: response.raise_for_status() @@ -1091,6 +1087,8 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: + + origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1152,8 +1150,7 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def get( @@ -1164,8 +1161,7 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def get( @@ -1176,8 +1172,7 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def get( self, @@ -1203,8 +1198,7 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def post( @@ -1217,8 +1211,7 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def post( @@ -1231,8 +1224,7 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def post( self, @@ -1465,8 +1457,7 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def request( @@ -1477,8 +1468,7 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def request( @@ -1489,8 +1479,7 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def request( self, @@ -1650,6 +1639,8 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: + + origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1701,8 +1692,7 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def get( @@ -1713,8 +1703,7 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def get( @@ -1725,8 +1714,7 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def get( self, @@ -1750,8 +1738,7 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def post( @@ -1764,8 +1751,7 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def post( @@ -1778,8 +1764,7 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index 311788c4f..d3f890574 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,56 +2,55 @@ from __future__ import annotations +import httpx + +import os + +from ._streaming import AsyncStream as AsyncStream, Stream as Stream + +from ._exceptions import IncreaseError, APIStatusError + +from typing_extensions import override, Self + +from typing import Any + +from ._utils import is_mapping, get_async_library + +from . import _exceptions + import os -from typing import Any, Dict, Union, Mapping, cast -from typing_extensions import Self, Literal, override +import asyncio +import warnings +from typing import Optional, Union, Dict, Any, Mapping, overload, cast +from typing_extensions import Literal import httpx -from . import resources, _exceptions -from ._qs import Querystring -from ._types import ( - NOT_GIVEN, - Omit, - Timeout, - NotGiven, - Transport, - ProxiesTypes, - RequestOptions, -) -from ._utils import ( - is_given, - is_mapping, - get_async_library, -) from ._version import __version__ -from ._streaming import Stream as Stream, AsyncStream as AsyncStream -from ._exceptions import IncreaseError, APIStatusError +from ._qs import Querystring +from .types import shared_params +from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given +from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN from ._base_client import ( + DEFAULT_CONNECTION_LIMITS, + DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, + ResponseT, + SyncHttpxClientWrapper, + AsyncHttpxClientWrapper, SyncAPIClient, AsyncAPIClient, + make_request_options, ) +from . import resources -__all__ = [ - "ENVIRONMENTS", - "Timeout", - "Transport", - "ProxiesTypes", - "RequestOptions", - "resources", - "Increase", - "AsyncIncrease", - "Client", - "AsyncClient", -] +__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } - class Increase(SyncAPIClient): accounts: resources.AccountsResource account_numbers: resources.AccountNumbersResource @@ -112,33 +111,22 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -146,53 +134,44 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" @@ -260,41 +239,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.Client | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -309,31 +279,14 @@ def copy( params = set_default_query http_client = http_client or self._client - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -371,16 +324,12 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -404,7 +353,6 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class AsyncIncrease(AsyncAPIClient): accounts: resources.AsyncAccountsResource account_numbers: resources.AsyncAccountNumbersResource @@ -465,33 +413,22 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production", "sandbox"] | NotGiven - - def __init__( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, - max_retries: int = DEFAULT_MAX_RETRIES, - default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False, - ) -> None: + _environment: Literal["production","sandbox"] | NotGiven + + def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -499,53 +436,44 @@ def __init__( - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc + if base_url_env and base_url is not None: + raise ValueError( + 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f"Unknown environment: {environment}") from exc - - super().__init__( - version=__version__, - base_url=base_url, - max_retries=max_retries, - timeout=timeout, - http_client=http_client, - custom_headers=default_headers, - custom_query=default_query, - _strict_response_validation=_strict_response_validation, - ) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f'Unknown environment: {environment}') from exc + + super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) self._idempotency_header = "Idempotency-Key" @@ -582,9 +510,7 @@ def __init__( self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) self.programs = resources.AsyncProgramsResource(self) self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( - self - ) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) self.account_statements = resources.AsyncAccountStatementsResource(self) self.files = resources.AsyncFilesResource(self) self.documents = resources.AsyncDocumentsResource(self) @@ -615,41 +541,32 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return {"Authorization": f"Bearer {api_key}"} + return { + "Authorization": f"Bearer {api_key}" + } @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f"async:{get_async_library()}", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f'async:{get_async_library()}', + **self._custom_headers, } - def copy( - self, - *, - api_key: str | None = None, - webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | None = None, - base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - http_client: httpx.AsyncClient | None = None, - max_retries: int | NotGiven = NOT_GIVEN, - default_headers: Mapping[str, str] | None = None, - set_default_headers: Mapping[str, str] | None = None, - default_query: Mapping[str, object] | None = None, - set_default_query: Mapping[str, object] | None = None, - _extra_kwargs: Mapping[str, Any] = {}, - ) -> Self: + def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") + raise ValueError( + 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' + ) if default_query is not None and set_default_query is not None: - raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") + raise ValueError( + 'The `default_query` and `set_default_query` arguments are mutually exclusive' + ) headers = self._custom_headers if default_headers is not None: @@ -664,31 +581,14 @@ def copy( params = set_default_query http_client = http_client or self._client - return self.__class__( - api_key=api_key or self.api_key, - webhook_secret=webhook_secret or self.webhook_secret, - base_url=base_url or self.base_url, - environment=environment or self._environment, - timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, - http_client=http_client, - max_retries=max_retries if is_given(max_retries) else self.max_retries, - default_headers=headers, - default_query=params, - **_extra_kwargs, - ) + return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error( - self, - err_msg: str, - *, - body: object, - response: httpx.Response, - ) -> APIStatusError: + def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -726,16 +626,12 @@ def _make_status_error( if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError( - err_msg, - response=response, - body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }, - ) + return _exceptions.InternalServerError(err_msg, response=response, body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -759,22 +655,17 @@ def _make_status_error( return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) - class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.CardsResourceWithRawResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) @@ -784,40 +675,22 @@ def __init__(self, client: Increase) -> None: self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.FilesResourceWithRawResponse(client.files) self.documents = resources.DocumentsResourceWithRawResponse(client.documents) @@ -826,96 +699,53 @@ def __init__(self, client: Increase) -> None: self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) - class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( - client.pending_transactions - ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( - client.declined_transactions - ) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithRawResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) @@ -923,99 +753,54 @@ def __init__(self, client: AsyncIncrease) -> None: self.events = resources.AsyncEventsResourceWithRawResponse(client.events) self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) - class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.CardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.FilesResourceWithStreamingResponse(client.files) self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) @@ -1023,141 +808,73 @@ def __init__(self, client: Increase) -> None: self.events = resources.EventsResourceWithStreamingResponse(client.events) self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) + self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) - class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( - client.inbound_mail_items - ) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) - ) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( - client.account_statements - ) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( - client.event_subscriptions - ) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( - client.bookkeeping_entries - ) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( - client.intrafi_exclusions - ) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) + self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) - Client = Increase -AsyncClient = AsyncIncrease +AsyncClient = AsyncIncrease \ No newline at end of file diff --git a/src/increase/_compat.py b/src/increase/_compat.py index c919b5adb..7c6f91a87 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -159,22 +159,19 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: # generic models if TYPE_CHECKING: - class GenericModel(pydantic.BaseModel): - ... + class GenericModel(pydantic.BaseModel): ... else: if PYDANTIC_V2: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors - class GenericModel(pydantic.BaseModel): - ... + class GenericModel(pydantic.BaseModel): ... else: import pydantic.generics - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): - ... + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... # cached properties @@ -193,26 +190,21 @@ class typed_cached_property(Generic[_T]): func: Callable[[Any], _T] attrname: str | None - def __init__(self, func: Callable[[Any], _T]) -> None: - ... + def __init__(self, func: Callable[[Any], _T]) -> None: ... @overload - def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: - ... + def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: ... @overload - def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: - ... + def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: ... def __get__(self, instance: object, owner: type[Any] | None = None) -> _T | Self: raise NotImplementedError() - def __set_name__(self, owner: type[Any], name: str) -> None: - ... + def __set_name__(self, owner: type[Any], name: str) -> None: ... # __set__ is not defined at runtime, but @cached_property is designed to be settable - def __set__(self, instance: object, value: _T) -> None: - ... + def __set__(self, instance: object, value: _T) -> None: ... else: try: from functools import cached_property as cached_property diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 274320ca5..54a98364f 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,7 +64,9 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) + return flatten( + [self._stringify_item(key, value, opts) for key, value in params.items()] + ) def _stringify_item( self, @@ -79,7 +81,9 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", + f"{key}.{subkey}" + if nested_format == "dots" + else f"{key}[{subkey}]", subvalue, opts, ) @@ -92,7 +96,11 @@ def _stringify_item( return [ ( key, - ",".join(self._primitive_value_to_str(item) for item in value if item is not None), + ",".join( + self._primitive_value_to_str(item) + for item in value + if item is not None + ), ), ] elif array_format == "repeat": @@ -101,7 +109,9 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + raise NotImplementedError( + "The array indices format is not supported yet" + ) elif array_format == "brackets": items = [] key = key + "[]" @@ -146,5 +156,9 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format - self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + self.array_format = ( + qs.array_format if isinstance(array_format, NotGiven) else array_format + ) + self.nested_format = ( + qs.nested_format if isinstance(nested_format, NotGiven) else nested_format + ) diff --git a/src/increase/_response.py b/src/increase/_response.py index fd4bff802..5d4268a31 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, override, get_origin +from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin import anyio import httpx @@ -26,6 +26,7 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base +from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -189,6 +190,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to + if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -203,7 +205,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") + raise TypeError( + "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" + ) if ( cast_to is not object @@ -254,6 +258,8 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): + + @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -358,6 +364,8 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): + + @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 7b5fc6503..357b42be0 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,7 +9,9 @@ import httpx -from ._utils import extract_type_var_from_base +from ._utils import is_mapping, is_dict, extract_type_var_from_base +from ._exceptions import APIError +from ._response import APIResponse, AsyncAPIResponse if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -53,10 +55,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -117,10 +119,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index 510d266d3..0efc60a5e 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,6 +1,7 @@ from __future__ import annotations from os import PathLike +from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -13,8 +14,10 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, + AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -25,6 +28,7 @@ if TYPE_CHECKING: from ._models import BaseModel from ._response import APIResponse, AsyncAPIResponse + from ._legacy_response import HttpxBinaryResponseContent Transport = BaseTransport AsyncTransport = AsyncBaseTransport @@ -189,6 +193,7 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", + ], ) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index c46a62a69..ffd883e9d 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,5 +59,4 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: - ... + def __load__(self) -> T: ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index d0d810337..238e54ada 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): + if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 34797c290..2fc5a1c65 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,20 +211,17 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: - ... + def foo(*, a: str) -> str: ... @overload - def foo(*, b: bool) -> str: - ... + def foo(*, b: bool) -> str: ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: - ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: ... ``` """ @@ -286,18 +283,15 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: - ... +def strip_not_given(obj: None) -> None: ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: - ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... @overload -def strip_not_given(obj: object) -> object: - ... +def strip_not_given(obj: object) -> object: ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index 9b556589f..e880ca207 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.71.0" # x-release-please-version +__version__ = "0.71.0" # x-release-please-version \ No newline at end of file diff --git a/tests/conftest.py b/tests/conftest.py index 120908a4c..731a67982 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,16 +1,18 @@ from __future__ import annotations -import os import asyncio import logging -from typing import TYPE_CHECKING, Iterator, AsyncIterator +from typing import Iterator import pytest +import os +from typing import TYPE_CHECKING, AsyncIterator + from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -28,22 +30,20 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" - @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") + raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client - @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, "param", True) + strict = getattr(request, 'param', True) if not isinstance(strict, bool): - raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {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: + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : yield client diff --git a/tests/test_files.py b/tests/test_files.py index f46618d02..42fa7ae0a 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path = Path(__file__).parent.parent.joinpath("README.md") +readme_path =Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([("file", readme_path)]) + result = to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([("file", readme_path)]) + result = await async_to_httpx_files([('file', readme_path)]) print(result) - assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) + assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) def test_string_not_allowed() -> None: @@ -49,3 +49,4 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) + diff --git a/tests/test_response.py b/tests/test_response.py index 7da95c19c..e743d69e2 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import Increase, BaseModel, AsyncIncrease +from increase import BaseModel, Increase, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index 4dd59699e..ac4693911 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,7 +28,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_missing_event( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -44,7 +46,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_event_missing_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -60,7 +64,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -82,7 +88,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_events_with_data( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -106,7 +114,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines_with_empty_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -128,7 +138,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_data_json_escaped_double_new_line( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -145,7 +157,9 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: +async def test_multiple_data_lines( + sync: bool, client: Increase, async_client: AsyncIncrease +) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From 84c467a493c2fe81fe20fc9fa38f757d5010ce8a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 16:37:44 +0000 Subject: [PATCH 0091/1325] chore: sync changes (#514) --- README.md | 35 +- requirements-dev.lock | 12 +- requirements.lock | 12 +- src/increase/__init__.py | 107 ++- src/increase/_base_client.py | 71 +- src/increase/_client.py | 757 ++++++++++++------ src/increase/_compat.py | 24 +- src/increase/_qs.py | 26 +- src/increase/_response.py | 12 +- src/increase/_streaming.py | 12 +- src/increase/_types.py | 5 - src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_sync.py | 2 +- src/increase/_utils/_utils.py | 18 +- src/increase/_version.py | 2 +- .../resources/inbound_check_deposits.py | 129 +-- .../resources/simulations/__init__.py | 14 + .../simulations/inbound_ach_transfers.py | 79 -- .../inbound_international_ach_transfers.py | 250 ++++++ .../simulations/inbound_wire_transfers.py | 10 - .../resources/simulations/simulations.py | 40 + src/increase/types/__init__.py | 1 - src/increase/types/declined_transaction.py | 257 ++++++ .../types/declined_transaction_list_params.py | 1 + src/increase/types/inbound_ach_transfer.py | 237 ------ src/increase/types/inbound_check_deposit.py | 11 +- .../inbound_check_deposit_return_params.py | 17 - src/increase/types/inbound_wire_transfer.py | 3 - src/increase/types/simulations/__init__.py | 6 + .../inbound_ach_transfer_create_params.py | 40 +- ...nternational_ach_transfer_create_params.py | 47 ++ ...ernational_ach_transfer_create_response.py | 260 ++++++ .../inbound_wire_transfer_create_params.py | 6 - src/increase/types/transaction.py | 301 ++++++- src/increase/types/transaction_list_params.py | 2 + src/increase/types/wire_transfer.py | 3 - .../simulations/test_inbound_ach_transfers.py | 2 - ...est_inbound_international_ach_transfers.py | 148 ++++ .../test_inbound_wire_transfers.py | 2 - .../test_inbound_check_deposits.py | 88 -- tests/conftest.py | 22 +- tests/test_files.py | 11 +- tests/test_response.py | 2 +- tests/test_streaming.py | 28 +- 44 files changed, 2089 insertions(+), 1026 deletions(-) create mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py delete mode 100644 src/increase/types/inbound_check_deposit_return_params.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py create mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_response.py create mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py diff --git a/README.md b/README.md index 2dc0b9cba..1f137aa0e 100644 --- a/README.md +++ b/README.md @@ -61,13 +61,15 @@ client = AsyncIncrease( environment="sandbox", ) + async def main() -> None: - account = await client.accounts.create( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", - ) - print(account.id) + account = await client.accounts.create( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ) + print(account.id) + asyncio.run(main()) ``` @@ -110,6 +112,7 @@ import increase client = AsyncIncrease() + async def main() -> None: all_accounts = [] # Iterate through items across all pages, issuing requests as needed. @@ -117,6 +120,7 @@ async def main() -> None: all_accounts.append(account) print(all_accounts) + asyncio.run(main()) ``` @@ -137,7 +141,7 @@ Or just work directly with the returned data: ```python first_page = await client.accounts.list() -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." for account in first_page.data: print(account.id) @@ -198,7 +202,7 @@ try: ) except increase.APIConnectionError as e: print("The server could not be reached") - print(e.__cause__) # an underlying Exception, likely raised within httpx. + print(e.__cause__) # an underlying Exception, likely raised within httpx. except increase.RateLimitError as e: print("A 429 status code was received; we should back off a bit.") except increase.APIStatusError as e: @@ -238,7 +242,7 @@ client = Increase( ) # Or, configure per-request: -client.with_options(max_retries = 5).accounts.create( +client.with_options(max_retries=5).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -265,7 +269,7 @@ client = Increase( ) # Override per-request: -client.with_options(timeout = 5.0).accounts.create( +client.with_options(timeout=5.0).accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", @@ -334,11 +338,11 @@ with client.accounts.with_streaming_response.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", program_id="program_i2v2os4mwza1oetokh9i", -) as response : - print(response.headers.get('X-My-Header')) +) as response: + print(response.headers.get("X-My-Header")) for line in response.iter_lines(): - print(line) + print(line) ``` The context manager is required so that the response will reliably be closed. @@ -392,7 +396,10 @@ from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", - http_client=DefaultHttpxClient(proxies="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0")), + http_client=DefaultHttpxClient( + proxies="http://my.test.proxy.example.com", + transport=httpx.HTTPTransport(local_address="0.0.0.0"), + ), ) ``` diff --git a/requirements-dev.lock b/requirements-dev.lock index 33440059e..f6f54a23d 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -13,7 +13,7 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase argcomplete==3.1.2 # via nox attrs==23.1.0 @@ -27,7 +27,7 @@ dirty-equals==0.6.0 distlib==0.3.7 # via virtualenv distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio filelock==3.12.4 @@ -37,8 +37,8 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 + # via increase # via respx - # via sdk-pythonpackagename idna==3.4 # via anyio # via httpx @@ -65,7 +65,7 @@ pluggy==1.3.0 py==1.11.0 # via pytest pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic pygments==2.18.0 @@ -88,17 +88,17 @@ six==1.16.0 sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase time-machine==2.9.0 tomli==2.0.1 # via mypy # via pytest typing-extensions==4.8.0 # via anyio + # via increase # via mypy # via pydantic # via pydantic-core - # via sdk-pythonpackagename virtualenv==20.24.5 # via nox zipp==3.17.0 diff --git a/requirements.lock b/requirements.lock index 094dd754e..daa54a31b 100644 --- a/requirements.lock +++ b/requirements.lock @@ -13,12 +13,12 @@ annotated-types==0.6.0 # via pydantic anyio==4.4.0 # via httpx - # via sdk-pythonpackagename + # via increase certifi==2023.7.22 # via httpcore # via httpx distro==1.8.0 - # via sdk-pythonpackagename + # via increase exceptiongroup==1.1.3 # via anyio h11==0.14.0 @@ -26,20 +26,20 @@ h11==0.14.0 httpcore==1.0.2 # via httpx httpx==0.25.2 - # via sdk-pythonpackagename + # via increase idna==3.4 # via anyio # via httpx pydantic==2.7.1 - # via sdk-pythonpackagename + # via increase pydantic-core==2.18.2 # via pydantic sniffio==1.3.0 # via anyio # via httpx - # via sdk-pythonpackagename + # via increase typing-extensions==4.8.0 # via anyio + # via increase # via pydantic # via pydantic-core - # via sdk-pythonpackagename diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 238f453e6..519cb0b5a 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,18 +1,105 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._version import __version__, __title__ -from ._client import Timeout,Transport,RequestOptions,Client,AsyncClient,Stream,AsyncStream,Increase,AsyncIncrease,ENVIRONMENTS -from ._exceptions import IncreaseError,APIError,APIStatusError,APITimeoutError,APIConnectionError,APIResponseValidationError,BadRequestError,AuthenticationError,PermissionDeniedError,NotFoundError,ConflictError,UnprocessableEntityError,RateLimitError,InternalServerError,APIMethodNotFoundError,EnvironmentMismatchError,IdempotencyKeyAlreadyUsedError,InsufficientPermissionsError,InvalidAPIKeyError,InvalidOperationError,InvalidParametersError,MalformedRequestError,ObjectNotFoundError,PrivateFeatureError,RateLimitedError -from ._types import NoneType,Transport,ProxiesTypes,NotGiven,NOT_GIVEN +from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes from ._utils import file_from_path +from ._client import ( + ENVIRONMENTS, + Client, + Stream, + Timeout, + Increase, + Transport, + AsyncClient, + AsyncStream, + AsyncIncrease, + RequestOptions, +) from ._models import BaseModel -from ._constants import DEFAULT_TIMEOUT,DEFAULT_MAX_RETRIES,DEFAULT_CONNECTION_LIMITS -from ._base_client import DefaultHttpxClient,DefaultAsyncHttpxClient -from ._utils._logs import setup_logging as _setup_logging +from ._version import __title__, __version__ from ._response import APIResponse as APIResponse, AsyncAPIResponse as AsyncAPIResponse +from ._constants import DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, DEFAULT_CONNECTION_LIMITS +from ._exceptions import ( + APIError, + ConflictError, + IncreaseError, + NotFoundError, + APIStatusError, + RateLimitError, + APITimeoutError, + BadRequestError, + RateLimitedError, + APIConnectionError, + InvalidAPIKeyError, + AuthenticationError, + InternalServerError, + ObjectNotFoundError, + PrivateFeatureError, + InvalidOperationError, + MalformedRequestError, + PermissionDeniedError, + APIMethodNotFoundError, + InvalidParametersError, + EnvironmentMismatchError, + UnprocessableEntityError, + APIResponseValidationError, + InsufficientPermissionsError, + IdempotencyKeyAlreadyUsedError, +) +from ._base_client import DefaultHttpxClient, DefaultAsyncHttpxClient +from ._utils._logs import setup_logging as _setup_logging -__all__ = ["types", "__version__", "__title__", "NoneType", "Transport", "ProxiesTypes", "NotGiven", "NOT_GIVEN", "IncreaseError", "APIError", "APIStatusError", "APITimeoutError", "APIConnectionError", "APIResponseValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", "NotFoundError", "ConflictError", "UnprocessableEntityError", "RateLimitError", "InternalServerError", "APIMethodNotFoundError", "EnvironmentMismatchError", "IdempotencyKeyAlreadyUsedError", "InsufficientPermissionsError", "InvalidAPIKeyError", "InvalidOperationError", "InvalidParametersError", "MalformedRequestError", "ObjectNotFoundError", "PrivateFeatureError", "RateLimitedError", "Timeout", "RequestOptions", "Client", "AsyncClient", "Stream", "AsyncStream", "Increase", "AsyncIncrease", "ENVIRONMENTS", "file_from_path", "BaseModel", "DEFAULT_TIMEOUT", "DEFAULT_MAX_RETRIES", "DEFAULT_CONNECTION_LIMITS", "DefaultHttpxClient", "DefaultAsyncHttpxClient"] +__all__ = [ + "types", + "__version__", + "__title__", + "NoneType", + "Transport", + "ProxiesTypes", + "NotGiven", + "NOT_GIVEN", + "IncreaseError", + "APIError", + "APIStatusError", + "APITimeoutError", + "APIConnectionError", + "APIResponseValidationError", + "BadRequestError", + "AuthenticationError", + "PermissionDeniedError", + "NotFoundError", + "ConflictError", + "UnprocessableEntityError", + "RateLimitError", + "InternalServerError", + "APIMethodNotFoundError", + "EnvironmentMismatchError", + "IdempotencyKeyAlreadyUsedError", + "InsufficientPermissionsError", + "InvalidAPIKeyError", + "InvalidOperationError", + "InvalidParametersError", + "MalformedRequestError", + "ObjectNotFoundError", + "PrivateFeatureError", + "RateLimitedError", + "Timeout", + "RequestOptions", + "Client", + "AsyncClient", + "Stream", + "AsyncStream", + "Increase", + "AsyncIncrease", + "ENVIRONMENTS", + "file_from_path", + "BaseModel", + "DEFAULT_TIMEOUT", + "DEFAULT_MAX_RETRIES", + "DEFAULT_CONNECTION_LIMITS", + "DefaultHttpxClient", + "DefaultAsyncHttpxClient", +] _setup_logging() @@ -24,7 +111,7 @@ for __name in __all__: if not __name.startswith("__"): try: - setattr(__locals[__name], "__module__", "increase") + __locals[__name].__module__ = "increase" except (TypeError, AttributeError): # Some of our exported symbols are builtins which we can't set attributes for. - pass \ No newline at end of file + pass diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 32fbacef4..fe3c6e1d8 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,7 +86,6 @@ APIConnectionError, APIResponseValidationError, ) -from ._legacy_response import LegacyAPIResponse log: logging.Logger = logging.getLogger(__name__) @@ -125,14 +124,16 @@ def __init__( self, *, url: URL, - ) -> None: ... + ) -> None: + ... @overload def __init__( self, *, params: Query, - ) -> None: ... + ) -> None: + ... def __init__( self, @@ -165,7 +166,8 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: ... + def next_page_info(self) -> Optional[PageInfo]: + ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -597,7 +599,7 @@ def default_headers(self) -> dict[str, str | Omit]: "Accept": "application/json", "Content-Type": "application/json", "User-Agent": self.user_agent, -**self.platform_headers(), + **self.platform_headers(), **self.auth_headers, **self._custom_headers, } @@ -901,7 +903,8 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def request( @@ -911,7 +914,8 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def request( @@ -922,7 +926,8 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def request( self, @@ -1013,7 +1018,6 @@ def _request( response.reason_phrase, response.headers, ) - try: response.raise_for_status() @@ -1087,8 +1091,6 @@ def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1150,7 +1152,8 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def get( @@ -1161,7 +1164,8 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def get( @@ -1172,7 +1176,8 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def get( self, @@ -1198,7 +1203,8 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload def post( @@ -1211,7 +1217,8 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: ... + ) -> _StreamT: + ... @overload def post( @@ -1224,7 +1231,8 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: ... + ) -> ResponseT | _StreamT: + ... def post( self, @@ -1457,7 +1465,8 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def request( @@ -1468,7 +1477,8 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def request( @@ -1479,7 +1489,8 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def request( self, @@ -1639,8 +1650,6 @@ async def _process_response( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, ) -> ResponseT: - - origin = get_origin(cast_to) or cast_to if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): @@ -1692,7 +1701,8 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def get( @@ -1703,7 +1713,8 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def get( @@ -1714,7 +1725,8 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def get( self, @@ -1738,7 +1750,8 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: ... + ) -> ResponseT: + ... @overload async def post( @@ -1751,7 +1764,8 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: ... + ) -> _AsyncStreamT: + ... @overload async def post( @@ -1764,7 +1778,8 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: ... + ) -> ResponseT | _AsyncStreamT: + ... async def post( self, diff --git a/src/increase/_client.py b/src/increase/_client.py index d3f890574..311788c4f 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -2,55 +2,56 @@ from __future__ import annotations -import httpx - -import os - -from ._streaming import AsyncStream as AsyncStream, Stream as Stream - -from ._exceptions import IncreaseError, APIStatusError - -from typing_extensions import override, Self - -from typing import Any - -from ._utils import is_mapping, get_async_library - -from . import _exceptions - import os -import asyncio -import warnings -from typing import Optional, Union, Dict, Any, Mapping, overload, cast -from typing_extensions import Literal +from typing import Any, Dict, Union, Mapping, cast +from typing_extensions import Self, Literal, override import httpx -from ._version import __version__ +from . import resources, _exceptions from ._qs import Querystring -from .types import shared_params -from ._utils import extract_files, maybe_transform, required_args, deepcopy_minimal, maybe_coerce_integer, maybe_coerce_float, maybe_coerce_boolean, is_given -from ._types import Omit, NotGiven, Timeout, Transport, ProxiesTypes, RequestOptions, Headers, NoneType, Query, Body, NOT_GIVEN +from ._types import ( + NOT_GIVEN, + Omit, + Timeout, + NotGiven, + Transport, + ProxiesTypes, + RequestOptions, +) +from ._utils import ( + is_given, + is_mapping, + get_async_library, +) +from ._version import __version__ +from ._streaming import Stream as Stream, AsyncStream as AsyncStream +from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( - DEFAULT_CONNECTION_LIMITS, - DEFAULT_TIMEOUT, DEFAULT_MAX_RETRIES, - ResponseT, - SyncHttpxClientWrapper, - AsyncHttpxClientWrapper, SyncAPIClient, AsyncAPIClient, - make_request_options, ) -from . import resources -__all__ = ["ENVIRONMENTS", "Timeout", "Transport", "ProxiesTypes", "RequestOptions", "resources", "Increase", "AsyncIncrease", "Client", "AsyncClient"] +__all__ = [ + "ENVIRONMENTS", + "Timeout", + "Transport", + "ProxiesTypes", + "RequestOptions", + "resources", + "Increase", + "AsyncIncrease", + "Client", + "AsyncClient", +] ENVIRONMENTS: Dict[str, str] = { "production": "https://api.increase.com", "sandbox": "https://sandbox.increase.com", } + class Increase(SyncAPIClient): accounts: resources.AccountsResource account_numbers: resources.AccountNumbersResource @@ -111,22 +112,33 @@ class Increase(SyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. - http_client: httpx.Client | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#client) for more details. + http_client: httpx.Client | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new synchronous increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -134,44 +146,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -239,32 +260,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": "false", - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": "false", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.Client | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.Client | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -279,14 +309,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -324,12 +371,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -353,6 +404,7 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class AsyncIncrease(AsyncAPIClient): accounts: resources.AsyncAccountsResource account_numbers: resources.AsyncAccountNumbersResource @@ -413,22 +465,33 @@ class AsyncIncrease(AsyncAPIClient): api_key: str webhook_secret: str | None - _environment: Literal["production","sandbox"] | NotGiven - - def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | NotGiven = NOT_GIVEN, base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, - # Configure a custom httpx client. - # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. - # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. - http_client: httpx.AsyncClient | None = None, - # Enable or disable schema validation for data returned by the API. - # When enabled an error APIResponseValidationError is raised - # if the API responds with invalid data for the expected schema. - # - # This parameter may be removed or changed in the future. - # If you rely on this feature, please open a GitHub issue - # outlining your use-case to help us decide if it should be - # part of our public interface in the future. - _strict_response_validation: bool = False) -> None: + _environment: Literal["production", "sandbox"] | NotGiven + + def __init__( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, + base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, + timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + max_retries: int = DEFAULT_MAX_RETRIES, + default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + # Configure a custom httpx client. + # We provide a `DefaultAsyncHttpxClient` class that you can pass to retain the default values we use for `limits`, `timeout` & `follow_redirects`. + # See the [httpx documentation](https://www.python-httpx.org/api/#asyncclient) for more details. + http_client: httpx.AsyncClient | None = None, + # Enable or disable schema validation for data returned by the API. + # When enabled an error APIResponseValidationError is raised + # if the API responds with invalid data for the expected schema. + # + # This parameter may be removed or changed in the future. + # If you rely on this feature, please open a GitHub issue + # outlining your use-case to help us decide if it should be + # part of our public interface in the future. + _strict_response_validation: bool = False, + ) -> None: """Construct a new async increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: @@ -436,44 +499,53 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N - `webhook_secret` from `INCREASE_WEBHOOK_SECRET` """ if api_key is None: - api_key = os.environ.get("INCREASE_API_KEY") + api_key = os.environ.get("INCREASE_API_KEY") if api_key is None: - raise IncreaseError( - "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" - ) + raise IncreaseError( + "The api_key client option must be set either by passing api_key to the client or by setting the INCREASE_API_KEY environment variable" + ) self.api_key = api_key if webhook_secret is None: - webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") + webhook_secret = os.environ.get("INCREASE_WEBHOOK_SECRET") self.webhook_secret = webhook_secret self._environment = environment base_url_env = os.environ.get("INCREASE_BASE_URL") if is_given(base_url) and base_url is not None: - # cast required because mypy doesn't understand the type narrowing - base_url = cast('str | httpx.URL', base_url) # pyright: ignore[reportUnnecessaryCast] + # cast required because mypy doesn't understand the type narrowing + base_url = cast("str | httpx.URL", base_url) # pyright: ignore[reportUnnecessaryCast] elif is_given(environment): - if base_url_env and base_url is not None: - raise ValueError( - 'Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None', - ) - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc + if base_url_env and base_url is not None: + raise ValueError( + "Ambiguous URL; The `INCREASE_BASE_URL` env var and the `environment` argument are given. If you want to use the environment, you must pass base_url=None", + ) + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc elif base_url_env is not None: - base_url = base_url_env + base_url = base_url_env else: - self._environment = environment = "production" - - try: - base_url = ENVIRONMENTS[environment] - except KeyError as exc: - raise ValueError(f'Unknown environment: {environment}') from exc - - super().__init__(version=__version__, base_url=base_url, max_retries=max_retries, timeout=timeout, http_client=http_client, custom_headers=default_headers, custom_query=default_query, _strict_response_validation=_strict_response_validation) + self._environment = environment = "production" + + try: + base_url = ENVIRONMENTS[environment] + except KeyError as exc: + raise ValueError(f"Unknown environment: {environment}") from exc + + super().__init__( + version=__version__, + base_url=base_url, + max_retries=max_retries, + timeout=timeout, + http_client=http_client, + custom_headers=default_headers, + custom_query=default_query, + _strict_response_validation=_strict_response_validation, + ) self._idempotency_header = "Idempotency-Key" @@ -510,7 +582,9 @@ def __init__(self, *, api_key: str | None = None, webhook_secret: str | None = N self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) self.programs = resources.AsyncProgramsResource(self) self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource(self) + self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( + self + ) self.account_statements = resources.AsyncAccountStatementsResource(self) self.files = resources.AsyncFilesResource(self) self.documents = resources.AsyncDocumentsResource(self) @@ -541,32 +615,41 @@ def qs(self) -> Querystring: @override def auth_headers(self) -> dict[str, str]: api_key = self.api_key - return { - "Authorization": f"Bearer {api_key}" - } + return {"Authorization": f"Bearer {api_key}"} @property @override def default_headers(self) -> dict[str, str | Omit]: return { - **super().default_headers, - "X-Stainless-Async": f'async:{get_async_library()}', - **self._custom_headers, + **super().default_headers, + "X-Stainless-Async": f"async:{get_async_library()}", + **self._custom_headers, } - def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, environment: Literal["production","sandbox"] | None = None, base_url: str | httpx.URL | None = None, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, http_client: httpx.AsyncClient | None = None, max_retries: int | NotGiven = NOT_GIVEN, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, set_default_query: Mapping[str, object] | None = None, _extra_kwargs: Mapping[str, Any] = {}) -> Self: + def copy( + self, + *, + api_key: str | None = None, + webhook_secret: str | None = None, + environment: Literal["production", "sandbox"] | None = None, + base_url: str | httpx.URL | None = None, + timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + http_client: httpx.AsyncClient | None = None, + max_retries: int | NotGiven = NOT_GIVEN, + default_headers: Mapping[str, str] | None = None, + set_default_headers: Mapping[str, str] | None = None, + default_query: Mapping[str, object] | None = None, + set_default_query: Mapping[str, object] | None = None, + _extra_kwargs: Mapping[str, Any] = {}, + ) -> Self: """ Create a new client instance re-using the same options given to the current client with optional overriding. """ if default_headers is not None and set_default_headers is not None: - raise ValueError( - 'The `default_headers` and `set_default_headers` arguments are mutually exclusive' - ) + raise ValueError("The `default_headers` and `set_default_headers` arguments are mutually exclusive") if default_query is not None and set_default_query is not None: - raise ValueError( - 'The `default_query` and `set_default_query` arguments are mutually exclusive' - ) + raise ValueError("The `default_query` and `set_default_query` arguments are mutually exclusive") headers = self._custom_headers if default_headers is not None: @@ -581,14 +664,31 @@ def copy(self, *, api_key: str | None = None, webhook_secret: str | None = None, params = set_default_query http_client = http_client or self._client - return self.__class__(api_key = api_key or self.api_key, webhook_secret = webhook_secret or self.webhook_secret, base_url=base_url or self.base_url, environment=environment or self._environment, timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, http_client=http_client, max_retries=max_retries if is_given(max_retries) else self.max_retries, default_headers=headers, default_query=params, **_extra_kwargs) + return self.__class__( + api_key=api_key or self.api_key, + webhook_secret=webhook_secret or self.webhook_secret, + base_url=base_url or self.base_url, + environment=environment or self._environment, + timeout=self.timeout if isinstance(timeout, NotGiven) else timeout, + http_client=http_client, + max_retries=max_retries if is_given(max_retries) else self.max_retries, + default_headers=headers, + default_query=params, + **_extra_kwargs, + ) # Alias for `copy` for nicer inline usage, e.g. # client.with_options(timeout=10).foo.create(...) with_options = copy @override - def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Response,) -> APIStatusError: + def _make_status_error( + self, + err_msg: str, + *, + body: object, + response: httpx.Response, + ) -> APIStatusError: type_ = body.get("type") if is_mapping(body) else None if type_ == "invalid_parameters_error": return _exceptions.InvalidParametersError(err_msg, response=response, body=body) @@ -626,12 +726,16 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp if type_ == "internal_server_error": return _exceptions.InternalServerError(err_msg, response=response, body=body) if response.status_code >= 500: - return _exceptions.InternalServerError(err_msg, response=response, body={ - "detail": None, - "status": 500, - "title": "", - "type": "internal_server_error", - }) + return _exceptions.InternalServerError( + err_msg, + response=response, + body={ + "detail": None, + "status": 500, + "title": "", + "type": "internal_server_error", + }, + ) if response.status_code == 400: return _exceptions.BadRequestError(err_msg, response=response, body=body) @@ -655,17 +759,22 @@ def _make_status_error(self, err_msg: str, *, body: object, response: httpx.Resp return _exceptions.RateLimitError(err_msg, response=response, body=body) return APIStatusError(err_msg, response=response, body=body) + class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.CardsResourceWithRawResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) @@ -675,22 +784,40 @@ def __init__(self, client: Increase) -> None: self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.FilesResourceWithRawResponse(client.files) self.documents = resources.DocumentsResourceWithRawResponse(client.documents) @@ -699,53 +826,96 @@ def __init__(self, client: Increase) -> None: self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) + class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) self.files = resources.AsyncFilesResourceWithRawResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) @@ -753,54 +923,99 @@ def __init__(self, client: AsyncIncrease) -> None: self.events = resources.AsyncEventsResourceWithRawResponse(client.events) self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) + class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.CardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) + self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) self.files = resources.FilesResourceWithStreamingResponse(client.files) self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) @@ -808,73 +1023,141 @@ def __init__(self, client: Increase) -> None: self.events = resources.EventsResourceWithStreamingResponse(client.events) self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) + self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.real_time_payments_request_for_payments = ( + resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) + class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse(client.card_purchase_supplements) + self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse(client.physical_card_profiles) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse(client.digital_wallet_tokens) + self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( + client.physical_card_profiles + ) + self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( + client.digital_wallet_tokens + ) self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse(client.pending_transactions) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse(client.declined_transactions) + self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( + client.pending_transactions + ) + self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( + client.declined_transactions + ) self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse(client.inbound_ach_transfers) + self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( + client.inbound_ach_transfers + ) self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse(client.inbound_wire_transfers) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse(client.wire_drawdown_requests) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(client.inbound_wire_drawdown_requests) + self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( + client.inbound_wire_transfers + ) + self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( + client.wire_drawdown_requests + ) + self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse(client.inbound_check_deposits) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(client.real_time_payments_transfers) + self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( + client.inbound_check_deposits + ) + self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) + self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( + client.inbound_mail_items + ) self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse(client.supplemental_documents) + self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(client.proof_of_authorization_requests) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(client.proof_of_authorization_request_submissions) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse(client.account_statements) + self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests + ) + self.proof_of_authorization_request_submissions = ( + resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + ) + self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( + client.account_statements + ) self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse(client.bookkeeping_entry_sets) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) + self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( + client.event_subscriptions + ) + self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( + client.bookkeeping_entry_sets + ) + self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( + client.bookkeeping_entries + ) self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(client.intrafi_account_enrollments) + self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(client.real_time_payments_request_for_payments) + self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( + client.intrafi_exclusions + ) + self.real_time_payments_request_for_payments = ( + resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments + ) + ) self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) + Client = Increase -AsyncClient = AsyncIncrease \ No newline at end of file +AsyncClient = AsyncIncrease diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 7c6f91a87..c919b5adb 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -159,19 +159,22 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: # generic models if TYPE_CHECKING: - class GenericModel(pydantic.BaseModel): ... + class GenericModel(pydantic.BaseModel): + ... else: if PYDANTIC_V2: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors - class GenericModel(pydantic.BaseModel): ... + class GenericModel(pydantic.BaseModel): + ... else: import pydantic.generics - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): + ... # cached properties @@ -190,21 +193,26 @@ class typed_cached_property(Generic[_T]): func: Callable[[Any], _T] attrname: str | None - def __init__(self, func: Callable[[Any], _T]) -> None: ... + def __init__(self, func: Callable[[Any], _T]) -> None: + ... @overload - def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: ... + def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: + ... @overload - def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: ... + def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: + ... def __get__(self, instance: object, owner: type[Any] | None = None) -> _T | Self: raise NotImplementedError() - def __set_name__(self, owner: type[Any], name: str) -> None: ... + def __set_name__(self, owner: type[Any], name: str) -> None: + ... # __set__ is not defined at runtime, but @cached_property is designed to be settable - def __set__(self, instance: object, value: _T) -> None: ... + def __set__(self, instance: object, value: _T) -> None: + ... else: try: from functools import cached_property as cached_property diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 54a98364f..274320ca5 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -64,9 +64,7 @@ def stringify_items( array_format=array_format, nested_format=nested_format, ) - return flatten( - [self._stringify_item(key, value, opts) for key, value in params.items()] - ) + return flatten([self._stringify_item(key, value, opts) for key, value in params.items()]) def _stringify_item( self, @@ -81,9 +79,7 @@ def _stringify_item( items.extend( self._stringify_item( # TODO: error if unknown format - f"{key}.{subkey}" - if nested_format == "dots" - else f"{key}[{subkey}]", + f"{key}.{subkey}" if nested_format == "dots" else f"{key}[{subkey}]", subvalue, opts, ) @@ -96,11 +92,7 @@ def _stringify_item( return [ ( key, - ",".join( - self._primitive_value_to_str(item) - for item in value - if item is not None - ), + ",".join(self._primitive_value_to_str(item) for item in value if item is not None), ), ] elif array_format == "repeat": @@ -109,9 +101,7 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError( - "The array indices format is not supported yet" - ) + raise NotImplementedError("The array indices format is not supported yet") elif array_format == "brackets": items = [] key = key + "[]" @@ -156,9 +146,5 @@ def __init__( array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, ) -> None: - self.array_format = ( - qs.array_format if isinstance(array_format, NotGiven) else array_format - ) - self.nested_format = ( - qs.nested_format if isinstance(nested_format, NotGiven) else nested_format - ) + self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format + self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/increase/_response.py b/src/increase/_response.py index 5d4268a31..fd4bff802 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -18,7 +18,7 @@ cast, overload, ) -from typing_extensions import Awaitable, ParamSpec, TypeGuard, override, get_origin +from typing_extensions import Awaitable, ParamSpec, override, get_origin import anyio import httpx @@ -26,7 +26,6 @@ from ._types import NoneType from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base -from ._streaming import extract_stream_chunk_type from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -190,7 +189,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: origin = get_origin(cast_to) or cast_to - if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") @@ -205,9 +203,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast(R, response) if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): - raise TypeError( - "Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`" - ) + raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") if ( cast_to is not object @@ -258,8 +254,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): - - @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -364,8 +358,6 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): - - @overload async def parse(self, *, to: type[_T]) -> _T: ... diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 357b42be0..7b5fc6503 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -9,9 +9,7 @@ import httpx -from ._utils import is_mapping, is_dict, extract_type_var_from_base -from ._exceptions import APIError -from ._response import APIResponse, AsyncAPIResponse +from ._utils import extract_type_var_from_base if TYPE_CHECKING: from ._client import Increase, AsyncIncrease @@ -55,10 +53,10 @@ def __stream__(self) -> Iterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed for _sse in iterator: ... @@ -119,10 +117,10 @@ async def __stream__(self) -> AsyncIterator[_T]: response = self.response process_data = self._client._process_response_data iterator = self._iter_events() - + async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - + # Ensure the entire stream is consumed async for _sse in iterator: ... diff --git a/src/increase/_types.py b/src/increase/_types.py index 0efc60a5e..510d266d3 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -1,7 +1,6 @@ from __future__ import annotations from os import PathLike -from abc import ABC, abstractmethod from typing import ( IO, TYPE_CHECKING, @@ -14,10 +13,8 @@ Mapping, TypeVar, Callable, - Iterator, Optional, Sequence, - AsyncIterator, ) from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable @@ -28,7 +25,6 @@ if TYPE_CHECKING: from ._models import BaseModel from ._response import APIResponse, AsyncAPIResponse - from ._legacy_response import HttpxBinaryResponseContent Transport = BaseTransport AsyncTransport = AsyncBaseTransport @@ -193,7 +189,6 @@ def get(self, __key: str) -> str | None: ModelBuilderProtocol, "APIResponse[Any]", "AsyncAPIResponse[Any]", - ], ) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index ffd883e9d..c46a62a69 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,4 +59,5 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: ... + def __load__(self) -> T: + ... diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index 238e54ada..d0d810337 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -65,7 +65,7 @@ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Re # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, 'abandon_on_cancel'): + if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): return await anyio.to_thread.run_sync( partial_f, abandon_on_cancel=cancellable, diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 2fc5a1c65..34797c290 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,17 +211,20 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: ... + def foo(*, a: str) -> str: + ... @overload - def foo(*, b: bool) -> str: ... + def foo(*, b: bool) -> str: + ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: + ... ``` """ @@ -283,15 +286,18 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: ... +def strip_not_given(obj: None) -> None: + ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: + ... @overload -def strip_not_given(obj: object) -> object: ... +def strip_not_given(obj: object) -> object: + ... def strip_not_given(obj: object | None) -> object: diff --git a/src/increase/_version.py b/src/increase/_version.py index e880ca207..9b556589f 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.71.0" # x-release-please-version \ No newline at end of file +__version__ = "0.71.0" # x-release-please-version diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index de312acae..045d2978e 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -2,16 +2,11 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx -from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params +from ..types import inbound_check_deposit_list_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -176,60 +171,6 @@ def decline( cast_to=InboundCheckDeposit, ) - def return_( - self, - inbound_check_deposit_id: str, - *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundCheckDeposit: - """ - Return an Inbound Check Deposit - - Args: - inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. - - reason: The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not inbound_check_deposit_id: - raise ValueError( - f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" - ) - return self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", - body=maybe_transform( - {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundCheckDeposit, - ) - class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property @@ -380,60 +321,6 @@ async def decline( cast_to=InboundCheckDeposit, ) - async def return_( - self, - inbound_check_deposit_id: str, - *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundCheckDeposit: - """ - Return an Inbound Check Deposit - - Args: - inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. - - reason: The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not inbound_check_deposit_id: - raise ValueError( - f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" - ) - return await self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", - body=await async_maybe_transform( - {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundCheckDeposit, - ) - class InboundCheckDepositsResourceWithRawResponse: def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: @@ -448,9 +335,6 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.decline = to_raw_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = to_raw_response_wrapper( - inbound_check_deposits.return_, - ) class AsyncInboundCheckDepositsResourceWithRawResponse: @@ -466,9 +350,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.decline = async_to_raw_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = async_to_raw_response_wrapper( - inbound_check_deposits.return_, - ) class InboundCheckDepositsResourceWithStreamingResponse: @@ -484,9 +365,6 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.decline = to_streamed_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = to_streamed_response_wrapper( - inbound_check_deposits.return_, - ) class AsyncInboundCheckDepositsResourceWithStreamingResponse: @@ -502,6 +380,3 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.decline = async_to_streamed_response_wrapper( inbound_check_deposits.decline, ) - self.return_ = async_to_streamed_response_wrapper( - inbound_check_deposits.return_, - ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index e3c4105b5..90680ca82 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -208,6 +208,14 @@ InboundWireDrawdownRequestsResourceWithStreamingResponse, AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfersResource, + AsyncInboundInternationalACHTransfersResource, + InboundInternationalACHTransfersResourceWithRawResponse, + AsyncInboundInternationalACHTransfersResourceWithRawResponse, + InboundInternationalACHTransfersResourceWithStreamingResponse, + AsyncInboundInternationalACHTransfersResourceWithStreamingResponse, +) from .inbound_real_time_payments_transfers import ( InboundRealTimePaymentsTransfersResource, AsyncInboundRealTimePaymentsTransfersResource, @@ -290,6 +298,12 @@ "AsyncRealTimePaymentsTransfersResourceWithRawResponse", "RealTimePaymentsTransfersResourceWithStreamingResponse", "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundInternationalACHTransfersResource", + "AsyncInboundInternationalACHTransfersResource", + "InboundInternationalACHTransfersResourceWithRawResponse", + "AsyncInboundInternationalACHTransfersResourceWithRawResponse", + "InboundInternationalACHTransfersResourceWithStreamingResponse", + "AsyncInboundInternationalACHTransfersResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 87a5f33a7..448ef4564 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -4,7 +4,6 @@ from typing import Union from datetime import datetime -from typing_extensions import Literal import httpx @@ -50,25 +49,6 @@ def create( receiver_id_number: str | NotGiven = NOT_GIVEN, receiver_name: str | NotGiven = NOT_GIVEN, resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -114,25 +94,6 @@ def create( resolve_at: The time at which the transfer should be resolved. If not provided will resolve immediately. - standard_entry_class_code: The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -157,7 +118,6 @@ def create( "receiver_id_number": receiver_id_number, "receiver_name": receiver_name, "resolve_at": resolve_at, - "standard_entry_class_code": standard_entry_class_code, }, inbound_ach_transfer_create_params.InboundACHTransferCreateParams, ), @@ -194,25 +154,6 @@ async def create( receiver_id_number: str | NotGiven = NOT_GIVEN, receiver_name: str | NotGiven = NOT_GIVEN, resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -258,25 +199,6 @@ async def create( resolve_at: The time at which the transfer should be resolved. If not provided will resolve immediately. - standard_entry_class_code: The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -301,7 +223,6 @@ async def create( "receiver_id_number": receiver_id_number, "receiver_name": receiver_name, "resolve_at": resolve_at, - "standard_entry_class_code": standard_entry_class_code, }, inbound_ach_transfer_create_params.InboundACHTransferCreateParams, ), diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py new file mode 100644 index 000000000..bb5a1beea --- /dev/null +++ b/src/increase/resources/simulations/inbound_international_ach_transfers.py @@ -0,0 +1,250 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_international_ach_transfer_create_params +from ...types.simulations.inbound_international_ach_transfer_create_response import ( + InboundInternationalACHTransferCreateResponse, +) + +__all__ = ["InboundInternationalACHTransfersResource", "AsyncInboundInternationalACHTransfersResource"] + + +class InboundInternationalACHTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundInternationalACHTransfersResourceWithRawResponse: + return InboundInternationalACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundInternationalACHTransfersResourceWithStreamingResponse: + return InboundInternationalACHTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransferCreateResponse: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiver_identification_number: An identification number the originator uses for the receiver. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_international_ach_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransferCreateResponse, + ) + + +class AsyncInboundInternationalACHTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundInternationalACHTransfersResourceWithRawResponse: + return AsyncInboundInternationalACHTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: + return AsyncInboundInternationalACHTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + foreign_payment_amount: int, + originating_currency_code: str, + originator_company_entry_description: str | NotGiven = NOT_GIVEN, + originator_name: str | NotGiven = NOT_GIVEN, + receiver_identification_number: str | NotGiven = NOT_GIVEN, + receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundInternationalACHTransferCreateResponse: + """Simulates an inbound international ACH transfer to your account. + + This imitates + initiating a transfer to an Increase account from a different financial + institution. The transfer may be either a credit or a debit depending on if the + `amount` is positive or negative. The result of calling this API will contain + the created transfer. . + + Args: + account_number_id: The identifier of the Account Number the inbound international ACH Transfer is + for. + + amount: The transfer amount in cents. A positive amount originates a credit transfer + pushing funds to the receiving account. A negative amount originates a debit + transfer pulling funds from the receiving account. + + foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for + example, this is cents. + + originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + + originator_company_entry_description: A description field set by the originator. + + originator_name: Either the name of the originator or an intermediary money transmitter. + + receiver_identification_number: An identification number the originator uses for the receiver. + + receiving_company_or_individual_name: The name of the receiver of the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_international_ach_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "foreign_payment_amount": foreign_payment_amount, + "originating_currency_code": originating_currency_code, + "originator_company_entry_description": originator_company_entry_description, + "originator_name": originator_name, + "receiver_identification_number": receiver_identification_number, + "receiving_company_or_individual_name": receiving_company_or_individual_name, + }, + inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundInternationalACHTransferCreateResponse, + ) + + +class InboundInternationalACHTransfersResourceWithRawResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfersResource) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersResourceWithRawResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfersResource) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = async_to_raw_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class InboundInternationalACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfersResource) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) + + +class AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: + def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfersResource) -> None: + self._inbound_international_ach_transfers = inbound_international_ach_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_international_ach_transfers.create, + ) diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 3501f7328..a0d9ab45e 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -52,7 +52,6 @@ def create( originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -111,9 +110,6 @@ def create( originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -144,7 +140,6 @@ def create( "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), @@ -187,7 +182,6 @@ async def create( originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -246,9 +240,6 @@ async def create( originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -279,7 +270,6 @@ async def create( "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 0da1a353d..533b63479 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -204,6 +204,14 @@ InboundWireDrawdownRequestsResourceWithStreamingResponse, AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) +from .inbound_international_ach_transfers import ( + InboundInternationalACHTransfersResource, + AsyncInboundInternationalACHTransfersResource, + InboundInternationalACHTransfersResourceWithRawResponse, + AsyncInboundInternationalACHTransfersResourceWithRawResponse, + InboundInternationalACHTransfersResourceWithStreamingResponse, + AsyncInboundInternationalACHTransfersResourceWithStreamingResponse, +) from .inbound_real_time_payments_transfers import ( InboundRealTimePaymentsTransfersResource, AsyncInboundRealTimePaymentsTransfersResource, @@ -265,6 +273,10 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResource: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: return RealTimePaymentsTransfersResource(self._client) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResource: + return InboundInternationalACHTransfersResource(self._client) + @cached_property def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) @@ -379,6 +391,10 @@ def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: return AsyncRealTimePaymentsTransfersResource(self._client) + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResource: + return AsyncInboundInternationalACHTransfersResource(self._client) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) @@ -498,6 +514,12 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResourceWithRawResponse: + return InboundInternationalACHTransfersResourceWithRawResponse( + self._simulations.inbound_international_ach_transfers + ) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -609,6 +631,12 @@ def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResourceWithRawResponse: + return AsyncInboundInternationalACHTransfersResourceWithRawResponse( + self._simulations.inbound_international_ach_transfers + ) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -724,6 +752,12 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) + @cached_property + def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResourceWithStreamingResponse: + return InboundInternationalACHTransfersResourceWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -843,6 +877,12 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource self._simulations.real_time_payments_transfers ) + @cached_property + def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: + return AsyncInboundInternationalACHTransfersResourceWithStreamingResponse( + self._simulations.inbound_international_ach_transfers + ) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 412ea7621..de0a95496 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -133,7 +133,6 @@ from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams -from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 689b6cd4d..9fe9fc08b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -20,6 +20,7 @@ "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", + "SourceInternationalACHDecline", "SourceWireDecline", ] @@ -655,6 +656,252 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The Real-Time Payments network identification of the declined transfer.""" +class SourceInternationalACHDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -699,6 +946,7 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", @@ -716,6 +964,8 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. + - `international_ach_decline` - International ACH Decline: details will be under + the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -745,6 +995,13 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ + international_ach_decline: Optional[SourceInternationalACHDecline] = None + """An International ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `international_ach_decline`. + """ + wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index 0a4ca27b8..e79abff89 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,6 +41,7 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 12f7c5d90..237b1b61a 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -13,7 +13,6 @@ "AddendaFreeform", "AddendaFreeformEntry", "Decline", - "InternationalAddenda", "NotificationOfChange", "TransferReturn", ] @@ -99,234 +98,6 @@ class Decline(BaseModel): """ -class InternationalAddenda(BaseModel): - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - class NotificationOfChange(BaseModel): updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -413,12 +184,6 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ - international_addenda: Optional[InternationalAddenda] = None - """ - If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will - contain fields pertaining to the International ACH Transaction. - """ - notification_of_change: Optional[NotificationOfChange] = None """ If you initiate a notification of change in response to the transfer, this will @@ -468,7 +233,6 @@ class InboundACHTransfer(BaseModel): "point_of_purchase", "check_truncation", "destroyed_check", - "international_ach_transaction", ] """The Standard Entry Class (SEC) code of the transfer. @@ -487,7 +251,6 @@ class InboundACHTransfer(BaseModel): - `point_of_purchase` - Point of Purchase (POP). - `check_truncation` - Check Truncation (TRC). - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). """ status: Literal["pending", "declined", "accepted", "returned"] diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index b75b6e5a5..44ae731ff 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,14 +10,6 @@ class DepositReturn(BaseModel): - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] - """The reason the deposit was returned. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - """ - returned_at: datetime """The time at which the deposit was returned.""" @@ -106,13 +98,12 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined", "returned"] + status: Literal["pending", "accepted", "declined"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. - - `returned` - The Inbound Check Deposit was returned. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py deleted file mode 100644 index 169cc55aa..000000000 --- a/src/increase/types/inbound_check_deposit_return_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["InboundCheckDepositReturnParams"] - - -class InboundCheckDepositReturnParams(TypedDict, total=False): - reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] - """The reason to return the Inbound Check Deposit. - - - `altered_or_fictitious` - The check was altered or fictitious. - - `not_authorized` - The check was not authorized. - - `duplicate_presentment` - The check was a duplicate presentment. - """ diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index c2d381d36..75e36f1a3 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -79,9 +79,6 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire transfer.""" - status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 3d3e77b31..f52eae3e7 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -37,12 +37,18 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) +from .inbound_international_ach_transfer_create_params import ( + InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, +) from .ach_transfer_create_notification_of_change_params import ( ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, ) from .inbound_real_time_payments_transfer_create_params import ( InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, ) +from .inbound_international_ach_transfer_create_response import ( + InboundInternationalACHTransferCreateResponse as InboundInternationalACHTransferCreateResponse, +) from .inbound_real_time_payments_transfer_create_response import ( InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, ) diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py index fa743818c..c37061711 100644 --- a/src/increase/types/simulations/inbound_ach_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -4,7 +4,7 @@ from typing import Union from datetime import datetime -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -49,41 +49,3 @@ class InboundACHTransferCreateParams(TypedDict, total=False): If not provided will resolve immediately. """ - - standard_entry_class_code: Literal[ - "corporate_credit_or_debit", - "corporate_trade_exchange", - "prearranged_payments_and_deposit", - "internet_initiated", - "point_of_sale", - "telephone_initiated", - "customer_initiated", - "accounts_receivable", - "machine_transfer", - "shared_network_transaction", - "represented_check", - "back_office_conversion", - "point_of_purchase", - "check_truncation", - "destroyed_check", - "international_ach_transaction", - ] - """The standard entry class code for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). - - `point_of_sale` - Point of Sale (POS). - - `telephone_initiated` - Telephone Initiated (TEL). - - `customer_initiated` - Customer Initiated (CIE). - - `accounts_receivable` - Accounts Receivable (ARC). - - `machine_transfer` - Machine Transfer (MTE). - - `shared_network_transaction` - Shared Network Transaction (SHR). - - `represented_check` - Represented Check (RCK). - - `back_office_conversion` - Back Office Conversion (BOC). - - `point_of_purchase` - Point of Purchase (POP). - - `check_truncation` - Check Truncation (TRC). - - `destroyed_check` - Destroyed Check (XCK). - - `international_ach_transaction` - International ACH Transaction (IAT). - """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py new file mode 100644 index 000000000..3cf052e3b --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py @@ -0,0 +1,47 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundInternationalACHTransferCreateParams"] + + +class InboundInternationalACHTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """ + The identifier of the Account Number the inbound international ACH Transfer is + for. + """ + + amount: Required[int] + """The transfer amount in cents. + + A positive amount originates a credit transfer pushing funds to the receiving + account. A negative amount originates a debit transfer pulling funds from the + receiving account. + """ + + foreign_payment_amount: Required[int] + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + originating_currency_code: Required[str] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + receiver_identification_number: str + """An identification number the originator uses for the receiver.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py new file mode 100644 index 000000000..08a147c24 --- /dev/null +++ b/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py @@ -0,0 +1,260 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from typing_extensions import Literal + +from ..._models import BaseModel + +__all__ = ["InboundInternationalACHTransferCreateResponse"] + + +class InboundInternationalACHTransferCreateResponse(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py index 6e25dc5a8..a620f83a0 100644 --- a/src/increase/types/simulations/inbound_wire_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -97,9 +97,3 @@ class InboundWireTransferCreateParams(TypedDict, total=False): The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. """ - - sender_reference: str - """The sending bank will set sender_reference in production. - - You can simulate any value here. - """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ce9ff4f7d..6da2ae804 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,11 +38,13 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", + "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", + "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", @@ -1655,6 +1657,30 @@ class SourceCheckTransferDeposit(BaseModel): """ +class SourceCheckTransferStopPaymentRequest(BaseModel): + reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] + """The reason why this transfer was stopped. + + - `mail_delivery_failed` - The check could not be delivered. + - `rejected_by_increase` - The check was canceled by an Increase operator who + will provide details out-of-band. + - `not_authorized` - The check was not authorized. + - `unknown` - The check was stopped for another reason. + """ + + requested_at: datetime + """The time the stop-payment was requested.""" + + transfer_id: str + """The ID of the check transfer that was stopped.""" + + type: Literal["check_transfer_stop_payment_request"] + """A constant representing the object's type. + + For this resource it will always be `check_transfer_stop_payment_request`. + """ + + class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -1751,6 +1777,258 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" +class SourceInboundInternationalACHTransfer(BaseModel): + amount: int + """The amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_company_entry_description: str + """A description field set by the originator.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + trace_number: str + """ + A 15 digit number recorded in the Nacha file and available to both the + originating and receiving bank. Along with the amount, date, and originating + routing number, this can be used to identify the ACH transfer at either bank. + ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ + + type: Literal["inbound_international_ach_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_international_ach_transfer`. + """ + + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -1917,9 +2195,6 @@ class SourceInboundWireReversal(BaseModel): institution. """ - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" - transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" @@ -2207,10 +2482,12 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", + "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", @@ -2254,6 +2531,8 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. + - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: + details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under the `inbound_ach_transfer` object. @@ -2263,6 +2542,8 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. + - `inbound_international_ach_transfer` - Inbound International ACH Transfer: + details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2311,6 +2592,13 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ + check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None + """A Check Transfer Stop Payment Request object. + + This field will be present in the JSON response if and only if `category` is + equal to `check_transfer_stop_payment_request`. + """ + fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. @@ -2325,6 +2613,13 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ + inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None + """An Inbound International ACH Transfer object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_international_ach_transfer`. + """ + inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 324e0f00e..78e79eec1 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,10 +53,12 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", + "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index fdab38799..0d17f1364 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -144,9 +144,6 @@ class Reversal(BaseModel): institution. """ - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" - transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py index 69291ab83..b0ce4d741 100644 --- a/tests/api_resources/simulations/test_inbound_ach_transfers.py +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -39,7 +39,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: receiver_id_number="x", receiver_name="x", resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), - standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -94,7 +93,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) receiver_id_number="x", receiver_name="x", resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), - standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py new file mode 100644 index 000000000..0bbe74f67 --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py @@ -0,0 +1,148 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types.simulations import ( + InboundInternationalACHTransferCreateResponse, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiver_identification_number="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = response.parse() + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = response.parse() + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundInternationalACHTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + originator_company_entry_description="x", + originator_name="x", + receiver_identification_number="x", + receiving_company_or_individual_name="x", + ) + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_international_ach_transfer = await response.parse() + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + foreign_payment_amount=10650, + originating_currency_code="NOK", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_international_ach_transfer = await response.parse() + assert_matches_type( + InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py index f1893dbe4..e87a85c65 100644 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -44,7 +44,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", - sender_reference="x", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @@ -105,7 +104,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", - sender_reference="x", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 54109446a..7e10bd5ab 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -140,50 +140,6 @@ def test_path_params_decline(self, client: Increase) -> None: "", ) - @parametrize - def test_method_return(self, client: Increase) -> None: - inbound_check_deposit = client.inbound_check_deposits.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - def test_raw_response_return(self, client: Increase) -> None: - response = client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - def test_streaming_response_return(self, client: Increase) -> None: - with client.inbound_check_deposits.with_streaming_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_return(self, client: Increase) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" - ): - client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="", - reason="altered_or_fictitious", - ) - class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -308,47 +264,3 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: await async_client.inbound_check_deposits.with_raw_response.decline( "", ) - - @parametrize - async def test_method_return(self, async_client: AsyncIncrease) -> None: - inbound_check_deposit = await async_client.inbound_check_deposits.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: - response = await async_client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - @parametrize - async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: - async with async_client.inbound_check_deposits.with_streaming_response.return_( - inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", - reason="altered_or_fictitious", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_return(self, async_client: AsyncIncrease) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" - ): - await async_client.inbound_check_deposits.with_raw_response.return_( - inbound_check_deposit_id="", - reason="altered_or_fictitious", - ) diff --git a/tests/conftest.py b/tests/conftest.py index 731a67982..120908a4c 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,18 +1,16 @@ from __future__ import annotations +import os import asyncio import logging -from typing import Iterator +from typing import TYPE_CHECKING, Iterator, AsyncIterator import pytest -import os -from typing import TYPE_CHECKING, AsyncIterator - from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest pytest.register_assert_rewrite("tests.utils") @@ -30,20 +28,22 @@ def event_loop() -> Iterator[asyncio.AbstractEventLoop]: api_key = "My API Key" + @pytest.fixture(scope="session") def client(request: FixtureRequest) -> Iterator[Increase]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {bool}') + raise TypeError(f"Unexpected fixture parameter type {type(strict)}, expected {bool}") - with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client : + with Increase(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client + @pytest.fixture(scope="session") async def async_client(request: FixtureRequest) -> AsyncIterator[AsyncIncrease]: - strict = getattr(request, 'param', True) + strict = getattr(request, "param", True) if not isinstance(strict, bool): - raise TypeError(f'Unexpected fixture parameter type {type(strict)}, expected {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 : + async with AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=strict) as client: yield client diff --git a/tests/test_files.py b/tests/test_files.py index 42fa7ae0a..f46618d02 100644 --- a/tests/test_files.py +++ b/tests/test_files.py @@ -6,7 +6,7 @@ from increase._files import to_httpx_files, async_to_httpx_files -readme_path =Path(__file__).parent.parent.joinpath("README.md") +readme_path = Path(__file__).parent.parent.joinpath("README.md") def test_pathlib_includes_file_name() -> None: @@ -16,9 +16,9 @@ def test_pathlib_includes_file_name() -> None: def test_tuple_input() -> None: - result = to_httpx_files([('file', readme_path)]) + result = to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) @pytest.mark.asyncio @@ -37,9 +37,9 @@ async def test_async_supports_anyio_path() -> None: @pytest.mark.asyncio async def test_async_tuple_input() -> None: - result = await async_to_httpx_files([('file', readme_path)]) + result = await async_to_httpx_files([("file", readme_path)]) print(result) - assert result == IsList(IsTuple('file', IsTuple('README.md', IsBytes()))) + assert result == IsList(IsTuple("file", IsTuple("README.md", IsBytes()))) def test_string_not_allowed() -> None: @@ -49,4 +49,3 @@ def test_string_not_allowed() -> None: "file": "foo", # type: ignore } ) - diff --git a/tests/test_response.py b/tests/test_response.py index e743d69e2..7da95c19c 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -6,7 +6,7 @@ import pytest import pydantic -from increase import BaseModel, Increase, AsyncIncrease +from increase import Increase, BaseModel, AsyncIncrease from increase._response import ( APIResponse, BaseAPIResponse, diff --git a/tests/test_streaming.py b/tests/test_streaming.py index ac4693911..4dd59699e 100644 --- a/tests/test_streaming.py +++ b/tests/test_streaming.py @@ -28,9 +28,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_missing_event( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_missing_event(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b'data: {"foo":true}\n' yield b"\n" @@ -46,9 +44,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_event_missing_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_event_missing_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -64,9 +60,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"\n" @@ -88,9 +82,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_events_with_data( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_events_with_data(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo":true}\n' @@ -114,9 +106,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines_with_empty_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines_with_empty_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" @@ -138,9 +128,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_data_json_escaped_double_new_line( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_data_json_escaped_double_new_line(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b'data: {"foo": "my long\\n\\ncontent"}' @@ -157,9 +145,7 @@ def body() -> Iterator[bytes]: @pytest.mark.asyncio @pytest.mark.parametrize("sync", [True, False], ids=["sync", "async"]) -async def test_multiple_data_lines( - sync: bool, client: Increase, async_client: AsyncIncrease -) -> None: +async def test_multiple_data_lines(sync: bool, client: Increase, async_client: AsyncIncrease) -> None: def body() -> Iterator[bytes]: yield b"event: ping\n" yield b"data: {\n" From 36d63ca9bc4fbf6a94c132b8f3d1e546d2e7e158 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:04:57 +0000 Subject: [PATCH 0092/1325] feat(api): OpenAPI spec update via Stainless API (#515) --- .stats.yml | 2 +- api.md | 13 +- .../resources/inbound_check_deposits.py | 129 +++++++- .../resources/simulations/__init__.py | 14 - .../simulations/inbound_ach_transfers.py | 79 +++++ .../inbound_international_ach_transfers.py | 250 --------------- .../simulations/inbound_wire_transfers.py | 10 + .../resources/simulations/simulations.py | 40 --- src/increase/types/__init__.py | 1 + src/increase/types/declined_transaction.py | 257 --------------- .../types/declined_transaction_list_params.py | 1 - src/increase/types/inbound_ach_transfer.py | 237 ++++++++++++++ src/increase/types/inbound_check_deposit.py | 11 +- .../inbound_check_deposit_return_params.py | 17 + src/increase/types/inbound_wire_transfer.py | 3 + src/increase/types/simulations/__init__.py | 6 - .../inbound_ach_transfer_create_params.py | 40 ++- ...nternational_ach_transfer_create_params.py | 47 --- ...ernational_ach_transfer_create_response.py | 260 --------------- .../inbound_wire_transfer_create_params.py | 6 + src/increase/types/transaction.py | 301 +----------------- src/increase/types/transaction_list_params.py | 2 - src/increase/types/wire_transfer.py | 3 + .../simulations/test_inbound_ach_transfers.py | 2 + ...est_inbound_international_ach_transfers.py | 148 --------- .../test_inbound_wire_transfers.py | 2 + .../test_inbound_check_deposits.py | 88 +++++ 27 files changed, 629 insertions(+), 1340 deletions(-) delete mode 100644 src/increase/resources/simulations/inbound_international_ach_transfers.py create mode 100644 src/increase/types/inbound_check_deposit_return_params.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_params.py delete mode 100644 src/increase/types/simulations/inbound_international_ach_transfer_create_response.py delete mode 100644 tests/api_resources/simulations/test_inbound_international_ach_transfers.py diff --git a/.stats.yml b/.stats.yml index 09d657875..97075707a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2588b2d4ec9f9d95f97daca21842a803949e3bd23385f4960f2be73f881357d2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-425f6ed67cd1ce367e761ce06208e2053c6aecf90c53c42660c103d8d558c2c7.yml diff --git a/api.md b/api.md index 723b74f86..db4588dba 100644 --- a/api.md +++ b/api.md @@ -333,6 +333,7 @@ Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] - client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit +- client.inbound*check_deposits.return*(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit # RealTimePaymentsTransfers @@ -813,18 +814,6 @@ Methods: - client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer -## InboundInternationalACHTransfers - -Types: - -```python -from increase.types.simulations import InboundInternationalACHTransferCreateResponse -``` - -Methods: - -- client.simulations.inbound_international_ach_transfers.create(\*\*params) -> InboundInternationalACHTransferCreateResponse - ## CardAuthorizations Types: diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 045d2978e..de312acae 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -2,11 +2,16 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from ..types import inbound_check_deposit_list_params +from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import ( + maybe_transform, + async_maybe_transform, +) from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -171,6 +176,60 @@ def decline( cast_to=InboundCheckDeposit, ) + def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. + + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property @@ -321,6 +380,60 @@ async def decline( cast_to=InboundCheckDeposit, ) + async def return_( + self, + inbound_check_deposit_id: str, + *, + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """ + Return an Inbound Check Deposit + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to return. + + reason: The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._post( + f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + body=await async_maybe_transform( + {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class InboundCheckDepositsResourceWithRawResponse: def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: @@ -335,6 +448,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.decline = to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_raw_response_wrapper( + inbound_check_deposits.return_, + ) class AsyncInboundCheckDepositsResourceWithRawResponse: @@ -350,6 +466,9 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.decline = async_to_raw_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_raw_response_wrapper( + inbound_check_deposits.return_, + ) class InboundCheckDepositsResourceWithStreamingResponse: @@ -365,6 +484,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.decline = to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) class AsyncInboundCheckDepositsResourceWithStreamingResponse: @@ -380,3 +502,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.decline = async_to_streamed_response_wrapper( inbound_check_deposits.decline, ) + self.return_ = async_to_streamed_response_wrapper( + inbound_check_deposits.return_, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 90680ca82..e3c4105b5 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -208,14 +208,6 @@ InboundWireDrawdownRequestsResourceWithStreamingResponse, AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfersResource, - AsyncInboundInternationalACHTransfersResource, - InboundInternationalACHTransfersResourceWithRawResponse, - AsyncInboundInternationalACHTransfersResourceWithRawResponse, - InboundInternationalACHTransfersResourceWithStreamingResponse, - AsyncInboundInternationalACHTransfersResourceWithStreamingResponse, -) from .inbound_real_time_payments_transfers import ( InboundRealTimePaymentsTransfersResource, AsyncInboundRealTimePaymentsTransfersResource, @@ -298,12 +290,6 @@ "AsyncRealTimePaymentsTransfersResourceWithRawResponse", "RealTimePaymentsTransfersResourceWithStreamingResponse", "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", - "InboundInternationalACHTransfersResource", - "AsyncInboundInternationalACHTransfersResource", - "InboundInternationalACHTransfersResourceWithRawResponse", - "AsyncInboundInternationalACHTransfersResourceWithRawResponse", - "InboundInternationalACHTransfersResourceWithStreamingResponse", - "AsyncInboundInternationalACHTransfersResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 448ef4564..87a5f33a7 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -4,6 +4,7 @@ from typing import Union from datetime import datetime +from typing_extensions import Literal import httpx @@ -49,6 +50,25 @@ def create( receiver_id_number: str | NotGiven = NOT_GIVEN, receiver_name: str | NotGiven = NOT_GIVEN, resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -94,6 +114,25 @@ def create( resolve_at: The time at which the transfer should be resolved. If not provided will resolve immediately. + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -118,6 +157,7 @@ def create( "receiver_id_number": receiver_id_number, "receiver_name": receiver_name, "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, }, inbound_ach_transfer_create_params.InboundACHTransferCreateParams, ), @@ -154,6 +194,25 @@ async def create( receiver_id_number: str | NotGiven = NOT_GIVEN, receiver_name: str | NotGiven = NOT_GIVEN, resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -199,6 +258,25 @@ async def create( resolve_at: The time at which the transfer should be resolved. If not provided will resolve immediately. + standard_entry_class_code: The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -223,6 +301,7 @@ async def create( "receiver_id_number": receiver_id_number, "receiver_name": receiver_name, "resolve_at": resolve_at, + "standard_entry_class_code": standard_entry_class_code, }, inbound_ach_transfer_create_params.InboundACHTransferCreateParams, ), diff --git a/src/increase/resources/simulations/inbound_international_ach_transfers.py b/src/increase/resources/simulations/inbound_international_ach_transfers.py deleted file mode 100644 index bb5a1beea..000000000 --- a/src/increase/resources/simulations/inbound_international_ach_transfers.py +++ /dev/null @@ -1,250 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import inbound_international_ach_transfer_create_params -from ...types.simulations.inbound_international_ach_transfer_create_response import ( - InboundInternationalACHTransferCreateResponse, -) - -__all__ = ["InboundInternationalACHTransfersResource", "AsyncInboundInternationalACHTransfersResource"] - - -class InboundInternationalACHTransfersResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> InboundInternationalACHTransfersResourceWithRawResponse: - return InboundInternationalACHTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> InboundInternationalACHTransfersResourceWithStreamingResponse: - return InboundInternationalACHTransfersResourceWithStreamingResponse(self) - - def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransferCreateResponse: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/inbound_international_ach_transfers", - body=maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransferCreateResponse, - ) - - -class AsyncInboundInternationalACHTransfersResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncInboundInternationalACHTransfersResourceWithRawResponse: - return AsyncInboundInternationalACHTransfersResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: - return AsyncInboundInternationalACHTransfersResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_number_id: str, - amount: int, - foreign_payment_amount: int, - originating_currency_code: str, - originator_company_entry_description: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - receiver_identification_number: str | NotGiven = NOT_GIVEN, - receiving_company_or_individual_name: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> InboundInternationalACHTransferCreateResponse: - """Simulates an inbound international ACH transfer to your account. - - This imitates - initiating a transfer to an Increase account from a different financial - institution. The transfer may be either a credit or a debit depending on if the - `amount` is positive or negative. The result of calling this API will contain - the created transfer. . - - Args: - account_number_id: The identifier of the Account Number the inbound international ACH Transfer is - for. - - amount: The transfer amount in cents. A positive amount originates a credit transfer - pushing funds to the receiving account. A negative amount originates a debit - transfer pulling funds from the receiving account. - - foreign_payment_amount: The amount in the minor unit of the foreign payment currency. For dollars, for - example, this is cents. - - originating_currency_code: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - - originator_company_entry_description: A description field set by the originator. - - originator_name: Either the name of the originator or an intermediary money transmitter. - - receiver_identification_number: An identification number the originator uses for the receiver. - - receiving_company_or_individual_name: The name of the receiver of the transfer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/inbound_international_ach_transfers", - body=await async_maybe_transform( - { - "account_number_id": account_number_id, - "amount": amount, - "foreign_payment_amount": foreign_payment_amount, - "originating_currency_code": originating_currency_code, - "originator_company_entry_description": originator_company_entry_description, - "originator_name": originator_name, - "receiver_identification_number": receiver_identification_number, - "receiving_company_or_individual_name": receiving_company_or_individual_name, - }, - inbound_international_ach_transfer_create_params.InboundInternationalACHTransferCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=InboundInternationalACHTransferCreateResponse, - ) - - -class InboundInternationalACHTransfersResourceWithRawResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfersResource) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersResourceWithRawResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfersResource) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = async_to_raw_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class InboundInternationalACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: InboundInternationalACHTransfersResource) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) - - -class AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: - def __init__(self, inbound_international_ach_transfers: AsyncInboundInternationalACHTransfersResource) -> None: - self._inbound_international_ach_transfers = inbound_international_ach_transfers - - self.create = async_to_streamed_response_wrapper( - inbound_international_ach_transfers.create, - ) diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index a0d9ab45e..3501f7328 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -52,6 +52,7 @@ def create( originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -110,6 +111,9 @@ def create( originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -140,6 +144,7 @@ def create( "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), @@ -182,6 +187,7 @@ async def create( originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + sender_reference: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -240,6 +246,9 @@ async def create( originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. + sender_reference: The sending bank will set sender_reference in production. You can simulate any + value here. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -270,6 +279,7 @@ async def create( "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "sender_reference": sender_reference, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 533b63479..0da1a353d 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -204,14 +204,6 @@ InboundWireDrawdownRequestsResourceWithStreamingResponse, AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .inbound_international_ach_transfers import ( - InboundInternationalACHTransfersResource, - AsyncInboundInternationalACHTransfersResource, - InboundInternationalACHTransfersResourceWithRawResponse, - AsyncInboundInternationalACHTransfersResourceWithRawResponse, - InboundInternationalACHTransfersResourceWithStreamingResponse, - AsyncInboundInternationalACHTransfersResourceWithStreamingResponse, -) from .inbound_real_time_payments_transfers import ( InboundRealTimePaymentsTransfersResource, AsyncInboundRealTimePaymentsTransfersResource, @@ -273,10 +265,6 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResource: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: return RealTimePaymentsTransfersResource(self._client) - @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResource: - return InboundInternationalACHTransfersResource(self._client) - @cached_property def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) @@ -391,10 +379,6 @@ def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: return AsyncRealTimePaymentsTransfersResource(self._client) - @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResource: - return AsyncInboundInternationalACHTransfersResource(self._client) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) @@ -514,12 +498,6 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) - @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResourceWithRawResponse: - return InboundInternationalACHTransfersResourceWithRawResponse( - self._simulations.inbound_international_ach_transfers - ) - @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -631,12 +609,6 @@ def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) - @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResourceWithRawResponse: - return AsyncInboundInternationalACHTransfersResourceWithRawResponse( - self._simulations.inbound_international_ach_transfers - ) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -752,12 +724,6 @@ def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) - @cached_property - def inbound_international_ach_transfers(self) -> InboundInternationalACHTransfersResourceWithStreamingResponse: - return InboundInternationalACHTransfersResourceWithStreamingResponse( - self._simulations.inbound_international_ach_transfers - ) - @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -877,12 +843,6 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource self._simulations.real_time_payments_transfers ) - @cached_property - def inbound_international_ach_transfers(self) -> AsyncInboundInternationalACHTransfersResourceWithStreamingResponse: - return AsyncInboundInternationalACHTransfersResourceWithStreamingResponse( - self._simulations.inbound_international_ach_transfers - ) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index de0a95496..412ea7621 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -133,6 +133,7 @@ from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams +from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9fe9fc08b..689b6cd4d 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -20,7 +20,6 @@ "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundRealTimePaymentsTransferDecline", - "SourceInternationalACHDecline", "SourceWireDecline", ] @@ -656,252 +655,6 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The Real-Time Payments network identification of the declined transfer.""" -class SourceInternationalACHDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -946,7 +699,6 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", @@ -964,8 +716,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. - - `international_ach_decline` - International ACH Decline: details will be under - the `international_ach_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -995,13 +745,6 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ - international_ach_decline: Optional[SourceInternationalACHDecline] = None - """An International ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `international_ach_decline`. - """ - wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index e79abff89..0a4ca27b8 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,7 +41,6 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", - "international_ach_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 237b1b61a..12f7c5d90 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -13,6 +13,7 @@ "AddendaFreeform", "AddendaFreeformEntry", "Decline", + "InternationalAddenda", "NotificationOfChange", "TransferReturn", ] @@ -98,6 +99,234 @@ class Decline(BaseModel): """ +class InternationalAddenda(BaseModel): + destination_country_code: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the destination country. + """ + + destination_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + destination bank account. + """ + + foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] + """A description of how the foreign exchange rate was calculated. + + - `fixed_to_variable` - The originator chose an amount in their own currency. + The settled amount in USD was converted using the exchange rate. + - `variable_to_fixed` - The originator chose an amount to settle in USD. The + originator's amount was variable; known only after the foreign exchange + conversion. + - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in + USD. There is no foreign exchange conversion. + """ + + foreign_exchange_reference: Optional[str] = None + """ + Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a + reference to a well-known rate. + """ + + foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] + """ + An instruction of how to interpret the `foreign_exchange_reference` field for + this Transaction. + + - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. + - `foreign_exchange_reference_number` - The ACH file contains a reference to a + well-known foreign exchange rate. + - `blank` - There is no foreign exchange for this transfer, so the + `foreign_exchange_reference` field is blank. + """ + + foreign_payment_amount: int + """The amount in the minor unit of the foreign payment currency. + + For dollars, for example, this is cents. + """ + + foreign_trace_number: Optional[str] = None + """A reference number in the foreign banking infrastructure.""" + + international_transaction_type_code: Literal[ + "annuity", + "business_or_commercial", + "deposit", + "loan", + "miscellaneous", + "mortgage", + "pension", + "remittance", + "rent_or_lease", + "salary_or_payroll", + "tax", + "accounts_receivable", + "back_office_conversion", + "machine_transfer", + "point_of_purchase", + "point_of_sale", + "represented_check", + "shared_network_transaction", + "telphone_initiated", + "internet_initiated", + ] + """The type of transfer. Set by the originator. + + - `annuity` - Sent as `ANN` in the Nacha file. + - `business_or_commercial` - Sent as `BUS` in the Nacha file. + - `deposit` - Sent as `DEP` in the Nacha file. + - `loan` - Sent as `LOA` in the Nacha file. + - `miscellaneous` - Sent as `MIS` in the Nacha file. + - `mortgage` - Sent as `MOR` in the Nacha file. + - `pension` - Sent as `PEN` in the Nacha file. + - `remittance` - Sent as `REM` in the Nacha file. + - `rent_or_lease` - Sent as `RLS` in the Nacha file. + - `salary_or_payroll` - Sent as `SAL` in the Nacha file. + - `tax` - Sent as `TAX` in the Nacha file. + - `accounts_receivable` - Sent as `ARC` in the Nacha file. + - `back_office_conversion` - Sent as `BOC` in the Nacha file. + - `machine_transfer` - Sent as `MTE` in the Nacha file. + - `point_of_purchase` - Sent as `POP` in the Nacha file. + - `point_of_sale` - Sent as `POS` in the Nacha file. + - `represented_check` - Sent as `RCK` in the Nacha file. + - `shared_network_transaction` - Sent as `SHR` in the Nacha file. + - `telphone_initiated` - Sent as `TEL` in the Nacha file. + - `internet_initiated` - Sent as `WEB` in the Nacha file. + """ + + originating_currency_code: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the + originating bank account. + """ + + originating_depository_financial_institution_branch_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originating branch country. + """ + + originating_depository_financial_institution_id: str + """An identifier for the originating bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + originating_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `originating_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + originating_depository_financial_institution_name: str + """The name of the originating bank. + + Sometimes this will refer to an American bank and obscure the correspondent + foreign bank. + """ + + originator_city: str + """A portion of the originator address. This may be incomplete.""" + + originator_country: str + """A portion of the originator address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the originator country. + """ + + originator_identification: str + """An identifier for the originating company. + + This is generally stable across multiple ACH transfers. + """ + + originator_name: str + """Either the name of the originator or an intermediary money transmitter.""" + + originator_postal_code: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_state_or_province: Optional[str] = None + """A portion of the originator address. This may be incomplete.""" + + originator_street_address: str + """A portion of the originator address. This may be incomplete.""" + + payment_related_information: Optional[str] = None + """A description field set by the originator.""" + + payment_related_information2: Optional[str] = None + """A description field set by the originator.""" + + receiver_city: str + """A portion of the receiver address. This may be incomplete.""" + + receiver_country: str + """A portion of the receiver address. + + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiver country. + """ + + receiver_identification_number: Optional[str] = None + """An identification number the originator uses for the receiver.""" + + receiver_postal_code: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_state_or_province: Optional[str] = None + """A portion of the receiver address. This may be incomplete.""" + + receiver_street_address: str + """A portion of the receiver address. This may be incomplete.""" + + receiving_company_or_individual_name: str + """The name of the receiver of the transfer. This is not verified by Increase.""" + + receiving_depository_financial_institution_country: str + """ + The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 + country code of the receiving bank country. + """ + + receiving_depository_financial_institution_id: str + """An identifier for the receiving bank. + + One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank + Identification Code (BIC), or a domestic identifier like a US Routing Number. + """ + + receiving_depository_financial_institution_id_qualifier: Literal[ + "national_clearing_system_number", "bic_code", "iban" + ] + """ + An instruction of how to interpret the + `receiving_depository_financial_institution_id` field for this Transaction. + + - `national_clearing_system_number` - A domestic clearing system number. In the + US, for example, this is the American Banking Association (ABA) routing + number. + - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. + - `iban` - An International Bank Account Number. + """ + + receiving_depository_financial_institution_name: str + """The name of the receiving bank, as set by the sending financial institution.""" + + class NotificationOfChange(BaseModel): updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -184,6 +413,12 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ + international_addenda: Optional[InternationalAddenda] = None + """ + If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will + contain fields pertaining to the International ACH Transaction. + """ + notification_of_change: Optional[NotificationOfChange] = None """ If you initiate a notification of change in response to the transfer, this will @@ -233,6 +468,7 @@ class InboundACHTransfer(BaseModel): "point_of_purchase", "check_truncation", "destroyed_check", + "international_ach_transaction", ] """The Standard Entry Class (SEC) code of the transfer. @@ -251,6 +487,7 @@ class InboundACHTransfer(BaseModel): - `point_of_purchase` - Point of Purchase (POP). - `check_truncation` - Check Truncation (TRC). - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). """ status: Literal["pending", "declined", "accepted", "returned"] diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 44ae731ff..b75b6e5a5 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,6 +10,14 @@ class DepositReturn(BaseModel): + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] + """The reason the deposit was returned. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ + returned_at: datetime """The time at which the deposit was returned.""" @@ -98,12 +106,13 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined"] + status: Literal["pending", "accepted", "declined", "returned"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. + - `returned` - The Inbound Check Deposit was returned. """ transaction_id: Optional[str] = None diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py new file mode 100644 index 000000000..169cc55aa --- /dev/null +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundCheckDepositReturnParams"] + + +class InboundCheckDepositReturnParams(TypedDict, total=False): + reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] + """The reason to return the Inbound Check Deposit. + + - `altered_or_fictitious` - The check was altered or fictitious. + - `not_authorized` - The check was not authorized. + - `duplicate_presentment` - The check was a duplicate presentment. + """ diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 75e36f1a3..c2d381d36 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -79,6 +79,9 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire transfer.""" + status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index f52eae3e7..3d3e77b31 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -37,18 +37,12 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) -from .inbound_international_ach_transfer_create_params import ( - InboundInternationalACHTransferCreateParams as InboundInternationalACHTransferCreateParams, -) from .ach_transfer_create_notification_of_change_params import ( ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, ) from .inbound_real_time_payments_transfer_create_params import ( InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, ) -from .inbound_international_ach_transfer_create_response import ( - InboundInternationalACHTransferCreateResponse as InboundInternationalACHTransferCreateResponse, -) from .inbound_real_time_payments_transfer_create_response import ( InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, ) diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py index c37061711..fa743818c 100644 --- a/src/increase/types/simulations/inbound_ach_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -4,7 +4,7 @@ from typing import Union from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict from ..._utils import PropertyInfo @@ -49,3 +49,41 @@ class InboundACHTransferCreateParams(TypedDict, total=False): If not provided will resolve immediately. """ + + standard_entry_class_code: Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + "point_of_sale", + "telephone_initiated", + "customer_initiated", + "accounts_receivable", + "machine_transfer", + "shared_network_transaction", + "represented_check", + "back_office_conversion", + "point_of_purchase", + "check_truncation", + "destroyed_check", + "international_ach_transaction", + ] + """The standard entry class code for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + - `point_of_sale` - Point of Sale (POS). + - `telephone_initiated` - Telephone Initiated (TEL). + - `customer_initiated` - Customer Initiated (CIE). + - `accounts_receivable` - Accounts Receivable (ARC). + - `machine_transfer` - Machine Transfer (MTE). + - `shared_network_transaction` - Shared Network Transaction (SHR). + - `represented_check` - Represented Check (RCK). + - `back_office_conversion` - Back Office Conversion (BOC). + - `point_of_purchase` - Point of Purchase (POP). + - `check_truncation` - Check Truncation (TRC). + - `destroyed_check` - Destroyed Check (XCK). + - `international_ach_transaction` - International ACH Transaction (IAT). + """ diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py deleted file mode 100644 index 3cf052e3b..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer_create_params.py +++ /dev/null @@ -1,47 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["InboundInternationalACHTransferCreateParams"] - - -class InboundInternationalACHTransferCreateParams(TypedDict, total=False): - account_number_id: Required[str] - """ - The identifier of the Account Number the inbound international ACH Transfer is - for. - """ - - amount: Required[int] - """The transfer amount in cents. - - A positive amount originates a credit transfer pushing funds to the receiving - account. A negative amount originates a debit transfer pulling funds from the - receiving account. - """ - - foreign_payment_amount: Required[int] - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - originating_currency_code: Required[str] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - receiver_identification_number: str - """An identification number the originator uses for the receiver.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer.""" diff --git a/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py b/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py deleted file mode 100644 index 08a147c24..000000000 --- a/src/increase/types/simulations/inbound_international_ach_transfer_create_response.py +++ /dev/null @@ -1,260 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["InboundInternationalACHTransferCreateResponse"] - - -class InboundInternationalACHTransferCreateResponse(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py index a620f83a0..6e25dc5a8 100644 --- a/src/increase/types/simulations/inbound_wire_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -97,3 +97,9 @@ class InboundWireTransferCreateParams(TypedDict, total=False): The sending bank will set originator_to_beneficiary_information_line4 in production. You can simulate any value here. """ + + sender_reference: str + """The sending bank will set sender_reference in production. + + You can simulate any value here. + """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6da2ae804..ce9ff4f7d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,13 +38,11 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", - "SourceCheckTransferStopPaymentRequest", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", - "SourceInboundInternationalACHTransfer", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", @@ -1657,30 +1655,6 @@ class SourceCheckTransferDeposit(BaseModel): """ -class SourceCheckTransferStopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] - """The reason why this transfer was stopped. - - - `mail_delivery_failed` - The check could not be delivered. - - `rejected_by_increase` - The check was canceled by an Increase operator who - will provide details out-of-band. - - `not_authorized` - The check was not authorized. - - `unknown` - The check was stopped for another reason. - """ - - requested_at: datetime - """The time the stop-payment was requested.""" - - transfer_id: str - """The ID of the check transfer that was stopped.""" - - type: Literal["check_transfer_stop_payment_request"] - """A constant representing the object's type. - - For this resource it will always be `check_transfer_stop_payment_request`. - """ - - class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -1777,258 +1751,6 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" -class SourceInboundInternationalACHTransfer(BaseModel): - amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - destination_country_code: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the destination country. - """ - - destination_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - destination bank account. - """ - - foreign_exchange_indicator: Literal["fixed_to_variable", "variable_to_fixed", "fixed_to_fixed"] - """A description of how the foreign exchange rate was calculated. - - - `fixed_to_variable` - The originator chose an amount in their own currency. - The settled amount in USD was converted using the exchange rate. - - `variable_to_fixed` - The originator chose an amount to settle in USD. The - originator's amount was variable; known only after the foreign exchange - conversion. - - `fixed_to_fixed` - The amount was originated and settled as a fixed amount in - USD. There is no foreign exchange conversion. - """ - - foreign_exchange_reference: Optional[str] = None - """ - Depending on the `foreign_exchange_reference_indicator`, an exchange rate or a - reference to a well-known rate. - """ - - foreign_exchange_reference_indicator: Literal["foreign_exchange_rate", "foreign_exchange_reference_number", "blank"] - """ - An instruction of how to interpret the `foreign_exchange_reference` field for - this Transaction. - - - `foreign_exchange_rate` - The ACH file contains a foreign exchange rate. - - `foreign_exchange_reference_number` - The ACH file contains a reference to a - well-known foreign exchange rate. - - `blank` - There is no foreign exchange for this transfer, so the - `foreign_exchange_reference` field is blank. - """ - - foreign_payment_amount: int - """The amount in the minor unit of the foreign payment currency. - - For dollars, for example, this is cents. - """ - - foreign_trace_number: Optional[str] = None - """A reference number in the foreign banking infrastructure.""" - - international_transaction_type_code: Literal[ - "annuity", - "business_or_commercial", - "deposit", - "loan", - "miscellaneous", - "mortgage", - "pension", - "remittance", - "rent_or_lease", - "salary_or_payroll", - "tax", - "accounts_receivable", - "back_office_conversion", - "machine_transfer", - "point_of_purchase", - "point_of_sale", - "represented_check", - "shared_network_transaction", - "telphone_initiated", - "internet_initiated", - ] - """The type of transfer. Set by the originator. - - - `annuity` - Sent as `ANN` in the Nacha file. - - `business_or_commercial` - Sent as `BUS` in the Nacha file. - - `deposit` - Sent as `DEP` in the Nacha file. - - `loan` - Sent as `LOA` in the Nacha file. - - `miscellaneous` - Sent as `MIS` in the Nacha file. - - `mortgage` - Sent as `MOR` in the Nacha file. - - `pension` - Sent as `PEN` in the Nacha file. - - `remittance` - Sent as `REM` in the Nacha file. - - `rent_or_lease` - Sent as `RLS` in the Nacha file. - - `salary_or_payroll` - Sent as `SAL` in the Nacha file. - - `tax` - Sent as `TAX` in the Nacha file. - - `accounts_receivable` - Sent as `ARC` in the Nacha file. - - `back_office_conversion` - Sent as `BOC` in the Nacha file. - - `machine_transfer` - Sent as `MTE` in the Nacha file. - - `point_of_purchase` - Sent as `POP` in the Nacha file. - - `point_of_sale` - Sent as `POS` in the Nacha file. - - `represented_check` - Sent as `RCK` in the Nacha file. - - `shared_network_transaction` - Sent as `SHR` in the Nacha file. - - `telphone_initiated` - Sent as `TEL` in the Nacha file. - - `internet_initiated` - Sent as `WEB` in the Nacha file. - """ - - originating_currency_code: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code for the - originating bank account. - """ - - originating_depository_financial_institution_branch_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originating branch country. - """ - - originating_depository_financial_institution_id: str - """An identifier for the originating bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - originating_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `originating_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - originating_depository_financial_institution_name: str - """The name of the originating bank. - - Sometimes this will refer to an American bank and obscure the correspondent - foreign bank. - """ - - originator_city: str - """A portion of the originator address. This may be incomplete.""" - - originator_company_entry_description: str - """A description field set by the originator.""" - - originator_country: str - """A portion of the originator address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the originator country. - """ - - originator_identification: str - """An identifier for the originating company. - - This is generally stable across multiple ACH transfers. - """ - - originator_name: str - """Either the name of the originator or an intermediary money transmitter.""" - - originator_postal_code: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_state_or_province: Optional[str] = None - """A portion of the originator address. This may be incomplete.""" - - originator_street_address: str - """A portion of the originator address. This may be incomplete.""" - - payment_related_information: Optional[str] = None - """A description field set by the originator.""" - - payment_related_information2: Optional[str] = None - """A description field set by the originator.""" - - receiver_city: str - """A portion of the receiver address. This may be incomplete.""" - - receiver_country: str - """A portion of the receiver address. - - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiver country. - """ - - receiver_identification_number: Optional[str] = None - """An identification number the originator uses for the receiver.""" - - receiver_postal_code: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_state_or_province: Optional[str] = None - """A portion of the receiver address. This may be incomplete.""" - - receiver_street_address: str - """A portion of the receiver address. This may be incomplete.""" - - receiving_company_or_individual_name: str - """The name of the receiver of the transfer. This is not verified by Increase.""" - - receiving_depository_financial_institution_country: str - """ - The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 - country code of the receiving bank country. - """ - - receiving_depository_financial_institution_id: str - """An identifier for the receiving bank. - - One of an International Bank Account Number (IBAN) bank identifier, SWIFT Bank - Identification Code (BIC), or a domestic identifier like a US Routing Number. - """ - - receiving_depository_financial_institution_id_qualifier: Literal[ - "national_clearing_system_number", "bic_code", "iban" - ] - """ - An instruction of how to interpret the - `receiving_depository_financial_institution_id` field for this Transaction. - - - `national_clearing_system_number` - A domestic clearing system number. In the - US, for example, this is the American Banking Association (ABA) routing - number. - - `bic_code` - The SWIFT Bank Identifier Code (BIC) of the bank. - - `iban` - An International Bank Account Number. - """ - - receiving_depository_financial_institution_name: str - """The name of the receiving bank, as set by the sending financial institution.""" - - trace_number: str - """ - A 15 digit number recorded in the Nacha file and available to both the - originating and receiving bank. Along with the amount, date, and originating - routing number, this can be used to identify the ACH transfer at either bank. - ACH trace numbers are not unique, but are - [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). - """ - - type: Literal["inbound_international_ach_transfer"] - """A constant representing the object's type. - - For this resource it will always be `inbound_international_ach_transfer`. - """ - - class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2195,6 +1917,9 @@ class SourceInboundWireReversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" @@ -2482,12 +2207,10 @@ class Source(BaseModel): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", @@ -2531,8 +2254,6 @@ class Source(BaseModel): `check_deposit_return` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - - `check_transfer_stop_payment_request` - Check Transfer Stop Payment Request: - details will be under the `check_transfer_stop_payment_request` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under the `inbound_ach_transfer` object. @@ -2542,8 +2263,6 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. - - `inbound_international_ach_transfer` - Inbound International ACH Transfer: - details will be under the `inbound_international_ach_transfer` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2592,13 +2311,6 @@ class Source(BaseModel): equal to `check_transfer_deposit`. """ - check_transfer_stop_payment_request: Optional[SourceCheckTransferStopPaymentRequest] = None - """A Check Transfer Stop Payment Request object. - - This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_stop_payment_request`. - """ - fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. @@ -2613,13 +2325,6 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ - inbound_international_ach_transfer: Optional[SourceInboundInternationalACHTransfer] = None - """An Inbound International ACH Transfer object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_international_ach_transfer`. - """ - inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 78e79eec1..324e0f00e 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,12 +53,10 @@ class TransactionListParams(TypedDict, total=False): "check_deposit_acceptance", "check_deposit_return", "check_transfer_deposit", - "check_transfer_stop_payment_request", "fee_payment", "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", - "inbound_international_ach_transfer", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_drawdown_payment", "inbound_wire_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 0d17f1364..fdab38799 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -144,6 +144,9 @@ class Reversal(BaseModel): institution. """ + sender_reference: Optional[str] = None + """The sending bank's reference number for the wire reversal.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py index b0ce4d741..69291ab83 100644 --- a/tests/api_resources/simulations/test_inbound_ach_transfers.py +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -39,6 +39,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: receiver_id_number="x", receiver_name="x", resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -93,6 +94,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) receiver_id_number="x", receiver_name="x", resolve_at=parse_datetime("2019-12-27T18:11:19.117Z"), + standard_entry_class_code="corporate_credit_or_debit", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) diff --git a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py b/tests/api_resources/simulations/test_inbound_international_ach_transfers.py deleted file mode 100644 index 0bbe74f67..000000000 --- a/tests/api_resources/simulations/test_inbound_international_ach_transfers.py +++ /dev/null @@ -1,148 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import ( - InboundInternationalACHTransferCreateResponse, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - inbound_international_ach_transfer = client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = response.parse() - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = response.parse() - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncInboundInternationalACHTransfers: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - inbound_international_ach_transfer = await async_client.simulations.inbound_international_ach_transfers.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - originator_company_entry_description="x", - originator_name="x", - receiver_identification_number="x", - receiving_company_or_individual_name="x", - ) - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_international_ach_transfers.with_raw_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_international_ach_transfer = await response.parse() - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_international_ach_transfers.with_streaming_response.create( - account_number_id="account_number_v18nkfqm6afpsrvy82b2", - amount=1000, - foreign_payment_amount=10650, - originating_currency_code="NOK", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_international_ach_transfer = await response.parse() - assert_matches_type( - InboundInternationalACHTransferCreateResponse, inbound_international_ach_transfer, path=["response"] - ) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py index e87a85c65..f1893dbe4 100644 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -44,6 +44,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", + sender_reference="x", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @@ -104,6 +105,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_to_beneficiary_information_line2="x", originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", + sender_reference="x", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 7e10bd5ab..54109446a 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -140,6 +140,50 @@ def test_path_params_decline(self, client: Increase) -> None: "", ) + @parametrize + def test_method_return(self, client: Increase) -> None: + inbound_check_deposit = client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_return(self, client: Increase) -> None: + response = client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_return(self, client: Increase) -> None: + with client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_return(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) + class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -264,3 +308,47 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: await async_client.inbound_check_deposits.with_raw_response.decline( "", ) + + @parametrize + async def test_method_return(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.inbound_check_deposits.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_check_deposits.with_streaming_response.return_( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + reason="altered_or_fictitious", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_return(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.inbound_check_deposits.with_raw_response.return_( + inbound_check_deposit_id="", + reason="altered_or_fictitious", + ) From 5e6b475813cfdea312eb57a1d01259033fc541f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 17:06:01 +0000 Subject: [PATCH 0093/1325] chore(internal): version bump (#516) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6772f01dc..6f257c8d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.71.0" + ".": "0.72.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 842183124..3d506d56d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.71.0" +version = "0.72.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9b556589f..f0c8a6eb3 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.71.0" # x-release-please-version +__version__ = "0.72.0" # x-release-please-version From 873635c61133e4f46c6718267cab1c49f06e9f3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Jul 2024 17:07:41 +0000 Subject: [PATCH 0094/1325] feat(api): OpenAPI spec update via Stainless API (#517) --- .stats.yml | 2 +- README.md | 2 +- src/increase/_exceptions.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 97075707a..34e1ec8a3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-425f6ed67cd1ce367e761ce06208e2053c6aecf90c53c42660c103d8d558c2c7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ad3b82658bc5b37df79262748377d7ddf876f7aa6d2cc1f1e118b8db1ae6df8d.yml diff --git a/README.md b/README.md index 1f137aa0e..45991a53c 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ and offers both synchronous and asynchronous clients powered by [httpx](https:// ## Documentation -The REST API documentation can be found [on increase.com](https://increase.com/documentation). The full API of this library can be found in [api.md](api.md). +The REST API documentation can be found on [increase.com](https://increase.com/documentation). The full API of this library can be found in [api.md](api.md). ## Installation diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index a64976e2a..49268f339 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -136,10 +136,10 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N title = cast(Any, construct_type(type_=str, value=data.get("title"))) super().__init__(title or message, response=response, body=body) - self.title = title self.detail = cast(Any, construct_type(type_=Optional[str], value=data.get("detail"))) self.errors = cast(Any, construct_type(type_=List[object], value=data.get("errors"))) self.status = cast(Any, construct_type(type_=Literal[400], value=data.get("status"))) + self.title = title self.type = cast(Any, construct_type(type_=Literal["invalid_parameters_error"], value=data.get("type"))) From e164795606d01f523cbd38b1d344f3372701a0cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:08:15 +0000 Subject: [PATCH 0095/1325] feat(api): OpenAPI spec update via Stainless API (#519) --- .github/workflows/release-doctor.yml | 2 ++ .stats.yml | 2 +- README.md | 6 ++++++ src/increase/resources/inbound_check_deposits.py | 6 ++++-- src/increase/types/inbound_check_deposit.py | 3 ++- src/increase/types/inbound_check_deposit_return_params.py | 3 ++- 6 files changed, 17 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index bc5fe84b9..5d48f5e28 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -1,6 +1,8 @@ name: Release Doctor on: pull_request: + branches: + - main workflow_dispatch: jobs: diff --git a/.stats.yml b/.stats.yml index 34e1ec8a3..a02c6415c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ad3b82658bc5b37df79262748377d7ddf876f7aa6d2cc1f1e118b8db1ae6df8d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c4ac6261224262ff8ecec613e0ba463c4a8cec242c3a9ca47d869052ee592bba.yml diff --git a/README.md b/README.md index 45991a53c..509fa9ab7 100644 --- a/README.md +++ b/README.md @@ -403,6 +403,12 @@ client = Increase( ) ``` +You can also customize the client on a per-request basis by using `with_options()`: + +```python +client.with_options(http_client=DefaultHttpxClient(...)) +``` + ### Managing HTTP resources By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting. diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index de312acae..d275f514d 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -180,7 +180,7 @@ def return_( self, inbound_check_deposit_id: str, *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -200,6 +200,7 @@ def return_( - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. + - `endorsement_missing` - The check was not endorsed. extra_headers: Send extra headers @@ -384,7 +385,7 @@ async def return_( self, inbound_check_deposit_id: str, *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"], + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -404,6 +405,7 @@ async def return_( - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. + - `endorsement_missing` - The check was not endorsed. extra_headers: Send extra headers diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index b75b6e5a5..6c7125bb0 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,12 +10,13 @@ class DepositReturn(BaseModel): - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"] + reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"] """The reason the deposit was returned. - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. + - `endorsement_missing` - The check was not endorsed. """ returned_at: datetime diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py index 169cc55aa..92a942591 100644 --- a/src/increase/types/inbound_check_deposit_return_params.py +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -8,10 +8,11 @@ class InboundCheckDepositReturnParams(TypedDict, total=False): - reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment"]] + reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"]] """The reason to return the Inbound Check Deposit. - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. + - `endorsement_missing` - The check was not endorsed. """ From 0dbd7328bd3f4bc4ddd1c751e6a8ed61d2c7a2b4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Jul 2024 22:11:22 +0000 Subject: [PATCH 0096/1325] chore(internal): version bump (#520) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f257c8d7..f910f1a9c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.72.0" + ".": "0.73.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3d506d56d..f32b1af30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.72.0" +version = "0.73.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f0c8a6eb3..da8eaa834 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.72.0" # x-release-please-version +__version__ = "0.73.0" # x-release-please-version From 24f34664a5f8e588c508c66664a28f6fdae685b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:14:38 +0000 Subject: [PATCH 0097/1325] feat(api): OpenAPI spec update via Stainless API (#521) --- .stats.yml | 2 +- src/increase/types/inbound_ach_transfer.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index a02c6415c..460a7a636 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c4ac6261224262ff8ecec613e0ba463c4a8cec242c3a9ca47d869052ee592bba.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ab9d6f1bfb3230775637a6021f66dcc8769cdec064cea2932f0a69f1d140278e.yml diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 12f7c5d90..0d8fa0729 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -413,6 +413,13 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ + 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 From a39f469de55611bd9c89dc3e03ee56d0f42853ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:15:54 +0000 Subject: [PATCH 0098/1325] docs(readme): fix example snippet imports (#523) --- .release-please-manifest.json | 2 +- README.md | 4 ++-- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f910f1a9c..192d2cdde 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.73.0" + ".": "0.74.0" } \ No newline at end of file diff --git a/README.md b/README.md index 509fa9ab7..baf181ed6 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,7 @@ List methods in the Increase API are paginated. This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: ```python -import increase +from increase import Increase client = Increase() @@ -108,7 +108,7 @@ Or, asynchronously: ```python import asyncio -import increase +from increase import AsyncIncrease client = AsyncIncrease() diff --git a/pyproject.toml b/pyproject.toml index f32b1af30..7cd8dcfee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.73.0" +version = "0.74.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index da8eaa834..b3e2e5ffd 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.73.0" # x-release-please-version +__version__ = "0.74.0" # x-release-please-version From 3c2c634db344e36e3c30c5f8e7eab92e88ae2fb3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 13:19:35 +0000 Subject: [PATCH 0099/1325] chore(tests): update prism version (#525) --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index fe89a1d08..f58615769 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stoplight/prism-cli@~5.8 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" fi From 9a6925412e4eea96adc5a1b31baf640330e58de7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:54:03 +0000 Subject: [PATCH 0100/1325] feat(api): OpenAPI spec update via Stainless API (#526) --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 460a7a636..49f8d30af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ab9d6f1bfb3230775637a6021f66dcc8769cdec064cea2932f0a69f1d140278e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9ba3e920363de81ba4fd445427a9c49836e9428282cde8749da494121d41fd96.yml From 946a4c2254a42218ec3b5677a0a9f39ab1983492 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Jul 2024 20:55:17 +0000 Subject: [PATCH 0101/1325] chore(internal): codegen related update (#527) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 192d2cdde..1cfe7eb37 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.74.0" + ".": "0.75.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7cd8dcfee..6a3c96a60 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.74.0" +version = "0.75.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b3e2e5ffd..6d84f3c74 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.74.0" # x-release-please-version +__version__ = "0.75.0" # x-release-please-version From 421fc7ca44485c71c5b22ae99a4d3ee5b518d486 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:13:57 +0000 Subject: [PATCH 0102/1325] feat(api): OpenAPI spec update via Stainless API (#528) --- .stats.yml | 2 +- src/increase/types/file.py | 3 +++ src/increase/types/file_list_params.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 49f8d30af..f21938202 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9ba3e920363de81ba4fd445427a9c49836e9428282cde8749da494121d41fd96.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50994c0dafe3990a672b3c237d986d16dddbf14e1a26cc906f1a13bb88f245c0.yml diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 149079768..14aa4dc8d 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -68,6 +68,7 @@ class File(BaseModel): "entity_supplemental_document", "export", "unusual_activity_report_attachment", + "deposit_access_control_agreement", ] """What the File will be used for. @@ -105,6 +106,8 @@ class File(BaseModel): - `export` - The results of an Export you requested via the dashboard or API. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. + - `deposit_access_control_agreement` - A document granting another entity access + to the funds into your account. """ type: Literal["file"] diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index bf16df275..0b9bff876 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -86,6 +86,7 @@ class CreatedAt(TypedDict, total=False): "entity_supplemental_document", "export", "unusual_activity_report_attachment", + "deposit_access_control_agreement", ] ], }, From 04503cd51a72908702f41740ebd237c9646d0d66 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 18:15:07 +0000 Subject: [PATCH 0103/1325] chore(internal): codegen related update (#530) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1cfe7eb37..aa39267ab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.75.0" + ".": "0.76.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6a3c96a60..568ed8d47 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.75.0" +version = "0.76.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6d84f3c74..889908de2 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.75.0" # x-release-please-version +__version__ = "0.76.0" # x-release-please-version From b92c78db2ca9b0c9fb14302ecb90b2d77e912bfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:26:44 +0000 Subject: [PATCH 0104/1325] feat(api): OpenAPI spec update via Stainless API (#531) --- .stats.yml | 2 +- src/increase/types/transaction.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f21938202..fc115103c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50994c0dafe3990a672b3c237d986d16dddbf14e1a26cc906f1a13bb88f245c0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ca16c669067c09fc2d833b1f5df567d215ce4de463b64aa4ec7517f706bf7c50.yml diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ce9ff4f7d..f3649d30a 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2045,6 +2045,8 @@ class SourceInternalSource(BaseModel): reason: Literal[ "account_closure", + "bank_drawn_check", + "bank_drawn_check_credit", "bank_migration", "check_adjustment", "collection_payment", @@ -2063,6 +2065,8 @@ class SourceInternalSource(BaseModel): This describes the reason for the transaction. - `account_closure` - Account closure + - `bank_drawn_check` - Bank-drawn check + - `bank_drawn_check_credit` - Bank-drawn check credit - `bank_migration` - Bank migration - `check_adjustment` - Check adjustment - `collection_payment` - Collection payment From 404cca2b5c3c436effdfa9b917afec03281ecaf9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 22:27:44 +0000 Subject: [PATCH 0105/1325] chore(internal): codegen related update (#533) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aa39267ab..5c03edcda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.76.0" + ".": "0.77.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 568ed8d47..af5906bee 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.76.0" +version = "0.77.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 889908de2..354bcf2e1 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.76.0" # x-release-please-version +__version__ = "0.77.0" # x-release-please-version From aabe6d7b8572f8da58555ec9b0bfe599b827a4c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 23:52:47 +0000 Subject: [PATCH 0106/1325] feat(api): OpenAPI spec update via Stainless API (#534) --- .stats.yml | 2 +- src/increase/types/file.py | 6 +++--- src/increase/types/file_list_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index fc115103c..dad6f72c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ca16c669067c09fc2d833b1f5df567d215ce4de463b64aa4ec7517f706bf7c50.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99e344b96f45e406fe553adcef765627100462530948cd48c6fc4a37c7f7ac8c.yml diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 14aa4dc8d..ea4f5f7eb 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -68,7 +68,7 @@ class File(BaseModel): "entity_supplemental_document", "export", "unusual_activity_report_attachment", - "deposit_access_control_agreement", + "deposit_account_control_agreement", ] """What the File will be used for. @@ -106,8 +106,8 @@ class File(BaseModel): - `export` - The results of an Export you requested via the dashboard or API. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. - - `deposit_access_control_agreement` - A document granting another entity access - to the funds into your account. + - `deposit_account_control_agreement` - A document granting another entity + access to the funds into your account. """ type: Literal["file"] diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 0b9bff876..137206929 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -86,7 +86,7 @@ class CreatedAt(TypedDict, total=False): "entity_supplemental_document", "export", "unusual_activity_report_attachment", - "deposit_access_control_agreement", + "deposit_account_control_agreement", ] ], }, From 246aced4a7fb2d8f0ac2d0d6c0e8cddc87d0881e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 23:53:48 +0000 Subject: [PATCH 0107/1325] chore(internal): version bump (#536) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5c03edcda..0d51a3679 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.77.0" + ".": "0.78.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index af5906bee..f695b3905 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.77.0" +version = "0.78.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 354bcf2e1..4104395ea 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.77.0" # x-release-please-version +__version__ = "0.78.0" # x-release-please-version From 1a5d50f18bbd212d8289db482b4880703d6a4d12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 25 Jul 2024 23:59:03 +0000 Subject: [PATCH 0108/1325] feat(api): OpenAPI spec update via Stainless API (#537) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 6 ++++++ src/increase/types/pending_transaction.py | 3 +++ src/increase/types/real_time_decision.py | 3 +++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index dad6f72c8..5376976c4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99e344b96f45e406fe553adcef765627100462530948cd48c6fc4a37c7f7ac8c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2521acfc1bafc2c4e3d2b73669544ebf4cefb8399b5f96c913b62fab1cdc3053.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 0f9f6a9a3..a4da6e850 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -318,6 +318,9 @@ class ElementCardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + network_details: ElementCardAuthorizationNetworkDetails """Fields specific to the `network`.""" @@ -2257,6 +2260,9 @@ class ElementCardValidation(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + network_details: ElementCardValidationNetworkDetails """Fields specific to the `network`.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 7b403a5ad..7741a6092 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -320,6 +320,9 @@ class SourceCardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + network_details: SourceCardAuthorizationNetworkDetails """Fields specific to the `network`.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index e64439ffc..39706be45 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -270,6 +270,9 @@ class CardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + network_details: CardAuthorizationNetworkDetails """Fields specific to the `network`.""" From 2bd8bf2dfddfc6e988a4b59d29c3420da530d41b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:00:06 +0000 Subject: [PATCH 0109/1325] chore(internal): version bump (#539) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0d51a3679..fe941d151 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.78.0" + ".": "0.79.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f695b3905..5557570e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.78.0" +version = "0.79.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4104395ea..f0508ab08 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.78.0" # x-release-please-version +__version__ = "0.79.0" # x-release-please-version From 251239dbb1e9bd347b21ac1a3b4a0cd42ec721e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:17:42 +0000 Subject: [PATCH 0110/1325] feat(api): OpenAPI spec update via Stainless API (#540) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 21 +++++++++++++++++++++ src/increase/types/declined_transaction.py | 7 +++++++ src/increase/types/pending_transaction.py | 7 +++++++ src/increase/types/real_time_decision.py | 7 +++++++ 5 files changed, 43 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5376976c4..1cbd7296d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2521acfc1bafc2c4e3d2b73669544ebf4cefb8399b5f96c913b62fab1cdc3053.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8b6bdae4ef7ac6cc19af49ea0ae3b215af73d9b5e98655f5a296fbca558f2dee.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a4da6e850..3792a88ab 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -318,6 +318,13 @@ class ElementCardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" @@ -673,6 +680,13 @@ class ElementCardDecline(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" @@ -2260,6 +2274,13 @@ class ElementCardValidation(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 689b6cd4d..33759ad30 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -353,6 +353,13 @@ class SourceCardDecline(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 7741a6092..4c8bfd754 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -320,6 +320,13 @@ class SourceCardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 39706be45..fbbf7c652 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -270,6 +270,13 @@ class CardAuthorization(BaseModel): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + merchant_state: Optional[str] = None """The state the merchant resides in.""" From bdd09046f1245e96a798849e96a18fe28e65ce37 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Jul 2024 00:18:41 +0000 Subject: [PATCH 0111/1325] chore(internal): version bump (#542) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fe941d151..c3e137b1d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.79.0" + ".": "0.80.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5557570e9..a91c82a1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.79.0" +version = "0.80.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f0508ab08..3d5b480d3 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.79.0" # x-release-please-version +__version__ = "0.80.0" # x-release-please-version From 67037a8251d3ef00050a9d303157e69a2fe73976 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:41:08 +0000 Subject: [PATCH 0112/1325] feat(api): OpenAPI spec update via Stainless API (#543) --- .stats.yml | 2 +- src/increase/resources/lockboxes.py | 16 ++++++++++++++++ src/increase/types/lockbox.py | 11 +++++++++++ src/increase/types/lockbox_create_params.py | 3 +++ src/increase/types/lockbox_update_params.py | 3 +++ tests/api_resources/test_lockboxes.py | 4 ++++ 6 files changed, 38 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1cbd7296d..b793dd4ed 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8b6bdae4ef7ac6cc19af49ea0ae3b215af73d9b5e98655f5a296fbca558f2dee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c5ff60d92e5018ca62da26cf5cc82d83a30e8b9325badde3fda260f6edbd413f.yml diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 56eb00f6d..f88fd7e02 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -41,6 +41,7 @@ def create( *, account_id: str, description: str | NotGiven = NOT_GIVEN, + recipient_name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -57,6 +58,8 @@ def create( description: The description you choose for the Lockbox, for display purposes. + recipient_name: The name of the recipient that will receive mail at this location. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -73,6 +76,7 @@ def create( { "account_id": account_id, "description": description, + "recipient_name": recipient_name, }, lockbox_create_params.LockboxCreateParams, ), @@ -126,6 +130,7 @@ def update( lockbox_id: str, *, description: str | NotGiven = NOT_GIVEN, + recipient_name: str | NotGiven = NOT_GIVEN, status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -143,6 +148,8 @@ def update( description: The description you choose for the Lockbox. + recipient_name: The recipient name you choose for the Lockbox. + status: This indicates if checks can be sent to the Lockbox. - `active` - This Lockbox is active. Checks mailed to it will be deposited @@ -167,6 +174,7 @@ def update( body=maybe_transform( { "description": description, + "recipient_name": recipient_name, "status": status, }, lockbox_update_params.LockboxUpdateParams, @@ -257,6 +265,7 @@ async def create( *, account_id: str, description: str | NotGiven = NOT_GIVEN, + recipient_name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -273,6 +282,8 @@ async def create( description: The description you choose for the Lockbox, for display purposes. + recipient_name: The name of the recipient that will receive mail at this location. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -289,6 +300,7 @@ async def create( { "account_id": account_id, "description": description, + "recipient_name": recipient_name, }, lockbox_create_params.LockboxCreateParams, ), @@ -342,6 +354,7 @@ async def update( lockbox_id: str, *, description: str | NotGiven = NOT_GIVEN, + recipient_name: str | NotGiven = NOT_GIVEN, status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -359,6 +372,8 @@ async def update( description: The description you choose for the Lockbox. + recipient_name: The recipient name you choose for the Lockbox. + status: This indicates if checks can be sent to the Lockbox. - `active` - This Lockbox is active. Checks mailed to it will be deposited @@ -383,6 +398,7 @@ async def update( body=await async_maybe_transform( { "description": description, + "recipient_name": recipient_name, "status": status, }, lockbox_update_params.LockboxUpdateParams, diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index d2e3aa71b..2ff781270 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -22,6 +22,14 @@ class Address(BaseModel): postal_code: str """The postal code of the address.""" + recipient: Optional[str] = None + """The recipient line of the address. + + This will include the recipient name you provide when creating the address, as + well as an ATTN suffix to help route the mail to your lockbox. Mail senders must + include this ATTN line to receive mail at this Lockbox. + """ + state: str """ The two-letter United States Postal Service (USPS) abbreviation for the state of @@ -59,6 +67,9 @@ class Lockbox(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + recipient_name: Optional[str] = None + """The recipient name you choose for the Lockbox.""" + status: Literal["active", "inactive"] """This indicates if mail can be sent to this address. diff --git a/src/increase/types/lockbox_create_params.py b/src/increase/types/lockbox_create_params.py index 17aadac13..bea106ab9 100644 --- a/src/increase/types/lockbox_create_params.py +++ b/src/increase/types/lockbox_create_params.py @@ -13,3 +13,6 @@ class LockboxCreateParams(TypedDict, total=False): description: str """The description you choose for the Lockbox, for display purposes.""" + + recipient_name: str + """The name of the recipient that will receive mail at this location.""" diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py index 90ad3709e..175f9c0e6 100644 --- a/src/increase/types/lockbox_update_params.py +++ b/src/increase/types/lockbox_update_params.py @@ -11,6 +11,9 @@ class LockboxUpdateParams(TypedDict, total=False): description: str """The description you choose for the Lockbox.""" + recipient_name: str + """The recipient name you choose for the Lockbox.""" + status: Literal["active", "inactive"] """This indicates if checks can be sent to the Lockbox. diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index 60459796b..d101bf24f 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -31,6 +31,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: lockbox = client.lockboxes.create( account_id="account_in71c4amph0vgo2qllky", description="Rent payments", + recipient_name="x", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -108,6 +109,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: lockbox = client.lockboxes.update( lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", + recipient_name="x", status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -200,6 +202,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) lockbox = await async_client.lockboxes.create( account_id="account_in71c4amph0vgo2qllky", description="Rent payments", + recipient_name="x", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -277,6 +280,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) lockbox = await async_client.lockboxes.update( lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", + recipient_name="x", status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) From d7d700679cd2f3309f2cae6f39a0e30ff565a0a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:42:03 +0000 Subject: [PATCH 0113/1325] chore(internal): codegen related update (#545) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3e137b1d..f8e21778f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.80.0" + ".": "0.81.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a91c82a1b..bd2889f79 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.80.0" +version = "0.81.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3d5b480d3..f81555aa8 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.80.0" # x-release-please-version +__version__ = "0.81.0" # x-release-please-version From 262f727d31885b273159d23dee37847d051a30ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Aug 2024 00:44:13 +0000 Subject: [PATCH 0114/1325] chore(internal): add type construction helper (#546) --- src/increase/_models.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/increase/_models.py b/src/increase/_models.py index eb7ce3bde..5148d5a7b 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -406,6 +406,15 @@ def build( return cast(_BaseModelT, construct_type(type_=base_model_cls, value=kwargs)) +def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T: + """Loose coercion to the expected type with construction of nested values. + + Note: the returned value from this function is not guaranteed to match the + given type. + """ + return cast(_T, construct_type(value=value, type_=type_)) + + def construct_type(*, value: object, type_: object) -> object: """Loose coercion to the expected type with construction of nested values. From 0f79d6636b29cf34df6fe8c9d771b98d597848cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 2 Aug 2024 22:08:04 +0000 Subject: [PATCH 0115/1325] feat(api): api updates (#548) --- .stats.yml | 2 +- src/increase/types/transaction.py | 77 ------------------- src/increase/types/transaction_list_params.py | 1 - src/increase/types/wire_transfer.py | 7 +- 4 files changed, 6 insertions(+), 81 deletions(-) diff --git a/.stats.yml b/.stats.yml index b793dd4ed..e90f7b5ac 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c5ff60d92e5018ca62da26cf5cc82d83a30e8b9325badde3fda260f6edbd413f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4fdf4ed23a3a8f7aea0dd98d18a946337c74c1ae80a89c83e7dfb7793c08375a.yml diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index f3649d30a..08c7c75e1 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -44,7 +44,6 @@ "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", "SourceInboundRealTimePaymentsTransferConfirmation", - "SourceInboundWireDrawdownPayment", "SourceInboundWireReversal", "SourceInboundWireTransfer", "SourceInterestPayment", @@ -1790,72 +1789,6 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): """The Real-Time Payments network identification of the transfer.""" -class SourceInboundWireDrawdownPayment(BaseModel): - amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ - - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - - description: str - """An Increase-constructed description of the transfer.""" - - input_message_accountability_data: Optional[str] = None - """ - A unique identifier available to the originating and receiving banks, commonly - abbreviated as IMAD. It is created when the wire is submitted to the Fedwire - service and is helpful when debugging wires with the receiving bank. - """ - - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - - class SourceInboundWireReversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" @@ -2216,7 +2149,6 @@ class Source(BaseModel): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", @@ -2270,8 +2202,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_drawdown_payment` - Inbound Wire Drawdown Payment: details will - be under the `inbound_wire_drawdown_payment` object. - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the `inbound_wire_reversal` object. - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be @@ -2336,13 +2266,6 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_confirmation`. """ - inbound_wire_drawdown_payment: Optional[SourceInboundWireDrawdownPayment] = None - """An Inbound Wire Drawdown Payment object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_drawdown_payment`. - """ - inbound_wire_reversal: Optional[SourceInboundWireReversal] = None """An Inbound Wire Reversal object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 324e0f00e..a5357437d 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -58,7 +58,6 @@ class TransactionListParams(TypedDict, total=False): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_drawdown_payment", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index fdab38799..59eb4f7d6 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -271,6 +271,7 @@ class WireTransfer(BaseModel): "pending_approval", "rejected", "reversed", + "submitted", "complete", "pending_creating", ] @@ -281,9 +282,11 @@ class WireTransfer(BaseModel): operator. - `pending_reviewing` - The transfer is pending review by Increase. - `pending_approval` - The transfer is pending approval. - - `rejected` - The transfer has been rejected. + - `rejected` - The transfer has been rejected by Increase. - `reversed` - The transfer has been reversed. - - `complete` - The transfer is complete. + - `submitted` - The transfer has been submitted to Fedwire. + - `complete` - The transfer has been acknowledged by Fedwire and can be + considered complete. - `pending_creating` - The transfer is pending creation. """ From 7269f41841d40ece5c0cae6a9e7dd8bb48f2625c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:56:01 +0000 Subject: [PATCH 0116/1325] chore(internal): capitalize github org name (#549) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/increase/_files.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index ab7493a35..d889ddf37 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 5d48f5e28..6ef88fffb 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 546ed3883..6ee29f28f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -pip install git+ssh://git@github.com/increase/increase-python.git +pip install git+ssh://git@github.com/Increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index baf181ed6..8a245ee9a 100644 --- a/README.md +++ b/README.md @@ -323,9 +323,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. +These methods return an [`APIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -423,7 +423,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index bd2889f79..29b2fb9c6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,8 @@ classifiers = [ [project.urls] -Homepage = "https://github.com/increase/increase-python" -Repository = "https://github.com/increase/increase-python" +Homepage = "https://github.com/Increase/increase-python" +Repository = "https://github.com/Increase/increase-python" @@ -124,7 +124,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' [tool.black] line-length = 120 diff --git a/src/increase/_files.py b/src/increase/_files.py index 46bb828c9..2774ab108 100644 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/increase/increase-python/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/Increase/increase-python/tree/main#file-uploads" ) from None From c4edfb199161b39c5ea742b7effd24c0557a77e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:56:35 +0000 Subject: [PATCH 0117/1325] chore(internal): codegen related update (#550) --- pyproject.toml | 12 ++--- requirements-dev.lock | 4 +- src/increase/_base_client.py | 71 ++++++++++++------------------ src/increase/_compat.py | 24 ++++------ src/increase/_files.py | 12 ++--- src/increase/_response.py | 17 +++---- src/increase/_types.py | 9 ++-- src/increase/_utils/_proxy.py | 3 +- src/increase/_utils/_reflection.py | 2 +- src/increase/_utils/_utils.py | 18 +++----- tests/test_client.py | 52 +++++++++++++++++++++- tests/test_deepcopy.py | 3 +- tests/test_response.py | 12 ++--- tests/test_utils/test_typing.py | 15 +++---- tests/utils.py | 10 +++-- 15 files changed, 137 insertions(+), 127 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 29b2fb9c6..d6438e098 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,8 +77,8 @@ format = { chain = [ "check:ruff", "typecheck", ]} -"check:ruff" = "ruff ." -"fix:ruff" = "ruff --fix ." +"check:ruff" = "ruff check ." +"fix:ruff" = "ruff check --fix ." typecheck = { chain = [ "typecheck:pyright", @@ -162,6 +162,11 @@ reportPrivateUsage = false line-length = 120 output-format = "grouped" target-version = "py37" + +[tool.ruff.format] +docstring-code-format = true + +[tool.ruff.lint] select = [ # isort "I", @@ -192,9 +197,6 @@ unfixable = [ ] ignore-init-module-imports = true -[tool.ruff.format] -docstring-code-format = true - [tool.ruff.lint.flake8-tidy-imports.banned-api] "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" diff --git a/requirements-dev.lock b/requirements-dev.lock index f6f54a23d..5727d47df 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -70,7 +70,7 @@ pydantic-core==2.18.2 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.364 +pyright==1.1.374 pytest==7.1.1 # via pytest-asyncio pytest-asyncio==0.21.1 @@ -80,7 +80,7 @@ pytz==2023.3.post1 # via dirty-equals respx==0.20.2 rich==13.7.1 -ruff==0.1.9 +ruff==0.5.6 setuptools==68.2.2 # via nodeenv six==1.16.0 diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index fe3c6e1d8..759e5407b 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -124,16 +124,14 @@ def __init__( self, *, url: URL, - ) -> None: - ... + ) -> None: ... @overload def __init__( self, *, params: Query, - ) -> None: - ... + ) -> None: ... def __init__( self, @@ -166,8 +164,7 @@ def has_next_page(self) -> bool: return False return self.next_page_info() is not None - def next_page_info(self) -> Optional[PageInfo]: - ... + def next_page_info(self) -> Optional[PageInfo]: ... def _get_page_items(self) -> Iterable[_T]: # type: ignore[empty-body] ... @@ -903,8 +900,7 @@ def request( *, stream: Literal[True], stream_cls: Type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def request( @@ -914,8 +910,7 @@ def request( remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def request( @@ -926,8 +921,7 @@ def request( *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def request( self, @@ -1049,6 +1043,7 @@ def _request( response=response, stream=stream, stream_cls=stream_cls, + retries_taken=options.get_max_retries(self.max_retries) - retries, ) def _retry_request( @@ -1090,6 +1085,7 @@ def _process_response( response: httpx.Response, stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, + retries_taken: int = 0, ) -> ResponseT: origin = get_origin(cast_to) or cast_to @@ -1107,6 +1103,7 @@ def _process_response( stream=stream, stream_cls=stream_cls, options=options, + retries_taken=retries_taken, ), ) @@ -1120,6 +1117,7 @@ def _process_response( stream=stream, stream_cls=stream_cls, options=options, + retries_taken=retries_taken, ) if bool(response.request.headers.get(RAW_RESPONSE_HEADER)): return cast(ResponseT, api_response) @@ -1152,8 +1150,7 @@ def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def get( @@ -1164,8 +1161,7 @@ def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def get( @@ -1176,8 +1172,7 @@ def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def get( self, @@ -1203,8 +1198,7 @@ def post( options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload def post( @@ -1217,8 +1211,7 @@ def post( files: RequestFiles | None = None, stream: Literal[True], stream_cls: type[_StreamT], - ) -> _StreamT: - ... + ) -> _StreamT: ... @overload def post( @@ -1231,8 +1224,7 @@ def post( files: RequestFiles | None = None, stream: bool, stream_cls: type[_StreamT] | None = None, - ) -> ResponseT | _StreamT: - ... + ) -> ResponseT | _StreamT: ... def post( self, @@ -1465,8 +1457,7 @@ async def request( *, stream: Literal[False] = False, remaining_retries: Optional[int] = None, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def request( @@ -1477,8 +1468,7 @@ async def request( stream: Literal[True], stream_cls: type[_AsyncStreamT], remaining_retries: Optional[int] = None, - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def request( @@ -1489,8 +1479,7 @@ async def request( stream: bool, stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def request( self, @@ -1610,6 +1599,7 @@ async def _request( response=response, stream=stream, stream_cls=stream_cls, + retries_taken=options.get_max_retries(self.max_retries) - retries, ) async def _retry_request( @@ -1649,6 +1639,7 @@ async def _process_response( response: httpx.Response, stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, + retries_taken: int = 0, ) -> ResponseT: origin = get_origin(cast_to) or cast_to @@ -1666,6 +1657,7 @@ async def _process_response( stream=stream, stream_cls=stream_cls, options=options, + retries_taken=retries_taken, ), ) @@ -1679,6 +1671,7 @@ async def _process_response( stream=stream, stream_cls=stream_cls, options=options, + retries_taken=retries_taken, ) if bool(response.request.headers.get(RAW_RESPONSE_HEADER)): return cast(ResponseT, api_response) @@ -1701,8 +1694,7 @@ async def get( cast_to: Type[ResponseT], options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def get( @@ -1713,8 +1705,7 @@ async def get( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def get( @@ -1725,8 +1716,7 @@ async def get( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def get( self, @@ -1750,8 +1740,7 @@ async def post( files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, - ) -> ResponseT: - ... + ) -> ResponseT: ... @overload async def post( @@ -1764,8 +1753,7 @@ async def post( options: RequestOptions = {}, stream: Literal[True], stream_cls: type[_AsyncStreamT], - ) -> _AsyncStreamT: - ... + ) -> _AsyncStreamT: ... @overload async def post( @@ -1778,8 +1766,7 @@ async def post( options: RequestOptions = {}, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - ) -> ResponseT | _AsyncStreamT: - ... + ) -> ResponseT | _AsyncStreamT: ... async def post( self, diff --git a/src/increase/_compat.py b/src/increase/_compat.py index c919b5adb..7c6f91a87 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -159,22 +159,19 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: # generic models if TYPE_CHECKING: - class GenericModel(pydantic.BaseModel): - ... + class GenericModel(pydantic.BaseModel): ... else: if PYDANTIC_V2: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors - class GenericModel(pydantic.BaseModel): - ... + class GenericModel(pydantic.BaseModel): ... else: import pydantic.generics - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): - ... + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... # cached properties @@ -193,26 +190,21 @@ class typed_cached_property(Generic[_T]): func: Callable[[Any], _T] attrname: str | None - def __init__(self, func: Callable[[Any], _T]) -> None: - ... + def __init__(self, func: Callable[[Any], _T]) -> None: ... @overload - def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: - ... + def __get__(self, instance: None, owner: type[Any] | None = None) -> Self: ... @overload - def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: - ... + def __get__(self, instance: object, owner: type[Any] | None = None) -> _T: ... def __get__(self, instance: object, owner: type[Any] | None = None) -> _T | Self: raise NotImplementedError() - def __set_name__(self, owner: type[Any], name: str) -> None: - ... + def __set_name__(self, owner: type[Any], name: str) -> None: ... # __set__ is not defined at runtime, but @cached_property is designed to be settable - def __set__(self, instance: object, value: _T) -> None: - ... + def __set__(self, instance: object, value: _T) -> None: ... else: try: from functools import cached_property as cached_property diff --git a/src/increase/_files.py b/src/increase/_files.py index 2774ab108..e0ed1db41 100644 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -39,13 +39,11 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: @overload -def to_httpx_files(files: None) -> None: - ... +def to_httpx_files(files: None) -> None: ... @overload -def to_httpx_files(files: RequestFiles) -> HttpxRequestFiles: - ... +def to_httpx_files(files: RequestFiles) -> HttpxRequestFiles: ... def to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles | None: @@ -83,13 +81,11 @@ def _read_file_content(file: FileContent) -> HttpxFileContent: @overload -async def async_to_httpx_files(files: None) -> None: - ... +async def async_to_httpx_files(files: None) -> None: ... @overload -async def async_to_httpx_files(files: RequestFiles) -> HttpxRequestFiles: - ... +async def async_to_httpx_files(files: RequestFiles) -> HttpxRequestFiles: ... async def async_to_httpx_files(files: RequestFiles | None) -> HttpxRequestFiles | None: diff --git a/src/increase/_response.py b/src/increase/_response.py index fd4bff802..a99e4f3db 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -55,6 +55,9 @@ class BaseAPIResponse(Generic[R]): http_response: httpx.Response + retries_taken: int + """The number of retries made. If no retries happened this will be `0`""" + def __init__( self, *, @@ -64,6 +67,7 @@ def __init__( stream: bool, stream_cls: type[Stream[Any]] | type[AsyncStream[Any]] | None, options: FinalRequestOptions, + retries_taken: int = 0, ) -> None: self._cast_to = cast_to self._client = client @@ -72,6 +76,7 @@ def __init__( self._stream_cls = stream_cls self._options = options self.http_response = raw + self.retries_taken = retries_taken @property def headers(self) -> httpx.Headers: @@ -255,12 +260,10 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): @overload - def parse(self, *, to: type[_T]) -> _T: - ... + def parse(self, *, to: type[_T]) -> _T: ... @overload - def parse(self) -> R: - ... + def parse(self) -> R: ... def parse(self, *, to: type[_T] | None = None) -> R | _T: """Returns the rich python representation of this response's data. @@ -359,12 +362,10 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): @overload - async def parse(self, *, to: type[_T]) -> _T: - ... + async def parse(self, *, to: type[_T]) -> _T: ... @overload - async def parse(self) -> R: - ... + async def parse(self) -> R: ... async def parse(self, *, to: type[_T] | None = None) -> R | _T: """Returns the rich python representation of this response's data. diff --git a/src/increase/_types.py b/src/increase/_types.py index 510d266d3..9b5ceb2a3 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -111,8 +111,7 @@ class NotGiven: For example: ```py - def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: - ... + def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ... get(timeout=1) # 1s timeout @@ -162,16 +161,14 @@ def build( *, response: Response, data: object, - ) -> _T: - ... + ) -> _T: ... Headers = Mapping[str, Union[str, Omit]] class HeadersLikeProtocol(Protocol): - def get(self, __key: str) -> str | None: - ... + def get(self, __key: str) -> str | None: ... HeadersLike = Union[Headers, HeadersLikeProtocol] diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index c46a62a69..ffd883e9d 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -59,5 +59,4 @@ def __as_proxied__(self) -> T: return cast(T, self) @abstractmethod - def __load__(self) -> T: - ... + def __load__(self) -> T: ... diff --git a/src/increase/_utils/_reflection.py b/src/increase/_utils/_reflection.py index 9a53c7bd2..89aa712ac 100644 --- a/src/increase/_utils/_reflection.py +++ b/src/increase/_utils/_reflection.py @@ -34,7 +34,7 @@ def assert_signatures_in_sync( if custom_param.annotation != source_param.annotation: errors.append( - f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(source_param.annotation)}" + f"types for the `{name}` param are do not match; source={repr(source_param.annotation)} checking={repr(custom_param.annotation)}" ) continue diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 34797c290..2fc5a1c65 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -211,20 +211,17 @@ def required_args(*variants: Sequence[str]) -> Callable[[CallableT], CallableT]: Example usage: ```py @overload - def foo(*, a: str) -> str: - ... + def foo(*, a: str) -> str: ... @overload - def foo(*, b: bool) -> str: - ... + def foo(*, b: bool) -> str: ... # This enforces the same constraints that a static type checker would # i.e. that either a or b must be passed to the function @required_args(["a"], ["b"]) - def foo(*, a: str | None = None, b: bool | None = None) -> str: - ... + def foo(*, a: str | None = None, b: bool | None = None) -> str: ... ``` """ @@ -286,18 +283,15 @@ def wrapper(*args: object, **kwargs: object) -> object: @overload -def strip_not_given(obj: None) -> None: - ... +def strip_not_given(obj: None) -> None: ... @overload -def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: - ... +def strip_not_given(obj: Mapping[_K, _V | NotGiven]) -> dict[_K, _V]: ... @overload -def strip_not_given(obj: object) -> object: - ... +def strip_not_given(obj: object) -> object: ... def strip_not_given(obj: object | None) -> object: diff --git a/tests/test_client.py b/tests/test_client.py index 874f4fc0a..681b336f8 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -17,6 +17,7 @@ from pydantic import ValidationError from increase import Increase, AsyncIncrease, APIResponseValidationError +from increase._types import Omit from increase._models import BaseModel, FinalRequestOptions from increase._constants import RAW_RESPONSE_HEADER from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError @@ -334,7 +335,8 @@ def test_validate_headers(self) -> None: assert request.headers.get("Authorization") == f"Bearer {api_key}" with pytest.raises(IncreaseError): - client2 = Increase(base_url=base_url, api_key=None, _strict_response_validation=True) + with update_env(**{"INCREASE_API_KEY": Omit()}): + client2 = Increase(base_url=base_url, api_key=None, _strict_response_validation=True) _ = client2 def test_default_query_option(self) -> None: @@ -786,6 +788,27 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non assert _get_open_connections(self.client) == 0 + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + def test_retries_taken(self, client: Increase, failures_before_success: int, respx_mock: MockRouter) -> None: + client = client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = client.accounts.with_raw_response.create(name="New Account!") + + assert response.retries_taken == failures_before_success + class TestAsyncIncrease: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) @@ -1072,7 +1095,8 @@ def test_validate_headers(self) -> None: assert request.headers.get("Authorization") == f"Bearer {api_key}" with pytest.raises(IncreaseError): - client2 = AsyncIncrease(base_url=base_url, api_key=None, _strict_response_validation=True) + with update_env(**{"INCREASE_API_KEY": Omit()}): + client2 = AsyncIncrease(base_url=base_url, api_key=None, _strict_response_validation=True) _ = client2 def test_default_query_option(self) -> None: @@ -1537,3 +1561,27 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) ) assert _get_open_connections(self.client) == 0 + + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + @pytest.mark.asyncio + async def test_retries_taken( + self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter + ) -> None: + client = async_client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = await client.accounts.with_raw_response.create(name="New Account!") + + assert response.retries_taken == failures_before_success diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py index 763770927..8ffa7c5f2 100644 --- a/tests/test_deepcopy.py +++ b/tests/test_deepcopy.py @@ -41,8 +41,7 @@ def test_nested_list() -> None: assert_different_identities(obj1[1], obj2[1]) -class MyObject: - ... +class MyObject: ... def test_ignores_other_types() -> None: diff --git a/tests/test_response.py b/tests/test_response.py index 7da95c19c..bc4c431c1 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -19,16 +19,13 @@ from increase._base_client import FinalRequestOptions -class ConcreteBaseAPIResponse(APIResponse[bytes]): - ... +class ConcreteBaseAPIResponse(APIResponse[bytes]): ... -class ConcreteAPIResponse(APIResponse[List[str]]): - ... +class ConcreteAPIResponse(APIResponse[List[str]]): ... -class ConcreteAsyncAPIResponse(APIResponse[httpx.Response]): - ... +class ConcreteAsyncAPIResponse(APIResponse[httpx.Response]): ... def test_extract_response_type_direct_classes() -> None: @@ -56,8 +53,7 @@ def test_extract_response_type_binary_response() -> None: assert extract_response_type(AsyncBinaryAPIResponse) == bytes -class PydanticModel(pydantic.BaseModel): - ... +class PydanticModel(pydantic.BaseModel): ... def test_response_parse_mismatched_basemodel(client: Increase) -> None: diff --git a/tests/test_utils/test_typing.py b/tests/test_utils/test_typing.py index 87da876f5..ada58338f 100644 --- a/tests/test_utils/test_typing.py +++ b/tests/test_utils/test_typing.py @@ -9,24 +9,19 @@ _T3 = TypeVar("_T3") -class BaseGeneric(Generic[_T]): - ... +class BaseGeneric(Generic[_T]): ... -class SubclassGeneric(BaseGeneric[_T]): - ... +class SubclassGeneric(BaseGeneric[_T]): ... -class BaseGenericMultipleTypeArgs(Generic[_T, _T2, _T3]): - ... +class BaseGenericMultipleTypeArgs(Generic[_T, _T2, _T3]): ... -class SubclassGenericMultipleTypeArgs(BaseGenericMultipleTypeArgs[_T, _T2, _T3]): - ... +class SubclassGenericMultipleTypeArgs(BaseGenericMultipleTypeArgs[_T, _T2, _T3]): ... -class SubclassDifferentOrderGenericMultipleTypeArgs(BaseGenericMultipleTypeArgs[_T2, _T, _T3]): - ... +class SubclassDifferentOrderGenericMultipleTypeArgs(BaseGenericMultipleTypeArgs[_T2, _T, _T3]): ... def test_extract_type_var() -> None: diff --git a/tests/utils.py b/tests/utils.py index 2dd14f018..4aebddc95 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -8,7 +8,7 @@ from datetime import date, datetime from typing_extensions import Literal, get_args, get_origin, assert_type -from increase._types import NoneType +from increase._types import Omit, NoneType from increase._utils import ( is_dict, is_list, @@ -139,11 +139,15 @@ def _assert_list_type(type_: type[object], value: object) -> None: @contextlib.contextmanager -def update_env(**new_env: str) -> Iterator[None]: +def update_env(**new_env: str | Omit) -> Iterator[None]: old = os.environ.copy() try: - os.environ.update(new_env) + for name, value in new_env.items(): + if isinstance(value, Omit): + os.environ.pop(name, None) + else: + os.environ[name] = value yield None finally: From d67ea834b59fbaf20d440352940ed5e237f16109 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 21:58:10 +0000 Subject: [PATCH 0118/1325] chore(internal): update pydantic compat helper function (#551) --- src/increase/_compat.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 7c6f91a87..21fe6941c 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -7,7 +7,7 @@ import pydantic from pydantic.fields import FieldInfo -from ._types import StrBytesIntFloat +from ._types import IncEx, StrBytesIntFloat _T = TypeVar("_T") _ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel) @@ -133,17 +133,20 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: def model_dump( model: pydantic.BaseModel, *, + exclude: IncEx = None, exclude_unset: bool = False, exclude_defaults: bool = False, ) -> dict[str, Any]: if PYDANTIC_V2: return model.model_dump( + exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, ) return cast( "dict[str, Any]", model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, ), From c5316fb3b9258753668c9491acf4782662fb8f87 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:07:27 +0000 Subject: [PATCH 0119/1325] chore(internal): remove deprecated ruff config (#552) --- pyproject.toml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index d6438e098..5eb7e2041 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -195,7 +195,6 @@ unfixable = [ "T201", "T203", ] -ignore-init-module-imports = true [tool.ruff.lint.flake8-tidy-imports.banned-api] "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" @@ -207,7 +206,7 @@ combine-as-imports = true extra-standard-library = ["typing_extensions"] known-first-party = ["increase", "tests"] -[tool.ruff.per-file-ignores] +[tool.ruff.lint.per-file-ignores] "bin/**.py" = ["T201", "T203"] "scripts/**.py" = ["T201", "T203"] "tests/**.py" = ["T201", "T203"] From c3593f060a8c31f8f987c94ca533dc42b517154d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:36:11 +0000 Subject: [PATCH 0120/1325] feat(api): OpenAPI spec update via Stainless API (#553) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/increase/_files.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index d889ddf37..ab7493a35 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 6ef88fffb..5d48f5e28 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ee29f28f..546ed3883 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -pip install git+ssh://git@github.com/Increase/increase-python.git +pip install git+ssh://git@github.com/increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 8a245ee9a..baf181ed6 100644 --- a/README.md +++ b/README.md @@ -323,9 +323,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`APIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) object. +These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -423,7 +423,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index 5eb7e2041..26b5fb805 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,8 @@ classifiers = [ [project.urls] -Homepage = "https://github.com/Increase/increase-python" -Repository = "https://github.com/Increase/increase-python" +Homepage = "https://github.com/increase/increase-python" +Repository = "https://github.com/increase/increase-python" @@ -124,7 +124,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' [tool.black] line-length = 120 diff --git a/src/increase/_files.py b/src/increase/_files.py index e0ed1db41..04772912b 100644 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/Increase/increase-python/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/increase/increase-python/tree/main#file-uploads" ) from None From fbbb116de787de87aeac352565c8d8c7f90ad478 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Aug 2024 22:41:38 +0000 Subject: [PATCH 0121/1325] feat(api): OpenAPI spec update via Stainless API (#554) --- .stats.yml | 2 +- src/increase/types/export_create_params.py | 6 ++++++ tests/api_resources/test_exports.py | 4 ++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e90f7b5ac..6a9728310 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4fdf4ed23a3a8f7aea0dd98d18a946337c74c1ae80a89c83e7dfb7793c08375a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b1cd0b7c9e836a0a5decb161bd7236000d1e8471f284e49e50ab46e01b386925.yml diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 2c91909a5..5105c8c00 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -152,6 +152,9 @@ class BalanceCsv(TypedDict, total=False): created_at: BalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" + program_id: str + """Filter exported Transactions to the specified Program.""" + class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -237,3 +240,6 @@ class TransactionCsv(TypedDict, total=False): created_at: TransactionCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" + + program_id: str + """Filter exported Transactions to the specified Program.""" diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index ff2ef1b62..60ac53219 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -47,6 +47,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + "program_id": "program_id", }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", @@ -66,6 +67,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + "program_id": "program_id", }, vendor_csv={}, ) @@ -207,6 +209,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + "program_id": "program_id", }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", @@ -226,6 +229,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, + "program_id": "program_id", }, vendor_csv={}, ) From 518c8ca9b85a55080b4a1212279864035daea552 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 01:50:32 +0000 Subject: [PATCH 0122/1325] chore(internal): version bump (#555) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f8e21778f..f24634e65 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.81.0" + ".": "0.82.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 26b5fb805..5e7da24d0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.81.0" +version = "0.82.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f81555aa8..73b0f0557 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.81.0" # x-release-please-version +__version__ = "0.82.0" # x-release-please-version From 10b8d30971e5e1238775cda118efb486a83afb5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:09:16 +0000 Subject: [PATCH 0123/1325] feat(api): OpenAPI spec update via Stainless API (#556) --- .stats.yml | 2 +- src/increase/resources/pending_transactions.py | 8 -------- src/increase/types/pending_transaction_list_params.py | 3 --- tests/api_resources/test_pending_transactions.py | 2 -- 4 files changed, 1 insertion(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6a9728310..c6ed457a5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b1cd0b7c9e836a0a5decb161bd7236000d1e8471f284e49e50ab46e01b386925.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-927ee7e148105e65f8314e36e620b8d078d52dddef74d9b4fef0e3c81176e806.yml diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 1480a95ce..c174ba0ef 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -77,7 +77,6 @@ def list( cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, route_id: str | NotGiven = NOT_GIVEN, - source_id: str | NotGiven = NOT_GIVEN, status: pending_transaction_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -99,8 +98,6 @@ def list( route_id: Filter pending transactions to those belonging to the specified Route. - source_id: Filter pending transactions to those caused by the specified source. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -125,7 +122,6 @@ def list( "cursor": cursor, "limit": limit, "route_id": route_id, - "source_id": source_id, "status": status, }, pending_transaction_list_params.PendingTransactionListParams, @@ -190,7 +186,6 @@ def list( cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, route_id: str | NotGiven = NOT_GIVEN, - source_id: str | NotGiven = NOT_GIVEN, status: pending_transaction_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -212,8 +207,6 @@ def list( route_id: Filter pending transactions to those belonging to the specified Route. - source_id: Filter pending transactions to those caused by the specified source. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -238,7 +231,6 @@ def list( "cursor": cursor, "limit": limit, "route_id": route_id, - "source_id": source_id, "status": status, }, pending_transaction_list_params.PendingTransactionListParams, diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 9a1fac279..a16dde5bd 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -31,9 +31,6 @@ class PendingTransactionListParams(TypedDict, total=False): route_id: str """Filter pending transactions to those belonging to the specified Route.""" - source_id: str - """Filter pending transactions to those caused by the specified source.""" - status: Status diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 0147f5a77..99e91e076 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -78,7 +78,6 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, route_id="route_id", - source_id="source_id", status={"in": ["pending", "complete"]}, ) assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @@ -166,7 +165,6 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, route_id="route_id", - source_id="source_id", status={"in": ["pending", "complete"]}, ) assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) From a8a87649ea9f3c4de9f1e383e76b9a0367af3b03 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:10:28 +0000 Subject: [PATCH 0124/1325] chore(internal): codegen related update (#558) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f24634e65..d34cd697f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.82.0" + ".": "0.83.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5e7da24d0..0e0c59418 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.82.0" +version = "0.83.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 73b0f0557..b0d9cfdc9 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.82.0" # x-release-please-version +__version__ = "0.83.0" # x-release-please-version From d81005445de343227eb31761081ef476aec96ca0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:13:10 +0000 Subject: [PATCH 0125/1325] chore(ci): bump prism mock server version (#559) --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index f58615769..d2814ae6a 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.4 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" fi From 53231759dbc410e97ac343926b84f8854fc61fe0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 Aug 2024 20:14:20 +0000 Subject: [PATCH 0126/1325] chore(internal): ensure package is importable in lint cmd (#561) --- pyproject.toml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 0e0c59418..453433510 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -76,10 +76,13 @@ format = { chain = [ "lint" = { chain = [ "check:ruff", "typecheck", + "check:importable", ]} "check:ruff" = "ruff check ." "fix:ruff" = "ruff check --fix ." +"check:importable" = "python -c 'import increase'" + typecheck = { chain = [ "typecheck:pyright", "typecheck:mypy" From c1dd1d24cec2be807fee8a15cd99db54ef3c0c26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:15:15 +0000 Subject: [PATCH 0127/1325] feat(api): OpenAPI spec update via Stainless API (#562) --- .stats.yml | 2 +- src/increase/types/ach_transfer.py | 65 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c6ed457a5..aefaa3202 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-927ee7e148105e65f8314e36e620b8d078d52dddef74d9b4fef0e3c81176e806.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c5548052706e30f75506002c96057932fa7587c6441b34cefb96b5b4c9e0876b.yml diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 63ab72614..e65628311 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -22,6 +22,7 @@ "CreatedByAPIKey", "CreatedByOAuthApplication", "CreatedByUser", + "InboundFundsHold", "NotificationsOfChange", "PreferredEffectiveDate", "Return", @@ -153,6 +154,64 @@ class CreatedBy(BaseModel): """If present, details about the User that created the transfer.""" +class InboundFundsHold(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + + amount: int + """The held amount in the minor unit of the account's currency. + + For dollars, for example, this is cents. + """ + + automatically_releases_at: datetime.datetime + """When the hold will be released automatically. + + Certain conditions may cause it to be released before this time. + """ + + created_at: datetime.datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold + was created. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + held_transaction_id: Optional[str] = None + """The ID of the Transaction for which funds were held.""" + + pending_transaction_id: Optional[str] = None + """The ID of the Pending Transaction representing the held funds.""" + + released_at: Optional[datetime.datetime] = None + """When the hold was released (if it has been released).""" + + status: Literal["held", "complete"] + """The status of the hold. + + - `held` - Funds are still being held. + - `complete` - Funds have been released. + """ + + type: Literal["inbound_funds_hold"] + """A constant representing the object's type. + + For this resource it will always be `inbound_funds_hold`. + """ + + class NotificationsOfChange(BaseModel): change_code: Literal[ "incorrect_account_number", @@ -643,6 +702,12 @@ class ACHTransfer(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + inbound_funds_hold: Optional[InboundFundsHold] = None + """Increase will sometimes hold the funds for ACH debit transfers. + + If funds are held, this sub-object will contain details of the hold. + """ + individual_id: Optional[str] = None """Your identifier for the transfer recipient.""" From 1fb597bbdd9624c59085fcc98b87ab3ba1cee971 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:16:29 +0000 Subject: [PATCH 0128/1325] chore(internal): codegen related update (#563) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d34cd697f..47dd76c10 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.83.0" + ".": "0.84.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 453433510..03a32523e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.83.0" +version = "0.84.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b0d9cfdc9..819c41e48 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.83.0" # x-release-please-version +__version__ = "0.84.0" # x-release-please-version From 0779f5cbe995acbfaa5ac9dcb5620d202da7b663 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:21:50 +0000 Subject: [PATCH 0129/1325] chore(examples): minor formatting changes (#564) --- .../simulations/test_ach_transfers.py | 16 +- .../simulations/test_card_disputes.py | 20 +- .../simulations/test_physical_cards.py | 16 +- tests/api_resources/test_account_numbers.py | 8 +- tests/api_resources/test_cards.py | 8 +- tests/api_resources/test_check_transfers.py | 16 +- tests/api_resources/test_entities.py | 472 +++++++++--------- tests/api_resources/test_exports.py | 16 +- .../test_inbound_ach_transfers.py | 16 +- tests/api_resources/test_lockboxes.py | 4 +- tests/api_resources/test_physical_cards.py | 28 +- 11 files changed, 310 insertions(+), 310 deletions(-) diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 52ea026c1..4851c23df 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -59,7 +59,7 @@ def test_path_params_acknowledge(self, client: Increase) -> None: def test_method_create_notification_of_change(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -68,7 +68,7 @@ def test_method_create_notification_of_change(self, client: Increase) -> None: def test_raw_response_create_notification_of_change(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) @@ -81,7 +81,7 @@ def test_raw_response_create_notification_of_change(self, client: Increase) -> N def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) as response: assert not response.is_closed @@ -97,7 +97,7 @@ def test_path_params_create_notification_of_change(self, client: Increase) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) @@ -231,7 +231,7 @@ async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> Non async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -240,7 +240,7 @@ async def test_method_create_notification_of_change(self, async_client: AsyncInc async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) @@ -253,7 +253,7 @@ async def test_raw_response_create_notification_of_change(self, async_client: As async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) as response: assert not response.is_closed @@ -269,7 +269,7 @@ async def test_path_params_create_notification_of_change(self, async_client: Asy with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", - change_code="incorrect_routing_number", + change_code="incorrect_account_number", corrected_data="123456789", ) diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 15ed4aebc..25d1d3f67 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -21,7 +21,7 @@ class TestCardDisputes: def test_method_action(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -29,7 +29,7 @@ def test_method_action(self, client: Increase) -> None: def test_method_action_with_all_params(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -38,7 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: def test_raw_response_action(self, client: Increase) -> None: response = client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_action(self, client: Increase) -> None: def test_streaming_response_action(self, client: Increase) -> None: with client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_path_params_action(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="rejected", + status="accepted", ) @@ -76,7 +76,7 @@ class TestAsyncCardDisputes: async def test_method_action(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -84,7 +84,7 @@ async def test_method_action(self, async_client: AsyncIncrease) -> None: async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -93,7 +93,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) assert response.is_closed is True @@ -105,7 +105,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", + status="accepted", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,5 +120,5 @@ async def test_path_params_action(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="rejected", + status="accepted", ) diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 419377273..4aeaa85ab 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -21,7 +21,7 @@ class TestPhysicalCards: def test_method_advance_shipment(self, client: Increase) -> None: physical_card = client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -29,7 +29,7 @@ def test_method_advance_shipment(self, client: Increase) -> None: def test_raw_response_advance_shipment(self, client: Increase) -> None: response = client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None: def test_streaming_response_advance_shipment(self, client: Increase) -> None: with client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,7 +56,7 @@ def test_path_params_advance_shipment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - shipment_status="shipped", + shipment_status="pending", ) @@ -67,7 +67,7 @@ class TestAsyncPhysicalCards: async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -75,7 +75,7 @@ async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> Non async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) assert response.is_closed is True @@ -87,7 +87,7 @@ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + shipment_status="pending", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,5 +102,5 @@ async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - shipment_status="shipped", + shipment_status="pending", ) diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 16237cb72..8978259d0 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -114,10 +114,10 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.update( account_number_id="account_number_v18nkfqm6afpsrvy82b2", - inbound_ach={"debit_status": "blocked"}, + inbound_ach={"debit_status": "allowed"}, inbound_checks={"status": "allowed"}, name="x", - status="disabled", + status="active", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @@ -292,10 +292,10 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.update( account_number_id="account_number_v18nkfqm6afpsrvy82b2", - inbound_ach={"debit_status": "blocked"}, + inbound_ach={"debit_status": "allowed"}, inbound_checks={"status": "allowed"}, name="x", - status="disabled", + status="active", ) assert_matches_type(AccountNumber, account_number, path=["response"]) diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 03606b54a..007a6d91a 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -33,9 +33,9 @@ def test_method_create_with_all_params(self, client: Increase) -> None: billing_address={ "city": "x", "line1": "x", - "line2": "x", "postal_code": "x", "state": "x", + "line2": "x", }, description="Card for Ian Crease", digital_wallet={ @@ -123,9 +123,9 @@ def test_method_update_with_all_params(self, client: Increase) -> None: billing_address={ "city": "x", "line1": "x", - "line2": "x", "postal_code": "x", "state": "x", + "line2": "x", }, description="New description", digital_wallet={ @@ -266,9 +266,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) billing_address={ "city": "x", "line1": "x", - "line2": "x", "postal_code": "x", "state": "x", + "line2": "x", }, description="Card for Ian Crease", digital_wallet={ @@ -356,9 +356,9 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) billing_address={ "city": "x", "line1": "x", - "line2": "x", "postal_code": "x", "state": "x", + "line2": "x", }, description="New description", digital_wallet={ diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 0f21979ea..329b95915 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -41,21 +41,21 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "mailing_address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", - "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "line2": "x", + "name": "Ian Crease", }, "memo": "Check payment", - "note": "x", "recipient_name": "Ian Crease", + "note": "x", "return_address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "line2": "x", }, "signature_text": "Ian Crease", }, @@ -317,21 +317,21 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "mailing_address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", - "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "line2": "x", + "name": "Ian Crease", }, "memo": "Check payment", - "note": "x", "recipient_name": "Ian Crease", + "note": "x", "return_address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "line2": "x", }, "signature_text": "Ian Crease", }, diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 29bd4ef39..8a49c0e37 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -36,38 +36,36 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, "beneficial_owners": [ { - "company_title": "CEO", "individual": { "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("1970-01-31"), "identification": { + "method": "social_security_number", + "number": "078051120", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "078051120", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -76,14 +74,16 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "Ian Crease", + "confirmed_no_us_tax_id": True, }, - "prongs": ["control"], + "prongs": ["ownership"], + "company_title": "CEO", } ], - "incorporation_state": "NY", - "industry_code": "x", "name": "National Phonograph Company", "tax_identifier": "602214076", + "incorporation_state": "NY", + "industry_code": "x", "website": "https://example.com", }, description="x", @@ -91,9 +91,9 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], "category": "municipality", @@ -107,27 +107,26 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -136,32 +135,32 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -170,32 +169,32 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -204,6 +203,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, ], "name": "x", @@ -212,27 +212,26 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -241,82 +240,46 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, "category": "revocable", - "formation_document_file_id": "formation_document_file_id", - "formation_state": "x", - "grantor": { - "address": { - "city": "x", - "line1": "x", - "line2": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "xxxx", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - }, "name": "x", - "tax_identifier": "x", "trustees": [ { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -325,35 +288,35 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -362,35 +325,35 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -399,10 +362,47 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, ], + "formation_document_file_id": "formation_document_file_id", + "formation_state": "x", + "grantor": { + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "date_of_birth": parse_date("2019-12-27"), + "identification": { + "method": "social_security_number", + "number": "xxxx", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "x", + "confirmed_no_us_tax_id": True, + }, + "tax_identifier": "x", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -655,7 +655,7 @@ def test_method_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -665,32 +665,30 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase) entity = client.entities.create_beneficial_owner( entity_id="entity_n8y8tnk2p9339ti393yi", beneficial_owner={ - "company_title": "CEO", "individual": { "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("1970-01-31"), "identification": { + "method": "social_security_number", + "number": "078051120", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "078051120", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -699,8 +697,10 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase) }, }, "name": "Ian Crease", + "confirmed_no_us_tax_id": True, }, - "prongs": ["control"], + "prongs": ["ownership"], + "company_title": "CEO", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -724,7 +724,7 @@ def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) @@ -752,7 +752,7 @@ def test_streaming_response_create_beneficial_owner(self, client: Increase) -> N }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) as response: assert not response.is_closed @@ -783,7 +783,7 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) @@ -807,9 +807,9 @@ def test_method_update_address_with_all_params(self, client: Increase) -> None: address={ "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", "state": "NY", "zip": "10045", + "line2": "Unit 2", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -884,9 +884,9 @@ def test_method_update_beneficial_owner_address_with_all_params(self, client: In address={ "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", "state": "NY", "zip": "10045", + "line2": "Unit 2", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -1005,38 +1005,36 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, "beneficial_owners": [ { - "company_title": "CEO", "individual": { "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("1970-01-31"), "identification": { + "method": "social_security_number", + "number": "078051120", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "078051120", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1045,14 +1043,16 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "Ian Crease", + "confirmed_no_us_tax_id": True, }, - "prongs": ["control"], + "prongs": ["ownership"], + "company_title": "CEO", } ], - "incorporation_state": "NY", - "industry_code": "x", "name": "National Phonograph Company", "tax_identifier": "602214076", + "incorporation_state": "NY", + "industry_code": "x", "website": "https://example.com", }, description="x", @@ -1060,9 +1060,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], "category": "municipality", @@ -1076,27 +1076,26 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1105,32 +1104,32 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1139,32 +1138,32 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1173,6 +1172,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, ], "name": "x", @@ -1181,27 +1181,26 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1210,82 +1209,46 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], trust={ "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, "category": "revocable", - "formation_document_file_id": "formation_document_file_id", - "formation_state": "x", - "grantor": { - "address": { - "city": "x", - "line1": "x", - "line2": "x", - "state": "x", - "zip": "x", - }, - "confirmed_no_us_tax_id": True, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "drivers_license": { - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - }, - "method": "social_security_number", - "number": "xxxx", - "other": { - "back_file_id": "back_file_id", - "country": "x", - "description": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - }, "name": "x", - "tax_identifier": "x", "trustees": [ { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1294,35 +1257,35 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1331,35 +1294,35 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, { + "structure": "individual", "individual": { "address": { "city": "x", "line1": "x", - "line2": "x", "state": "x", "zip": "x", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("2019-12-27"), "identification": { + "method": "social_security_number", + "number": "xxxx", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "xxxx", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1368,10 +1331,47 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, "name": "x", + "confirmed_no_us_tax_id": True, }, - "structure": "individual", }, ], + "formation_document_file_id": "formation_document_file_id", + "formation_state": "x", + "grantor": { + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "date_of_birth": parse_date("2019-12-27"), + "identification": { + "method": "social_security_number", + "number": "xxxx", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "x", + "confirmed_no_us_tax_id": True, + }, + "tax_identifier": "x", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1624,7 +1624,7 @@ async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1634,32 +1634,30 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client entity = await async_client.entities.create_beneficial_owner( entity_id="entity_n8y8tnk2p9339ti393yi", beneficial_owner={ - "company_title": "CEO", "individual": { "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "x", "state": "NY", "zip": "10045", + "line2": "x", }, - "confirmed_no_us_tax_id": True, "date_of_birth": parse_date("1970-01-31"), "identification": { + "method": "social_security_number", + "number": "078051120", "drivers_license": { - "back_file_id": "back_file_id", "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", "state": "x", + "back_file_id": "back_file_id", }, - "method": "social_security_number", - "number": "078051120", "other": { - "back_file_id": "back_file_id", "country": "x", "description": "x", - "expiration_date": parse_date("2019-12-27"), "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), }, "passport": { "country": "x", @@ -1668,8 +1666,10 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client }, }, "name": "Ian Crease", + "confirmed_no_us_tax_id": True, }, - "prongs": ["control"], + "prongs": ["ownership"], + "company_title": "CEO", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1693,7 +1693,7 @@ async def test_raw_response_create_beneficial_owner(self, async_client: AsyncInc }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) @@ -1721,7 +1721,7 @@ async def test_streaming_response_create_beneficial_owner(self, async_client: As }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) as response: assert not response.is_closed @@ -1752,7 +1752,7 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr }, "name": "Ian Crease", }, - "prongs": ["control"], + "prongs": ["ownership"], }, ) @@ -1776,9 +1776,9 @@ async def test_method_update_address_with_all_params(self, async_client: AsyncIn address={ "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", "state": "NY", "zip": "10045", + "line2": "Unit 2", }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1853,9 +1853,9 @@ async def test_method_update_beneficial_owner_address_with_all_params(self, asyn address={ "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", "state": "NY", "zip": "10045", + "line2": "Unit 2", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 60ac53219..bb968bb3c 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -22,14 +22,14 @@ class TestExports: @parametrize def test_method_create(self, client: Increase) -> None: export = client.exports.create( - category="transaction_csv", + category="account_statement_ofx", ) assert_matches_type(Export, export, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: export = client.exports.create( - category="transaction_csv", + category="account_statement_ofx", account_statement_ofx={ "account_id": "account_id", "created_at": { @@ -76,7 +76,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.exports.with_raw_response.create( - category="transaction_csv", + category="account_statement_ofx", ) assert response.is_closed is True @@ -87,7 +87,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.exports.with_streaming_response.create( - category="transaction_csv", + category="account_statement_ofx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,14 +184,14 @@ class TestAsyncExports: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.create( - category="transaction_csv", + category="account_statement_ofx", ) assert_matches_type(Export, export, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.create( - category="transaction_csv", + category="account_statement_ofx", account_statement_ofx={ "account_id": "account_id", "created_at": { @@ -238,7 +238,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.exports.with_raw_response.create( - category="transaction_csv", + category="account_statement_ofx", ) assert response.is_closed is True @@ -249,7 +249,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.exports.with_streaming_response.create( - category="transaction_csv", + category="account_statement_ofx", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index ba9abf32d..3cda2efc1 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -196,7 +196,7 @@ def test_path_params_decline(self, client: Increase) -> None: def test_method_transfer_return(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -204,7 +204,7 @@ def test_method_transfer_return(self, client: Increase) -> None: def test_raw_response_transfer_return(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) assert response.is_closed is True @@ -216,7 +216,7 @@ def test_raw_response_transfer_return(self, client: Increase) -> None: def test_streaming_response_transfer_return(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -233,7 +233,7 @@ def test_path_params_transfer_return(self, client: Increase) -> None: ): client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="", - reason="payment_stopped", + reason="insufficient_funds", ) @@ -415,7 +415,7 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -423,7 +423,7 @@ async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) assert response.is_closed is True @@ -435,7 +435,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - async def test_streaming_response_transfer_return(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="payment_stopped", + reason="insufficient_funds", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -452,5 +452,5 @@ async def test_path_params_transfer_return(self, async_client: AsyncIncrease) -> ): await async_client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="", - reason="payment_stopped", + reason="insufficient_funds", ) diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index d101bf24f..2f1f24439 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", recipient_name="x", - status="inactive", + status="active", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -281,7 +281,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", recipient_name="x", - status="inactive", + status="active", ) assert_matches_type(Lockbox, lockbox, path=["response"]) diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index a9c8fafda..b538d6394 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -54,12 +54,12 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", - "line3": "x", "name": "Ian Crease", - "phone_number": "x", "postal_code": "10045", "state": "NY", + "line2": "Unit 2", + "line3": "x", + "phone_number": "x", }, "method": "usps", }, @@ -161,7 +161,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: def test_method_update(self, client: Increase) -> None: physical_card = client.physical_cards.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -169,7 +169,7 @@ def test_method_update(self, client: Increase) -> None: def test_raw_response_update(self, client: Increase) -> None: response = client.physical_cards.with_raw_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) assert response.is_closed is True @@ -181,7 +181,7 @@ def test_raw_response_update(self, client: Increase) -> None: def test_streaming_response_update(self, client: Increase) -> None: with client.physical_cards.with_streaming_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,7 +196,7 @@ def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.physical_cards.with_raw_response.update( physical_card_id="", - status="disabled", + status="active", ) @parametrize @@ -277,12 +277,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "address": { "city": "New York", "line1": "33 Liberty Street", - "line2": "Unit 2", - "line3": "x", "name": "Ian Crease", - "phone_number": "x", "postal_code": "10045", "state": "NY", + "line2": "Unit 2", + "line3": "x", + "phone_number": "x", }, "method": "usps", }, @@ -384,7 +384,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: async def test_method_update(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -392,7 +392,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_cards.with_raw_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) assert response.is_closed is True @@ -404,7 +404,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.physical_cards.with_streaming_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="disabled", + status="active", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -419,7 +419,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.physical_cards.with_raw_response.update( physical_card_id="", - status="disabled", + status="active", ) @parametrize From d2862ee48c63d8ed693fb83b83de506dd6c9bdb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 15:59:53 +0000 Subject: [PATCH 0130/1325] feat(api): OpenAPI spec update via Stainless API (#566) --- .stats.yml | 2 +- .../types/check_transfer_create_params.py | 4 ++-- tests/api_resources/test_check_transfers.py | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index aefaa3202..6ad457926 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c5548052706e30f75506002c96057932fa7587c6441b34cefb96b5b4c9e0876b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1be0fc6342255b808e9103c2be881201d65f9d893ab92cb93017f3f415e5484e.yml diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 4a3560f86..583b4fe04 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -112,8 +112,8 @@ class PhysicalCheck(TypedDict, total=False): return_address: PhysicalCheckReturnAddress """The return address to be printed on the check. - If omitted this will default to the address of the Entity of the Account used to - make the Check Transfer. + If omitted this will default to an Increase-owned address that will mark checks + as delivery failed and shred them. """ signature_text: str diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 329b95915..cf04e77c0 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -50,11 +50,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "New York", - "line1": "33 Liberty Street", - "name": "Ian Crease", - "postal_code": "10045", - "state": "NY", + "city": "x", + "line1": "x", + "name": "x", + "postal_code": "x", + "state": "x", "line2": "x", }, "signature_text": "Ian Crease", @@ -326,11 +326,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "New York", - "line1": "33 Liberty Street", - "name": "Ian Crease", - "postal_code": "10045", - "state": "NY", + "city": "x", + "line1": "x", + "name": "x", + "postal_code": "x", + "state": "x", "line2": "x", }, "signature_text": "Ian Crease", From 8e390c33355b8b1cecb23f7e8e0d4c74abaf6326 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 16:00:56 +0000 Subject: [PATCH 0131/1325] chore(internal): version bump (#567) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 47dd76c10..ad502a4b2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.84.0" + ".": "0.85.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 03a32523e..805d362d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.84.0" +version = "0.85.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 819c41e48..d5cb9cdfc 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.84.0" # x-release-please-version +__version__ = "0.85.0" # x-release-please-version From 936c03ac5e5fcb5d8d0a7d22492e659c8a31cdbd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:57:29 +0000 Subject: [PATCH 0132/1325] feat(api): OpenAPI spec update via Stainless API (#568) --- .stats.yml | 2 +- src/increase/types/check_deposit.py | 73 ++++++++++++++++++++++++++++- 2 files changed, 73 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ad457926..a757493ad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1be0fc6342255b808e9103c2be881201d65f9d893ab92cb93017f3f415e5484e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-234be2cec0b89a9ea04bc726272f31592df0cd38337ef3e11eefd17338735a45.yml diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 4469facb4..a44baf163 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -6,7 +6,14 @@ from .._models import BaseModel -__all__ = ["CheckDeposit", "DepositAcceptance", "DepositRejection", "DepositReturn", "DepositSubmission"] +__all__ = [ + "CheckDeposit", + "DepositAcceptance", + "DepositRejection", + "DepositReturn", + "DepositSubmission", + "InboundFundsHold", +] class DepositAcceptance(BaseModel): @@ -231,6 +238,64 @@ class DepositSubmission(BaseModel): """ +class InboundFundsHold(BaseModel): + id: str + """The Inbound Funds Hold identifier.""" + + amount: int + """The held amount in the minor unit of the account's currency. + + For dollars, for example, this is cents. + """ + + automatically_releases_at: datetime + """When the hold will be released automatically. + + Certain conditions may cause it to be released before this time. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold + was created. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + held_transaction_id: Optional[str] = None + """The ID of the Transaction for which funds were held.""" + + pending_transaction_id: Optional[str] = None + """The ID of the Pending Transaction representing the held funds.""" + + released_at: Optional[datetime] = None + """When the hold was released (if it has been released).""" + + status: Literal["held", "complete"] + """The status of the hold. + + - `held` - Funds are still being held. + - `complete` - Funds have been released. + """ + + type: Literal["inbound_funds_hold"] + """A constant representing the object's type. + + For this resource it will always be `inbound_funds_hold`. + """ + + class CheckDeposit(BaseModel): id: str """The deposit's identifier.""" @@ -292,6 +357,12 @@ class CheckDeposit(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + inbound_funds_hold: Optional[InboundFundsHold] = None + """Increase will sometimes hold the funds for Check Deposits. + + If funds are held, this sub-object will contain details of the hold. + """ + inbound_mail_item_id: Optional[str] = None """ If the Check Deposit was the result of an Inbound Mail Item, this will contain From b07c5d20948dd285dba450b00af347e95384eb6f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Aug 2024 19:58:20 +0000 Subject: [PATCH 0133/1325] chore(internal): codegen related update (#570) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ad502a4b2..53079579b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.85.0" + ".": "0.86.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 805d362d1..9dfe04fe5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.85.0" +version = "0.86.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d5cb9cdfc..ccc2b0f09 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.85.0" # x-release-please-version +__version__ = "0.86.0" # x-release-please-version From 68e37c0407e9a8a18d05b439982acd501db611c7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:44:24 +0000 Subject: [PATCH 0134/1325] feat(api): OpenAPI spec update via Stainless API (#571) --- .stats.yml | 2 +- .../types/check_transfer_create_params.py | 4 ++-- tests/api_resources/test_check_transfers.py | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index a757493ad..bae97c071 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-234be2cec0b89a9ea04bc726272f31592df0cd38337ef3e11eefd17338735a45.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3c69a8cf8af255cd96302527014ca64df99a726e01be508c5208f60a086c6cbc.yml diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 583b4fe04..4a3560f86 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -112,8 +112,8 @@ class PhysicalCheck(TypedDict, total=False): return_address: PhysicalCheckReturnAddress """The return address to be printed on the check. - If omitted this will default to an Increase-owned address that will mark checks - as delivery failed and shred them. + If omitted this will default to the address of the Entity of the Account used to + make the Check Transfer. """ signature_text: str diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index cf04e77c0..329b95915 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -50,11 +50,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "x", - "line1": "x", - "name": "x", - "postal_code": "x", - "state": "x", + "city": "New York", + "line1": "33 Liberty Street", + "name": "Ian Crease", + "postal_code": "10045", + "state": "NY", "line2": "x", }, "signature_text": "Ian Crease", @@ -326,11 +326,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "x", - "line1": "x", - "name": "x", - "postal_code": "x", - "state": "x", + "city": "New York", + "line1": "33 Liberty Street", + "name": "Ian Crease", + "postal_code": "10045", + "state": "NY", "line2": "x", }, "signature_text": "Ian Crease", From e612f71950ae2f87d6831c21ab4d503f90a223e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Aug 2024 12:45:32 +0000 Subject: [PATCH 0135/1325] chore(internal): version bump (#573) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 53079579b..ae449647f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.86.0" + ".": "0.87.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9dfe04fe5..58abaa25f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.86.0" +version = "0.87.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ccc2b0f09..6eed59dca 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.86.0" # x-release-please-version +__version__ = "0.87.0" # x-release-please-version From a21ef019c868ff703ecdc1e1e13c43870cbf5606 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:02:15 +0000 Subject: [PATCH 0136/1325] feat(api): OpenAPI spec update via Stainless API (#574) --- .stats.yml | 2 +- .../types/check_transfer_create_params.py | 4 ++-- tests/api_resources/test_check_transfers.py | 20 +++++++++---------- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index bae97c071..a757493ad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3c69a8cf8af255cd96302527014ca64df99a726e01be508c5208f60a086c6cbc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-234be2cec0b89a9ea04bc726272f31592df0cd38337ef3e11eefd17338735a45.yml diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 4a3560f86..583b4fe04 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -112,8 +112,8 @@ class PhysicalCheck(TypedDict, total=False): return_address: PhysicalCheckReturnAddress """The return address to be printed on the check. - If omitted this will default to the address of the Entity of the Account used to - make the Check Transfer. + If omitted this will default to an Increase-owned address that will mark checks + as delivery failed and shred them. """ signature_text: str diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 329b95915..cf04e77c0 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -50,11 +50,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "New York", - "line1": "33 Liberty Street", - "name": "Ian Crease", - "postal_code": "10045", - "state": "NY", + "city": "x", + "line1": "x", + "name": "x", + "postal_code": "x", + "state": "x", "line2": "x", }, "signature_text": "Ian Crease", @@ -326,11 +326,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "recipient_name": "Ian Crease", "note": "x", "return_address": { - "city": "New York", - "line1": "33 Liberty Street", - "name": "Ian Crease", - "postal_code": "10045", - "state": "NY", + "city": "x", + "line1": "x", + "name": "x", + "postal_code": "x", + "state": "x", "line2": "x", }, "signature_text": "Ian Crease", From 519dfc9bb6a03d5583094722ac0d583e3e05fa56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 16:03:26 +0000 Subject: [PATCH 0137/1325] chore(internal): codegen related update (#576) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ae449647f..d80a91e22 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.87.0" + ".": "0.88.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 58abaa25f..91c91faaf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.87.0" +version = "0.88.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6eed59dca..6bd44ba53 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.87.0" # x-release-please-version +__version__ = "0.88.0" # x-release-please-version From 9b3d7261c455bd9fb2250f7312616e6cc16c4e29 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:38:56 +0000 Subject: [PATCH 0138/1325] feat(api): OpenAPI spec update via Stainless API (#577) --- .stats.yml | 2 +- src/increase/types/digital_wallet_token.py | 3 ++- src/increase/types/real_time_decision.py | 6 ++++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index a757493ad..e7e1ffb8d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-234be2cec0b89a9ea04bc726272f31592df0cd38337ef3e11eefd17338735a45.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0277cc7ae4fcdeeac84ea9f3400a691734193c2e7ba2cdcef3ac226ff5f7b97.yml diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py index 8539cf74d..14aa7792c 100644 --- a/src/increase/types/digital_wallet_token.py +++ b/src/increase/types/digital_wallet_token.py @@ -31,11 +31,12 @@ class DigitalWalletToken(BaseModel): - `deactivated` - The digital wallet token has been permanently canceled. """ - token_requestor: Literal["apple_pay", "google_pay", "unknown"] + token_requestor: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] """The digital wallet app being used. - `apple_pay` - Apple Pay - `google_pay` - Google Pay + - `samsung_pay` - Samsung Pay - `unknown` - Unknown """ diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index fbbf7c652..15e6335d7 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -369,11 +369,12 @@ class DigitalWalletAuthentication(BaseModel): - `email` - Send one-time passcodes over email. """ - digital_wallet: Literal["apple_pay", "google_pay", "unknown"] + digital_wallet: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] """The digital wallet app being used. - `apple_pay` - Apple Pay - `google_pay` - Google Pay + - `samsung_pay` - Samsung Pay - `unknown` - Unknown """ @@ -419,11 +420,12 @@ class DigitalWalletToken(BaseModel): - `decline` - Decline the provisioning request. """ - digital_wallet: Literal["apple_pay", "google_pay", "unknown"] + digital_wallet: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] """The digital wallet app being used. - `apple_pay` - Apple Pay - `google_pay` - Google Pay + - `samsung_pay` - Samsung Pay - `unknown` - Unknown """ From c07e2a95b3c3bef172e0765f35eadfef9f79ef0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Aug 2024 17:39:47 +0000 Subject: [PATCH 0139/1325] wip (#579) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d80a91e22..6af24e3d3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.88.0" + ".": "0.89.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 91c91faaf..52f291db8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.88.0" +version = "0.89.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6bd44ba53..3fc86d747 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.88.0" # x-release-please-version +__version__ = "0.89.0" # x-release-please-version From 9d991e97ad97ac7cc54f4289b04b1abd0f7e724f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:13:53 +0000 Subject: [PATCH 0140/1325] feat(api): OpenAPI spec update via Stainless API (#580) --- .stats.yml | 2 +- .../resources/inbound_check_deposits.py | 18 ++++++++++++++++-- src/increase/types/inbound_check_deposit.py | 9 ++++++++- .../inbound_check_deposit_return_params.py | 11 ++++++++++- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7e1ffb8d..83f53a68a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0277cc7ae4fcdeeac84ea9f3400a691734193c2e7ba2cdcef3ac226ff5f7b97.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7f6038f314008b50ad9b18054dd60f9ce5414ddd771c847f08f3ad637b0d8faa.yml diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index d275f514d..c766b74db 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -180,7 +180,13 @@ def return_( self, inbound_check_deposit_id: str, *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"], + reason: Literal[ + "altered_or_fictitious", + "not_authorized", + "duplicate_presentment", + "endorsement_missing", + "endorsement_irregular", + ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -201,6 +207,7 @@ def return_( - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. + - `endorsement_irregular` - The check was not endorsed by the payee. extra_headers: Send extra headers @@ -385,7 +392,13 @@ async def return_( self, inbound_check_deposit_id: str, *, - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"], + reason: Literal[ + "altered_or_fictitious", + "not_authorized", + "duplicate_presentment", + "endorsement_missing", + "endorsement_irregular", + ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -406,6 +419,7 @@ async def return_( - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. + - `endorsement_irregular` - The check was not endorsed by the payee. extra_headers: Send extra headers diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 6c7125bb0..c99386ce4 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -10,13 +10,20 @@ class DepositReturn(BaseModel): - reason: Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"] + reason: Literal[ + "altered_or_fictitious", + "not_authorized", + "duplicate_presentment", + "endorsement_missing", + "endorsement_irregular", + ] """The reason the deposit was returned. - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. + - `endorsement_irregular` - The check was not endorsed by the payee. """ returned_at: datetime diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py index 92a942591..0ca8f79f8 100644 --- a/src/increase/types/inbound_check_deposit_return_params.py +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -8,11 +8,20 @@ class InboundCheckDepositReturnParams(TypedDict, total=False): - reason: Required[Literal["altered_or_fictitious", "not_authorized", "duplicate_presentment", "endorsement_missing"]] + reason: Required[ + Literal[ + "altered_or_fictitious", + "not_authorized", + "duplicate_presentment", + "endorsement_missing", + "endorsement_irregular", + ] + ] """The reason to return the Inbound Check Deposit. - `altered_or_fictitious` - The check was altered or fictitious. - `not_authorized` - The check was not authorized. - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. + - `endorsement_irregular` - The check was not endorsed by the payee. """ From 04c60c6d0db6dc98edf360ac0caab42ce094eca3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:14:48 +0000 Subject: [PATCH 0141/1325] chore(internal): codegen related update (#582) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6af24e3d3..f2863752c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.89.0" + ".": "0.90.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 52f291db8..6accf1677 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.89.0" +version = "0.90.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3fc86d747..4517ea808 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.89.0" # x-release-please-version +__version__ = "0.90.0" # x-release-please-version From 73f0242d4bc8716fc6a4e7d7bff05127bcb7b9a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:17:19 +0000 Subject: [PATCH 0142/1325] chore(internal): use different 32bit detection method (#583) --- src/increase/_base_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 759e5407b..8ba5216ad 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1,5 +1,6 @@ from __future__ import annotations +import sys import json import time import uuid @@ -1982,7 +1983,6 @@ def get_python_version() -> str: def get_architecture() -> Arch: try: - python_bitness, _ = platform.architecture() machine = platform.machine().lower() except Exception: return "unknown" @@ -1998,7 +1998,7 @@ def get_architecture() -> Arch: return "x64" # TODO: untested - if python_bitness == "32bit": + if sys.maxsize <= 2**32: return "x32" if machine: From 053ef6aeebc84de765efb4c9e5564c5bc0307581 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:57:20 +0000 Subject: [PATCH 0143/1325] feat(api): OpenAPI spec update via Stainless API (#585) --- .stats.yml | 2 +- src/increase/types/declined_transaction.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 83f53a68a..50c158422 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7f6038f314008b50ad9b18054dd60f9ce5414ddd771c847f08f3ad637b0d8faa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-84216cec39c40ef0d59642c0a7581ca844cb2458e922215666eee01dcb619d99.yml diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 33759ad30..e86e8c8d6 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -506,6 +506,7 @@ class SourceCheckDecline(BaseModel): "ach_route_canceled", "altered_or_fictitious", "breaches_limit", + "endorsement_irregular", "entity_not_active", "group_locked", "insufficient_funds", @@ -525,6 +526,7 @@ class SourceCheckDecline(BaseModel): - `ach_route_canceled` - The account number is canceled. - `altered_or_fictitious` - The deposited check was altered or fictitious. - `breaches_limit` - The transaction would cause a limit to be exceeded. + - `endorsement_irregular` - The check was not endorsed by the payee. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. From 8c269e1ac6fb589bf668c9c632641183bd94001e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Aug 2024 20:58:21 +0000 Subject: [PATCH 0144/1325] chore(internal): version bump (#586) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f2863752c..29c535cb2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.90.0" + ".": "0.91.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6accf1677..68b941a62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.90.0" +version = "0.91.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4517ea808..4519c4f4f 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.90.0" # x-release-please-version +__version__ = "0.91.0" # x-release-please-version From af5da4708f50fef5e23b1a9f69e66c1787ab6055 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 02:59:49 +0000 Subject: [PATCH 0145/1325] feat(api): OpenAPI spec update via Stainless API (#587) --- .stats.yml | 2 +- src/increase/resources/ach_transfers.py | 12 ------------ src/increase/types/ach_transfer_create_params.py | 6 ------ tests/api_resources/test_ach_transfers.py | 2 -- 4 files changed, 1 insertion(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 50c158422..0292e0710 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-84216cec39c40ef0d59642c0a7581ca844cb2458e922215666eee01dcb619d99.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77b07a366299f951ac2f9ee3c857bb0d41a43e00ac9cfa4f7adaa2726ebe66a3.yml diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 6df03a4fd..d073fbfe1 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing import Union -from datetime import date from typing_extensions import Literal import httpx @@ -51,7 +49,6 @@ def create( company_entry_description: str | NotGiven = NOT_GIVEN, company_name: str | NotGiven = NOT_GIVEN, destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - effective_date: Union[str, date] | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, @@ -115,9 +112,6 @@ def create( - `individual` - The External Account is owned by an individual. - `unknown` - It's unknown what kind of entity owns the External Account. - effective_date: The transfer effective date in - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number`, `routing_number`, and `funding` must be absent. @@ -172,7 +166,6 @@ def create( "company_entry_description": company_entry_description, "company_name": company_name, "destination_account_holder": destination_account_holder, - "effective_date": effective_date, "external_account_id": external_account_id, "funding": funding, "individual_id": individual_id, @@ -401,7 +394,6 @@ async def create( company_entry_description: str | NotGiven = NOT_GIVEN, company_name: str | NotGiven = NOT_GIVEN, destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - effective_date: Union[str, date] | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, @@ -465,9 +457,6 @@ async def create( - `individual` - The External Account is owned by an individual. - `unknown` - It's unknown what kind of entity owns the External Account. - effective_date: The transfer effective date in - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number`, `routing_number`, and `funding` must be absent. @@ -522,7 +511,6 @@ async def create( "company_entry_description": company_entry_description, "company_name": company_name, "destination_account_holder": destination_account_holder, - "effective_date": effective_date, "external_account_id": external_account_id, "funding": funding, "individual_id": individual_id, diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index d8da14766..62dcee6fd 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -85,12 +85,6 @@ class ACHTransferCreateParams(TypedDict, total=False): - `unknown` - It's unknown what kind of entity owns the External Account. """ - effective_date: Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")] - """ - The transfer effective date in - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - """ - external_account_id: str """The ID of an External Account to initiate a transfer to. diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 1012385b3..6503a7429 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -66,7 +66,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: company_entry_description="x", company_name="x", destination_account_holder="business", - effective_date=parse_date("2019-12-27"), external_account_id="external_account_id", funding="checking", individual_id="x", @@ -316,7 +315,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) company_entry_description="x", company_name="x", destination_account_holder="business", - effective_date=parse_date("2019-12-27"), external_account_id="external_account_id", funding="checking", individual_id="x", From e30e5a045af0fbc39e7785da5f9ba13c7a154d73 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 03:00:42 +0000 Subject: [PATCH 0146/1325] chore(internal): codegen related update (#589) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 29c535cb2..0114ce378 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.91.0" + ".": "0.92.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 68b941a62..bbd6071d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.91.0" +version = "0.92.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4519c4f4f..51f70d90f 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.91.0" # x-release-please-version +__version__ = "0.92.0" # x-release-please-version From 074fa36df0b7f55956c372759c028e6e8d2d27f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:08:06 +0000 Subject: [PATCH 0147/1325] feat(api): OpenAPI spec update via Stainless API (#590) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 58 ++++++++++++++++++++++++++++++ src/increase/types/transaction.py | 58 ++++++++++++++++++++++++++++++ 3 files changed, 117 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0292e0710..57cc71997 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77b07a366299f951ac2f9ee3c857bb0d41a43e00ac9cfa4f7adaa2726ebe66a3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ec38f7f27a2e8a4552fad6a5cd3df1d75046e6f9a0932a16d4ceba66ecf1751f.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 3792a88ab..42dd2c6cd 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -29,6 +29,7 @@ "ElementCardIncrement", "ElementCardIncrementNetworkIdentifiers", "ElementCardRefund", + "ElementCardRefundInterchange", "ElementCardRefundNetworkIdentifiers", "ElementCardRefundPurchaseDetails", "ElementCardRefundPurchaseDetailsCarRental", @@ -40,6 +41,7 @@ "ElementCardReversal", "ElementCardReversalNetworkIdentifiers", "ElementCardSettlement", + "ElementCardSettlementInterchange", "ElementCardSettlementNetworkIdentifiers", "ElementCardSettlementPurchaseDetails", "ElementCardSettlementPurchaseDetailsCarRental", @@ -959,6 +961,31 @@ class ElementCardIncrement(BaseModel): """ +class ElementCardRefundInterchange(BaseModel): + amount: str + """The interchange amount given as a string containing a decimal number. + + The amount is a positive number if it is credited to Increase (e.g., + settlements) and a negative number if it is debited (e.g., refunds). + """ + + code: Optional[str] = None + """The card network specific interchange code.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + reimbursement. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class ElementCardRefundNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -1409,6 +1436,9 @@ class ElementCardRefund(BaseModel): - `USD` - US Dollar (USD) """ + interchange: Optional[ElementCardRefundInterchange] = None + """Interchange assessed as a part of this transaciton.""" + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card @@ -1530,6 +1560,31 @@ class ElementCardReversal(BaseModel): """ +class ElementCardSettlementInterchange(BaseModel): + amount: str + """The interchange amount given as a string containing a decimal number. + + The amount is a positive number if it is credited to Increase (e.g., + settlements) and a negative number if it is debited (e.g., refunds). + """ + + code: Optional[str] = None + """The card network specific interchange code.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + reimbursement. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class ElementCardSettlementNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -1986,6 +2041,9 @@ class ElementCardSettlement(BaseModel): - `USD` - US Dollar (USD) """ + interchange: Optional[ElementCardSettlementInterchange] = None + """Interchange assessed as a part of this transaciton.""" + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 08c7c75e1..f7c6585cb 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -16,6 +16,7 @@ "SourceCardDisputeAcceptance", "SourceCardDisputeLoss", "SourceCardRefund", + "SourceCardRefundInterchange", "SourceCardRefundNetworkIdentifiers", "SourceCardRefundPurchaseDetails", "SourceCardRefundPurchaseDetailsCarRental", @@ -26,6 +27,7 @@ "SourceCardRefundPurchaseDetailsTravelTripLeg", "SourceCardRevenuePayment", "SourceCardSettlement", + "SourceCardSettlementInterchange", "SourceCardSettlementNetworkIdentifiers", "SourceCardSettlementPurchaseDetails", "SourceCardSettlementPurchaseDetailsCarRental", @@ -403,6 +405,31 @@ class SourceCardDisputeLoss(BaseModel): """ +class SourceCardRefundInterchange(BaseModel): + amount: str + """The interchange amount given as a string containing a decimal number. + + The amount is a positive number if it is credited to Increase (e.g., + settlements) and a negative number if it is debited (e.g., refunds). + """ + + code: Optional[str] = None + """The card network specific interchange code.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + reimbursement. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class SourceCardRefundNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -853,6 +880,9 @@ class SourceCardRefund(BaseModel): - `USD` - US Dollar (USD) """ + interchange: Optional[SourceCardRefundInterchange] = None + """Interchange assessed as a part of this transaciton.""" + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card @@ -932,6 +962,31 @@ class SourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class SourceCardSettlementInterchange(BaseModel): + amount: str + """The interchange amount given as a string containing a decimal number. + + The amount is a positive number if it is credited to Increase (e.g., + settlements) and a negative number if it is debited (e.g., refunds). + """ + + code: Optional[str] = None + """The card network specific interchange code.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange + reimbursement. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class SourceCardSettlementNetworkIdentifiers(BaseModel): acquirer_business_id: str """ @@ -1388,6 +1443,9 @@ class SourceCardSettlement(BaseModel): - `USD` - US Dollar (USD) """ + interchange: Optional[SourceCardSettlementInterchange] = None + """Interchange assessed as a part of this transaciton.""" + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card From c221cead0204d1dfcf24835a24b3638881bd2dcd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 17:09:25 +0000 Subject: [PATCH 0148/1325] chore(internal): codegen related update (#592) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0114ce378..c486f6de6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.92.0" + ".": "0.93.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bbd6071d8..58f6793a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.92.0" +version = "0.93.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 51f70d90f..66d3a2509 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.92.0" # x-release-please-version +__version__ = "0.93.0" # x-release-please-version From dc067278978c466dffdd44c8e82c303f18cc75d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:33:48 +0000 Subject: [PATCH 0149/1325] feat(api): OpenAPI spec update via Stainless API (#593) --- .devcontainer/Dockerfile | 0 .devcontainer/devcontainer.json | 0 .github/workflows/ci.yml | 0 .github/workflows/publish-pypi.yml | 0 .github/workflows/release-doctor.yml | 0 .gitignore | 0 .python-version | 0 .release-please-manifest.json | 0 .stats.yml | 2 +- Brewfile | 0 CHANGELOG.md | 0 CONTRIBUTING.md | 0 LICENSE | 0 README.md | 0 SECURITY.md | 0 api.md | 0 bin/check-release-environment | 0 bin/publish-pypi | 0 examples/.keep | 0 examples/datetime_usage.py | 0 examples/status_errors.py | 0 mypy.ini | 0 noxfile.py | 0 pyproject.toml | 0 release-please-config.json | 0 requirements-dev.lock | 0 requirements.lock | 0 scripts/utils/ruffen-docs.py | 0 src/increase/__init__.py | 0 src/increase/_base_client.py | 0 src/increase/_client.py | 0 src/increase/_compat.py | 0 src/increase/_constants.py | 0 src/increase/_exceptions.py | 0 src/increase/_files.py | 0 src/increase/_models.py | 0 src/increase/_qs.py | 0 src/increase/_resource.py | 0 src/increase/_response.py | 0 src/increase/_streaming.py | 0 src/increase/_types.py | 0 src/increase/_utils/__init__.py | 0 src/increase/_utils/_logs.py | 0 src/increase/_utils/_proxy.py | 0 src/increase/_utils/_reflection.py | 0 src/increase/_utils/_streams.py | 0 src/increase/_utils/_sync.py | 0 src/increase/_utils/_transform.py | 0 src/increase/_utils/_typing.py | 0 src/increase/_utils/_utils.py | 0 src/increase/_version.py | 0 src/increase/lib/.keep | 0 src/increase/pagination.py | 0 src/increase/py.typed | 0 src/increase/resources/__init__.py | 0 src/increase/resources/account_numbers.py | 0 src/increase/resources/account_statements.py | 0 src/increase/resources/account_transfers.py | 0 src/increase/resources/accounts.py | 0 src/increase/resources/ach_prenotifications.py | 0 src/increase/resources/ach_transfers.py | 0 src/increase/resources/bookkeeping_accounts.py | 0 src/increase/resources/bookkeeping_entries.py | 0 src/increase/resources/bookkeeping_entry_sets.py | 0 src/increase/resources/card_disputes.py | 0 src/increase/resources/card_payments.py | 0 src/increase/resources/card_purchase_supplements.py | 0 src/increase/resources/cards.py | 0 src/increase/resources/check_deposits.py | 0 src/increase/resources/check_transfers.py | 0 src/increase/resources/declined_transactions.py | 0 src/increase/resources/digital_card_profiles.py | 0 src/increase/resources/digital_wallet_tokens.py | 0 src/increase/resources/documents.py | 0 src/increase/resources/entities.py | 0 src/increase/resources/event_subscriptions.py | 0 src/increase/resources/events.py | 0 src/increase/resources/exports.py | 0 src/increase/resources/external_accounts.py | 0 src/increase/resources/files.py | 0 src/increase/resources/groups.py | 0 src/increase/resources/inbound_ach_transfers.py | 0 src/increase/resources/inbound_check_deposits.py | 0 src/increase/resources/inbound_mail_items.py | 0 src/increase/resources/inbound_wire_drawdown_requests.py | 0 src/increase/resources/inbound_wire_transfers.py | 0 src/increase/resources/intrafi_account_enrollments.py | 0 src/increase/resources/intrafi_balances.py | 0 src/increase/resources/intrafi_exclusions.py | 0 src/increase/resources/lockboxes.py | 0 src/increase/resources/oauth_connections.py | 0 src/increase/resources/oauth_tokens.py | 0 src/increase/resources/pending_transactions.py | 0 src/increase/resources/physical_card_profiles.py | 0 src/increase/resources/physical_cards.py | 0 src/increase/resources/programs.py | 0 .../resources/proof_of_authorization_request_submissions.py | 0 src/increase/resources/proof_of_authorization_requests.py | 0 src/increase/resources/real_time_decisions.py | 0 .../resources/real_time_payments_request_for_payments.py | 0 src/increase/resources/real_time_payments_transfers.py | 0 src/increase/resources/routing_numbers.py | 0 src/increase/resources/simulations/__init__.py | 0 src/increase/resources/simulations/account_statements.py | 0 src/increase/resources/simulations/account_transfers.py | 0 src/increase/resources/simulations/ach_transfers.py | 0 .../resources/simulations/card_authorization_expirations.py | 0 src/increase/resources/simulations/card_authorizations.py | 0 src/increase/resources/simulations/card_disputes.py | 0 src/increase/resources/simulations/card_fuel_confirmations.py | 0 src/increase/resources/simulations/card_increments.py | 0 src/increase/resources/simulations/card_refunds.py | 0 src/increase/resources/simulations/card_reversals.py | 0 src/increase/resources/simulations/card_settlements.py | 0 src/increase/resources/simulations/check_deposits.py | 0 src/increase/resources/simulations/check_transfers.py | 0 .../resources/simulations/digital_wallet_token_requests.py | 0 src/increase/resources/simulations/documents.py | 0 src/increase/resources/simulations/inbound_ach_transfers.py | 0 src/increase/resources/simulations/inbound_check_deposits.py | 0 src/increase/resources/simulations/inbound_funds_holds.py | 0 .../simulations/inbound_real_time_payments_transfers.py | 0 .../resources/simulations/inbound_wire_drawdown_requests.py | 0 src/increase/resources/simulations/inbound_wire_transfers.py | 0 src/increase/resources/simulations/interest_payments.py | 0 src/increase/resources/simulations/physical_cards.py | 0 src/increase/resources/simulations/programs.py | 0 .../resources/simulations/real_time_payments_transfers.py | 0 src/increase/resources/simulations/simulations.py | 0 src/increase/resources/simulations/wire_transfers.py | 0 src/increase/resources/supplemental_documents.py | 0 src/increase/resources/transactions.py | 0 src/increase/resources/wire_drawdown_requests.py | 0 src/increase/resources/wire_transfers.py | 0 src/increase/types/__init__.py | 0 src/increase/types/account.py | 0 src/increase/types/account_balance_params.py | 0 src/increase/types/account_create_params.py | 0 src/increase/types/account_list_params.py | 0 src/increase/types/account_number.py | 0 src/increase/types/account_number_create_params.py | 0 src/increase/types/account_number_list_params.py | 0 src/increase/types/account_number_update_params.py | 0 src/increase/types/account_statement.py | 0 src/increase/types/account_statement_list_params.py | 0 src/increase/types/account_transfer.py | 0 src/increase/types/account_transfer_create_params.py | 0 src/increase/types/account_transfer_list_params.py | 0 src/increase/types/account_update_params.py | 0 src/increase/types/ach_prenotification.py | 0 src/increase/types/ach_prenotification_create_params.py | 0 src/increase/types/ach_prenotification_list_params.py | 0 src/increase/types/ach_transfer.py | 0 src/increase/types/ach_transfer_create_params.py | 0 src/increase/types/ach_transfer_list_params.py | 0 src/increase/types/balance_lookup.py | 0 src/increase/types/bookkeeping_account.py | 0 src/increase/types/bookkeeping_account_balance_params.py | 0 src/increase/types/bookkeeping_account_create_params.py | 0 src/increase/types/bookkeeping_account_list_params.py | 0 src/increase/types/bookkeeping_account_update_params.py | 0 src/increase/types/bookkeeping_balance_lookup.py | 0 src/increase/types/bookkeeping_entry.py | 0 src/increase/types/bookkeeping_entry_list_params.py | 0 src/increase/types/bookkeeping_entry_set.py | 0 src/increase/types/bookkeeping_entry_set_create_params.py | 0 src/increase/types/bookkeeping_entry_set_list_params.py | 0 src/increase/types/card.py | 0 src/increase/types/card_create_params.py | 0 src/increase/types/card_details.py | 0 src/increase/types/card_dispute.py | 0 src/increase/types/card_dispute_create_params.py | 0 src/increase/types/card_dispute_list_params.py | 0 src/increase/types/card_list_params.py | 0 src/increase/types/card_payment.py | 0 src/increase/types/card_payment_list_params.py | 0 src/increase/types/card_purchase_supplement.py | 0 src/increase/types/card_purchase_supplement_list_params.py | 0 src/increase/types/card_update_params.py | 0 src/increase/types/check_deposit.py | 0 src/increase/types/check_deposit_create_params.py | 0 src/increase/types/check_deposit_list_params.py | 0 src/increase/types/check_transfer.py | 0 src/increase/types/check_transfer_create_params.py | 0 src/increase/types/check_transfer_list_params.py | 0 src/increase/types/check_transfer_stop_payment_params.py | 0 src/increase/types/declined_transaction.py | 0 src/increase/types/declined_transaction_list_params.py | 0 src/increase/types/digital_card_profile.py | 0 src/increase/types/digital_card_profile_clone_params.py | 0 src/increase/types/digital_card_profile_create_params.py | 0 src/increase/types/digital_card_profile_list_params.py | 0 src/increase/types/digital_wallet_token.py | 0 src/increase/types/digital_wallet_token_list_params.py | 0 src/increase/types/document.py | 0 src/increase/types/document_list_params.py | 0 src/increase/types/entity.py | 0 src/increase/types/entity_archive_beneficial_owner_params.py | 0 src/increase/types/entity_confirm_params.py | 0 src/increase/types/entity_create_beneficial_owner_params.py | 0 src/increase/types/entity_create_params.py | 0 src/increase/types/entity_list_params.py | 0 src/increase/types/entity_supplemental_document.py | 0 src/increase/types/entity_update_address_params.py | 0 .../types/entity_update_beneficial_owner_address_params.py | 0 src/increase/types/entity_update_industry_code_params.py | 0 src/increase/types/event.py | 0 src/increase/types/event_list_params.py | 0 src/increase/types/event_subscription.py | 0 src/increase/types/event_subscription_create_params.py | 0 src/increase/types/event_subscription_list_params.py | 0 src/increase/types/event_subscription_update_params.py | 0 src/increase/types/export.py | 0 src/increase/types/export_create_params.py | 0 src/increase/types/export_list_params.py | 0 src/increase/types/external_account.py | 0 src/increase/types/external_account_create_params.py | 0 src/increase/types/external_account_list_params.py | 0 src/increase/types/external_account_update_params.py | 0 src/increase/types/file.py | 0 src/increase/types/file_create_params.py | 0 src/increase/types/file_list_params.py | 0 src/increase/types/group.py | 0 src/increase/types/inbound_ach_transfer.py | 0 ...inbound_ach_transfer_create_notification_of_change_params.py | 0 src/increase/types/inbound_ach_transfer_list_params.py | 0 .../types/inbound_ach_transfer_transfer_return_params.py | 0 src/increase/types/inbound_check_deposit.py | 0 src/increase/types/inbound_check_deposit_list_params.py | 0 src/increase/types/inbound_check_deposit_return_params.py | 0 src/increase/types/inbound_mail_item.py | 0 src/increase/types/inbound_mail_item_list_params.py | 0 src/increase/types/inbound_wire_drawdown_request.py | 0 src/increase/types/inbound_wire_drawdown_request_list_params.py | 0 src/increase/types/inbound_wire_transfer.py | 0 src/increase/types/inbound_wire_transfer_list_params.py | 0 src/increase/types/intrafi_account_enrollment.py | 0 src/increase/types/intrafi_account_enrollment_create_params.py | 0 src/increase/types/intrafi_account_enrollment_list_params.py | 0 src/increase/types/intrafi_balance.py | 0 src/increase/types/intrafi_exclusion.py | 0 src/increase/types/intrafi_exclusion_create_params.py | 0 src/increase/types/intrafi_exclusion_list_params.py | 0 src/increase/types/lockbox.py | 0 src/increase/types/lockbox_create_params.py | 0 src/increase/types/lockbox_list_params.py | 0 src/increase/types/lockbox_update_params.py | 0 src/increase/types/oauth_connection.py | 0 src/increase/types/oauth_connection_list_params.py | 0 src/increase/types/oauth_token.py | 0 src/increase/types/oauth_token_create_params.py | 0 src/increase/types/pending_transaction.py | 0 src/increase/types/pending_transaction_list_params.py | 0 src/increase/types/physical_card.py | 0 src/increase/types/physical_card_create_params.py | 0 src/increase/types/physical_card_list_params.py | 0 src/increase/types/physical_card_profile.py | 0 src/increase/types/physical_card_profile_clone_params.py | 0 src/increase/types/physical_card_profile_create_params.py | 0 src/increase/types/physical_card_profile_list_params.py | 0 src/increase/types/physical_card_update_params.py | 0 src/increase/types/program.py | 0 src/increase/types/program_list_params.py | 0 src/increase/types/proof_of_authorization_request.py | 0 .../types/proof_of_authorization_request_list_params.py | 0 src/increase/types/proof_of_authorization_request_submission.py | 0 .../proof_of_authorization_request_submission_create_params.py | 0 .../proof_of_authorization_request_submission_list_params.py | 0 src/increase/types/real_time_decision.py | 0 src/increase/types/real_time_decision_action_params.py | 0 src/increase/types/real_time_payments_request_for_payment.py | 0 .../real_time_payments_request_for_payment_create_params.py | 0 .../types/real_time_payments_request_for_payment_list_params.py | 0 src/increase/types/real_time_payments_transfer.py | 0 src/increase/types/real_time_payments_transfer_create_params.py | 0 src/increase/types/real_time_payments_transfer_list_params.py | 0 src/increase/types/routing_number_list_params.py | 0 src/increase/types/routing_number_list_response.py | 0 src/increase/types/simulations/__init__.py | 0 .../types/simulations/account_statement_create_params.py | 0 .../ach_transfer_create_notification_of_change_params.py | 0 src/increase/types/simulations/ach_transfer_return_params.py | 0 .../types/simulations/card_authorization_create_params.py | 0 .../types/simulations/card_authorization_create_response.py | 0 .../simulations/card_authorization_expiration_create_params.py | 0 src/increase/types/simulations/card_dispute_action_params.py | 0 .../types/simulations/card_fuel_confirmation_create_params.py | 0 src/increase/types/simulations/card_increment_create_params.py | 0 src/increase/types/simulations/card_refund_create_params.py | 0 src/increase/types/simulations/card_reversal_create_params.py | 0 src/increase/types/simulations/card_settlement_create_params.py | 0 .../simulations/digital_wallet_token_request_create_params.py | 0 .../simulations/digital_wallet_token_request_create_response.py | 0 src/increase/types/simulations/document_create_params.py | 0 .../types/simulations/inbound_ach_transfer_create_params.py | 0 .../types/simulations/inbound_check_deposit_create_params.py | 0 .../types/simulations/inbound_funds_hold_release_response.py | 0 .../inbound_real_time_payments_transfer_create_params.py | 0 .../inbound_real_time_payments_transfer_create_response.py | 0 .../simulations/inbound_wire_drawdown_request_create_params.py | 0 .../types/simulations/inbound_wire_transfer_create_params.py | 0 .../types/simulations/interest_payment_create_params.py | 0 .../types/simulations/physical_card_advance_shipment_params.py | 0 src/increase/types/simulations/program_create_params.py | 0 .../simulations/real_time_payments_transfer_complete_params.py | 0 src/increase/types/supplemental_document_create_params.py | 0 src/increase/types/supplemental_document_list_params.py | 0 src/increase/types/transaction.py | 0 src/increase/types/transaction_list_params.py | 0 src/increase/types/wire_drawdown_request.py | 0 src/increase/types/wire_drawdown_request_create_params.py | 0 src/increase/types/wire_drawdown_request_list_params.py | 0 src/increase/types/wire_transfer.py | 0 src/increase/types/wire_transfer_create_params.py | 0 src/increase/types/wire_transfer_list_params.py | 0 tests/__init__.py | 0 tests/api_resources/__init__.py | 0 tests/api_resources/simulations/__init__.py | 0 tests/api_resources/simulations/test_account_statements.py | 0 tests/api_resources/simulations/test_account_transfers.py | 0 tests/api_resources/simulations/test_ach_transfers.py | 0 .../simulations/test_card_authorization_expirations.py | 0 tests/api_resources/simulations/test_card_authorizations.py | 0 tests/api_resources/simulations/test_card_disputes.py | 0 tests/api_resources/simulations/test_card_fuel_confirmations.py | 0 tests/api_resources/simulations/test_card_increments.py | 0 tests/api_resources/simulations/test_card_refunds.py | 0 tests/api_resources/simulations/test_card_reversals.py | 0 tests/api_resources/simulations/test_card_settlements.py | 0 tests/api_resources/simulations/test_check_deposits.py | 0 tests/api_resources/simulations/test_check_transfers.py | 0 .../simulations/test_digital_wallet_token_requests.py | 0 tests/api_resources/simulations/test_documents.py | 0 tests/api_resources/simulations/test_inbound_ach_transfers.py | 0 tests/api_resources/simulations/test_inbound_check_deposits.py | 0 tests/api_resources/simulations/test_inbound_funds_holds.py | 0 .../simulations/test_inbound_real_time_payments_transfers.py | 0 .../simulations/test_inbound_wire_drawdown_requests.py | 0 tests/api_resources/simulations/test_inbound_wire_transfers.py | 0 tests/api_resources/simulations/test_interest_payments.py | 0 tests/api_resources/simulations/test_physical_cards.py | 0 tests/api_resources/simulations/test_programs.py | 0 .../simulations/test_real_time_payments_transfers.py | 0 tests/api_resources/simulations/test_wire_transfers.py | 0 tests/api_resources/test_account_numbers.py | 0 tests/api_resources/test_account_statements.py | 0 tests/api_resources/test_account_transfers.py | 0 tests/api_resources/test_accounts.py | 0 tests/api_resources/test_ach_prenotifications.py | 0 tests/api_resources/test_ach_transfers.py | 0 tests/api_resources/test_bookkeeping_accounts.py | 0 tests/api_resources/test_bookkeeping_entries.py | 0 tests/api_resources/test_bookkeeping_entry_sets.py | 0 tests/api_resources/test_card_disputes.py | 0 tests/api_resources/test_card_payments.py | 0 tests/api_resources/test_card_purchase_supplements.py | 0 tests/api_resources/test_cards.py | 0 tests/api_resources/test_check_deposits.py | 0 tests/api_resources/test_check_transfers.py | 0 tests/api_resources/test_declined_transactions.py | 0 tests/api_resources/test_digital_card_profiles.py | 0 tests/api_resources/test_digital_wallet_tokens.py | 0 tests/api_resources/test_documents.py | 0 tests/api_resources/test_entities.py | 0 tests/api_resources/test_event_subscriptions.py | 0 tests/api_resources/test_events.py | 0 tests/api_resources/test_exports.py | 0 tests/api_resources/test_external_accounts.py | 0 tests/api_resources/test_files.py | 0 tests/api_resources/test_groups.py | 0 tests/api_resources/test_inbound_ach_transfers.py | 0 tests/api_resources/test_inbound_check_deposits.py | 0 tests/api_resources/test_inbound_mail_items.py | 0 tests/api_resources/test_inbound_wire_drawdown_requests.py | 0 tests/api_resources/test_inbound_wire_transfers.py | 0 tests/api_resources/test_intrafi_account_enrollments.py | 0 tests/api_resources/test_intrafi_balances.py | 0 tests/api_resources/test_intrafi_exclusions.py | 0 tests/api_resources/test_lockboxes.py | 0 tests/api_resources/test_oauth_connections.py | 0 tests/api_resources/test_oauth_tokens.py | 0 tests/api_resources/test_pending_transactions.py | 0 tests/api_resources/test_physical_card_profiles.py | 0 tests/api_resources/test_physical_cards.py | 0 tests/api_resources/test_programs.py | 0 .../test_proof_of_authorization_request_submissions.py | 0 tests/api_resources/test_proof_of_authorization_requests.py | 0 tests/api_resources/test_real_time_decisions.py | 0 .../test_real_time_payments_request_for_payments.py | 0 tests/api_resources/test_real_time_payments_transfers.py | 0 tests/api_resources/test_routing_numbers.py | 0 tests/api_resources/test_supplemental_documents.py | 0 tests/api_resources/test_transactions.py | 0 tests/api_resources/test_wire_drawdown_requests.py | 0 tests/api_resources/test_wire_transfers.py | 0 tests/conftest.py | 0 tests/sample_file.txt | 0 tests/test_client.py | 0 tests/test_deepcopy.py | 0 tests/test_extract_files.py | 0 tests/test_files.py | 0 tests/test_models.py | 0 tests/test_qs.py | 0 tests/test_required_args.py | 0 tests/test_response.py | 0 tests/test_streaming.py | 0 tests/test_transform.py | 0 tests/test_utils/test_proxy.py | 0 tests/test_utils/test_typing.py | 0 tests/utils.py | 0 410 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 .devcontainer/Dockerfile mode change 100644 => 100755 .devcontainer/devcontainer.json mode change 100644 => 100755 .github/workflows/ci.yml mode change 100644 => 100755 .github/workflows/publish-pypi.yml mode change 100644 => 100755 .github/workflows/release-doctor.yml mode change 100644 => 100755 .gitignore mode change 100644 => 100755 .python-version mode change 100644 => 100755 .release-please-manifest.json mode change 100644 => 100755 .stats.yml mode change 100644 => 100755 Brewfile mode change 100644 => 100755 CHANGELOG.md mode change 100644 => 100755 CONTRIBUTING.md mode change 100644 => 100755 LICENSE mode change 100644 => 100755 README.md mode change 100644 => 100755 SECURITY.md mode change 100644 => 100755 api.md mode change 100644 => 100755 bin/check-release-environment mode change 100644 => 100755 bin/publish-pypi mode change 100644 => 100755 examples/.keep mode change 100644 => 100755 examples/datetime_usage.py mode change 100644 => 100755 examples/status_errors.py mode change 100644 => 100755 mypy.ini mode change 100644 => 100755 noxfile.py mode change 100644 => 100755 pyproject.toml mode change 100644 => 100755 release-please-config.json mode change 100644 => 100755 requirements-dev.lock mode change 100644 => 100755 requirements.lock mode change 100644 => 100755 scripts/utils/ruffen-docs.py mode change 100644 => 100755 src/increase/__init__.py mode change 100644 => 100755 src/increase/_base_client.py mode change 100644 => 100755 src/increase/_client.py mode change 100644 => 100755 src/increase/_compat.py mode change 100644 => 100755 src/increase/_constants.py mode change 100644 => 100755 src/increase/_exceptions.py mode change 100644 => 100755 src/increase/_files.py mode change 100644 => 100755 src/increase/_models.py mode change 100644 => 100755 src/increase/_qs.py mode change 100644 => 100755 src/increase/_resource.py mode change 100644 => 100755 src/increase/_response.py mode change 100644 => 100755 src/increase/_streaming.py mode change 100644 => 100755 src/increase/_types.py mode change 100644 => 100755 src/increase/_utils/__init__.py mode change 100644 => 100755 src/increase/_utils/_logs.py mode change 100644 => 100755 src/increase/_utils/_proxy.py mode change 100644 => 100755 src/increase/_utils/_reflection.py mode change 100644 => 100755 src/increase/_utils/_streams.py mode change 100644 => 100755 src/increase/_utils/_sync.py mode change 100644 => 100755 src/increase/_utils/_transform.py mode change 100644 => 100755 src/increase/_utils/_typing.py mode change 100644 => 100755 src/increase/_utils/_utils.py mode change 100644 => 100755 src/increase/_version.py mode change 100644 => 100755 src/increase/lib/.keep mode change 100644 => 100755 src/increase/pagination.py mode change 100644 => 100755 src/increase/py.typed mode change 100644 => 100755 src/increase/resources/__init__.py mode change 100644 => 100755 src/increase/resources/account_numbers.py mode change 100644 => 100755 src/increase/resources/account_statements.py mode change 100644 => 100755 src/increase/resources/account_transfers.py mode change 100644 => 100755 src/increase/resources/accounts.py mode change 100644 => 100755 src/increase/resources/ach_prenotifications.py mode change 100644 => 100755 src/increase/resources/ach_transfers.py mode change 100644 => 100755 src/increase/resources/bookkeeping_accounts.py mode change 100644 => 100755 src/increase/resources/bookkeeping_entries.py mode change 100644 => 100755 src/increase/resources/bookkeeping_entry_sets.py mode change 100644 => 100755 src/increase/resources/card_disputes.py mode change 100644 => 100755 src/increase/resources/card_payments.py mode change 100644 => 100755 src/increase/resources/card_purchase_supplements.py mode change 100644 => 100755 src/increase/resources/cards.py mode change 100644 => 100755 src/increase/resources/check_deposits.py mode change 100644 => 100755 src/increase/resources/check_transfers.py mode change 100644 => 100755 src/increase/resources/declined_transactions.py mode change 100644 => 100755 src/increase/resources/digital_card_profiles.py mode change 100644 => 100755 src/increase/resources/digital_wallet_tokens.py mode change 100644 => 100755 src/increase/resources/documents.py mode change 100644 => 100755 src/increase/resources/entities.py mode change 100644 => 100755 src/increase/resources/event_subscriptions.py mode change 100644 => 100755 src/increase/resources/events.py mode change 100644 => 100755 src/increase/resources/exports.py mode change 100644 => 100755 src/increase/resources/external_accounts.py mode change 100644 => 100755 src/increase/resources/files.py mode change 100644 => 100755 src/increase/resources/groups.py mode change 100644 => 100755 src/increase/resources/inbound_ach_transfers.py mode change 100644 => 100755 src/increase/resources/inbound_check_deposits.py mode change 100644 => 100755 src/increase/resources/inbound_mail_items.py mode change 100644 => 100755 src/increase/resources/inbound_wire_drawdown_requests.py mode change 100644 => 100755 src/increase/resources/inbound_wire_transfers.py mode change 100644 => 100755 src/increase/resources/intrafi_account_enrollments.py mode change 100644 => 100755 src/increase/resources/intrafi_balances.py mode change 100644 => 100755 src/increase/resources/intrafi_exclusions.py mode change 100644 => 100755 src/increase/resources/lockboxes.py mode change 100644 => 100755 src/increase/resources/oauth_connections.py mode change 100644 => 100755 src/increase/resources/oauth_tokens.py mode change 100644 => 100755 src/increase/resources/pending_transactions.py mode change 100644 => 100755 src/increase/resources/physical_card_profiles.py mode change 100644 => 100755 src/increase/resources/physical_cards.py mode change 100644 => 100755 src/increase/resources/programs.py mode change 100644 => 100755 src/increase/resources/proof_of_authorization_request_submissions.py mode change 100644 => 100755 src/increase/resources/proof_of_authorization_requests.py mode change 100644 => 100755 src/increase/resources/real_time_decisions.py mode change 100644 => 100755 src/increase/resources/real_time_payments_request_for_payments.py mode change 100644 => 100755 src/increase/resources/real_time_payments_transfers.py mode change 100644 => 100755 src/increase/resources/routing_numbers.py mode change 100644 => 100755 src/increase/resources/simulations/__init__.py mode change 100644 => 100755 src/increase/resources/simulations/account_statements.py mode change 100644 => 100755 src/increase/resources/simulations/account_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/ach_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/card_authorization_expirations.py mode change 100644 => 100755 src/increase/resources/simulations/card_authorizations.py mode change 100644 => 100755 src/increase/resources/simulations/card_disputes.py mode change 100644 => 100755 src/increase/resources/simulations/card_fuel_confirmations.py mode change 100644 => 100755 src/increase/resources/simulations/card_increments.py mode change 100644 => 100755 src/increase/resources/simulations/card_refunds.py mode change 100644 => 100755 src/increase/resources/simulations/card_reversals.py mode change 100644 => 100755 src/increase/resources/simulations/card_settlements.py mode change 100644 => 100755 src/increase/resources/simulations/check_deposits.py mode change 100644 => 100755 src/increase/resources/simulations/check_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/digital_wallet_token_requests.py mode change 100644 => 100755 src/increase/resources/simulations/documents.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_ach_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_check_deposits.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_funds_holds.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_real_time_payments_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_wire_drawdown_requests.py mode change 100644 => 100755 src/increase/resources/simulations/inbound_wire_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/interest_payments.py mode change 100644 => 100755 src/increase/resources/simulations/physical_cards.py mode change 100644 => 100755 src/increase/resources/simulations/programs.py mode change 100644 => 100755 src/increase/resources/simulations/real_time_payments_transfers.py mode change 100644 => 100755 src/increase/resources/simulations/simulations.py mode change 100644 => 100755 src/increase/resources/simulations/wire_transfers.py mode change 100644 => 100755 src/increase/resources/supplemental_documents.py mode change 100644 => 100755 src/increase/resources/transactions.py mode change 100644 => 100755 src/increase/resources/wire_drawdown_requests.py mode change 100644 => 100755 src/increase/resources/wire_transfers.py mode change 100644 => 100755 src/increase/types/__init__.py mode change 100644 => 100755 src/increase/types/account.py mode change 100644 => 100755 src/increase/types/account_balance_params.py mode change 100644 => 100755 src/increase/types/account_create_params.py mode change 100644 => 100755 src/increase/types/account_list_params.py mode change 100644 => 100755 src/increase/types/account_number.py mode change 100644 => 100755 src/increase/types/account_number_create_params.py mode change 100644 => 100755 src/increase/types/account_number_list_params.py mode change 100644 => 100755 src/increase/types/account_number_update_params.py mode change 100644 => 100755 src/increase/types/account_statement.py mode change 100644 => 100755 src/increase/types/account_statement_list_params.py mode change 100644 => 100755 src/increase/types/account_transfer.py mode change 100644 => 100755 src/increase/types/account_transfer_create_params.py mode change 100644 => 100755 src/increase/types/account_transfer_list_params.py mode change 100644 => 100755 src/increase/types/account_update_params.py mode change 100644 => 100755 src/increase/types/ach_prenotification.py mode change 100644 => 100755 src/increase/types/ach_prenotification_create_params.py mode change 100644 => 100755 src/increase/types/ach_prenotification_list_params.py mode change 100644 => 100755 src/increase/types/ach_transfer.py mode change 100644 => 100755 src/increase/types/ach_transfer_create_params.py mode change 100644 => 100755 src/increase/types/ach_transfer_list_params.py mode change 100644 => 100755 src/increase/types/balance_lookup.py mode change 100644 => 100755 src/increase/types/bookkeeping_account.py mode change 100644 => 100755 src/increase/types/bookkeeping_account_balance_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_account_create_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_account_list_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_account_update_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_balance_lookup.py mode change 100644 => 100755 src/increase/types/bookkeeping_entry.py mode change 100644 => 100755 src/increase/types/bookkeeping_entry_list_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_entry_set.py mode change 100644 => 100755 src/increase/types/bookkeeping_entry_set_create_params.py mode change 100644 => 100755 src/increase/types/bookkeeping_entry_set_list_params.py mode change 100644 => 100755 src/increase/types/card.py mode change 100644 => 100755 src/increase/types/card_create_params.py mode change 100644 => 100755 src/increase/types/card_details.py mode change 100644 => 100755 src/increase/types/card_dispute.py mode change 100644 => 100755 src/increase/types/card_dispute_create_params.py mode change 100644 => 100755 src/increase/types/card_dispute_list_params.py mode change 100644 => 100755 src/increase/types/card_list_params.py mode change 100644 => 100755 src/increase/types/card_payment.py mode change 100644 => 100755 src/increase/types/card_payment_list_params.py mode change 100644 => 100755 src/increase/types/card_purchase_supplement.py mode change 100644 => 100755 src/increase/types/card_purchase_supplement_list_params.py mode change 100644 => 100755 src/increase/types/card_update_params.py mode change 100644 => 100755 src/increase/types/check_deposit.py mode change 100644 => 100755 src/increase/types/check_deposit_create_params.py mode change 100644 => 100755 src/increase/types/check_deposit_list_params.py mode change 100644 => 100755 src/increase/types/check_transfer.py mode change 100644 => 100755 src/increase/types/check_transfer_create_params.py mode change 100644 => 100755 src/increase/types/check_transfer_list_params.py mode change 100644 => 100755 src/increase/types/check_transfer_stop_payment_params.py mode change 100644 => 100755 src/increase/types/declined_transaction.py mode change 100644 => 100755 src/increase/types/declined_transaction_list_params.py mode change 100644 => 100755 src/increase/types/digital_card_profile.py mode change 100644 => 100755 src/increase/types/digital_card_profile_clone_params.py mode change 100644 => 100755 src/increase/types/digital_card_profile_create_params.py mode change 100644 => 100755 src/increase/types/digital_card_profile_list_params.py mode change 100644 => 100755 src/increase/types/digital_wallet_token.py mode change 100644 => 100755 src/increase/types/digital_wallet_token_list_params.py mode change 100644 => 100755 src/increase/types/document.py mode change 100644 => 100755 src/increase/types/document_list_params.py mode change 100644 => 100755 src/increase/types/entity.py mode change 100644 => 100755 src/increase/types/entity_archive_beneficial_owner_params.py mode change 100644 => 100755 src/increase/types/entity_confirm_params.py mode change 100644 => 100755 src/increase/types/entity_create_beneficial_owner_params.py mode change 100644 => 100755 src/increase/types/entity_create_params.py mode change 100644 => 100755 src/increase/types/entity_list_params.py mode change 100644 => 100755 src/increase/types/entity_supplemental_document.py mode change 100644 => 100755 src/increase/types/entity_update_address_params.py mode change 100644 => 100755 src/increase/types/entity_update_beneficial_owner_address_params.py mode change 100644 => 100755 src/increase/types/entity_update_industry_code_params.py mode change 100644 => 100755 src/increase/types/event.py mode change 100644 => 100755 src/increase/types/event_list_params.py mode change 100644 => 100755 src/increase/types/event_subscription.py mode change 100644 => 100755 src/increase/types/event_subscription_create_params.py mode change 100644 => 100755 src/increase/types/event_subscription_list_params.py mode change 100644 => 100755 src/increase/types/event_subscription_update_params.py mode change 100644 => 100755 src/increase/types/export.py mode change 100644 => 100755 src/increase/types/export_create_params.py mode change 100644 => 100755 src/increase/types/export_list_params.py mode change 100644 => 100755 src/increase/types/external_account.py mode change 100644 => 100755 src/increase/types/external_account_create_params.py mode change 100644 => 100755 src/increase/types/external_account_list_params.py mode change 100644 => 100755 src/increase/types/external_account_update_params.py mode change 100644 => 100755 src/increase/types/file.py mode change 100644 => 100755 src/increase/types/file_create_params.py mode change 100644 => 100755 src/increase/types/file_list_params.py mode change 100644 => 100755 src/increase/types/group.py mode change 100644 => 100755 src/increase/types/inbound_ach_transfer.py mode change 100644 => 100755 src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py mode change 100644 => 100755 src/increase/types/inbound_ach_transfer_list_params.py mode change 100644 => 100755 src/increase/types/inbound_ach_transfer_transfer_return_params.py mode change 100644 => 100755 src/increase/types/inbound_check_deposit.py mode change 100644 => 100755 src/increase/types/inbound_check_deposit_list_params.py mode change 100644 => 100755 src/increase/types/inbound_check_deposit_return_params.py mode change 100644 => 100755 src/increase/types/inbound_mail_item.py mode change 100644 => 100755 src/increase/types/inbound_mail_item_list_params.py mode change 100644 => 100755 src/increase/types/inbound_wire_drawdown_request.py mode change 100644 => 100755 src/increase/types/inbound_wire_drawdown_request_list_params.py mode change 100644 => 100755 src/increase/types/inbound_wire_transfer.py mode change 100644 => 100755 src/increase/types/inbound_wire_transfer_list_params.py mode change 100644 => 100755 src/increase/types/intrafi_account_enrollment.py mode change 100644 => 100755 src/increase/types/intrafi_account_enrollment_create_params.py mode change 100644 => 100755 src/increase/types/intrafi_account_enrollment_list_params.py mode change 100644 => 100755 src/increase/types/intrafi_balance.py mode change 100644 => 100755 src/increase/types/intrafi_exclusion.py mode change 100644 => 100755 src/increase/types/intrafi_exclusion_create_params.py mode change 100644 => 100755 src/increase/types/intrafi_exclusion_list_params.py mode change 100644 => 100755 src/increase/types/lockbox.py mode change 100644 => 100755 src/increase/types/lockbox_create_params.py mode change 100644 => 100755 src/increase/types/lockbox_list_params.py mode change 100644 => 100755 src/increase/types/lockbox_update_params.py mode change 100644 => 100755 src/increase/types/oauth_connection.py mode change 100644 => 100755 src/increase/types/oauth_connection_list_params.py mode change 100644 => 100755 src/increase/types/oauth_token.py mode change 100644 => 100755 src/increase/types/oauth_token_create_params.py mode change 100644 => 100755 src/increase/types/pending_transaction.py mode change 100644 => 100755 src/increase/types/pending_transaction_list_params.py mode change 100644 => 100755 src/increase/types/physical_card.py mode change 100644 => 100755 src/increase/types/physical_card_create_params.py mode change 100644 => 100755 src/increase/types/physical_card_list_params.py mode change 100644 => 100755 src/increase/types/physical_card_profile.py mode change 100644 => 100755 src/increase/types/physical_card_profile_clone_params.py mode change 100644 => 100755 src/increase/types/physical_card_profile_create_params.py mode change 100644 => 100755 src/increase/types/physical_card_profile_list_params.py mode change 100644 => 100755 src/increase/types/physical_card_update_params.py mode change 100644 => 100755 src/increase/types/program.py mode change 100644 => 100755 src/increase/types/program_list_params.py mode change 100644 => 100755 src/increase/types/proof_of_authorization_request.py mode change 100644 => 100755 src/increase/types/proof_of_authorization_request_list_params.py mode change 100644 => 100755 src/increase/types/proof_of_authorization_request_submission.py mode change 100644 => 100755 src/increase/types/proof_of_authorization_request_submission_create_params.py mode change 100644 => 100755 src/increase/types/proof_of_authorization_request_submission_list_params.py mode change 100644 => 100755 src/increase/types/real_time_decision.py mode change 100644 => 100755 src/increase/types/real_time_decision_action_params.py mode change 100644 => 100755 src/increase/types/real_time_payments_request_for_payment.py mode change 100644 => 100755 src/increase/types/real_time_payments_request_for_payment_create_params.py mode change 100644 => 100755 src/increase/types/real_time_payments_request_for_payment_list_params.py mode change 100644 => 100755 src/increase/types/real_time_payments_transfer.py mode change 100644 => 100755 src/increase/types/real_time_payments_transfer_create_params.py mode change 100644 => 100755 src/increase/types/real_time_payments_transfer_list_params.py mode change 100644 => 100755 src/increase/types/routing_number_list_params.py mode change 100644 => 100755 src/increase/types/routing_number_list_response.py mode change 100644 => 100755 src/increase/types/simulations/__init__.py mode change 100644 => 100755 src/increase/types/simulations/account_statement_create_params.py mode change 100644 => 100755 src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py mode change 100644 => 100755 src/increase/types/simulations/ach_transfer_return_params.py mode change 100644 => 100755 src/increase/types/simulations/card_authorization_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_authorization_create_response.py mode change 100644 => 100755 src/increase/types/simulations/card_authorization_expiration_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_dispute_action_params.py mode change 100644 => 100755 src/increase/types/simulations/card_fuel_confirmation_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_increment_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_refund_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_reversal_create_params.py mode change 100644 => 100755 src/increase/types/simulations/card_settlement_create_params.py mode change 100644 => 100755 src/increase/types/simulations/digital_wallet_token_request_create_params.py mode change 100644 => 100755 src/increase/types/simulations/digital_wallet_token_request_create_response.py mode change 100644 => 100755 src/increase/types/simulations/document_create_params.py mode change 100644 => 100755 src/increase/types/simulations/inbound_ach_transfer_create_params.py mode change 100644 => 100755 src/increase/types/simulations/inbound_check_deposit_create_params.py mode change 100644 => 100755 src/increase/types/simulations/inbound_funds_hold_release_response.py mode change 100644 => 100755 src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py mode change 100644 => 100755 src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py mode change 100644 => 100755 src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py mode change 100644 => 100755 src/increase/types/simulations/inbound_wire_transfer_create_params.py mode change 100644 => 100755 src/increase/types/simulations/interest_payment_create_params.py mode change 100644 => 100755 src/increase/types/simulations/physical_card_advance_shipment_params.py mode change 100644 => 100755 src/increase/types/simulations/program_create_params.py mode change 100644 => 100755 src/increase/types/simulations/real_time_payments_transfer_complete_params.py mode change 100644 => 100755 src/increase/types/supplemental_document_create_params.py mode change 100644 => 100755 src/increase/types/supplemental_document_list_params.py mode change 100644 => 100755 src/increase/types/transaction.py mode change 100644 => 100755 src/increase/types/transaction_list_params.py mode change 100644 => 100755 src/increase/types/wire_drawdown_request.py mode change 100644 => 100755 src/increase/types/wire_drawdown_request_create_params.py mode change 100644 => 100755 src/increase/types/wire_drawdown_request_list_params.py mode change 100644 => 100755 src/increase/types/wire_transfer.py mode change 100644 => 100755 src/increase/types/wire_transfer_create_params.py mode change 100644 => 100755 src/increase/types/wire_transfer_list_params.py mode change 100644 => 100755 tests/__init__.py mode change 100644 => 100755 tests/api_resources/__init__.py mode change 100644 => 100755 tests/api_resources/simulations/__init__.py mode change 100644 => 100755 tests/api_resources/simulations/test_account_statements.py mode change 100644 => 100755 tests/api_resources/simulations/test_account_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_ach_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_authorization_expirations.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_authorizations.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_disputes.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_fuel_confirmations.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_increments.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_refunds.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_reversals.py mode change 100644 => 100755 tests/api_resources/simulations/test_card_settlements.py mode change 100644 => 100755 tests/api_resources/simulations/test_check_deposits.py mode change 100644 => 100755 tests/api_resources/simulations/test_check_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_digital_wallet_token_requests.py mode change 100644 => 100755 tests/api_resources/simulations/test_documents.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_ach_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_check_deposits.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_funds_holds.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py mode change 100644 => 100755 tests/api_resources/simulations/test_inbound_wire_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_interest_payments.py mode change 100644 => 100755 tests/api_resources/simulations/test_physical_cards.py mode change 100644 => 100755 tests/api_resources/simulations/test_programs.py mode change 100644 => 100755 tests/api_resources/simulations/test_real_time_payments_transfers.py mode change 100644 => 100755 tests/api_resources/simulations/test_wire_transfers.py mode change 100644 => 100755 tests/api_resources/test_account_numbers.py mode change 100644 => 100755 tests/api_resources/test_account_statements.py mode change 100644 => 100755 tests/api_resources/test_account_transfers.py mode change 100644 => 100755 tests/api_resources/test_accounts.py mode change 100644 => 100755 tests/api_resources/test_ach_prenotifications.py mode change 100644 => 100755 tests/api_resources/test_ach_transfers.py mode change 100644 => 100755 tests/api_resources/test_bookkeeping_accounts.py mode change 100644 => 100755 tests/api_resources/test_bookkeeping_entries.py mode change 100644 => 100755 tests/api_resources/test_bookkeeping_entry_sets.py mode change 100644 => 100755 tests/api_resources/test_card_disputes.py mode change 100644 => 100755 tests/api_resources/test_card_payments.py mode change 100644 => 100755 tests/api_resources/test_card_purchase_supplements.py mode change 100644 => 100755 tests/api_resources/test_cards.py mode change 100644 => 100755 tests/api_resources/test_check_deposits.py mode change 100644 => 100755 tests/api_resources/test_check_transfers.py mode change 100644 => 100755 tests/api_resources/test_declined_transactions.py mode change 100644 => 100755 tests/api_resources/test_digital_card_profiles.py mode change 100644 => 100755 tests/api_resources/test_digital_wallet_tokens.py mode change 100644 => 100755 tests/api_resources/test_documents.py mode change 100644 => 100755 tests/api_resources/test_entities.py mode change 100644 => 100755 tests/api_resources/test_event_subscriptions.py mode change 100644 => 100755 tests/api_resources/test_events.py mode change 100644 => 100755 tests/api_resources/test_exports.py mode change 100644 => 100755 tests/api_resources/test_external_accounts.py mode change 100644 => 100755 tests/api_resources/test_files.py mode change 100644 => 100755 tests/api_resources/test_groups.py mode change 100644 => 100755 tests/api_resources/test_inbound_ach_transfers.py mode change 100644 => 100755 tests/api_resources/test_inbound_check_deposits.py mode change 100644 => 100755 tests/api_resources/test_inbound_mail_items.py mode change 100644 => 100755 tests/api_resources/test_inbound_wire_drawdown_requests.py mode change 100644 => 100755 tests/api_resources/test_inbound_wire_transfers.py mode change 100644 => 100755 tests/api_resources/test_intrafi_account_enrollments.py mode change 100644 => 100755 tests/api_resources/test_intrafi_balances.py mode change 100644 => 100755 tests/api_resources/test_intrafi_exclusions.py mode change 100644 => 100755 tests/api_resources/test_lockboxes.py mode change 100644 => 100755 tests/api_resources/test_oauth_connections.py mode change 100644 => 100755 tests/api_resources/test_oauth_tokens.py mode change 100644 => 100755 tests/api_resources/test_pending_transactions.py mode change 100644 => 100755 tests/api_resources/test_physical_card_profiles.py mode change 100644 => 100755 tests/api_resources/test_physical_cards.py mode change 100644 => 100755 tests/api_resources/test_programs.py mode change 100644 => 100755 tests/api_resources/test_proof_of_authorization_request_submissions.py mode change 100644 => 100755 tests/api_resources/test_proof_of_authorization_requests.py mode change 100644 => 100755 tests/api_resources/test_real_time_decisions.py mode change 100644 => 100755 tests/api_resources/test_real_time_payments_request_for_payments.py mode change 100644 => 100755 tests/api_resources/test_real_time_payments_transfers.py mode change 100644 => 100755 tests/api_resources/test_routing_numbers.py mode change 100644 => 100755 tests/api_resources/test_supplemental_documents.py mode change 100644 => 100755 tests/api_resources/test_transactions.py mode change 100644 => 100755 tests/api_resources/test_wire_drawdown_requests.py mode change 100644 => 100755 tests/api_resources/test_wire_transfers.py mode change 100644 => 100755 tests/conftest.py mode change 100644 => 100755 tests/sample_file.txt mode change 100644 => 100755 tests/test_client.py mode change 100644 => 100755 tests/test_deepcopy.py mode change 100644 => 100755 tests/test_extract_files.py mode change 100644 => 100755 tests/test_files.py mode change 100644 => 100755 tests/test_models.py mode change 100644 => 100755 tests/test_qs.py mode change 100644 => 100755 tests/test_required_args.py mode change 100644 => 100755 tests/test_response.py mode change 100644 => 100755 tests/test_streaming.py mode change 100644 => 100755 tests/test_transform.py mode change 100644 => 100755 tests/test_utils/test_proxy.py mode change 100644 => 100755 tests/test_utils/test_typing.py mode change 100644 => 100755 tests/utils.py diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile old mode 100644 new mode 100755 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json old mode 100644 new mode 100755 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml old mode 100644 new mode 100755 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.python-version b/.python-version old mode 100644 new mode 100755 diff --git a/.release-please-manifest.json b/.release-please-manifest.json old mode 100644 new mode 100755 diff --git a/.stats.yml b/.stats.yml old mode 100644 new mode 100755 index 57cc71997..7ce6c078c --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ec38f7f27a2e8a4552fad6a5cd3df1d75046e6f9a0932a16d4ceba66ecf1751f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ab94f654194d83ded6b4a105c73df1f99cdd6945dad1f727787c89d74c1352aa.yml diff --git a/Brewfile b/Brewfile old mode 100644 new mode 100755 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/LICENSE b/LICENSE old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/SECURITY.md b/SECURITY.md old mode 100644 new mode 100755 diff --git a/api.md b/api.md old mode 100644 new mode 100755 diff --git a/bin/check-release-environment b/bin/check-release-environment old mode 100644 new mode 100755 diff --git a/bin/publish-pypi b/bin/publish-pypi old mode 100644 new mode 100755 diff --git a/examples/.keep b/examples/.keep old mode 100644 new mode 100755 diff --git a/examples/datetime_usage.py b/examples/datetime_usage.py old mode 100644 new mode 100755 diff --git a/examples/status_errors.py b/examples/status_errors.py old mode 100644 new mode 100755 diff --git a/mypy.ini b/mypy.ini old mode 100644 new mode 100755 diff --git a/noxfile.py b/noxfile.py old mode 100644 new mode 100755 diff --git a/pyproject.toml b/pyproject.toml old mode 100644 new mode 100755 diff --git a/release-please-config.json b/release-please-config.json old mode 100644 new mode 100755 diff --git a/requirements-dev.lock b/requirements-dev.lock old mode 100644 new mode 100755 diff --git a/requirements.lock b/requirements.lock old mode 100644 new mode 100755 diff --git a/scripts/utils/ruffen-docs.py b/scripts/utils/ruffen-docs.py old mode 100644 new mode 100755 diff --git a/src/increase/__init__.py b/src/increase/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py old mode 100644 new mode 100755 diff --git a/src/increase/_client.py b/src/increase/_client.py old mode 100644 new mode 100755 diff --git a/src/increase/_compat.py b/src/increase/_compat.py old mode 100644 new mode 100755 diff --git a/src/increase/_constants.py b/src/increase/_constants.py old mode 100644 new mode 100755 diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py old mode 100644 new mode 100755 diff --git a/src/increase/_files.py b/src/increase/_files.py old mode 100644 new mode 100755 diff --git a/src/increase/_models.py b/src/increase/_models.py old mode 100644 new mode 100755 diff --git a/src/increase/_qs.py b/src/increase/_qs.py old mode 100644 new mode 100755 diff --git a/src/increase/_resource.py b/src/increase/_resource.py old mode 100644 new mode 100755 diff --git a/src/increase/_response.py b/src/increase/_response.py old mode 100644 new mode 100755 diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py old mode 100644 new mode 100755 diff --git a/src/increase/_types.py b/src/increase/_types.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_logs.py b/src/increase/_utils/_logs.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_reflection.py b/src/increase/_utils/_reflection.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_streams.py b/src/increase/_utils/_streams.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py old mode 100644 new mode 100755 diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py old mode 100644 new mode 100755 diff --git a/src/increase/_version.py b/src/increase/_version.py old mode 100644 new mode 100755 diff --git a/src/increase/lib/.keep b/src/increase/lib/.keep old mode 100644 new mode 100755 diff --git a/src/increase/pagination.py b/src/increase/pagination.py old mode 100644 new mode 100755 diff --git a/src/increase/py.typed b/src/increase/py.typed old mode 100644 new mode 100755 diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py old mode 100644 new mode 100755 diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account.py b/src/increase/types/account.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_balance_params.py b/src/increase/types/account_balance_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_create_params.py b/src/increase/types/account_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_number.py b/src/increase/types/account_number.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_number_create_params.py b/src/increase/types/account_number_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_number_update_params.py b/src/increase/types/account_number_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_statement_list_params.py b/src/increase/types/account_statement_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_transfer_create_params.py b/src/increase/types/account_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_transfer_list_params.py b/src/increase/types/account_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_prenotification_list_params.py b/src/increase/types/ach_prenotification_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/ach_transfer_list_params.py b/src/increase/types/ach_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/balance_lookup.py b/src/increase/types/balance_lookup.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_account.py b/src/increase/types/bookkeeping_account.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_account_balance_params.py b/src/increase/types/bookkeeping_account_balance_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_account_create_params.py b/src/increase/types/bookkeeping_account_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_account_list_params.py b/src/increase/types/bookkeeping_account_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_account_update_params.py b/src/increase/types/bookkeeping_account_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_balance_lookup.py b/src/increase/types/bookkeeping_balance_lookup.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_entry.py b/src/increase/types/bookkeeping_entry.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_entry_list_params.py b/src/increase/types/bookkeeping_entry_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_entry_set.py b/src/increase/types/bookkeeping_entry_set.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_entry_set_create_params.py b/src/increase/types/bookkeeping_entry_set_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/bookkeeping_entry_set_list_params.py b/src/increase/types/bookkeeping_entry_set_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card.py b/src/increase/types/card.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_details.py b/src/increase/types/card_details.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_list_params.py b/src/increase/types/card_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_payment_list_params.py b/src/increase/types/card_payment_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_purchase_supplement_list_params.py b/src/increase/types/card_purchase_supplement_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_deposit_create_params.py b/src/increase/types/check_deposit_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_deposit_list_params.py b/src/increase/types/check_deposit_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/check_transfer_stop_payment_params.py b/src/increase/types/check_transfer_stop_payment_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py old mode 100644 new mode 100755 diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_card_profile_clone_params.py b/src/increase/types/digital_card_profile_clone_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_card_profile_create_params.py b/src/increase/types/digital_card_profile_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_card_profile_list_params.py b/src/increase/types/digital_card_profile_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py old mode 100644 new mode 100755 diff --git a/src/increase/types/digital_wallet_token_list_params.py b/src/increase/types/digital_wallet_token_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/document.py b/src/increase/types/document.py old mode 100644 new mode 100755 diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_archive_beneficial_owner_params.py b/src/increase/types/entity_archive_beneficial_owner_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_confirm_params.py b/src/increase/types/entity_confirm_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_list_params.py b/src/increase/types/entity_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_supplemental_document.py b/src/increase/types/entity_supplemental_document.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_update_address_params.py b/src/increase/types/entity_update_address_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/entity_update_industry_code_params.py b/src/increase/types/entity_update_industry_code_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event.py b/src/increase/types/event.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event_subscription_list_params.py b/src/increase/types/event_subscription_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/event_subscription_update_params.py b/src/increase/types/event_subscription_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/export.py b/src/increase/types/export.py old mode 100644 new mode 100755 diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py old mode 100644 new mode 100755 diff --git a/src/increase/types/external_account_create_params.py b/src/increase/types/external_account_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/external_account_list_params.py b/src/increase/types/external_account_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/external_account_update_params.py b/src/increase/types/external_account_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/file.py b/src/increase/types/file.py old mode 100644 new mode 100755 diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/group.py b/src/increase/types/group.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_ach_transfer_list_params.py b/src/increase/types/inbound_ach_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_ach_transfer_transfer_return_params.py b/src/increase/types/inbound_ach_transfer_transfer_return_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_check_deposit_list_params.py b/src/increase/types/inbound_check_deposit_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_mail_item_list_params.py b/src/increase/types/inbound_mail_item_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_wire_drawdown_request_list_params.py b/src/increase/types/inbound_wire_drawdown_request_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_account_enrollment_create_params.py b/src/increase/types/intrafi_account_enrollment_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_account_enrollment_list_params.py b/src/increase/types/intrafi_account_enrollment_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi_balance.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_exclusion_create_params.py b/src/increase/types/intrafi_exclusion_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/intrafi_exclusion_list_params.py b/src/increase/types/intrafi_exclusion_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py old mode 100644 new mode 100755 diff --git a/src/increase/types/lockbox_create_params.py b/src/increase/types/lockbox_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/lockbox_list_params.py b/src/increase/types/lockbox_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/oauth_connection.py b/src/increase/types/oauth_connection.py old mode 100644 new mode 100755 diff --git a/src/increase/types/oauth_connection_list_params.py b/src/increase/types/oauth_connection_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/oauth_token.py b/src/increase/types/oauth_token.py old mode 100644 new mode 100755 diff --git a/src/increase/types/oauth_token_create_params.py b/src/increase/types/oauth_token_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py old mode 100644 new mode 100755 diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_create_params.py b/src/increase/types/physical_card_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_list_params.py b/src/increase/types/physical_card_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_profile_clone_params.py b/src/increase/types/physical_card_profile_clone_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_profile_list_params.py b/src/increase/types/physical_card_profile_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/physical_card_update_params.py b/src/increase/types/physical_card_update_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/program.py b/src/increase/types/program.py old mode 100644 new mode 100755 diff --git a/src/increase/types/program_list_params.py b/src/increase/types/program_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/proof_of_authorization_request.py b/src/increase/types/proof_of_authorization_request.py old mode 100644 new mode 100755 diff --git a/src/increase/types/proof_of_authorization_request_list_params.py b/src/increase/types/proof_of_authorization_request_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py old mode 100644 new mode 100755 diff --git a/src/increase/types/proof_of_authorization_request_submission_create_params.py b/src/increase/types/proof_of_authorization_request_submission_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/proof_of_authorization_request_submission_list_params.py b/src/increase/types/proof_of_authorization_request_submission_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_request_for_payment.py b/src/increase/types/real_time_payments_request_for_payment.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_request_for_payment_create_params.py b/src/increase/types/real_time_payments_request_for_payment_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_request_for_payment_list_params.py b/src/increase/types/real_time_payments_request_for_payment_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_transfer_create_params.py b/src/increase/types/real_time_payments_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/real_time_payments_transfer_list_params.py b/src/increase/types/real_time_payments_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/routing_number_list_params.py b/src/increase/types/routing_number_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/account_statement_create_params.py b/src/increase/types/simulations/account_statement_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/ach_transfer_return_params.py b/src/increase/types/simulations/ach_transfer_return_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_authorization_expiration_create_params.py b/src/increase/types/simulations/card_authorization_expiration_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_fuel_confirmation_create_params.py b/src/increase/types/simulations/card_fuel_confirmation_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_increment_create_params.py b/src/increase/types/simulations/card_increment_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_refund_create_params.py b/src/increase/types/simulations/card_refund_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_reversal_create_params.py b/src/increase/types/simulations/card_reversal_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/card_settlement_create_params.py b/src/increase/types/simulations/card_settlement_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/digital_wallet_token_request_create_params.py b/src/increase/types/simulations/digital_wallet_token_request_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/digital_wallet_token_request_create_response.py b/src/increase/types/simulations/digital_wallet_token_request_create_response.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/document_create_params.py b/src/increase/types/simulations/document_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_check_deposit_create_params.py b/src/increase/types/simulations/inbound_check_deposit_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_funds_hold_release_response.py b/src/increase/types/simulations/inbound_funds_hold_release_response.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py b/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/interest_payment_create_params.py b/src/increase/types/simulations/interest_payment_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/physical_card_advance_shipment_params.py b/src/increase/types/simulations/physical_card_advance_shipment_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/supplemental_document_create_params.py b/src/increase/types/supplemental_document_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/supplemental_document_list_params.py b/src/increase/types/supplemental_document_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py old mode 100644 new mode 100755 diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py old mode 100644 new mode 100755 diff --git a/src/increase/types/wire_transfer_list_params.py b/src/increase/types/wire_transfer_list_params.py old mode 100644 new mode 100755 diff --git a/tests/__init__.py b/tests/__init__.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/__init__.py b/tests/api_resources/__init__.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/__init__.py b/tests/api_resources/simulations/__init__.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_digital_wallet_token_requests.py b/tests/api_resources/simulations/test_digital_wallet_token_requests.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py old mode 100644 new mode 100755 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 old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_real_time_payments_transfers.py b/tests/api_resources/simulations/test_real_time_payments_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/test_intrafi_balances.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py old mode 100644 new mode 100755 diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py old mode 100644 new mode 100755 diff --git a/tests/conftest.py b/tests/conftest.py old mode 100644 new mode 100755 diff --git a/tests/sample_file.txt b/tests/sample_file.txt old mode 100644 new mode 100755 diff --git a/tests/test_client.py b/tests/test_client.py old mode 100644 new mode 100755 diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py old mode 100644 new mode 100755 diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py old mode 100644 new mode 100755 diff --git a/tests/test_files.py b/tests/test_files.py old mode 100644 new mode 100755 diff --git a/tests/test_models.py b/tests/test_models.py old mode 100644 new mode 100755 diff --git a/tests/test_qs.py b/tests/test_qs.py old mode 100644 new mode 100755 diff --git a/tests/test_required_args.py b/tests/test_required_args.py old mode 100644 new mode 100755 diff --git a/tests/test_response.py b/tests/test_response.py old mode 100644 new mode 100755 diff --git a/tests/test_streaming.py b/tests/test_streaming.py old mode 100644 new mode 100755 diff --git a/tests/test_transform.py b/tests/test_transform.py old mode 100644 new mode 100755 diff --git a/tests/test_utils/test_proxy.py b/tests/test_utils/test_proxy.py old mode 100644 new mode 100755 diff --git a/tests/test_utils/test_typing.py b/tests/test_utils/test_typing.py old mode 100644 new mode 100755 diff --git a/tests/utils.py b/tests/utils.py old mode 100644 new mode 100755 From 8a7a00393b92b0e89f8c12bc94a6bf39353188e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:35:00 +0000 Subject: [PATCH 0150/1325] chore(internal): codegen related update (#595) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c486f6de6..91393ed88 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.93.0" + ".": "0.94.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 58f6793a3..d76fa0b05 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.93.0" +version = "0.94.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 66d3a2509..f0c631404 100755 --- 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.93.0" # x-release-please-version +__version__ = "0.94.0" # x-release-please-version From ccf7e1302504b35bdd611a70fb6a0ff30221a518 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 19 Aug 2024 21:39:03 +0000 Subject: [PATCH 0151/1325] chore(client): fix parsing union responses when non-json is returned (#596) --- src/increase/_models.py | 2 ++ tests/test_response.py | 39 ++++++++++++++++++++++++++++++++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 5148d5a7b..d386eaa3a 100755 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -380,6 +380,8 @@ def is_basemodel(type_: type) -> bool: def is_basemodel_type(type_: type) -> TypeGuard[type[BaseModel] | type[GenericModel]]: origin = get_origin(type_) or type_ + if not inspect.isclass(origin): + return False return issubclass(origin, BaseModel) or issubclass(origin, GenericModel) diff --git a/tests/test_response.py b/tests/test_response.py index bc4c431c1..a76e75dcc 100755 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -1,5 +1,5 @@ import json -from typing import List, cast +from typing import Any, List, Union, cast from typing_extensions import Annotated import httpx @@ -188,3 +188,40 @@ async def test_async_response_parse_annotated_type(async_client: AsyncIncrease) ) assert obj.foo == "hello!" assert obj.bar == 2 + + +class OtherModel(BaseModel): + a: str + + +@pytest.mark.parametrize("client", [False], indirect=True) # loose validation +def test_response_parse_expect_model_union_non_json_content(client: Increase) -> None: + response = APIResponse( + raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + obj = response.parse(to=cast(Any, Union[CustomModel, OtherModel])) + assert isinstance(obj, str) + assert obj == "foo" + + +@pytest.mark.asyncio +@pytest.mark.parametrize("async_client", [False], indirect=True) # loose validation +async def test_async_response_parse_expect_model_union_non_json_content(async_client: AsyncIncrease) -> None: + response = AsyncAPIResponse( + raw=httpx.Response(200, content=b"foo", headers={"Content-Type": "application/text"}), + client=async_client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + obj = await response.parse(to=cast(Any, Union[CustomModel, OtherModel])) + assert isinstance(obj, str) + assert obj == "foo" From 4b4517a5cb9fda28f19b290dd189a33edd7b8399 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:35:46 +0000 Subject: [PATCH 0152/1325] feat(api): OpenAPI spec update via Stainless API (#598) --- .stats.yml | 2 +- src/increase/types/wire_drawdown_request.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ce6c078c..7593d0baf 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ab94f654194d83ded6b4a105c73df1f99cdd6945dad1f727787c89d74c1352aa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-062f8065ef5810e269a3777ca90b63f7ef6100d567c26f54f9a4a4e99649d403.yml diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index 387c804c2..ac56aaa7f 100755 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -35,7 +35,7 @@ class WireDrawdownRequest(BaseModel): requested. Will always be "USD". """ - fulfillment_transaction_id: Optional[str] = None + fulfillment_inbound_wire_transfer_id: Optional[str] = None """ If the recipient fulfills the drawdown request by sending funds, then this will be the identifier of the corresponding Transaction. From 956df3aead9292d3928a703d2e5acde20981e839 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:37:03 +0000 Subject: [PATCH 0153/1325] wip (#599) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 91393ed88..2292ca706 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.94.0" + ".": "0.95.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d76fa0b05..0a2216426 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.94.0" +version = "0.95.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f0c631404..370adcdeb 100755 --- 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.94.0" # x-release-please-version +__version__ = "0.95.0" # x-release-please-version From 78e386cce4605fa158dffcc2036265d4c9d72b12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 18:39:17 +0000 Subject: [PATCH 0154/1325] chore(ci): also run pydantic v1 tests (#600) --- scripts/test | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/test b/scripts/test index b3ace9013..4fa5698b8 100755 --- a/scripts/test +++ b/scripts/test @@ -54,3 +54,6 @@ fi echo "==> Running tests" rye run pytest "$@" + +echo "==> Running Pydantic v1 tests" +rye run nox -s test-pydantic-v1 -- "$@" From f0cbf8804107725eece89fd234fa2c0b9ae15771 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 20:56:24 +0000 Subject: [PATCH 0155/1325] feat(api): OpenAPI spec update via Stainless API (#602) --- .stats.yml | 2 +- src/increase/types/check_transfer.py | 20 +++++++++++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7593d0baf..ebdd7e8aa 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-062f8065ef5810e269a3777ca90b63f7ef6100d567c26f54f9a4a4e99649d403.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ad7a6efab8975b6e467bc358d79674ca5a110cb2ed0d9b72aa64d276899947a7.yml diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 727c5a618..bd960220e 100755 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -1,6 +1,6 @@ # 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 @@ -18,6 +18,7 @@ "PhysicalCheck", "PhysicalCheckMailingAddress", "PhysicalCheckReturnAddress", + "PhysicalCheckTrackingUpdate", "StopPaymentRequest", "Submission", "ThirdParty", @@ -142,6 +143,20 @@ class PhysicalCheckReturnAddress(BaseModel): """The state of the check's destination.""" +class PhysicalCheckTrackingUpdate(BaseModel): + category: Literal["returned_to_sender"] + """The type of tracking event. + + - `returned_to_sender` - Delivery failed and the check was returned to sender. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the tracking event took place. + """ + + class PhysicalCheck(BaseModel): mailing_address: PhysicalCheckMailingAddress """Details for where Increase will mail the check.""" @@ -164,6 +179,9 @@ class PhysicalCheck(BaseModel): If blank, the check will be printed with 'No signature required'. """ + tracking_updates: List[PhysicalCheckTrackingUpdate] + """Tracking updates relating to the physical check's delivery.""" + class StopPaymentRequest(BaseModel): reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] From 3671a77bf5152da2d2adf71f834a3e4888f10d9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:56:23 +0000 Subject: [PATCH 0156/1325] feat(api): OpenAPI spec update via Stainless API (#603) --- .stats.yml | 4 +- api.md | 6 + .../resources/simulations/__init__.py | 14 ++ .../simulations/inbound_mail_items.py | 182 ++++++++++++++++++ .../resources/simulations/simulations.py | 32 +++ src/increase/types/simulations/__init__.py | 1 + .../inbound_mail_item_create_params.py | 15 ++ .../simulations/test_inbound_mail_items.py | 90 +++++++++ 8 files changed, 342 insertions(+), 2 deletions(-) create mode 100755 src/increase/resources/simulations/inbound_mail_items.py create mode 100755 src/increase/types/simulations/inbound_mail_item_create_params.py create mode 100755 tests/api_resources/simulations/test_inbound_mail_items.py diff --git a/.stats.yml b/.stats.yml index ebdd7e8aa..32a833bc9 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ad7a6efab8975b6e467bc358d79674ca5a110cb2ed0d9b72aa64d276899947a7.yml +configured_endpoints: 196 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e87d106c25840830a42145dd2eadfcaffc753796b78fd265a5398f60a2102bbc.yml diff --git a/api.md b/api.md index db4588dba..397cbfef4 100755 --- a/api.md +++ b/api.md @@ -757,6 +757,12 @@ Methods: - client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit +## InboundMailItems + +Methods: + +- client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem + ## CheckDeposits Methods: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index e3c4105b5..5d03fb847 100755 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -128,6 +128,14 @@ AccountStatementsResourceWithStreamingResponse, AsyncAccountStatementsResourceWithStreamingResponse, ) +from .inbound_mail_items import ( + InboundMailItemsResource, + AsyncInboundMailItemsResource, + InboundMailItemsResourceWithRawResponse, + AsyncInboundMailItemsResourceWithRawResponse, + InboundMailItemsResourceWithStreamingResponse, + AsyncInboundMailItemsResourceWithStreamingResponse, +) from .card_authorizations import ( CardAuthorizationsResource, AsyncCardAuthorizationsResource, @@ -248,6 +256,12 @@ "AsyncInboundCheckDepositsResourceWithRawResponse", "InboundCheckDepositsResourceWithStreamingResponse", "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "InboundMailItemsResource", + "AsyncInboundMailItemsResource", + "InboundMailItemsResourceWithRawResponse", + "AsyncInboundMailItemsResourceWithRawResponse", + "InboundMailItemsResourceWithStreamingResponse", + "AsyncInboundMailItemsResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py new file mode 100755 index 000000000..77f7aa693 --- /dev/null +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -0,0 +1,182 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import ( + maybe_transform, + async_maybe_transform, +) +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_mail_item_create_params +from ...types.inbound_mail_item import InboundMailItem + +__all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] + + +class InboundMailItemsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + lockbox_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundMailItem: + """ + Simulates an inbound mail item to your account, as if someone had mailed a + physical check to one of your account's Lockboxes. + + Args: + amount: The amount of the check to be simulated, in cents. + + lockbox_id: The identifier of the Lockbox to simulate inbound mail to. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_mail_items", + body=maybe_transform( + { + "amount": amount, + "lockbox_id": lockbox_id, + }, + inbound_mail_item_create_params.InboundMailItemCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + + +class AsyncInboundMailItemsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + return AsyncInboundMailItemsResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + lockbox_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundMailItem: + """ + Simulates an inbound mail item to your account, as if someone had mailed a + physical check to one of your account's Lockboxes. + + Args: + amount: The amount of the check to be simulated, in cents. + + lockbox_id: The identifier of the Lockbox to simulate inbound mail to. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_mail_items", + body=await async_maybe_transform( + { + "amount": amount, + "lockbox_id": lockbox_id, + }, + inbound_mail_item_create_params.InboundMailItemCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + + +class InboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: + self._inbound_mail_items = inbound_mail_items + + self.create = to_raw_response_wrapper( + inbound_mail_items.create, + ) + + +class AsyncInboundMailItemsResourceWithRawResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: + self._inbound_mail_items = inbound_mail_items + + self.create = async_to_raw_response_wrapper( + inbound_mail_items.create, + ) + + +class InboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: + self._inbound_mail_items = inbound_mail_items + + self.create = to_streamed_response_wrapper( + inbound_mail_items.create, + ) + + +class AsyncInboundMailItemsResourceWithStreamingResponse: + def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: + self._inbound_mail_items = inbound_mail_items + + self.create = async_to_streamed_response_wrapper( + inbound_mail_items.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 0da1a353d..07bbbd281 100755 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -124,6 +124,14 @@ AccountStatementsResourceWithStreamingResponse, AsyncAccountStatementsResourceWithStreamingResponse, ) +from .inbound_mail_items import ( + InboundMailItemsResource, + AsyncInboundMailItemsResource, + InboundMailItemsResourceWithRawResponse, + AsyncInboundMailItemsResourceWithRawResponse, + InboundMailItemsResourceWithStreamingResponse, + AsyncInboundMailItemsResourceWithStreamingResponse, +) from .card_authorizations import ( CardAuthorizationsResource, AsyncCardAuthorizationsResource, @@ -237,6 +245,10 @@ def check_transfers(self) -> CheckTransfersResource: def inbound_check_deposits(self) -> InboundCheckDepositsResource: return InboundCheckDepositsResource(self._client) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResource: + return InboundMailItemsResource(self._client) + @cached_property def check_deposits(self) -> CheckDepositsResource: return CheckDepositsResource(self._client) @@ -351,6 +363,10 @@ def check_transfers(self) -> AsyncCheckTransfersResource: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: return AsyncInboundCheckDepositsResource(self._client) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResource: + return AsyncInboundMailItemsResource(self._client) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResource: return AsyncCheckDepositsResource(self._client) @@ -468,6 +484,10 @@ def check_transfers(self) -> CheckTransfersResourceWithRawResponse: def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property def check_deposits(self) -> CheckDepositsResourceWithRawResponse: return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -579,6 +599,10 @@ def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -692,6 +716,10 @@ def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @@ -807,6 +835,10 @@ def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + return AsyncInboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 3d3e77b31..80e1f1cb2 100755 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -12,6 +12,7 @@ from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams +from .inbound_mail_item_create_params import InboundMailItemCreateParams as InboundMailItemCreateParams from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams diff --git a/src/increase/types/simulations/inbound_mail_item_create_params.py b/src/increase/types/simulations/inbound_mail_item_create_params.py new file mode 100755 index 000000000..2957999b4 --- /dev/null +++ b/src/increase/types/simulations/inbound_mail_item_create_params.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundMailItemCreateParams"] + + +class InboundMailItemCreateParams(TypedDict, total=False): + amount: Required[int] + """The amount of the check to be simulated, in cents.""" + + lockbox_id: Required[str] + """The identifier of the Lockbox to simulate inbound mail to.""" diff --git a/tests/api_resources/simulations/test_inbound_mail_items.py b/tests/api_resources/simulations/test_inbound_mail_items.py new file mode 100755 index 000000000..df49ef85b --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_mail_items.py @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundMailItem + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundMailItems: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_mail_item = client.simulations.inbound_mail_items.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_mail_items.with_raw_response.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_mail_items.with_streaming_response.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundMailItems: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.simulations.inbound_mail_items.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_mail_items.with_raw_response.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_mail_items.with_streaming_response.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True From 8fb3fa3f93622004fea546bb9a785e2686bc0471 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 22:57:36 +0000 Subject: [PATCH 0157/1325] chore(internal): codegen related update (#604) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2292ca706..d486cde74 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.95.0" + ".": "0.96.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a2216426..0d61971c8 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.95.0" +version = "0.96.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 370adcdeb..60e4398bc 100755 --- 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.95.0" # x-release-please-version +__version__ = "0.96.0" # x-release-please-version From e8612dbb514377cff4f89214376e41fd5b0df762 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Aug 2024 23:36:46 +0000 Subject: [PATCH 0158/1325] feat(api): OpenAPI spec update via Stainless API (#605) --- .stats.yml | 2 +- api.md | 12 ++--- .../resources/intrafi_account_enrollments.py | 8 ++-- src/increase/resources/intrafi_exclusions.py | 4 +- .../resources/simulations/__init__.py | 12 ++--- .../resources/simulations/simulations.py | 48 +++++++++---------- 6 files changed, 43 insertions(+), 43 deletions(-) diff --git a/.stats.yml b/.stats.yml index 32a833bc9..3549a8b35 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e87d106c25840830a42145dd2eadfcaffc753796b78fd265a5398f60a2102bbc.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-34f96c602cafda11d1091e74f895d7e25b0c6b9b11916208e6cf8fa2bcf3d9b3.yml diff --git a/api.md b/api.md index 397cbfef4..ae6fd9540 100755 --- a/api.md +++ b/api.md @@ -757,12 +757,6 @@ Methods: - client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit -## InboundMailItems - -Methods: - -- client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem - ## CheckDeposits Methods: @@ -910,6 +904,12 @@ Methods: - client.simulations.documents.create(\*\*params) -> Document +## InboundMailItems + +Methods: + +- client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem + ## Programs Methods: diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 7e5aae937..69342cfd0 100755 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -48,7 +48,7 @@ def create( idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ - Enroll an account in the IntraFi deposit sweep network. + Enroll an account in the IntraFi deposit sweep network Args: account_id: The identifier for the account to be added to IntraFi. @@ -195,7 +195,7 @@ def unenroll( idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ - Unenroll an account from IntraFi. + Unenroll an account from IntraFi Args: intrafi_account_enrollment_id: The Identifier of the IntraFi Account Enrollment to remove from IntraFi. @@ -250,7 +250,7 @@ async def create( idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ - Enroll an account in the IntraFi deposit sweep network. + Enroll an account in the IntraFi deposit sweep network Args: account_id: The identifier for the account to be added to IntraFi. @@ -397,7 +397,7 @@ async def unenroll( idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ - Unenroll an account from IntraFi. + Unenroll an account from IntraFi Args: intrafi_account_enrollment_id: The Identifier of the IntraFi Account Enrollment to remove from IntraFi. diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index e45ff5536..81e1ba739 100755 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -136,7 +136,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> SyncPage[IntrafiExclusion]: """ - List IntraFi Exclusions. + List IntraFi Exclusions Args: cursor: Return the page of entries after this one. @@ -338,7 +338,7 @@ def list( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> AsyncPaginator[IntrafiExclusion, AsyncPage[IntrafiExclusion]]: """ - List IntraFi Exclusions. + List IntraFi Exclusions Args: cursor: Return the page of entries after this one. diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 5d03fb847..fb2038bf0 100755 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -256,12 +256,6 @@ "AsyncInboundCheckDepositsResourceWithRawResponse", "InboundCheckDepositsResourceWithStreamingResponse", "AsyncInboundCheckDepositsResourceWithStreamingResponse", - "InboundMailItemsResource", - "AsyncInboundMailItemsResource", - "InboundMailItemsResourceWithRawResponse", - "AsyncInboundMailItemsResourceWithRawResponse", - "InboundMailItemsResourceWithStreamingResponse", - "AsyncInboundMailItemsResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", @@ -382,6 +376,12 @@ "AsyncDocumentsResourceWithRawResponse", "DocumentsResourceWithStreamingResponse", "AsyncDocumentsResourceWithStreamingResponse", + "InboundMailItemsResource", + "AsyncInboundMailItemsResource", + "InboundMailItemsResourceWithRawResponse", + "AsyncInboundMailItemsResourceWithRawResponse", + "InboundMailItemsResourceWithStreamingResponse", + "AsyncInboundMailItemsResourceWithStreamingResponse", "ProgramsResource", "AsyncProgramsResource", "ProgramsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 07bbbd281..4f922e980 100755 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -245,10 +245,6 @@ def check_transfers(self) -> CheckTransfersResource: def inbound_check_deposits(self) -> InboundCheckDepositsResource: return InboundCheckDepositsResource(self._client) - @cached_property - def inbound_mail_items(self) -> InboundMailItemsResource: - return InboundMailItemsResource(self._client) - @cached_property def check_deposits(self) -> CheckDepositsResource: return CheckDepositsResource(self._client) @@ -329,6 +325,10 @@ def account_statements(self) -> AccountStatementsResource: def documents(self) -> DocumentsResource: return DocumentsResource(self._client) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResource: + return InboundMailItemsResource(self._client) + @cached_property def programs(self) -> ProgramsResource: return ProgramsResource(self._client) @@ -363,10 +363,6 @@ def check_transfers(self) -> AsyncCheckTransfersResource: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: return AsyncInboundCheckDepositsResource(self._client) - @cached_property - def inbound_mail_items(self) -> AsyncInboundMailItemsResource: - return AsyncInboundMailItemsResource(self._client) - @cached_property def check_deposits(self) -> AsyncCheckDepositsResource: return AsyncCheckDepositsResource(self._client) @@ -447,6 +443,10 @@ def account_statements(self) -> AsyncAccountStatementsResource: def documents(self) -> AsyncDocumentsResource: return AsyncDocumentsResource(self._client) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResource: + return AsyncInboundMailItemsResource(self._client) + @cached_property def programs(self) -> AsyncProgramsResource: return AsyncProgramsResource(self._client) @@ -484,10 +484,6 @@ def check_transfers(self) -> CheckTransfersResourceWithRawResponse: def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) - @cached_property - def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: - return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) - @cached_property def check_deposits(self) -> CheckDepositsResourceWithRawResponse: return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -570,6 +566,10 @@ def account_statements(self) -> AccountStatementsResourceWithRawResponse: def documents(self) -> DocumentsResourceWithRawResponse: return DocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property def programs(self) -> ProgramsResourceWithRawResponse: return ProgramsResourceWithRawResponse(self._simulations.programs) @@ -599,10 +599,6 @@ def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) - @cached_property - def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: - return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) - @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -687,6 +683,10 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: def documents(self) -> AsyncDocumentsResourceWithRawResponse: return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property def programs(self) -> AsyncProgramsResourceWithRawResponse: return AsyncProgramsResourceWithRawResponse(self._simulations.programs) @@ -716,10 +716,6 @@ def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) - @cached_property - def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: - return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) - @cached_property def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @@ -806,6 +802,10 @@ def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: def documents(self) -> DocumentsResourceWithStreamingResponse: return DocumentsResourceWithStreamingResponse(self._simulations.documents) + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property def programs(self) -> ProgramsResourceWithStreamingResponse: return ProgramsResourceWithStreamingResponse(self._simulations.programs) @@ -835,10 +835,6 @@ def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) - @cached_property - def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: - return AsyncInboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) - @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @@ -931,6 +927,10 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingRespo def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + return AsyncInboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property def programs(self) -> AsyncProgramsResourceWithStreamingResponse: return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) From 9323fd4ff7f09691c23fda8750c7def75b51f000 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:05:11 +0000 Subject: [PATCH 0159/1325] feat(api): OpenAPI spec update via Stainless API (#607) --- .stats.yml | 2 +- src/increase/types/account_number_create_params.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3549a8b35..13ee7e3a2 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-34f96c602cafda11d1091e74f895d7e25b0c6b9b11916208e6cf8fa2bcf3d9b3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ea3d8bed68506ace415614d345b6bbc65b7e25275ef2fb824210994e461728e.yml diff --git a/src/increase/types/account_number_create_params.py b/src/increase/types/account_number_create_params.py index 7c394f8da..15a4d8682 100755 --- a/src/increase/types/account_number_create_params.py +++ b/src/increase/types/account_number_create_params.py @@ -29,7 +29,8 @@ class InboundACH(TypedDict, total=False): """Whether ACH debits are allowed against this Account Number. Note that ACH debits will be declined if this is `allowed` but the Account - Number is not active. + Number is not active. If you do not specify this field, the default is + `allowed`. - `allowed` - ACH Debits are allowed. - `blocked` - ACH Debits are blocked. @@ -40,6 +41,8 @@ class InboundChecks(TypedDict, total=False): status: Required[Literal["allowed", "check_transfers_only"]] """How Increase should process checks with this account number printed on them. + If you do not specify this field, the default is `check_transfers_only`. + - `allowed` - Checks with this Account Number will be processed even if they are not associated with a Check Transfer. - `check_transfers_only` - Checks with this Account Number will be processed From c0371d8ca77b154e8404f17cb46621862f6a7d5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 17:06:28 +0000 Subject: [PATCH 0160/1325] chore(internal): version bump (#608) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d486cde74..ca93fdaad 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.96.0" + ".": "0.97.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0d61971c8..9f0610ac9 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.96.0" +version = "0.97.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 60e4398bc..8fef38e0a 100755 --- 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.96.0" # x-release-please-version +__version__ = "0.97.0" # x-release-please-version From 5e513eca906077a6bea929834ce80d926c9a2609 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:46:28 +0000 Subject: [PATCH 0161/1325] feat(api): OpenAPI spec update via Stainless API (#609) --- .stats.yml | 2 +- src/increase/_exceptions.py | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 13ee7e3a2..8afba5d44 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ea3d8bed68506ace415614d345b6bbc65b7e25275ef2fb824210994e461728e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-517dbb7310b0f6eab6b9c5734e641399960fdbf1c92b026bd71fdfe9d9b31026.yml diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index 49268f339..fa95ba66f 100755 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -166,6 +166,15 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N class InvalidAPIKeyError(AuthenticationError): detail: Optional[str] = None + reason: Literal["deleted_credential", "expired_credential", "no_credential", "no_header", "wrong_environment"] + """ + - `deleted_credential` - deleted_credential + - `expired_credential` - expired_credential + - `no_credential` - no_credential + - `no_header` - no_header + - `wrong_environment` - wrong_environment + """ + status: Literal[401] title: str @@ -179,6 +188,15 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N self.title = title self.detail = cast(Any, construct_type(type_=Optional[str], value=data.get("detail"))) + self.reason = cast( + Any, + construct_type( + type_=Literal[ + "deleted_credential", "expired_credential", "no_credential", "no_header", "wrong_environment" + ], + value=data.get("reason"), + ), + ) self.status = cast(Any, construct_type(type_=Literal[401], value=data.get("status"))) self.type = cast(Any, construct_type(type_=Literal["invalid_api_key_error"], value=data.get("type"))) From 1d998eb392e93efad22b2b27c46f935a8a8d6d7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:47:38 +0000 Subject: [PATCH 0162/1325] chore(internal): codegen related update (#611) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ca93fdaad..a81246476 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.97.0" + ".": "0.98.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9f0610ac9..cab2b6ef4 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.97.0" +version = "0.98.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8fef38e0a..20aa4a88e 100755 --- 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.97.0" # x-release-please-version +__version__ = "0.98.0" # x-release-please-version From 5c24fa122cf6be4a5c116bf092448a4ab53ce0b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 20:50:35 +0000 Subject: [PATCH 0163/1325] chore: reorder properties (#612) --- src/increase/_exceptions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index fa95ba66f..4c6280428 100755 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -136,10 +136,10 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N title = cast(Any, construct_type(type_=str, value=data.get("title"))) super().__init__(title or message, response=response, body=body) + self.title = title self.detail = cast(Any, construct_type(type_=Optional[str], value=data.get("detail"))) self.errors = cast(Any, construct_type(type_=List[object], value=data.get("errors"))) self.status = cast(Any, construct_type(type_=Literal[400], value=data.get("status"))) - self.title = title self.type = cast(Any, construct_type(type_=Literal["invalid_parameters_error"], value=data.get("type"))) From 5e808ca736b818e5d8b841196f08e8a66185b9f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:23:52 +0000 Subject: [PATCH 0164/1325] feat(api): OpenAPI spec update via Stainless API (#614) --- .stats.yml | 4 +- api.md | 13 + src/increase/_client.py | 22 ++ src/increase/resources/__init__.py | 14 + src/increase/resources/event_subscriptions.py | 12 + .../inbound_real_time_payments_transfers.py | 284 ++++++++++++++++++ .../simulations/inbound_mail_items.py | 10 + src/increase/types/__init__.py | 4 + src/increase/types/account.py | 3 +- src/increase/types/event.py | 6 + src/increase/types/event_list_params.py | 2 + src/increase/types/event_subscription.py | 6 + .../types/event_subscription_create_params.py | 6 + .../inbound_real_time_payments_transfer.py | 74 +++++ ...real_time_payments_transfer_list_params.py | 62 ++++ .../inbound_mail_item_create_params.py | 6 + .../simulations/test_inbound_mail_items.py | 18 ++ ...st_inbound_real_time_payments_transfers.py | 202 +++++++++++++ 18 files changed, 745 insertions(+), 3 deletions(-) create mode 100755 src/increase/resources/inbound_real_time_payments_transfers.py create mode 100755 src/increase/types/inbound_real_time_payments_transfer.py create mode 100755 src/increase/types/inbound_real_time_payments_transfer_list_params.py create mode 100755 tests/api_resources/test_inbound_real_time_payments_transfers.py diff --git a/.stats.yml b/.stats.yml index 8afba5d44..7f5e2ee28 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-517dbb7310b0f6eab6b9c5734e641399960fdbf1c92b026bd71fdfe9d9b31026.yml +configured_endpoints: 198 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9be6da506b5249e2964d1bbaa9d24a60b66bd6c3b0fc4075229b8de9cd573114.yml diff --git a/api.md b/api.md index ae6fd9540..bec183554 100755 --- a/api.md +++ b/api.md @@ -349,6 +349,19 @@ Methods: - client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] +# InboundRealTimePaymentsTransfers + +Types: + +```python +from increase.types import InboundRealTimePaymentsTransfer +``` + +Methods: + +- client.inbound_real_time_payments_transfers.retrieve(inbound_real_time_payments_transfer_id) -> InboundRealTimePaymentsTransfer +- client.inbound_real_time_payments_transfers.list(\*\*params) -> SyncPage[InboundRealTimePaymentsTransfer] + # CheckDeposits Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 311788c4f..e1cff4fb1 100755 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -77,6 +77,7 @@ class Increase(SyncAPIClient): check_transfers: resources.CheckTransfersResource inbound_check_deposits: resources.InboundCheckDepositsResource real_time_payments_transfers: resources.RealTimePaymentsTransfersResource + inbound_real_time_payments_transfers: resources.InboundRealTimePaymentsTransfersResource check_deposits: resources.CheckDepositsResource lockboxes: resources.LockboxesResource inbound_mail_items: resources.InboundMailItemsResource @@ -220,6 +221,7 @@ def __init__( self.check_transfers = resources.CheckTransfersResource(self) self.inbound_check_deposits = resources.InboundCheckDepositsResource(self) self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResource(self) + self.inbound_real_time_payments_transfers = resources.InboundRealTimePaymentsTransfersResource(self) self.check_deposits = resources.CheckDepositsResource(self) self.lockboxes = resources.LockboxesResource(self) self.inbound_mail_items = resources.InboundMailItemsResource(self) @@ -430,6 +432,7 @@ class AsyncIncrease(AsyncAPIClient): check_transfers: resources.AsyncCheckTransfersResource inbound_check_deposits: resources.AsyncInboundCheckDepositsResource real_time_payments_transfers: resources.AsyncRealTimePaymentsTransfersResource + inbound_real_time_payments_transfers: resources.AsyncInboundRealTimePaymentsTransfersResource check_deposits: resources.AsyncCheckDepositsResource lockboxes: resources.AsyncLockboxesResource inbound_mail_items: resources.AsyncInboundMailItemsResource @@ -573,6 +576,7 @@ def __init__( self.check_transfers = resources.AsyncCheckTransfersResource(self) self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResource(self) self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResource(self) + self.inbound_real_time_payments_transfers = resources.AsyncInboundRealTimePaymentsTransfersResource(self) self.check_deposits = resources.AsyncCheckDepositsResource(self) self.lockboxes = resources.AsyncLockboxesResource(self) self.inbound_mail_items = resources.AsyncInboundMailItemsResource(self) @@ -800,6 +804,9 @@ def __init__(self, client: Increase) -> None: self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( client.real_time_payments_transfers ) + self.inbound_real_time_payments_transfers = resources.InboundRealTimePaymentsTransfersResourceWithRawResponse( + client.inbound_real_time_payments_transfers + ) self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) @@ -898,6 +905,11 @@ def __init__(self, client: AsyncIncrease) -> None: self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( client.real_time_payments_transfers ) + self.inbound_real_time_payments_transfers = ( + resources.AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + client.inbound_real_time_payments_transfers + ) + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) @@ -998,6 +1010,11 @@ def __init__(self, client: Increase) -> None: self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( client.real_time_payments_transfers ) + self.inbound_real_time_payments_transfers = ( + resources.InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + client.inbound_real_time_payments_transfers + ) + ) self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) @@ -1098,6 +1115,11 @@ def __init__(self, client: AsyncIncrease) -> None: self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( client.real_time_payments_transfers ) + self.inbound_real_time_payments_transfers = ( + resources.AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + client.inbound_real_time_payments_transfers + ) + ) self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index ea6da25e1..20f887773 100755 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -400,6 +400,14 @@ ProofOfAuthorizationRequestsResourceWithStreamingResponse, AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse, ) +from .inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + InboundRealTimePaymentsTransfersResourceWithRawResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, +) from .real_time_payments_request_for_payments import ( RealTimePaymentsRequestForPaymentsResource, AsyncRealTimePaymentsRequestForPaymentsResource, @@ -562,6 +570,12 @@ "AsyncRealTimePaymentsTransfersResourceWithRawResponse", "RealTimePaymentsTransfersResourceWithStreamingResponse", "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundRealTimePaymentsTransfersResource", + "AsyncInboundRealTimePaymentsTransfersResource", + "InboundRealTimePaymentsTransfersResourceWithRawResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", + "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 835fda6ee..1a3718a91 100755 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -97,6 +97,8 @@ def create( "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -223,6 +225,10 @@ def create( updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is @@ -529,6 +535,8 @@ async def create( "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -655,6 +663,10 @@ async def create( updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py new file mode 100755 index 000000000..7804d75d8 --- /dev/null +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -0,0 +1,284 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import inbound_real_time_payments_transfer_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer + +__all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] + + +class InboundRealTimePaymentsTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + def retrieve( + self, + inbound_real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundRealTimePaymentsTransfer: + """ + Retrieve an Inbound Real-Time Payments Transfer + + Args: + inbound_real_time_payments_transfer_id: The identifier of the Inbound Real-Time Payments Transfer to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received {inbound_real_time_payments_transfer_id!r}" + ) + return self._get( + f"/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundRealTimePaymentsTransfer, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + account_number_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[InboundRealTimePaymentsTransfer]: + """ + List Inbound Real-Time Payments Transfers + + Args: + account_id: Filter Inbound Real-Time Payments Transfers to those belonging to the specified + Account. + + account_number_id: Filter Inbound Real-Time Payments Transfers to ones belonging to the specified + Account Number. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_real_time_payments_transfers", + page=SyncPage[InboundRealTimePaymentsTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "account_number_id": account_number_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, + ), + ), + model=InboundRealTimePaymentsTransfer, + ) + + +class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) + + async def retrieve( + self, + inbound_real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> InboundRealTimePaymentsTransfer: + """ + Retrieve an Inbound Real-Time Payments Transfer + + Args: + inbound_real_time_payments_transfer_id: The identifier of the Inbound Real-Time Payments Transfer to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received {inbound_real_time_payments_transfer_id!r}" + ) + return await self._get( + f"/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundRealTimePaymentsTransfer, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + account_number_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[InboundRealTimePaymentsTransfer, AsyncPage[InboundRealTimePaymentsTransfer]]: + """ + List Inbound Real-Time Payments Transfers + + Args: + account_id: Filter Inbound Real-Time Payments Transfers to those belonging to the specified + Account. + + account_number_id: Filter Inbound Real-Time Payments Transfers to ones belonging to the specified + Account Number. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_real_time_payments_transfers", + page=AsyncPage[InboundRealTimePaymentsTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "account_number_id": account_number_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, + ), + ), + model=InboundRealTimePaymentsTransfer, + ) + + +class InboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.retrieve = to_raw_response_wrapper( + inbound_real_time_payments_transfers.retrieve, + ) + self.list = to_raw_response_wrapper( + inbound_real_time_payments_transfers.list, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.retrieve = async_to_raw_response_wrapper( + inbound_real_time_payments_transfers.retrieve, + ) + self.list = async_to_raw_response_wrapper( + inbound_real_time_payments_transfers.list, + ) + + +class InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: InboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.retrieve = to_streamed_response_wrapper( + inbound_real_time_payments_transfers.retrieve, + ) + self.list = to_streamed_response_wrapper( + inbound_real_time_payments_transfers.list, + ) + + +class AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + def __init__(self, inbound_real_time_payments_transfers: AsyncInboundRealTimePaymentsTransfersResource) -> None: + self._inbound_real_time_payments_transfers = inbound_real_time_payments_transfers + + self.retrieve = async_to_streamed_response_wrapper( + inbound_real_time_payments_transfers.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + inbound_real_time_payments_transfers.list, + ) diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py index 77f7aa693..043daaba4 100755 --- a/src/increase/resources/simulations/inbound_mail_items.py +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -38,6 +38,7 @@ def create( *, amount: int, lockbox_id: str, + contents_file_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -55,6 +56,9 @@ def create( lockbox_id: The identifier of the Lockbox to simulate inbound mail to. + contents_file_id: The file containing the PDF contents. If not present, a default check image file + will be used. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -71,6 +75,7 @@ def create( { "amount": amount, "lockbox_id": lockbox_id, + "contents_file_id": contents_file_id, }, inbound_mail_item_create_params.InboundMailItemCreateParams, ), @@ -99,6 +104,7 @@ async def create( *, amount: int, lockbox_id: str, + contents_file_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -116,6 +122,9 @@ async def create( lockbox_id: The identifier of the Lockbox to simulate inbound mail to. + contents_file_id: The file containing the PDF contents. If not present, a default check image file + will be used. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -132,6 +141,7 @@ async def create( { "amount": amount, "lockbox_id": lockbox_id, + "contents_file_id": contents_file_id, }, inbound_mail_item_create_params.InboundMailItemCreateParams, ), diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 412ea7621..57c1fc491 100755 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -134,6 +134,7 @@ from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams +from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer as InboundRealTimePaymentsTransfer from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams @@ -174,6 +175,9 @@ from .entity_update_beneficial_owner_address_params import ( EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, ) +from .inbound_real_time_payments_transfer_list_params import ( + InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, +) from .real_time_payments_request_for_payment_list_params import ( RealTimePaymentsRequestForPaymentListParams as RealTimePaymentsRequestForPaymentListParams, ) diff --git a/src/increase/types/account.py b/src/increase/types/account.py index d59fe0bf1..ef6c2f5c8 100755 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,11 +13,12 @@ class Account(BaseModel): id: str """The Account identifier.""" - bank: Literal["blue_ridge_bank", "first_internet_bank"] + bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] """The bank the Account is with. - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `first_internet_bank` - First Internet Bank of Indiana + - `grasshopper_bank` - Grasshopper Bank """ closed_at: Optional[datetime] = None diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 33fc17af2..fbc70fd66 100755 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -70,6 +70,8 @@ class Event(BaseModel): "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -179,6 +181,10 @@ class Event(BaseModel): updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 9006fa168..bc83102cf 100755 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -85,6 +85,8 @@ class EventListParams(TypedDict, total=False): "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 3fe5ff1cd..71933e9bd 100755 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -83,6 +83,8 @@ class EventSubscription(BaseModel): "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -192,6 +194,10 @@ class EventSubscription(BaseModel): updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index f5b015bd6..d0eb43841 100755 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -69,6 +69,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "inbound_check_deposit.updated", "inbound_mail_item.created", "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", "inbound_wire_drawdown_request.created", "inbound_wire_transfer.created", "inbound_wire_transfer.updated", @@ -177,6 +179,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire Drawdown Request is created. - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py new file mode 100755 index 000000000..de10fcd54 --- /dev/null +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["InboundRealTimePaymentsTransfer"] + + +class InboundRealTimePaymentsTransfer(BaseModel): + id: str + """The inbound Real-Time Payments transfer's identifier.""" + + account_id: str + """The Account to which the transfer was sent.""" + + account_number_id: str + """The identifier of the Account Number to which this transfer was sent.""" + + amount: int + """The amount in USD cents.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's + currency. This will always be "USD" for a Real-Time Payments transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + status: Literal["pending_confirmation", "timed_out", "confirmed"] + """The lifecycle status of the transfer. + + - `pending_confirmation` - The transfer is pending confirmation. + - `timed_out` - Your webhook failed to respond to the transfer in time. + - `confirmed` - The transfer has been received successfully and is confirmed. + """ + + transaction_identification: str + """The Real-Time Payments network identification of the transfer.""" + + type: Literal["inbound_real_time_payments_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_real_time_payments_transfer`. + """ diff --git a/src/increase/types/inbound_real_time_payments_transfer_list_params.py b/src/increase/types/inbound_real_time_payments_transfer_list_params.py new file mode 100755 index 000000000..ed6a7cd19 --- /dev/null +++ b/src/increase/types/inbound_real_time_payments_transfer_list_params.py @@ -0,0 +1,62 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["InboundRealTimePaymentsTransferListParams", "CreatedAt"] + + +class InboundRealTimePaymentsTransferListParams(TypedDict, total=False): + account_id: str + """ + Filter Inbound Real-Time Payments Transfers to those belonging to the specified + Account. + """ + + account_number_id: str + """ + Filter Inbound Real-Time Payments Transfers to ones belonging to the specified + Account Number. + """ + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/simulations/inbound_mail_item_create_params.py b/src/increase/types/simulations/inbound_mail_item_create_params.py index 2957999b4..bbbc2ef15 100755 --- a/src/increase/types/simulations/inbound_mail_item_create_params.py +++ b/src/increase/types/simulations/inbound_mail_item_create_params.py @@ -13,3 +13,9 @@ class InboundMailItemCreateParams(TypedDict, total=False): lockbox_id: Required[str] """The identifier of the Lockbox to simulate inbound mail to.""" + + contents_file_id: str + """The file containing the PDF contents. + + If not present, a default check image file will be used. + """ diff --git a/tests/api_resources/simulations/test_inbound_mail_items.py b/tests/api_resources/simulations/test_inbound_mail_items.py index df49ef85b..85ffce184 100755 --- a/tests/api_resources/simulations/test_inbound_mail_items.py +++ b/tests/api_resources/simulations/test_inbound_mail_items.py @@ -25,6 +25,15 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_mail_item = client.simulations.inbound_mail_items.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + contents_file_id="contents_file_id", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.simulations.inbound_mail_items.with_raw_response.create( @@ -63,6 +72,15 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.simulations.inbound_mail_items.create( + amount=1000, + lockbox_id="lockbox_3xt21ok13q19advds4t5", + contents_file_id="contents_file_id", + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.inbound_mail_items.with_raw_response.create( diff --git a/tests/api_resources/test_inbound_real_time_payments_transfers.py b/tests/api_resources/test_inbound_real_time_payments_transfers.py new file mode 100755 index 000000000..017710247 --- /dev/null +++ b/tests/api_resources/test_inbound_real_time_payments_transfers.py @@ -0,0 +1,202 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundRealTimePaymentsTransfer +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.retrieve( + "inbound_real_time_payments_transfer_id", + ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.inbound_real_time_payments_transfers.with_raw_response.retrieve( + "inbound_real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = response.parse() + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.inbound_real_time_payments_transfers.with_streaming_response.retrieve( + "inbound_real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = response.parse() + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received ''" + ): + client.inbound_real_time_payments_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.list() + assert_matches_type( + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.list( + account_id="account_id", + account_number_id="account_number_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type( + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.inbound_real_time_payments_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.inbound_real_time_payments_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = response.parse() + assert_matches_type( + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundRealTimePaymentsTransfers: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.retrieve( + "inbound_real_time_payments_transfer_id", + ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_real_time_payments_transfers.with_raw_response.retrieve( + "inbound_real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_real_time_payments_transfers.with_streaming_response.retrieve( + "inbound_real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received ''" + ): + await async_client.inbound_real_time_payments_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.list() + assert_matches_type( + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.list( + account_id="account_id", + account_number_id="account_number_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type( + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_real_time_payments_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_real_time_payments_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_real_time_payments_transfer = await response.parse() + assert_matches_type( + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + ) + + assert cast(Any, response.is_closed) is True From 29145b5876acd6d44b02b9886abfcf4fc3fc6e39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 20:25:02 +0000 Subject: [PATCH 0165/1325] chore(internal): version bump (#615) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a81246476..a579a4349 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.98.0" + ".": "0.99.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cab2b6ef4..89cc63c4e 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.98.0" +version = "0.99.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 20aa4a88e..7a8d40aee 100755 --- 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.98.0" # x-release-please-version +__version__ = "0.99.0" # x-release-please-version From d7fe5594a72facc65a6b67c8dbeb11df33d33a64 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:23:14 +0000 Subject: [PATCH 0166/1325] feat(api): OpenAPI spec update via Stainless API (#616) --- .stats.yml | 2 +- src/increase/types/program.py | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 7f5e2ee28..a81e16cd1 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9be6da506b5249e2964d1bbaa9d24a60b66bd6c3b0fc4075229b8de9cd573114.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5be75061e3fb5010affba3a67f56c2c22c15bd618b9d25559c6e5864f0cf194.yml diff --git a/src/increase/types/program.py b/src/increase/types/program.py index f040684a4..bf8c2f6f9 100755 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -13,6 +13,14 @@ class Program(BaseModel): id: str """The Program identifier.""" + bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] + """The Bank the Program is with. + + - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `first_internet_bank` - First Internet Bank of Indiana + - `grasshopper_bank` - Grasshopper Bank + """ + billing_account_id: Optional[str] = None """The Program billing account.""" From e516451d6eaf42e6f2052a70b69e9e750f75788c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Aug 2024 21:24:27 +0000 Subject: [PATCH 0167/1325] chore(internal): version bump (#618) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a579a4349..97d8dbba5 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.99.0" + ".": "0.100.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 89cc63c4e..1763c197b 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.99.0" +version = "0.100.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7a8d40aee..55cdb4385 100755 --- 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.99.0" # x-release-please-version +__version__ = "0.100.0" # x-release-please-version From d83ce9ce7abd33c4cd4cf0c6bfcff1abd3f14661 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 03:17:46 +0000 Subject: [PATCH 0168/1325] feat(api): OpenAPI spec update via Stainless API (#619) --- .stats.yml | 2 +- src/increase/resources/ach_transfers.py | 4 ++-- src/increase/types/ach_transfer.py | 4 ++-- src/increase/types/ach_transfer_create_params.py | 4 ++-- src/increase/types/card_payment.py | 2 +- src/increase/types/export_create_params.py | 2 +- src/increase/types/pending_transaction.py | 2 +- src/increase/types/transaction.py | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index a81e16cd1..c68c5f59f 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5be75061e3fb5010affba3a67f56c2c22c15bd618b9d25559c6e5864f0cf194.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-53447b624f3cafd358313aa743f4614b9c949f2254ea98592bcf7663a9c41ae5.yml diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index d073fbfe1..45a46fbb4 100755 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -127,7 +127,7 @@ def create( preferred_effective_date: Configuration for how the effective date of the transfer will be set. This determines same-day vs future-dated settlement timing. If not set, defaults to a - `settlement_schedule` of `same_day`. If set, exactly one of the child atributes + `settlement_schedule` of `same_day`. If set, exactly one of the child attributes must be set. require_approval: Whether the transfer requires explicit approval via the dashboard or API. @@ -472,7 +472,7 @@ async def create( preferred_effective_date: Configuration for how the effective date of the transfer will be set. This determines same-day vs future-dated settlement timing. If not set, defaults to a - `settlement_schedule` of `same_day`. If set, exactly one of the child atributes + `settlement_schedule` of `same_day`. If set, exactly one of the child attributes must be set. require_approval: Whether the transfer requires explicit approval via the dashboard or API. diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index e65628311..426013380 100755 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -298,7 +298,7 @@ class PreferredEffectiveDate(BaseModel): """ settlement_schedule: Optional[Literal["same_day", "future_dated"]] = None - """A schedule by which Increase whill choose an effective date for the transfer. + """A schedule by which Increase will choose an effective date for the transfer. - `same_day` - The chosen effective date will be the same as the ACH processing date on which the transfer is submitted. This is necessary, but not sufficient @@ -739,7 +739,7 @@ class ACHTransfer(BaseModel): This determines same-day vs future-dated settlement timing. If not set, defaults to a `settlement_schedule` of `same_day`. If set, exactly one of the child - atributes must be set. + attributes must be set. """ return_: Optional[Return] = FieldInfo(alias="return", default=None) diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index 62dcee6fd..2439b2993 100755 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -113,7 +113,7 @@ class ACHTransferCreateParams(TypedDict, total=False): This determines same-day vs future-dated settlement timing. If not set, defaults to a `settlement_schedule` of `same_day`. If set, exactly one of the child - atributes must be set. + attributes must be set. """ require_approval: bool @@ -200,7 +200,7 @@ class PreferredEffectiveDate(TypedDict, total=False): """ settlement_schedule: Literal["same_day", "future_dated"] - """A schedule by which Increase whill choose an effective date for the transfer. + """A schedule by which Increase will choose an effective date for the transfer. - `same_day` - The chosen effective date will be the same as the ACH processing date on which the transfer is submitted. This is necessary, but not sufficient diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 42dd2c6cd..45b3a9345 100755 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -284,7 +284,7 @@ class ElementCardAuthorization(BaseModel): direction: Literal["settlement", "refund"] """ - The direction descibes the direction the funds will move, either from the + The direction describes the direction the funds will move, either from the cardholder to the merchant or from the merchant to the cardholder. - `settlement` - A regular card authorization where funds are debited from the diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 5105c8c00..2e0d1312e 100755 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -184,7 +184,7 @@ class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): class BookkeepingAccountBalanceCsv(TypedDict, total=False): bookkeeping_account_id: str - """Filter exported Transactions to the specified BookkeepingAccount.""" + """Filter exported Transactions to the specified Bookkeeping Account.""" created_at: BookkeepingAccountBalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 4c8bfd754..ac9770f35 100755 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -284,7 +284,7 @@ class SourceCardAuthorization(BaseModel): direction: Literal["settlement", "refund"] """ - The direction descibes the direction the funds will move, either from the + The direction describes the direction the funds will move, either from the cardholder to the merchant or from the merchant to the cardholder. - `settlement` - A regular card authorization where funds are debited from the diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index f7c6585cb..d78d4c60c 100755 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1787,7 +1787,7 @@ class SourceInboundACHTransfer(BaseModel): """A name set by the originator to identify themselves.""" receiver_id_number: Optional[str] = None - """The originator's identifier for the transfer receipient.""" + """The originator's identifier for the transfer recipient.""" receiver_name: Optional[str] = None """The name of the transfer recipient. From a86f9e37cf544ee961bbb660af52f7607116fa07 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Aug 2024 03:19:05 +0000 Subject: [PATCH 0169/1325] chore(internal): codegen related update (#621) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 97d8dbba5..aebbc8bc4 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.100.0" + ".": "0.101.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1763c197b..4d4597dd4 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.100.0" +version = "0.101.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 55cdb4385..663a2e1eb 100755 --- 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.100.0" # x-release-please-version +__version__ = "0.101.0" # x-release-please-version From 3818d9bb03bebdb2b5a9c163186a6be819378896 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:52:54 +0000 Subject: [PATCH 0170/1325] feat(api): OpenAPI spec update via Stainless API (#622) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 47 ++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c68c5f59f..509566ddc 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-53447b624f3cafd358313aa743f4614b9c949f2254ea98592bcf7663a9c41ae5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-027e2b0f8db78dbcafc1f67ecc5c7ea845a0319d72f7c81d1efc6b5583602775.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 45b3a9345..db66a3f54 100755 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1529,6 +1529,37 @@ class ElementCardReversal(BaseModel): - `USD` - US Dollar (USD) """ + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: Optional[str] = None + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + network: Literal["visa"] """The card network used to process this card authorization. @@ -1547,6 +1578,22 @@ class ElementCardReversal(BaseModel): For dollars, for example, this is cents. """ + reversal_reason: Optional[ + Literal[ + "reversed_by_customer", "reversed_by_network_or_acquirer", "reversed_by_point_of_sale", "partial_reversal" + ] + ] = None + """Why this reversal was initiated. + + - `reversed_by_customer` - The Card Reversal was initiated at the customer's + request. + - `reversed_by_network_or_acquirer` - The Card Reversal was initiated by the + network or acquirer. + - `reversed_by_point_of_sale` - The Card Reversal was initiated by the point of + sale device. + - `partial_reversal` - The Card Reversal was a partial reversal, for any reason. + """ + type: Literal["card_reversal"] """A constant representing the object's type. From 9dbcdeff698e3f91b4a216962fd1a4285aa3bc76 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 20:53:47 +0000 Subject: [PATCH 0171/1325] wip (#624) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aebbc8bc4..f70d9978a 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.101.0" + ".": "0.102.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4d4597dd4..fb234ebb6 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.101.0" +version = "0.102.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 663a2e1eb..c19136835 100755 --- 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.101.0" # x-release-please-version +__version__ = "0.102.0" # x-release-please-version From 948672536e1974f51dfb26c0ebef6490db22636c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Aug 2024 21:03:29 +0000 Subject: [PATCH 0172/1325] chore(internal): version bump (#625) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 509566ddc..4616f4260 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-027e2b0f8db78dbcafc1f67ecc5c7ea845a0319d72f7c81d1efc6b5583602775.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7227b7d7f16e0608139d0d463232f1056d5f11efc8f5c419570ea1ff4d1894be.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index db66a3f54..564386a70 100755 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1535,7 +1535,7 @@ class ElementCardReversal(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. From ffdfc99c42a49ba977ee1de92a171b0a1f16edcb Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sun, 1 Sep 2024 16:05:06 +0000 Subject: [PATCH 0173/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4616f4260..466237492 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7227b7d7f16e0608139d0d463232f1056d5f11efc8f5c419570ea1ff4d1894be.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f886c65c4cfab7e4e825310adcf33888995374a5b96a57cab3ea77b90cf6398c.yml From 8a572a55a5f7a11370f32c7f51ec2bf7a33d50a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 19:29:13 +0000 Subject: [PATCH 0174/1325] chore: fix repo names (#628) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/increase/_files.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index ab7493a35..d889ddf37 100755 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 5d48f5e28..6ef88fffb 100755 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 546ed3883..6ee29f28f 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -pip install git+ssh://git@github.com/increase/increase-python.git +pip install git+ssh://git@github.com/Increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index baf181ed6..8a245ee9a 100755 --- a/README.md +++ b/README.md @@ -323,9 +323,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. +These methods return an [`APIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -423,7 +423,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index fb234ebb6..53bc519f2 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,8 @@ classifiers = [ [project.urls] -Homepage = "https://github.com/increase/increase-python" -Repository = "https://github.com/increase/increase-python" +Homepage = "https://github.com/Increase/increase-python" +Repository = "https://github.com/Increase/increase-python" @@ -127,7 +127,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' [tool.black] line-length = 120 diff --git a/src/increase/_files.py b/src/increase/_files.py index 04772912b..e0ed1db41 100755 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/increase/increase-python/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/Increase/increase-python/tree/main#file-uploads" ) from None From 7b4bab684e67b3cb011fe07fa7127a73ec24c2ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Sep 2024 20:07:28 +0000 Subject: [PATCH 0175/1325] feat(api): OpenAPI spec update via Stainless API (#629) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/increase/_files.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index d889ddf37..ab7493a35 100755 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 6ef88fffb..5d48f5e28 100755 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ee29f28f..546ed3883 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -pip install git+ssh://git@github.com/Increase/increase-python.git +pip install git+ssh://git@github.com/increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index 8a245ee9a..baf181ed6 100755 --- a/README.md +++ b/README.md @@ -323,9 +323,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`APIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) object. +These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -423,7 +423,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index 53bc519f2..fb234ebb6 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,8 +39,8 @@ classifiers = [ [project.urls] -Homepage = "https://github.com/Increase/increase-python" -Repository = "https://github.com/Increase/increase-python" +Homepage = "https://github.com/increase/increase-python" +Repository = "https://github.com/increase/increase-python" @@ -127,7 +127,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' [tool.black] line-length = 120 diff --git a/src/increase/_files.py b/src/increase/_files.py index e0ed1db41..04772912b 100755 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/Increase/increase-python/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/increase/increase-python/tree/main#file-uploads" ) from None From d0423d9604957a4aad2902e4f6fb9df4c66052f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:41:51 +0000 Subject: [PATCH 0176/1325] feat(api): OpenAPI spec update via Stainless API (#630) --- .stats.yml | 2 +- src/increase/types/inbound_real_time_payments_transfer.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 466237492..d6feb0a98 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f886c65c4cfab7e4e825310adcf33888995374a5b96a57cab3ea77b90cf6398c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cffef91710ed5a766780d648938d61ba27f3fd0aefd25072fc47627eedee9d34.yml diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index de10fcd54..613117139 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -56,12 +56,13 @@ class InboundRealTimePaymentsTransfer(BaseModel): remittance_information: Optional[str] = None """Additional information included with the transfer.""" - status: Literal["pending_confirmation", "timed_out", "confirmed"] + status: Literal["pending_confirmation", "timed_out", "confirmed", "declined"] """The lifecycle status of the transfer. - `pending_confirmation` - The transfer is pending confirmation. - `timed_out` - Your webhook failed to respond to the transfer in time. - `confirmed` - The transfer has been received successfully and is confirmed. + - `declined` - The transfer has been declined. """ transaction_identification: str From 7a9648140acd1ec57fd129213146719a24ae8a92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:43:01 +0000 Subject: [PATCH 0177/1325] chore(internal): codegen related update (#631) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f70d9978a..508a7081b 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.102.0" + ".": "0.103.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fb234ebb6..eb8b1fac0 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.102.0" +version = "0.103.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c19136835..3205f4fcb 100755 --- 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.102.0" # x-release-please-version +__version__ = "0.103.0" # x-release-please-version From 4cc1fa63cbbd1d18b85a06ff5f0ba781076f8609 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 22:47:35 +0000 Subject: [PATCH 0178/1325] chore: pyproject.toml formatting changes (#632) --- pyproject.toml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eb8b1fac0..8a1405436 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,7 +15,6 @@ dependencies = [ "distro>=1.7.0, <2", "sniffio", "cached-property; python_version < '3.8'", - ] requires-python = ">= 3.7" classifiers = [ @@ -36,8 +35,6 @@ classifiers = [ "License :: OSI Approved :: Apache Software License" ] - - [project.urls] Homepage = "https://github.com/increase/increase-python" Repository = "https://github.com/increase/increase-python" @@ -59,7 +56,6 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - ] [tool.rye.scripts] From d00488c79a1b2c9bd37b2e7b9270f4de5e6e7971 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 4 Sep 2024 23:34:19 +0000 Subject: [PATCH 0179/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d6feb0a98..00de376d8 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cffef91710ed5a766780d648938d61ba27f3fd0aefd25072fc47627eedee9d34.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2fc1b454db791a6e7d113f0bae82d7b723a1fbe420a3905c825fbfa94b8c1ec0.yml From 449aa8d753602ad76eec72ec20068a1f713df176 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:09:57 +0000 Subject: [PATCH 0180/1325] feat(api): OpenAPI spec update via Stainless API (#634) --- .stats.yml | 2 +- api.md | 8 +---- .../inbound_real_time_payments_transfers.py | 12 +++---- src/increase/types/simulations/__init__.py | 3 -- ..._time_payments_transfer_create_response.py | 34 ------------------ ...st_inbound_real_time_payments_transfers.py | 36 +++++-------------- 6 files changed, 16 insertions(+), 79 deletions(-) delete mode 100755 src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py diff --git a/.stats.yml b/.stats.yml index 00de376d8..dd2ad8883 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2fc1b454db791a6e7d113f0bae82d7b723a1fbe420a3905c825fbfa94b8c1ec0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db0d72b7db68f14092bff5b109a122f3d0ed83a4a1151318024429cfaadc8ead.yml diff --git a/api.md b/api.md index bec183554..139a02f43 100755 --- a/api.md +++ b/api.md @@ -799,15 +799,9 @@ Methods: ## InboundRealTimePaymentsTransfers -Types: - -```python -from increase.types.simulations import InboundRealTimePaymentsTransferCreateResponse -``` - Methods: -- client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransferCreateResponse +- client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransfer ## InboundFundsHolds diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index 209db6144..e9cfa5522 100755 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -19,9 +19,7 @@ ) from ..._base_client import make_request_options from ...types.simulations import inbound_real_time_payments_transfer_create_params -from ...types.simulations.inbound_real_time_payments_transfer_create_response import ( - InboundRealTimePaymentsTransferCreateResponse, -) +from ...types.inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer __all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] @@ -52,7 +50,7 @@ def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferCreateResponse: + ) -> InboundRealTimePaymentsTransfer: """Simulates an inbound Real-Time Payments transfer to your account. Real-Time @@ -105,7 +103,7 @@ def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundRealTimePaymentsTransferCreateResponse, + cast_to=InboundRealTimePaymentsTransfer, ) @@ -135,7 +133,7 @@ async def create( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundRealTimePaymentsTransferCreateResponse: + ) -> InboundRealTimePaymentsTransfer: """Simulates an inbound Real-Time Payments transfer to your account. Real-Time @@ -188,7 +186,7 @@ async def create( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundRealTimePaymentsTransferCreateResponse, + cast_to=InboundRealTimePaymentsTransfer, ) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 80e1f1cb2..390c5eae3 100755 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -44,6 +44,3 @@ from .inbound_real_time_payments_transfer_create_params import ( InboundRealTimePaymentsTransferCreateParams as InboundRealTimePaymentsTransferCreateParams, ) -from .inbound_real_time_payments_transfer_create_response import ( - InboundRealTimePaymentsTransferCreateResponse as InboundRealTimePaymentsTransferCreateResponse, -) diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py deleted file mode 100755 index 2e254b388..000000000 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_response.py +++ /dev/null @@ -1,34 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from typing_extensions import Literal - -from ..._models import BaseModel -from ..transaction import Transaction -from ..declined_transaction import DeclinedTransaction - -__all__ = ["InboundRealTimePaymentsTransferCreateResponse"] - - -class InboundRealTimePaymentsTransferCreateResponse(BaseModel): - declined_transaction: Optional[DeclinedTransaction] = None - """ - If the Real-Time Payments Transfer attempt fails, this will contain the - resulting [Declined Transaction](#declined-transactions) object. The Declined - Transaction's `source` will be of - `category: inbound_real_time_payments_transfer_decline`. - """ - - transaction: Optional[Transaction] = None - """ - If the Real-Time Payments Transfer attempt succeeds, this will contain the - resulting [Transaction](#transactions) object. The Transaction's `source` will - be of `category: inbound_real_time_payments_transfer_confirmation`. - """ - - type: Literal["inbound_real_time_payments_transfer_simulation_result"] - """A constant representing the object's type. - - For this resource it will always be - `inbound_real_time_payments_transfer_simulation_result`. - """ 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 7e547d239..27adb507d 100755 --- a/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py @@ -9,9 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types.simulations import ( - InboundRealTimePaymentsTransferCreateResponse, -) +from increase.types import InboundRealTimePaymentsTransfer base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,9 +23,7 @@ def test_method_create(self, client: Increase) -> None: account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=1000, ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: @@ -40,9 +36,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: remittance_information="x", request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: @@ -54,9 +48,7 @@ def test_raw_response_create(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize def test_streaming_response_create(self, client: Increase) -> None: @@ -68,9 +60,7 @@ def test_streaming_response_create(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -86,9 +76,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: amount=1000, ) ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -103,9 +91,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", ) ) - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @@ -117,9 +103,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: @@ -131,8 +115,6 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = await response.parse() - assert_matches_type( - InboundRealTimePaymentsTransferCreateResponse, inbound_real_time_payments_transfer, path=["response"] - ) + assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True From d4d4510b44277cc17a9ae83ced95585ef7578814 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 15:11:11 +0000 Subject: [PATCH 0181/1325] chore(internal): codegen related update (#635) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 508a7081b..19c0e9cca 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.103.0" + ".": "0.104.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8a1405436..75052bb71 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.103.0" +version = "0.104.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3205f4fcb..9e572decb 100755 --- 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.103.0" # x-release-please-version +__version__ = "0.104.0" # x-release-please-version From 0860d29a2875dd0d0d7a2788eeda0f0d4bd5eab3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:53:19 +0000 Subject: [PATCH 0182/1325] feat(api): OpenAPI spec update via Stainless API (#636) --- .stats.yml | 2 +- .../inbound_real_time_payments_transfer.py | 43 ++++++++++++++++++- 2 files changed, 43 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index dd2ad8883..41374fccc 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db0d72b7db68f14092bff5b109a122f3d0ed83a4a1151318024429cfaadc8ead.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eacedccde024bed42183f025a69985ed2cd8aaf334dc0b59491d883bc88f8bdf.yml diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index 613117139..f2f6fb8d7 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -6,7 +6,42 @@ from .._models import BaseModel -__all__ = ["InboundRealTimePaymentsTransfer"] +__all__ = ["InboundRealTimePaymentsTransfer", "Confirmation", "Decline"] + + +class Confirmation(BaseModel): + confirmed_at: datetime + """The time at which the transfer was confirmed.""" + + transaction_id: str + """The id of the transaction for the confirmed transfer.""" + + +class Decline(BaseModel): + declined_at: datetime + """The time at which the transfer was declined.""" + + declined_transaction_id: str + """The id of the transaction for the declined transfer.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "real_time_payments_not_enabled", + ] + """The reason for the transfer decline. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `real_time_payments_not_enabled` - Your account is not enabled to receive + Real-Time Payments transfers. + """ class InboundRealTimePaymentsTransfer(BaseModel): @@ -22,6 +57,9 @@ class InboundRealTimePaymentsTransfer(BaseModel): amount: int """The amount in USD cents.""" + confirmation: Optional[Confirmation] = None + """If your transfer is confirmed, this will contain details of the confirmation.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -53,6 +91,9 @@ class InboundRealTimePaymentsTransfer(BaseModel): debtor_routing_number: str """The routing number of the account that sent the transfer.""" + decline: Optional[Decline] = None + """If your transfer is declined, this will contain details of the decline.""" + remittance_information: Optional[str] = None """Additional information included with the transfer.""" From 5927e2f8926f232e435801073395d5081e6a77ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 16:54:19 +0000 Subject: [PATCH 0183/1325] chore(internal): version bump (#638) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 19c0e9cca..6b28bdb22 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.104.0" + ".": "0.105.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 75052bb71..1bf75fa63 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.104.0" +version = "0.105.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9e572decb..a11639929 100755 --- 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.104.0" # x-release-please-version +__version__ = "0.105.0" # x-release-please-version From eb648ba6486ee2af300b67471aa7ceb2b2d2ccaa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:23:34 +0000 Subject: [PATCH 0184/1325] feat(api): OpenAPI spec update via Stainless API (#639) --- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- CONTRIBUTING.md | 4 ++-- README.md | 6 +++--- pyproject.toml | 6 +++--- src/increase/_files.py | 2 +- 6 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index ab7493a35..d889ddf37 100755 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -1,6 +1,6 @@ # This workflow is triggered when a GitHub release is created. # It can also be run manually to re-publish to PyPI in case it failed for some reason. -# You can run this workflow by navigating to https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml +# You can run this workflow by navigating to https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml name: Publish PyPI on: workflow_dispatch: diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 5d48f5e28..6ef88fffb 100755 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -9,7 +9,7 @@ jobs: release_doctor: name: release doctor runs-on: ubuntu-latest - if: github.repository == 'increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') + if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 546ed3883..6ee29f28f 100755 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -59,7 +59,7 @@ If you’d like to use the repository from source, you can either install from g To install via git: ```bash -pip install git+ssh://git@github.com/increase/increase-python.git +pip install git+ssh://git@github.com/Increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -117,7 +117,7 @@ the changes aren't made through the automated pipeline, you may want to make rel ### Publish with a GitHub workflow -You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. +You can release to package managers by using [the `Publish PyPI` GitHub action](https://www.github.com/Increase/increase-python/actions/workflows/publish-pypi.yml). This requires a setup organization or repository secret to be set up. ### Publish manually diff --git a/README.md b/README.md index baf181ed6..8a245ee9a 100755 --- a/README.md +++ b/README.md @@ -323,9 +323,9 @@ account = response.parse() # get the object that `accounts.create()` would have print(account.id) ``` -These methods return an [`APIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) object. +These methods return an [`APIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) object. -The async client returns an [`AsyncAPIResponse`](https://github.com/increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. +The async client returns an [`AsyncAPIResponse`](https://github.com/Increase/increase-python/tree/main/src/increase/_response.py) with the same structure, the only difference being `await`able methods for reading the response content. #### `.with_streaming_response` @@ -423,7 +423,7 @@ This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) con We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. -We are keen for your feedback; please open an [issue](https://www.github.com/increase/increase-python/issues) with questions, bugs, or suggestions. +We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. ## Requirements diff --git a/pyproject.toml b/pyproject.toml index 1bf75fa63..0a8f21862 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -36,8 +36,8 @@ classifiers = [ ] [project.urls] -Homepage = "https://github.com/increase/increase-python" -Repository = "https://github.com/increase/increase-python" +Homepage = "https://github.com/Increase/increase-python" +Repository = "https://github.com/Increase/increase-python" @@ -123,7 +123,7 @@ path = "README.md" [[tool.hatch.metadata.hooks.fancy-pypi-readme.substitutions]] # replace relative links with absolute links pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' -replacement = '[\1](https://github.com/increase/increase-python/tree/main/\g<2>)' +replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' [tool.black] line-length = 120 diff --git a/src/increase/_files.py b/src/increase/_files.py index 04772912b..e0ed1db41 100755 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -34,7 +34,7 @@ def assert_is_file_content(obj: object, *, key: str | None = None) -> None: if not is_file_content(obj): prefix = f"Expected entry at `{key}`" if key is not None else f"Expected file input `{obj!r}`" raise RuntimeError( - f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/increase/increase-python/tree/main#file-uploads" + f"{prefix} to be bytes, an io.IOBase instance, PathLike or a tuple but received {type(obj)} instead. See https://github.com/Increase/increase-python/tree/main#file-uploads" ) from None From 3df529879eb382d69420c01b59f7ce1e24d7b91f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Sep 2024 18:24:28 +0000 Subject: [PATCH 0185/1325] chore(internal): version bump (#641) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b28bdb22..f371d2758 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.105.0" + ".": "0.106.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a8f21862..a854746a1 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.105.0" +version = "0.106.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a11639929..502d0a009 100755 --- 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.105.0" # x-release-please-version +__version__ = "0.106.0" # x-release-please-version From c74d678fc0780913d78f9d3199090ec84e3d7780 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:55:35 +0000 Subject: [PATCH 0186/1325] feat(api): OpenAPI spec update via Stainless API (#642) --- .stats.yml | 2 +- src/increase/types/check_deposit.py | 3 +++ src/increase/types/declined_transaction.py | 3 +++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 41374fccc..61a2168dd 100755 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eacedccde024bed42183f025a69985ed2cd8aaf334dc0b59491d883bc88f8bdf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d702ed05ea362b431f9948b3710582b7ca63a9d902774b33a4a6a8b50d36a819.yml diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index a44baf163..e7496e70a 100755 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -82,6 +82,9 @@ class DepositRejection(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the associated declined transaction.""" + reason: Literal[ "incomplete_image", "duplicate", diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index e86e8c8d6..77422ccb5 100755 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -569,6 +569,9 @@ class SourceCheckDepositRejection(BaseModel): - `USD` - US Dollar (USD) """ + declined_transaction_id: str + """The identifier of the associated declined transaction.""" + reason: Literal[ "incomplete_image", "duplicate", From 295356c1dab11ea8b32c87976556116bbbefb427 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 01:56:47 +0000 Subject: [PATCH 0187/1325] chore(internal): codegen related update (#644) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f371d2758..bd34dce09 100755 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.106.0" + ".": "0.107.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a854746a1..65405f8bb 100755 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.106.0" +version = "0.107.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 502d0a009..493d14b4b 100755 --- 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.106.0" # x-release-please-version +__version__ = "0.107.0" # x-release-please-version From cecf03465201bed1418f45cfbd1d7709f147e415 Mon Sep 17 00:00:00 2001 From: Stainless Bot Date: Fri, 6 Sep 2024 12:24:30 -0400 Subject: [PATCH 0188/1325] fix file permissions --- .devcontainer/Dockerfile | 0 .devcontainer/devcontainer.json | 0 .github/workflows/ci.yml | 0 .github/workflows/publish-pypi.yml | 0 .github/workflows/release-doctor.yml | 0 .gitignore | 0 .python-version | 0 .release-please-manifest.json | 0 .stats.yml | 0 Brewfile | 0 CHANGELOG.md | 0 CONTRIBUTING.md | 0 LICENSE | 0 README.md | 0 SECURITY.md | 0 api.md | 0 bin/check-release-environment | 0 bin/publish-pypi | 0 examples/.keep | 0 examples/datetime_usage.py | 0 examples/status_errors.py | 0 mypy.ini | 0 noxfile.py | 0 pyproject.toml | 0 release-please-config.json | 0 requirements-dev.lock | 0 requirements.lock | 0 scripts/utils/ruffen-docs.py | 0 src/increase/__init__.py | 0 src/increase/_base_client.py | 0 src/increase/_client.py | 0 src/increase/_compat.py | 0 src/increase/_constants.py | 0 src/increase/_exceptions.py | 0 src/increase/_files.py | 0 src/increase/_models.py | 0 src/increase/_qs.py | 0 src/increase/_resource.py | 0 src/increase/_response.py | 0 src/increase/_streaming.py | 0 src/increase/_types.py | 0 src/increase/_utils/__init__.py | 0 src/increase/_utils/_logs.py | 0 src/increase/_utils/_proxy.py | 0 src/increase/_utils/_reflection.py | 0 src/increase/_utils/_streams.py | 0 src/increase/_utils/_sync.py | 0 src/increase/_utils/_transform.py | 0 src/increase/_utils/_typing.py | 0 src/increase/_utils/_utils.py | 0 src/increase/_version.py | 0 src/increase/lib/.keep | 0 src/increase/pagination.py | 0 src/increase/py.typed | 0 src/increase/resources/__init__.py | 0 src/increase/resources/account_numbers.py | 0 src/increase/resources/account_statements.py | 0 src/increase/resources/account_transfers.py | 0 src/increase/resources/accounts.py | 0 src/increase/resources/ach_prenotifications.py | 0 src/increase/resources/ach_transfers.py | 0 src/increase/resources/bookkeeping_accounts.py | 0 src/increase/resources/bookkeeping_entries.py | 0 src/increase/resources/bookkeeping_entry_sets.py | 0 src/increase/resources/card_disputes.py | 0 src/increase/resources/card_payments.py | 0 src/increase/resources/card_purchase_supplements.py | 0 src/increase/resources/cards.py | 0 src/increase/resources/check_deposits.py | 0 src/increase/resources/check_transfers.py | 0 src/increase/resources/declined_transactions.py | 0 src/increase/resources/digital_card_profiles.py | 0 src/increase/resources/digital_wallet_tokens.py | 0 src/increase/resources/documents.py | 0 src/increase/resources/entities.py | 0 src/increase/resources/event_subscriptions.py | 0 src/increase/resources/events.py | 0 src/increase/resources/exports.py | 0 src/increase/resources/external_accounts.py | 0 src/increase/resources/files.py | 0 src/increase/resources/groups.py | 0 src/increase/resources/inbound_ach_transfers.py | 0 src/increase/resources/inbound_check_deposits.py | 0 src/increase/resources/inbound_mail_items.py | 0 src/increase/resources/inbound_wire_drawdown_requests.py | 0 src/increase/resources/inbound_wire_transfers.py | 0 src/increase/resources/intrafi_account_enrollments.py | 0 src/increase/resources/intrafi_balances.py | 0 src/increase/resources/intrafi_exclusions.py | 0 src/increase/resources/lockboxes.py | 0 src/increase/resources/oauth_connections.py | 0 src/increase/resources/oauth_tokens.py | 0 src/increase/resources/pending_transactions.py | 0 src/increase/resources/physical_card_profiles.py | 0 src/increase/resources/physical_cards.py | 0 src/increase/resources/programs.py | 0 .../resources/proof_of_authorization_request_submissions.py | 0 src/increase/resources/proof_of_authorization_requests.py | 0 src/increase/resources/real_time_decisions.py | 0 src/increase/resources/real_time_payments_request_for_payments.py | 0 src/increase/resources/real_time_payments_transfers.py | 0 src/increase/resources/routing_numbers.py | 0 src/increase/resources/simulations/__init__.py | 0 src/increase/resources/simulations/account_statements.py | 0 src/increase/resources/simulations/account_transfers.py | 0 src/increase/resources/simulations/ach_transfers.py | 0 .../resources/simulations/card_authorization_expirations.py | 0 src/increase/resources/simulations/card_authorizations.py | 0 src/increase/resources/simulations/card_disputes.py | 0 src/increase/resources/simulations/card_fuel_confirmations.py | 0 src/increase/resources/simulations/card_increments.py | 0 src/increase/resources/simulations/card_refunds.py | 0 src/increase/resources/simulations/card_reversals.py | 0 src/increase/resources/simulations/card_settlements.py | 0 src/increase/resources/simulations/check_deposits.py | 0 src/increase/resources/simulations/check_transfers.py | 0 .../resources/simulations/digital_wallet_token_requests.py | 0 src/increase/resources/simulations/documents.py | 0 src/increase/resources/simulations/inbound_ach_transfers.py | 0 src/increase/resources/simulations/inbound_check_deposits.py | 0 src/increase/resources/simulations/inbound_funds_holds.py | 0 .../resources/simulations/inbound_real_time_payments_transfers.py | 0 .../resources/simulations/inbound_wire_drawdown_requests.py | 0 src/increase/resources/simulations/inbound_wire_transfers.py | 0 src/increase/resources/simulations/interest_payments.py | 0 src/increase/resources/simulations/physical_cards.py | 0 src/increase/resources/simulations/programs.py | 0 .../resources/simulations/real_time_payments_transfers.py | 0 src/increase/resources/simulations/simulations.py | 0 src/increase/resources/simulations/wire_transfers.py | 0 src/increase/resources/supplemental_documents.py | 0 src/increase/resources/transactions.py | 0 src/increase/resources/wire_drawdown_requests.py | 0 src/increase/resources/wire_transfers.py | 0 src/increase/types/__init__.py | 0 src/increase/types/account.py | 0 src/increase/types/account_balance_params.py | 0 src/increase/types/account_create_params.py | 0 src/increase/types/account_list_params.py | 0 src/increase/types/account_number.py | 0 src/increase/types/account_number_create_params.py | 0 src/increase/types/account_number_list_params.py | 0 src/increase/types/account_number_update_params.py | 0 src/increase/types/account_statement.py | 0 src/increase/types/account_statement_list_params.py | 0 src/increase/types/account_transfer.py | 0 src/increase/types/account_transfer_create_params.py | 0 src/increase/types/account_transfer_list_params.py | 0 src/increase/types/account_update_params.py | 0 src/increase/types/ach_prenotification.py | 0 src/increase/types/ach_prenotification_create_params.py | 0 src/increase/types/ach_prenotification_list_params.py | 0 src/increase/types/ach_transfer.py | 0 src/increase/types/ach_transfer_create_params.py | 0 src/increase/types/ach_transfer_list_params.py | 0 src/increase/types/balance_lookup.py | 0 src/increase/types/bookkeeping_account.py | 0 src/increase/types/bookkeeping_account_balance_params.py | 0 src/increase/types/bookkeeping_account_create_params.py | 0 src/increase/types/bookkeeping_account_list_params.py | 0 src/increase/types/bookkeeping_account_update_params.py | 0 src/increase/types/bookkeeping_balance_lookup.py | 0 src/increase/types/bookkeeping_entry.py | 0 src/increase/types/bookkeeping_entry_list_params.py | 0 src/increase/types/bookkeeping_entry_set.py | 0 src/increase/types/bookkeeping_entry_set_create_params.py | 0 src/increase/types/bookkeeping_entry_set_list_params.py | 0 src/increase/types/card.py | 0 src/increase/types/card_create_params.py | 0 src/increase/types/card_details.py | 0 src/increase/types/card_dispute.py | 0 src/increase/types/card_dispute_create_params.py | 0 src/increase/types/card_dispute_list_params.py | 0 src/increase/types/card_list_params.py | 0 src/increase/types/card_payment.py | 0 src/increase/types/card_payment_list_params.py | 0 src/increase/types/card_purchase_supplement.py | 0 src/increase/types/card_purchase_supplement_list_params.py | 0 src/increase/types/card_update_params.py | 0 src/increase/types/check_deposit.py | 0 src/increase/types/check_deposit_create_params.py | 0 src/increase/types/check_deposit_list_params.py | 0 src/increase/types/check_transfer.py | 0 src/increase/types/check_transfer_create_params.py | 0 src/increase/types/check_transfer_list_params.py | 0 src/increase/types/check_transfer_stop_payment_params.py | 0 src/increase/types/declined_transaction.py | 0 src/increase/types/declined_transaction_list_params.py | 0 src/increase/types/digital_card_profile.py | 0 src/increase/types/digital_card_profile_clone_params.py | 0 src/increase/types/digital_card_profile_create_params.py | 0 src/increase/types/digital_card_profile_list_params.py | 0 src/increase/types/digital_wallet_token.py | 0 src/increase/types/digital_wallet_token_list_params.py | 0 src/increase/types/document.py | 0 src/increase/types/document_list_params.py | 0 src/increase/types/entity.py | 0 src/increase/types/entity_archive_beneficial_owner_params.py | 0 src/increase/types/entity_confirm_params.py | 0 src/increase/types/entity_create_beneficial_owner_params.py | 0 src/increase/types/entity_create_params.py | 0 src/increase/types/entity_list_params.py | 0 src/increase/types/entity_supplemental_document.py | 0 src/increase/types/entity_update_address_params.py | 0 .../types/entity_update_beneficial_owner_address_params.py | 0 src/increase/types/entity_update_industry_code_params.py | 0 src/increase/types/event.py | 0 src/increase/types/event_list_params.py | 0 src/increase/types/event_subscription.py | 0 src/increase/types/event_subscription_create_params.py | 0 src/increase/types/event_subscription_list_params.py | 0 src/increase/types/event_subscription_update_params.py | 0 src/increase/types/export.py | 0 src/increase/types/export_create_params.py | 0 src/increase/types/export_list_params.py | 0 src/increase/types/external_account.py | 0 src/increase/types/external_account_create_params.py | 0 src/increase/types/external_account_list_params.py | 0 src/increase/types/external_account_update_params.py | 0 src/increase/types/file.py | 0 src/increase/types/file_create_params.py | 0 src/increase/types/file_list_params.py | 0 src/increase/types/group.py | 0 src/increase/types/inbound_ach_transfer.py | 0 .../inbound_ach_transfer_create_notification_of_change_params.py | 0 src/increase/types/inbound_ach_transfer_list_params.py | 0 src/increase/types/inbound_ach_transfer_transfer_return_params.py | 0 src/increase/types/inbound_check_deposit.py | 0 src/increase/types/inbound_check_deposit_list_params.py | 0 src/increase/types/inbound_check_deposit_return_params.py | 0 src/increase/types/inbound_mail_item.py | 0 src/increase/types/inbound_mail_item_list_params.py | 0 src/increase/types/inbound_wire_drawdown_request.py | 0 src/increase/types/inbound_wire_drawdown_request_list_params.py | 0 src/increase/types/inbound_wire_transfer.py | 0 src/increase/types/inbound_wire_transfer_list_params.py | 0 src/increase/types/intrafi_account_enrollment.py | 0 src/increase/types/intrafi_account_enrollment_create_params.py | 0 src/increase/types/intrafi_account_enrollment_list_params.py | 0 src/increase/types/intrafi_balance.py | 0 src/increase/types/intrafi_exclusion.py | 0 src/increase/types/intrafi_exclusion_create_params.py | 0 src/increase/types/intrafi_exclusion_list_params.py | 0 src/increase/types/lockbox.py | 0 src/increase/types/lockbox_create_params.py | 0 src/increase/types/lockbox_list_params.py | 0 src/increase/types/lockbox_update_params.py | 0 src/increase/types/oauth_connection.py | 0 src/increase/types/oauth_connection_list_params.py | 0 src/increase/types/oauth_token.py | 0 src/increase/types/oauth_token_create_params.py | 0 src/increase/types/pending_transaction.py | 0 src/increase/types/pending_transaction_list_params.py | 0 src/increase/types/physical_card.py | 0 src/increase/types/physical_card_create_params.py | 0 src/increase/types/physical_card_list_params.py | 0 src/increase/types/physical_card_profile.py | 0 src/increase/types/physical_card_profile_clone_params.py | 0 src/increase/types/physical_card_profile_create_params.py | 0 src/increase/types/physical_card_profile_list_params.py | 0 src/increase/types/physical_card_update_params.py | 0 src/increase/types/program.py | 0 src/increase/types/program_list_params.py | 0 src/increase/types/proof_of_authorization_request.py | 0 src/increase/types/proof_of_authorization_request_list_params.py | 0 src/increase/types/proof_of_authorization_request_submission.py | 0 .../proof_of_authorization_request_submission_create_params.py | 0 .../proof_of_authorization_request_submission_list_params.py | 0 src/increase/types/real_time_decision.py | 0 src/increase/types/real_time_decision_action_params.py | 0 src/increase/types/real_time_payments_request_for_payment.py | 0 .../types/real_time_payments_request_for_payment_create_params.py | 0 .../types/real_time_payments_request_for_payment_list_params.py | 0 src/increase/types/real_time_payments_transfer.py | 0 src/increase/types/real_time_payments_transfer_create_params.py | 0 src/increase/types/real_time_payments_transfer_list_params.py | 0 src/increase/types/routing_number_list_params.py | 0 src/increase/types/routing_number_list_response.py | 0 src/increase/types/simulations/__init__.py | 0 src/increase/types/simulations/account_statement_create_params.py | 0 .../ach_transfer_create_notification_of_change_params.py | 0 src/increase/types/simulations/ach_transfer_return_params.py | 0 .../types/simulations/card_authorization_create_params.py | 0 .../types/simulations/card_authorization_create_response.py | 0 .../simulations/card_authorization_expiration_create_params.py | 0 src/increase/types/simulations/card_dispute_action_params.py | 0 .../types/simulations/card_fuel_confirmation_create_params.py | 0 src/increase/types/simulations/card_increment_create_params.py | 0 src/increase/types/simulations/card_refund_create_params.py | 0 src/increase/types/simulations/card_reversal_create_params.py | 0 src/increase/types/simulations/card_settlement_create_params.py | 0 .../simulations/digital_wallet_token_request_create_params.py | 0 .../simulations/digital_wallet_token_request_create_response.py | 0 src/increase/types/simulations/document_create_params.py | 0 .../types/simulations/inbound_ach_transfer_create_params.py | 0 .../types/simulations/inbound_check_deposit_create_params.py | 0 .../types/simulations/inbound_funds_hold_release_response.py | 0 .../inbound_real_time_payments_transfer_create_params.py | 0 .../simulations/inbound_wire_drawdown_request_create_params.py | 0 .../types/simulations/inbound_wire_transfer_create_params.py | 0 src/increase/types/simulations/interest_payment_create_params.py | 0 .../types/simulations/physical_card_advance_shipment_params.py | 0 src/increase/types/simulations/program_create_params.py | 0 .../simulations/real_time_payments_transfer_complete_params.py | 0 src/increase/types/supplemental_document_create_params.py | 0 src/increase/types/supplemental_document_list_params.py | 0 src/increase/types/transaction.py | 0 src/increase/types/transaction_list_params.py | 0 src/increase/types/wire_drawdown_request.py | 0 src/increase/types/wire_drawdown_request_create_params.py | 0 src/increase/types/wire_drawdown_request_list_params.py | 0 src/increase/types/wire_transfer.py | 0 src/increase/types/wire_transfer_create_params.py | 0 src/increase/types/wire_transfer_list_params.py | 0 tests/__init__.py | 0 tests/api_resources/__init__.py | 0 tests/api_resources/simulations/__init__.py | 0 tests/api_resources/simulations/test_account_statements.py | 0 tests/api_resources/simulations/test_account_transfers.py | 0 tests/api_resources/simulations/test_ach_transfers.py | 0 .../simulations/test_card_authorization_expirations.py | 0 tests/api_resources/simulations/test_card_authorizations.py | 0 tests/api_resources/simulations/test_card_disputes.py | 0 tests/api_resources/simulations/test_card_fuel_confirmations.py | 0 tests/api_resources/simulations/test_card_increments.py | 0 tests/api_resources/simulations/test_card_refunds.py | 0 tests/api_resources/simulations/test_card_reversals.py | 0 tests/api_resources/simulations/test_card_settlements.py | 0 tests/api_resources/simulations/test_check_deposits.py | 0 tests/api_resources/simulations/test_check_transfers.py | 0 .../simulations/test_digital_wallet_token_requests.py | 0 tests/api_resources/simulations/test_documents.py | 0 tests/api_resources/simulations/test_inbound_ach_transfers.py | 0 tests/api_resources/simulations/test_inbound_check_deposits.py | 0 tests/api_resources/simulations/test_inbound_funds_holds.py | 0 .../simulations/test_inbound_real_time_payments_transfers.py | 0 .../simulations/test_inbound_wire_drawdown_requests.py | 0 tests/api_resources/simulations/test_inbound_wire_transfers.py | 0 tests/api_resources/simulations/test_interest_payments.py | 0 tests/api_resources/simulations/test_physical_cards.py | 0 tests/api_resources/simulations/test_programs.py | 0 .../simulations/test_real_time_payments_transfers.py | 0 tests/api_resources/simulations/test_wire_transfers.py | 0 tests/api_resources/test_account_numbers.py | 0 tests/api_resources/test_account_statements.py | 0 tests/api_resources/test_account_transfers.py | 0 tests/api_resources/test_accounts.py | 0 tests/api_resources/test_ach_prenotifications.py | 0 tests/api_resources/test_ach_transfers.py | 0 tests/api_resources/test_bookkeeping_accounts.py | 0 tests/api_resources/test_bookkeeping_entries.py | 0 tests/api_resources/test_bookkeeping_entry_sets.py | 0 tests/api_resources/test_card_disputes.py | 0 tests/api_resources/test_card_payments.py | 0 tests/api_resources/test_card_purchase_supplements.py | 0 tests/api_resources/test_cards.py | 0 tests/api_resources/test_check_deposits.py | 0 tests/api_resources/test_check_transfers.py | 0 tests/api_resources/test_declined_transactions.py | 0 tests/api_resources/test_digital_card_profiles.py | 0 tests/api_resources/test_digital_wallet_tokens.py | 0 tests/api_resources/test_documents.py | 0 tests/api_resources/test_entities.py | 0 tests/api_resources/test_event_subscriptions.py | 0 tests/api_resources/test_events.py | 0 tests/api_resources/test_exports.py | 0 tests/api_resources/test_external_accounts.py | 0 tests/api_resources/test_files.py | 0 tests/api_resources/test_groups.py | 0 tests/api_resources/test_inbound_ach_transfers.py | 0 tests/api_resources/test_inbound_check_deposits.py | 0 tests/api_resources/test_inbound_mail_items.py | 0 tests/api_resources/test_inbound_wire_drawdown_requests.py | 0 tests/api_resources/test_inbound_wire_transfers.py | 0 tests/api_resources/test_intrafi_account_enrollments.py | 0 tests/api_resources/test_intrafi_balances.py | 0 tests/api_resources/test_intrafi_exclusions.py | 0 tests/api_resources/test_lockboxes.py | 0 tests/api_resources/test_oauth_connections.py | 0 tests/api_resources/test_oauth_tokens.py | 0 tests/api_resources/test_pending_transactions.py | 0 tests/api_resources/test_physical_card_profiles.py | 0 tests/api_resources/test_physical_cards.py | 0 tests/api_resources/test_programs.py | 0 .../test_proof_of_authorization_request_submissions.py | 0 tests/api_resources/test_proof_of_authorization_requests.py | 0 tests/api_resources/test_real_time_decisions.py | 0 .../api_resources/test_real_time_payments_request_for_payments.py | 0 tests/api_resources/test_real_time_payments_transfers.py | 0 tests/api_resources/test_routing_numbers.py | 0 tests/api_resources/test_supplemental_documents.py | 0 tests/api_resources/test_transactions.py | 0 tests/api_resources/test_wire_drawdown_requests.py | 0 tests/api_resources/test_wire_transfers.py | 0 tests/conftest.py | 0 tests/sample_file.txt | 0 tests/test_client.py | 0 tests/test_deepcopy.py | 0 tests/test_extract_files.py | 0 tests/test_files.py | 0 tests/test_models.py | 0 tests/test_qs.py | 0 tests/test_required_args.py | 0 tests/test_response.py | 0 tests/test_streaming.py | 0 tests/test_transform.py | 0 tests/test_utils/test_proxy.py | 0 tests/test_utils/test_typing.py | 0 tests/utils.py | 0 409 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 .devcontainer/Dockerfile mode change 100755 => 100644 .devcontainer/devcontainer.json mode change 100755 => 100644 .github/workflows/ci.yml mode change 100755 => 100644 .github/workflows/publish-pypi.yml mode change 100755 => 100644 .github/workflows/release-doctor.yml mode change 100755 => 100644 .gitignore mode change 100755 => 100644 .python-version mode change 100755 => 100644 .release-please-manifest.json mode change 100755 => 100644 .stats.yml mode change 100755 => 100644 Brewfile mode change 100755 => 100644 CHANGELOG.md mode change 100755 => 100644 CONTRIBUTING.md mode change 100755 => 100644 LICENSE mode change 100755 => 100644 README.md mode change 100755 => 100644 SECURITY.md mode change 100755 => 100644 api.md mode change 100755 => 100644 bin/check-release-environment mode change 100755 => 100644 bin/publish-pypi mode change 100755 => 100644 examples/.keep mode change 100755 => 100644 examples/datetime_usage.py mode change 100755 => 100644 examples/status_errors.py mode change 100755 => 100644 mypy.ini mode change 100755 => 100644 noxfile.py mode change 100755 => 100644 pyproject.toml mode change 100755 => 100644 release-please-config.json mode change 100755 => 100644 requirements-dev.lock mode change 100755 => 100644 requirements.lock mode change 100755 => 100644 scripts/utils/ruffen-docs.py mode change 100755 => 100644 src/increase/__init__.py mode change 100755 => 100644 src/increase/_base_client.py mode change 100755 => 100644 src/increase/_client.py mode change 100755 => 100644 src/increase/_compat.py mode change 100755 => 100644 src/increase/_constants.py mode change 100755 => 100644 src/increase/_exceptions.py mode change 100755 => 100644 src/increase/_files.py mode change 100755 => 100644 src/increase/_models.py mode change 100755 => 100644 src/increase/_qs.py mode change 100755 => 100644 src/increase/_resource.py mode change 100755 => 100644 src/increase/_response.py mode change 100755 => 100644 src/increase/_streaming.py mode change 100755 => 100644 src/increase/_types.py mode change 100755 => 100644 src/increase/_utils/__init__.py mode change 100755 => 100644 src/increase/_utils/_logs.py mode change 100755 => 100644 src/increase/_utils/_proxy.py mode change 100755 => 100644 src/increase/_utils/_reflection.py mode change 100755 => 100644 src/increase/_utils/_streams.py mode change 100755 => 100644 src/increase/_utils/_sync.py mode change 100755 => 100644 src/increase/_utils/_transform.py mode change 100755 => 100644 src/increase/_utils/_typing.py mode change 100755 => 100644 src/increase/_utils/_utils.py mode change 100755 => 100644 src/increase/_version.py mode change 100755 => 100644 src/increase/lib/.keep mode change 100755 => 100644 src/increase/pagination.py mode change 100755 => 100644 src/increase/py.typed mode change 100755 => 100644 src/increase/resources/__init__.py mode change 100755 => 100644 src/increase/resources/account_numbers.py mode change 100755 => 100644 src/increase/resources/account_statements.py mode change 100755 => 100644 src/increase/resources/account_transfers.py mode change 100755 => 100644 src/increase/resources/accounts.py mode change 100755 => 100644 src/increase/resources/ach_prenotifications.py mode change 100755 => 100644 src/increase/resources/ach_transfers.py mode change 100755 => 100644 src/increase/resources/bookkeeping_accounts.py mode change 100755 => 100644 src/increase/resources/bookkeeping_entries.py mode change 100755 => 100644 src/increase/resources/bookkeeping_entry_sets.py mode change 100755 => 100644 src/increase/resources/card_disputes.py mode change 100755 => 100644 src/increase/resources/card_payments.py mode change 100755 => 100644 src/increase/resources/card_purchase_supplements.py mode change 100755 => 100644 src/increase/resources/cards.py mode change 100755 => 100644 src/increase/resources/check_deposits.py mode change 100755 => 100644 src/increase/resources/check_transfers.py mode change 100755 => 100644 src/increase/resources/declined_transactions.py mode change 100755 => 100644 src/increase/resources/digital_card_profiles.py mode change 100755 => 100644 src/increase/resources/digital_wallet_tokens.py mode change 100755 => 100644 src/increase/resources/documents.py mode change 100755 => 100644 src/increase/resources/entities.py mode change 100755 => 100644 src/increase/resources/event_subscriptions.py mode change 100755 => 100644 src/increase/resources/events.py mode change 100755 => 100644 src/increase/resources/exports.py mode change 100755 => 100644 src/increase/resources/external_accounts.py mode change 100755 => 100644 src/increase/resources/files.py mode change 100755 => 100644 src/increase/resources/groups.py mode change 100755 => 100644 src/increase/resources/inbound_ach_transfers.py mode change 100755 => 100644 src/increase/resources/inbound_check_deposits.py mode change 100755 => 100644 src/increase/resources/inbound_mail_items.py mode change 100755 => 100644 src/increase/resources/inbound_wire_drawdown_requests.py mode change 100755 => 100644 src/increase/resources/inbound_wire_transfers.py mode change 100755 => 100644 src/increase/resources/intrafi_account_enrollments.py mode change 100755 => 100644 src/increase/resources/intrafi_balances.py mode change 100755 => 100644 src/increase/resources/intrafi_exclusions.py mode change 100755 => 100644 src/increase/resources/lockboxes.py mode change 100755 => 100644 src/increase/resources/oauth_connections.py mode change 100755 => 100644 src/increase/resources/oauth_tokens.py mode change 100755 => 100644 src/increase/resources/pending_transactions.py mode change 100755 => 100644 src/increase/resources/physical_card_profiles.py mode change 100755 => 100644 src/increase/resources/physical_cards.py mode change 100755 => 100644 src/increase/resources/programs.py mode change 100755 => 100644 src/increase/resources/proof_of_authorization_request_submissions.py mode change 100755 => 100644 src/increase/resources/proof_of_authorization_requests.py mode change 100755 => 100644 src/increase/resources/real_time_decisions.py mode change 100755 => 100644 src/increase/resources/real_time_payments_request_for_payments.py mode change 100755 => 100644 src/increase/resources/real_time_payments_transfers.py mode change 100755 => 100644 src/increase/resources/routing_numbers.py mode change 100755 => 100644 src/increase/resources/simulations/__init__.py mode change 100755 => 100644 src/increase/resources/simulations/account_statements.py mode change 100755 => 100644 src/increase/resources/simulations/account_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/ach_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/card_authorization_expirations.py mode change 100755 => 100644 src/increase/resources/simulations/card_authorizations.py mode change 100755 => 100644 src/increase/resources/simulations/card_disputes.py mode change 100755 => 100644 src/increase/resources/simulations/card_fuel_confirmations.py mode change 100755 => 100644 src/increase/resources/simulations/card_increments.py mode change 100755 => 100644 src/increase/resources/simulations/card_refunds.py mode change 100755 => 100644 src/increase/resources/simulations/card_reversals.py mode change 100755 => 100644 src/increase/resources/simulations/card_settlements.py mode change 100755 => 100644 src/increase/resources/simulations/check_deposits.py mode change 100755 => 100644 src/increase/resources/simulations/check_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/digital_wallet_token_requests.py mode change 100755 => 100644 src/increase/resources/simulations/documents.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_ach_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_check_deposits.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_funds_holds.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_real_time_payments_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_wire_drawdown_requests.py mode change 100755 => 100644 src/increase/resources/simulations/inbound_wire_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/interest_payments.py mode change 100755 => 100644 src/increase/resources/simulations/physical_cards.py mode change 100755 => 100644 src/increase/resources/simulations/programs.py mode change 100755 => 100644 src/increase/resources/simulations/real_time_payments_transfers.py mode change 100755 => 100644 src/increase/resources/simulations/simulations.py mode change 100755 => 100644 src/increase/resources/simulations/wire_transfers.py mode change 100755 => 100644 src/increase/resources/supplemental_documents.py mode change 100755 => 100644 src/increase/resources/transactions.py mode change 100755 => 100644 src/increase/resources/wire_drawdown_requests.py mode change 100755 => 100644 src/increase/resources/wire_transfers.py mode change 100755 => 100644 src/increase/types/__init__.py mode change 100755 => 100644 src/increase/types/account.py mode change 100755 => 100644 src/increase/types/account_balance_params.py mode change 100755 => 100644 src/increase/types/account_create_params.py mode change 100755 => 100644 src/increase/types/account_list_params.py mode change 100755 => 100644 src/increase/types/account_number.py mode change 100755 => 100644 src/increase/types/account_number_create_params.py mode change 100755 => 100644 src/increase/types/account_number_list_params.py mode change 100755 => 100644 src/increase/types/account_number_update_params.py mode change 100755 => 100644 src/increase/types/account_statement.py mode change 100755 => 100644 src/increase/types/account_statement_list_params.py mode change 100755 => 100644 src/increase/types/account_transfer.py mode change 100755 => 100644 src/increase/types/account_transfer_create_params.py mode change 100755 => 100644 src/increase/types/account_transfer_list_params.py mode change 100755 => 100644 src/increase/types/account_update_params.py mode change 100755 => 100644 src/increase/types/ach_prenotification.py mode change 100755 => 100644 src/increase/types/ach_prenotification_create_params.py mode change 100755 => 100644 src/increase/types/ach_prenotification_list_params.py mode change 100755 => 100644 src/increase/types/ach_transfer.py mode change 100755 => 100644 src/increase/types/ach_transfer_create_params.py mode change 100755 => 100644 src/increase/types/ach_transfer_list_params.py mode change 100755 => 100644 src/increase/types/balance_lookup.py mode change 100755 => 100644 src/increase/types/bookkeeping_account.py mode change 100755 => 100644 src/increase/types/bookkeeping_account_balance_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_account_create_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_account_list_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_account_update_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_balance_lookup.py mode change 100755 => 100644 src/increase/types/bookkeeping_entry.py mode change 100755 => 100644 src/increase/types/bookkeeping_entry_list_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_entry_set.py mode change 100755 => 100644 src/increase/types/bookkeeping_entry_set_create_params.py mode change 100755 => 100644 src/increase/types/bookkeeping_entry_set_list_params.py mode change 100755 => 100644 src/increase/types/card.py mode change 100755 => 100644 src/increase/types/card_create_params.py mode change 100755 => 100644 src/increase/types/card_details.py mode change 100755 => 100644 src/increase/types/card_dispute.py mode change 100755 => 100644 src/increase/types/card_dispute_create_params.py mode change 100755 => 100644 src/increase/types/card_dispute_list_params.py mode change 100755 => 100644 src/increase/types/card_list_params.py mode change 100755 => 100644 src/increase/types/card_payment.py mode change 100755 => 100644 src/increase/types/card_payment_list_params.py mode change 100755 => 100644 src/increase/types/card_purchase_supplement.py mode change 100755 => 100644 src/increase/types/card_purchase_supplement_list_params.py mode change 100755 => 100644 src/increase/types/card_update_params.py mode change 100755 => 100644 src/increase/types/check_deposit.py mode change 100755 => 100644 src/increase/types/check_deposit_create_params.py mode change 100755 => 100644 src/increase/types/check_deposit_list_params.py mode change 100755 => 100644 src/increase/types/check_transfer.py mode change 100755 => 100644 src/increase/types/check_transfer_create_params.py mode change 100755 => 100644 src/increase/types/check_transfer_list_params.py mode change 100755 => 100644 src/increase/types/check_transfer_stop_payment_params.py mode change 100755 => 100644 src/increase/types/declined_transaction.py mode change 100755 => 100644 src/increase/types/declined_transaction_list_params.py mode change 100755 => 100644 src/increase/types/digital_card_profile.py mode change 100755 => 100644 src/increase/types/digital_card_profile_clone_params.py mode change 100755 => 100644 src/increase/types/digital_card_profile_create_params.py mode change 100755 => 100644 src/increase/types/digital_card_profile_list_params.py mode change 100755 => 100644 src/increase/types/digital_wallet_token.py mode change 100755 => 100644 src/increase/types/digital_wallet_token_list_params.py mode change 100755 => 100644 src/increase/types/document.py mode change 100755 => 100644 src/increase/types/document_list_params.py mode change 100755 => 100644 src/increase/types/entity.py mode change 100755 => 100644 src/increase/types/entity_archive_beneficial_owner_params.py mode change 100755 => 100644 src/increase/types/entity_confirm_params.py mode change 100755 => 100644 src/increase/types/entity_create_beneficial_owner_params.py mode change 100755 => 100644 src/increase/types/entity_create_params.py mode change 100755 => 100644 src/increase/types/entity_list_params.py mode change 100755 => 100644 src/increase/types/entity_supplemental_document.py mode change 100755 => 100644 src/increase/types/entity_update_address_params.py mode change 100755 => 100644 src/increase/types/entity_update_beneficial_owner_address_params.py mode change 100755 => 100644 src/increase/types/entity_update_industry_code_params.py mode change 100755 => 100644 src/increase/types/event.py mode change 100755 => 100644 src/increase/types/event_list_params.py mode change 100755 => 100644 src/increase/types/event_subscription.py mode change 100755 => 100644 src/increase/types/event_subscription_create_params.py mode change 100755 => 100644 src/increase/types/event_subscription_list_params.py mode change 100755 => 100644 src/increase/types/event_subscription_update_params.py mode change 100755 => 100644 src/increase/types/export.py mode change 100755 => 100644 src/increase/types/export_create_params.py mode change 100755 => 100644 src/increase/types/export_list_params.py mode change 100755 => 100644 src/increase/types/external_account.py mode change 100755 => 100644 src/increase/types/external_account_create_params.py mode change 100755 => 100644 src/increase/types/external_account_list_params.py mode change 100755 => 100644 src/increase/types/external_account_update_params.py mode change 100755 => 100644 src/increase/types/file.py mode change 100755 => 100644 src/increase/types/file_create_params.py mode change 100755 => 100644 src/increase/types/file_list_params.py mode change 100755 => 100644 src/increase/types/group.py mode change 100755 => 100644 src/increase/types/inbound_ach_transfer.py mode change 100755 => 100644 src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py mode change 100755 => 100644 src/increase/types/inbound_ach_transfer_list_params.py mode change 100755 => 100644 src/increase/types/inbound_ach_transfer_transfer_return_params.py mode change 100755 => 100644 src/increase/types/inbound_check_deposit.py mode change 100755 => 100644 src/increase/types/inbound_check_deposit_list_params.py mode change 100755 => 100644 src/increase/types/inbound_check_deposit_return_params.py mode change 100755 => 100644 src/increase/types/inbound_mail_item.py mode change 100755 => 100644 src/increase/types/inbound_mail_item_list_params.py mode change 100755 => 100644 src/increase/types/inbound_wire_drawdown_request.py mode change 100755 => 100644 src/increase/types/inbound_wire_drawdown_request_list_params.py mode change 100755 => 100644 src/increase/types/inbound_wire_transfer.py mode change 100755 => 100644 src/increase/types/inbound_wire_transfer_list_params.py mode change 100755 => 100644 src/increase/types/intrafi_account_enrollment.py mode change 100755 => 100644 src/increase/types/intrafi_account_enrollment_create_params.py mode change 100755 => 100644 src/increase/types/intrafi_account_enrollment_list_params.py mode change 100755 => 100644 src/increase/types/intrafi_balance.py mode change 100755 => 100644 src/increase/types/intrafi_exclusion.py mode change 100755 => 100644 src/increase/types/intrafi_exclusion_create_params.py mode change 100755 => 100644 src/increase/types/intrafi_exclusion_list_params.py mode change 100755 => 100644 src/increase/types/lockbox.py mode change 100755 => 100644 src/increase/types/lockbox_create_params.py mode change 100755 => 100644 src/increase/types/lockbox_list_params.py mode change 100755 => 100644 src/increase/types/lockbox_update_params.py mode change 100755 => 100644 src/increase/types/oauth_connection.py mode change 100755 => 100644 src/increase/types/oauth_connection_list_params.py mode change 100755 => 100644 src/increase/types/oauth_token.py mode change 100755 => 100644 src/increase/types/oauth_token_create_params.py mode change 100755 => 100644 src/increase/types/pending_transaction.py mode change 100755 => 100644 src/increase/types/pending_transaction_list_params.py mode change 100755 => 100644 src/increase/types/physical_card.py mode change 100755 => 100644 src/increase/types/physical_card_create_params.py mode change 100755 => 100644 src/increase/types/physical_card_list_params.py mode change 100755 => 100644 src/increase/types/physical_card_profile.py mode change 100755 => 100644 src/increase/types/physical_card_profile_clone_params.py mode change 100755 => 100644 src/increase/types/physical_card_profile_create_params.py mode change 100755 => 100644 src/increase/types/physical_card_profile_list_params.py mode change 100755 => 100644 src/increase/types/physical_card_update_params.py mode change 100755 => 100644 src/increase/types/program.py mode change 100755 => 100644 src/increase/types/program_list_params.py mode change 100755 => 100644 src/increase/types/proof_of_authorization_request.py mode change 100755 => 100644 src/increase/types/proof_of_authorization_request_list_params.py mode change 100755 => 100644 src/increase/types/proof_of_authorization_request_submission.py mode change 100755 => 100644 src/increase/types/proof_of_authorization_request_submission_create_params.py mode change 100755 => 100644 src/increase/types/proof_of_authorization_request_submission_list_params.py mode change 100755 => 100644 src/increase/types/real_time_decision.py mode change 100755 => 100644 src/increase/types/real_time_decision_action_params.py mode change 100755 => 100644 src/increase/types/real_time_payments_request_for_payment.py mode change 100755 => 100644 src/increase/types/real_time_payments_request_for_payment_create_params.py mode change 100755 => 100644 src/increase/types/real_time_payments_request_for_payment_list_params.py mode change 100755 => 100644 src/increase/types/real_time_payments_transfer.py mode change 100755 => 100644 src/increase/types/real_time_payments_transfer_create_params.py mode change 100755 => 100644 src/increase/types/real_time_payments_transfer_list_params.py mode change 100755 => 100644 src/increase/types/routing_number_list_params.py mode change 100755 => 100644 src/increase/types/routing_number_list_response.py mode change 100755 => 100644 src/increase/types/simulations/__init__.py mode change 100755 => 100644 src/increase/types/simulations/account_statement_create_params.py mode change 100755 => 100644 src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py mode change 100755 => 100644 src/increase/types/simulations/ach_transfer_return_params.py mode change 100755 => 100644 src/increase/types/simulations/card_authorization_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_authorization_create_response.py mode change 100755 => 100644 src/increase/types/simulations/card_authorization_expiration_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_dispute_action_params.py mode change 100755 => 100644 src/increase/types/simulations/card_fuel_confirmation_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_increment_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_refund_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_reversal_create_params.py mode change 100755 => 100644 src/increase/types/simulations/card_settlement_create_params.py mode change 100755 => 100644 src/increase/types/simulations/digital_wallet_token_request_create_params.py mode change 100755 => 100644 src/increase/types/simulations/digital_wallet_token_request_create_response.py mode change 100755 => 100644 src/increase/types/simulations/document_create_params.py mode change 100755 => 100644 src/increase/types/simulations/inbound_ach_transfer_create_params.py mode change 100755 => 100644 src/increase/types/simulations/inbound_check_deposit_create_params.py mode change 100755 => 100644 src/increase/types/simulations/inbound_funds_hold_release_response.py mode change 100755 => 100644 src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py mode change 100755 => 100644 src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py mode change 100755 => 100644 src/increase/types/simulations/inbound_wire_transfer_create_params.py mode change 100755 => 100644 src/increase/types/simulations/interest_payment_create_params.py mode change 100755 => 100644 src/increase/types/simulations/physical_card_advance_shipment_params.py mode change 100755 => 100644 src/increase/types/simulations/program_create_params.py mode change 100755 => 100644 src/increase/types/simulations/real_time_payments_transfer_complete_params.py mode change 100755 => 100644 src/increase/types/supplemental_document_create_params.py mode change 100755 => 100644 src/increase/types/supplemental_document_list_params.py mode change 100755 => 100644 src/increase/types/transaction.py mode change 100755 => 100644 src/increase/types/transaction_list_params.py mode change 100755 => 100644 src/increase/types/wire_drawdown_request.py mode change 100755 => 100644 src/increase/types/wire_drawdown_request_create_params.py mode change 100755 => 100644 src/increase/types/wire_drawdown_request_list_params.py mode change 100755 => 100644 src/increase/types/wire_transfer.py mode change 100755 => 100644 src/increase/types/wire_transfer_create_params.py mode change 100755 => 100644 src/increase/types/wire_transfer_list_params.py mode change 100755 => 100644 tests/__init__.py mode change 100755 => 100644 tests/api_resources/__init__.py mode change 100755 => 100644 tests/api_resources/simulations/__init__.py mode change 100755 => 100644 tests/api_resources/simulations/test_account_statements.py mode change 100755 => 100644 tests/api_resources/simulations/test_account_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_ach_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_authorization_expirations.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_authorizations.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_disputes.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_fuel_confirmations.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_increments.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_refunds.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_reversals.py mode change 100755 => 100644 tests/api_resources/simulations/test_card_settlements.py mode change 100755 => 100644 tests/api_resources/simulations/test_check_deposits.py mode change 100755 => 100644 tests/api_resources/simulations/test_check_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_digital_wallet_token_requests.py mode change 100755 => 100644 tests/api_resources/simulations/test_documents.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_ach_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_check_deposits.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_funds_holds.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py mode change 100755 => 100644 tests/api_resources/simulations/test_inbound_wire_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_interest_payments.py mode change 100755 => 100644 tests/api_resources/simulations/test_physical_cards.py mode change 100755 => 100644 tests/api_resources/simulations/test_programs.py mode change 100755 => 100644 tests/api_resources/simulations/test_real_time_payments_transfers.py mode change 100755 => 100644 tests/api_resources/simulations/test_wire_transfers.py mode change 100755 => 100644 tests/api_resources/test_account_numbers.py mode change 100755 => 100644 tests/api_resources/test_account_statements.py mode change 100755 => 100644 tests/api_resources/test_account_transfers.py mode change 100755 => 100644 tests/api_resources/test_accounts.py mode change 100755 => 100644 tests/api_resources/test_ach_prenotifications.py mode change 100755 => 100644 tests/api_resources/test_ach_transfers.py mode change 100755 => 100644 tests/api_resources/test_bookkeeping_accounts.py mode change 100755 => 100644 tests/api_resources/test_bookkeeping_entries.py mode change 100755 => 100644 tests/api_resources/test_bookkeeping_entry_sets.py mode change 100755 => 100644 tests/api_resources/test_card_disputes.py mode change 100755 => 100644 tests/api_resources/test_card_payments.py mode change 100755 => 100644 tests/api_resources/test_card_purchase_supplements.py mode change 100755 => 100644 tests/api_resources/test_cards.py mode change 100755 => 100644 tests/api_resources/test_check_deposits.py mode change 100755 => 100644 tests/api_resources/test_check_transfers.py mode change 100755 => 100644 tests/api_resources/test_declined_transactions.py mode change 100755 => 100644 tests/api_resources/test_digital_card_profiles.py mode change 100755 => 100644 tests/api_resources/test_digital_wallet_tokens.py mode change 100755 => 100644 tests/api_resources/test_documents.py mode change 100755 => 100644 tests/api_resources/test_entities.py mode change 100755 => 100644 tests/api_resources/test_event_subscriptions.py mode change 100755 => 100644 tests/api_resources/test_events.py mode change 100755 => 100644 tests/api_resources/test_exports.py mode change 100755 => 100644 tests/api_resources/test_external_accounts.py mode change 100755 => 100644 tests/api_resources/test_files.py mode change 100755 => 100644 tests/api_resources/test_groups.py mode change 100755 => 100644 tests/api_resources/test_inbound_ach_transfers.py mode change 100755 => 100644 tests/api_resources/test_inbound_check_deposits.py mode change 100755 => 100644 tests/api_resources/test_inbound_mail_items.py mode change 100755 => 100644 tests/api_resources/test_inbound_wire_drawdown_requests.py mode change 100755 => 100644 tests/api_resources/test_inbound_wire_transfers.py mode change 100755 => 100644 tests/api_resources/test_intrafi_account_enrollments.py mode change 100755 => 100644 tests/api_resources/test_intrafi_balances.py mode change 100755 => 100644 tests/api_resources/test_intrafi_exclusions.py mode change 100755 => 100644 tests/api_resources/test_lockboxes.py mode change 100755 => 100644 tests/api_resources/test_oauth_connections.py mode change 100755 => 100644 tests/api_resources/test_oauth_tokens.py mode change 100755 => 100644 tests/api_resources/test_pending_transactions.py mode change 100755 => 100644 tests/api_resources/test_physical_card_profiles.py mode change 100755 => 100644 tests/api_resources/test_physical_cards.py mode change 100755 => 100644 tests/api_resources/test_programs.py mode change 100755 => 100644 tests/api_resources/test_proof_of_authorization_request_submissions.py mode change 100755 => 100644 tests/api_resources/test_proof_of_authorization_requests.py mode change 100755 => 100644 tests/api_resources/test_real_time_decisions.py mode change 100755 => 100644 tests/api_resources/test_real_time_payments_request_for_payments.py mode change 100755 => 100644 tests/api_resources/test_real_time_payments_transfers.py mode change 100755 => 100644 tests/api_resources/test_routing_numbers.py mode change 100755 => 100644 tests/api_resources/test_supplemental_documents.py mode change 100755 => 100644 tests/api_resources/test_transactions.py mode change 100755 => 100644 tests/api_resources/test_wire_drawdown_requests.py mode change 100755 => 100644 tests/api_resources/test_wire_transfers.py mode change 100755 => 100644 tests/conftest.py mode change 100755 => 100644 tests/sample_file.txt mode change 100755 => 100644 tests/test_client.py mode change 100755 => 100644 tests/test_deepcopy.py mode change 100755 => 100644 tests/test_extract_files.py mode change 100755 => 100644 tests/test_files.py mode change 100755 => 100644 tests/test_models.py mode change 100755 => 100644 tests/test_qs.py mode change 100755 => 100644 tests/test_required_args.py mode change 100755 => 100644 tests/test_response.py mode change 100755 => 100644 tests/test_streaming.py mode change 100755 => 100644 tests/test_transform.py mode change 100755 => 100644 tests/test_utils/test_proxy.py mode change 100755 => 100644 tests/test_utils/test_typing.py mode change 100755 => 100644 tests/utils.py diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile old mode 100755 new mode 100644 diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json old mode 100755 new mode 100644 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml old mode 100755 new mode 100644 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml old mode 100755 new mode 100644 diff --git a/.gitignore b/.gitignore old mode 100755 new mode 100644 diff --git a/.python-version b/.python-version old mode 100755 new mode 100644 diff --git a/.release-please-manifest.json b/.release-please-manifest.json old mode 100755 new mode 100644 diff --git a/.stats.yml b/.stats.yml old mode 100755 new mode 100644 diff --git a/Brewfile b/Brewfile old mode 100755 new mode 100644 diff --git a/CHANGELOG.md b/CHANGELOG.md old mode 100755 new mode 100644 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/LICENSE b/LICENSE old mode 100755 new mode 100644 diff --git a/README.md b/README.md old mode 100755 new mode 100644 diff --git a/SECURITY.md b/SECURITY.md old mode 100755 new mode 100644 diff --git a/api.md b/api.md old mode 100755 new mode 100644 diff --git a/bin/check-release-environment b/bin/check-release-environment old mode 100755 new mode 100644 diff --git a/bin/publish-pypi b/bin/publish-pypi old mode 100755 new mode 100644 diff --git a/examples/.keep b/examples/.keep old mode 100755 new mode 100644 diff --git a/examples/datetime_usage.py b/examples/datetime_usage.py old mode 100755 new mode 100644 diff --git a/examples/status_errors.py b/examples/status_errors.py old mode 100755 new mode 100644 diff --git a/mypy.ini b/mypy.ini old mode 100755 new mode 100644 diff --git a/noxfile.py b/noxfile.py old mode 100755 new mode 100644 diff --git a/pyproject.toml b/pyproject.toml old mode 100755 new mode 100644 diff --git a/release-please-config.json b/release-please-config.json old mode 100755 new mode 100644 diff --git a/requirements-dev.lock b/requirements-dev.lock old mode 100755 new mode 100644 diff --git a/requirements.lock b/requirements.lock old mode 100755 new mode 100644 diff --git a/scripts/utils/ruffen-docs.py b/scripts/utils/ruffen-docs.py old mode 100755 new mode 100644 diff --git a/src/increase/__init__.py b/src/increase/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py old mode 100755 new mode 100644 diff --git a/src/increase/_client.py b/src/increase/_client.py old mode 100755 new mode 100644 diff --git a/src/increase/_compat.py b/src/increase/_compat.py old mode 100755 new mode 100644 diff --git a/src/increase/_constants.py b/src/increase/_constants.py old mode 100755 new mode 100644 diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py old mode 100755 new mode 100644 diff --git a/src/increase/_files.py b/src/increase/_files.py old mode 100755 new mode 100644 diff --git a/src/increase/_models.py b/src/increase/_models.py old mode 100755 new mode 100644 diff --git a/src/increase/_qs.py b/src/increase/_qs.py old mode 100755 new mode 100644 diff --git a/src/increase/_resource.py b/src/increase/_resource.py old mode 100755 new mode 100644 diff --git a/src/increase/_response.py b/src/increase/_response.py old mode 100755 new mode 100644 diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py old mode 100755 new mode 100644 diff --git a/src/increase/_types.py b/src/increase/_types.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_logs.py b/src/increase/_utils/_logs.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_reflection.py b/src/increase/_utils/_reflection.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_streams.py b/src/increase/_utils/_streams.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py old mode 100755 new mode 100644 diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py old mode 100755 new mode 100644 diff --git a/src/increase/_version.py b/src/increase/_version.py old mode 100755 new mode 100644 diff --git a/src/increase/lib/.keep b/src/increase/lib/.keep old mode 100755 new mode 100644 diff --git a/src/increase/pagination.py b/src/increase/pagination.py old mode 100755 new mode 100644 diff --git a/src/increase/py.typed b/src/increase/py.typed old mode 100755 new mode 100644 diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py old mode 100755 new mode 100644 diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account.py b/src/increase/types/account.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_balance_params.py b/src/increase/types/account_balance_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_create_params.py b/src/increase/types/account_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_number.py b/src/increase/types/account_number.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_number_create_params.py b/src/increase/types/account_number_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_number_update_params.py b/src/increase/types/account_number_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_statement_list_params.py b/src/increase/types/account_statement_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_transfer_create_params.py b/src/increase/types/account_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_transfer_list_params.py b/src/increase/types/account_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_prenotification_list_params.py b/src/increase/types/ach_prenotification_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/ach_transfer_list_params.py b/src/increase/types/ach_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/balance_lookup.py b/src/increase/types/balance_lookup.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_account.py b/src/increase/types/bookkeeping_account.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_account_balance_params.py b/src/increase/types/bookkeeping_account_balance_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_account_create_params.py b/src/increase/types/bookkeeping_account_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_account_list_params.py b/src/increase/types/bookkeeping_account_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_account_update_params.py b/src/increase/types/bookkeeping_account_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_balance_lookup.py b/src/increase/types/bookkeeping_balance_lookup.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_entry.py b/src/increase/types/bookkeeping_entry.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_entry_list_params.py b/src/increase/types/bookkeeping_entry_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_entry_set.py b/src/increase/types/bookkeeping_entry_set.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_entry_set_create_params.py b/src/increase/types/bookkeeping_entry_set_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/bookkeeping_entry_set_list_params.py b/src/increase/types/bookkeeping_entry_set_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card.py b/src/increase/types/card.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_details.py b/src/increase/types/card_details.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_list_params.py b/src/increase/types/card_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_payment_list_params.py b/src/increase/types/card_payment_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_purchase_supplement_list_params.py b/src/increase/types/card_purchase_supplement_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_deposit_create_params.py b/src/increase/types/check_deposit_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_deposit_list_params.py b/src/increase/types/check_deposit_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/check_transfer_stop_payment_params.py b/src/increase/types/check_transfer_stop_payment_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py old mode 100755 new mode 100644 diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_card_profile_clone_params.py b/src/increase/types/digital_card_profile_clone_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_card_profile_create_params.py b/src/increase/types/digital_card_profile_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_card_profile_list_params.py b/src/increase/types/digital_card_profile_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py old mode 100755 new mode 100644 diff --git a/src/increase/types/digital_wallet_token_list_params.py b/src/increase/types/digital_wallet_token_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/document.py b/src/increase/types/document.py old mode 100755 new mode 100644 diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_archive_beneficial_owner_params.py b/src/increase/types/entity_archive_beneficial_owner_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_confirm_params.py b/src/increase/types/entity_confirm_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_list_params.py b/src/increase/types/entity_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_supplemental_document.py b/src/increase/types/entity_supplemental_document.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_update_address_params.py b/src/increase/types/entity_update_address_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/entity_update_industry_code_params.py b/src/increase/types/entity_update_industry_code_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event.py b/src/increase/types/event.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event_subscription_list_params.py b/src/increase/types/event_subscription_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/event_subscription_update_params.py b/src/increase/types/event_subscription_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/export.py b/src/increase/types/export.py old mode 100755 new mode 100644 diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py old mode 100755 new mode 100644 diff --git a/src/increase/types/external_account_create_params.py b/src/increase/types/external_account_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/external_account_list_params.py b/src/increase/types/external_account_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/external_account_update_params.py b/src/increase/types/external_account_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/file.py b/src/increase/types/file.py old mode 100755 new mode 100644 diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/group.py b/src/increase/types/group.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py b/src/increase/types/inbound_ach_transfer_create_notification_of_change_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_ach_transfer_list_params.py b/src/increase/types/inbound_ach_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_ach_transfer_transfer_return_params.py b/src/increase/types/inbound_ach_transfer_transfer_return_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_check_deposit_list_params.py b/src/increase/types/inbound_check_deposit_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_mail_item_list_params.py b/src/increase/types/inbound_mail_item_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_wire_drawdown_request_list_params.py b/src/increase/types/inbound_wire_drawdown_request_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_account_enrollment_create_params.py b/src/increase/types/intrafi_account_enrollment_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_account_enrollment_list_params.py b/src/increase/types/intrafi_account_enrollment_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi_balance.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_exclusion_create_params.py b/src/increase/types/intrafi_exclusion_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/intrafi_exclusion_list_params.py b/src/increase/types/intrafi_exclusion_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py old mode 100755 new mode 100644 diff --git a/src/increase/types/lockbox_create_params.py b/src/increase/types/lockbox_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/lockbox_list_params.py b/src/increase/types/lockbox_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/oauth_connection.py b/src/increase/types/oauth_connection.py old mode 100755 new mode 100644 diff --git a/src/increase/types/oauth_connection_list_params.py b/src/increase/types/oauth_connection_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/oauth_token.py b/src/increase/types/oauth_token.py old mode 100755 new mode 100644 diff --git a/src/increase/types/oauth_token_create_params.py b/src/increase/types/oauth_token_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py old mode 100755 new mode 100644 diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_create_params.py b/src/increase/types/physical_card_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_list_params.py b/src/increase/types/physical_card_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_profile_clone_params.py b/src/increase/types/physical_card_profile_clone_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_profile_list_params.py b/src/increase/types/physical_card_profile_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/physical_card_update_params.py b/src/increase/types/physical_card_update_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/program.py b/src/increase/types/program.py old mode 100755 new mode 100644 diff --git a/src/increase/types/program_list_params.py b/src/increase/types/program_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/proof_of_authorization_request.py b/src/increase/types/proof_of_authorization_request.py old mode 100755 new mode 100644 diff --git a/src/increase/types/proof_of_authorization_request_list_params.py b/src/increase/types/proof_of_authorization_request_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py old mode 100755 new mode 100644 diff --git a/src/increase/types/proof_of_authorization_request_submission_create_params.py b/src/increase/types/proof_of_authorization_request_submission_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/proof_of_authorization_request_submission_list_params.py b/src/increase/types/proof_of_authorization_request_submission_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_request_for_payment.py b/src/increase/types/real_time_payments_request_for_payment.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_request_for_payment_create_params.py b/src/increase/types/real_time_payments_request_for_payment_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_request_for_payment_list_params.py b/src/increase/types/real_time_payments_request_for_payment_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_transfer_create_params.py b/src/increase/types/real_time_payments_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/real_time_payments_transfer_list_params.py b/src/increase/types/real_time_payments_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/routing_number_list_params.py b/src/increase/types/routing_number_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/account_statement_create_params.py b/src/increase/types/simulations/account_statement_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py b/src/increase/types/simulations/ach_transfer_create_notification_of_change_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/ach_transfer_return_params.py b/src/increase/types/simulations/ach_transfer_return_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_authorization_expiration_create_params.py b/src/increase/types/simulations/card_authorization_expiration_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_fuel_confirmation_create_params.py b/src/increase/types/simulations/card_fuel_confirmation_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_increment_create_params.py b/src/increase/types/simulations/card_increment_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_refund_create_params.py b/src/increase/types/simulations/card_refund_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_reversal_create_params.py b/src/increase/types/simulations/card_reversal_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/card_settlement_create_params.py b/src/increase/types/simulations/card_settlement_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/digital_wallet_token_request_create_params.py b/src/increase/types/simulations/digital_wallet_token_request_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/digital_wallet_token_request_create_response.py b/src/increase/types/simulations/digital_wallet_token_request_create_response.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/document_create_params.py b/src/increase/types/simulations/document_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_check_deposit_create_params.py b/src/increase/types/simulations/inbound_check_deposit_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_funds_hold_release_response.py b/src/increase/types/simulations/inbound_funds_hold_release_response.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py b/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/interest_payment_create_params.py b/src/increase/types/simulations/interest_payment_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/physical_card_advance_shipment_params.py b/src/increase/types/simulations/physical_card_advance_shipment_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/supplemental_document_create_params.py b/src/increase/types/supplemental_document_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/supplemental_document_list_params.py b/src/increase/types/supplemental_document_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py old mode 100755 new mode 100644 diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py old mode 100755 new mode 100644 diff --git a/src/increase/types/wire_transfer_list_params.py b/src/increase/types/wire_transfer_list_params.py old mode 100755 new mode 100644 diff --git a/tests/__init__.py b/tests/__init__.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/__init__.py b/tests/api_resources/__init__.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/__init__.py b/tests/api_resources/simulations/__init__.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_account_statements.py b/tests/api_resources/simulations/test_account_statements.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_authorization_expirations.py b/tests/api_resources/simulations/test_card_authorization_expirations.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_fuel_confirmations.py b/tests/api_resources/simulations/test_card_fuel_confirmations.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_increments.py b/tests/api_resources/simulations/test_card_increments.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_reversals.py b/tests/api_resources/simulations/test_card_reversals.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_card_settlements.py b/tests/api_resources/simulations/test_card_settlements.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_digital_wallet_token_requests.py b/tests/api_resources/simulations/test_digital_wallet_token_requests.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py old mode 100755 new mode 100644 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 old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_real_time_payments_transfers.py b/tests/api_resources/simulations/test_real_time_payments_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_groups.py b/tests/api_resources/test_groups.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/test_intrafi_balances.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_oauth_tokens.py b/tests/api_resources/test_oauth_tokens.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py old mode 100755 new mode 100644 diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py old mode 100755 new mode 100644 diff --git a/tests/conftest.py b/tests/conftest.py old mode 100755 new mode 100644 diff --git a/tests/sample_file.txt b/tests/sample_file.txt old mode 100755 new mode 100644 diff --git a/tests/test_client.py b/tests/test_client.py old mode 100755 new mode 100644 diff --git a/tests/test_deepcopy.py b/tests/test_deepcopy.py old mode 100755 new mode 100644 diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py old mode 100755 new mode 100644 diff --git a/tests/test_files.py b/tests/test_files.py old mode 100755 new mode 100644 diff --git a/tests/test_models.py b/tests/test_models.py old mode 100755 new mode 100644 diff --git a/tests/test_qs.py b/tests/test_qs.py old mode 100755 new mode 100644 diff --git a/tests/test_required_args.py b/tests/test_required_args.py old mode 100755 new mode 100644 diff --git a/tests/test_response.py b/tests/test_response.py old mode 100755 new mode 100644 diff --git a/tests/test_streaming.py b/tests/test_streaming.py old mode 100755 new mode 100644 diff --git a/tests/test_transform.py b/tests/test_transform.py old mode 100755 new mode 100644 diff --git a/tests/test_utils/test_proxy.py b/tests/test_utils/test_proxy.py old mode 100755 new mode 100644 diff --git a/tests/test_utils/test_typing.py b/tests/test_utils/test_typing.py old mode 100755 new mode 100644 diff --git a/tests/utils.py b/tests/utils.py old mode 100755 new mode 100644 From 451c9c0a9007db5329d0bb219fb411994c1f2905 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:25:34 +0000 Subject: [PATCH 0189/1325] feat(api): OpenAPI spec update via Stainless API (#645) --- .stats.yml | 2 +- src/increase/types/declined_transaction.py | 3 + src/increase/types/transaction.py | 77 +++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 4 files changed, 82 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 61a2168dd..da9479107 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d702ed05ea362b431f9948b3710582b7ca63a9d902774b33a4a6a8b50d36a819.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-53aacd2a55b5f2b8ef8047a21a9db039558af51d5602d691fb86d12fcce8f022.yml diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 77422ccb5..0b8c5d277 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -666,6 +666,9 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): transaction_identification: str """The Real-Time Payments network identification of the declined transfer.""" + transfer_id: str + """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d78d4c60c..9811d0bc7 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -46,6 +46,7 @@ "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", "SourceInboundRealTimePaymentsTransferConfirmation", + "SourceInboundRealTimePaymentsTransferDecline", "SourceInboundWireReversal", "SourceInboundWireTransfer", "SourceInterestPayment", @@ -1846,6 +1847,71 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): transaction_identification: str """The Real-Time Payments network identification of the transfer.""" + transfer_id: str + """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + + +class SourceInboundRealTimePaymentsTransferDecline(BaseModel): + amount: int + """The declined amount in the minor unit of the destination account currency. + + For dollars, for example, this is cents. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined + transfer's currency. This will always be "USD" for a Real-Time Payments + transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "real_time_payments_not_enabled", + ] + """Why the transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `real_time_payments_not_enabled` - Your account is not enabled to receive + Real-Time Payments transfers. + """ + + remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + transaction_identification: str + """The Real-Time Payments network identification of the declined transfer.""" + + transfer_id: str + """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + class SourceInboundWireReversal(BaseModel): amount: int @@ -2207,6 +2273,7 @@ class Source(BaseModel): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_real_time_payments_transfer_confirmation", + "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", @@ -2260,6 +2327,9 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. + - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments + Transfer Decline: details will be under the + `inbound_real_time_payments_transfer_decline` object. - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the `inbound_wire_reversal` object. - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be @@ -2324,6 +2394,13 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_confirmation`. """ + inbound_real_time_payments_transfer_decline: Optional[SourceInboundRealTimePaymentsTransferDecline] = None + """An Inbound Real-Time Payments Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_real_time_payments_transfer_decline`. + """ + inbound_wire_reversal: Optional[SourceInboundWireReversal] = None """An Inbound Wire Reversal object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index a5357437d..625286ac2 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -58,6 +58,7 @@ class TransactionListParams(TypedDict, total=False): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_real_time_payments_transfer_confirmation", + "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", From 988c092ca96218d02718582e86bfb58e2427fef4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Sep 2024 19:27:04 +0000 Subject: [PATCH 0190/1325] chore(internal): codegen related update (#647) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd34dce09..3e05ae562 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.107.0" + ".": "0.108.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 65405f8bb..b5a46405e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.107.0" +version = "0.108.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 493d14b4b..b4474a1a8 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.107.0" # x-release-please-version +__version__ = "0.108.0" # x-release-please-version From 5d8aedecd7f8b51faaa6675137538670aab8d1dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:02:21 +0000 Subject: [PATCH 0191/1325] feat(api): OpenAPI spec update via Stainless API (#648) --- .stats.yml | 2 +- README.md | 11 ++++++++++ src/increase/resources/account_numbers.py | 22 +++++++++++++++++++ src/increase/resources/account_statements.py | 22 +++++++++++++++++++ src/increase/resources/account_transfers.py | 22 +++++++++++++++++++ src/increase/resources/accounts.py | 22 +++++++++++++++++++ .../resources/ach_prenotifications.py | 22 +++++++++++++++++++ src/increase/resources/ach_transfers.py | 22 +++++++++++++++++++ .../resources/bookkeeping_accounts.py | 22 +++++++++++++++++++ src/increase/resources/bookkeeping_entries.py | 22 +++++++++++++++++++ .../resources/bookkeeping_entry_sets.py | 22 +++++++++++++++++++ src/increase/resources/card_disputes.py | 22 +++++++++++++++++++ src/increase/resources/card_payments.py | 22 +++++++++++++++++++ .../resources/card_purchase_supplements.py | 22 +++++++++++++++++++ src/increase/resources/cards.py | 22 +++++++++++++++++++ src/increase/resources/check_deposits.py | 22 +++++++++++++++++++ src/increase/resources/check_transfers.py | 22 +++++++++++++++++++ .../resources/declined_transactions.py | 22 +++++++++++++++++++ .../resources/digital_card_profiles.py | 22 +++++++++++++++++++ .../resources/digital_wallet_tokens.py | 22 +++++++++++++++++++ src/increase/resources/documents.py | 22 +++++++++++++++++++ src/increase/resources/entities.py | 22 +++++++++++++++++++ src/increase/resources/event_subscriptions.py | 22 +++++++++++++++++++ src/increase/resources/events.py | 22 +++++++++++++++++++ src/increase/resources/exports.py | 22 +++++++++++++++++++ src/increase/resources/external_accounts.py | 22 +++++++++++++++++++ src/increase/resources/files.py | 22 +++++++++++++++++++ src/increase/resources/groups.py | 22 +++++++++++++++++++ .../resources/inbound_ach_transfers.py | 22 +++++++++++++++++++ .../resources/inbound_check_deposits.py | 22 +++++++++++++++++++ src/increase/resources/inbound_mail_items.py | 22 +++++++++++++++++++ .../inbound_real_time_payments_transfers.py | 22 +++++++++++++++++++ .../inbound_wire_drawdown_requests.py | 22 +++++++++++++++++++ .../resources/inbound_wire_transfers.py | 22 +++++++++++++++++++ .../resources/intrafi_account_enrollments.py | 22 +++++++++++++++++++ src/increase/resources/intrafi_balances.py | 22 +++++++++++++++++++ src/increase/resources/intrafi_exclusions.py | 22 +++++++++++++++++++ src/increase/resources/lockboxes.py | 22 +++++++++++++++++++ src/increase/resources/oauth_connections.py | 22 +++++++++++++++++++ src/increase/resources/oauth_tokens.py | 22 +++++++++++++++++++ .../resources/pending_transactions.py | 22 +++++++++++++++++++ .../resources/physical_card_profiles.py | 22 +++++++++++++++++++ src/increase/resources/physical_cards.py | 22 +++++++++++++++++++ src/increase/resources/programs.py | 22 +++++++++++++++++++ ...of_of_authorization_request_submissions.py | 22 +++++++++++++++++++ .../proof_of_authorization_requests.py | 22 +++++++++++++++++++ src/increase/resources/real_time_decisions.py | 22 +++++++++++++++++++ ...real_time_payments_request_for_payments.py | 22 +++++++++++++++++++ .../resources/real_time_payments_transfers.py | 22 +++++++++++++++++++ src/increase/resources/routing_numbers.py | 22 +++++++++++++++++++ .../simulations/account_statements.py | 22 +++++++++++++++++++ .../simulations/account_transfers.py | 22 +++++++++++++++++++ .../resources/simulations/ach_transfers.py | 22 +++++++++++++++++++ .../card_authorization_expirations.py | 22 +++++++++++++++++++ .../simulations/card_authorizations.py | 22 +++++++++++++++++++ .../resources/simulations/card_disputes.py | 22 +++++++++++++++++++ .../simulations/card_fuel_confirmations.py | 22 +++++++++++++++++++ .../resources/simulations/card_increments.py | 22 +++++++++++++++++++ .../resources/simulations/card_refunds.py | 22 +++++++++++++++++++ .../resources/simulations/card_reversals.py | 22 +++++++++++++++++++ .../resources/simulations/card_settlements.py | 22 +++++++++++++++++++ .../resources/simulations/check_deposits.py | 22 +++++++++++++++++++ .../resources/simulations/check_transfers.py | 22 +++++++++++++++++++ .../digital_wallet_token_requests.py | 22 +++++++++++++++++++ .../resources/simulations/documents.py | 22 +++++++++++++++++++ .../simulations/inbound_ach_transfers.py | 22 +++++++++++++++++++ .../simulations/inbound_check_deposits.py | 22 +++++++++++++++++++ .../simulations/inbound_funds_holds.py | 22 +++++++++++++++++++ .../simulations/inbound_mail_items.py | 22 +++++++++++++++++++ .../inbound_real_time_payments_transfers.py | 22 +++++++++++++++++++ .../inbound_wire_drawdown_requests.py | 22 +++++++++++++++++++ .../simulations/inbound_wire_transfers.py | 22 +++++++++++++++++++ .../simulations/interest_payments.py | 22 +++++++++++++++++++ .../resources/simulations/physical_cards.py | 22 +++++++++++++++++++ .../resources/simulations/programs.py | 22 +++++++++++++++++++ .../real_time_payments_transfers.py | 22 +++++++++++++++++++ .../resources/simulations/simulations.py | 22 +++++++++++++++++++ .../resources/simulations/wire_transfers.py | 22 +++++++++++++++++++ .../resources/supplemental_documents.py | 22 +++++++++++++++++++ src/increase/resources/transactions.py | 22 +++++++++++++++++++ .../resources/wire_drawdown_requests.py | 22 +++++++++++++++++++ src/increase/resources/wire_transfers.py | 22 +++++++++++++++++++ src/increase/types/card_payment.py | 6 +++++ src/increase/types/declined_transaction.py | 6 +++++ src/increase/types/pending_transaction.py | 6 +++++ src/increase/types/transaction.py | 6 +++++ 86 files changed, 1796 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index da9479107..8a8958892 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-53aacd2a55b5f2b8ef8047a21a9db039558af51d5602d691fb86d12fcce8f022.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8a3ed6ba07fe899833ce43b6d6d5cf20600b2ffc052bb7b9d492f5a72af4905b.yml diff --git a/README.md b/README.md index 8a245ee9a..edce34869 100644 --- a/README.md +++ b/README.md @@ -425,6 +425,17 @@ We take backwards-compatibility seriously and work hard to ensure you can rely o We are keen for your feedback; please open an [issue](https://www.github.com/Increase/increase-python/issues) with questions, bugs, or suggestions. +### Determining the installed version + +If you've upgraded to the latest version but aren't seeing any new features you were expecting then your python environment is likely still using an older version. + +You can determine the version that is being used at runtime with: + +```py +import increase +print(increase.__version__) +``` + ## Requirements Python 3.7 or higher. diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 37125226b..60942c447 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -34,10 +34,21 @@ class AccountNumbersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountNumbersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountNumbersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountNumbersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountNumbersResourceWithStreamingResponse(self) def create( @@ -282,10 +293,21 @@ def list( class AsyncAccountNumbersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountNumbersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountNumbersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountNumbersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountNumbersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 1ea474854..bcac68ccb 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -25,10 +25,21 @@ class AccountStatementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountStatementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountStatementsResourceWithStreamingResponse(self) def retrieve( @@ -126,10 +137,21 @@ def list( class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountStatementsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index ef942a740..31087746e 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -28,10 +28,21 @@ class AccountTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountTransfersResourceWithStreamingResponse(self) def create( @@ -287,10 +298,21 @@ def cancel( class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 11537977d..6623df3df 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -38,10 +38,21 @@ class AccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountsResourceWithStreamingResponse(self) def create( @@ -346,10 +357,21 @@ def close( class AsyncAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index b53f8c1b0..9c1172317 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -32,10 +32,21 @@ class ACHPrenotificationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHPrenotificationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ACHPrenotificationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ACHPrenotificationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ACHPrenotificationsResourceWithStreamingResponse(self) def create( @@ -247,10 +258,21 @@ def list( class AsyncACHPrenotificationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHPrenotificationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncACHPrenotificationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncACHPrenotificationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncACHPrenotificationsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 45a46fbb4..27c5eee9b 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -30,10 +30,21 @@ class ACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ACHTransfersResourceWithStreamingResponse(self) def create( @@ -375,10 +386,21 @@ def cancel( class AsyncACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncACHTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 7fad31d1f..0594eab90 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -38,10 +38,21 @@ class BookkeepingAccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return BookkeepingAccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> BookkeepingAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return BookkeepingAccountsResourceWithStreamingResponse(self) def create( @@ -258,10 +269,21 @@ def balance( class AsyncBookkeepingAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncBookkeepingAccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncBookkeepingAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncBookkeepingAccountsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index d774cda33..be096e4c2 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -25,10 +25,21 @@ class BookkeepingEntriesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingEntriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return BookkeepingEntriesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> BookkeepingEntriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return BookkeepingEntriesResourceWithStreamingResponse(self) def retrieve( @@ -120,10 +131,21 @@ def list( class AsyncBookkeepingEntriesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingEntriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncBookkeepingEntriesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncBookkeepingEntriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncBookkeepingEntriesResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index 1aa8b68e3..57fb95b41 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -31,10 +31,21 @@ class BookkeepingEntrySetsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingEntrySetsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return BookkeepingEntrySetsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> BookkeepingEntrySetsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return BookkeepingEntrySetsResourceWithStreamingResponse(self) def create( @@ -192,10 +203,21 @@ def list( class AsyncBookkeepingEntrySetsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingEntrySetsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncBookkeepingEntrySetsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncBookkeepingEntrySetsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 45c8e8b73..7fc64b0d1 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -28,10 +28,21 @@ class CardDisputesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardDisputesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardDisputesResourceWithStreamingResponse(self) def create( @@ -183,10 +194,21 @@ def list( class AsyncCardDisputesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardDisputesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardDisputesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 9f70437e6..ff26923d7 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -25,10 +25,21 @@ class CardPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardPaymentsResourceWithStreamingResponse(self) def retrieve( @@ -128,10 +139,21 @@ def list( class AsyncCardPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardPaymentsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 20a7f41c2..0a9743c73 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -25,10 +25,21 @@ class CardPurchaseSupplementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardPurchaseSupplementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardPurchaseSupplementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardPurchaseSupplementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardPurchaseSupplementsResourceWithStreamingResponse(self) def retrieve( @@ -127,10 +138,21 @@ def list( class AsyncCardPurchaseSupplementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardPurchaseSupplementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardPurchaseSupplementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardPurchaseSupplementsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index fd16aac16..517a66c76 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -31,10 +31,21 @@ class CardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardsResourceWithStreamingResponse(self) def create( @@ -313,10 +324,21 @@ def details( class AsyncCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index ec91d342b..8653814fc 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -28,10 +28,21 @@ class CheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CheckDepositsResourceWithStreamingResponse(self) def create( @@ -197,10 +208,21 @@ def list( class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCheckDepositsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 6a1322e28..53737a1a2 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -34,10 +34,21 @@ class CheckTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CheckTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CheckTransfersResourceWithStreamingResponse(self) def create( @@ -354,10 +365,21 @@ def stop_payment( class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCheckTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 330395cf6..e4eb2d1ef 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -25,10 +25,21 @@ class DeclinedTransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DeclinedTransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DeclinedTransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DeclinedTransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DeclinedTransactionsResourceWithStreamingResponse(self) def retrieve( @@ -132,10 +143,21 @@ def list( class AsyncDeclinedTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDeclinedTransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDeclinedTransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDeclinedTransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDeclinedTransactionsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index bd07b9cd0..6a42346d6 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -32,10 +32,21 @@ class DigitalCardProfilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalCardProfilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DigitalCardProfilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DigitalCardProfilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DigitalCardProfilesResourceWithStreamingResponse(self) def create( @@ -343,10 +354,21 @@ def clone( class AsyncDigitalCardProfilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalCardProfilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDigitalCardProfilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDigitalCardProfilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDigitalCardProfilesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index eca69456c..d541453b9 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -25,10 +25,21 @@ class DigitalWalletTokensResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalWalletTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DigitalWalletTokensResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DigitalWalletTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DigitalWalletTokensResourceWithStreamingResponse(self) def retrieve( @@ -126,10 +137,21 @@ def list( class AsyncDigitalWalletTokensResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalWalletTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDigitalWalletTokensResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDigitalWalletTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDigitalWalletTokensResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index d805ad9ac..99a81fbc8 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -25,10 +25,21 @@ class DocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DocumentsResourceWithStreamingResponse(self) def retrieve( @@ -126,10 +137,21 @@ def list( class AsyncDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDocumentsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index bab96cc22..d1671f672 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -41,10 +41,21 @@ class EntitiesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EntitiesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return EntitiesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> EntitiesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return EntitiesResourceWithStreamingResponse(self) def create( @@ -583,10 +594,21 @@ def update_industry_code( class AsyncEntitiesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncEntitiesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncEntitiesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncEntitiesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 1a3718a91..0f5c890b6 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -34,10 +34,21 @@ class EventSubscriptionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EventSubscriptionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return EventSubscriptionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> EventSubscriptionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return EventSubscriptionsResourceWithStreamingResponse(self) def create( @@ -472,10 +483,21 @@ def list( class AsyncEventSubscriptionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEventSubscriptionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncEventSubscriptionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncEventSubscriptionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncEventSubscriptionsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 0c40e6359..85691c875 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -25,10 +25,21 @@ class EventsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EventsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return EventsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> EventsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return EventsResourceWithStreamingResponse(self) def retrieve( @@ -126,10 +137,21 @@ def list( class AsyncEventsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEventsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncEventsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncEventsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncEventsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 7b88ee376..7504246a7 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -30,10 +30,21 @@ class ExportsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ExportsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ExportsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ExportsResourceWithStreamingResponse(self) def create( @@ -228,10 +239,21 @@ def list( class AsyncExportsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncExportsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncExportsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index a335b048c..387a3d3f2 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -34,10 +34,21 @@ class ExternalAccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ExternalAccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ExternalAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ExternalAccountsResourceWithStreamingResponse(self) def create( @@ -289,10 +300,21 @@ def list( class AsyncExternalAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncExternalAccountsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncExternalAccountsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncExternalAccountsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index c10fb9bdb..718860311 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -33,10 +33,21 @@ class FilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> FilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return FilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> FilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return FilesResourceWithStreamingResponse(self) def create( @@ -239,10 +250,21 @@ def list( class AsyncFilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncFilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncFilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncFilesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 84a2f1aff..98b9ab8de 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -22,10 +22,21 @@ class GroupsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> GroupsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return GroupsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> GroupsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return GroupsResourceWithStreamingResponse(self) def retrieve( @@ -51,10 +62,21 @@ def retrieve( class AsyncGroupsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncGroupsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncGroupsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncGroupsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncGroupsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index efa002682..52aa8642f 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -34,10 +34,21 @@ class InboundACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundACHTransfersResourceWithStreamingResponse(self) def retrieve( @@ -337,10 +348,21 @@ def transfer_return( class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundACHTransfersResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index c766b74db..364d705da 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -30,10 +30,21 @@ class InboundCheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundCheckDepositsResourceWithStreamingResponse(self) def retrieve( @@ -242,10 +253,21 @@ def return_( class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 13c914c60..95ee1ea64 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -25,10 +25,21 @@ class InboundMailItemsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundMailItemsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundMailItemsResourceWithStreamingResponse(self) def retrieve( @@ -126,10 +137,21 @@ def list( class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundMailItemsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundMailItemsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index 7804d75d8..19a15d556 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -25,10 +25,21 @@ class InboundRealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) def retrieve( @@ -132,10 +143,21 @@ def list( class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index 91f3bda03..01b8e6724 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -25,10 +25,21 @@ class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def retrieve( @@ -120,10 +131,21 @@ def list( class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 45d53fc7a..7e1d920f3 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -27,10 +27,21 @@ class InboundWireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundWireTransfersResourceWithStreamingResponse(self) def retrieve( @@ -142,10 +153,21 @@ def list( class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundWireTransfersResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 69342cfd0..b07a8e2a1 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -28,10 +28,21 @@ class IntrafiAccountEnrollmentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiAccountEnrollmentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return IntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> IntrafiAccountEnrollmentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return IntrafiAccountEnrollmentsResourceWithStreamingResponse(self) def create( @@ -230,10 +241,21 @@ def unenroll( class AsyncIntrafiAccountEnrollmentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index 3cd064011..abf5d5df0 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -22,10 +22,21 @@ class IntrafiBalancesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiBalancesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return IntrafiBalancesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> IntrafiBalancesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return IntrafiBalancesResourceWithStreamingResponse(self) def retrieve( @@ -67,10 +78,21 @@ def retrieve( class AsyncIntrafiBalancesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiBalancesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncIntrafiBalancesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncIntrafiBalancesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncIntrafiBalancesResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 81e1ba739..5adc284fd 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -28,10 +28,21 @@ class IntrafiExclusionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiExclusionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return IntrafiExclusionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> IntrafiExclusionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return IntrafiExclusionsResourceWithStreamingResponse(self) def create( @@ -230,10 +241,21 @@ def archive( class AsyncIntrafiExclusionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiExclusionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncIntrafiExclusionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncIntrafiExclusionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncIntrafiExclusionsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index f88fd7e02..6ade3c08c 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -30,10 +30,21 @@ class LockboxesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> LockboxesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return LockboxesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> LockboxesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return LockboxesResourceWithStreamingResponse(self) def create( @@ -254,10 +265,21 @@ def list( class AsyncLockboxesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncLockboxesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncLockboxesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncLockboxesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncLockboxesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index f33e94a47..55630cf00 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -25,10 +25,21 @@ class OAuthConnectionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> OAuthConnectionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return OAuthConnectionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> OAuthConnectionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return OAuthConnectionsResourceWithStreamingResponse(self) def retrieve( @@ -122,10 +133,21 @@ def list( class AsyncOAuthConnectionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncOAuthConnectionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncOAuthConnectionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncOAuthConnectionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncOAuthConnectionsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index e2c2f1ca9..02522c854 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -29,10 +29,21 @@ class OAuthTokensResource(SyncAPIResource): @cached_property def with_raw_response(self) -> OAuthTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return OAuthTokensResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> OAuthTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return OAuthTokensResourceWithStreamingResponse(self) def create( @@ -110,10 +121,21 @@ def create( class AsyncOAuthTokensResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncOAuthTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncOAuthTokensResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncOAuthTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncOAuthTokensResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index c174ba0ef..8d9e1bf4e 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -25,10 +25,21 @@ class PendingTransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return PendingTransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return PendingTransactionsResourceWithStreamingResponse(self) def retrieve( @@ -134,10 +145,21 @@ def list( class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncPendingTransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncPendingTransactionsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index c66db39d0..8cf6d5bcf 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -32,10 +32,21 @@ class PhysicalCardProfilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardProfilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return PhysicalCardProfilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> PhysicalCardProfilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return PhysicalCardProfilesResourceWithStreamingResponse(self) def create( @@ -308,10 +319,21 @@ def clone( class AsyncPhysicalCardProfilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardProfilesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncPhysicalCardProfilesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncPhysicalCardProfilesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncPhysicalCardProfilesResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 4ba94b56c..48b6cb36b 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -30,10 +30,21 @@ class PhysicalCardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return PhysicalCardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return PhysicalCardsResourceWithStreamingResponse(self) def create( @@ -245,10 +256,21 @@ def list( class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncPhysicalCardsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 009d322b1..34df34505 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -25,10 +25,21 @@ class ProgramsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProgramsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ProgramsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ProgramsResourceWithStreamingResponse(self) def retrieve( @@ -118,10 +129,21 @@ def list( class AsyncProgramsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncProgramsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncProgramsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index d8319ab58..91cc71c3b 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -34,10 +34,21 @@ class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) def create( @@ -226,10 +237,21 @@ def list( class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index 337457a5f..a5ea06c53 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -25,10 +25,21 @@ class ProofOfAuthorizationRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ProofOfAuthorizationRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ProofOfAuthorizationRequestsResourceWithStreamingResponse(self) def retrieve( @@ -122,10 +133,21 @@ def list( class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncProofOfAuthorizationRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 93980b4d7..3a096aaf6 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -27,10 +27,21 @@ class RealTimeDecisionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimeDecisionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return RealTimeDecisionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> RealTimeDecisionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return RealTimeDecisionsResourceWithStreamingResponse(self) def retrieve( @@ -139,10 +150,21 @@ def action( class AsyncRealTimeDecisionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimeDecisionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncRealTimeDecisionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncRealTimeDecisionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncRealTimeDecisionsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index a5e170678..f15d12333 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -34,10 +34,21 @@ class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return RealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) def create( @@ -215,10 +226,21 @@ def list( class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index b62b0d10f..54fc62024 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -28,10 +28,21 @@ class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def create( @@ -234,10 +245,21 @@ def list( class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index f485b4d2e..90dc005ea 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -25,10 +25,21 @@ class RoutingNumbersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RoutingNumbersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return RoutingNumbersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> RoutingNumbersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return RoutingNumbersResourceWithStreamingResponse(self) def list( @@ -90,10 +101,21 @@ def list( class AsyncRoutingNumbersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRoutingNumbersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncRoutingNumbersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncRoutingNumbersResourceWithStreamingResponse(self) def list( diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index 85080b70d..d4eeefd06 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -27,10 +27,21 @@ class AccountStatementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountStatementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountStatementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountStatementsResourceWithStreamingResponse(self) def create( @@ -81,10 +92,21 @@ def create( class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountStatementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountStatementsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 7495451ca..e77944499 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -22,10 +22,21 @@ class AccountTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AccountTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AccountTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AccountTransfersResourceWithStreamingResponse(self) def complete( @@ -79,10 +90,21 @@ def complete( class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncAccountTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncAccountTransfersResourceWithStreamingResponse(self) async def complete( diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 21c1c0c2a..b3395f16a 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -29,10 +29,21 @@ class ACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ACHTransfersResourceWithStreamingResponse(self) def acknowledge( @@ -514,10 +525,21 @@ def submit( class AsyncACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncACHTransfersResourceWithStreamingResponse(self) async def acknowledge( diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py index bd2a5c020..970d5e51d 100644 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -27,10 +27,21 @@ class CardAuthorizationExpirationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardAuthorizationExpirationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardAuthorizationExpirationsResourceWithStreamingResponse(self) def create( @@ -81,10 +92,21 @@ def create( class AsyncCardAuthorizationExpirationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardAuthorizationExpirationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 6089829c9..6cc869917 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -27,10 +27,21 @@ class CardAuthorizationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardAuthorizationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardAuthorizationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardAuthorizationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardAuthorizationsResourceWithStreamingResponse(self) def create( @@ -131,10 +142,21 @@ def create( class AsyncCardAuthorizationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardAuthorizationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardAuthorizationsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index ec48f6924..139de12e7 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -29,10 +29,21 @@ class CardDisputesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardDisputesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardDisputesResourceWithStreamingResponse(self) def action( @@ -105,10 +116,21 @@ def action( class AsyncCardDisputesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardDisputesResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardDisputesResourceWithStreamingResponse(self) async def action( diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py index fe62793ec..de345f21c 100644 --- a/src/increase/resources/simulations/card_fuel_confirmations.py +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -27,10 +27,21 @@ class CardFuelConfirmationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardFuelConfirmationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardFuelConfirmationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardFuelConfirmationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardFuelConfirmationsResourceWithStreamingResponse(self) def create( @@ -91,10 +102,21 @@ def create( class AsyncCardFuelConfirmationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardFuelConfirmationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py index 24e8ab4e5..3fcb7c4db 100644 --- a/src/increase/resources/simulations/card_increments.py +++ b/src/increase/resources/simulations/card_increments.py @@ -27,10 +27,21 @@ class CardIncrementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardIncrementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardIncrementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardIncrementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardIncrementsResourceWithStreamingResponse(self) def create( @@ -96,10 +107,21 @@ def create( class AsyncCardIncrementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardIncrementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardIncrementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardIncrementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardIncrementsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 7ab498340..774c8efa7 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -27,10 +27,21 @@ class CardRefundsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardRefundsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardRefundsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardRefundsResourceWithStreamingResponse(self) def create( @@ -81,10 +92,21 @@ def create( class AsyncCardRefundsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardRefundsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardRefundsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardRefundsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py index ff8bd9515..2e05d8cd8 100644 --- a/src/increase/resources/simulations/card_reversals.py +++ b/src/increase/resources/simulations/card_reversals.py @@ -27,10 +27,21 @@ class CardReversalsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardReversalsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardReversalsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardReversalsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardReversalsResourceWithStreamingResponse(self) def create( @@ -92,10 +103,21 @@ def create( class AsyncCardReversalsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardReversalsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardReversalsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardReversalsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardReversalsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py index 84399485f..d1717800d 100644 --- a/src/increase/resources/simulations/card_settlements.py +++ b/src/increase/resources/simulations/card_settlements.py @@ -27,10 +27,21 @@ class CardSettlementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardSettlementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CardSettlementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CardSettlementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CardSettlementsResourceWithStreamingResponse(self) def create( @@ -98,10 +109,21 @@ def create( class AsyncCardSettlementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardSettlementsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCardSettlementsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCardSettlementsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCardSettlementsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 862029b70..5b35fb58f 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -22,10 +22,21 @@ class CheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CheckDepositsResourceWithStreamingResponse(self) def reject( @@ -163,10 +174,21 @@ def submit( class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCheckDepositsResourceWithStreamingResponse(self) async def reject( diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index a0299f97f..f9699fb7f 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -22,10 +22,21 @@ class CheckTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return CheckTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> CheckTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return CheckTransfersResourceWithStreamingResponse(self) def mail( @@ -76,10 +87,21 @@ def mail( class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncCheckTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncCheckTransfersResourceWithStreamingResponse(self) async def mail( diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 7576f7708..784af0506 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -27,10 +27,21 @@ class DigitalWalletTokenRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DigitalWalletTokenRequestsResourceWithStreamingResponse(self) def create( @@ -81,10 +92,21 @@ def create( class AsyncDigitalWalletTokenRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index b2f455a28..928921675 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -27,10 +27,21 @@ class DocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return DocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return DocumentsResourceWithStreamingResponse(self) def create( @@ -78,10 +89,21 @@ def create( class AsyncDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncDocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncDocumentsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 87a5f33a7..73d5a6cc5 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -31,10 +31,21 @@ class InboundACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundACHTransfersResourceWithStreamingResponse(self) def create( @@ -175,10 +186,21 @@ def create( class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundACHTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundACHTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 902853eb3..0a6a09f61 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -27,10 +27,21 @@ class InboundCheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundCheckDepositsResourceWithStreamingResponse(self) def create( @@ -97,10 +108,21 @@ def create( class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundCheckDepositsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundCheckDepositsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index 6cb3ad65a..df5e5bd8c 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -22,10 +22,21 @@ class InboundFundsHoldsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundFundsHoldsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundFundsHoldsResourceWithStreamingResponse(self) def release( @@ -77,10 +88,21 @@ def release( class AsyncInboundFundsHoldsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundFundsHoldsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundFundsHoldsResourceWithStreamingResponse(self) async def release( diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py index 043daaba4..8e6289850 100755 --- a/src/increase/resources/simulations/inbound_mail_items.py +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -27,10 +27,21 @@ class InboundMailItemsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundMailItemsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundMailItemsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundMailItemsResourceWithStreamingResponse(self) def create( @@ -93,10 +104,21 @@ def create( class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundMailItemsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundMailItemsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index e9cfa5522..e8c2919ac 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -27,10 +27,21 @@ class InboundRealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) def create( @@ -110,10 +121,21 @@ def create( class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 61f2d8b4a..e5c47f29f 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -27,10 +27,21 @@ class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundWireDrawdownRequestsResourceWithStreamingResponse(self) def create( @@ -166,10 +177,21 @@ def create( class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 3501f7328..8152f1b12 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -27,10 +27,21 @@ class InboundWireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InboundWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InboundWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InboundWireTransfersResourceWithStreamingResponse(self) def create( @@ -162,10 +173,21 @@ def create( class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInboundWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInboundWireTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index b129e1563..e4f4d7950 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -30,10 +30,21 @@ class InterestPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InterestPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return InterestPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> InterestPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return InterestPaymentsResourceWithStreamingResponse(self) def create( @@ -100,10 +111,21 @@ def create( class AsyncInterestPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInterestPaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncInterestPaymentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncInterestPaymentsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index a3eac10ff..8fea4042f 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -29,10 +29,21 @@ class PhysicalCardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return PhysicalCardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return PhysicalCardsResourceWithStreamingResponse(self) def advance_shipment( @@ -102,10 +113,21 @@ def advance_shipment( class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncPhysicalCardsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncPhysicalCardsResourceWithStreamingResponse(self) async def advance_shipment( diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index ee78aebbe..532b2685e 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -27,10 +27,21 @@ class ProgramsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProgramsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return ProgramsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> ProgramsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return ProgramsResourceWithStreamingResponse(self) def create( @@ -81,10 +92,21 @@ def create( class AsyncProgramsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncProgramsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncProgramsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncProgramsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 9df107fe3..ac44ede2e 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -27,10 +27,21 @@ class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return RealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return RealTimePaymentsTransfersResourceWithStreamingResponse(self) def complete( @@ -90,10 +101,21 @@ def complete( class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self) async def complete( diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4f922e980..ef40bdd3e 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -335,10 +335,21 @@ def programs(self) -> ProgramsResource: @cached_property def with_raw_response(self) -> SimulationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return SimulationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> SimulationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return SimulationsResourceWithStreamingResponse(self) @@ -453,10 +464,21 @@ def programs(self) -> AsyncProgramsResource: @cached_property def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncSimulationsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncSimulationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncSimulationsResourceWithStreamingResponse(self) diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 9cece56fc..4a3fa3565 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -22,10 +22,21 @@ class WireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return WireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return WireTransfersResourceWithStreamingResponse(self) def reverse( @@ -121,10 +132,21 @@ def submit( class AsyncWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncWireTransfersResourceWithStreamingResponse(self) async def reverse( diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index 1ce6adbaa..514ac236c 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -28,10 +28,21 @@ class SupplementalDocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> SupplementalDocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return SupplementalDocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> SupplementalDocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return SupplementalDocumentsResourceWithStreamingResponse(self) def create( @@ -147,10 +158,21 @@ def list( class AsyncSupplementalDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncSupplementalDocumentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncSupplementalDocumentsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncSupplementalDocumentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncSupplementalDocumentsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index 029e2d703..39c32b1f5 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -25,10 +25,21 @@ class TransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> TransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return TransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> TransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return TransactionsResourceWithStreamingResponse(self) def retrieve( @@ -131,10 +142,21 @@ def list( class AsyncTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncTransactionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncTransactionsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncTransactionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncTransactionsResourceWithStreamingResponse(self) async def retrieve( diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index ccbc2de1a..9710dfb7a 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -30,10 +30,21 @@ class WireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return WireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> WireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return WireDrawdownRequestsResourceWithStreamingResponse(self) def create( @@ -245,10 +256,21 @@ def list( class AsyncWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncWireDrawdownRequestsResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 90d041e0e..4f608fb84 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -28,10 +28,21 @@ class WireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return WireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> WireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return WireTransfersResourceWithStreamingResponse(self) def create( @@ -330,10 +341,21 @@ def cancel( class AsyncWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ return AsyncWireTransfersResourceWithRawResponse(self) @cached_property def with_streaming_response(self) -> AsyncWireTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ return AsyncWireTransfersResourceWithStreamingResponse(self) async def create( diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 564386a70..f6507a58b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2531,6 +2531,12 @@ class Element(BaseModel): the card payment element was created. """ + other: Optional[object] = None + """ + If the category of this Transaction source is equal to `other`, this field will + contain an empty object, otherwise it will contain null. + """ + class State(BaseModel): authorized_amount: int diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 0b8c5d277..c987dc217 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -760,6 +760,12 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ + other: Optional[object] = None + """ + If the category of this Transaction source is equal to `other`, this field will + contain an empty object, otherwise it will contain null. + """ + wire_decline: Optional[SourceWireDecline] = None """A Wire Decline object. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index ac9770f35..78e817223 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -633,6 +633,12 @@ class Source(BaseModel): equal to `inbound_funds_hold`. """ + other: Optional[object] = None + """ + If the category of this Transaction source is equal to `other`, this field will + contain an empty object, otherwise it will contain null. + """ + real_time_payments_transfer_instruction: Optional[SourceRealTimePaymentsTransferInstruction] = None """A Real-Time Payments Transfer Instruction object. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 9811d0bc7..307cf5f6f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2429,6 +2429,12 @@ class Source(BaseModel): equal to `internal_source`. """ + other: Optional[object] = None + """ + If the category of this Transaction source is equal to `other`, this field will + contain an empty object, otherwise it will contain null. + """ + real_time_payments_transfer_acknowledgement: Optional[SourceRealTimePaymentsTransferAcknowledgement] = None """A Real-Time Payments Transfer Acknowledgement object. From 0dde7ed769f7ad8fe5ccbc19e8677b1319ca91fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:03:31 +0000 Subject: [PATCH 0192/1325] chore(internal): version bump (#650) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3e05ae562..3ca49358e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.108.0" + ".": "0.109.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b5a46405e..9d3485c64 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.108.0" +version = "0.109.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b4474a1a8..e1999ce63 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.108.0" # x-release-please-version +__version__ = "0.109.0" # x-release-please-version From 7a0858d0f96757943ebbe2bf54f3d942a20c1922 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:51:48 +0000 Subject: [PATCH 0193/1325] feat(api): OpenAPI spec update via Stainless API (#651) --- .stats.yml | 2 +- src/increase/types/inbound_real_time_payments_transfer.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a8958892..f9e061b51 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8a3ed6ba07fe899833ce43b6d6d5cf20600b2ffc052bb7b9d492f5a72af4905b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fdde1c1969aa40ee9126d1226d49c3ff136a38351d9156c31c4216481f29f9e7.yml diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index f2f6fb8d7..6064a97e4 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -101,7 +101,7 @@ class InboundRealTimePaymentsTransfer(BaseModel): """The lifecycle status of the transfer. - `pending_confirmation` - The transfer is pending confirmation. - - `timed_out` - Your webhook failed to respond to the transfer in time. + - `timed_out` - The transfer was not responded to in time. - `confirmed` - The transfer has been received successfully and is confirmed. - `declined` - The transfer has been declined. """ From 18cac674d639174bbe089f35f6f0e5e6997dfb62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:52:56 +0000 Subject: [PATCH 0194/1325] chore(internal): version bump (#653) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3ca49358e..c37434e9f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.109.0" + ".": "0.110.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9d3485c64..b760f8458 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.109.0" +version = "0.110.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e1999ce63..78f2e3cde 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.109.0" # x-release-please-version +__version__ = "0.110.0" # x-release-please-version From 0450296114ccf14f2e132a63544c3a4efb4eadbd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:57:23 +0000 Subject: [PATCH 0195/1325] feat(api): OpenAPI spec update via Stainless API (#654) --- .stats.yml | 2 +- src/increase/types/transaction.py | 16 ---------------- src/increase/types/transaction_list_params.py | 1 - 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index f9e061b51..29d1cd9af 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fdde1c1969aa40ee9126d1226d49c3ff136a38351d9156c31c4216481f29f9e7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f978bae16d83f22066955b0be61bb670f595ee28dc5d6b52adf66a1ed86b3b5.yml diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 307cf5f6f..a904e7d62 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -54,7 +54,6 @@ "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", "SourceWireTransferIntention", - "SourceWireTransferRejection", ] @@ -2178,11 +2177,6 @@ class SourceWireTransferIntention(BaseModel): """The identifier of the Wire Transfer that led to this Transaction.""" -class SourceWireTransferRejection(BaseModel): - transfer_id: str - """The identifier of the Wire Transfer that led to this Transaction.""" - - class Source(BaseModel): account_transfer_intention: Optional[SourceAccountTransferIntention] = None """An Account Transfer Intention object. @@ -2282,7 +2276,6 @@ class Source(BaseModel): "real_time_payments_transfer_acknowledgement", "sample_funds", "wire_transfer_intention", - "wire_transfer_rejection", "other", ] """The type of the resource. @@ -2347,8 +2340,6 @@ class Source(BaseModel): object. - `wire_transfer_intention` - Wire Transfer Intention: details will be under the `wire_transfer_intention` object. - - `wire_transfer_rejection` - Wire Transfer Rejection: details will be under the - `wire_transfer_rejection` object. - `other` - The Transaction was made for an undocumented or deprecated reason. """ @@ -2456,13 +2447,6 @@ class Source(BaseModel): equal to `wire_transfer_intention`. """ - wire_transfer_rejection: Optional[SourceWireTransferRejection] = None - """A Wire Transfer Rejection object. - - This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_rejection`. - """ - class Transaction(BaseModel): id: str diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 625286ac2..b13a1f290 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -67,7 +67,6 @@ class TransactionListParams(TypedDict, total=False): "real_time_payments_transfer_acknowledgement", "sample_funds", "wire_transfer_intention", - "wire_transfer_rejection", "other", ] ], From b65f3667fbb5a139235731033d43df3c72044685 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 20:58:18 +0000 Subject: [PATCH 0196/1325] chore(internal): codegen related update (#656) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c37434e9f..2969a756f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.110.0" + ".": "0.111.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b760f8458..334199369 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.110.0" +version = "0.111.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 78f2e3cde..29a997cd0 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.110.0" # x-release-please-version +__version__ = "0.111.0" # x-release-please-version From 0b1bb58e9c386e9007788c1ca76b0b10a9922281 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:22:24 +0000 Subject: [PATCH 0197/1325] feat(api): OpenAPI spec update via Stainless API (#657) --- .stats.yml | 2 +- src/increase/types/inbound_real_time_payments_transfer.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 29d1cd9af..1cb124228 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f978bae16d83f22066955b0be61bb670f595ee28dc5d6b52adf66a1ed86b3b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-41be80439916cab67590e59861b8f467a02e112e1ee39e5f6aaa4e485b97f3bd.yml diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index 6064a97e4..3a5bed137 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -97,10 +97,11 @@ class InboundRealTimePaymentsTransfer(BaseModel): remittance_information: Optional[str] = None """Additional information included with the transfer.""" - status: Literal["pending_confirmation", "timed_out", "confirmed", "declined"] + status: Literal["pending_confirmation", "pending_confirming", "timed_out", "confirmed", "declined"] """The lifecycle status of the transfer. - `pending_confirmation` - The transfer is pending confirmation. + - `pending_confirming` - The transfer is pending confirmation. - `timed_out` - The transfer was not responded to in time. - `confirmed` - The transfer has been received successfully and is confirmed. - `declined` - The transfer has been declined. From 4be5be713638145ab86958229db42dba93944248 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:23:26 +0000 Subject: [PATCH 0198/1325] chore(internal): version bump (#659) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2969a756f..820b5c1ae 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.111.0" + ".": "0.112.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 334199369..4f0ab0b77 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.111.0" +version = "0.112.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 29a997cd0..f34c99a93 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.111.0" # x-release-please-version +__version__ = "0.112.0" # x-release-please-version From a59a42a586e42c3e4c1f7a06de3aa554b8489c24 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:28:59 +0000 Subject: [PATCH 0199/1325] feat(api): OpenAPI spec update via Stainless API (#660) --- .stats.yml | 2 +- src/increase/types/declined_transaction.py | 19 ------------------- src/increase/types/inbound_ach_transfer.py | 19 ------------------- 3 files changed, 1 insertion(+), 39 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1cb124228..1a4ce70ec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-41be80439916cab67590e59861b8f467a02e112e1ee39e5f6aaa4e485b97f3bd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b3024026e39d1528cefedfb100b81083cdf3f3dc7d38d8e3ffc816358fe56b15.yml diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index c987dc217..cb1fc902e 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -53,16 +53,9 @@ class SourceACHDecline(BaseModel): "ach_route_canceled", "ach_route_disabled", "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", "entity_not_active", - "field_error", "group_locked", "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", "transaction_not_allowed", "user_initiated", ] @@ -72,21 +65,9 @@ class SourceACHDecline(BaseModel): - `ach_route_disabled` - The account number is disabled. - `breaches_limit` - The transaction would cause an Increase limit to be exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - `user_initiated` - Your integration declined this transfer via the API. diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 0d8fa0729..74eeb3da3 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -59,16 +59,9 @@ class Decline(BaseModel): "ach_route_canceled", "ach_route_disabled", "breaches_limit", - "credit_entry_refused_by_receiver", - "duplicate_return", "entity_not_active", - "field_error", "group_locked", "insufficient_funds", - "misrouted_return", - "return_of_erroneous_or_reversing_debit", - "no_ach_route", - "originator_request", "transaction_not_allowed", "user_initiated", ] @@ -78,21 +71,9 @@ class Decline(BaseModel): - `ach_route_disabled` - The account number is disabled. - `breaches_limit` - The transaction would cause an Increase limit to be exceeded. - - `credit_entry_refused_by_receiver` - A credit was refused. This is a - reasonable default reason for decline of credits. - - `duplicate_return` - A rare return reason. The return this message refers to - was a duplicate. - `entity_not_active` - The account's entity is not active. - - `field_error` - There was an error with one of the required fields. - `group_locked` - Your account is inactive. - `insufficient_funds` - Your account contains insufficient funds. - - `misrouted_return` - A rare return reason. The return this message refers to - was misrouted. - - `return_of_erroneous_or_reversing_debit` - The originating financial - institution made a mistake and this return corrects it. - - `no_ach_route` - The account number that was debited does not exist. - - `originator_request` - The originating financial institution asked for this - transfer to be returned. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - `user_initiated` - Your integration declined this transfer via the API. From 175cf1c507e819f2fba5a87c8221cea1162a27a6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:30:02 +0000 Subject: [PATCH 0200/1325] chore(internal): version bump (#662) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 820b5c1ae..939bb1750 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.112.0" + ".": "0.113.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4f0ab0b77..f67a3a661 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.112.0" +version = "0.113.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f34c99a93..732397034 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.112.0" # x-release-please-version +__version__ = "0.113.0" # x-release-please-version From fe8f87068befbbcc934b3662ac72307ed0deb840 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:53:24 +0000 Subject: [PATCH 0201/1325] feat(api): OpenAPI spec update via Stainless API (#663) --- .stats.yml | 2 +- src/increase/types/inbound_real_time_payments_transfer.py | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a4ce70ec..71f05914a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b3024026e39d1528cefedfb100b81083cdf3f3dc7d38d8e3ffc816358fe56b15.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4081ef51fa8f5c8dc0cf6712b68ffbdf852bd2ef31ee774d376f10d2cb60c1f3.yml diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index 3a5bed137..f116452c3 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -97,10 +97,9 @@ class InboundRealTimePaymentsTransfer(BaseModel): remittance_information: Optional[str] = None """Additional information included with the transfer.""" - status: Literal["pending_confirmation", "pending_confirming", "timed_out", "confirmed", "declined"] + status: Literal["pending_confirming", "timed_out", "confirmed", "declined"] """The lifecycle status of the transfer. - - `pending_confirmation` - The transfer is pending confirmation. - `pending_confirming` - The transfer is pending confirmation. - `timed_out` - The transfer was not responded to in time. - `confirmed` - The transfer has been received successfully and is confirmed. From b68679f3828642cb1ad809bbb7cfd8fc3eee6d19 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Sep 2024 22:54:45 +0000 Subject: [PATCH 0202/1325] chore(internal): version bump (#665) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 939bb1750..d61779f3c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.113.0" + ".": "0.114.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f67a3a661..9c4424b86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.113.0" +version = "0.114.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 732397034..a22e1dbcb 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.113.0" # x-release-please-version +__version__ = "0.114.0" # x-release-please-version From 95be9b6d183fdd4bea5974e888c1381ab7525541 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:14:37 +0000 Subject: [PATCH 0203/1325] feat(api): OpenAPI spec update via Stainless API (#666) --- .stats.yml | 2 +- src/increase/resources/simulations/check_transfers.py | 10 ++++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 71f05914a..31dcf8681 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4081ef51fa8f5c8dc0cf6712b68ffbdf852bd2ef31ee774d376f10d2cb60c1f3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-87632539570103042e7434cbc61e8dd378a47e33337010c0d03e4864ce73b66f.yml diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index f9699fb7f..af2d8abd3 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -53,8 +53,9 @@ def mail( ) -> CheckTransfer: """ Simulates the mailing of a [Check Transfer](#check-transfers), which happens - once per weekday in production but can be sped up in sandbox. This transfer must - first have a `status` of `pending_approval` or `pending_submission`. + periodically throughout the day in production but can be sped up in sandbox. + This transfer must first have a `status` of `pending_approval` or + `pending_submission`. Args: check_transfer_id: The identifier of the Check Transfer you wish to mail. @@ -118,8 +119,9 @@ async def mail( ) -> CheckTransfer: """ Simulates the mailing of a [Check Transfer](#check-transfers), which happens - once per weekday in production but can be sped up in sandbox. This transfer must - first have a `status` of `pending_approval` or `pending_submission`. + periodically throughout the day in production but can be sped up in sandbox. + This transfer must first have a `status` of `pending_approval` or + `pending_submission`. Args: check_transfer_id: The identifier of the Check Transfer you wish to mail. From 880688842b6303fc7ffce89f2819f23f461479f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:15:50 +0000 Subject: [PATCH 0204/1325] chore(internal): codegen related update (#668) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d61779f3c..d3dc9f51b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.114.0" + ".": "0.115.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9c4424b86..be940769f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.114.0" +version = "0.115.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a22e1dbcb..0b0d8af0d 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.114.0" # x-release-please-version +__version__ = "0.115.0" # x-release-please-version From 470e3eefb69de930a1d62aec44cd9b69a983286c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:25:06 +0000 Subject: [PATCH 0205/1325] docs: update CONTRIBUTING.md (#669) --- CONTRIBUTING.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6ee29f28f..cdef9668c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -31,13 +31,13 @@ $ pip install -r requirements-dev.lock ## Modifying/Adding code -Most of the SDK is generated code, and any modified code will be overridden on the next generation. The -`src/increase/lib/` and `examples/` directories are exceptions and will never be overridden. +Most of the SDK is generated code. Modifications to code will be persisted between generations, but may +result in merge conflicts between manual patches and changes from the generator. The generator will never +modify the contents of the `src/increase/lib/` and `examples/` directories. ## Adding and running examples -All files in the `examples/` directory are not modified by the Stainless generator and can be freely edited or -added to. +All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. ```bash # add an example to examples/.py From d6a18d74f279cca71570c4998841151b37862bdd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:27:58 +0000 Subject: [PATCH 0206/1325] chore(internal): bump ruff (#671) --- requirements-dev.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 5727d47df..2a0a19f5f 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -80,7 +80,7 @@ pytz==2023.3.post1 # via dirty-equals respx==0.20.2 rich==13.7.1 -ruff==0.5.6 +ruff==0.6.5 setuptools==68.2.2 # via nodeenv six==1.16.0 From b18e7c4f24b70e42b397e082fcc878784a293015 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Sep 2024 03:28:51 +0000 Subject: [PATCH 0207/1325] chore(internal): bump pyright / mypy version (#672) --- requirements-dev.lock | 4 ++-- src/increase/_utils/_utils.py | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 2a0a19f5f..93157885f 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -49,7 +49,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.10.1 +mypy==1.11.2 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 @@ -70,7 +70,7 @@ pydantic-core==2.18.2 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.374 +pyright==1.1.380 pytest==7.1.1 # via pytest-asyncio pytest-asyncio==0.21.1 diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 2fc5a1c65..0bba17caa 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -363,12 +363,13 @@ def file_from_path(path: str) -> FileTypes: def get_required_header(headers: HeadersLike, header: str) -> str: lower_header = header.lower() - if isinstance(headers, Mapping): - for k, v in headers.items(): + if is_mapping_t(headers): + # mypy doesn't understand the type narrowing here + for k, v in headers.items(): # type: ignore if k.lower() == lower_header and isinstance(v, str): return v - """ to deal with the case where the header looks like Stainless-Event-Id """ + # to deal with the case where the header looks like Stainless-Event-Id intercaps_header = re.sub(r"([^\w])(\w)", lambda pat: pat.group(1) + pat.group(2).upper(), header.capitalize()) for normalized_header in [header, lower_header, header.upper(), intercaps_header]: From d7ca3524c3cd53ea15a390d149dcbd682ab5089b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:24:28 +0000 Subject: [PATCH 0208/1325] feat(api): OpenAPI spec update via Stainless API (#673) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31dcf8681..6b7062b77 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-87632539570103042e7434cbc61e8dd378a47e33337010c0d03e4864ce73b66f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-18e6a6706be7aeab2b6e82559ee696ddaf789742449804f8a356e32e95cfd64a.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index c99386ce4..b62ead900 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -114,13 +114,15 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" - status: Literal["pending", "accepted", "declined", "returned"] + status: Literal["pending", "accepted", "declined", "returned", "requires_attention"] """The status of the Inbound Check Deposit. - `pending` - The Inbound Check Deposit is pending. - `accepted` - The Inbound Check Deposit was accepted. - `declined` - The Inbound Check Deposit was rejected. - `returned` - The Inbound Check Deposit was returned. + - `requires_attention` - The Inbound Check Deposit requires attention from an + Increase operator. """ transaction_id: Optional[str] = None From 39d77bc95eed74e4d31b4b2da7ddfa836a1f3a3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Sep 2024 13:25:42 +0000 Subject: [PATCH 0209/1325] chore(internal): codegen related update (#674) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d3dc9f51b..988e843fd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.115.0" + ".": "0.116.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index be940769f..c9c990bfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.115.0" +version = "0.116.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0b0d8af0d..f2e79168a 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.115.0" # x-release-please-version +__version__ = "0.116.0" # x-release-please-version From fb236300c48314f4326133ae2fa6b83c58731436 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 19 Sep 2024 03:02:23 +0000 Subject: [PATCH 0210/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 6b7062b77..b933c767e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-18e6a6706be7aeab2b6e82559ee696ddaf789742449804f8a356e32e95cfd64a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eafb46a9121227de2c1c345319109a62243b8b1fa75279edb75d377519591c87.yml From 583524213b49f081dab2a41bebe4fb0d860535ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:42:09 +0000 Subject: [PATCH 0211/1325] feat(api): OpenAPI spec update via Stainless API (#675) --- .stats.yml | 2 +- src/increase/types/ach_transfer.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index b933c767e..ce2bd3046 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eafb46a9121227de2c1c345319109a62243b8b1fa75279edb75d377519591c87.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-366930f9521d8c2fcf743ac1b0fec6ce91bc2fd9d417bd8588a384472ab1db39.yml diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 426013380..9742e328a 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -767,6 +767,7 @@ class ACHTransfer(BaseModel): status: Literal[ "pending_approval", + "pending_transfer_session_confirmation", "canceled", "pending_reviewing", "pending_submission", @@ -778,6 +779,8 @@ class ACHTransfer(BaseModel): """The lifecycle status of the transfer. - `pending_approval` - The transfer is pending approval. + - `pending_transfer_session_confirmation` - The transfer belongs to a Transfer + Session that is pending confirmation. - `canceled` - The transfer has been canceled. - `pending_reviewing` - The transfer is pending review by Increase. - `pending_submission` - The transfer is pending submission to the Federal From a8115714d6dd3ab1220c63d46b24cbb931f6b3da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:43:01 +0000 Subject: [PATCH 0212/1325] chore(internal): codegen related update (#677) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 988e843fd..b67002822 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.116.0" + ".": "0.117.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c9c990bfc..a52555810 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.116.0" +version = "0.117.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f2e79168a..5cdabe679 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.116.0" # x-release-please-version +__version__ = "0.117.0" # x-release-please-version From c3e85b988b54f3dcd1c06c38a55e7b7680b32abf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:43:48 +0000 Subject: [PATCH 0213/1325] fix(client): handle domains with underscores (#678) --- src/increase/_base_client.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 8ba5216ad..afbed4fdd 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -489,12 +489,17 @@ def _build_request( if not files: files = cast(HttpxRequestFiles, ForceMultipartDict()) + prepared_url = self._prepare_url(options.url) + if "_" in prepared_url.host: + # work around https://github.com/encode/httpx/discussions/2880 + kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, timeout=self.timeout if isinstance(options.timeout, NotGiven) else options.timeout, method=options.method, - url=self._prepare_url(options.url), + url=prepared_url, # the `Query` type that we use is incompatible with qs' # `Params` type as it needs to be typed as `Mapping[str, object]` # so that passing a `TypedDict` doesn't cause an error. From 2f27e6149237244e8615a9e4eb45f30d83cef511 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:44:40 +0000 Subject: [PATCH 0214/1325] chore(internal): codegen related update (#680) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b67002822..33de6b010 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.117.0" + ".": "0.117.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a52555810..112550fd6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.117.0" +version = "0.117.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5cdabe679..548264160 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.117.0" # x-release-please-version +__version__ = "0.117.1" # x-release-please-version From 0cd2d1dc675ac4f9c40f608fff47314a05c9c483 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Sep 2024 21:45:27 +0000 Subject: [PATCH 0215/1325] feat(client): send retry count header (#681) --- src/increase/_base_client.py | 101 +++++++++++++++++++---------------- tests/test_client.py | 2 + 2 files changed, 56 insertions(+), 47 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index afbed4fdd..15d8eff2e 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -400,14 +400,7 @@ def _make_status_error( ) -> _exceptions.APIStatusError: raise NotImplementedError() - def _remaining_retries( - self, - remaining_retries: Optional[int], - options: FinalRequestOptions, - ) -> int: - return remaining_retries if remaining_retries is not None else options.get_max_retries(self.max_retries) - - def _build_headers(self, options: FinalRequestOptions) -> httpx.Headers: + def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0) -> httpx.Headers: custom_headers = options.headers or {} headers_dict = _merge_mappings(self.default_headers, custom_headers) self._validate_headers(headers_dict, custom_headers) @@ -419,6 +412,8 @@ def _build_headers(self, options: FinalRequestOptions) -> httpx.Headers: if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: headers[idempotency_header] = options.idempotency_key or self._idempotency_key() + headers.setdefault("x-stainless-retry-count", str(retries_taken)) + return headers def _prepare_url(self, url: str) -> URL: @@ -440,6 +435,8 @@ def _make_sse_decoder(self) -> SSEDecoder | SSEBytesDecoder: def _build_request( self, options: FinalRequestOptions, + *, + retries_taken: int = 0, ) -> httpx.Request: if log.isEnabledFor(logging.DEBUG): log.debug("Request options: %s", model_dump(options, exclude_unset=True)) @@ -455,7 +452,7 @@ def _build_request( else: raise RuntimeError(f"Unexpected JSON data type, {type(json_data)}, cannot merge with `extra_body`") - headers = self._build_headers(options) + headers = self._build_headers(options, retries_taken=retries_taken) params = _merge_mappings(self.default_query, options.params) content_type = headers.get("Content-Type") files = options.files @@ -938,12 +935,17 @@ def request( stream: bool = False, stream_cls: type[_StreamT] | None = None, ) -> ResponseT | _StreamT: + if remaining_retries is not None: + retries_taken = options.get_max_retries(self.max_retries) - remaining_retries + else: + retries_taken = 0 + return self._request( cast_to=cast_to, options=options, stream=stream, stream_cls=stream_cls, - remaining_retries=remaining_retries, + retries_taken=retries_taken, ) def _request( @@ -951,7 +953,7 @@ def _request( *, cast_to: Type[ResponseT], options: FinalRequestOptions, - remaining_retries: int | None, + retries_taken: int, stream: bool, stream_cls: type[_StreamT] | None, ) -> ResponseT | _StreamT: @@ -963,8 +965,8 @@ def _request( cast_to = self._maybe_override_cast_to(cast_to, options) options = self._prepare_options(options) - retries = self._remaining_retries(remaining_retries, options) - request = self._build_request(options) + remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + request = self._build_request(options, retries_taken=retries_taken) self._prepare_request(request) kwargs: HttpxSendArgs = {} @@ -982,11 +984,11 @@ def _request( except httpx.TimeoutException as err: log.debug("Encountered httpx.TimeoutException", exc_info=True) - if retries > 0: + if remaining_retries > 0: return self._retry_request( input_options, cast_to, - retries, + retries_taken=retries_taken, stream=stream, stream_cls=stream_cls, response_headers=None, @@ -997,11 +999,11 @@ def _request( except Exception as err: log.debug("Encountered Exception", exc_info=True) - if retries > 0: + if remaining_retries > 0: return self._retry_request( input_options, cast_to, - retries, + retries_taken=retries_taken, stream=stream, stream_cls=stream_cls, response_headers=None, @@ -1024,13 +1026,13 @@ def _request( except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code log.debug("Encountered httpx.HTTPStatusError", exc_info=True) - if retries > 0 and self._should_retry(err.response): + if remaining_retries > 0 and self._should_retry(err.response): err.response.close() return self._retry_request( input_options, cast_to, - retries, - err.response.headers, + retries_taken=retries_taken, + response_headers=err.response.headers, stream=stream, stream_cls=stream_cls, ) @@ -1049,26 +1051,26 @@ def _request( response=response, stream=stream, stream_cls=stream_cls, - retries_taken=options.get_max_retries(self.max_retries) - retries, + retries_taken=retries_taken, ) def _retry_request( self, options: FinalRequestOptions, cast_to: Type[ResponseT], - remaining_retries: int, - response_headers: httpx.Headers | None, *, + retries_taken: int, + response_headers: httpx.Headers | None, stream: bool, stream_cls: type[_StreamT] | None, ) -> ResponseT | _StreamT: - remaining = remaining_retries - 1 - if remaining == 1: + remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + if remaining_retries == 1: log.debug("1 retry left") else: - log.debug("%i retries left", remaining) + log.debug("%i retries left", remaining_retries) - timeout = self._calculate_retry_timeout(remaining, options, response_headers) + timeout = self._calculate_retry_timeout(remaining_retries, options, response_headers) log.info("Retrying request to %s in %f seconds", options.url, timeout) # In a synchronous context we are blocking the entire thread. Up to the library user to run the client in a @@ -1078,7 +1080,7 @@ def _retry_request( return self._request( options=options, cast_to=cast_to, - remaining_retries=remaining, + retries_taken=retries_taken + 1, stream=stream, stream_cls=stream_cls, ) @@ -1496,12 +1498,17 @@ async def request( stream_cls: type[_AsyncStreamT] | None = None, remaining_retries: Optional[int] = None, ) -> ResponseT | _AsyncStreamT: + if remaining_retries is not None: + retries_taken = options.get_max_retries(self.max_retries) - remaining_retries + else: + retries_taken = 0 + return await self._request( cast_to=cast_to, options=options, stream=stream, stream_cls=stream_cls, - remaining_retries=remaining_retries, + retries_taken=retries_taken, ) async def _request( @@ -1511,7 +1518,7 @@ async def _request( *, stream: bool, stream_cls: type[_AsyncStreamT] | None, - remaining_retries: int | None, + retries_taken: int, ) -> ResponseT | _AsyncStreamT: if self._platform is None: # `get_platform` can make blocking IO calls so we @@ -1526,8 +1533,8 @@ async def _request( cast_to = self._maybe_override_cast_to(cast_to, options) options = await self._prepare_options(options) - retries = self._remaining_retries(remaining_retries, options) - request = self._build_request(options) + remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + request = self._build_request(options, retries_taken=retries_taken) await self._prepare_request(request) kwargs: HttpxSendArgs = {} @@ -1543,11 +1550,11 @@ async def _request( except httpx.TimeoutException as err: log.debug("Encountered httpx.TimeoutException", exc_info=True) - if retries > 0: + if remaining_retries > 0: return await self._retry_request( input_options, cast_to, - retries, + retries_taken=retries_taken, stream=stream, stream_cls=stream_cls, response_headers=None, @@ -1558,11 +1565,11 @@ async def _request( except Exception as err: log.debug("Encountered Exception", exc_info=True) - if retries > 0: + if retries_taken > 0: return await self._retry_request( input_options, cast_to, - retries, + retries_taken=retries_taken, stream=stream, stream_cls=stream_cls, response_headers=None, @@ -1580,13 +1587,13 @@ async def _request( except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code log.debug("Encountered httpx.HTTPStatusError", exc_info=True) - if retries > 0 and self._should_retry(err.response): + if remaining_retries > 0 and self._should_retry(err.response): await err.response.aclose() return await self._retry_request( input_options, cast_to, - retries, - err.response.headers, + retries_taken=retries_taken, + response_headers=err.response.headers, stream=stream, stream_cls=stream_cls, ) @@ -1605,26 +1612,26 @@ async def _request( response=response, stream=stream, stream_cls=stream_cls, - retries_taken=options.get_max_retries(self.max_retries) - retries, + retries_taken=retries_taken, ) async def _retry_request( self, options: FinalRequestOptions, cast_to: Type[ResponseT], - remaining_retries: int, - response_headers: httpx.Headers | None, *, + retries_taken: int, + response_headers: httpx.Headers | None, stream: bool, stream_cls: type[_AsyncStreamT] | None, ) -> ResponseT | _AsyncStreamT: - remaining = remaining_retries - 1 - if remaining == 1: + remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + if remaining_retries == 1: log.debug("1 retry left") else: - log.debug("%i retries left", remaining) + log.debug("%i retries left", remaining_retries) - timeout = self._calculate_retry_timeout(remaining, options, response_headers) + timeout = self._calculate_retry_timeout(remaining_retries, options, response_headers) log.info("Retrying request to %s in %f seconds", options.url, timeout) await anyio.sleep(timeout) @@ -1632,7 +1639,7 @@ async def _retry_request( return await self._request( options=options, cast_to=cast_to, - remaining_retries=remaining, + retries_taken=retries_taken + 1, stream=stream, stream_cls=stream_cls, ) diff --git a/tests/test_client.py b/tests/test_client.py index 681b336f8..cd4fd0ebe 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -808,6 +808,7 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: response = client.accounts.with_raw_response.create(name="New Account!") assert response.retries_taken == failures_before_success + assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success class TestAsyncIncrease: @@ -1585,3 +1586,4 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: response = await client.accounts.with_raw_response.create(name="New Account!") assert response.retries_taken == failures_before_success + assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success From 5a12e02afa91ddf0ec126c4567340cf7bb9a3d09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 18:59:12 +0000 Subject: [PATCH 0216/1325] feat(api): OpenAPI spec update via Stainless API (#683) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ce2bd3046..537a3f107 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-366930f9521d8c2fcf743ac1b0fec6ce91bc2fd9d417bd8588a384472ab1db39.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c6ae95ff1acbf2409cd2e99aa5060b720b8cea307012fc3ce9ac2037a199bfc7.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f6507a58b..f164b1e30 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1544,7 +1544,7 @@ class ElementCardReversal(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: str + merchant_country: Optional[str] = None """The country the merchant resides in.""" merchant_descriptor: str From 1ad2beec11b9973ef9cb7b19107ff5c1efa2c38b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:00:04 +0000 Subject: [PATCH 0217/1325] chore(internal): codegen related update (#684) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33de6b010..617f75025 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.117.1" + ".": "0.118.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 112550fd6..5bb7ff55e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.117.1" +version = "0.118.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 548264160..46d7fc9ad 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.117.1" # x-release-please-version +__version__ = "0.118.0" # x-release-please-version From 7ddef57efade19f20d958ac7cd070e4b252bd349 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 19:06:20 +0000 Subject: [PATCH 0218/1325] chore(internal): update pydantic v1 compat helpers (#685) --- src/increase/_compat.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 21fe6941c..162a6fbe4 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -136,12 +136,14 @@ def model_dump( exclude: IncEx = None, exclude_unset: bool = False, exclude_defaults: bool = False, + warnings: bool = True, ) -> dict[str, Any]: if PYDANTIC_V2: return model.model_dump( exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, + warnings=warnings, ) return cast( "dict[str, Any]", From 4123559d681b168afcccb2fc8669c6d04fa754cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:17:40 +0000 Subject: [PATCH 0219/1325] feat(api): OpenAPI spec update via Stainless API (#687) --- .stats.yml | 2 +- api.md | 2 +- .../resources/inbound_ach_transfers.py | 87 +++++++++++++++++++ src/increase/types/__init__.py | 1 + src/increase/types/declined_transaction.py | 29 ++++++- src/increase/types/inbound_ach_transfer.py | 29 ++++++- .../inbound_ach_transfer_decline_params.py | 50 +++++++++++ .../test_inbound_ach_transfers.py | 32 +++++-- 8 files changed, 218 insertions(+), 14 deletions(-) create mode 100644 src/increase/types/inbound_ach_transfer_decline_params.py diff --git a/.stats.yml b/.stats.yml index 537a3f107..1fda84bbb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c6ae95ff1acbf2409cd2e99aa5060b720b8cea307012fc3ce9ac2037a199bfc7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0d982b9dd1e7ba06738a0c54bde728425a1daa1da14fb0e1285d2d805b5a520.yml diff --git a/api.md b/api.md index 139a02f43..be3c89a9b 100644 --- a/api.md +++ b/api.md @@ -244,7 +244,7 @@ Methods: - client.inbound_ach_transfers.retrieve(inbound_ach_transfer_id) -> InboundACHTransfer - client.inbound_ach_transfers.list(\*\*params) -> SyncPage[InboundACHTransfer] - client.inbound_ach_transfers.create_notification_of_change(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer -- client.inbound_ach_transfers.decline(inbound_ach_transfer_id) -> InboundACHTransfer +- client.inbound_ach_transfers.decline(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer - client.inbound_ach_transfers.transfer_return(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer # WireTransfers diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 52aa8642f..070a8567f 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -8,6 +8,7 @@ from ..types import ( inbound_ach_transfer_list_params, + inbound_ach_transfer_decline_params, inbound_ach_transfer_transfer_return_params, inbound_ach_transfer_create_notification_of_change_params, ) @@ -218,6 +219,19 @@ def decline( self, inbound_ach_transfer_id: str, *, + reason: Literal[ + "insufficient_funds", + "returned_per_odfi_request", + "authorization_revoked_by_customer", + "payment_stopped", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "beneficiary_or_account_holder_deceased", + "credit_entry_refused_by_receiver", + "duplicate_entry", + "corporate_customer_advised_not_authorized", + ] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -232,6 +246,33 @@ def decline( Args: inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + reason: The reason why this transfer will be returned. If this parameter is unset, the + return codes will be `payment_stopped` for debits and + `credit_entry_refused_by_receiver` for credits. + + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. + - `returned_per_odfi_request` - The originating financial institution asked for + this transfer to be returned. The receiving bank is complying with the + request. The Nacha return code is R06. + - `authorization_revoked_by_customer` - The customer no longer authorizes this + transaction. The Nacha return code is R07. + - `payment_stopped` - The customer asked for the payment to be stopped. This + reason is only allowed for debits. The Nacha return code is R08. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - The + customer advises that the debit was unauthorized. The Nacha return code is + R10. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - The + payee is deceased. The Nacha return code is R14. + - `beneficiary_or_account_holder_deceased` - The account holder is deceased. The + Nacha return code is R15. + - `credit_entry_refused_by_receiver` - The customer refused a credit entry. This + reason is only allowed for credits. The Nacha return code is R23. + - `duplicate_entry` - The account holder identified this transaction as a + duplicate. The Nacha return code is R24. + - `corporate_customer_advised_not_authorized` - The corporate customer no longer + authorizes this transaction. The Nacha return code is R29. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -248,6 +289,9 @@ def decline( ) return self._post( f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + body=maybe_transform( + {"reason": reason}, inbound_ach_transfer_decline_params.InboundACHTransferDeclineParams + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -532,6 +576,19 @@ async def decline( self, inbound_ach_transfer_id: str, *, + reason: Literal[ + "insufficient_funds", + "returned_per_odfi_request", + "authorization_revoked_by_customer", + "payment_stopped", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "beneficiary_or_account_holder_deceased", + "credit_entry_refused_by_receiver", + "duplicate_entry", + "corporate_customer_advised_not_authorized", + ] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -546,6 +603,33 @@ async def decline( Args: inbound_ach_transfer_id: The identifier of the Inbound ACH Transfer to decline. + reason: The reason why this transfer will be returned. If this parameter is unset, the + return codes will be `payment_stopped` for debits and + `credit_entry_refused_by_receiver` for credits. + + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. + - `returned_per_odfi_request` - The originating financial institution asked for + this transfer to be returned. The receiving bank is complying with the + request. The Nacha return code is R06. + - `authorization_revoked_by_customer` - The customer no longer authorizes this + transaction. The Nacha return code is R07. + - `payment_stopped` - The customer asked for the payment to be stopped. This + reason is only allowed for debits. The Nacha return code is R08. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - The + customer advises that the debit was unauthorized. The Nacha return code is + R10. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - The + payee is deceased. The Nacha return code is R14. + - `beneficiary_or_account_holder_deceased` - The account holder is deceased. The + Nacha return code is R15. + - `credit_entry_refused_by_receiver` - The customer refused a credit entry. This + reason is only allowed for credits. The Nacha return code is R23. + - `duplicate_entry` - The account holder identified this transaction as a + duplicate. The Nacha return code is R24. + - `corporate_customer_advised_not_authorized` - The corporate customer no longer + authorizes this transaction. The Nacha return code is R29. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -562,6 +646,9 @@ async def decline( ) return await self._post( f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + body=await async_maybe_transform( + {"reason": reason}, inbound_ach_transfer_decline_params.InboundACHTransferDeclineParams + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 57c1fc491..e36613983 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -133,6 +133,7 @@ from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams +from .inbound_ach_transfer_decline_params import InboundACHTransferDeclineParams as InboundACHTransferDeclineParams from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer as InboundRealTimePaymentsTransfer from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index cb1fc902e..dde64f7e3 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -55,9 +55,18 @@ class SourceACHDecline(BaseModel): "breaches_limit", "entity_not_active", "group_locked", - "insufficient_funds", "transaction_not_allowed", "user_initiated", + "insufficient_funds", + "returned_per_odfi_request", + "authorization_revoked_by_customer", + "payment_stopped", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "beneficiary_or_account_holder_deceased", + "credit_entry_refused_by_receiver", + "duplicate_entry", + "corporate_customer_advised_not_authorized", ] """Why the ACH transfer was declined. @@ -67,10 +76,26 @@ class SourceACHDecline(BaseModel): exceeded. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - `user_initiated` - Your integration declined this transfer via the API. + - `insufficient_funds` - Your account contains insufficient funds. + - `returned_per_odfi_request` - The originating financial institution asked for + this transfer to be returned. The receiving bank is complying with the + request. + - `authorization_revoked_by_customer` - The customer no longer authorizes this + transaction. + - `payment_stopped` - The customer asked for the payment to be stopped. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - The + customer advises that the debit was unauthorized. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - The + payee is deceased. + - `beneficiary_or_account_holder_deceased` - The account holder is deceased. + - `credit_entry_refused_by_receiver` - The customer refused a credit entry. + - `duplicate_entry` - The account holder identified this transaction as a + duplicate. + - `corporate_customer_advised_not_authorized` - The corporate customer no longer + authorizes this transaction. """ receiver_id_number: Optional[str] = None diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 74eeb3da3..9299466f6 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -61,9 +61,18 @@ class Decline(BaseModel): "breaches_limit", "entity_not_active", "group_locked", - "insufficient_funds", "transaction_not_allowed", "user_initiated", + "insufficient_funds", + "returned_per_odfi_request", + "authorization_revoked_by_customer", + "payment_stopped", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "beneficiary_or_account_holder_deceased", + "credit_entry_refused_by_receiver", + "duplicate_entry", + "corporate_customer_advised_not_authorized", ] """The reason for the transfer decline. @@ -73,10 +82,26 @@ class Decline(BaseModel): exceeded. - `entity_not_active` - The account's entity is not active. - `group_locked` - Your account is inactive. - - `insufficient_funds` - Your account contains insufficient funds. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - `user_initiated` - Your integration declined this transfer via the API. + - `insufficient_funds` - Your account contains insufficient funds. + - `returned_per_odfi_request` - The originating financial institution asked for + this transfer to be returned. The receiving bank is complying with the + request. + - `authorization_revoked_by_customer` - The customer no longer authorizes this + transaction. + - `payment_stopped` - The customer asked for the payment to be stopped. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - The + customer advises that the debit was unauthorized. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - The + payee is deceased. + - `beneficiary_or_account_holder_deceased` - The account holder is deceased. + - `credit_entry_refused_by_receiver` - The customer refused a credit entry. + - `duplicate_entry` - The account holder identified this transaction as a + duplicate. + - `corporate_customer_advised_not_authorized` - The corporate customer no longer + authorizes this transaction. """ diff --git a/src/increase/types/inbound_ach_transfer_decline_params.py b/src/increase/types/inbound_ach_transfer_decline_params.py new file mode 100644 index 000000000..20b70f444 --- /dev/null +++ b/src/increase/types/inbound_ach_transfer_decline_params.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["InboundACHTransferDeclineParams"] + + +class InboundACHTransferDeclineParams(TypedDict, total=False): + reason: Literal[ + "insufficient_funds", + "returned_per_odfi_request", + "authorization_revoked_by_customer", + "payment_stopped", + "customer_advised_unauthorized_improper_ineligible_or_incomplete", + "representative_payee_deceased_or_unable_to_continue_in_that_capacity", + "beneficiary_or_account_holder_deceased", + "credit_entry_refused_by_receiver", + "duplicate_entry", + "corporate_customer_advised_not_authorized", + ] + """The reason why this transfer will be returned. + + If this parameter is unset, the return codes will be `payment_stopped` for + debits and `credit_entry_refused_by_receiver` for credits. + + - `insufficient_funds` - The customer's account has insufficient funds. This + reason is only allowed for debits. The Nacha return code is R01. + - `returned_per_odfi_request` - The originating financial institution asked for + this transfer to be returned. The receiving bank is complying with the + request. The Nacha return code is R06. + - `authorization_revoked_by_customer` - The customer no longer authorizes this + transaction. The Nacha return code is R07. + - `payment_stopped` - The customer asked for the payment to be stopped. This + reason is only allowed for debits. The Nacha return code is R08. + - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - The + customer advises that the debit was unauthorized. The Nacha return code is + R10. + - `representative_payee_deceased_or_unable_to_continue_in_that_capacity` - The + payee is deceased. The Nacha return code is R14. + - `beneficiary_or_account_holder_deceased` - The account holder is deceased. The + Nacha return code is R15. + - `credit_entry_refused_by_receiver` - The customer refused a credit entry. This + reason is only allowed for credits. The Nacha return code is R23. + - `duplicate_entry` - The account holder identified this transaction as a + duplicate. The Nacha return code is R24. + - `corporate_customer_advised_not_authorized` - The corporate customer no longer + authorizes this transaction. The Nacha return code is R29. + """ diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 3cda2efc1..65088d8e9 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -155,14 +155,22 @@ def test_path_params_create_notification_of_change(self, client: Increase) -> No @parametrize def test_method_decline(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + def test_method_decline_with_all_params(self, client: Increase) -> None: + inbound_ach_transfer = client.inbound_ach_transfers.decline( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + reason="insufficient_funds", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_decline(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -173,7 +181,7 @@ def test_raw_response_decline(self, client: Increase) -> None: @parametrize def test_streaming_response_decline(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -189,7 +197,7 @@ def test_path_params_decline(self, client: Increase) -> None: ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): client.inbound_ach_transfers.with_raw_response.decline( - "", + inbound_ach_transfer_id="", ) @parametrize @@ -374,14 +382,22 @@ async def test_path_params_create_notification_of_change(self, async_client: Asy @parametrize async def test_method_decline(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + ) + assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) + + @parametrize + async def test_method_decline_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", + reason="insufficient_funds", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -392,7 +408,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.decline( - "inbound_ach_transfer_id", + inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -408,7 +424,7 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: ValueError, match=r"Expected a non-empty value for `inbound_ach_transfer_id` but received ''" ): await async_client.inbound_ach_transfers.with_raw_response.decline( - "", + inbound_ach_transfer_id="", ) @parametrize From a15ab62092deae86556b4bcb1d9e2a1b2f2f0e4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Sep 2024 20:18:33 +0000 Subject: [PATCH 0220/1325] chore(internal): codegen related update (#688) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 617f75025..124b9841a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.118.0" + ".": "0.119.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5bb7ff55e..415285df3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.118.0" +version = "0.119.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 46d7fc9ad..19916667f 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.118.0" # x-release-please-version +__version__ = "0.119.0" # x-release-please-version From 195684a6d9e1b9c7dd3c7d01e5d0ef81f8629ee0 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Mon, 23 Sep 2024 22:24:09 +0000 Subject: [PATCH 0221/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1fda84bbb..1fa6ac2e4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0d982b9dd1e7ba06738a0c54bde728425a1daa1da14fb0e1285d2d805b5a520.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dbbd1f127f66f5b3d7b2ca00006e14bdd7c7df16f7e53afc1f0a28ff861cf78d.yml From 03a1c757ec9c711236acd5fb003f19f71f6a2334 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:31:40 +0000 Subject: [PATCH 0222/1325] chore(internal): temporary docs change (#689) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index edce34869..c8af8a63c 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ client = Increase( account = client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + program_id="program_i2v2os4mwza1oetokh8i", ) print(account.id) ``` @@ -66,7 +66,7 @@ async def main() -> None: account = await client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + program_id="program_i2v2os4mwza1oetokh8i", ) print(account.id) From ee9b6759996f192ee60c8a37daaa4ef325e4d472 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:44:35 +0000 Subject: [PATCH 0223/1325] feat(api): OpenAPI spec update via Stainless API (#691) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index c8af8a63c..edce34869 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ client = Increase( account = client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh8i", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) ``` @@ -66,7 +66,7 @@ async def main() -> None: account = await client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh8i", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) From eb34e1c4429126e10ceb8fa15d27d983c6867c4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Sep 2024 18:45:32 +0000 Subject: [PATCH 0224/1325] chore(internal): version bump (#692) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 124b9841a..486a203fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.119.0" + ".": "0.120.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 415285df3..0aa29834a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.119.0" +version = "0.120.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 19916667f..61fc96c7e 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.119.0" # x-release-please-version +__version__ = "0.120.0" # x-release-please-version From 5bf5431a8ad695ab19e7a9bde53054f0ae51e976 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 07:19:16 +0000 Subject: [PATCH 0225/1325] feat(api): OpenAPI spec update via Stainless API (#693) --- .stats.yml | 2 +- src/increase/resources/card_disputes.py | 14 ++++++++++++++ src/increase/types/card_dispute.py | 3 +++ .../types/card_dispute_create_params.py | 8 ++++++++ tests/api_resources/test_card_disputes.py | 18 ++++++++++++++++++ 5 files changed, 44 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1fa6ac2e4..287a97498 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dbbd1f127f66f5b3d7b2ca00006e14bdd7c7df16f7e53afc1f0a28ff861cf78d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-102ccc04b6ac8d92851d9873804c95f31b7b4c266bb4e63c311e2125b9de7a16.yml diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 7fc64b0d1..61aef4cfa 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -50,6 +50,7 @@ def create( *, disputed_transaction_id: str, explanation: str, + amount: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -67,6 +68,11 @@ def create( explanation: Why you are disputing this Transaction. + amount: The monetary amount of the part of the transaction that is being disputed. This + is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -83,6 +89,7 @@ def create( { "disputed_transaction_id": disputed_transaction_id, "explanation": explanation, + "amount": amount, }, card_dispute_create_params.CardDisputeCreateParams, ), @@ -216,6 +223,7 @@ async def create( *, disputed_transaction_id: str, explanation: str, + amount: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -233,6 +241,11 @@ async def create( explanation: Why you are disputing this Transaction. + amount: The monetary amount of the part of the transaction that is being disputed. This + is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -249,6 +262,7 @@ async def create( { "disputed_transaction_id": disputed_transaction_id, "explanation": explanation, + "amount": amount, }, card_dispute_create_params.CardDisputeCreateParams, ), diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index ba7cf7009..9b406a888 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -81,6 +81,9 @@ class CardDispute(BaseModel): successful dispute. """ + amount: Optional[int] = None + """The amount of the dispute, if provided, or the transaction amount otherwise.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py index e7f882932..fd2a7207d 100644 --- a/src/increase/types/card_dispute_create_params.py +++ b/src/increase/types/card_dispute_create_params.py @@ -16,3 +16,11 @@ class CardDisputeCreateParams(TypedDict, total=False): explanation: Required[str] """Why you are disputing this Transaction.""" + + amount: int + """The monetary amount of the part of the transaction that is being disputed. + + This is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + """ diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 1f75f3301..a8ff27e74 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -27,6 +27,15 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(CardDispute, card_dispute, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_dispute = client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + explanation="Unauthorized recurring transaction.", + amount=1, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.card_disputes.with_raw_response.create( @@ -144,6 +153,15 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(CardDispute, card_dispute, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + explanation="Unauthorized recurring transaction.", + amount=1, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.card_disputes.with_raw_response.create( From dac4a852aaf864acb42c94e5be54d29f23000c75 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Sep 2024 07:20:26 +0000 Subject: [PATCH 0226/1325] chore(internal): codegen related update (#695) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 486a203fc..4bab99674 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.120.0" + ".": "0.121.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0aa29834a..9a35495ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.120.0" +version = "0.121.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 61fc96c7e..20b24846e 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.120.0" # x-release-please-version +__version__ = "0.121.0" # x-release-please-version From e197ecec4e319035ec21d5c0c460b93d890e9965 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:12:51 +0000 Subject: [PATCH 0227/1325] feat(api): OpenAPI spec update via Stainless API (#696) --- .stats.yml | 2 +- src/increase/types/inbound_mail_item.py | 25 +------------------------ 2 files changed, 2 insertions(+), 25 deletions(-) diff --git a/.stats.yml b/.stats.yml index 287a97498..d128adb2b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-102ccc04b6ac8d92851d9873804c95f31b7b4c266bb4e63c311e2125b9de7a16.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-73be645955d77ba5b31f8c3899a9f8cec80eef184489d8801cfeccadc1cb539f.yml diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index b8f592258..0bf85f2ad 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -6,27 +6,7 @@ from .._models import BaseModel -__all__ = ["InboundMailItem", "ReturnAddress"] - - -class ReturnAddress(BaseModel): - city: Optional[str] = None - """The return address city.""" - - line1: Optional[str] = None - """The return address line1.""" - - line2: Optional[str] = None - """The return address line2.""" - - name: Optional[str] = None - """The return address name.""" - - postal_code: Optional[str] = None - """The return address postal code.""" - - state: Optional[str] = None - """The return address state.""" +__all__ = ["InboundMailItem"] class InboundMailItem(BaseModel): @@ -60,9 +40,6 @@ class InboundMailItem(BaseModel): - `lockbox_not_active` - The Lockbox or its associataed Account is not active. """ - return_address: Optional[ReturnAddress] = None - """The return address as written on the mail item.""" - status: Literal["pending", "processed", "rejected"] """If the mail item has been processed. From ff1197c86e3b7bd7b3f3ac9c46cb09f4b3315e63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:13:10 +0000 Subject: [PATCH 0228/1325] feat(api): OpenAPI spec update via Stainless API (#697) From f85108b723e6cb3c573ce2d829e884a018db033e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:13:41 +0000 Subject: [PATCH 0229/1325] chore(internal): codegen related update (#699) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4bab99674..bd115b203 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.121.0" + ".": "0.122.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9a35495ef..0fa7f7b71 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.121.0" +version = "0.122.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 20b24846e..b143d7ef9 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.121.0" # x-release-please-version +__version__ = "0.122.0" # x-release-please-version From e41af5188e5544637dd1ef5e6b1c5ea90a7aedad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:13:58 +0000 Subject: [PATCH 0230/1325] chore(internal): codegen related update (#700) From 21761d93d63e8971f08032d96d0ef3a9ae2650c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:14:27 +0000 Subject: [PATCH 0231/1325] chore(internal): codegen related update (#701) --- src/increase/_base_client.py | 5 +- tests/test_client.py | 102 +++++++++++++++++++++++++++++++++++ 2 files changed, 106 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 15d8eff2e..cc2c5336a 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -412,7 +412,10 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: headers[idempotency_header] = options.idempotency_key or self._idempotency_key() - headers.setdefault("x-stainless-retry-count", str(retries_taken)) + # Don't set the retry count header if it was already set or removed by the caller. We check + # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case. + if "x-stainless-retry-count" not in (header.lower() for header in custom_headers): + headers["x-stainless-retry-count"] = str(retries_taken) return headers diff --git a/tests/test_client.py b/tests/test_client.py index cd4fd0ebe..b331066d1 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -810,6 +810,56 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + def test_omit_retry_count_header( + self, client: Increase, failures_before_success: int, respx_mock: MockRouter + ) -> None: + client = client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = client.accounts.with_raw_response.create( + name="New Account!", extra_headers={"x-stainless-retry-count": Omit()} + ) + + assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 + + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + def test_overwrite_retry_count_header( + self, client: Increase, failures_before_success: int, respx_mock: MockRouter + ) -> None: + client = client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = client.accounts.with_raw_response.create( + name="New Account!", extra_headers={"x-stainless-retry-count": "42"} + ) + + assert response.http_request.headers.get("x-stainless-retry-count") == "42" + class TestAsyncIncrease: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) @@ -1587,3 +1637,55 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.retries_taken == failures_before_success assert int(response.http_request.headers.get("x-stainless-retry-count")) == failures_before_success + + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + @pytest.mark.asyncio + async def test_omit_retry_count_header( + self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter + ) -> None: + client = async_client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = await client.accounts.with_raw_response.create( + name="New Account!", extra_headers={"x-stainless-retry-count": Omit()} + ) + + assert len(response.http_request.headers.get_list("x-stainless-retry-count")) == 0 + + @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) + @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) + @pytest.mark.respx(base_url=base_url) + @pytest.mark.asyncio + async def test_overwrite_retry_count_header( + self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter + ) -> None: + client = async_client.with_options(max_retries=4) + + nb_retries = 0 + + def retry_handler(_request: httpx.Request) -> httpx.Response: + nonlocal nb_retries + if nb_retries < failures_before_success: + nb_retries += 1 + return httpx.Response(500) + return httpx.Response(200) + + respx_mock.post("/accounts").mock(side_effect=retry_handler) + + response = await client.accounts.with_raw_response.create( + name="New Account!", extra_headers={"x-stainless-retry-count": "42"} + ) + + assert response.http_request.headers.get("x-stainless-retry-count") == "42" From 0b78a28c272304f6b2588ea2ebf3905890fd8d01 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Sep 2024 01:14:46 +0000 Subject: [PATCH 0232/1325] chore(internal): codegen related update (#702) From 84bac76482478addf01a9cac3b6c92e1ad2b81aa Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 1 Oct 2024 00:16:45 +0000 Subject: [PATCH 0233/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d128adb2b..3a619e988 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-73be645955d77ba5b31f8c3899a9f8cec80eef184489d8801cfeccadc1cb539f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a99d7eed15f3709f5657032f736e5d3d8893d7dd71e400241a284d1af467594e.yml From 86ec85a7d5e778ae9fc5f2451a0ad7fe2ccbd37e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 00:06:59 +0000 Subject: [PATCH 0234/1325] feat(api): OpenAPI spec update via Stainless API (#704) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 28 +++++++++++++++++-- src/increase/types/transaction.py | 3 ++ src/increase/types/transaction_list_params.py | 1 + 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3a619e988..c074804ca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a99d7eed15f3709f5657032f736e5d3d8893d7dd71e400241a284d1af467594e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f97d2c69aece2a0496b5171b00ae67b051f240faccdb4b401852def96fea5faa.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index b62ead900..0127d5496 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -1,12 +1,30 @@ # 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__ = ["InboundCheckDeposit", "DepositReturn"] +__all__ = ["InboundCheckDeposit", "Adjustment", "DepositReturn"] + + +class Adjustment(BaseModel): + adjusted_at: datetime + """The time at which the return adjustment was received.""" + + amount: int + """The amount of the adjustment.""" + + reason: Literal["late_return"] + """The reason for the adjustment. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + """ + + transaction_id: str + """The id of the transaction for the adjustment.""" class DepositReturn(BaseModel): @@ -50,6 +68,12 @@ class InboundCheckDeposit(BaseModel): account_number_id: Optional[str] = None """The Account Number the check is being deposited against.""" + adjustments: List[Adjustment] + """ + If the deposit or the return was adjusted by the sending institution, this will + contain details of the adjustments. + """ + amount: int """The deposited amount in the minor unit of the destination account currency. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index a904e7d62..1d9aba13c 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2266,6 +2266,7 @@ class Source(BaseModel): "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_check_adjustment", "inbound_real_time_payments_transfer_confirmation", "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", @@ -2317,6 +2318,8 @@ class Source(BaseModel): - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return Intention: details will be under the `inbound_check_deposit_return_intention` object. + - `inbound_check_adjustment` - Inbound Check Adjustment: details will be under + the `inbound_check_adjustment` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index b13a1f290..f7bfe16d6 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -57,6 +57,7 @@ class TransactionListParams(TypedDict, total=False): "inbound_ach_transfer", "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", + "inbound_check_adjustment", "inbound_real_time_payments_transfer_confirmation", "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", From 5cd90fa9ce3b2309795d6987bb7d38dcee909ce7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 00:08:09 +0000 Subject: [PATCH 0235/1325] chore(internal): codegen related update (#705) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd115b203..58ebf7f26 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.122.0" + ".": "0.123.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0fa7f7b71..9c15f0cca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.122.0" +version = "0.123.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b143d7ef9..a26e2e773 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.122.0" # x-release-please-version +__version__ = "0.123.0" # x-release-please-version From 00400f44162a16df3407e69c3089aa55232cc5d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 00:10:32 +0000 Subject: [PATCH 0236/1325] chore(internal): codegen related update (#706) --- CONTRIBUTING.md | 44 ++++++++++++++++++++++++-------------------- README.md | 4 ++++ 2 files changed, 28 insertions(+), 20 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cdef9668c..5c075f925 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,9 +2,13 @@ ### With Rye -We use [Rye](https://rye.astral.sh/) to manage dependencies so we highly recommend [installing it](https://rye.astral.sh/guide/installation/) as it will automatically provision a Python environment with the expected Python version. +We use [Rye](https://rye.astral.sh/) to manage dependencies because it will automatically provision a Python environment with the expected Python version. To set it up, run: -After installing Rye, you'll just have to run this command: +```sh +$ ./scripts/bootstrap +``` + +Or [install Rye manually](https://rye.astral.sh/guide/installation/) and run: ```sh $ rye sync --all-features @@ -39,17 +43,17 @@ modify the contents of the `src/increase/lib/` and `examples/` directories. All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. -```bash +```ts # add an example to examples/.py #!/usr/bin/env -S rye run python … ``` -``` -chmod +x examples/.py +```sh +$ chmod +x examples/.py # run the example against your api -./examples/.py +$ ./examples/.py ``` ## Using the repository from source @@ -58,8 +62,8 @@ If you’d like to use the repository from source, you can either install from g To install via git: -```bash -pip install git+ssh://git@github.com/Increase/increase-python.git +```sh +$ pip install git+ssh://git@github.com/Increase/increase-python.git ``` Alternatively, you can build from source and install the wheel file: @@ -68,29 +72,29 @@ Building this package will create two files in the `dist/` directory, a `.tar.gz To create a distributable version of the library, all you have to do is run this command: -```bash -rye build +```sh +$ rye build # or -python -m build +$ python -m build ``` Then to install: ```sh -pip install ./path-to-wheel-file.whl +$ pip install ./path-to-wheel-file.whl ``` ## Running tests Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. -```bash +```sh # you will need npm installed -npx prism mock path/to/your/openapi.yml +$ npx prism mock path/to/your/openapi.yml ``` -```bash -rye run pytest +```sh +$ ./scripts/test ``` ## Linting and formatting @@ -100,14 +104,14 @@ This repository uses [ruff](https://github.com/astral-sh/ruff) and To lint: -```bash -rye run lint +```sh +$ ./scripts/lint ``` To format and fix all ruff issues automatically: -```bash -rye run format +```sh +$ ./scripts/format ``` ## Publishing and releases diff --git a/README.md b/README.md index edce34869..b2911bcc0 100644 --- a/README.md +++ b/README.md @@ -439,3 +439,7 @@ print(increase.__version__) ## Requirements Python 3.7 or higher. + +## Contributing + +See [the contributing documentation](./CONTRIBUTING.md). From 69fc374ac6bf372a7e8251d554d7c7d807395381 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 00:11:04 +0000 Subject: [PATCH 0237/1325] chore(internal): codegen related update (#708) --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5c075f925..afe17473f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -43,7 +43,7 @@ modify the contents of the `src/increase/lib/` and `examples/` directories. All files in the `examples/` directory are not modified by the generator and can be freely edited or added to. -```ts +```py # add an example to examples/.py #!/usr/bin/env -S rye run python From 6686d8be81abd4bffb13106e56b5a4928b1bb054 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:50:02 +0000 Subject: [PATCH 0238/1325] feat(api): OpenAPI spec update via Stainless API (#709) --- .stats.yml | 2 +- .../simulations/card_authorizations.py | 22 +++++++++++++++++++ .../card_authorization_create_params.py | 13 ++++++++++- .../simulations/test_card_authorizations.py | 2 ++ 4 files changed, 37 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c074804ca..21e16ee1d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f97d2c69aece2a0496b5171b00ae67b051f240faccdb4b401852def96fea5faa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-93116bea2e1bd98712eccaeea4de143ad3849b0b6e872ea06d1dbcbb53a4ad5e.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 6cc869917..76ef1a1c4 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -50,6 +52,7 @@ def create( amount: int, card_id: str | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, + direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, merchant_acceptor_id: str | NotGiven = NOT_GIVEN, merchant_category_code: str | NotGiven = NOT_GIVEN, @@ -82,6 +85,14 @@ def create( digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. + direction: The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any @@ -118,6 +129,7 @@ def create( "amount": amount, "card_id": card_id, "digital_wallet_token_id": digital_wallet_token_id, + "direction": direction, "event_subscription_id": event_subscription_id, "merchant_acceptor_id": merchant_acceptor_id, "merchant_category_code": merchant_category_code, @@ -165,6 +177,7 @@ async def create( amount: int, card_id: str | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, + direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, merchant_acceptor_id: str | NotGiven = NOT_GIVEN, merchant_category_code: str | NotGiven = NOT_GIVEN, @@ -197,6 +210,14 @@ async def create( digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. + direction: The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any @@ -233,6 +254,7 @@ async def create( "amount": amount, "card_id": card_id, "digital_wallet_token_id": digital_wallet_token_id, + "direction": direction, "event_subscription_id": event_subscription_id, "merchant_acceptor_id": merchant_acceptor_id, "merchant_category_code": merchant_category_code, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 875f3cf23..897746788 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["CardAuthorizationCreateParams"] @@ -17,6 +17,17 @@ class CardAuthorizationCreateParams(TypedDict, total=False): digital_wallet_token_id: str """The identifier of the Digital Wallet Token to be authorized.""" + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + event_subscription_id: str """The identifier of the Event Subscription to use. diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index 83067015a..c19c3a076 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -30,6 +30,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", digital_wallet_token_id="digital_wallet_token_id", + direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", @@ -81,6 +82,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", digital_wallet_token_id="digital_wallet_token_id", + direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", From 4acf7ab965724c5aa3e08d766e40b4332ca463c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 22:50:52 +0000 Subject: [PATCH 0239/1325] chore(internal): codegen related update (#710) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 58ebf7f26..cadbcc6fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.123.0" + ".": "0.124.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9c15f0cca..c3f4568e3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.123.0" +version = "0.124.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a26e2e773..fdb0ef6a3 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.123.0" # x-release-please-version +__version__ = "0.124.0" # x-release-please-version From 10ce8247e8e61e666d068840eea0b965bde22dc9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:04:36 +0000 Subject: [PATCH 0240/1325] feat(api): OpenAPI spec update via Stainless API (#711) --- .stats.yml | 2 +- .../simulations/card_authorizations.py | 90 +++++++++++++++++++ .../card_authorization_create_params.py | 45 ++++++++++ .../simulations/test_card_authorizations.py | 2 + 4 files changed, 138 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 21e16ee1d..4162e0e86 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-93116bea2e1bd98712eccaeea4de143ad3849b0b6e872ea06d1dbcbb53a4ad5e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-95cd53612e28a6a76d70bd9f06e28480b277b23a277786ed25128309c780cf2d.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 76ef1a1c4..e20424a03 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -51,6 +51,24 @@ def create( *, amount: int, card_id: str | NotGiven = NOT_GIVEN, + decline_reason: Literal[ + "card_not_active", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "suspected_fraud", + ] + | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, @@ -83,6 +101,32 @@ def create( card_id: The identifier of the Card to be authorized. + decline_reason: Forces a card decline with a specific reason. No real time decision will be + sent. + + - `card_not_active` - The Card was not active. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. direction: The direction describes the direction the funds will move, either from the @@ -128,6 +172,7 @@ def create( { "amount": amount, "card_id": card_id, + "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, "direction": direction, "event_subscription_id": event_subscription_id, @@ -176,6 +221,24 @@ async def create( *, amount: int, card_id: str | NotGiven = NOT_GIVEN, + decline_reason: Literal[ + "card_not_active", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "suspected_fraud", + ] + | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, @@ -208,6 +271,32 @@ async def create( card_id: The identifier of the Card to be authorized. + decline_reason: Forces a card decline with a specific reason. No real time decision will be + sent. + + - `card_not_active` - The Card was not active. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. direction: The direction describes the direction the funds will move, either from the @@ -253,6 +342,7 @@ async def create( { "amount": amount, "card_id": card_id, + "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, "direction": direction, "event_subscription_id": event_subscription_id, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 897746788..02c107137 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -14,6 +14,51 @@ class CardAuthorizationCreateParams(TypedDict, total=False): card_id: str """The identifier of the Card to be authorized.""" + decline_reason: Literal[ + "card_not_active", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "suspected_fraud", + ] + """Forces a card decline with a specific reason. + + No real time decision will be sent. + + - `card_not_active` - The Card was not active. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + """ + digital_wallet_token_id: str """The identifier of the Digital Wallet Token to be authorized.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index c19c3a076..e84191112 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -29,6 +29,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: card_authorization = client.simulations.card_authorizations.create( amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", + decline_reason="card_not_active", digital_wallet_token_id="digital_wallet_token_id", direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", @@ -81,6 +82,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) card_authorization = await async_client.simulations.card_authorizations.create( amount=1000, card_id="card_oubs0hwk5rn6knuecxg2", + decline_reason="card_not_active", digital_wallet_token_id="digital_wallet_token_id", direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", From 057c89f7d2dd92fb2d1161c33e32f7b573b45ecb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Oct 2024 23:05:32 +0000 Subject: [PATCH 0241/1325] chore(internal): version bump (#713) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cadbcc6fc..f3343e210 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.124.0" + ".": "0.125.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c3f4568e3..372cafc1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.124.0" +version = "0.125.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fdb0ef6a3..acf456960 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.124.0" # x-release-please-version +__version__ = "0.125.0" # x-release-please-version From 8fa92c99bec6591877716a6b73e2c9461f0d365c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 00:24:22 +0000 Subject: [PATCH 0242/1325] feat(api): OpenAPI spec update via Stainless API (#714) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4162e0e86..90b75fd46 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-95cd53612e28a6a76d70bd9f06e28480b277b23a277786ed25128309c780cf2d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57c20ce7bbbe5541f66e38d8c136d859392e3ff6e6996fe81951493b7cd4695f.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 0127d5496..ea9a3c024 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,11 +16,13 @@ class Adjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return"] + reason: Literal["late_return", "wrong_payee_credit"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. """ transaction_id: str From 82324f090de1fe913357efebb7c4a909ede088df Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 00:25:14 +0000 Subject: [PATCH 0243/1325] chore(internal): version bump (#716) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f3343e210..f38100a45 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.125.0" + ".": "0.126.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 372cafc1d..19eda3857 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.125.0" +version = "0.126.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index acf456960..815d4b24d 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.125.0" # x-release-please-version +__version__ = "0.126.0" # x-release-please-version From c73c05f6367ee5f9bf9da015db53a4ce38d01922 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:40:15 +0000 Subject: [PATCH 0244/1325] feat(api): OpenAPI spec update via Stainless API (#717) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 11 +++++++++++ src/increase/types/declined_transaction.py | 11 +++++++++++ src/increase/types/real_time_decision.py | 11 +++++++++++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 90b75fd46..2f4689cf3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57c20ce7bbbe5541f66e38d8c136d859392e3ff6e6996fe81951493b7cd4695f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-968382e8f407176c81acf192826578636d568e9a38994ad612c39495ea2dcf91.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f164b1e30..fa75d73c7 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -661,6 +661,17 @@ class ElementCardDecline(BaseModel): purchase), the identifier of the token that was used. """ + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index dde64f7e3..bcc58d501 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -338,6 +338,17 @@ class SourceCardDecline(BaseModel): purchase), the identifier of the token that was used. """ + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 15e6335d7..5149b3be4 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -249,6 +249,17 @@ class CardAuthorization(BaseModel): purchase), the identifier of the token that was used. """ + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card From f3d11d7c3759fd42527f3ece1a5f3870461a3c18 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Oct 2024 20:41:47 +0000 Subject: [PATCH 0245/1325] chore(internal): codegen related update (#719) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f38100a45..47775e910 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.126.0" + ".": "0.127.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 19eda3857..ebfc2fc3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.126.0" +version = "0.127.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 815d4b24d..641e2210c 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.126.0" # x-release-please-version +__version__ = "0.127.0" # x-release-please-version From e3d950b5f56cfbb5990e1fc7afc02a7c6a79dc6a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:40:47 +0000 Subject: [PATCH 0246/1325] feat(api): OpenAPI spec update via Stainless API (#720) --- .stats.yml | 2 +- .../types/proof_of_authorization_request_submission.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2f4689cf3..3075b0d18 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-968382e8f407176c81acf192826578636d568e9a38994ad612c39495ea2dcf91.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e26dfe85429005556f9dd870bce732c7f6846a271c67405df964905f70bbf835.yml diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py index 2c23f9f3b..d251bd28a 100644 --- a/src/increase/types/proof_of_authorization_request_submission.py +++ b/src/increase/types/proof_of_authorization_request_submission.py @@ -48,12 +48,14 @@ class ProofOfAuthorizationRequestSubmission(BaseModel): proof_of_authorization_request_id: str """ID of the proof of authorization request.""" - status: Literal["pending_review", "rejected", "pending_sending", "sent"] + status: Literal["pending_review", "rejected", "canceled", "pending_sending", "sent"] """Status of the proof of authorization request submission. - `pending_review` - The proof of authorization request submission is pending review. - `rejected` - The proof of authorization request submission was rejected. + - `canceled` - The proof of authorization request submission was canceled and + replaced with another. - `pending_sending` - The proof of authorization request submission is pending sending. - `sent` - The proof of authorization request submission was sent. From 0497937bb1e8c2eed16b171e7415b772eeaa52ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:41:39 +0000 Subject: [PATCH 0247/1325] chore(internal): codegen related update (#722) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 47775e910..f118d0433 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.127.0" + ".": "0.128.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ebfc2fc3a..25c32c150 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.127.0" +version = "0.128.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 641e2210c..977a0560a 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.127.0" # x-release-please-version +__version__ = "0.128.0" # x-release-please-version From afc8c61d5aa3863126d9e2bd95c40588c825efa1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:44:06 +0000 Subject: [PATCH 0248/1325] chore(internal): add support for parsing bool response content (#723) --- src/increase/_response.py | 3 +++ tests/test_response.py | 50 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+) diff --git a/src/increase/_response.py b/src/increase/_response.py index a99e4f3db..399a2394e 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -192,6 +192,9 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: if cast_to == float: return cast(R, float(response.text)) + if cast_to == bool: + return cast(R, response.text.lower() == "true") + origin = get_origin(cast_to) or cast_to if origin == APIResponse: diff --git a/tests/test_response.py b/tests/test_response.py index a76e75dcc..4d7f6e009 100644 --- a/tests/test_response.py +++ b/tests/test_response.py @@ -190,6 +190,56 @@ async def test_async_response_parse_annotated_type(async_client: AsyncIncrease) assert obj.bar == 2 +@pytest.mark.parametrize( + "content, expected", + [ + ("false", False), + ("true", True), + ("False", False), + ("True", True), + ("TrUe", True), + ("FalSe", False), + ], +) +def test_response_parse_bool(client: Increase, content: str, expected: bool) -> None: + response = APIResponse( + raw=httpx.Response(200, content=content), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + result = response.parse(to=bool) + assert result is expected + + +@pytest.mark.parametrize( + "content, expected", + [ + ("false", False), + ("true", True), + ("False", False), + ("True", True), + ("TrUe", True), + ("FalSe", False), + ], +) +async def test_async_response_parse_bool(client: AsyncIncrease, content: str, expected: bool) -> None: + response = AsyncAPIResponse( + raw=httpx.Response(200, content=content), + client=client, + stream=False, + stream_cls=None, + cast_to=str, + options=FinalRequestOptions.construct(method="get", url="/foo"), + ) + + result = await response.parse(to=bool) + assert result is expected + + class OtherModel(BaseModel): a: str From 388c0f3ee81a2256946e53f0b2fc97cc5f2a853b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:49:54 +0000 Subject: [PATCH 0249/1325] fix(client): avoid OverflowError with very large retry counts (#725) --- src/increase/_base_client.py | 3 ++- tests/test_client.py | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index cc2c5336a..64661f553 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -689,7 +689,8 @@ def _calculate_retry_timeout( if retry_after is not None and 0 < retry_after <= 60: return retry_after - nb_retries = max_retries - remaining_retries + # Also cap retry count to 1000 to avoid any potential overflows with `pow` + nb_retries = min(max_retries - remaining_retries, 1000) # Apply exponential backoff, but not more than the max. sleep_seconds = min(INITIAL_RETRY_DELAY * pow(2.0, nb_retries), MAX_RETRY_DELAY) diff --git a/tests/test_client.py b/tests/test_client.py index b331066d1..2aea82a1e 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -733,6 +733,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], + [-1100, "", 7.8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) @@ -1557,6 +1558,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], + [-1100, "", 7.8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) From a355a12ebb6ce73a66c1adb5f71a55adca0b4679 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:50:49 +0000 Subject: [PATCH 0250/1325] feat(api): OpenAPI spec update via Stainless API (#726) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f118d0433..7c6223233 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.128.0" + ".": "0.128.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 25c32c150..fc76f9a30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.128.0" +version = "0.128.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 977a0560a..a3346c2ee 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.128.0" # x-release-please-version +__version__ = "0.128.1" # x-release-please-version From 2c52236140ce3555a0c6d2586f6d36baec04a7d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 17:51:55 +0000 Subject: [PATCH 0251/1325] chore: add repr to PageInfo class (#727) --- src/increase/_base_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 64661f553..0d35ae73c 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -143,6 +143,12 @@ def __init__( self.url = url self.params = params + @override + def __repr__(self) -> str: + if self.url: + return f"{self.__class__.__name__}(url={self.url})" + return f"{self.__class__.__name__}(params={self.params})" + class BasePage(GenericModel, Generic[_T]): """ From de3ca8bf85a0e711e0f042b2cd3c4e65b4278402 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:56:13 +0000 Subject: [PATCH 0252/1325] feat(api): OpenAPI spec update via Stainless API (#729) --- .stats.yml | 2 +- src/increase/resources/event_subscriptions.py | 6 ++++ src/increase/resources/real_time_decisions.py | 10 ++++++ src/increase/types/event.py | 3 ++ src/increase/types/event_list_params.py | 1 + src/increase/types/event_subscription.py | 3 ++ .../types/event_subscription_create_params.py | 3 ++ src/increase/types/real_time_decision.py | 33 ++++++++++++++++++- .../types/real_time_decision_action_params.py | 18 ++++++++++ .../api_resources/test_real_time_decisions.py | 2 ++ 10 files changed, 79 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3075b0d18..1f36051a3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e26dfe85429005556f9dd870bce732c7f6846a271c67405df964905f70bbf835.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-90c442dde8d67703730603f78ccf0f7e08c744435ac9a538d0d78e89e73fc12e.yml diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 0f5c890b6..9482f4e9a 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -134,6 +134,7 @@ def create( "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -283,6 +284,8 @@ def create( - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet requiring two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments @@ -583,6 +586,7 @@ async def create( "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -732,6 +736,8 @@ async def create( - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet requiring two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 3a096aaf6..1032581b4 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -85,6 +85,7 @@ def action( self, real_time_decision_id: str, *, + card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | NotGiven = NOT_GIVEN, @@ -103,6 +104,9 @@ def action( Args: real_time_decision_id: The identifier of the Real-Time Decision. + card_authentication: If the Real-Time Decision relates to a 3DS card authentication attempt, this + object contains your response to the authentication. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -130,6 +134,7 @@ def action( f"/real_time_decisions/{real_time_decision_id}/action", body=maybe_transform( { + "card_authentication": card_authentication, "card_authorization": card_authorization, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, @@ -208,6 +213,7 @@ async def action( self, real_time_decision_id: str, *, + card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | NotGiven = NOT_GIVEN, @@ -226,6 +232,9 @@ async def action( Args: real_time_decision_id: The identifier of the Real-Time Decision. + card_authentication: If the Real-Time Decision relates to a 3DS card authentication attempt, this + object contains your response to the authentication. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -253,6 +262,7 @@ async def action( f"/real_time_decisions/{real_time_decision_id}/action", body=await async_maybe_transform( { + "card_authentication": card_authentication, "card_authorization": card_authorization, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, diff --git a/src/increase/types/event.py b/src/increase/types/event.py index fbc70fd66..c86231c7e 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -96,6 +96,7 @@ class Event(BaseModel): "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -228,6 +229,8 @@ class Event(BaseModel): - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet requiring two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index bc83102cf..93b0fa105 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -111,6 +111,7 @@ class EventListParams(TypedDict, total=False): "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 71933e9bd..bd6c6d20b 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -109,6 +109,7 @@ class EventSubscription(BaseModel): "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -241,6 +242,8 @@ class EventSubscription(BaseModel): - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet requiring two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index d0eb43841..37dd70f86 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -95,6 +95,7 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -226,6 +227,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet requiring two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 5149b3be4..440a719a2 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -8,6 +8,7 @@ __all__ = [ "RealTimeDecision", + "CardAuthentication", "CardAuthorization", "CardAuthorizationNetworkDetails", "CardAuthorizationNetworkDetailsVisa", @@ -22,6 +23,29 @@ ] +class CardAuthentication(BaseModel): + account_id: str + """The identifier of the Account the card belongs to.""" + + card_id: str + """The identifier of the Card that is being tokenized.""" + + decision: Optional[Literal["approve", "challenge", "deny"]] = None + """Whether or not the authentication attempt was approved. + + - `approve` - Approve the authentication attempt without triggering a challenge. + - `challenge` - Request further validation before approving the authentication + attempt. + - `deny` - Deny the authentication attempt. + """ + + upcoming_card_payment_id: str + """The identifier of the Card Payment this authentication attempt will belong to. + + Available in the API once the card authentication has completed. + """ + + class CardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -445,15 +469,22 @@ class RealTimeDecision(BaseModel): id: str """The Real-Time Decision identifier.""" + card_authentication: Optional[CardAuthentication] = None + """Fields related to a 3DS authentication attempt.""" + card_authorization: Optional[CardAuthorization] = None """Fields related to a card authorization.""" category: Literal[ - "card_authorization_requested", "digital_wallet_token_requested", "digital_wallet_authentication_requested" + "card_authorization_requested", + "card_authentication_requested", + "digital_wallet_token_requested", + "digital_wallet_authentication_requested", ] """The category of the Real-Time Decision. - `card_authorization_requested` - A card is being authorized. + - `card_authentication_requested` - 3DS authentication is requested. - `digital_wallet_token_requested` - A card is being loaded into a digital wallet. - `digital_wallet_authentication_requested` - A card is being loaded into a diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 5c10237f0..2f42c8d12 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -6,6 +6,7 @@ __all__ = [ "RealTimeDecisionActionParams", + "CardAuthentication", "CardAuthorization", "DigitalWalletAuthentication", "DigitalWalletToken", @@ -15,6 +16,12 @@ class RealTimeDecisionActionParams(TypedDict, total=False): + card_authentication: CardAuthentication + """ + If the Real-Time Decision relates to a 3DS card authentication attempt, this + object contains your response to the authentication. + """ + card_authorization: CardAuthorization """ If the Real-Time Decision relates to a card authorization attempt, this object @@ -34,6 +41,17 @@ class RealTimeDecisionActionParams(TypedDict, total=False): """ +class CardAuthentication(TypedDict, total=False): + decision: Required[Literal["approve", "challenge", "deny"]] + """Whether the card authentication attempt should be approved or declined. + + - `approve` - Approve the authentication attempt without triggering a challenge. + - `challenge` - Request further validation before approving the authentication + attempt. + - `deny` - Deny the authentication attempt. + """ + + class CardAuthorization(TypedDict, total=False): decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined. diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index e85150cdb..312ce96bd 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -66,6 +66,7 @@ def test_method_action(self, client: Increase) -> None: def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", + card_authentication={"decision": "approve"}, card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ @@ -162,6 +163,7 @@ async def test_method_action(self, async_client: AsyncIncrease) -> None: async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: real_time_decision = await async_client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", + card_authentication={"decision": "approve"}, card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ From 756b88c7d3bab1a35fa3fda22dade69125ab0c0b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 21:57:06 +0000 Subject: [PATCH 0253/1325] chore: skip unsupported testing content types (#730) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7c6223233..65b6e7b4e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.128.1" + ".": "0.129.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fc76f9a30..f28c76c1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.128.1" +version = "0.129.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a3346c2ee..be42e30eb 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.128.1" # x-release-please-version +__version__ = "0.129.0" # x-release-please-version From 879c15fb4246c121f14a45b3cae5b14e8cc9fdca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:04:27 +0000 Subject: [PATCH 0254/1325] feat(api): OpenAPI spec update via Stainless API (#731) --- .stats.yml | 2 +- src/increase/resources/event_subscriptions.py | 6 ++++ src/increase/resources/real_time_decisions.py | 12 +++++++ src/increase/types/event.py | 3 ++ src/increase/types/event_list_params.py | 1 + src/increase/types/event_subscription.py | 3 ++ .../types/event_subscription_create_params.py | 3 ++ src/increase/types/real_time_decision.py | 33 +++++++++++++++++++ .../types/real_time_decision_action_params.py | 20 +++++++++++ .../api_resources/test_real_time_decisions.py | 2 ++ 10 files changed, 84 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1f36051a3..3da510361 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-90c442dde8d67703730603f78ccf0f7e08c744435ac9a538d0d78e89e73fc12e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4711c086d7582588be7813e07251d50cc395db0e1ca53a706e7c3b0edd4f5888.yml diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 9482f4e9a..1ae9bc63b 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -135,6 +135,7 @@ def create( "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -286,6 +287,8 @@ def create( two-factor authentication. - `real_time_decision.card_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments @@ -587,6 +590,7 @@ async def create( "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -738,6 +742,8 @@ async def create( two-factor authentication. - `real_time_decision.card_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 1032581b4..69dd7d9b9 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -86,6 +86,8 @@ def action( real_time_decision_id: str, *, card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, + card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge + | NotGiven = NOT_GIVEN, card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | NotGiven = NOT_GIVEN, @@ -107,6 +109,9 @@ def action( card_authentication: If the Real-Time Decision relates to a 3DS card authentication attempt, this object contains your response to the authentication. + card_authentication_challenge: If the Real-Time Decision relates to 3DS card authentication challenge delivery, + this object contains your response. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -135,6 +140,7 @@ def action( body=maybe_transform( { "card_authentication": card_authentication, + "card_authentication_challenge": card_authentication_challenge, "card_authorization": card_authorization, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, @@ -214,6 +220,8 @@ async def action( real_time_decision_id: str, *, card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, + card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge + | NotGiven = NOT_GIVEN, card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | NotGiven = NOT_GIVEN, @@ -235,6 +243,9 @@ async def action( card_authentication: If the Real-Time Decision relates to a 3DS card authentication attempt, this object contains your response to the authentication. + card_authentication_challenge: If the Real-Time Decision relates to 3DS card authentication challenge delivery, + this object contains your response. + card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. @@ -263,6 +274,7 @@ async def action( body=await async_maybe_transform( { "card_authentication": card_authentication, + "card_authentication_challenge": card_authentication_challenge, "card_authorization": card_authorization, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, diff --git a/src/increase/types/event.py b/src/increase/types/event.py index c86231c7e..def2f6076 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -97,6 +97,7 @@ class Event(BaseModel): "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -231,6 +232,8 @@ class Event(BaseModel): two-factor authentication. - `real_time_decision.card_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 93b0fa105..bcd932d7f 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -112,6 +112,7 @@ class EventListParams(TypedDict, total=False): "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index bd6c6d20b..090753a5c 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -110,6 +110,7 @@ class EventSubscription(BaseModel): "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -244,6 +245,8 @@ class EventSubscription(BaseModel): two-factor authentication. - `real_time_decision.card_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 37dd70f86..ba6500360 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -96,6 +96,7 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", "real_time_payments_transfer.created", "real_time_payments_transfer.updated", "real_time_payments_request_for_payment.created", @@ -229,6 +230,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): two-factor authentication. - `real_time_decision.card_authentication_requested` - Occurs whenever a Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments Transfer is created. - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 440a719a2..895d5f605 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -9,6 +9,7 @@ __all__ = [ "RealTimeDecision", "CardAuthentication", + "CardAuthenticationChallenge", "CardAuthorization", "CardAuthorizationNetworkDetails", "CardAuthorizationNetworkDetailsVisa", @@ -46,6 +47,32 @@ class CardAuthentication(BaseModel): """ +class CardAuthenticationChallenge(BaseModel): + account_id: str + """The identifier of the Account the card belongs to.""" + + card_id: str + """The identifier of the Card that is being tokenized.""" + + card_payment_id: str + """ + The identifier of the Card Payment this authentication challenge attempt belongs + to. + """ + + one_time_code: str + """The one-time code delivered to the cardholder.""" + + result: Optional[Literal["success", "failure"]] = None + """Whether or not the challenge was delivered to the cardholder. + + - `success` - Your application successfully delivered the one-time code to the + cardholder. + - `failure` - Your application was unable to deliver the one-time code to the + cardholder. + """ + + class CardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -472,12 +499,16 @@ class RealTimeDecision(BaseModel): card_authentication: Optional[CardAuthentication] = None """Fields related to a 3DS authentication attempt.""" + card_authentication_challenge: Optional[CardAuthenticationChallenge] = None + """Fields related to a 3DS authentication attempt.""" + card_authorization: Optional[CardAuthorization] = None """Fields related to a card authorization.""" category: Literal[ "card_authorization_requested", "card_authentication_requested", + "card_authentication_challenge_requested", "digital_wallet_token_requested", "digital_wallet_authentication_requested", ] @@ -485,6 +516,8 @@ class RealTimeDecision(BaseModel): - `card_authorization_requested` - A card is being authorized. - `card_authentication_requested` - 3DS authentication is requested. + - `card_authentication_challenge_requested` - 3DS authentication challenge + requires cardholder involvement. - `digital_wallet_token_requested` - A card is being loaded into a digital wallet. - `digital_wallet_authentication_requested` - A card is being loaded into a diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 2f42c8d12..78678f210 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -7,6 +7,7 @@ __all__ = [ "RealTimeDecisionActionParams", "CardAuthentication", + "CardAuthenticationChallenge", "CardAuthorization", "DigitalWalletAuthentication", "DigitalWalletToken", @@ -22,6 +23,12 @@ class RealTimeDecisionActionParams(TypedDict, total=False): object contains your response to the authentication. """ + card_authentication_challenge: CardAuthenticationChallenge + """ + If the Real-Time Decision relates to 3DS card authentication challenge delivery, + this object contains your response. + """ + card_authorization: CardAuthorization """ If the Real-Time Decision relates to a card authorization attempt, this object @@ -52,6 +59,19 @@ class CardAuthentication(TypedDict, total=False): """ +class CardAuthenticationChallenge(TypedDict, total=False): + result: Required[Literal["success", "failure"]] + """ + Whether the card authentication challenge was successfully delivered to the + cardholder. + + - `success` - Your application successfully delivered the one-time code to the + cardholder. + - `failure` - Your application was unable to deliver the one-time code to the + cardholder. + """ + + class CardAuthorization(TypedDict, total=False): decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined. diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 312ce96bd..c9669c2de 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -67,6 +67,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, + card_authentication_challenge={"result": "success"}, card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ @@ -164,6 +165,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) real_time_decision = await async_client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, + card_authentication_challenge={"result": "success"}, card_authorization={"decision": "approve"}, digital_wallet_authentication={"result": "success"}, digital_wallet_token={ From a417e672a8a2a5a580c3d7f62762ded02a3de4b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Oct 2024 23:05:21 +0000 Subject: [PATCH 0255/1325] chore(internal): version bump (#733) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 65b6e7b4e..37e997234 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.129.0" + ".": "0.130.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f28c76c1d..21702e863 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.129.0" +version = "0.130.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index be42e30eb..00707a6a4 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.129.0" # x-release-please-version +__version__ = "0.130.0" # x-release-please-version From eb6770e317756cb67ddf12773cd087353993e5dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:20:44 +0000 Subject: [PATCH 0256/1325] feat(api): api update (#734) --- .stats.yml | 2 +- .../types/real_time_decision_action_params.py | 14 ++++++++++++++ tests/api_resources/test_real_time_decisions.py | 16 ++++++++++++++-- 3 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3da510361..de02659b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4711c086d7582588be7813e07251d50cc395db0e1ca53a706e7c3b0edd4f5888.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-12daa6de8f08a6f1ab38aa5e0dbfaa478f21a79ac25fa138ac3c971d6e8c0ee3.yml diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 78678f210..a1cb1504c 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -10,6 +10,7 @@ "CardAuthenticationChallenge", "CardAuthorization", "DigitalWalletAuthentication", + "DigitalWalletAuthenticationSuccess", "DigitalWalletToken", "DigitalWalletTokenApproval", "DigitalWalletTokenDecline", @@ -81,6 +82,17 @@ class CardAuthorization(TypedDict, total=False): """ +class DigitalWalletAuthenticationSuccess(TypedDict, total=False): + email: str + """The email address that was used to verify the cardholder via one-time passcode.""" + + phone: str + """ + The phone number that was used to verify the cardholder via one-time passcode + over SMS. + """ + + class DigitalWalletAuthentication(TypedDict, total=False): result: Required[Literal["success", "failure"]] """Whether your application was able to deliver the one-time passcode. @@ -91,6 +103,8 @@ class DigitalWalletAuthentication(TypedDict, total=False): cardholder. """ + success: DigitalWalletAuthenticationSuccess + class DigitalWalletTokenApproval(TypedDict, total=False): email: str diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index c9669c2de..f90f43f19 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -69,7 +69,13 @@ def test_method_action_with_all_params(self, client: Increase) -> None: card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, card_authorization={"decision": "approve"}, - digital_wallet_authentication={"result": "success"}, + digital_wallet_authentication={ + "result": "success", + "success": { + "email": "x", + "phone": "x", + }, + }, digital_wallet_token={ "approval": { "email": "x", @@ -167,7 +173,13 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, card_authorization={"decision": "approve"}, - digital_wallet_authentication={"result": "success"}, + digital_wallet_authentication={ + "result": "success", + "success": { + "email": "x", + "phone": "x", + }, + }, digital_wallet_token={ "approval": { "email": "x", From e0e2a522fc11ad0601d2188e461ec44b4b123446 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:21:56 +0000 Subject: [PATCH 0257/1325] feat(api): api update (#736) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 37e997234..a24ae611f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.130.0" + ".": "0.131.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 21702e863..b45949bfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.130.0" +version = "0.131.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 00707a6a4..61b99ff10 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.130.0" # x-release-please-version +__version__ = "0.131.0" # x-release-please-version From af540aae959cd932955c6d07cedc5309435c6e13 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:59:04 +0000 Subject: [PATCH 0258/1325] feat(api): api update (#737) --- .stats.yml | 2 +- src/increase/resources/accounts.py | 8 ++++++++ src/increase/types/account_list_params.py | 3 +++ tests/api_resources/test_accounts.py | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index de02659b0..db97ee6c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-12daa6de8f08a6f1ab38aa5e0dbfaa478f21a79ac25fa138ac3c971d6e8c0ee3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ea861c2b8cc80b07a3bf884f2f099447538cc264fccf3e14599fad56024501f0.yml diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 6623df3df..a1cd95e85 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -205,6 +205,7 @@ def list( idempotency_key: str | NotGiven = NOT_GIVEN, informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + program_id: str | NotGiven = NOT_GIVEN, status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -231,6 +232,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + program_id: Filter Accounts for those in a specific Program. + status: Filter Accounts for those with the specified status. - `open` - Open Accounts that are ready to use. @@ -260,6 +263,7 @@ def list( "idempotency_key": idempotency_key, "informational_entity_id": informational_entity_id, "limit": limit, + "program_id": program_id, "status": status, }, account_list_params.AccountListParams, @@ -524,6 +528,7 @@ def list( idempotency_key: str | NotGiven = NOT_GIVEN, informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + program_id: str | NotGiven = NOT_GIVEN, status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -550,6 +555,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + program_id: Filter Accounts for those in a specific Program. + status: Filter Accounts for those with the specified status. - `open` - Open Accounts that are ready to use. @@ -579,6 +586,7 @@ def list( "idempotency_key": idempotency_key, "informational_entity_id": informational_entity_id, "limit": limit, + "program_id": program_id, "status": status, }, account_list_params.AccountListParams, diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py index b439c1103..0c847bdca 100644 --- a/src/increase/types/account_list_params.py +++ b/src/increase/types/account_list_params.py @@ -37,6 +37,9 @@ class AccountListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + program_id: str + """Filter Accounts for those in a specific Program.""" + status: Literal["open", "closed"] """Filter Accounts for those with the specified status. diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 3f80d108f..8b06c01e3 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -166,6 +166,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", informational_entity_id="informational_entity_id", limit=1, + program_id="program_id", status="open", ) assert_matches_type(SyncPage[Account], account, path=["response"]) @@ -422,6 +423,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", informational_entity_id="informational_entity_id", limit=1, + program_id="program_id", status="open", ) assert_matches_type(AsyncPage[Account], account, path=["response"]) From 78de6169e3792f3368868c165813cf6df6e746dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 18:00:11 +0000 Subject: [PATCH 0259/1325] feat(api): api update (#739) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a24ae611f..b4da64f27 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.131.0" + ".": "0.132.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b45949bfe..2ba6a5dc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.131.0" +version = "0.132.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 61b99ff10..9de50e7b4 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.131.0" # x-release-please-version +__version__ = "0.132.0" # x-release-please-version From 603e1d2a07dd050107cb06a18e4734ef39263c5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 19:45:51 +0000 Subject: [PATCH 0260/1325] feat(api): api update (#740) --- .stats.yml | 2 +- src/increase/resources/ach_transfers.py | 16 ++++++++++++++++ src/increase/types/ach_transfer_create_params.py | 8 ++++++++ tests/api_resources/test_ach_transfers.py | 2 ++ 4 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index db97ee6c6..0a09dec2a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ea861c2b8cc80b07a3bf884f2f099447538cc264fccf3e14599fad56024501f0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0d99529890c601f5ffe87712955c77f05d85fe22e03e6d05384fca4db330ce1.yml diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 27c5eee9b..3414264ea 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -74,6 +74,7 @@ def create( "internet_initiated", ] | NotGiven = NOT_GIVEN, + transaction_timing: Literal["synchronous", "asynchronous"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -153,6 +154,12 @@ def create( - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - `internet_initiated` - Internet Initiated (WEB). + transaction_timing: The timing of the transaction. + + - `synchronous` - A Transaction will be created immediately. + - `asynchronous` - A Transaction will be created when the funds settle at the + Federal Reserve. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -185,6 +192,7 @@ def create( "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, + "transaction_timing": transaction_timing, }, ach_transfer_create_params.ACHTransferCreateParams, ), @@ -430,6 +438,7 @@ async def create( "internet_initiated", ] | NotGiven = NOT_GIVEN, + transaction_timing: Literal["synchronous", "asynchronous"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -509,6 +518,12 @@ async def create( - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - `internet_initiated` - Internet Initiated (WEB). + transaction_timing: The timing of the transaction. + + - `synchronous` - A Transaction will be created immediately. + - `asynchronous` - A Transaction will be created when the funds settle at the + Federal Reserve. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -541,6 +556,7 @@ async def create( "require_approval": require_approval, "routing_number": routing_number, "standard_entry_class_code": standard_entry_class_code, + "transaction_timing": transaction_timing, }, ach_transfer_create_params.ACHTransferCreateParams, ), diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index 2439b2993..134aafb5b 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -139,6 +139,14 @@ class ACHTransferCreateParams(TypedDict, total=False): - `internet_initiated` - Internet Initiated (WEB). """ + transaction_timing: Literal["synchronous", "asynchronous"] + """The timing of the transaction. + + - `synchronous` - A Transaction will be created immediately. + - `asynchronous` - A Transaction will be created when the funds settle at the + Federal Reserve. + """ + class AddendaFreeformEntry(TypedDict, total=False): payment_related_information: Required[str] diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 6503a7429..29aab9bb4 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -77,6 +77,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: require_approval=True, routing_number="101050001", standard_entry_class_code="corporate_credit_or_debit", + transaction_timing="synchronous", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -326,6 +327,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) require_approval=True, routing_number="101050001", standard_entry_class_code="corporate_credit_or_debit", + transaction_timing="synchronous", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) From 2bfc07f658a81b4a67391d54f694057f6866090a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 20:03:06 +0000 Subject: [PATCH 0261/1325] feat(api): api update (#742) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b4da64f27..4a1242df8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.132.0" + ".": "0.133.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2ba6a5dc3..64ad0f590 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.132.0" +version = "0.133.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9de50e7b4..b6d955a96 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.132.0" # x-release-please-version +__version__ = "0.133.0" # x-release-please-version From 15c2a4db24c21ef076c319c11534982fe51e9d5c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:15:18 +0000 Subject: [PATCH 0262/1325] feat(api): api update (#743) --- .stats.yml | 4 +- api.md | 1 + .../resources/simulations/ach_transfers.py | 102 ++++++++++++++++++ .../simulations/test_ach_transfers.py | 76 +++++++++++++ 4 files changed, 181 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0a09dec2a..41fb24585 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0d99529890c601f5ffe87712955c77f05d85fe22e03e6d05384fca4db330ce1.yml +configured_endpoints: 199 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-600589f89a81837a7d40eb8b977bffb72f7df66297183eb1e2969fa815f7af10.yml diff --git a/api.md b/api.md index be3c89a9b..261cfc224 100644 --- a/api.md +++ b/api.md @@ -756,6 +756,7 @@ Methods: - client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer - client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer +- client.simulations.ach_transfers.settle(ach_transfer_id) -> ACHTransfer - client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer ## CheckTransfers diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index b3395f16a..0c7ce1bbc 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -474,6 +474,51 @@ def return_( cast_to=ACHTransfer, ) + def settle( + self, + ach_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> ACHTransfer: + """ + Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal + Reserve. This transfer must first have a `status` of `submitted`. Without this + simulation the transfer will eventually settle on its own following the same + Federal Reserve timeline as in production. + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") + return self._post( + f"/simulations/ach_transfers/{ach_transfer_id}/settle", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=ACHTransfer, + ) + def submit( self, ach_transfer_id: str, @@ -970,6 +1015,51 @@ async def return_( cast_to=ACHTransfer, ) + async def settle( + self, + ach_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> ACHTransfer: + """ + Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal + Reserve. This transfer must first have a `status` of `submitted`. Without this + simulation the transfer will eventually settle on its own following the same + Federal Reserve timeline as in production. + + Args: + ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not ach_transfer_id: + raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") + return await self._post( + f"/simulations/ach_transfers/{ach_transfer_id}/settle", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=ACHTransfer, + ) + async def submit( self, ach_transfer_id: str, @@ -1031,6 +1121,9 @@ def __init__(self, ach_transfers: ACHTransfersResource) -> None: self.return_ = to_raw_response_wrapper( ach_transfers.return_, ) + self.settle = to_raw_response_wrapper( + ach_transfers.settle, + ) self.submit = to_raw_response_wrapper( ach_transfers.submit, ) @@ -1049,6 +1142,9 @@ def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self.return_ = async_to_raw_response_wrapper( ach_transfers.return_, ) + self.settle = async_to_raw_response_wrapper( + ach_transfers.settle, + ) self.submit = async_to_raw_response_wrapper( ach_transfers.submit, ) @@ -1067,6 +1163,9 @@ def __init__(self, ach_transfers: ACHTransfersResource) -> None: self.return_ = to_streamed_response_wrapper( ach_transfers.return_, ) + self.settle = to_streamed_response_wrapper( + ach_transfers.settle, + ) self.submit = to_streamed_response_wrapper( ach_transfers.submit, ) @@ -1085,6 +1184,9 @@ def __init__(self, ach_transfers: AsyncACHTransfersResource) -> None: self.return_ = async_to_streamed_response_wrapper( ach_transfers.return_, ) + self.settle = async_to_streamed_response_wrapper( + ach_transfers.settle, + ) self.submit = async_to_streamed_response_wrapper( ach_transfers.submit, ) diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 4851c23df..72f7146d2 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -147,6 +147,44 @@ def test_path_params_return(self, client: Increase) -> None: ach_transfer_id="", ) + @parametrize + def test_method_settle(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.settle( + "ach_transfer_id", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_raw_response_settle(self, client: Increase) -> None: + response = client.simulations.ach_transfers.with_raw_response.settle( + "ach_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ach_transfer = response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_streaming_response_settle(self, client: Increase) -> None: + with client.simulations.ach_transfers.with_streaming_response.settle( + "ach_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ach_transfer = response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_settle(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + client.simulations.ach_transfers.with_raw_response.settle( + "", + ) + @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( @@ -319,6 +357,44 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: ach_transfer_id="", ) + @parametrize + async def test_method_settle(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.settle( + "ach_transfer_id", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_raw_response_settle(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.ach_transfers.with_raw_response.settle( + "ach_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + ach_transfer = await response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_settle(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.ach_transfers.with_streaming_response.settle( + "ach_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + ach_transfer = await response.parse() + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_settle(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): + await async_client.simulations.ach_transfers.with_raw_response.settle( + "", + ) + @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( From bd345aa265fc9733f84e19bf620e7433efe6dcad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 00:16:25 +0000 Subject: [PATCH 0263/1325] feat(api): api update (#745) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4a1242df8..774500bfb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.133.0" + ".": "0.134.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 64ad0f590..2b519f9be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.133.0" +version = "0.134.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b6d955a96..54b26c868 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.133.0" # x-release-please-version +__version__ = "0.134.0" # x-release-please-version From c74a5a71407c6af4b814f307aa37cc4e50c7e230 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 22:59:25 +0000 Subject: [PATCH 0264/1325] feat(api): api update (#746) --- .stats.yml | 2 +- src/increase/types/check_transfer.py | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 41fb24585..8923eb9c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-600589f89a81837a7d40eb8b977bffb72f7df66297183eb1e2969fa815f7af10.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5167530f388eb11cb211b36f5a71506cbf6cf4b7cea8f9e621decee47b476bed.yml diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index bd960220e..fd890bcec 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -144,9 +144,12 @@ class PhysicalCheckReturnAddress(BaseModel): class PhysicalCheckTrackingUpdate(BaseModel): - category: Literal["returned_to_sender"] + category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"] """The type of tracking event. + - `in_transit` - The check is in transit. + - `processed_for_delivery` - The check has been processed for delivery. + - `delivered` - The check has been delivered. - `returned_to_sender` - Delivery failed and the check was returned to sender. """ From 9462783541a99919d486dfce909ad722064331dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Oct 2024 23:00:43 +0000 Subject: [PATCH 0265/1325] feat(api): api update (#748) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 774500bfb..69f5f4dd0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.134.0" + ".": "0.135.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2b519f9be..871322767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.134.0" +version = "0.135.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 54b26c868..6ceceef61 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.134.0" # x-release-please-version +__version__ = "0.135.0" # x-release-please-version From b11019f84a62f2c2940d59dec83c0d82bb3c4000 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:13:28 +0000 Subject: [PATCH 0266/1325] feat(api): api update (#749) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8923eb9c0..4792f7692 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5167530f388eb11cb211b36f5a71506cbf6cf4b7cea8f9e621decee47b476bed.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d6b163c8a0075f664b1d8647802e8b60ae51a6e6646d52bc086b9850aa410b71.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index fa75d73c7..879042243 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2501,6 +2501,7 @@ class Element(BaseModel): category: Literal[ "card_authorization", + "card_authentication", "card_validation", "card_decline", "card_reversal", @@ -2518,6 +2519,8 @@ class Element(BaseModel): - `card_authorization` - Card Authorization: details will be under the `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` object. - `card_decline` - Card Decline: details will be under the `card_decline` From 71a4c073d923871555b90d971d5b3404ea0e155f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Oct 2024 02:14:29 +0000 Subject: [PATCH 0267/1325] feat(api): api update (#751) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 69f5f4dd0..f56be53d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.135.0" + ".": "0.136.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 871322767..7f08b7252 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.135.0" +version = "0.136.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6ceceef61..e869aaa34 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.135.0" # x-release-please-version +__version__ = "0.136.0" # x-release-please-version From bf8a5f69ac4b88216f87fc22a8900400b091881d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:36:50 +0000 Subject: [PATCH 0268/1325] feat(api): api update (#752) --- .stats.yml | 2 +- src/increase/types/ach_transfer.py | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4792f7692..8bd53363e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d6b163c8a0075f664b1d8647802e8b60ae51a6e6646d52bc086b9850aa410b71.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e37cf876ed0d6f18fe3c49e6cdfdf35ac358dc6fc14cc9a71d6592c966ae2e5f.yml diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 9742e328a..d8fcfa63e 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -26,6 +26,7 @@ "NotificationsOfChange", "PreferredEffectiveDate", "Return", + "Settlement", "Submission", ] @@ -560,6 +561,14 @@ class Return(BaseModel): """The identifier of the ACH Transfer associated with this return.""" +class Settlement(BaseModel): + settled_at: datetime.datetime + """ + When the funds for this transfer have settled at the destination bank at the + Federal Reserve. + """ + + class Submission(BaseModel): effective_date: datetime.date """The ACH transfer's effective date as sent to the Federal Reserve. @@ -748,6 +757,12 @@ class ACHTransfer(BaseModel): routing_number: str """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" + settlement: Optional[Settlement] = None + """ + 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", From 171b760f2b870d35dc79e1d5d29c0ac2c0cb1690 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 15 Oct 2024 21:37:48 +0000 Subject: [PATCH 0269/1325] feat(api): api update (#754) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f56be53d6..345168d47 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.136.0" + ".": "0.137.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7f08b7252..87da3294a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.136.0" +version = "0.137.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e869aaa34..398edf182 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.136.0" # x-release-please-version +__version__ = "0.137.0" # x-release-please-version From 4bb2de08120c2cef961556c2ba5c905063d17d85 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Tue, 15 Oct 2024 21:52:37 +0000 Subject: [PATCH 0270/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8bd53363e..5b7fcf249 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e37cf876ed0d6f18fe3c49e6cdfdf35ac358dc6fc14cc9a71d6592c966ae2e5f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0899485b1082b76c076ab60e5a4d982cb620297e72ca3787709ef3797f69f28.yml From b602bd68c79d283166c942c71ef051efd996bd41 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Wed, 16 Oct 2024 02:34:25 +0000 Subject: [PATCH 0271/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5b7fcf249..5a57b2383 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0899485b1082b76c076ab60e5a4d982cb620297e72ca3787709ef3797f69f28.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1676ee3510fee7691ebc78a80bdc73583c28947260312d40aa63f7b0211d0b51.yml From 24a067c40893816cc4e5c26835fc4f9d8777dad5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 02:48:37 +0000 Subject: [PATCH 0272/1325] feat(api): api update (#755) --- .stats.yml | 2 +- src/increase/resources/ach_transfers.py | 4 +-- src/increase/resources/check_deposits.py | 6 ++--- src/increase/resources/check_transfers.py | 4 +-- .../resources/wire_drawdown_requests.py | 4 +-- src/increase/resources/wire_transfers.py | 4 +-- .../types/ach_transfer_create_params.py | 2 +- src/increase/types/check_deposit.py | 10 ++------ .../types/check_deposit_create_params.py | 5 +--- .../types/check_transfer_create_params.py | 2 +- src/increase/types/declined_transaction.py | 10 ++------ src/increase/types/inbound_check_deposit.py | 5 +--- src/increase/types/pending_transaction.py | 25 ++++--------------- src/increase/types/transaction.py | 10 ++------ .../wire_drawdown_request_create_params.py | 2 +- .../types/wire_transfer_create_params.py | 2 +- 16 files changed, 28 insertions(+), 69 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a57b2383..e55690936 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1676ee3510fee7691ebc78a80bdc73583c28947260312d40aa63f7b0211d0b51.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99be641e3d65ac2ac6b41a559599aac32f1bcf4e7bf379f52e8a4978b606aa09.yml diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 3414264ea..5c38a169c 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -89,7 +89,7 @@ def create( Args: account_id: The Increase identifier for the account that will send the transfer. - amount: The transfer amount in cents. A positive amount originates a credit transfer + amount: The transfer amount in USD cents. A positive amount originates a credit transfer pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the receiving account. @@ -453,7 +453,7 @@ async def create( Args: account_id: The Increase identifier for the account that will send the transfer. - amount: The transfer amount in cents. A positive amount originates a credit transfer + amount: The transfer amount in USD cents. A positive amount originates a credit transfer pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the receiving account. diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 8653814fc..d91e4b11d 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -67,8 +67,7 @@ def create( Args: account_id: The identifier for the Account to deposit the check in. - amount: The deposit amount in the minor unit of the account currency. For dollars, for - example, this is cents. + amount: The deposit amount in USD cents. back_image_file_id: The File containing the check's back image. @@ -247,8 +246,7 @@ async def create( Args: account_id: The identifier for the Account to deposit the check in. - amount: The deposit amount in the minor unit of the account currency. For dollars, for - example, this is cents. + amount: The deposit amount in USD cents. back_image_file_id: The File containing the check's back image. diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 53737a1a2..8c8d463cc 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -75,7 +75,7 @@ def create( Args: account_id: The identifier for the account that will send the transfer. - amount: The transfer amount in cents. + amount: The transfer amount in USD cents. source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. @@ -406,7 +406,7 @@ async def create( Args: account_id: The identifier for the account that will send the transfer. - amount: The transfer amount in cents. + amount: The transfer amount in USD cents. source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 9710dfb7a..cc951fa43 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -77,7 +77,7 @@ def create( Args: account_number_id: The Account Number to which the recipient should send funds. - amount: The amount requested from the recipient, in cents. + amount: The amount requested from the recipient, in USD cents. message_to_recipient: A message the recipient will see as part of the request. @@ -303,7 +303,7 @@ async def create( Args: account_number_id: The Account Number to which the recipient should send funds. - amount: The amount requested from the recipient, in cents. + amount: The amount requested from the recipient, in USD cents. message_to_recipient: A message the recipient will see as part of the request. diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 4f608fb84..ff9da4775 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -77,7 +77,7 @@ def create( Args: account_id: The identifier for the account that will send the transfer. - amount: The transfer amount in cents. + amount: The transfer amount in USD cents. beneficiary_name: The beneficiary's name. @@ -390,7 +390,7 @@ async def create( Args: account_id: The identifier for the account that will send the transfer. - amount: The transfer amount in cents. + amount: The transfer amount in USD cents. beneficiary_name: The beneficiary's name. diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index 134aafb5b..4c8e05cb8 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -24,7 +24,7 @@ class ACHTransferCreateParams(TypedDict, total=False): """The Increase identifier for the account that will send the transfer.""" amount: Required[int] - """The transfer amount in cents. + """The transfer amount in USD cents. A positive amount originates a credit transfer pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index e7496e70a..21ccbec84 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -123,10 +123,7 @@ class DepositRejection(BaseModel): class DepositReturn(BaseModel): amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The returned amount in USD cents.""" check_deposit_id: str """The identifier of the Check Deposit that was returned.""" @@ -307,10 +304,7 @@ class CheckDeposit(BaseModel): """The Account the check was deposited into.""" amount: int - """The deposited amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ + """The deposited amount in USD cents.""" back_image_file_id: Optional[str] = None """The ID for the File containing the image of the back of the check.""" diff --git a/src/increase/types/check_deposit_create_params.py b/src/increase/types/check_deposit_create_params.py index 0483b05e5..864cdb832 100644 --- a/src/increase/types/check_deposit_create_params.py +++ b/src/increase/types/check_deposit_create_params.py @@ -12,10 +12,7 @@ class CheckDepositCreateParams(TypedDict, total=False): """The identifier for the Account to deposit the check in.""" amount: Required[int] - """The deposit amount in the minor unit of the account currency. - - For dollars, for example, this is cents. - """ + """The deposit amount in USD cents.""" back_image_file_id: Required[str] """The File containing the check's back image.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 583b4fe04..d2e04b85a 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -18,7 +18,7 @@ class CheckTransferCreateParams(TypedDict, total=False): """The identifier for the account that will send the transfer.""" amount: Required[int] - """The transfer amount in cents.""" + """The transfer amount in USD cents.""" source_account_number_id: Required[str] """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index bcc58d501..00ed32da1 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -29,10 +29,7 @@ class SourceACHDecline(BaseModel): """The ACH Decline's identifier.""" amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ + """The declined amount in USD cents.""" inbound_ach_transfer_id: str """The identifier of the Inbound ACH Transfer object associated with this decline.""" @@ -486,10 +483,7 @@ class SourceCardDecline(BaseModel): class SourceCheckDecline(BaseModel): amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ + """The declined amount in USD cents.""" auxiliary_on_us: Optional[str] = None """ diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index ea9a3c024..00bc0ea4a 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -77,10 +77,7 @@ class InboundCheckDeposit(BaseModel): """ amount: int - """The deposited amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ + """The deposited amount in USD cents.""" back_image_file_id: Optional[str] = None """The ID for the File containing the image of the back of the check.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 78e817223..033b380b8 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -52,10 +52,7 @@ class SourceAccountTransferInstruction(BaseModel): class SourceACHTransferInstruction(BaseModel): amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The pending amount in USD cents.""" transfer_id: str """The identifier of the ACH Transfer that led to this Pending Transaction.""" @@ -400,10 +397,7 @@ class SourceCardAuthorization(BaseModel): class SourceCheckDepositInstruction(BaseModel): amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The pending amount in USD cents.""" back_image_file_id: Optional[str] = None """ @@ -436,10 +430,7 @@ class SourceCheckDepositInstruction(BaseModel): class SourceCheckTransferInstruction(BaseModel): amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The transfer amount in USD cents.""" currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ @@ -518,10 +509,7 @@ class SourceInboundFundsHold(BaseModel): class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The transfer amount in USD cents.""" transfer_id: str """ @@ -535,10 +523,7 @@ class SourceWireTransferInstruction(BaseModel): """The account number for the destination account.""" amount: int - """The pending amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The transfer amount in USD cents.""" message_to_recipient: str """The message that will show on the recipient's bank statement.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 1d9aba13c..2de33e636 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1573,10 +1573,7 @@ class SourceCheckDepositAcceptance(BaseModel): class SourceCheckDepositReturn(BaseModel): amount: int - """The amount in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. - """ + """The returned amount in USD cents.""" check_deposit_id: str """The identifier of the Check Deposit that was returned.""" @@ -1762,10 +1759,7 @@ class SourceInboundACHTransfer(BaseModel): """Additional information sent from the originator.""" amount: int - """The amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ + """The transfer amount in USD cents.""" originator_company_descriptive_date: Optional[str] = None """The description of the date of the transfer, usually in the format `YYMMDD`.""" diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index 027a22a50..614ea73cc 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -12,7 +12,7 @@ class WireDrawdownRequestCreateParams(TypedDict, total=False): """The Account Number to which the recipient should send funds.""" amount: Required[int] - """The amount requested from the recipient, in cents.""" + """The amount requested from the recipient, in USD cents.""" message_to_recipient: Required[str] """A message the recipient will see as part of the request.""" diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index d70f7bc76..8bc695543 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -12,7 +12,7 @@ class WireTransferCreateParams(TypedDict, total=False): """The identifier for the account that will send the transfer.""" amount: Required[int] - """The transfer amount in cents.""" + """The transfer amount in USD cents.""" beneficiary_name: Required[str] """The beneficiary's name.""" From 4524264d77e7d8521aee103ef7fcaa45ee54f2ea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 02:50:13 +0000 Subject: [PATCH 0273/1325] feat(api): api update (#757) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 345168d47..1aec2271e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.137.0" + ".": "0.138.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 87da3294a..10a84b8f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.137.0" +version = "0.138.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 398edf182..45f91db6b 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.137.0" # x-release-please-version +__version__ = "0.138.0" # x-release-please-version From 516b9d799940a13c28bc9b5bc46f5f664a0ebd93 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:03:46 +0000 Subject: [PATCH 0274/1325] feat(api): api update (#758) --- .stats.yml | 2 +- src/increase/types/check_deposit.py | 2 ++ src/increase/types/declined_transaction.py | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e55690936..69dea22e0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99be641e3d65ac2ac6b41a559599aac32f1bcf4e7bf379f52e8a4978b606aa09.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b366e6f11499b1be2d75c4081881132666f2e4aa2b4758f5153cee80596650ea.yml diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 21ccbec84..a0bb1defd 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -95,6 +95,7 @@ class DepositRejection(BaseModel): "missing_required_data_elements", "suspected_fraud", "deposit_window_expired", + "requested_by_user", "unknown", ] """Why the check deposit was rejected. @@ -111,6 +112,7 @@ class DepositRejection(BaseModel): field. - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. + - `requested_by_user` - The check was rejected at the user's request. - `unknown` - The check was rejected for an unknown reason. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 00ed32da1..5acf6cc7d 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -593,6 +593,7 @@ class SourceCheckDepositRejection(BaseModel): "missing_required_data_elements", "suspected_fraud", "deposit_window_expired", + "requested_by_user", "unknown", ] """Why the check deposit was rejected. @@ -609,6 +610,7 @@ class SourceCheckDepositRejection(BaseModel): field. - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. + - `requested_by_user` - The check was rejected at the user's request. - `unknown` - The check was rejected for an unknown reason. """ From 8f649dfcfbabc8baf0f80d8e3dcab4c576810d59 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 16:04:51 +0000 Subject: [PATCH 0275/1325] feat(api): api update (#760) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1aec2271e..b84fc1600 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.138.0" + ".": "0.139.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 10a84b8f1..cb95e640f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.138.0" +version = "0.139.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 45f91db6b..1bfe301c2 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.138.0" # x-release-please-version +__version__ = "0.139.0" # x-release-please-version From 0a50604e56a2fbf4242ac71b872c82cf49aa99eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:52:03 +0000 Subject: [PATCH 0276/1325] feat(api): api update (#761) --- .stats.yml | 2 +- .../resources/simulations/card_authorizations.py | 10 ++++++++++ .../simulations/card_authorization_create_params.py | 6 ++++++ .../simulations/test_card_authorizations.py | 2 ++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 69dea22e0..bac98dcd4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b366e6f11499b1be2d75c4081881132666f2e4aa2b4758f5153cee80596650ea.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-865126be21b3987504a3a5b5c58bcdcbafd563d0f03b9bd08110bbf4ee68e420.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index e20424a03..15d8099d9 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -50,6 +50,7 @@ def create( self, *, amount: int, + authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, card_id: str | NotGiven = NOT_GIVEN, decline_reason: Literal[ "card_not_active", @@ -99,6 +100,9 @@ def create( Args: amount: The authorization amount in cents. + authenticated_card_payment_id: The identifier of a Card Payment with a `card_authentication` if you want to + simulate an authenticated authorization. + card_id: The identifier of the Card to be authorized. decline_reason: Forces a card decline with a specific reason. No real time decision will be @@ -171,6 +175,7 @@ def create( body=maybe_transform( { "amount": amount, + "authenticated_card_payment_id": authenticated_card_payment_id, "card_id": card_id, "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, @@ -220,6 +225,7 @@ async def create( self, *, amount: int, + authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, card_id: str | NotGiven = NOT_GIVEN, decline_reason: Literal[ "card_not_active", @@ -269,6 +275,9 @@ async def create( Args: amount: The authorization amount in cents. + authenticated_card_payment_id: The identifier of a Card Payment with a `card_authentication` if you want to + simulate an authenticated authorization. + card_id: The identifier of the Card to be authorized. decline_reason: Forces a card decline with a specific reason. No real time decision will be @@ -341,6 +350,7 @@ async def create( body=await async_maybe_transform( { "amount": amount, + "authenticated_card_payment_id": authenticated_card_payment_id, "card_id": card_id, "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 02c107137..f6e2b43e0 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -11,6 +11,12 @@ class CardAuthorizationCreateParams(TypedDict, total=False): amount: Required[int] """The authorization amount in cents.""" + authenticated_card_payment_id: str + """ + The identifier of a Card Payment with a `card_authentication` if you want to + simulate an authenticated authorization. + """ + card_id: str """The identifier of the Card to be authorized.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index e84191112..d9186d6e2 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -28,6 +28,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: card_authorization = client.simulations.card_authorizations.create( amount=1000, + authenticated_card_payment_id="authenticated_card_payment_id", card_id="card_oubs0hwk5rn6knuecxg2", decline_reason="card_not_active", digital_wallet_token_id="digital_wallet_token_id", @@ -81,6 +82,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: card_authorization = await async_client.simulations.card_authorizations.create( amount=1000, + authenticated_card_payment_id="authenticated_card_payment_id", card_id="card_oubs0hwk5rn6knuecxg2", decline_reason="card_not_active", digital_wallet_token_id="digital_wallet_token_id", From f3ba00e7632bd804b417480816fd40f22cda962a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 20:53:03 +0000 Subject: [PATCH 0277/1325] feat(api): api update (#763) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b84fc1600..7da24d1a4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.139.0" + ".": "0.140.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cb95e640f..87dbf1ea9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.139.0" +version = "0.140.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1bfe301c2..f8b016eff 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.139.0" # x-release-please-version +__version__ = "0.140.0" # x-release-please-version From 1da0218145bda9f884407e5bd648f0a18dc0778a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:54:51 +0000 Subject: [PATCH 0278/1325] feat(api): api update (#764) --- .stats.yml | 2 +- src/increase/resources/entities.py | 10 ++++++++++ src/increase/types/entity.py | 18 ++++++++++++++++++ src/increase/types/entity_create_params.py | 18 ++++++++++++++++++ tests/api_resources/test_entities.py | 8 ++++++++ 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bac98dcd4..c46e6f23d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-865126be21b3987504a3a5b5c58bcdcbafd563d0f03b9bd08110bbf4ee68e420.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-de24df7cc115d1c70186c44dd3244ab502e597f5c62f7208fd702ff2f4b5e86b.yml diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index d1671f672..f03b090b4 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -68,6 +68,7 @@ def create( joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, + third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -107,6 +108,9 @@ def create( supplemental_documents: Additional documentation associated with the entity. + third_party_verification: A reference to data stored in a third-party verification service. Your + integration may or may not use this field. + trust: Details of the trust entity to create. Required if `structure` is equal to `trust`. @@ -131,6 +135,7 @@ def create( "joint": joint, "natural_person": natural_person, "supplemental_documents": supplemental_documents, + "third_party_verification": third_party_verification, "trust": trust, }, entity_create_params.EntityCreateParams, @@ -621,6 +626,7 @@ async def create( joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, + third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -660,6 +666,9 @@ async def create( supplemental_documents: Additional documentation associated with the entity. + third_party_verification: A reference to data stored in a third-party verification service. Your + integration may or may not use this field. + trust: Details of the trust entity to create. Required if `structure` is equal to `trust`. @@ -684,6 +693,7 @@ async def create( "joint": joint, "natural_person": natural_person, "supplemental_documents": supplemental_documents, + "third_party_verification": third_party_verification, "trust": trust, }, entity_create_params.EntityCreateParams, diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index afeb6da56..33d81387e 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -25,6 +25,7 @@ "NaturalPerson", "NaturalPersonAddress", "NaturalPersonIdentification", + "ThirdPartyVerification", "Trust", "TrustAddress", "TrustGrantor", @@ -333,6 +334,17 @@ class NaturalPerson(BaseModel): """The person's legal name.""" +class ThirdPartyVerification(BaseModel): + reference: str + """The reference identifier for the third party verification.""" + + vendor: Literal["alloy"] + """The vendor that was used to perform the verification. + + - `alloy` - Alloy + """ + + class TrustAddress(BaseModel): city: str """The city of the address.""" @@ -589,6 +601,12 @@ class Entity(BaseModel): retrieve them. """ + third_party_verification: Optional[ThirdPartyVerification] = None + """A reference to data stored in a third-party verification service. + + Your integration may or may not use this field. + """ + trust: Optional[Trust] = None """Details of the trust entity. diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index a93805212..d1a1a39d5 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -36,6 +36,7 @@ "NaturalPersonIdentificationOther", "NaturalPersonIdentificationPassport", "SupplementalDocument", + "ThirdPartyVerification", "Trust", "TrustAddress", "TrustTrustee", @@ -97,6 +98,12 @@ class EntityCreateParams(TypedDict, total=False): supplemental_documents: Iterable[SupplementalDocument] """Additional documentation associated with the entity.""" + third_party_verification: ThirdPartyVerification + """A reference to data stored in a third-party verification service. + + Your integration may or may not use this field. + """ + trust: Trust """Details of the trust entity to create. @@ -654,6 +661,17 @@ class SupplementalDocument(TypedDict, total=False): """The identifier of the File containing the document.""" +class ThirdPartyVerification(TypedDict, total=False): + reference: Required[str] + """The reference identifier for the third party verification.""" + + vendor: Required[Literal["alloy"]] + """The vendor that was used to perform the verification. + + - `alloy` - Alloy + """ + + class TrustAddress(TypedDict, total=False): city: Required[str] """The city of the address.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 8a49c0e37..e931b06ac 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -243,6 +243,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "confirmed_no_us_tax_id": True, }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], + third_party_verification={ + "reference": "x", + "vendor": "alloy", + }, trust={ "address": { "city": "x", @@ -1212,6 +1216,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "confirmed_no_us_tax_id": True, }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], + third_party_verification={ + "reference": "x", + "vendor": "alloy", + }, trust={ "address": { "city": "x", From 791feadb58b1a84c987572449d6c5e7b3fa8f510 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Oct 2024 23:55:50 +0000 Subject: [PATCH 0279/1325] feat(api): api update (#766) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7da24d1a4..ab58c1935 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.140.0" + ".": "0.141.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 87dbf1ea9..34fb532bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.140.0" +version = "0.141.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f8b016eff..0ff76159d 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.140.0" # x-release-please-version +__version__ = "0.141.0" # x-release-please-version From 5bdec1a786ac9f8da6926995410b533f55aed37c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 01:32:49 +0000 Subject: [PATCH 0280/1325] feat(api): api update (#767) --- .stats.yml | 2 +- src/increase/types/pending_transaction.py | 3 +++ src/increase/types/pending_transaction_list_params.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index c46e6f23d..860fa92c6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-de24df7cc115d1c70186c44dd3244ab502e597f5c62f7208fd702ff2f4b5e86b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f9c8c72860546eb1ac73133d6e4789f70effca19786a0f633584d456fa51c99.yml diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 033b380b8..f22f9d6f3 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -569,6 +569,7 @@ class Source(BaseModel): "inbound_funds_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", + "inbound_wire_transfer_reversal", "other", ] """The type of the resource. @@ -593,6 +594,8 @@ class Source(BaseModel): `real_time_payments_transfer_instruction` object. - `wire_transfer_instruction` - Wire Transfer Instruction: details will be under the `wire_transfer_instruction` object. + - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal: details + will be under the `inbound_wire_transfer_reversal` object. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index a16dde5bd..c5baebcfc 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -47,6 +47,7 @@ class PendingTransactionListParams(TypedDict, total=False): "inbound_funds_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", + "inbound_wire_transfer_reversal", "other", ] ], From d3242f23aad31dc0e6996a2d581f9ad00d74b420 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 01:34:00 +0000 Subject: [PATCH 0281/1325] feat(api): api update (#769) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ab58c1935..9ad4bf827 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.141.0" + ".": "0.142.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 34fb532bf..00af6e376 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.141.0" +version = "0.142.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0ff76159d..1ca52db3e 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.141.0" # x-release-please-version +__version__ = "0.142.0" # x-release-please-version From 4c0df4870788ea8f653d667725988393660f9b5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 04:03:56 +0000 Subject: [PATCH 0282/1325] feat(api): api update (#770) --- .stats.yml | 2 +- src/increase/types/entity.py | 5 +++-- src/increase/types/entity_create_params.py | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 860fa92c6..2a4bb14cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f9c8c72860546eb1ac73133d6e4789f70effca19786a0f633584d456fa51c99.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47b33934e880a008709d5c7686ec698e81913ba5292ca92e6c179b374d2467e0.yml diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 33d81387e..c9289fa41 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -338,10 +338,11 @@ class ThirdPartyVerification(BaseModel): reference: str """The reference identifier for the third party verification.""" - vendor: Literal["alloy"] + vendor: Literal["alloy", "middesk"] """The vendor that was used to perform the verification. - - `alloy` - Alloy + - `alloy` - Alloy. See https://alloy.com for more information. + - `middesk` - Middesk. See https://middesk.com for more information. """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index d1a1a39d5..e6d7a5823 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -665,10 +665,11 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy"]] + vendor: Required[Literal["alloy", "middesk"]] """The vendor that was used to perform the verification. - - `alloy` - Alloy + - `alloy` - Alloy. See https://alloy.com for more information. + - `middesk` - Middesk. See https://middesk.com for more information. """ From afd8c8b19b8039f6167b1ccc4e137b0da2c1920f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 04:04:54 +0000 Subject: [PATCH 0283/1325] feat(api): api update (#772) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9ad4bf827..176e8d6ee 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.142.0" + ".": "0.143.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 00af6e376..b1576a8e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.142.0" +version = "0.143.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1ca52db3e..4afda23bc 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.142.0" # x-release-please-version +__version__ = "0.143.0" # x-release-please-version From 140f2a9bcbb2254cd9a0addb0a605ca0c0ae670b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:27:18 +0000 Subject: [PATCH 0284/1325] feat(api): api update (#773) --- .stats.yml | 2 +- pyproject.toml | 3 ++- requirements-dev.lock | 2 +- src/increase/types/check_transfer.py | 3 +++ tests/test_models.py | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a4bb14cf..5d5064bd4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47b33934e880a008709d5c7686ec698e81913ba5292ca92e6c179b374d2467e0.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4301eab99de2725210040f2f0e12d53aa63082726487f841878763c57645e16b.yml diff --git a/pyproject.toml b/pyproject.toml index b1576a8e6..0e5275ee0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -63,11 +63,12 @@ format = { chain = [ "format:ruff", "format:docs", "fix:ruff", + # run formatting again to fix any inconsistencies when imports are stripped + "format:ruff", ]} "format:black" = "black ." "format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" "format:ruff" = "ruff format" -"format:isort" = "isort ." "lint" = { chain = [ "check:ruff", diff --git a/requirements-dev.lock b/requirements-dev.lock index 93157885f..5c6873aad 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -80,7 +80,7 @@ pytz==2023.3.post1 # via dirty-equals respx==0.20.2 rich==13.7.1 -ruff==0.6.5 +ruff==0.6.9 setuptools==68.2.2 # via nodeenv six==1.16.0 diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index fd890bcec..74eafbfa5 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -159,6 +159,9 @@ class PhysicalCheckTrackingUpdate(BaseModel): the tracking event took place. """ + postal_code: str + """The postal code where the event took place.""" + class PhysicalCheck(BaseModel): mailing_address: PhysicalCheckMailingAddress diff --git a/tests/test_models.py b/tests/test_models.py index 9d9fe50ae..7ae584363 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -245,7 +245,7 @@ class Model(BaseModel): assert m.foo is True m = Model.construct(foo="CARD_HOLDER") - assert m.foo is "CARD_HOLDER" + assert m.foo == "CARD_HOLDER" m = Model.construct(foo={"bar": False}) assert isinstance(m.foo, Submodel1) From 26ff60d47ed4dffb2e899ae32eb90dd3afed47f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Oct 2024 22:28:20 +0000 Subject: [PATCH 0285/1325] feat(api): api update (#775) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 176e8d6ee..ac4811800 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.143.0" + ".": "0.144.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0e5275ee0..70c1b46c0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.143.0" +version = "0.144.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4afda23bc..e23709dc7 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.143.0" # x-release-please-version +__version__ = "0.144.0" # x-release-please-version From a1000e75583eefd4d166635c7642cf26bac9513a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:01:56 +0000 Subject: [PATCH 0286/1325] feat(api): api update (#776) --- .stats.yml | 2 +- pyproject.toml | 5 ----- src/increase/_base_client.py | 2 +- src/increase/types/transaction.py | 3 +++ tests/test_client.py | 21 +++++++++++++++++++-- 5 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d5064bd4..e9ec2f9c0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4301eab99de2725210040f2f0e12d53aa63082726487f841878763c57645e16b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b0e82eec38e8f7980bed0955fc259b1e24a619d04880a0b2593d2898a215d4ae.yml diff --git a/pyproject.toml b/pyproject.toml index 70c1b46c0..8b2bcdfaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -66,7 +66,6 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:black" = "black ." "format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" "format:ruff" = "ruff format" @@ -126,10 +125,6 @@ path = "README.md" pattern = '\[(.+?)\]\(((?!https?://)\S+?)\)' replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>)' -[tool.black] -line-length = 120 -target-version = ["py37"] - [tool.pytest.ini_options] testpaths = ["tests"] addopts = "--tb=short" diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 0d35ae73c..92681ce90 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1575,7 +1575,7 @@ async def _request( except Exception as err: log.debug("Encountered Exception", exc_info=True) - if retries_taken > 0: + if remaining_retries > 0: return await self._retry_request( input_options, cast_to, diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 2de33e636..c30da0a33 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1732,6 +1732,9 @@ class SourceFeePayment(BaseModel): fee_period_start: date """The start of this payment's fee period, usually the first day of a month.""" + program_id: Optional[str] = None + """The Program for which this fee was incurred.""" + class SourceInboundACHTransferAddendaFreeformEntry(BaseModel): payment_related_information: str diff --git a/tests/test_client.py b/tests/test_client.py index 2aea82a1e..951e3382b 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -10,6 +10,7 @@ import tracemalloc from typing import Any, Union, cast from unittest import mock +from typing_extensions import Literal import httpx import pytest @@ -792,7 +793,14 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - def test_retries_taken(self, client: Increase, failures_before_success: int, respx_mock: MockRouter) -> None: + @pytest.mark.parametrize("failure_mode", ["status", "exception"]) + def test_retries_taken( + self, + client: Increase, + failures_before_success: int, + failure_mode: Literal["status", "exception"], + respx_mock: MockRouter, + ) -> None: client = client.with_options(max_retries=4) nb_retries = 0 @@ -801,6 +809,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: nonlocal nb_retries if nb_retries < failures_before_success: nb_retries += 1 + if failure_mode == "exception": + raise RuntimeError("oops") return httpx.Response(500) return httpx.Response(200) @@ -1619,8 +1629,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @pytest.mark.asyncio + @pytest.mark.parametrize("failure_mode", ["status", "exception"]) async def test_retries_taken( - self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter + self, + async_client: AsyncIncrease, + failures_before_success: int, + failure_mode: Literal["status", "exception"], + respx_mock: MockRouter, ) -> None: client = async_client.with_options(max_retries=4) @@ -1630,6 +1645,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: nonlocal nb_retries if nb_retries < failures_before_success: nb_retries += 1 + if failure_mode == "exception": + raise RuntimeError("oops") return httpx.Response(500) return httpx.Response(200) From 363efe2515ab0cd595a69ecf0e9e322377ece035 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Oct 2024 16:02:56 +0000 Subject: [PATCH 0287/1325] feat(api): api update (#778) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ac4811800..2fb68e4dc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.144.0" + ".": "0.145.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8b2bcdfaa..7e843c83d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.144.0" +version = "0.145.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e23709dc7..4bf50944d 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.144.0" # x-release-please-version +__version__ = "0.145.0" # x-release-please-version From 0a249743b994c5c155e274215f9f582838a27cf7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 02:44:29 +0000 Subject: [PATCH 0288/1325] feat(api): api update (#779) --- .stats.yml | 2 +- src/increase/types/ach_transfer.py | 12 ++++++------ src/increase/types/check_transfer.py | 14 +++++++------- src/increase/types/real_time_payments_transfer.py | 10 +++++----- src/increase/types/wire_transfer.py | 14 +++++++------- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index e9ec2f9c0..4357e336f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b0e82eec38e8f7980bed0955fc259b1e24a619d04880a0b2593d2898a215d4ae.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c0020d589ec80104c972ade9c6059c29250fcdd14bdc92f1bfc2668771b42915.yml diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index d8fcfa63e..76a44d4c1 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -784,12 +784,12 @@ class ACHTransfer(BaseModel): "pending_approval", "pending_transfer_session_confirmation", "canceled", - "pending_reviewing", "pending_submission", - "submitted", - "returned", + "pending_reviewing", "requires_attention", "rejected", + "submitted", + "returned", ] """The lifecycle status of the transfer. @@ -797,14 +797,14 @@ class ACHTransfer(BaseModel): - `pending_transfer_session_confirmation` - The transfer belongs to a Transfer Session that is pending confirmation. - `canceled` - The transfer has been canceled. - - `pending_reviewing` - The transfer is pending review by Increase. - `pending_submission` - The transfer is pending submission to the Federal Reserve. - - `submitted` - The transfer is complete. - - `returned` - The transfer has been returned. + - `pending_reviewing` - The transfer is pending review by Increase. - `requires_attention` - The transfer requires attention from an Increase operator. - `rejected` - The transfer has been rejected. + - `submitted` - The transfer is complete. + - `returned` - The transfer has been returned. """ submission: Optional[Submission] = None diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 74eafbfa5..846a12d38 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -328,28 +328,28 @@ class CheckTransfer(BaseModel): status: Literal[ "pending_approval", + "canceled", "pending_submission", + "requires_attention", + "rejected", "pending_mailing", "mailed", - "canceled", "deposited", "stopped", - "rejected", - "requires_attention", "returned", ] """The lifecycle status of the transfer. - `pending_approval` - The transfer is awaiting approval. + - `canceled` - The transfer has been canceled. - `pending_submission` - The transfer is pending submission. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `rejected` - The transfer has been rejected. - `pending_mailing` - The check is queued for mailing. - `mailed` - The check has been mailed. - - `canceled` - The transfer has been canceled. - `deposited` - The check has been deposited. - `stopped` - A stop-payment was requested for this check. - - `rejected` - The transfer has been rejected. - - `requires_attention` - The transfer requires attention from an Increase - operator. - `returned` - The transfer has been returned. """ diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index ae2b7266a..1ad2cee2c 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -285,25 +285,25 @@ class RealTimePaymentsTransfer(BaseModel): "pending_approval", "canceled", "pending_reviewing", + "requires_attention", + "rejected", "pending_submission", "submitted", "complete", - "rejected", - "requires_attention", ] """The lifecycle status of the transfer. - `pending_approval` - The transfer is pending approval. - `canceled` - The transfer has been canceled. - `pending_reviewing` - The transfer is pending review by Increase. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `rejected` - The transfer was rejected by the network or the recipient's bank. - `pending_submission` - The transfer is queued to be submitted to Real-Time Payments. - `submitted` - The transfer has been submitted and is pending a response from Real-Time Payments. - `complete` - The transfer has been sent successfully and is complete. - - `rejected` - The transfer was rejected by the network or the recipient's bank. - - `requires_attention` - The transfer requires attention from an Increase - operator. """ submission: Optional[Submission] = None diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 59eb4f7d6..58f408072 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -265,29 +265,29 @@ class WireTransfer(BaseModel): """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" status: Literal[ + "pending_approval", "canceled", - "requires_attention", "pending_reviewing", - "pending_approval", "rejected", + "requires_attention", + "pending_creating", "reversed", "submitted", "complete", - "pending_creating", ] """The lifecycle status of the transfer. + - `pending_approval` - The transfer is pending approval. - `canceled` - The transfer has been canceled. - - `requires_attention` - The transfer requires attention from an Increase - operator. - `pending_reviewing` - The transfer is pending review by Increase. - - `pending_approval` - The transfer is pending approval. - `rejected` - The transfer has been rejected by Increase. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `pending_creating` - The transfer is pending creation. - `reversed` - The transfer has been reversed. - `submitted` - The transfer has been submitted to Fedwire. - `complete` - The transfer has been acknowledged by Fedwire and can be considered complete. - - `pending_creating` - The transfer is pending creation. """ submission: Optional[Submission] = None From f4353eda898c419df64b47c149cff34ca203ddd8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 02:45:33 +0000 Subject: [PATCH 0289/1325] feat(api): api update (#781) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2fb68e4dc..123a54908 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.145.0" + ".": "0.146.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7e843c83d..bb2a86d8f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.145.0" +version = "0.146.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4bf50944d..1e9a990e8 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.145.0" # x-release-please-version +__version__ = "0.146.0" # x-release-please-version From 7f9de6950c075c8fd0df0be190124d9ea976e309 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 03:28:50 +0000 Subject: [PATCH 0290/1325] feat(api): api update (#782) --- .stats.yml | 2 +- src/increase/resources/wire_transfers.py | 8 ++++++++ src/increase/types/wire_transfer.py | 3 +++ src/increase/types/wire_transfer_create_params.py | 3 +++ tests/api_resources/test_wire_transfers.py | 2 ++ 5 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4357e336f..c65d98210 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c0020d589ec80104c972ade9c6059c29250fcdd14bdc92f1bfc2668771b42915.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-11eda1a50dda21c511629736b0e387b97c26e675c021dfbf3c34c32a22076f44.yml diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index ff9da4775..34a675b12 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -63,6 +63,7 @@ def create( originator_name: str | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, + source_account_number_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -111,6 +112,8 @@ def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. + source_account_number_id: The ID of an Account Number that will be passed to the wire's recipient + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -140,6 +143,7 @@ def create( "originator_name": originator_name, "require_approval": require_approval, "routing_number": routing_number, + "source_account_number_id": source_account_number_id, }, wire_transfer_create_params.WireTransferCreateParams, ), @@ -376,6 +380,7 @@ async def create( originator_name: str | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, + source_account_number_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -424,6 +429,8 @@ async def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. + source_account_number_id: The ID of an Account Number that will be passed to the wire's recipient + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -453,6 +460,7 @@ async def create( "originator_name": originator_name, "require_approval": require_approval, "routing_number": routing_number, + "source_account_number_id": source_account_number_id, }, wire_transfer_create_params.WireTransferCreateParams, ), diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 58f408072..52e1b5178 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -264,6 +264,9 @@ class WireTransfer(BaseModel): routing_number: str """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" + source_account_number_id: Optional[str] = None + """The Account Number that was passed to the wire's recipient.""" + status: Literal[ "pending_approval", "canceled", diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index 8bc695543..894fb6349 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -75,3 +75,6 @@ class WireTransferCreateParams(TypedDict, total=False): The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. """ + + source_account_number_id: str + """The ID of an Account Number that will be passed to the wire's recipient""" diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 3419dbccf..409891d56 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -47,6 +47,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_name="x", require_approval=True, routing_number="101050001", + source_account_number_id="source_account_number_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -268,6 +269,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_name="x", require_approval=True, routing_number="101050001", + source_account_number_id="source_account_number_id", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) From 9ec925bb42f41ccc53542edca285737eb386376f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Oct 2024 03:29:54 +0000 Subject: [PATCH 0291/1325] feat(api): api update (#784) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 123a54908..e205138b1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.146.0" + ".": "0.147.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bb2a86d8f..f3714d613 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.146.0" +version = "0.147.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1e9a990e8..e4c912de5 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.146.0" # x-release-please-version +__version__ = "0.147.0" # x-release-please-version From 5b2a1dde651b43b7ae6eac56f911c8ce53924f3c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:42:20 +0000 Subject: [PATCH 0292/1325] feat(api): api update (#786) --- .stats.yml | 2 +- api.md | 142 ++-- requirements-dev.lock | 21 +- requirements.lock | 8 +- src/increase/_compat.py | 2 +- src/increase/_models.py | 10 +- src/increase/_types.py | 6 +- .../resources/simulations/__init__.py | 204 +++--- .../card_authorization_expirations.py | 4 +- .../simulations/inbound_funds_holds.py | 4 +- .../inbound_real_time_payments_transfers.py | 16 +- .../simulations/inbound_wire_transfers.py | 4 +- .../resources/simulations/programs.py | 18 +- .../real_time_payments_transfers.py | 14 +- .../resources/simulations/simulations.py | 654 +++++++++--------- tests/conftest.py | 14 +- 16 files changed, 564 insertions(+), 559 deletions(-) diff --git a/.stats.yml b/.stats.yml index c65d98210..2c1b1ffae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-11eda1a50dda21c511629736b0e387b97c26e675c021dfbf3c34c32a22076f44.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd81ce0566663d7711578e3ebbfba3978abe83b0167f445286f4ad484489040c.yml diff --git a/api.md b/api.md index 261cfc224..917c19e38 100644 --- a/api.md +++ b/api.md @@ -737,189 +737,189 @@ Methods: # Simulations -## AccountTransfers +## InterestPayments Methods: -- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer +- client.simulations.interest_payments.create(\*\*params) -> Transaction -## InboundACHTransfers +## CardAuthorizations + +Types: + +```python +from increase.types.simulations import CardAuthorizationCreateResponse +``` Methods: -- client.simulations.inbound_ach_transfers.create(\*\*params) -> InboundACHTransfer +- client.simulations.card_authorizations.create(\*\*params) -> CardAuthorizationCreateResponse -## ACHTransfers +## CardAuthorizationExpirations Methods: -- client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer -- client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach_transfers.settle(ach_transfer_id) -> ACHTransfer -- client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer +- client.simulations.card_authorization_expirations.create(\*\*params) -> CardPayment -## CheckTransfers +## CardSettlements Methods: -- client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer +- client.simulations.card_settlements.create(\*\*params) -> Transaction -## InboundCheckDeposits +## CardReversals Methods: -- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit +- client.simulations.card_reversals.create(\*\*params) -> CardPayment -## CheckDeposits +## CardIncrements Methods: -- client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit -- client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit -- client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit +- client.simulations.card_increments.create(\*\*params) -> CardPayment -## InboundWireTransfers +## CardFuelConfirmations Methods: -- client.simulations.inbound_wire_transfers.create(\*\*params) -> InboundWireTransfer +- client.simulations.card_fuel_confirmations.create(\*\*params) -> CardPayment -## WireTransfers +## CardRefunds Methods: -- client.simulations.wire_transfers.reverse(wire_transfer_id) -> WireTransfer -- client.simulations.wire_transfers.submit(wire_transfer_id) -> WireTransfer +- client.simulations.card_refunds.create(\*\*params) -> Transaction -## InboundWireDrawdownRequests +## CardDisputes Methods: -- client.simulations.inbound_wire_drawdown_requests.create(\*\*params) -> InboundWireDrawdownRequest +- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute -## InboundRealTimePaymentsTransfers +## PhysicalCards Methods: -- client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransfer +- client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard -## InboundFundsHolds +## DigitalWalletTokenRequests Types: ```python -from increase.types.simulations import InboundFundsHoldReleaseResponse +from increase.types.simulations import DigitalWalletTokenRequestCreateResponse ``` Methods: -- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse - -## RealTimePaymentsTransfers - -Methods: - -- client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer +- client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse -## CardAuthorizations +## InboundFundsHolds Types: ```python -from increase.types.simulations import CardAuthorizationCreateResponse +from increase.types.simulations import InboundFundsHoldReleaseResponse ``` Methods: -- client.simulations.card_authorizations.create(\*\*params) -> CardAuthorizationCreateResponse +- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse -## CardSettlements +## AccountTransfers Methods: -- client.simulations.card_settlements.create(\*\*params) -> Transaction +- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer -## CardReversals +## ACHTransfers Methods: -- client.simulations.card_reversals.create(\*\*params) -> CardPayment +- client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer +- client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer +- client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer +- client.simulations.ach_transfers.settle(ach_transfer_id) -> ACHTransfer +- client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer -## CardIncrements +## InboundACHTransfers Methods: -- client.simulations.card_increments.create(\*\*params) -> CardPayment +- client.simulations.inbound_ach_transfers.create(\*\*params) -> InboundACHTransfer -## CardAuthorizationExpirations +## WireTransfers Methods: -- client.simulations.card_authorization_expirations.create(\*\*params) -> CardPayment +- client.simulations.wire_transfers.reverse(wire_transfer_id) -> WireTransfer +- client.simulations.wire_transfers.submit(wire_transfer_id) -> WireTransfer -## CardFuelConfirmations +## InboundWireTransfers Methods: -- client.simulations.card_fuel_confirmations.create(\*\*params) -> CardPayment +- client.simulations.inbound_wire_transfers.create(\*\*params) -> InboundWireTransfer -## CardRefunds +## InboundWireDrawdownRequests Methods: -- client.simulations.card_refunds.create(\*\*params) -> Transaction +- client.simulations.inbound_wire_drawdown_requests.create(\*\*params) -> InboundWireDrawdownRequest -## CardDisputes +## CheckTransfers Methods: -- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute +- client.simulations.check_transfers.mail(check_transfer_id) -> CheckTransfer -## DigitalWalletTokenRequests +## InboundCheckDeposits -Types: +Methods: -```python -from increase.types.simulations import DigitalWalletTokenRequestCreateResponse -``` +- client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit + +## RealTimePaymentsTransfers Methods: -- client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse +- client.simulations.real_time_payments_transfers.complete(real_time_payments_transfer_id, \*\*params) -> RealTimePaymentsTransfer -## PhysicalCards +## InboundRealTimePaymentsTransfers Methods: -- client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard +- client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransfer -## InterestPayments +## CheckDeposits Methods: -- client.simulations.interest_payments.create(\*\*params) -> Transaction +- client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit +- client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit +- client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit -## AccountStatements +## InboundMailItems Methods: -- client.simulations.account_statements.create(\*\*params) -> AccountStatement +- client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem -## Documents +## Programs Methods: -- client.simulations.documents.create(\*\*params) -> Document +- client.simulations.programs.create(\*\*params) -> Program -## InboundMailItems +## AccountStatements Methods: -- client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem +- client.simulations.account_statements.create(\*\*params) -> AccountStatement -## Programs +## Documents Methods: -- client.simulations.programs.create(\*\*params) -> Program +- client.simulations.documents.create(\*\*params) -> Document diff --git a/requirements-dev.lock b/requirements-dev.lock index 5c6873aad..7ce74ad2d 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -16,8 +16,6 @@ anyio==4.4.0 # via increase argcomplete==3.1.2 # via nox -attrs==23.1.0 - # via pytest certifi==2023.7.22 # via httpcore # via httpx @@ -28,8 +26,9 @@ distlib==0.3.7 # via virtualenv distro==1.8.0 # via increase -exceptiongroup==1.1.3 +exceptiongroup==1.2.2 # via anyio + # via pytest filelock==3.12.4 # via virtualenv h11==0.14.0 @@ -60,20 +59,18 @@ packaging==23.2 # via pytest platformdirs==3.11.0 # via virtualenv -pluggy==1.3.0 - # via pytest -py==1.11.0 +pluggy==1.5.0 # via pytest -pydantic==2.7.1 +pydantic==2.9.2 # via increase -pydantic-core==2.18.2 +pydantic-core==2.23.4 # via pydantic pygments==2.18.0 # via rich pyright==1.1.380 -pytest==7.1.1 +pytest==8.3.3 # via pytest-asyncio -pytest-asyncio==0.21.1 +pytest-asyncio==0.24.0 python-dateutil==2.8.2 # via time-machine pytz==2023.3.post1 @@ -90,10 +87,10 @@ sniffio==1.3.0 # via httpx # via increase time-machine==2.9.0 -tomli==2.0.1 +tomli==2.0.2 # via mypy # via pytest -typing-extensions==4.8.0 +typing-extensions==4.12.2 # via anyio # via increase # via mypy diff --git a/requirements.lock b/requirements.lock index daa54a31b..807b908ca 100644 --- a/requirements.lock +++ b/requirements.lock @@ -19,7 +19,7 @@ certifi==2023.7.22 # via httpx distro==1.8.0 # via increase -exceptiongroup==1.1.3 +exceptiongroup==1.2.2 # via anyio h11==0.14.0 # via httpcore @@ -30,15 +30,15 @@ httpx==0.25.2 idna==3.4 # via anyio # via httpx -pydantic==2.7.1 +pydantic==2.9.2 # via increase -pydantic-core==2.18.2 +pydantic-core==2.23.4 # via pydantic sniffio==1.3.0 # via anyio # via httpx # via increase -typing-extensions==4.8.0 +typing-extensions==4.12.2 # via anyio # via increase # via pydantic diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 162a6fbe4..d89920d95 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -133,7 +133,7 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: def model_dump( model: pydantic.BaseModel, *, - exclude: IncEx = None, + exclude: IncEx | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, warnings: bool = True, diff --git a/src/increase/_models.py b/src/increase/_models.py index d386eaa3a..42551b769 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -176,7 +176,7 @@ def __str__(self) -> str: # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836. @classmethod @override - def construct( + def construct( # pyright: ignore[reportIncompatibleMethodOverride] cls: Type[ModelT], _fields_set: set[str] | None = None, **values: object, @@ -248,8 +248,8 @@ def model_dump( self, *, mode: Literal["json", "python"] | str = "python", - include: IncEx = None, - exclude: IncEx = None, + include: IncEx | None = None, + exclude: IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, @@ -303,8 +303,8 @@ def model_dump_json( self, *, indent: int | None = None, - include: IncEx = None, - exclude: IncEx = None, + include: IncEx | None = None, + exclude: IncEx | None = None, by_alias: bool = False, exclude_unset: bool = False, exclude_defaults: bool = False, diff --git a/src/increase/_types.py b/src/increase/_types.py index 9b5ceb2a3..712903111 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -16,7 +16,7 @@ Optional, Sequence, ) -from typing_extensions import Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable +from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable import httpx import pydantic @@ -193,7 +193,9 @@ def get(self, __key: str) -> str | None: ... # Note: copied from Pydantic # https://github.com/pydantic/pydantic/blob/32ea570bf96e84234d2992e1ddf40ab8a565925a/pydantic/main.py#L49 -IncEx: TypeAlias = "set[int] | set[str] | dict[int, Any] | dict[str, Any] | None" +IncEx: TypeAlias = Union[ + Set[int], Set[str], Mapping[int, Union["IncEx", Literal[True]]], Mapping[str, Union["IncEx", Literal[True]]] +] PostParser = Callable[[Any], Any] diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index fb2038bf0..f1f46f9a5 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -226,84 +226,24 @@ ) __all__ = [ - "AccountTransfersResource", - "AsyncAccountTransfersResource", - "AccountTransfersResourceWithRawResponse", - "AsyncAccountTransfersResourceWithRawResponse", - "AccountTransfersResourceWithStreamingResponse", - "AsyncAccountTransfersResourceWithStreamingResponse", - "InboundACHTransfersResource", - "AsyncInboundACHTransfersResource", - "InboundACHTransfersResourceWithRawResponse", - "AsyncInboundACHTransfersResourceWithRawResponse", - "InboundACHTransfersResourceWithStreamingResponse", - "AsyncInboundACHTransfersResourceWithStreamingResponse", - "ACHTransfersResource", - "AsyncACHTransfersResource", - "ACHTransfersResourceWithRawResponse", - "AsyncACHTransfersResourceWithRawResponse", - "ACHTransfersResourceWithStreamingResponse", - "AsyncACHTransfersResourceWithStreamingResponse", - "CheckTransfersResource", - "AsyncCheckTransfersResource", - "CheckTransfersResourceWithRawResponse", - "AsyncCheckTransfersResourceWithRawResponse", - "CheckTransfersResourceWithStreamingResponse", - "AsyncCheckTransfersResourceWithStreamingResponse", - "InboundCheckDepositsResource", - "AsyncInboundCheckDepositsResource", - "InboundCheckDepositsResourceWithRawResponse", - "AsyncInboundCheckDepositsResourceWithRawResponse", - "InboundCheckDepositsResourceWithStreamingResponse", - "AsyncInboundCheckDepositsResourceWithStreamingResponse", - "CheckDepositsResource", - "AsyncCheckDepositsResource", - "CheckDepositsResourceWithRawResponse", - "AsyncCheckDepositsResourceWithRawResponse", - "CheckDepositsResourceWithStreamingResponse", - "AsyncCheckDepositsResourceWithStreamingResponse", - "InboundWireTransfersResource", - "AsyncInboundWireTransfersResource", - "InboundWireTransfersResourceWithRawResponse", - "AsyncInboundWireTransfersResourceWithRawResponse", - "InboundWireTransfersResourceWithStreamingResponse", - "AsyncInboundWireTransfersResourceWithStreamingResponse", - "WireTransfersResource", - "AsyncWireTransfersResource", - "WireTransfersResourceWithRawResponse", - "AsyncWireTransfersResourceWithRawResponse", - "WireTransfersResourceWithStreamingResponse", - "AsyncWireTransfersResourceWithStreamingResponse", - "InboundWireDrawdownRequestsResource", - "AsyncInboundWireDrawdownRequestsResource", - "InboundWireDrawdownRequestsResourceWithRawResponse", - "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", - "InboundWireDrawdownRequestsResourceWithStreamingResponse", - "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", - "InboundRealTimePaymentsTransfersResource", - "AsyncInboundRealTimePaymentsTransfersResource", - "InboundRealTimePaymentsTransfersResourceWithRawResponse", - "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", - "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", - "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", - "InboundFundsHoldsResource", - "AsyncInboundFundsHoldsResource", - "InboundFundsHoldsResourceWithRawResponse", - "AsyncInboundFundsHoldsResourceWithRawResponse", - "InboundFundsHoldsResourceWithStreamingResponse", - "AsyncInboundFundsHoldsResourceWithStreamingResponse", - "RealTimePaymentsTransfersResource", - "AsyncRealTimePaymentsTransfersResource", - "RealTimePaymentsTransfersResourceWithRawResponse", - "AsyncRealTimePaymentsTransfersResourceWithRawResponse", - "RealTimePaymentsTransfersResourceWithStreamingResponse", - "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "InterestPaymentsResource", + "AsyncInterestPaymentsResource", + "InterestPaymentsResourceWithRawResponse", + "AsyncInterestPaymentsResourceWithRawResponse", + "InterestPaymentsResourceWithStreamingResponse", + "AsyncInterestPaymentsResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", "AsyncCardAuthorizationsResourceWithRawResponse", "CardAuthorizationsResourceWithStreamingResponse", "AsyncCardAuthorizationsResourceWithStreamingResponse", + "CardAuthorizationExpirationsResource", + "AsyncCardAuthorizationExpirationsResource", + "CardAuthorizationExpirationsResourceWithRawResponse", + "AsyncCardAuthorizationExpirationsResourceWithRawResponse", + "CardAuthorizationExpirationsResourceWithStreamingResponse", + "AsyncCardAuthorizationExpirationsResourceWithStreamingResponse", "CardSettlementsResource", "AsyncCardSettlementsResource", "CardSettlementsResourceWithRawResponse", @@ -322,12 +262,6 @@ "AsyncCardIncrementsResourceWithRawResponse", "CardIncrementsResourceWithStreamingResponse", "AsyncCardIncrementsResourceWithStreamingResponse", - "CardAuthorizationExpirationsResource", - "AsyncCardAuthorizationExpirationsResource", - "CardAuthorizationExpirationsResourceWithRawResponse", - "AsyncCardAuthorizationExpirationsResourceWithRawResponse", - "CardAuthorizationExpirationsResourceWithStreamingResponse", - "AsyncCardAuthorizationExpirationsResourceWithStreamingResponse", "CardFuelConfirmationsResource", "AsyncCardFuelConfirmationsResource", "CardFuelConfirmationsResourceWithRawResponse", @@ -346,36 +280,90 @@ "AsyncCardDisputesResourceWithRawResponse", "CardDisputesResourceWithStreamingResponse", "AsyncCardDisputesResourceWithStreamingResponse", - "DigitalWalletTokenRequestsResource", - "AsyncDigitalWalletTokenRequestsResource", - "DigitalWalletTokenRequestsResourceWithRawResponse", - "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", - "DigitalWalletTokenRequestsResourceWithStreamingResponse", - "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", "PhysicalCardsResource", "AsyncPhysicalCardsResource", "PhysicalCardsResourceWithRawResponse", "AsyncPhysicalCardsResourceWithRawResponse", "PhysicalCardsResourceWithStreamingResponse", "AsyncPhysicalCardsResourceWithStreamingResponse", - "InterestPaymentsResource", - "AsyncInterestPaymentsResource", - "InterestPaymentsResourceWithRawResponse", - "AsyncInterestPaymentsResourceWithRawResponse", - "InterestPaymentsResourceWithStreamingResponse", - "AsyncInterestPaymentsResourceWithStreamingResponse", - "AccountStatementsResource", - "AsyncAccountStatementsResource", - "AccountStatementsResourceWithRawResponse", - "AsyncAccountStatementsResourceWithRawResponse", - "AccountStatementsResourceWithStreamingResponse", - "AsyncAccountStatementsResourceWithStreamingResponse", - "DocumentsResource", - "AsyncDocumentsResource", - "DocumentsResourceWithRawResponse", - "AsyncDocumentsResourceWithRawResponse", - "DocumentsResourceWithStreamingResponse", - "AsyncDocumentsResourceWithStreamingResponse", + "DigitalWalletTokenRequestsResource", + "AsyncDigitalWalletTokenRequestsResource", + "DigitalWalletTokenRequestsResourceWithRawResponse", + "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", + "DigitalWalletTokenRequestsResourceWithStreamingResponse", + "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", + "InboundFundsHoldsResource", + "AsyncInboundFundsHoldsResource", + "InboundFundsHoldsResourceWithRawResponse", + "AsyncInboundFundsHoldsResourceWithRawResponse", + "InboundFundsHoldsResourceWithStreamingResponse", + "AsyncInboundFundsHoldsResourceWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", + "ACHTransfersResource", + "AsyncACHTransfersResource", + "ACHTransfersResourceWithRawResponse", + "AsyncACHTransfersResourceWithRawResponse", + "ACHTransfersResourceWithStreamingResponse", + "AsyncACHTransfersResourceWithStreamingResponse", + "InboundACHTransfersResource", + "AsyncInboundACHTransfersResource", + "InboundACHTransfersResourceWithRawResponse", + "AsyncInboundACHTransfersResourceWithRawResponse", + "InboundACHTransfersResourceWithStreamingResponse", + "AsyncInboundACHTransfersResourceWithStreamingResponse", + "WireTransfersResource", + "AsyncWireTransfersResource", + "WireTransfersResourceWithRawResponse", + "AsyncWireTransfersResourceWithRawResponse", + "WireTransfersResourceWithStreamingResponse", + "AsyncWireTransfersResourceWithStreamingResponse", + "InboundWireTransfersResource", + "AsyncInboundWireTransfersResource", + "InboundWireTransfersResourceWithRawResponse", + "AsyncInboundWireTransfersResourceWithRawResponse", + "InboundWireTransfersResourceWithStreamingResponse", + "AsyncInboundWireTransfersResourceWithStreamingResponse", + "InboundWireDrawdownRequestsResource", + "AsyncInboundWireDrawdownRequestsResource", + "InboundWireDrawdownRequestsResourceWithRawResponse", + "AsyncInboundWireDrawdownRequestsResourceWithRawResponse", + "InboundWireDrawdownRequestsResourceWithStreamingResponse", + "AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse", + "CheckTransfersResource", + "AsyncCheckTransfersResource", + "CheckTransfersResourceWithRawResponse", + "AsyncCheckTransfersResourceWithRawResponse", + "CheckTransfersResourceWithStreamingResponse", + "AsyncCheckTransfersResourceWithStreamingResponse", + "InboundCheckDepositsResource", + "AsyncInboundCheckDepositsResource", + "InboundCheckDepositsResourceWithRawResponse", + "AsyncInboundCheckDepositsResourceWithRawResponse", + "InboundCheckDepositsResourceWithStreamingResponse", + "AsyncInboundCheckDepositsResourceWithStreamingResponse", + "RealTimePaymentsTransfersResource", + "AsyncRealTimePaymentsTransfersResource", + "RealTimePaymentsTransfersResourceWithRawResponse", + "AsyncRealTimePaymentsTransfersResourceWithRawResponse", + "RealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundRealTimePaymentsTransfersResource", + "AsyncInboundRealTimePaymentsTransfersResource", + "InboundRealTimePaymentsTransfersResourceWithRawResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", + "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "CheckDepositsResource", + "AsyncCheckDepositsResource", + "CheckDepositsResourceWithRawResponse", + "AsyncCheckDepositsResourceWithRawResponse", + "CheckDepositsResourceWithStreamingResponse", + "AsyncCheckDepositsResourceWithStreamingResponse", "InboundMailItemsResource", "AsyncInboundMailItemsResource", "InboundMailItemsResourceWithRawResponse", @@ -388,6 +376,18 @@ "AsyncProgramsResourceWithRawResponse", "ProgramsResourceWithStreamingResponse", "AsyncProgramsResourceWithStreamingResponse", + "AccountStatementsResource", + "AsyncAccountStatementsResource", + "AccountStatementsResourceWithRawResponse", + "AsyncAccountStatementsResourceWithRawResponse", + "AccountStatementsResourceWithStreamingResponse", + "AsyncAccountStatementsResourceWithStreamingResponse", + "DocumentsResource", + "AsyncDocumentsResource", + "DocumentsResourceWithRawResponse", + "AsyncDocumentsResourceWithRawResponse", + "DocumentsResourceWithStreamingResponse", + "AsyncDocumentsResourceWithStreamingResponse", "SimulationsResource", "AsyncSimulationsResource", "SimulationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py index 970d5e51d..9965d1132 100644 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -57,7 +57,7 @@ def create( idempotency_key: str | None = None, ) -> CardPayment: """ - Simulates expiring a card authorization immediately. + Simulates expiring a Card Authorization immediately. Args: card_payment_id: The identifier of the Card Payment to expire. @@ -122,7 +122,7 @@ async def create( idempotency_key: str | None = None, ) -> CardPayment: """ - Simulates expiring a card authorization immediately. + Simulates expiring a Card Authorization immediately. Args: card_payment_id: The identifier of the Card Payment to expire. diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index df5e5bd8c..08e2dff41 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -52,7 +52,7 @@ def release( idempotency_key: str | None = None, ) -> InboundFundsHoldReleaseResponse: """ - This endpoint simulates immediately releasing an inbound funds hold, which might + This endpoint simulates immediately releasing an Inbound Funds Hold, which might be created as a result of e.g., an ACH debit. Args: @@ -118,7 +118,7 @@ async def release( idempotency_key: str | None = None, ) -> InboundFundsHoldReleaseResponse: """ - This endpoint simulates immediately releasing an inbound funds hold, which might + This endpoint simulates immediately releasing an Inbound Funds Hold, which might be created as a result of e.g., an ACH debit. Args: diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index e8c2919ac..fd4ddf639 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -62,10 +62,10 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> InboundRealTimePaymentsTransfer: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. + """ + Simulates an + [Inbound Real-Time Payments Transfer](#inbound-real-time-payments-transfers) to + your account. Real-Time Payments are a beta feature. Args: account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is @@ -156,10 +156,10 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> InboundRealTimePaymentsTransfer: - """Simulates an inbound Real-Time Payments transfer to your account. - - Real-Time - Payments are a beta feature. + """ + Simulates an + [Inbound Real-Time Payments Transfer](#inbound-real-time-payments-transfers) to + your account. Real-Time Payments are a beta feature. Args: account_number_id: The identifier of the Account Number the inbound Real-Time Payments Transfer is diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 8152f1b12..522e79273 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -73,7 +73,7 @@ def create( idempotency_key: str | None = None, ) -> InboundWireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates an [Inbound Wire Transfer](#inbound-wire-transfers) to your account. Args: account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. @@ -219,7 +219,7 @@ async def create( idempotency_key: str | None = None, ) -> InboundWireTransfer: """ - Simulates an inbound Wire Transfer to your account. + Simulates an [Inbound Wire Transfer](#inbound-wire-transfers) to your account. Args: account_number_id: The identifier of the Account Number the inbound Wire Transfer is for. diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 532b2685e..924f76cdd 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -56,11 +56,12 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Program: - """Simulates a program being created in your group. + """Simulates a [Program](#programs) being created in your group. - By default, your group has one - program called Commercial Banking. Note that when your group operates more than - one program, `program_id` is a required field when creating accounts. + By default, your + group has one program called Commercial Banking. Note that when your group + operates more than one program, `program_id` is a required field when creating + accounts. Args: name: The name of the program being added. @@ -121,11 +122,12 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, ) -> Program: - """Simulates a program being created in your group. + """Simulates a [Program](#programs) being created in your group. - By default, your group has one - program called Commercial Banking. Note that when your group operates more than - one program, `program_id` is a required field when creating accounts. + By default, your + group has one program called Commercial Banking. Note that when your group + operates more than one program, `program_id` is a required field when creating + accounts. Args: name: The name of the program being added. diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index ac44ede2e..29cba52bb 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -58,9 +58,10 @@ def complete( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Simulates submission of a Real-Time Payments transfer and handling the response - from the destination financial institution. This transfer must first have a - `status` of `pending_submission`. + Simulates submission of a + [Real-Time Payments Transfer](#real-time-payments-transfers) and handling the + response from the destination financial institution. This transfer must first + have a `status` of `pending_submission`. Args: real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer you wish to complete. @@ -132,9 +133,10 @@ async def complete( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Simulates submission of a Real-Time Payments transfer and handling the response - from the destination financial institution. This transfer must first have a - `status` of `pending_submission`. + Simulates submission of a + [Real-Time Payments Transfer](#real-time-payments-transfers) and handling the + response from the destination financial institution. This transfer must first + have a `status` of `pending_submission`. Args: real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer you wish to complete. diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index ef40bdd3e..7896297e1 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -226,96 +226,104 @@ class SimulationsResource(SyncAPIResource): @cached_property - def account_transfers(self) -> AccountTransfersResource: - return AccountTransfersResource(self._client) + def interest_payments(self) -> InterestPaymentsResource: + return InterestPaymentsResource(self._client) @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResource: - return InboundACHTransfersResource(self._client) + def card_authorizations(self) -> CardAuthorizationsResource: + return CardAuthorizationsResource(self._client) @cached_property - def ach_transfers(self) -> ACHTransfersResource: - return ACHTransfersResource(self._client) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: + return CardAuthorizationExpirationsResource(self._client) @cached_property - def check_transfers(self) -> CheckTransfersResource: - return CheckTransfersResource(self._client) + def card_settlements(self) -> CardSettlementsResource: + return CardSettlementsResource(self._client) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResource: - return InboundCheckDepositsResource(self._client) + def card_reversals(self) -> CardReversalsResource: + return CardReversalsResource(self._client) @cached_property - def check_deposits(self) -> CheckDepositsResource: - return CheckDepositsResource(self._client) + def card_increments(self) -> CardIncrementsResource: + return CardIncrementsResource(self._client) @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResource: - return InboundWireTransfersResource(self._client) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: + return CardFuelConfirmationsResource(self._client) @cached_property - def wire_transfers(self) -> WireTransfersResource: - return WireTransfersResource(self._client) + def card_refunds(self) -> CardRefundsResource: + return CardRefundsResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: - return InboundWireDrawdownRequestsResource(self._client) + def card_disputes(self) -> CardDisputesResource: + return CardDisputesResource(self._client) @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: - return InboundRealTimePaymentsTransfersResource(self._client) + def physical_cards(self) -> PhysicalCardsResource: + return PhysicalCardsResource(self._client) + + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: + return DigitalWalletTokenRequestsResource(self._client) @cached_property def inbound_funds_holds(self) -> InboundFundsHoldsResource: return InboundFundsHoldsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: - return RealTimePaymentsTransfersResource(self._client) + def account_transfers(self) -> AccountTransfersResource: + return AccountTransfersResource(self._client) @cached_property - def card_authorizations(self) -> CardAuthorizationsResource: - return CardAuthorizationsResource(self._client) + def ach_transfers(self) -> ACHTransfersResource: + return ACHTransfersResource(self._client) @cached_property - def card_settlements(self) -> CardSettlementsResource: - return CardSettlementsResource(self._client) + def inbound_ach_transfers(self) -> InboundACHTransfersResource: + return InboundACHTransfersResource(self._client) @cached_property - def card_reversals(self) -> CardReversalsResource: - return CardReversalsResource(self._client) + def wire_transfers(self) -> WireTransfersResource: + return WireTransfersResource(self._client) @cached_property - def card_increments(self) -> CardIncrementsResource: - return CardIncrementsResource(self._client) + def inbound_wire_transfers(self) -> InboundWireTransfersResource: + return InboundWireTransfersResource(self._client) @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: - return CardAuthorizationExpirationsResource(self._client) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: + return InboundWireDrawdownRequestsResource(self._client) @cached_property - def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: - return CardFuelConfirmationsResource(self._client) + def check_transfers(self) -> CheckTransfersResource: + return CheckTransfersResource(self._client) @cached_property - def card_refunds(self) -> CardRefundsResource: - return CardRefundsResource(self._client) + def inbound_check_deposits(self) -> InboundCheckDepositsResource: + return InboundCheckDepositsResource(self._client) @cached_property - def card_disputes(self) -> CardDisputesResource: - return CardDisputesResource(self._client) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: + return RealTimePaymentsTransfersResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: - return DigitalWalletTokenRequestsResource(self._client) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: + return InboundRealTimePaymentsTransfersResource(self._client) @cached_property - def physical_cards(self) -> PhysicalCardsResource: - return PhysicalCardsResource(self._client) + def check_deposits(self) -> CheckDepositsResource: + return CheckDepositsResource(self._client) @cached_property - def interest_payments(self) -> InterestPaymentsResource: - return InterestPaymentsResource(self._client) + def inbound_mail_items(self) -> InboundMailItemsResource: + return InboundMailItemsResource(self._client) + + @cached_property + def programs(self) -> ProgramsResource: + return ProgramsResource(self._client) @cached_property def account_statements(self) -> AccountStatementsResource: @@ -325,14 +333,6 @@ def account_statements(self) -> AccountStatementsResource: def documents(self) -> DocumentsResource: return DocumentsResource(self._client) - @cached_property - def inbound_mail_items(self) -> InboundMailItemsResource: - return InboundMailItemsResource(self._client) - - @cached_property - def programs(self) -> ProgramsResource: - return ProgramsResource(self._client) - @cached_property def with_raw_response(self) -> SimulationsResourceWithRawResponse: """ @@ -355,96 +355,104 @@ def with_streaming_response(self) -> SimulationsResourceWithStreamingResponse: class AsyncSimulationsResource(AsyncAPIResource): @cached_property - def account_transfers(self) -> AsyncAccountTransfersResource: - return AsyncAccountTransfersResource(self._client) + def interest_payments(self) -> AsyncInterestPaymentsResource: + return AsyncInterestPaymentsResource(self._client) @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: - return AsyncInboundACHTransfersResource(self._client) + def card_authorizations(self) -> AsyncCardAuthorizationsResource: + return AsyncCardAuthorizationsResource(self._client) @cached_property - def ach_transfers(self) -> AsyncACHTransfersResource: - return AsyncACHTransfersResource(self._client) + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: + return AsyncCardAuthorizationExpirationsResource(self._client) @cached_property - def check_transfers(self) -> AsyncCheckTransfersResource: - return AsyncCheckTransfersResource(self._client) + def card_settlements(self) -> AsyncCardSettlementsResource: + return AsyncCardSettlementsResource(self._client) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: - return AsyncInboundCheckDepositsResource(self._client) + def card_reversals(self) -> AsyncCardReversalsResource: + return AsyncCardReversalsResource(self._client) @cached_property - def check_deposits(self) -> AsyncCheckDepositsResource: - return AsyncCheckDepositsResource(self._client) + def card_increments(self) -> AsyncCardIncrementsResource: + return AsyncCardIncrementsResource(self._client) @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: - return AsyncInboundWireTransfersResource(self._client) + def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: + return AsyncCardFuelConfirmationsResource(self._client) @cached_property - def wire_transfers(self) -> AsyncWireTransfersResource: - return AsyncWireTransfersResource(self._client) + def card_refunds(self) -> AsyncCardRefundsResource: + return AsyncCardRefundsResource(self._client) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: - return AsyncInboundWireDrawdownRequestsResource(self._client) + def card_disputes(self) -> AsyncCardDisputesResource: + return AsyncCardDisputesResource(self._client) @cached_property - def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: - return AsyncInboundRealTimePaymentsTransfersResource(self._client) + def physical_cards(self) -> AsyncPhysicalCardsResource: + return AsyncPhysicalCardsResource(self._client) + + @cached_property + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResource: + return AsyncDigitalWalletTokenRequestsResource(self._client) @cached_property def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: return AsyncInboundFundsHoldsResource(self._client) @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: - return AsyncRealTimePaymentsTransfersResource(self._client) + def account_transfers(self) -> AsyncAccountTransfersResource: + return AsyncAccountTransfersResource(self._client) @cached_property - def card_authorizations(self) -> AsyncCardAuthorizationsResource: - return AsyncCardAuthorizationsResource(self._client) + def ach_transfers(self) -> AsyncACHTransfersResource: + return AsyncACHTransfersResource(self._client) @cached_property - def card_settlements(self) -> AsyncCardSettlementsResource: - return AsyncCardSettlementsResource(self._client) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: + return AsyncInboundACHTransfersResource(self._client) @cached_property - def card_reversals(self) -> AsyncCardReversalsResource: - return AsyncCardReversalsResource(self._client) + def wire_transfers(self) -> AsyncWireTransfersResource: + return AsyncWireTransfersResource(self._client) @cached_property - def card_increments(self) -> AsyncCardIncrementsResource: - return AsyncCardIncrementsResource(self._client) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: + return AsyncInboundWireTransfersResource(self._client) @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: - return AsyncCardAuthorizationExpirationsResource(self._client) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: + return AsyncInboundWireDrawdownRequestsResource(self._client) @cached_property - def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: - return AsyncCardFuelConfirmationsResource(self._client) + def check_transfers(self) -> AsyncCheckTransfersResource: + return AsyncCheckTransfersResource(self._client) @cached_property - def card_refunds(self) -> AsyncCardRefundsResource: - return AsyncCardRefundsResource(self._client) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: + return AsyncInboundCheckDepositsResource(self._client) @cached_property - def card_disputes(self) -> AsyncCardDisputesResource: - return AsyncCardDisputesResource(self._client) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: + return AsyncRealTimePaymentsTransfersResource(self._client) @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResource: - return AsyncDigitalWalletTokenRequestsResource(self._client) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: + return AsyncInboundRealTimePaymentsTransfersResource(self._client) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsResource: - return AsyncPhysicalCardsResource(self._client) + def check_deposits(self) -> AsyncCheckDepositsResource: + return AsyncCheckDepositsResource(self._client) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResource: - return AsyncInterestPaymentsResource(self._client) + def inbound_mail_items(self) -> AsyncInboundMailItemsResource: + return AsyncInboundMailItemsResource(self._client) + + @cached_property + def programs(self) -> AsyncProgramsResource: + return AsyncProgramsResource(self._client) @cached_property def account_statements(self) -> AsyncAccountStatementsResource: @@ -454,14 +462,6 @@ def account_statements(self) -> AsyncAccountStatementsResource: def documents(self) -> AsyncDocumentsResource: return AsyncDocumentsResource(self._client) - @cached_property - def inbound_mail_items(self) -> AsyncInboundMailItemsResource: - return AsyncInboundMailItemsResource(self._client) - - @cached_property - def programs(self) -> AsyncProgramsResource: - return AsyncProgramsResource(self._client) - @cached_property def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: """ @@ -487,98 +487,106 @@ def __init__(self, simulations: SimulationsResource) -> None: self._simulations = simulations @cached_property - def account_transfers(self) -> AccountTransfersResourceWithRawResponse: - return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) + def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: + return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithRawResponse: - return InboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) + def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: + return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: - return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: + return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) @cached_property - def check_transfers(self) -> CheckTransfersResourceWithRawResponse: - return CheckTransfersResourceWithRawResponse(self._simulations.check_transfers) + def card_settlements(self) -> CardSettlementsResourceWithRawResponse: + return CardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: - return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) + def card_reversals(self) -> CardReversalsResourceWithRawResponse: + return CardReversalsResourceWithRawResponse(self._simulations.card_reversals) @cached_property - def check_deposits(self) -> CheckDepositsResourceWithRawResponse: - return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) + def card_increments(self) -> CardIncrementsResourceWithRawResponse: + return CardIncrementsResourceWithRawResponse(self._simulations.card_increments) @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: - return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) + def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawResponse: + return CardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) @cached_property - def wire_transfers(self) -> WireTransfersResourceWithRawResponse: - return WireTransfersResourceWithRawResponse(self._simulations.wire_transfers) + def card_refunds(self) -> CardRefundsResourceWithRawResponse: + return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: - return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def card_disputes(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: - return InboundRealTimePaymentsTransfersResourceWithRawResponse( - self._simulations.inbound_real_time_payments_transfers - ) + def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: + return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + + @cached_property + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: + return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: - return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) + def account_transfers(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: - return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) + def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: + return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def card_settlements(self) -> CardSettlementsResourceWithRawResponse: - return CardSettlementsResourceWithRawResponse(self._simulations.card_settlements) + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithRawResponse: + return InboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) @cached_property - def card_reversals(self) -> CardReversalsResourceWithRawResponse: - return CardReversalsResourceWithRawResponse(self._simulations.card_reversals) + def wire_transfers(self) -> WireTransfersResourceWithRawResponse: + return WireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def card_increments(self) -> CardIncrementsResourceWithRawResponse: - return CardIncrementsResourceWithRawResponse(self._simulations.card_increments) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: + return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: - return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: + return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawResponse: - return CardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) + def check_transfers(self) -> CheckTransfersResourceWithRawResponse: + return CheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def card_refunds(self) -> CardRefundsResourceWithRawResponse: - return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithRawResponse: + return InboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def card_disputes(self) -> CardDisputesResourceWithRawResponse: - return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithRawResponse: + return RealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: - return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: + return InboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: - return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) + def check_deposits(self) -> CheckDepositsResourceWithRawResponse: + return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: - return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: + return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + + @cached_property + def programs(self) -> ProgramsResourceWithRawResponse: + return ProgramsResourceWithRawResponse(self._simulations.programs) @cached_property def account_statements(self) -> AccountStatementsResourceWithRawResponse: @@ -588,73 +596,25 @@ def account_statements(self) -> AccountStatementsResourceWithRawResponse: def documents(self) -> DocumentsResourceWithRawResponse: return DocumentsResourceWithRawResponse(self._simulations.documents) - @cached_property - def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: - return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) - - @cached_property - def programs(self) -> ProgramsResourceWithRawResponse: - return ProgramsResourceWithRawResponse(self._simulations.programs) - class AsyncSimulationsResourceWithRawResponse: def __init__(self, simulations: AsyncSimulationsResource) -> None: self._simulations = simulations @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: - return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) - - @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithRawResponse: - return AsyncInboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) - - @cached_property - def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: - return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) - - @cached_property - def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: - return AsyncCheckTransfersResourceWithRawResponse(self._simulations.check_transfers) - - @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: - return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) - - @cached_property - def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: - return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) - - @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: - return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) - - @cached_property - def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: - return AsyncWireTransfersResourceWithRawResponse(self._simulations.wire_transfers) + def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: + return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: - return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) + def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: + return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @cached_property - def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( - self._simulations.inbound_real_time_payments_transfers + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: + return AsyncCardAuthorizationExpirationsResourceWithRawResponse( + self._simulations.card_authorization_expirations ) - @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: - return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) - - @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: - return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) - - @cached_property - def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: - return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) - @cached_property def card_settlements(self) -> AsyncCardSettlementsResourceWithRawResponse: return AsyncCardSettlementsResourceWithRawResponse(self._simulations.card_settlements) @@ -667,12 +627,6 @@ def card_reversals(self) -> AsyncCardReversalsResourceWithRawResponse: def card_increments(self) -> AsyncCardIncrementsResourceWithRawResponse: return AsyncCardIncrementsResourceWithRawResponse(self._simulations.card_increments) - @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: - return AsyncCardAuthorizationExpirationsResourceWithRawResponse( - self._simulations.card_authorization_expirations - ) - @cached_property def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: return AsyncCardFuelConfirmationsResourceWithRawResponse(self._simulations.card_fuel_confirmations) @@ -685,95 +639,99 @@ def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) - @cached_property - def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: - return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) - @cached_property def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: - return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: + return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: - return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) @cached_property - def documents(self) -> AsyncDocumentsResourceWithRawResponse: - return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) @cached_property - def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: - return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: + return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @cached_property - def programs(self) -> AsyncProgramsResourceWithRawResponse: - return AsyncProgramsResourceWithRawResponse(self._simulations.programs) - + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithRawResponse: + return AsyncInboundACHTransfersResourceWithRawResponse(self._simulations.inbound_ach_transfers) -class SimulationsResourceWithStreamingResponse: - def __init__(self, simulations: SimulationsResource) -> None: - self._simulations = simulations + @cached_property + def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: + return AsyncWireTransfersResourceWithRawResponse(self._simulations.wire_transfers) @cached_property - def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: - return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: + return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) @cached_property - def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithStreamingResponse: - return InboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @cached_property - def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: - return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) + def check_transfers(self) -> AsyncCheckTransfersResourceWithRawResponse: + return AsyncCheckTransfersResourceWithRawResponse(self._simulations.check_transfers) @cached_property - def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: - return CheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: + return AsyncInboundCheckDepositsResourceWithRawResponse(self._simulations.inbound_check_deposits) @cached_property - def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: - return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._simulations.real_time_payments_transfers) @cached_property - def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: - return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: - return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: + return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @cached_property - def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: - return WireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) + def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: + return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) @cached_property - def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: - return InboundWireDrawdownRequestsResourceWithStreamingResponse( - self._simulations.inbound_wire_drawdown_requests - ) + def programs(self) -> AsyncProgramsResourceWithRawResponse: + return AsyncProgramsResourceWithRawResponse(self._simulations.programs) @cached_property - def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.inbound_real_time_payments_transfers - ) + def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: + return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: - return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def documents(self) -> AsyncDocumentsResourceWithRawResponse: + return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + + +class SimulationsResourceWithStreamingResponse: + def __init__(self, simulations: SimulationsResource) -> None: + self._simulations = simulations @cached_property - def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: - return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) + def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: + return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + @cached_property + def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: + return CardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations + ) + @cached_property def card_settlements(self) -> CardSettlementsResourceWithStreamingResponse: return CardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @@ -786,12 +744,6 @@ def card_reversals(self) -> CardReversalsResourceWithStreamingResponse: def card_increments(self) -> CardIncrementsResourceWithStreamingResponse: return CardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) - @cached_property - def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: - return CardAuthorizationExpirationsResourceWithStreamingResponse( - self._simulations.card_authorization_expirations - ) - @cached_property def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingResponse: return CardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) @@ -804,99 +756,101 @@ def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) - @cached_property - def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: - return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) - @cached_property def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) @cached_property - def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: - return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWithStreamingResponse: + return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) @cached_property - def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: - return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: + return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def documents(self) -> DocumentsResourceWithStreamingResponse: - return DocumentsResourceWithStreamingResponse(self._simulations.documents) + def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) @cached_property - def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: - return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: + return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def programs(self) -> ProgramsResourceWithStreamingResponse: - return ProgramsResourceWithStreamingResponse(self._simulations.programs) - + def inbound_ach_transfers(self) -> InboundACHTransfersResourceWithStreamingResponse: + return InboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) -class AsyncSimulationsResourceWithStreamingResponse: - def __init__(self, simulations: AsyncSimulationsResource) -> None: - self._simulations = simulations + @cached_property + def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: + return WireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: - return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: + return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) @cached_property - def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: - return AsyncInboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: + return InboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) @cached_property - def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: - return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) + def check_transfers(self) -> CheckTransfersResourceWithStreamingResponse: + return CheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) @cached_property - def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: - return AsyncCheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) + def inbound_check_deposits(self) -> InboundCheckDepositsResourceWithStreamingResponse: + return InboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) @cached_property - def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: - return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResourceWithStreamingResponse: + return RealTimePaymentsTransfersResourceWithStreamingResponse(self._simulations.real_time_payments_transfers) @cached_property - def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: - return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) @cached_property - def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: - return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: + return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property - def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: - return AsyncWireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) + def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: + return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) @cached_property - def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: - return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - self._simulations.inbound_wire_drawdown_requests - ) + def programs(self) -> ProgramsResourceWithStreamingResponse: + return ProgramsResourceWithStreamingResponse(self._simulations.programs) @cached_property - def inbound_real_time_payments_transfers( - self, - ) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.inbound_real_time_payments_transfers - ) + def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: + return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def documents(self) -> DocumentsResourceWithStreamingResponse: + return DocumentsResourceWithStreamingResponse(self._simulations.documents) + + +class AsyncSimulationsResourceWithStreamingResponse: + def __init__(self, simulations: AsyncSimulationsResource) -> None: + self._simulations = simulations @cached_property - def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: - return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - self._simulations.real_time_payments_transfers - ) + def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: + return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + @cached_property + def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: + return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( + self._simulations.card_authorization_expirations + ) + @cached_property def card_settlements(self) -> AsyncCardSettlementsResourceWithStreamingResponse: return AsyncCardSettlementsResourceWithStreamingResponse(self._simulations.card_settlements) @@ -909,12 +863,6 @@ def card_reversals(self) -> AsyncCardReversalsResourceWithStreamingResponse: def card_increments(self) -> AsyncCardIncrementsResourceWithStreamingResponse: return AsyncCardIncrementsResourceWithStreamingResponse(self._simulations.card_increments) - @cached_property - def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: - return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( - self._simulations.card_authorization_expirations - ) - @cached_property def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStreamingResponse: return AsyncCardFuelConfirmationsResourceWithStreamingResponse(self._simulations.card_fuel_confirmations) @@ -927,6 +875,10 @@ def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + @cached_property def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse: return AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse( @@ -934,20 +886,60 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour ) @cached_property - def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: - return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) + def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) @cached_property - def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: - return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) @cached_property - def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: - return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: + return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @cached_property - def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: - return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResourceWithStreamingResponse: + return AsyncInboundACHTransfersResourceWithStreamingResponse(self._simulations.inbound_ach_transfers) + + @cached_property + def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: + return AsyncWireTransfersResourceWithStreamingResponse(self._simulations.wire_transfers) + + @cached_property + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: + return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + + @cached_property + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + self._simulations.inbound_wire_drawdown_requests + ) + + @cached_property + def check_transfers(self) -> AsyncCheckTransfersResourceWithStreamingResponse: + return AsyncCheckTransfersResourceWithStreamingResponse(self._simulations.check_transfers) + + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResourceWithStreamingResponse: + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._simulations.inbound_check_deposits) + + @cached_property + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.real_time_payments_transfers + ) + + @cached_property + def inbound_real_time_payments_transfers( + self, + ) -> AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._simulations.inbound_real_time_payments_transfers + ) + + @cached_property + def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: + return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @cached_property def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: @@ -956,3 +948,11 @@ def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingRespon @cached_property def programs(self) -> AsyncProgramsResourceWithStreamingResponse: return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: + return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) + + @cached_property + def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: + return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) diff --git a/tests/conftest.py b/tests/conftest.py index 120908a4c..b06f8b0f3 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,11 +1,11 @@ from __future__ import annotations import os -import asyncio import logging from typing import TYPE_CHECKING, Iterator, AsyncIterator import pytest +from pytest_asyncio import is_async_test from increase import Increase, AsyncIncrease @@ -17,11 +17,13 @@ logging.getLogger("increase").setLevel(logging.DEBUG) -@pytest.fixture(scope="session") -def event_loop() -> Iterator[asyncio.AbstractEventLoop]: - loop = asyncio.new_event_loop() - yield loop - loop.close() +# automatically add `pytest.mark.asyncio()` to all of our async tests +# so we don't have to add that boilerplate everywhere +def pytest_collection_modifyitems(items: list[pytest.Function]) -> None: + pytest_asyncio_tests = (item for item in items if is_async_test(item)) + session_scope_marker = pytest.mark.asyncio(loop_scope="session") + for async_test in pytest_asyncio_tests: + async_test.add_marker(session_scope_marker, append=False) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") From c3d63723ad53d69bbe1d172faf154eb2810b502d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 31 Oct 2024 14:43:23 +0000 Subject: [PATCH 0293/1325] chore(internal): version bump (#788) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e205138b1..2b1627bc5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.147.0" + ".": "0.148.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f3714d613..8b7735311 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.147.0" +version = "0.148.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e4c912de5..add9cd836 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.147.0" # x-release-please-version +__version__ = "0.148.0" # x-release-please-version From 885be8fd3a3e9a79ea1d61c665587b44b7508182 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Thu, 31 Oct 2024 18:44:40 +0000 Subject: [PATCH 0294/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2c1b1ffae..dd9a37262 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd81ce0566663d7711578e3ebbfba3978abe83b0167f445286f4ad484489040c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5cac34719369fdcf6fd6ae717672e92bb659751bf45db10dd213e9de739de0ad.yml From 74da00df451a020850e7b0cf9658f5bc0fa8b094 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Fri, 1 Nov 2024 03:52:36 +0000 Subject: [PATCH 0295/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index dd9a37262..48f5eb49c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5cac34719369fdcf6fd6ae717672e92bb659751bf45db10dd213e9de739de0ad.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2a3bb7ad527e8803a07041922c3bb29a440e68eb322404a3a94a0bed37d55228.yml From 1a733d21a0f7ae9a1793491ebc688fcc9874e36a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:40:44 +0000 Subject: [PATCH 0296/1325] feat(api): api update (#789) --- .stats.yml | 2 +- requirements-dev.lock | 2 +- src/increase/_compat.py | 6 +- src/increase/_models.py | 9 ++- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_transform.py | 9 ++- src/increase/_utils/_utils.py | 17 ++++ src/increase/types/card_payment.py | 93 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 31 ++++++++ src/increase/types/pending_transaction.py | 31 ++++++++ src/increase/types/real_time_decision.py | 31 ++++++++ tests/test_models.py | 21 ++--- tests/test_transform.py | 15 ++++ 13 files changed, 245 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index 48f5eb49c..4f6a09711 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2a3bb7ad527e8803a07041922c3bb29a440e68eb322404a3a94a0bed37d55228.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d1c63d06081b5c8ecec857fcac332e235f4471962816b6e4466d3cd3f740616f.yml diff --git a/requirements-dev.lock b/requirements-dev.lock index 7ce74ad2d..30136a89c 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -48,7 +48,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.11.2 +mypy==1.13.0 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 diff --git a/src/increase/_compat.py b/src/increase/_compat.py index d89920d95..4794129c4 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self +from typing_extensions import Self, Literal import pydantic from pydantic.fields import FieldInfo @@ -137,9 +137,11 @@ def model_dump( exclude_unset: bool = False, exclude_defaults: bool = False, warnings: bool = True, + mode: Literal["json", "python"] = "python", ) -> dict[str, Any]: - if PYDANTIC_V2: + if PYDANTIC_V2 or hasattr(model, "model_dump"): return model.model_dump( + mode=mode, exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, diff --git a/src/increase/_models.py b/src/increase/_models.py index 42551b769..6cb469e21 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -37,6 +37,7 @@ PropertyInfo, is_list, is_given, + json_safe, lru_cache, is_mapping, parse_date, @@ -279,8 +280,8 @@ def model_dump( Returns: A dictionary representation of the model. """ - if mode != "python": - raise ValueError("mode is only supported in Pydantic v2") + if mode not in {"json", "python"}: + raise ValueError("mode must be either 'json' or 'python'") if round_trip != False: raise ValueError("round_trip is only supported in Pydantic v2") if warnings != True: @@ -289,7 +290,7 @@ def model_dump( raise ValueError("context is only supported in Pydantic v2") if serialize_as_any != False: raise ValueError("serialize_as_any is only supported in Pydantic v2") - return super().dict( # pyright: ignore[reportDeprecated] + dumped = super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, by_alias=by_alias, @@ -298,6 +299,8 @@ def model_dump( exclude_none=exclude_none, ) + return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped + @override def model_dump_json( self, diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index 3efe66c8e..a7cff3c09 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -6,6 +6,7 @@ is_list as is_list, is_given as is_given, is_tuple as is_tuple, + json_safe as json_safe, lru_cache as lru_cache, is_mapping as is_mapping, is_tuple_t as is_tuple_t, diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index 47e262a51..d7c05345d 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -173,6 +173,11 @@ def _transform_recursive( # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) ): + # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually + # intended as an iterable, so we don't transform it. + if isinstance(data, dict): + return cast(object, data) + inner_type = extract_type_arg(stripped_type, 0) return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data] @@ -186,7 +191,7 @@ def _transform_recursive( return data if isinstance(data, pydantic.BaseModel): - return model_dump(data, exclude_unset=True) + return model_dump(data, exclude_unset=True, mode="json") annotated_type = _get_annotated_type(annotation) if annotated_type is None: @@ -324,7 +329,7 @@ async def _async_transform_recursive( return data if isinstance(data, pydantic.BaseModel): - return model_dump(data, exclude_unset=True) + return model_dump(data, exclude_unset=True, mode="json") annotated_type = _get_annotated_type(annotation) if annotated_type is None: diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 0bba17caa..e5811bba4 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -16,6 +16,7 @@ overload, ) from pathlib import Path +from datetime import date, datetime from typing_extensions import TypeGuard import sniffio @@ -395,3 +396,19 @@ def lru_cache(*, maxsize: int | None = 128) -> Callable[[CallableT], CallableT]: maxsize=maxsize, ) return cast(Any, wrapper) # type: ignore[no-any-return] + + +def json_safe(data: object) -> object: + """Translates a mapping / sequence recursively in the same fashion + as `pydantic` v2's `model_dump(mode="json")`. + """ + if is_mapping(data): + return {json_safe(key): json_safe(value) for key, value in data.items()} + + if is_iterable(data) and not isinstance(data, (str, bytes, bytearray)): + return [json_safe(item) for item in data] + + if isinstance(data, (datetime, date)): + return data.isoformat() + + return data diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 879042243..b7dbce040 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -143,6 +143,37 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class ElementCardAuthorizationNetworkDetails(BaseModel): category: Literal["visa"] @@ -519,6 +550,37 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class ElementCardDeclineNetworkDetails(BaseModel): category: Literal["visa"] @@ -2236,6 +2298,37 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class ElementCardValidationNetworkDetails(BaseModel): category: Literal["visa"] diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 5acf6cc7d..4c2cfb63a 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -193,6 +193,37 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class SourceCardDeclineNetworkDetails(BaseModel): category: Literal["visa"] diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index f22f9d6f3..206f0011f 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -140,6 +140,37 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class SourceCardAuthorizationNetworkDetails(BaseModel): category: Literal["visa"] diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 895d5f605..b74077ff2 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -155,6 +155,37 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): verification value """ + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `other` - An unspecific reason for stand-in processing. + """ + class CardAuthorizationNetworkDetails(BaseModel): category: Literal["visa"] diff --git a/tests/test_models.py b/tests/test_models.py index 7ae584363..adbf5f939 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -520,19 +520,15 @@ class Model(BaseModel): assert m3.to_dict(exclude_none=True) == {} assert m3.to_dict(exclude_defaults=True) == {} - if PYDANTIC_V2: - - class Model2(BaseModel): - created_at: datetime + class Model2(BaseModel): + created_at: datetime - time_str = "2024-03-21T11:39:01.275859" - m4 = Model2.construct(created_at=time_str) - assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} - assert m4.to_dict(mode="json") == {"created_at": time_str} - else: - with pytest.raises(ValueError, match="mode is only supported in Pydantic v2"): - m.to_dict(mode="json") + time_str = "2024-03-21T11:39:01.275859" + m4 = Model2.construct(created_at=time_str) + assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} + assert m4.to_dict(mode="json") == {"created_at": time_str} + if not PYDANTIC_V2: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_dict(warnings=False) @@ -558,9 +554,6 @@ class Model(BaseModel): assert m3.model_dump(exclude_none=True) == {} if not PYDANTIC_V2: - with pytest.raises(ValueError, match="mode is only supported in Pydantic v2"): - m.model_dump(mode="json") - with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump(round_trip=True) diff --git a/tests/test_transform.py b/tests/test_transform.py index e04aa1fe6..1f0743ce0 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -177,17 +177,32 @@ class DateDict(TypedDict, total=False): foo: Annotated[date, PropertyInfo(format="iso8601")] +class DatetimeModel(BaseModel): + foo: datetime + + +class DateModel(BaseModel): + foo: Optional[date] + + @parametrize @pytest.mark.asyncio async def test_iso8601_format(use_async: bool) -> None: dt = datetime.fromisoformat("2023-02-23T14:16:36.337692+00:00") + tz = "Z" if PYDANTIC_V2 else "+00:00" assert await transform({"foo": dt}, DatetimeDict, use_async) == {"foo": "2023-02-23T14:16:36.337692+00:00"} # type: ignore[comparison-overlap] + assert await transform(DatetimeModel(foo=dt), Any, use_async) == {"foo": "2023-02-23T14:16:36.337692" + tz} # type: ignore[comparison-overlap] dt = dt.replace(tzinfo=None) assert await transform({"foo": dt}, DatetimeDict, use_async) == {"foo": "2023-02-23T14:16:36.337692"} # type: ignore[comparison-overlap] + assert await transform(DatetimeModel(foo=dt), Any, use_async) == {"foo": "2023-02-23T14:16:36.337692"} # type: ignore[comparison-overlap] assert await transform({"foo": None}, DateDict, use_async) == {"foo": None} # type: ignore[comparison-overlap] + assert await transform(DateModel(foo=None), Any, use_async) == {"foo": None} # type: ignore assert await transform({"foo": date.fromisoformat("2023-02-23")}, DateDict, use_async) == {"foo": "2023-02-23"} # type: ignore[comparison-overlap] + assert await transform(DateModel(foo=date.fromisoformat("2023-02-23")), DateDict, use_async) == { + "foo": "2023-02-23" + } # type: ignore[comparison-overlap] @parametrize From dfe2a3dc566f9a1fd0b296b41bd568c3ac64df44 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 Nov 2024 16:42:52 +0000 Subject: [PATCH 0297/1325] chore(internal): version bump (#791) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b1627bc5..023707a7c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.148.0" + ".": "0.149.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8b7735311..4f333d70f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.148.0" +version = "0.149.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index add9cd836..0f8047328 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.148.0" # x-release-please-version +__version__ = "0.149.0" # x-release-please-version From 65d50d9757429f35a7003da0f4ca6e29263577fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:10:38 +0000 Subject: [PATCH 0298/1325] feat(api): api update (#792) --- .stats.yml | 2 +- README.md | 4 ++-- pyproject.toml | 5 ++--- src/increase/types/inbound_check_deposit.py | 4 +++- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f6a09711..2506ce30b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d1c63d06081b5c8ecec857fcac332e235f4471962816b6e4466d3cd3f740616f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-586f9c0ac14d8018b5664ba7f2a10c3838087238ca1880fe074e9234e37ceea6.yml diff --git a/README.md b/README.md index b2911bcc0..ba0141a78 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ [![PyPI version](https://img.shields.io/pypi/v/increase.svg)](https://pypi.org/project/increase/) -The Increase Python library provides convenient access to the Increase REST API from any Python 3.7+ +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, and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx). @@ -438,7 +438,7 @@ print(increase.__version__) ## Requirements -Python 3.7 or higher. +Python 3.8 or higher. ## Contributing diff --git a/pyproject.toml b/pyproject.toml index 4f333d70f..ce8ee4c2b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -16,11 +16,10 @@ dependencies = [ "sniffio", "cached-property; python_version < '3.8'", ] -requires-python = ">= 3.7" +requires-python = ">= 3.8" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", @@ -139,7 +138,7 @@ filterwarnings = [ # there are a couple of flags that are still disabled by # default in strict mode as they are experimental and niche. typeCheckingMode = "strict" -pythonVersion = "3.7" +pythonVersion = "3.8" exclude = [ "_dev", diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 00bc0ea4a..6d1bb6fa5 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,13 +16,15 @@ class Adjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return", "wrong_payee_credit"] + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving institution has responded with a Late Return Claim. - `wrong_payee_credit` - The check was deposited to the wrong payee and the depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. """ transaction_id: str From d31488b4f114a8d6cb9d8cee6f13abca62266d71 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 Nov 2024 22:12:24 +0000 Subject: [PATCH 0299/1325] chore(internal): version bump (#794) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 023707a7c..b56d745d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.149.0" + ".": "0.150.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ce8ee4c2b..d1be5867a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.149.0" +version = "0.150.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0f8047328..a4f14db50 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.149.0" # x-release-please-version +__version__ = "0.150.0" # x-release-please-version From 720a2f19a949eea348871ad6908dd692b3ae3e21 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 19:06:33 +0000 Subject: [PATCH 0300/1325] chore: rebuild project due to codegen change (#795) --- tests/test_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 951e3382b..98d80853f 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -734,7 +734,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], - [-1100, "", 7.8], # test large number potentially overflowing + [-1100, "", 8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) @@ -1568,7 +1568,7 @@ class Model(BaseModel): [3, "", 0.5], [2, "", 0.5 * 2.0], [1, "", 0.5 * 4.0], - [-1100, "", 7.8], # test large number potentially overflowing + [-1100, "", 8], # test large number potentially overflowing ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) From e7fdbc37cb4750107e177448f596cd2e0721a9d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Nov 2024 23:08:28 +0000 Subject: [PATCH 0301/1325] chore: rebuild project due to codegen change (#797) --- .stats.yml | 2 +- .../resources/simulations/card_disputes.py | 8 ++++++-- src/increase/types/card_dispute.py | 4 +++- .../types/card_dispute_list_params.py | 2 +- .../simulations/card_dispute_action_params.py | 4 +++- .../simulations/test_card_disputes.py | 20 +++++++++---------- tests/api_resources/test_card_disputes.py | 4 ++-- 7 files changed, 26 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2506ce30b..af3caaa4e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-586f9c0ac14d8018b5664ba7f2a10c3838087238ca1880fe074e9234e37ceea6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b0e4d84104c5ecacb5abc28a2902ca45a7406ea1981463f625aecfd447b330ee.yml diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 139de12e7..2adbb4002 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -50,7 +50,7 @@ def action( self, card_dispute_id: str, *, - status: Literal["accepted", "rejected", "lost", "won"], + status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"], explanation: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -71,6 +71,8 @@ def action( status: The status to move the dispute to. + - `pending_user_information` - Increase has requested more information related + to the Card Dispute from you. - `accepted` - The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome. @@ -137,7 +139,7 @@ async def action( self, card_dispute_id: str, *, - status: Literal["accepted", "rejected", "lost", "won"], + status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"], explanation: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -158,6 +160,8 @@ async def action( status: The status to move the dispute to. + - `pending_user_information` - Increase has requested more information related + to the Card Dispute from you. - `accepted` - The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome. diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 9b406a888..249bb0d83 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -116,10 +116,12 @@ class CardDispute(BaseModel): unsuccessful dispute. """ - status: Literal["pending_reviewing", "accepted", "rejected", "lost", "won"] + status: Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"] """The results of the Dispute investigation. - `pending_reviewing` - The Card Dispute is pending review. + - `pending_user_information` - Increase has requested more information related + to the Card Dispute from you. - `accepted` - The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome. diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py index 8901f8d42..73e384bd2 100644 --- a/src/increase/types/card_dispute_list_params.py +++ b/src/increase/types/card_dispute_list_params.py @@ -63,7 +63,7 @@ class CreatedAt(TypedDict, total=False): _StatusReservedKeywords = TypedDict( "_StatusReservedKeywords", { - "in": List[Literal["pending_reviewing", "accepted", "rejected", "lost", "won"]], + "in": List[Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"]], }, total=False, ) diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py index 4c7375f24..eaf7cbedc 100644 --- a/src/increase/types/simulations/card_dispute_action_params.py +++ b/src/increase/types/simulations/card_dispute_action_params.py @@ -8,9 +8,11 @@ class CardDisputeActionParams(TypedDict, total=False): - status: Required[Literal["accepted", "rejected", "lost", "won"]] + status: Required[Literal["pending_user_information", "accepted", "rejected", "lost", "won"]] """The status to move the dispute to. + - `pending_user_information` - Increase has requested more information related + to the Card Dispute from you. - `accepted` - The Card Dispute has been accepted and your funds have been returned. The card dispute will eventually transition into `won` or `lost` depending on the outcome. diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index 25d1d3f67..b7b4e2630 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -21,7 +21,7 @@ class TestCardDisputes: def test_method_action(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -29,7 +29,7 @@ def test_method_action(self, client: Increase) -> None: def test_method_action_with_all_params(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -38,7 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: def test_raw_response_action(self, client: Increase) -> None: response = client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_action(self, client: Increase) -> None: def test_streaming_response_action(self, client: Increase) -> None: with client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_path_params_action(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="accepted", + status="pending_user_information", ) @@ -76,7 +76,7 @@ class TestAsyncCardDisputes: async def test_method_action(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -84,7 +84,7 @@ async def test_method_action(self, async_client: AsyncIncrease) -> None: async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -93,7 +93,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) assert response.is_closed is True @@ -105,7 +105,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="accepted", + status="pending_user_information", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,5 +120,5 @@ async def test_path_params_action(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="accepted", + status="pending_user_information", ) diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index a8ff27e74..471608479 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_reviewing", "accepted", "rejected"]}, + status={"in": ["pending_reviewing", "pending_user_information", "accepted"]}, ) assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @@ -243,7 +243,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_reviewing", "accepted", "rejected"]}, + status={"in": ["pending_reviewing", "pending_user_information", "accepted"]}, ) assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) From 58cd5182a93f605ed393c7a851399208566eed49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 04:56:01 +0000 Subject: [PATCH 0302/1325] feat(api): api update (#798) --- .stats.yml | 2 +- .../simulations/card_authorizations.py | 10 ++++++++ src/increase/types/card_payment.py | 24 +++++++++++++++++++ src/increase/types/declined_transaction.py | 6 +++++ src/increase/types/pending_transaction.py | 6 +++++ src/increase/types/real_time_decision.py | 6 +++++ .../card_authorization_create_params.py | 6 +++++ .../simulations/test_card_authorizations.py | 2 ++ 8 files changed, 61 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index af3caaa4e..5bdcebc58 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b0e4d84104c5ecacb5abc28a2902ca45a7406ea1981463f625aecfd447b330ee.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7bb6e334b298eabe597d7b87ffa9ace8fe16b38501ec6bcbfc3c6ea3a34c3435.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 15d8099d9..9d58bb093 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -79,6 +79,7 @@ def create( merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, + terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -160,6 +161,9 @@ def create( physical_card_id: The identifier of the Physical Card to be authorized. + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -187,6 +191,7 @@ def create( "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, + "terminal_id": terminal_id, }, card_authorization_create_params.CardAuthorizationCreateParams, ), @@ -254,6 +259,7 @@ async def create( merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, + terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -335,6 +341,9 @@ async def create( physical_card_id: The identifier of the Physical Card to be authorized. + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -362,6 +371,7 @@ async def create( "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, "physical_card_id": physical_card_id, + "terminal_id": terminal_id, }, card_authorization_create_params.CardAuthorizationCreateParams, ), diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index b7dbce040..d69a2b97a 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -419,6 +419,12 @@ class ElementCardAuthorization(BaseModel): transaction. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + type: Literal["card_authorization"] """A constant representing the object's type. @@ -865,6 +871,12 @@ class ElementCardDecline(BaseModel): reach out to support@increase.com for more information. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + verification: ElementCardDeclineVerification """Fields related to verification of cardholder-provided values.""" @@ -1667,6 +1679,12 @@ class ElementCardReversal(BaseModel): - `partial_reversal` - The Card Reversal was a partial reversal, for any reason. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + type: Literal["card_reversal"] """A constant representing the object's type. @@ -2518,6 +2536,12 @@ class ElementCardValidation(BaseModel): transaction. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + type: Literal["card_validation"] """A constant representing the object's type. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 4c2cfb63a..c4390c736 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -508,6 +508,12 @@ class SourceCardDecline(BaseModel): reach out to support@increase.com for more information. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + verification: SourceCardDeclineVerification """Fields related to verification of cardholder-provided values.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 206f0011f..59ac2e6e8 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -416,6 +416,12 @@ class SourceCardAuthorization(BaseModel): transaction. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + type: Literal["card_authorization"] """A constant representing the object's type. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index b74077ff2..96147179e 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -441,6 +441,12 @@ class CardAuthorization(BaseModel): transaction will be settled in. """ + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + upcoming_card_payment_id: str """The identifier of the Card Payment this authorization will belong to. diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index f6e2b43e0..386c89b39 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -110,3 +110,9 @@ class CardAuthorizationCreateParams(TypedDict, total=False): physical_card_id: str """The identifier of the Physical Card to be authorized.""" + + terminal_id: str + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index d9186d6e2..09ad8f199 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: merchant_country="US", merchant_descriptor="AMAZON.COM", physical_card_id="physical_card_id", + terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) @@ -94,6 +95,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) merchant_country="US", merchant_descriptor="AMAZON.COM", physical_card_id="physical_card_id", + terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) From 5f0b7c161131e338628cd50ce064c7104ed49225 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 04:57:06 +0000 Subject: [PATCH 0303/1325] chore(internal): version bump (#799) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b56d745d1..07c725da4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.150.0" + ".": "0.151.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d1be5867a..dac172945 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.150.0" +version = "0.151.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a4f14db50..1ed71a679 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.150.0" # x-release-please-version +__version__ = "0.151.0" # x-release-please-version From fca00601519abd21fcaed7e4f4ea7b3025919034 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:03:43 +0000 Subject: [PATCH 0304/1325] feat(api): api update (#800) --- .stats.yml | 2 +- src/increase/resources/simulations/card_authorizations.py | 8 ++++++++ .../types/simulations/card_authorization_create_params.py | 3 +++ .../api_resources/simulations/test_card_authorizations.py | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 5bdcebc58..bd842e737 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7bb6e334b298eabe597d7b87ffa9ace8fe16b38501ec6bcbfc3c6ea3a34c3435.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6851e8d3095620503dba6bf1dbbe60d894bb54200d90d7870588fe5804350392.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 9d58bb093..6c647fb0b 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -78,6 +78,7 @@ def create( merchant_city: str | NotGiven = NOT_GIVEN, merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, + merchant_state: str | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -159,6 +160,8 @@ def create( merchant_descriptor: The merchant descriptor of the merchant the card is transacting with. + merchant_state: The state the merchant resides in. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -190,6 +193,7 @@ def create( "merchant_city": merchant_city, "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, + "merchant_state": merchant_state, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, @@ -258,6 +262,7 @@ async def create( merchant_city: str | NotGiven = NOT_GIVEN, merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, + merchant_state: str | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -339,6 +344,8 @@ async def create( merchant_descriptor: The merchant descriptor of the merchant the card is transacting with. + merchant_state: The state the merchant resides in. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -370,6 +377,7 @@ async def create( "merchant_city": merchant_city, "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, + "merchant_state": merchant_state, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 386c89b39..35b5110cd 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -108,6 +108,9 @@ class CardAuthorizationCreateParams(TypedDict, total=False): merchant_descriptor: str """The merchant descriptor of the merchant the card is transacting with.""" + merchant_state: str + """The state the merchant resides in.""" + physical_card_id: str """The identifier of the Physical Card to be authorized.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index 09ad8f199..eb77386fc 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -39,6 +39,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: merchant_city="New York", merchant_country="US", merchant_descriptor="AMAZON.COM", + merchant_state="NY", physical_card_id="physical_card_id", terminal_id="x", ) @@ -94,6 +95,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) merchant_city="New York", merchant_country="US", merchant_descriptor="AMAZON.COM", + merchant_state="NY", physical_card_id="physical_card_id", terminal_id="x", ) From 46b9a0002ab64742870f267be2a4161893ab16c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Nov 2024 05:04:47 +0000 Subject: [PATCH 0305/1325] chore(internal): version bump (#802) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 07c725da4..ddf661b37 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.151.0" + ".": "0.152.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dac172945..f29235315 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.151.0" +version = "0.152.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1ed71a679..530bcdc4d 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.151.0" # x-release-please-version +__version__ = "0.152.0" # x-release-please-version From 1c171871bf96d3436006a7996ece4579a4df175b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:37:22 +0000 Subject: [PATCH 0306/1325] feat(api): api update (#803) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd842e737..04f352244 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6851e8d3095620503dba6bf1dbbe60d894bb54200d90d7870588fe5804350392.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-146225aba7612f3b51a06949deecd941065be0543e463521e6f18d079154844c.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 6d1bb6fa5..02b1a096a 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -139,6 +139,18 @@ class InboundCheckDeposit(BaseModel): front_image_file_id: Optional[str] = None """The ID for the File containing the image of the front of the check.""" + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] + """Whether the details on the check match the recipient name of the check transfer. + + This is an optional feature, contact sales to enable. + + - `name_matches` - The details on the check match the recipient name of the + check transfer. + - `does_not_match` - The details on the check do not match the recipient name of + the check transfer. + - `not_evaluated` - The payee name analysis was not evaluated. + """ + status: Literal["pending", "accepted", "declined", "returned", "requires_attention"] """The status of the Inbound Check Deposit. From 9fef98640abdcc4a643ddeef558453f2ecc095fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 9 Nov 2024 21:38:25 +0000 Subject: [PATCH 0307/1325] chore(internal): version bump (#805) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ddf661b37..e14dc7124 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.152.0" + ".": "0.153.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f29235315..cec152569 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.152.0" +version = "0.153.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 530bcdc4d..948da3cf4 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.152.0" # x-release-please-version +__version__ = "0.153.0" # x-release-please-version From cf8fe441b30f6c0dc1a19bd3cecb8716104301bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 03:41:07 +0000 Subject: [PATCH 0308/1325] feat(api): api update (#806) --- .stats.yml | 2 +- src/increase/types/inbound_ach_transfer.py | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 04f352244..73bace6e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-146225aba7612f3b51a06949deecd941065be0543e463521e6f18d079154844c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7678922302b8dfe04d326fee16e9644cb1dd6cffa5e810c58f37d9b159b04582.yml diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 9299466f6..07a4a70ee 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import List, Optional -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel @@ -419,6 +419,13 @@ class InboundACHTransfer(BaseModel): - `debit` - Debit """ + effective_date: date + """The effective date of the transfer. + + This is sent by the sending bank and is a factor in determining funds + availability. + """ + expected_settlement_schedule: Literal["same_day", "future_dated"] """The settlement schedule the transfer is expected to follow. From 1cd079d99e0ac6424143043d5e6568c890a470ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Nov 2024 03:42:21 +0000 Subject: [PATCH 0309/1325] chore(internal): version bump (#808) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e14dc7124..78362658e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.153.0" + ".": "0.154.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cec152569..b86fa8009 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.153.0" +version = "0.154.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 948da3cf4..acd2c3313 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.153.0" # x-release-please-version +__version__ = "0.154.0" # x-release-please-version From 0797dbdf5e393aafc54544315ffbf4c38ce18cb1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 01:49:34 +0000 Subject: [PATCH 0310/1325] chore: rebuild project due to codegen change (#809) --- README.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index ba0141a78..f845add04 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,7 @@ import os from increase import Increase client = Increase( - # This is the default and can be omitted - api_key=os.environ.get("INCREASE_API_KEY"), + api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted # defaults to "production". environment="sandbox", ) @@ -55,8 +54,7 @@ import asyncio from increase import AsyncIncrease client = AsyncIncrease( - # This is the default and can be omitted - api_key=os.environ.get("INCREASE_API_KEY"), + api_key=os.environ.get("INCREASE_API_KEY"), # This is the default and can be omitted # defaults to "production". environment="sandbox", ) From e93d101cd50555aee4bdb920cd955e0eef34a654 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Nov 2024 12:14:50 +0000 Subject: [PATCH 0311/1325] chore: rebuild project due to codegen change (#811) --- src/increase/_utils/_transform.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index d7c05345d..a6b62cad0 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -316,6 +316,11 @@ async def _async_transform_recursive( # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) ): + # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually + # intended as an iterable, so we don't transform it. + if isinstance(data, dict): + return cast(object, data) + inner_type = extract_type_arg(stripped_type, 0) return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data] From 5f8dc4a4bc937bd7634f60b2bfacbb440ca1a1b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 05:08:17 +0000 Subject: [PATCH 0312/1325] feat(api): api update (#812) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 8 ++++---- src/increase/types/transaction.py | 8 ++++---- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 73bace6e5..5b5d4a607 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7678922302b8dfe04d326fee16e9644cb1dd6cffa5e810c58f37d9b159b04582.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-820e880c0c5a0a64c9370d6fa3f8d0f479c25f88ea3e2cec4d83ab6b40c9cebf.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index d69a2b97a..9c870a16a 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1524,7 +1524,7 @@ class ElementCardRefund(BaseModel): interchange: Optional[ElementCardRefundInterchange] = None """Interchange assessed as a part of this transaciton.""" - merchant_acceptor_id: Optional[str] = None + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. @@ -1539,7 +1539,7 @@ class ElementCardRefund(BaseModel): merchant_country: str """The country the merchant resides in.""" - merchant_name: Optional[str] = None + merchant_name: str """The name of the merchant.""" merchant_state: Optional[str] = None @@ -2182,7 +2182,7 @@ class ElementCardSettlement(BaseModel): interchange: Optional[ElementCardSettlementInterchange] = None """Interchange assessed as a part of this transaciton.""" - merchant_acceptor_id: Optional[str] = None + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. @@ -2197,7 +2197,7 @@ class ElementCardSettlement(BaseModel): merchant_country: str """The country the merchant resides in.""" - merchant_name: Optional[str] = None + merchant_name: str """The name of the merchant.""" merchant_state: Optional[str] = None diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index c30da0a33..2fa29933e 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -883,7 +883,7 @@ class SourceCardRefund(BaseModel): interchange: Optional[SourceCardRefundInterchange] = None """Interchange assessed as a part of this transaciton.""" - merchant_acceptor_id: Optional[str] = None + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. @@ -898,7 +898,7 @@ class SourceCardRefund(BaseModel): merchant_country: str """The country the merchant resides in.""" - merchant_name: Optional[str] = None + merchant_name: str """The name of the merchant.""" merchant_state: Optional[str] = None @@ -1446,7 +1446,7 @@ class SourceCardSettlement(BaseModel): interchange: Optional[SourceCardSettlementInterchange] = None """Interchange assessed as a part of this transaciton.""" - merchant_acceptor_id: Optional[str] = None + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. @@ -1461,7 +1461,7 @@ class SourceCardSettlement(BaseModel): merchant_country: str """The country the merchant resides in.""" - merchant_name: Optional[str] = None + merchant_name: str """The name of the merchant.""" merchant_state: Optional[str] = None From c51cd1a7469bfe4c37f50561774c316b9ce56900 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 05:09:30 +0000 Subject: [PATCH 0313/1325] chore(internal): version bump (#813) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78362658e..f102a2882 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.154.0" + ".": "0.155.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b86fa8009..2abb64ded 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.154.0" +version = "0.155.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index acd2c3313..73cc18201 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.154.0" # x-release-please-version +__version__ = "0.155.0" # x-release-please-version From 741f5f97f44fdef2ba564c855af9250893ddd3ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 05:15:48 +0000 Subject: [PATCH 0314/1325] feat(api): api update (#814) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 12 ++++++------ src/increase/types/declined_transaction.py | 4 ++-- src/increase/types/pending_transaction.py | 4 ++-- src/increase/types/real_time_decision.py | 4 ++-- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b5d4a607..603f7b801 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-820e880c0c5a0a64c9370d6fa3f8d0f479c25f88ea3e2cec4d83ab6b40c9cebf.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3ba84b9feb561355302af8e25d666f65a8a3f152f59dcb7dec57abcb99639d61.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 9c870a16a..f57add01c 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -336,7 +336,7 @@ class ElementCardAuthorization(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -345,7 +345,7 @@ class ElementCardAuthorization(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str @@ -746,7 +746,7 @@ class ElementCardDecline(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -755,7 +755,7 @@ class ElementCardDecline(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str @@ -2486,7 +2486,7 @@ class ElementCardValidation(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -2495,7 +2495,7 @@ class ElementCardValidation(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index c4390c736..61fb35394 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -383,7 +383,7 @@ class SourceCardDecline(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -392,7 +392,7 @@ class SourceCardDecline(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 59ac2e6e8..ce9c2266f 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -333,7 +333,7 @@ class SourceCardAuthorization(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -342,7 +342,7 @@ class SourceCardAuthorization(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 96147179e..0cc3ef040 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -348,7 +348,7 @@ class CardAuthorization(BaseModel): is transacting with. """ - merchant_category_code: Optional[str] = None + merchant_category_code: str """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. @@ -357,7 +357,7 @@ class CardAuthorization(BaseModel): merchant_city: Optional[str] = None """The city the merchant resides in.""" - merchant_country: Optional[str] = None + merchant_country: str """The country the merchant resides in.""" merchant_descriptor: str From 37c87ab6974e8c426f85177ed92070db0589f88a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 05:17:10 +0000 Subject: [PATCH 0315/1325] chore(internal): version bump (#816) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f102a2882..9026c2149 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.155.0" + ".": "0.156.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2abb64ded..9630059f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.155.0" +version = "0.156.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 73cc18201..b577f326e 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.155.0" # x-release-please-version +__version__ = "0.156.0" # x-release-please-version From 615ecf5c1ea19d332327246c69afd0754b3ef910 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 06:05:13 +0000 Subject: [PATCH 0316/1325] feat(api): api update (#817) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 6 ++++++ src/increase/types/transaction.py | 6 ++++++ 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 603f7b801..c144966ef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3ba84b9feb561355302af8e25d666f65a8a3f152f59dcb7dec57abcb99639d61.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8b8e19d1cfc46bbf4bd8f898d3231d6d571ae179ff531b22037470d4051f8351.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f57add01c..833ff88fc 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1542,6 +1542,9 @@ class ElementCardRefund(BaseModel): merchant_name: str """The name of the merchant.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. For US merchants this is always a 5-digit ZIP code.""" + merchant_state: Optional[str] = None """The state the merchant resides in.""" @@ -2200,6 +2203,9 @@ class ElementCardSettlement(BaseModel): merchant_name: str """The name of the merchant.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. For US merchants this is always a 5-digit ZIP code.""" + merchant_state: Optional[str] = None """The state the merchant resides in.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 2fa29933e..4a5d1b59d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -901,6 +901,9 @@ class SourceCardRefund(BaseModel): merchant_name: str """The name of the merchant.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. For US merchants this is always a 5-digit ZIP code.""" + merchant_state: Optional[str] = None """The state the merchant resides in.""" @@ -1464,6 +1467,9 @@ class SourceCardSettlement(BaseModel): merchant_name: str """The name of the merchant.""" + merchant_postal_code: Optional[str] = None + """The merchant's postal code. For US merchants this is always a 5-digit ZIP code.""" + merchant_state: Optional[str] = None """The state the merchant resides in.""" From 848b13fea81c6b8fc84366c213a6ccc982b593a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 06:06:23 +0000 Subject: [PATCH 0317/1325] chore(internal): version bump (#819) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9026c2149..6ceb01924 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.156.0" + ".": "0.157.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9630059f5..98c1c2c33 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.156.0" +version = "0.157.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b577f326e..89cc17463 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.156.0" # x-release-please-version +__version__ = "0.157.0" # x-release-please-version From e38f148ac46d07f6b457662cd6a5d9d7f4d3ce43 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 06:31:20 +0000 Subject: [PATCH 0318/1325] feat(api): api update (#820) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 6 +++--- src/increase/types/declined_transaction.py | 2 +- src/increase/types/pending_transaction.py | 2 +- src/increase/types/real_time_decision.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index c144966ef..01cbe9fb0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8b8e19d1cfc46bbf4bd8f898d3231d6d571ae179ff531b22037470d4051f8351.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8ced45f4f5595df242ca2c43d1c74f4904ca3d18581ea6ca335f885967a0a663.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 833ff88fc..6a5f21353 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -342,7 +342,7 @@ class ElementCardAuthorization(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str @@ -752,7 +752,7 @@ class ElementCardDecline(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str @@ -2498,7 +2498,7 @@ class ElementCardValidation(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 61fb35394..8219c820a 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -389,7 +389,7 @@ class SourceCardDecline(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index ce9c2266f..660177743 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -339,7 +339,7 @@ class SourceCardAuthorization(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 0cc3ef040..a9b02188e 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -354,7 +354,7 @@ class CardAuthorization(BaseModel): card is transacting with. """ - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str From 313698f3632e2027740c594d0f1cca807fc82a7f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 06:32:26 +0000 Subject: [PATCH 0319/1325] chore(internal): version bump (#822) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6ceb01924..da0adeabd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.157.0" + ".": "0.158.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 98c1c2c33..e324ba6cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.157.0" +version = "0.158.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 89cc17463..9879c530e 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.157.0" # x-release-please-version +__version__ = "0.158.0" # x-release-please-version From d205e8bb6d09d9fd99a125b6408232fbbf8ae7e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 07:08:16 +0000 Subject: [PATCH 0320/1325] feat(api): api update (#823) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 4 ++-- src/increase/types/transaction.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 01cbe9fb0..a02a9b08c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8ced45f4f5595df242ca2c43d1c74f4904ca3d18581ea6ca335f885967a0a663.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-423dab63d43cc4e237026e0a7a8ac247653ed0cae54b51511b92d522dd9e58f6.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 6a5f21353..75a2bd35b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1533,7 +1533,7 @@ class ElementCardRefund(BaseModel): merchant_category_code: str """The 4-digit MCC describing the merchant's business.""" - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str @@ -2194,7 +2194,7 @@ class ElementCardSettlement(BaseModel): merchant_category_code: str """The 4-digit MCC describing the merchant's business.""" - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 4a5d1b59d..eaf1a32b7 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -892,7 +892,7 @@ class SourceCardRefund(BaseModel): merchant_category_code: str """The 4-digit MCC describing the merchant's business.""" - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str @@ -1458,7 +1458,7 @@ class SourceCardSettlement(BaseModel): merchant_category_code: str """The 4-digit MCC describing the merchant's business.""" - merchant_city: Optional[str] = None + merchant_city: str """The city the merchant resides in.""" merchant_country: str From fc65d956ca0f7be8cec0598f7299a31b559d0726 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 07:09:21 +0000 Subject: [PATCH 0321/1325] chore(internal): version bump (#825) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da0adeabd..d1ce3765e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.158.0" + ".": "0.159.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e324ba6cb..266c323b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.158.0" +version = "0.159.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9879c530e..992606a90 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.158.0" # x-release-please-version +__version__ = "0.159.0" # x-release-please-version From 0e0116c9e38c07f6a6eb342284b359eecb845573 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:29:37 +0000 Subject: [PATCH 0322/1325] feat(api): api update (#826) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 6 +++--- src/increase/types/declined_transaction.py | 2 +- src/increase/types/pending_transaction.py | 2 +- src/increase/types/real_time_decision.py | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index a02a9b08c..e6f6388b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-423dab63d43cc4e237026e0a7a8ac247653ed0cae54b51511b92d522dd9e58f6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20b5808422396f14819d54eb4e784f9cb93645d7bddbc3129e8fcf0b39e377b7.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 75a2bd35b..ac6a21249 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -342,7 +342,7 @@ class ElementCardAuthorization(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str @@ -752,7 +752,7 @@ class ElementCardDecline(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str @@ -2498,7 +2498,7 @@ class ElementCardValidation(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 8219c820a..61fb35394 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -389,7 +389,7 @@ class SourceCardDecline(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 660177743..ce9c2266f 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -339,7 +339,7 @@ class SourceCardAuthorization(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index a9b02188e..0cc3ef040 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -354,7 +354,7 @@ class CardAuthorization(BaseModel): card is transacting with. """ - merchant_city: str + merchant_city: Optional[str] = None """The city the merchant resides in.""" merchant_country: str From b0b90e96ed5fa2270bfabc579067a6a8d7f73f25 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 16:30:48 +0000 Subject: [PATCH 0323/1325] chore(internal): version bump (#828) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d1ce3765e..f32bafeaa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.159.0" + ".": "0.160.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 266c323b8..99040f416 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.159.0" +version = "0.160.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 992606a90..277448c4c 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.159.0" # x-release-please-version +__version__ = "0.160.0" # x-release-please-version From 1e437071f3a433213ff33abcdf6c8935d8da9653 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 23:21:14 +0000 Subject: [PATCH 0324/1325] feat(api): api update (#829) --- .stats.yml | 2 +- .../types/real_time_decision_action_params.py | 26 +++++++++++++++++++ .../api_resources/test_real_time_decisions.py | 10 +++++-- 3 files changed, 35 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e6f6388b4..ffcfc72dc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20b5808422396f14819d54eb4e784f9cb93645d7bddbc3129e8fcf0b39e377b7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3a8cddc4ecee394a7253767a8c87cf9f8a188ac4912ed2646bb2e17f6e75c967.yml diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index a1cb1504c..832f8d253 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -81,6 +81,32 @@ class CardAuthorization(TypedDict, total=False): - `decline` - Decline the authorization. """ + decline_reason: Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + """The reason the card authorization was declined. + + This translates to a specific decline code that is sent to the card network. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + class DigitalWalletAuthenticationSuccess(TypedDict, total=False): email: str diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index f90f43f19..d49e43316 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -68,7 +68,10 @@ def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, - card_authorization={"decision": "approve"}, + card_authorization={ + "decision": "approve", + "decline_reason": "insufficient_funds", + }, digital_wallet_authentication={ "result": "success", "success": { @@ -172,7 +175,10 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, card_authentication_challenge={"result": "success"}, - card_authorization={"decision": "approve"}, + card_authorization={ + "decision": "approve", + "decline_reason": "insufficient_funds", + }, digital_wallet_authentication={ "result": "success", "success": { From 794ecdefe28352310bbe9a22415bc2d77371c783 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Nov 2024 23:22:24 +0000 Subject: [PATCH 0325/1325] chore(internal): version bump (#831) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f32bafeaa..fcf5daf7a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.160.0" + ".": "0.161.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 99040f416..e6cb027ed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.160.0" +version = "0.161.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 277448c4c..ace8180dc 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.160.0" # x-release-please-version +__version__ = "0.161.0" # x-release-please-version From dc3a1ddbdf19582a69e5d7f4b0d411801cdaaaba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:14:56 +0000 Subject: [PATCH 0326/1325] chore: rebuild project due to codegen change (#832) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 28 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 28 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ffcfc72dc..8ae04803b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3a8cddc4ecee394a7253767a8c87cf9f8a188ac4912ed2646bb2e17f6e75c967.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9e121d35d8e61a73dbf20411a863cb00a0a19d62efc4ae6d7c379a41f402da5.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index ac6a21249..a14b2f97e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -828,6 +828,34 @@ class ElementCardDecline(BaseModel): transaction. """ + real_time_decision_reason: Optional[ + Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + ] = None + """ + This is present if a specific decline reason was given in the real-time + decision. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + reason: Literal[ "card_not_active", "physical_card_not_active", diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 61fb35394..bc33fc7fe 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -465,6 +465,34 @@ class SourceCardDecline(BaseModel): transaction. """ + real_time_decision_reason: Optional[ + Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + ] = None + """ + This is present if a specific decline reason was given in the real-time + decision. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + reason: Literal[ "card_not_active", "physical_card_not_active", From a7faef5231f9d7c632f4ed26bea5843559d67a69 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:32:41 +0000 Subject: [PATCH 0327/1325] feat(api): api update (#834) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 28 ---------------------- src/increase/types/declined_transaction.py | 28 ---------------------- 3 files changed, 1 insertion(+), 57 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ae04803b..ffcfc72dc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9e121d35d8e61a73dbf20411a863cb00a0a19d62efc4ae6d7c379a41f402da5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3a8cddc4ecee394a7253767a8c87cf9f8a188ac4912ed2646bb2e17f6e75c967.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a14b2f97e..ac6a21249 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -828,34 +828,6 @@ class ElementCardDecline(BaseModel): transaction. """ - real_time_decision_reason: Optional[ - Literal[ - "insufficient_funds", - "transaction_never_allowed", - "exceeds_approval_limit", - "card_temporarily_disabled", - "suspected_fraud", - "other", - ] - ] = None - """ - This is present if a specific decline reason was given in the real-time - decision. - - - `insufficient_funds` - The cardholder does not have sufficient funds to cover - the transaction. The merchant may attempt to process the transaction again. - - `transaction_never_allowed` - This type of transaction is not allowed for this - card. This transaction should not be retried. - - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's - approval limit. The merchant may attempt to process the transaction again. - - `card_temporarily_disabled` - The card has been temporarily disabled or not - yet activated. The merchant may attempt to process the transaction again. - - `suspected_fraud` - The transaction is suspected to be fraudulent. The - merchant may attempt to process the transaction again. - - `other` - The transaction was declined for another reason. The merchant may - attempt to process the transaction again. This should be used sparingly. - """ - reason: Literal[ "card_not_active", "physical_card_not_active", diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index bc33fc7fe..61fb35394 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -465,34 +465,6 @@ class SourceCardDecline(BaseModel): transaction. """ - real_time_decision_reason: Optional[ - Literal[ - "insufficient_funds", - "transaction_never_allowed", - "exceeds_approval_limit", - "card_temporarily_disabled", - "suspected_fraud", - "other", - ] - ] = None - """ - This is present if a specific decline reason was given in the real-time - decision. - - - `insufficient_funds` - The cardholder does not have sufficient funds to cover - the transaction. The merchant may attempt to process the transaction again. - - `transaction_never_allowed` - This type of transaction is not allowed for this - card. This transaction should not be retried. - - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's - approval limit. The merchant may attempt to process the transaction again. - - `card_temporarily_disabled` - The card has been temporarily disabled or not - yet activated. The merchant may attempt to process the transaction again. - - `suspected_fraud` - The transaction is suspected to be fraudulent. The - merchant may attempt to process the transaction again. - - `other` - The transaction was declined for another reason. The merchant may - attempt to process the transaction again. This should be used sparingly. - """ - reason: Literal[ "card_not_active", "physical_card_not_active", From 2e71d72d208b360ee584de9edb9f1e5e99088826 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 18:33:54 +0000 Subject: [PATCH 0328/1325] chore(internal): version bump (#835) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fcf5daf7a..b727f170b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.161.0" + ".": "0.162.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e6cb027ed..9cf845dca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.161.0" +version = "0.162.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ace8180dc..657ff194e 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.161.0" # x-release-please-version +__version__ = "0.162.0" # x-release-please-version From 45c4ed41a804212efd41688f9f78b9a33847ac2f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:10:37 +0000 Subject: [PATCH 0329/1325] feat(api): api update (#836) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 28 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 28 ++++++++++++++++++++++ 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index ffcfc72dc..8ae04803b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3a8cddc4ecee394a7253767a8c87cf9f8a188ac4912ed2646bb2e17f6e75c967.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9e121d35d8e61a73dbf20411a863cb00a0a19d62efc4ae6d7c379a41f402da5.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index ac6a21249..a14b2f97e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -828,6 +828,34 @@ class ElementCardDecline(BaseModel): transaction. """ + real_time_decision_reason: Optional[ + Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + ] = None + """ + This is present if a specific decline reason was given in the real-time + decision. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + reason: Literal[ "card_not_active", "physical_card_not_active", diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 61fb35394..bc33fc7fe 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -465,6 +465,34 @@ class SourceCardDecline(BaseModel): transaction. """ + real_time_decision_reason: Optional[ + Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + ] = None + """ + This is present if a specific decline reason was given in the real-time + decision. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + reason: Literal[ "card_not_active", "physical_card_not_active", From 21fa8d33c37dc25ab8715315eeae0e5fbc67caed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 19:12:07 +0000 Subject: [PATCH 0330/1325] chore(internal): version bump (#838) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b727f170b..493e9f4f1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.162.0" + ".": "0.163.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9cf845dca..6a9199f2f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.162.0" +version = "0.163.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 657ff194e..581f0c959 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.162.0" # x-release-please-version +__version__ = "0.163.0" # x-release-please-version From 1adab6749894bb7829c6deb751c24127ac85c840 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:23:32 +0000 Subject: [PATCH 0331/1325] feat(api): api update (#839) --- .stats.yml | 2 +- src/increase/resources/files.py | 6 ++++++ src/increase/types/file.py | 3 +++ src/increase/types/file_create_params.py | 3 +++ src/increase/types/file_list_params.py | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 8ae04803b..1d27da413 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9e121d35d8e61a73dbf20411a863cb00a0a19d62efc4ae6d7c379a41f402da5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7adcb56e4eaa83dfdaec0de182919a1ff97b44158393c7b1a2fa9557f0da7249.yml diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 718860311..58077f635 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -58,6 +58,7 @@ def create( "check_image_front", "check_image_back", "mailed_check_image", + "check_voucher_image", "form_ss_4", "identity_document", "other", @@ -95,6 +96,8 @@ def create( deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. + - `check_voucher_image` - An image to be printed on the bottom or voucher of a + check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. @@ -275,6 +278,7 @@ async def create( "check_image_front", "check_image_back", "mailed_check_image", + "check_voucher_image", "form_ss_4", "identity_document", "other", @@ -312,6 +316,8 @@ async def create( deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. + - `check_voucher_image` - An image to be printed on the bottom or voucher of a + check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index ea4f5f7eb..362ead3ae 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -52,6 +52,7 @@ class File(BaseModel): "processed_check_image_front", "processed_check_image_back", "mailed_check_image", + "check_voucher_image", "inbound_mail_item", "form_1099_int", "form_ss_4", @@ -83,6 +84,8 @@ class File(BaseModel): - `processed_check_image_back` - An image of the back of a deposited check after processing by Increase and submission to the Federal Reserve. - `mailed_check_image` - An image of a check that was mailed to a recipient. + - `check_voucher_image` - An image to be printed on the bottom or voucher of a + check that you've requested Increase print. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_ss_4` - IRS Form SS-4. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index 18d1117ee..c71a677d4 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -23,6 +23,7 @@ class FileCreateParams(TypedDict, total=False): "check_image_front", "check_image_back", "mailed_check_image", + "check_voucher_image", "form_ss_4", "identity_document", "other", @@ -42,6 +43,8 @@ class FileCreateParams(TypedDict, total=False): deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. + - `check_voucher_image` - An image to be printed on the bottom or voucher of a + check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 137206929..afc00a66c 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -70,6 +70,7 @@ class CreatedAt(TypedDict, total=False): "processed_check_image_front", "processed_check_image_back", "mailed_check_image", + "check_voucher_image", "inbound_mail_item", "form_1099_int", "form_ss_4", From f22e47a60b52fad8e2a5b60017ba55cb9de39720 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Nov 2024 22:24:36 +0000 Subject: [PATCH 0332/1325] chore(internal): version bump (#841) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 493e9f4f1..c6788d528 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.163.0" + ".": "0.164.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6a9199f2f..dec0b372d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.163.0" +version = "0.164.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 581f0c959..8c4e9022d 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.163.0" # x-release-please-version +__version__ = "0.164.0" # x-release-please-version From f1881319f4114b5e9593ef0c0cd7ef63c550a86d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 10:49:36 +0000 Subject: [PATCH 0333/1325] chore: rebuild project due to codegen change (#842) --- tests/api_resources/test_ach_transfers.py | 36 +-- tests/api_resources/test_card_disputes.py | 4 +- .../test_declined_transactions.py | 4 +- .../test_digital_card_profiles.py | 4 +- tests/api_resources/test_documents.py | 4 +- tests/api_resources/test_entities.py | 300 +----------------- tests/api_resources/test_events.py | 4 +- tests/api_resources/test_exports.py | 12 +- tests/api_resources/test_external_accounts.py | 4 +- tests/api_resources/test_files.py | 4 +- .../test_intrafi_account_enrollments.py | 4 +- tests/api_resources/test_oauth_connections.py | 4 +- .../test_pending_transactions.py | 8 +- .../test_physical_card_profiles.py | 4 +- tests/api_resources/test_transactions.py | 4 +- 15 files changed, 44 insertions(+), 356 deletions(-) diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 29aab9bb4..3d01225ac 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -37,27 +37,13 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account_number="987654321", addenda={ "category": "freeform", - "freeform": { - "entries": [ - {"payment_related_information": "x"}, - {"payment_related_information": "x"}, - {"payment_related_information": "x"}, - ] - }, + "freeform": {"entries": [{"payment_related_information": "x"}]}, "payment_order_remittance_advice": { "invoices": [ { "invoice_number": "x", "paid_amount": 0, - }, - { - "invoice_number": "x", - "paid_amount": 0, - }, - { - "invoice_number": "x", - "paid_amount": 0, - }, + } ] }, }, @@ -287,27 +273,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account_number="987654321", addenda={ "category": "freeform", - "freeform": { - "entries": [ - {"payment_related_information": "x"}, - {"payment_related_information": "x"}, - {"payment_related_information": "x"}, - ] - }, + "freeform": {"entries": [{"payment_related_information": "x"}]}, "payment_order_remittance_advice": { "invoices": [ { "invoice_number": "x", "paid_amount": 0, - }, - { - "invoice_number": "x", - "paid_amount": 0, - }, - { - "invoice_number": "x", - "paid_amount": 0, - }, + } ] }, }, diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 471608479..9b3c3a074 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_reviewing", "pending_user_information", "accepted"]}, + status={"in": ["pending_reviewing"]}, ) assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @@ -243,7 +243,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_reviewing", "pending_user_information", "accepted"]}, + status={"in": ["pending_reviewing"]}, ) assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 105398249..f1d22abfe 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -68,7 +68,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: declined_transaction = client.declined_transactions.list( account_id="account_id", - category={"in": ["ach_decline", "card_decline", "check_decline"]}, + category={"in": ["ach_decline"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -154,7 +154,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.list( account_id="account_id", - category={"in": ["ach_decline", "card_decline", "check_decline"]}, + category={"in": ["ach_decline"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 743166a0a..555e2f7b5 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -133,7 +133,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending", "rejected", "active"]}, + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @@ -374,7 +374,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending", "rejected", "active"]}, + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index ed0699d51..1ad9835d1 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -65,7 +65,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: document = client.documents.list( - category={"in": ["form_1099_int", "proof_of_authorization", "company_information"]}, + category={"in": ["form_1099_int"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -148,7 +148,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.list( - category={"in": ["form_1099_int", "proof_of_authorization", "company_information"]}, + category={"in": ["form_1099_int"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index e931b06ac..2ddeb653b 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -95,7 +95,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "zip": "x", "line2": "x", }, - "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + "authorized_persons": [{"name": "x"}], "category": "municipality", "name": "x", "tax_identifier": "x", @@ -136,75 +136,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, "name": "x", "confirmed_no_us_tax_id": True, - }, - { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, + } ], "name": "x", }, @@ -294,81 +226,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "x", "confirmed_no_us_tax_id": True, }, - }, - { - "structure": "individual", - "individual": { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - }, - { - "structure": "individual", - "individual": { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - }, + } ], "formation_document_file_id": "formation_document_file_id", "formation_state": "x", @@ -490,7 +348,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["active", "archived", "disabled"]}, + status={"in": ["active"]}, ) assert_matches_type(SyncPage[Entity], entity, path=["response"]) @@ -1068,7 +926,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "zip": "x", "line2": "x", }, - "authorized_persons": [{"name": "x"}, {"name": "x"}, {"name": "x"}], + "authorized_persons": [{"name": "x"}], "category": "municipality", "name": "x", "tax_identifier": "x", @@ -1109,75 +967,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, "name": "x", "confirmed_no_us_tax_id": True, - }, - { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, + } ], "name": "x", }, @@ -1267,81 +1057,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "x", "confirmed_no_us_tax_id": True, }, - }, - { - "structure": "individual", - "individual": { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - }, - { - "structure": "individual", - "individual": { - "address": { - "city": "x", - "line1": "x", - "state": "x", - "zip": "x", - "line2": "x", - }, - "date_of_birth": parse_date("2019-12-27"), - "identification": { - "method": "social_security_number", - "number": "xxxx", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "x", - "confirmed_no_us_tax_id": True, - }, - }, + } ], "formation_document_file_id": "formation_document_file_id", "formation_state": "x", @@ -1463,7 +1179,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["active", "archived", "disabled"]}, + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[Entity], entity, path=["response"]) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index d750217e1..f15aa11db 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -66,7 +66,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: event = client.events.list( associated_object_id="associated_object_id", - category={"in": ["account.created", "account.updated", "account_number.created"]}, + category={"in": ["account.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -149,7 +149,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: event = await async_client.events.list( associated_object_id="associated_object_id", - category={"in": ["account.created", "account.updated", "account_number.created"]}, + category={"in": ["account.created"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index bb968bb3c..c76dbb282 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -58,7 +58,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - entity_csv={"status": {"in": ["active", "archived", "disabled"]}}, + entity_csv={"status": {"in": ["active"]}}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", "created_at": { @@ -143,7 +143,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: export = client.exports.list( - category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + category={"in": ["account_statement_ofx"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -153,7 +153,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending", "complete", "failed"]}, + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[Export], export, path=["response"]) @@ -220,7 +220,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - entity_csv={"status": {"in": ["active", "archived", "disabled"]}}, + entity_csv={"status": {"in": ["active"]}}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", "created_at": { @@ -305,7 +305,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list( - category={"in": ["account_statement_ofx", "transaction_csv", "balance_csv"]}, + category={"in": ["account_statement_ofx"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -315,7 +315,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending", "complete", "failed"]}, + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[Export], export, path=["response"]) diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 6e17b34d0..501b8a313 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -167,7 +167,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, routing_number="xxxxxxxxx", - status={"in": ["active", "archived"]}, + status={"in": ["active"]}, ) assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) @@ -342,7 +342,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, routing_number="xxxxxxxxx", - status={"in": ["active", "archived"]}, + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index e8cac448b..aad0dedde 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, + purpose={"in": ["check_image_front"]}, ) assert_matches_type(SyncPage[File], file, path=["response"]) @@ -243,7 +243,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front", "check_image_back", "processed_check_image_front"]}, + purpose={"in": ["check_image_front"]}, ) assert_matches_type(AsyncPage[File], file, path=["response"]) diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py index d595132f9..414163499 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -106,7 +106,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, + status={"in": ["pending_enrolling"]}, ) assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @@ -260,7 +260,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_enrolling", "enrolled", "pending_unenrolling"]}, + status={"in": ["pending_enrolling"]}, ) assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 83ca7370a..a62eb4491 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -66,7 +66,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list( cursor="cursor", limit=1, - status={"in": ["active", "inactive"]}, + status={"in": ["active"]}, ) assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @@ -142,7 +142,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> oauth_connection = await async_client.oauth_connections.list( cursor="cursor", limit=1, - status={"in": ["active", "inactive"]}, + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 99e91e076..7130bf502 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -68,7 +68,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: pending_transaction = client.pending_transactions.list( account_id="account_id", - category={"in": ["account_transfer_instruction", "ach_transfer_instruction", "card_authorization"]}, + category={"in": ["account_transfer_instruction"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -78,7 +78,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, route_id="route_id", - status={"in": ["pending", "complete"]}, + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @@ -155,7 +155,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.list( account_id="account_id", - category={"in": ["account_transfer_instruction", "ach_transfer_instruction", "card_authorization"]}, + category={"in": ["account_transfer_instruction"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -165,7 +165,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, route_id="route_id", - status={"in": ["pending", "complete"]}, + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 0289dea89..c6e34e5c4 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -111,7 +111,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_creating", "pending_reviewing", "rejected"]}, + status={"in": ["pending_creating"]}, ) assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @@ -325,7 +325,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_creating", "pending_reviewing", "rejected"]}, + status={"in": ["pending_creating"]}, ) assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index b8dea8d52..d139afe7a 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -66,7 +66,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: transaction = client.transactions.list( account_id="account_id", - category={"in": ["account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection"]}, + category={"in": ["account_transfer_intention"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -150,7 +150,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.list( account_id="account_id", - category={"in": ["account_transfer_intention", "ach_transfer_intention", "ach_transfer_rejection"]}, + category={"in": ["account_transfer_intention"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), From 3418a450bb10afad62394e9abcc034928237f9e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Nov 2024 12:44:51 +0000 Subject: [PATCH 0334/1325] chore: rebuild project due to codegen change (#844) --- pyproject.toml | 1 + requirements-dev.lock | 1 + src/increase/_utils/_sync.py | 90 ++++++++++++++++-------------------- tests/test_client.py | 38 +++++++++++++++ 4 files changed, 80 insertions(+), 50 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index dec0b372d..107f26412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,6 +55,7 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", + "nest_asyncio==1.6.0" ] [tool.rye.scripts] diff --git a/requirements-dev.lock b/requirements-dev.lock index 30136a89c..f26949eec 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -51,6 +51,7 @@ mdurl==0.1.2 mypy==1.13.0 mypy-extensions==1.0.0 # via mypy +nest-asyncio==1.6.0 nodeenv==1.8.0 # via pyright nox==2023.4.22 diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index d0d810337..8b3aaf2b5 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -1,56 +1,62 @@ from __future__ import annotations +import sys +import asyncio import functools -from typing import TypeVar, Callable, Awaitable +import contextvars +from typing import Any, TypeVar, Callable, Awaitable from typing_extensions import ParamSpec -import anyio -import anyio.to_thread - -from ._reflection import function_has_argument - T_Retval = TypeVar("T_Retval") T_ParamSpec = ParamSpec("T_ParamSpec") -# copied from `asyncer`, https://github.com/tiangolo/asyncer -def asyncify( - function: Callable[T_ParamSpec, T_Retval], - *, - cancellable: bool = False, - limiter: anyio.CapacityLimiter | None = None, -) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: +if sys.version_info >= (3, 9): + to_thread = asyncio.to_thread +else: + # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread + # for Python 3.8 support + async def to_thread( + func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs + ) -> Any: + """Asynchronously run function *func* in a separate thread. + + Any *args and **kwargs supplied for this function are directly passed + to *func*. Also, the current :class:`contextvars.Context` is propagated, + allowing context variables from the main thread to be accessed in the + separate thread. + + Returns a coroutine that can be awaited to get the eventual result of *func*. + """ + loop = asyncio.events.get_running_loop() + ctx = contextvars.copy_context() + func_call = functools.partial(ctx.run, func, *args, **kwargs) + return await loop.run_in_executor(None, func_call) + + +# inspired by `asyncer`, https://github.com/tiangolo/asyncer +def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: """ Take a blocking function and create an async one that receives the same - positional and keyword arguments, and that when called, calls the original function - in a worker thread using `anyio.to_thread.run_sync()`. Internally, - `asyncer.asyncify()` uses the same `anyio.to_thread.run_sync()`, but it supports - keyword arguments additional to positional arguments and it adds better support for - autocompletion and inline errors for the arguments of the function called and the - return value. - - If the `cancellable` option is enabled and the task waiting for its completion is - cancelled, the thread will still run its course but its return value (or any raised - exception) will be ignored. + positional and keyword arguments. For python version 3.9 and above, it uses + asyncio.to_thread to run the function in a separate thread. For python version + 3.8, it uses locally defined copy of the asyncio.to_thread function which was + introduced in python 3.9. - Use it like this: + Usage: - ```Python - def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str: - # Do work - return "Some result" + ```python + def blocking_func(arg1, arg2, kwarg1=None): + # blocking code + return result - result = await to_thread.asyncify(do_work)("spam", "ham", kwarg1="a", kwarg2="b") - print(result) + result = asyncify(blocking_function)(arg1, arg2, kwarg1=value1) ``` ## Arguments `function`: a blocking regular callable (e.g. a function) - `cancellable`: `True` to allow cancellation of the operation - `limiter`: capacity limiter to use to limit the total amount of threads running - (if omitted, the default limiter is used) ## Return @@ -60,22 +66,6 @@ def do_work(arg1, arg2, kwarg1="", kwarg2="") -> str: """ async def wrapper(*args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs) -> T_Retval: - partial_f = functools.partial(function, *args, **kwargs) - - # In `v4.1.0` anyio added the `abandon_on_cancel` argument and deprecated the old - # `cancellable` argument, so we need to use the new `abandon_on_cancel` to avoid - # surfacing deprecation warnings. - if function_has_argument(anyio.to_thread.run_sync, "abandon_on_cancel"): - return await anyio.to_thread.run_sync( - partial_f, - abandon_on_cancel=cancellable, - limiter=limiter, - ) - - return await anyio.to_thread.run_sync( - partial_f, - cancellable=cancellable, - limiter=limiter, - ) + return await to_thread(function, *args, **kwargs) return wrapper diff --git a/tests/test_client.py b/tests/test_client.py index 98d80853f..f73ae7701 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -4,11 +4,14 @@ import gc import os +import sys import json import asyncio import inspect +import subprocess import tracemalloc from typing import Any, Union, cast +from textwrap import dedent from unittest import mock from typing_extensions import Literal @@ -1708,3 +1711,38 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: ) assert response.http_request.headers.get("x-stainless-retry-count") == "42" + + def test_get_platform(self) -> None: + # A previous implementation of asyncify could leave threads unterminated when + # used with nest_asyncio. + # + # Since nest_asyncio.apply() is global and cannot be un-applied, this + # test is run in a separate process to avoid affecting other tests. + test_code = dedent(""" + import asyncio + import nest_asyncio + import threading + + from increase._utils import asyncify + from increase._base_client import get_platform + + async def test_main() -> None: + result = await asyncify(get_platform)() + print(result) + for thread in threading.enumerate(): + print(thread.name) + + nest_asyncio.apply() + asyncio.run(test_main()) + """) + with subprocess.Popen( + [sys.executable, "-c", test_code], + text=True, + ) as process: + try: + process.wait(2) + if process.returncode: + raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") + except subprocess.TimeoutExpired as e: + process.kill() + raise AssertionError("calling get_platform using asyncify resulted in a hung process") from e From 85e74d40cc4e8a0023e5dc06ab63c0587ed238dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:01:57 +0000 Subject: [PATCH 0335/1325] feat(api): api update (#845) --- .stats.yml | 2 +- src/increase/resources/accounts.py | 8 ++++---- src/increase/types/account.py | 4 ++-- src/increase/types/account_list_params.py | 4 ++-- tests/api_resources/test_accounts.py | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1d27da413..61aabba30 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7adcb56e4eaa83dfdaec0de182919a1ff97b44158393c7b1a2fa9557f0da7249.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fb150851a7b999aa231fd826e5365716f9c7d487a3fc1bb0a9df65bdfdfeca3.yml diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index a1cd95e85..a5f3a10dd 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -206,7 +206,7 @@ def list( informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, program_id: str | NotGiven = NOT_GIVEN, - status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, + status: Literal["closed", "open"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -236,8 +236,8 @@ def list( status: Filter Accounts for those with the specified status. - - `open` - Open Accounts that are ready to use. - `closed` - Closed Accounts on which no new activity can occur. + - `open` - Open Accounts that are ready to use. extra_headers: Send extra headers @@ -529,7 +529,7 @@ def list( informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, program_id: str | NotGiven = NOT_GIVEN, - status: Literal["open", "closed"] | NotGiven = NOT_GIVEN, + status: Literal["closed", "open"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -559,8 +559,8 @@ def list( status: Filter Accounts for those with the specified status. - - `open` - Open Accounts that are ready to use. - `closed` - Closed Accounts on which no new activity can occur. + - `open` - Open Accounts that are ready to use. extra_headers: Send extra headers diff --git a/src/increase/types/account.py b/src/increase/types/account.py index ef6c2f5c8..4905d0476 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -91,11 +91,11 @@ class Account(BaseModel): this Account. """ - status: Literal["open", "closed"] + status: Literal["closed", "open"] """The status of the Account. - - `open` - Open Accounts that are ready to use. - `closed` - Closed Accounts on which no new activity can occur. + - `open` - Open Accounts that are ready to use. """ type: Literal["account"] diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py index 0c847bdca..6b5044ba0 100644 --- a/src/increase/types/account_list_params.py +++ b/src/increase/types/account_list_params.py @@ -40,11 +40,11 @@ class AccountListParams(TypedDict, total=False): program_id: str """Filter Accounts for those in a specific Program.""" - status: Literal["open", "closed"] + status: Literal["closed", "open"] """Filter Accounts for those with the specified status. - - `open` - Open Accounts that are ready to use. - `closed` - Closed Accounts on which no new activity can occur. + - `open` - Open Accounts that are ready to use. """ diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index 8b06c01e3..b8cfbb9bb 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -167,7 +167,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: informational_entity_id="informational_entity_id", limit=1, program_id="program_id", - status="open", + status="closed", ) assert_matches_type(SyncPage[Account], account, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> informational_entity_id="informational_entity_id", limit=1, program_id="program_id", - status="open", + status="closed", ) assert_matches_type(AsyncPage[Account], account, path=["response"]) From b7557b6905e738eb620074785a6fc06228436a9c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 01:02:59 +0000 Subject: [PATCH 0336/1325] chore(internal): version bump (#846) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c6788d528..684b87104 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.164.0" + ".": "0.165.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 107f26412..3735a7f84 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.164.0" +version = "0.165.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8c4e9022d..a36f1dc63 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.164.0" # x-release-please-version +__version__ = "0.165.0" # x-release-please-version From 98f4d0a78b537fe8c9848125a4c3c41a68f18443 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:37:20 +0000 Subject: [PATCH 0337/1325] chore(internal): fix compat model_dump method when warnings are passed (#847) --- src/increase/_compat.py | 3 ++- tests/test_models.py | 8 ++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 4794129c4..df173f85e 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -145,7 +145,8 @@ def model_dump( exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, - warnings=warnings, + # warnings are not supported in Pydantic v1 + warnings=warnings if PYDANTIC_V2 else True, ) return cast( "dict[str, Any]", diff --git a/tests/test_models.py b/tests/test_models.py index adbf5f939..5d2ac4e1d 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -561,6 +561,14 @@ class Model(BaseModel): m.model_dump(warnings=False) +def test_compat_method_no_error_for_warnings() -> None: + class Model(BaseModel): + foo: Optional[str] + + m = Model(foo="hello") + assert isinstance(model_dump(m, warnings=False), dict) + + def test_to_json() -> None: class Model(BaseModel): foo: Optional[str] = Field(alias="FOO", default=None) From 3c5fac524bb5a96f39e314abca647da146334ddc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:21:52 +0000 Subject: [PATCH 0338/1325] docs: add info log level to readme (#849) --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index f845add04..064156d18 100644 --- a/README.md +++ b/README.md @@ -284,12 +284,14 @@ Note that requests that time out are [retried twice by default](#retries). We use the standard library [`logging`](https://docs.python.org/3/library/logging.html) module. -You can enable logging by setting the environment variable `INCREASE_LOG` to `debug`. +You can enable logging by setting the environment variable `INCREASE_LOG` to `info`. ```shell -$ export INCREASE_LOG=debug +$ export INCREASE_LOG=info ``` +Or to `debug` for more verbose logging. + ### How to tell whether `None` means `null` or missing In an API response, a field may be explicitly `null`, or missing entirely; in either case, its value is `None` in this library. You can differentiate the two cases with `.model_fields_set`: From 0e04cc8413582ddf38e36e625cad0f18d853abb5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Nov 2024 12:31:02 +0000 Subject: [PATCH 0339/1325] chore: remove now unused `cached-property` dep (#850) --- pyproject.toml | 1 - src/increase/_compat.py | 5 +---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3735a7f84..527038ef6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -14,7 +14,6 @@ dependencies = [ "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", - "cached-property; python_version < '3.8'", ] requires-python = ">= 3.8" classifiers = [ diff --git a/src/increase/_compat.py b/src/increase/_compat.py index df173f85e..92d9ee61e 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -214,9 +214,6 @@ def __set_name__(self, owner: type[Any], name: str) -> None: ... # __set__ is not defined at runtime, but @cached_property is designed to be settable def __set__(self, instance: object, value: _T) -> None: ... else: - try: - from functools import cached_property as cached_property - except ImportError: - from cached_property import cached_property as cached_property + from functools import cached_property as cached_property typed_cached_property = cached_property From fa6fd3d15040347fe32da7b8ebc8ed12b18bf0ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Nov 2024 18:52:02 +0000 Subject: [PATCH 0340/1325] chore(internal): codegen related update (#851) --- mypy.ini | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mypy.ini b/mypy.ini index f3e97c62c..42fb84c25 100644 --- a/mypy.ini +++ b/mypy.ini @@ -5,7 +5,10 @@ show_error_codes = True # Exclude _files.py because mypy isn't smart enough to apply # the correct type narrowing and as this is an internal module # it's fine to just use Pyright. -exclude = ^(src/increase/_files\.py|_dev/.*\.py)$ +# +# We also exclude our `tests` as mypy doesn't always infer +# types correctly and Pyright will still catch any type errors. +exclude = ^(src/increase/_files\.py|_dev/.*\.py|tests/.*)$ strict_equality = True implicit_reexport = True From 6e9724c15f8e0216d8c8b06e58f2da7f872c881d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:14:28 +0000 Subject: [PATCH 0341/1325] fix(client): compat with new httpx 0.28.0 release (#852) --- src/increase/_base_client.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 92681ce90..5d09af06c 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -792,6 +792,7 @@ def __init__( custom_query: Mapping[str, object] | None = None, _strict_response_validation: bool, ) -> None: + kwargs: dict[str, Any] = {} if limits is not None: warnings.warn( "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", @@ -804,6 +805,7 @@ def __init__( limits = DEFAULT_CONNECTION_LIMITS if transport is not None: + kwargs["transport"] = transport warnings.warn( "The `transport` argument is deprecated. The `http_client` argument should be passed instead", category=DeprecationWarning, @@ -813,6 +815,7 @@ def __init__( raise ValueError("The `http_client` argument is mutually exclusive with `transport`") if proxies is not None: + kwargs["proxies"] = proxies warnings.warn( "The `proxies` argument is deprecated. The `http_client` argument should be passed instead", category=DeprecationWarning, @@ -856,10 +859,9 @@ def __init__( base_url=base_url, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - proxies=proxies, - transport=transport, limits=limits, follow_redirects=True, + **kwargs, # type: ignore ) def is_closed(self) -> bool: @@ -1358,6 +1360,7 @@ def __init__( custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, ) -> None: + kwargs: dict[str, Any] = {} if limits is not None: warnings.warn( "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", @@ -1370,6 +1373,7 @@ def __init__( limits = DEFAULT_CONNECTION_LIMITS if transport is not None: + kwargs["transport"] = transport warnings.warn( "The `transport` argument is deprecated. The `http_client` argument should be passed instead", category=DeprecationWarning, @@ -1379,6 +1383,7 @@ def __init__( raise ValueError("The `http_client` argument is mutually exclusive with `transport`") if proxies is not None: + kwargs["proxies"] = proxies warnings.warn( "The `proxies` argument is deprecated. The `http_client` argument should be passed instead", category=DeprecationWarning, @@ -1422,10 +1427,9 @@ def __init__( base_url=base_url, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - proxies=proxies, - transport=transport, limits=limits, follow_redirects=True, + **kwargs, # type: ignore ) def is_closed(self) -> bool: From 46d87a57a6b591c54a4d3a08f21e58661a85eb8e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Nov 2024 16:15:43 +0000 Subject: [PATCH 0342/1325] chore(internal): version bump (#853) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 684b87104..ef7a1f97b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.165.0" + ".": "0.165.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 527038ef6..1eb95e689 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.165.0" +version = "0.165.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a36f1dc63..4e2aeb6cf 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.165.0" # x-release-please-version +__version__ = "0.165.1" # x-release-please-version From d93185715c9d0e7904c5683611f161168de01369 Mon Sep 17 00:00:00 2001 From: stainless-bot Date: Sun, 1 Dec 2024 01:15:16 +0000 Subject: [PATCH 0343/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 61aabba30..89b312717 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fb150851a7b999aa231fd826e5365716f9c7d487a3fc1bb0a9df65bdfdfeca3.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfcf5db7f516232df0d5bd6dee501dd267b0d3882f84bc15cb57545161ef221b.yml From ff02fe76a8c266ed5e8df6cb1f8812e89a76f153 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Dec 2024 20:41:34 +0000 Subject: [PATCH 0344/1325] chore(internal): bump pyright (#854) --- requirements-dev.lock | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index f26949eec..8e2af7ec3 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -68,7 +68,7 @@ pydantic-core==2.23.4 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.380 +pyright==1.1.389 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 @@ -97,6 +97,7 @@ typing-extensions==4.12.2 # via mypy # via pydantic # via pydantic-core + # via pyright virtualenv==20.24.5 # via nox zipp==3.17.0 From 868287d91ca8cca19e68b2967626a0ba1550efda Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 02:12:46 +0000 Subject: [PATCH 0345/1325] chore: make the `Omit` type public (#856) --- src/increase/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 519cb0b5a..3e9191eb8 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from . import types -from ._types import NOT_GIVEN, NoneType, NotGiven, Transport, ProxiesTypes +from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes from ._utils import file_from_path from ._client import ( ENVIRONMENTS, @@ -58,6 +58,7 @@ "ProxiesTypes", "NotGiven", "NOT_GIVEN", + "Omit", "IncreaseError", "APIError", "APIStatusError", From 6714a5177f87a3a1f83d6579eaed7e32514a1e83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:44:38 +0000 Subject: [PATCH 0346/1325] feat(api): api update (#857) --- .stats.yml | 2 +- src/increase/types/real_time_payments_transfer.py | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 89b312717..bf1915dc1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfcf5db7f516232df0d5bd6dee501dd267b0d3882f84bc15cb57545161ef221b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-120670f0bcb7ab318b5b09e639e25e243d2cb7a630a27aebb4f94395b1fc337b.yml diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 1ad2cee2c..eec89c8f8 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -8,6 +8,7 @@ __all__ = [ "RealTimePaymentsTransfer", + "Acknowledgement", "Approval", "Cancellation", "CreatedBy", @@ -19,6 +20,11 @@ ] +class Acknowledgement(BaseModel): + acknowledged_at: datetime + """When the transfer was acknowledged.""" + + class Approval(BaseModel): approved_at: datetime """ @@ -192,6 +198,12 @@ class RealTimePaymentsTransfer(BaseModel): account_id: str """The Account from which the transfer was sent.""" + acknowledgement: Optional[Acknowledgement] = None + """ + If the transfer is acknowledged by the recipient bank, this will contain + supplemental details. + """ + amount: int """The transfer amount in USD cents.""" From 090dc913cfadae1c23659e1de81111b3bab49f47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Dec 2024 19:49:45 +0000 Subject: [PATCH 0347/1325] chore(internal): codegen related update (#858) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ef7a1f97b..bc66e2233 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.165.1" + ".": "0.166.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1eb95e689..5256f366b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.165.1" +version = "0.166.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4e2aeb6cf..34fb8ca25 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.165.1" # x-release-please-version +__version__ = "0.166.0" # x-release-please-version From 26d5d1971c52e42c154d98e32cfda35874ebc18b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 14:34:27 +0000 Subject: [PATCH 0348/1325] chore(internal): bump pydantic dependency (#859) --- requirements-dev.lock | 4 ++-- requirements.lock | 4 ++-- src/increase/_types.py | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 8e2af7ec3..6e89e5922 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -62,9 +62,9 @@ platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 # via pytest -pydantic==2.9.2 +pydantic==2.10.3 # via increase -pydantic-core==2.23.4 +pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich diff --git a/requirements.lock b/requirements.lock index 807b908ca..a1809fbc0 100644 --- a/requirements.lock +++ b/requirements.lock @@ -30,9 +30,9 @@ httpx==0.25.2 idna==3.4 # via anyio # via httpx -pydantic==2.9.2 +pydantic==2.10.3 # via increase -pydantic-core==2.23.4 +pydantic-core==2.27.1 # via pydantic sniffio==1.3.0 # via anyio diff --git a/src/increase/_types.py b/src/increase/_types.py index 712903111..dac505fb8 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -192,10 +192,8 @@ def get(self, __key: str) -> str | None: ... StrBytesIntFloat = Union[str, bytes, int, float] # Note: copied from Pydantic -# https://github.com/pydantic/pydantic/blob/32ea570bf96e84234d2992e1ddf40ab8a565925a/pydantic/main.py#L49 -IncEx: TypeAlias = Union[ - Set[int], Set[str], Mapping[int, Union["IncEx", Literal[True]]], Mapping[str, Union["IncEx", Literal[True]]] -] +# https://github.com/pydantic/pydantic/blob/6f31f8f68ef011f84357330186f603ff295312fd/pydantic/main.py#L79 +IncEx: TypeAlias = Union[Set[int], Set[str], Mapping[int, Union["IncEx", bool]], Mapping[str, Union["IncEx", bool]]] PostParser = Callable[[Any], Any] From cf3c0433ae48b72d254ba11cf683bfc95238f39d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 18:15:16 +0000 Subject: [PATCH 0349/1325] docs(readme): fix http client proxies example (#861) --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 064156d18..3bd7faa62 100644 --- a/README.md +++ b/README.md @@ -386,18 +386,19 @@ can also get all the extra fields on the Pydantic model as a dict with You can directly override the [httpx client](https://www.python-httpx.org/api/#client) to customize it for your use case, including: -- Support for proxies -- Custom transports +- Support for [proxies](https://www.python-httpx.org/advanced/proxies/) +- Custom [transports](https://www.python-httpx.org/advanced/transports/) - Additional [advanced](https://www.python-httpx.org/advanced/clients/) functionality ```python +import httpx from increase import Increase, DefaultHttpxClient client = Increase( # Or use the `INCREASE_BASE_URL` env var base_url="http://my.test.server.example.com:8083", http_client=DefaultHttpxClient( - proxies="http://my.test.proxy.example.com", + proxy="http://my.test.proxy.example.com", transport=httpx.HTTPTransport(local_address="0.0.0.0"), ), ) From a480d6963c1fbca1b4ddb358e744c02ecfab1734 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:29:49 +0000 Subject: [PATCH 0350/1325] feat(api): api update (#862) --- .stats.yml | 2 +- src/increase/resources/bookkeeping_entries.py | 8 ++++++++ src/increase/types/bookkeeping_entry_list_params.py | 3 +++ tests/api_resources/test_bookkeeping_entries.py | 2 ++ 4 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bf1915dc1..1b56b62b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-120670f0bcb7ab318b5b09e639e25e243d2cb7a630a27aebb4f94395b1fc337b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92b3218777bbba277b31ea137f39b68f565e6ad3c653aca0f2d30db51e5fe3c7.yml diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index be096e4c2..dbeb8d91d 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -82,6 +82,7 @@ def retrieve( def list( self, *, + account_id: str | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -95,6 +96,8 @@ def list( List Bookkeeping Entries Args: + account_id: The identifier for the Bookkeeping Account to filter by. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -118,6 +121,7 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, }, @@ -188,6 +192,7 @@ async def retrieve( def list( self, *, + account_id: str | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -201,6 +206,8 @@ def list( List Bookkeeping Entries Args: + account_id: The identifier for the Bookkeeping Account to filter by. + cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 @@ -224,6 +231,7 @@ def list( timeout=timeout, query=maybe_transform( { + "account_id": account_id, "cursor": cursor, "limit": limit, }, diff --git a/src/increase/types/bookkeeping_entry_list_params.py b/src/increase/types/bookkeeping_entry_list_params.py index c0550e5aa..243b9bf9e 100644 --- a/src/increase/types/bookkeeping_entry_list_params.py +++ b/src/increase/types/bookkeeping_entry_list_params.py @@ -8,6 +8,9 @@ class BookkeepingEntryListParams(TypedDict, total=False): + account_id: str + """The identifier for the Bookkeeping Account to filter by.""" + cursor: str """Return the page of entries after this one.""" diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 8d7b8942e..4d48e6d38 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -64,6 +64,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.list( + account_id="account_id", cursor="cursor", limit=1, ) @@ -139,6 +140,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.list( + account_id="account_id", cursor="cursor", limit=1, ) From fa012e4b5f8cbb85489c44ceb4647e1343bbe664 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 23:31:03 +0000 Subject: [PATCH 0351/1325] chore(internal): version bump (#863) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc66e2233..17511e3de 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.166.0" + ".": "0.167.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5256f366b..59acf8f72 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.166.0" +version = "0.167.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 34fb8ca25..8768317ba 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.166.0" # x-release-please-version +__version__ = "0.167.0" # x-release-please-version From 5b994fd16560c4551c124ff45311b29bf41a599b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:46:03 +0000 Subject: [PATCH 0352/1325] feat(api): api update (#864) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 54 ++++++++++++++++++++++++++++++ src/increase/types/transaction.py | 54 ++++++++++++++++++++++++++++++ 3 files changed, 109 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 1b56b62b8..569413132 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92b3218777bbba277b31ea137f39b68f565e6ad3c653aca0f2d30db51e5fe3c7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-78e72b144632da0b6b61ec57723ee42bb7c5d40461ecf2849cb7983d69ee8299.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a14b2f97e..45ecaf50e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -29,6 +29,7 @@ "ElementCardIncrement", "ElementCardIncrementNetworkIdentifiers", "ElementCardRefund", + "ElementCardRefundCashback", "ElementCardRefundInterchange", "ElementCardRefundNetworkIdentifiers", "ElementCardRefundPurchaseDetails", @@ -41,6 +42,7 @@ "ElementCardReversal", "ElementCardReversalNetworkIdentifiers", "ElementCardSettlement", + "ElementCardSettlementCashback", "ElementCardSettlementInterchange", "ElementCardSettlementNetworkIdentifiers", "ElementCardSettlementPurchaseDetails", @@ -1074,6 +1076,26 @@ class ElementCardIncrement(BaseModel): """ +class ElementCardRefundCashback(BaseModel): + amount: str + """The cashback amount given as a string containing a decimal number. + + The amount is a positive number if it will be credited to you (e.g., + settlements) and a negative number if it will be debited (e.g., refunds). + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class ElementCardRefundInterchange(BaseModel): amount: str """The interchange amount given as a string containing a decimal number. @@ -1536,6 +1558,12 @@ class ElementCardRefund(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" + cashback: Optional[ElementCardRefundCashback] = None + """Cashback debited for this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the @@ -1729,6 +1757,26 @@ class ElementCardReversal(BaseModel): """ +class ElementCardSettlementCashback(BaseModel): + amount: str + """The cashback amount given as a string containing a decimal number. + + The amount is a positive number if it will be credited to you (e.g., + settlements) and a negative number if it will be debited (e.g., refunds). + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class ElementCardSettlementInterchange(BaseModel): amount: str """The interchange amount given as a string containing a decimal number. @@ -2197,6 +2245,12 @@ class ElementCardSettlement(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" + cashback: Optional[ElementCardSettlementCashback] = None + """Cashback earned on this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index eaf1a32b7..da4812236 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -16,6 +16,7 @@ "SourceCardDisputeAcceptance", "SourceCardDisputeLoss", "SourceCardRefund", + "SourceCardRefundCashback", "SourceCardRefundInterchange", "SourceCardRefundNetworkIdentifiers", "SourceCardRefundPurchaseDetails", @@ -27,6 +28,7 @@ "SourceCardRefundPurchaseDetailsTravelTripLeg", "SourceCardRevenuePayment", "SourceCardSettlement", + "SourceCardSettlementCashback", "SourceCardSettlementInterchange", "SourceCardSettlementNetworkIdentifiers", "SourceCardSettlementPurchaseDetails", @@ -405,6 +407,26 @@ class SourceCardDisputeLoss(BaseModel): """ +class SourceCardRefundCashback(BaseModel): + amount: str + """The cashback amount given as a string containing a decimal number. + + The amount is a positive number if it will be credited to you (e.g., + settlements) and a negative number if it will be debited (e.g., refunds). + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class SourceCardRefundInterchange(BaseModel): amount: str """The interchange amount given as a string containing a decimal number. @@ -867,6 +889,12 @@ class SourceCardRefund(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" + cashback: Optional[SourceCardRefundCashback] = None + """Cashback debited for this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the @@ -965,6 +993,26 @@ class SourceCardRevenuePayment(BaseModel): """The account the card belonged to.""" +class SourceCardSettlementCashback(BaseModel): + amount: str + """The cashback amount given as a string containing a decimal number. + + The amount is a positive number if it will be credited to you (e.g., + settlements) and a negative number if it will be debited (e.g., refunds). + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + class SourceCardSettlementInterchange(BaseModel): amount: str """The interchange amount given as a string containing a decimal number. @@ -1433,6 +1481,12 @@ class SourceCardSettlement(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" + cashback: Optional[SourceCardSettlementCashback] = None + """Cashback earned on this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the From bc3f9242767ef2cbca59f13e9b38744ec75aa004 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 00:47:28 +0000 Subject: [PATCH 0353/1325] chore(internal): version bump (#866) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 17511e3de..f1e475d0d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.167.0" + ".": "0.168.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 59acf8f72..cb07a6d76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.167.0" +version = "0.168.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8768317ba..1e9350c10 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.167.0" # x-release-please-version +__version__ = "0.168.0" # x-release-please-version From dbf66a46031d3bdfa92360a29a979933d4dd1aa4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:11:32 +0000 Subject: [PATCH 0354/1325] chore(internal): bump pyright (#867) --- requirements-dev.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 6e89e5922..f93fb910c 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -68,7 +68,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.389 +pyright==1.1.390 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 From e732100e92f602fec45667dbe7cb0992d713878f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Dec 2024 12:37:14 +0000 Subject: [PATCH 0355/1325] chore(internal): add support for TypeAliasType (#869) --- pyproject.toml | 2 +- src/increase/_models.py | 3 +++ src/increase/_response.py | 20 ++++++++++---------- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_typing.py | 31 ++++++++++++++++++++++++++++++- tests/test_models.py | 18 +++++++++++++++++- tests/utils.py | 4 ++++ 7 files changed, 66 insertions(+), 13 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cb07a6d76..1ed403793 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.7, <5", + "typing-extensions>=4.10, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", diff --git a/src/increase/_models.py b/src/increase/_models.py index 6cb469e21..7a547ce5c 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -46,6 +46,7 @@ strip_not_given, extract_type_arg, is_annotated_type, + is_type_alias_type, strip_annotated_type, ) from ._compat import ( @@ -428,6 +429,8 @@ def construct_type(*, value: object, type_: object) -> object: # we allow `object` as the input type because otherwise, passing things like # `Literal['value']` will be reported as a type error by type checkers type_ = cast("type[object]", type_) + if is_type_alias_type(type_): + type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` if is_annotated_type(type_): diff --git a/src/increase/_response.py b/src/increase/_response.py index 399a2394e..2f83cff61 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -25,7 +25,7 @@ import pydantic from ._types import NoneType -from ._utils import is_given, extract_type_arg, is_annotated_type, extract_type_var_from_base +from ._utils import is_given, extract_type_arg, is_annotated_type, is_type_alias_type, extract_type_var_from_base from ._models import BaseModel, is_basemodel from ._constants import RAW_RESPONSE_HEADER, OVERRIDE_CAST_TO_HEADER from ._streaming import Stream, AsyncStream, is_stream_class_type, extract_stream_chunk_type @@ -126,9 +126,15 @@ def __repr__(self) -> str: ) def _parse(self, *, to: type[_T] | None = None) -> R | _T: + cast_to = to if to is not None else self._cast_to + + # unwrap `TypeAlias('Name', T)` -> `T` + if is_type_alias_type(cast_to): + cast_to = cast_to.__value__ # type: ignore[unreachable] + # unwrap `Annotated[T, ...]` -> `T` - if to and is_annotated_type(to): - to = extract_type_arg(to, 0) + if cast_to and is_annotated_type(cast_to): + cast_to = extract_type_arg(cast_to, 0) if self._is_sse_stream: if to: @@ -164,18 +170,12 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: return cast( R, stream_cls( - cast_to=self._cast_to, + cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), ), ) - cast_to = to if to is not None else self._cast_to - - # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(cast_to): - cast_to = extract_type_arg(cast_to, 0) - if cast_to is NoneType: return cast(R, None) diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index a7cff3c09..d4fda26f3 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -39,6 +39,7 @@ is_iterable_type as is_iterable_type, is_required_type as is_required_type, is_annotated_type as is_annotated_type, + is_type_alias_type as is_type_alias_type, strip_annotated_type as strip_annotated_type, extract_type_var_from_base as extract_type_var_from_base, ) diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py index c036991f0..278749b14 100644 --- a/src/increase/_utils/_typing.py +++ b/src/increase/_utils/_typing.py @@ -1,8 +1,17 @@ from __future__ import annotations +import sys +import typing +import typing_extensions from typing import Any, TypeVar, Iterable, cast from collections import abc as _c_abc -from typing_extensions import Required, Annotated, get_args, get_origin +from typing_extensions import ( + TypeIs, + Required, + Annotated, + get_args, + get_origin, +) from .._types import InheritsGeneric from .._compat import is_union as _is_union @@ -36,6 +45,26 @@ def is_typevar(typ: type) -> bool: return type(typ) == TypeVar # type: ignore +_TYPE_ALIAS_TYPES: tuple[type[typing_extensions.TypeAliasType], ...] = (typing_extensions.TypeAliasType,) +if sys.version_info >= (3, 12): + _TYPE_ALIAS_TYPES = (*_TYPE_ALIAS_TYPES, typing.TypeAliasType) + + +def is_type_alias_type(tp: Any, /) -> TypeIs[typing_extensions.TypeAliasType]: + """Return whether the provided argument is an instance of `TypeAliasType`. + + ```python + type Int = int + is_type_alias_type(Int) + # > True + Str = TypeAliasType("Str", str) + is_type_alias_type(Str) + # > True + ``` + """ + return isinstance(tp, _TYPE_ALIAS_TYPES) + + # Extracts T from Annotated[T, ...] or from Required[Annotated[T, ...]] def strip_annotated_type(typ: type) -> type: if is_required_type(typ) or is_annotated_type(typ): diff --git a/tests/test_models.py b/tests/test_models.py index 5d2ac4e1d..f4a286767 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,7 +1,7 @@ import json from typing import Any, Dict, List, Union, Optional, cast from datetime import datetime, timezone -from typing_extensions import Literal, Annotated +from typing_extensions import Literal, Annotated, TypeAliasType import pytest import pydantic @@ -828,3 +828,19 @@ class B(BaseModel): # if the discriminator details object stays the same between invocations then # we hit the cache assert UnionType.__discriminator__ is discriminator + + +@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +def test_type_alias_type() -> None: + Alias = TypeAliasType("Alias", str) + + class Model(BaseModel): + alias: Alias + union: Union[int, Alias] + + m = construct_type(value={"alias": "foo", "union": "bar"}, type_=Model) + assert isinstance(m, Model) + assert isinstance(m.alias, str) + assert m.alias == "foo" + assert isinstance(m.union, str) + assert m.union == "bar" diff --git a/tests/utils.py b/tests/utils.py index 4aebddc95..553f11c59 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -16,6 +16,7 @@ is_union_type, extract_type_arg, is_annotated_type, + is_type_alias_type, ) from increase._compat import PYDANTIC_V2, field_outer_type, get_model_fields from increase._models import BaseModel @@ -51,6 +52,9 @@ def assert_matches_type( path: list[str], allow_none: bool = False, ) -> None: + if is_type_alias_type(type_): + type_ = type_.__value__ + # unwrap `Annotated[T, ...]` -> `T` if is_annotated_type(type_): type_ = extract_type_arg(type_, 0) From 8f5544ed0ec5a57e1131888cf7adada533f7e19a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Dec 2024 13:58:58 +0000 Subject: [PATCH 0356/1325] chore(internal): updated imports (#870) --- src/increase/_client.py | 1080 ++++++++++++++++++++++----------------- 1 file changed, 625 insertions(+), 455 deletions(-) diff --git a/src/increase/_client.py b/src/increase/_client.py index e1cff4fb1..826929b4e 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -8,7 +8,7 @@ import httpx -from . import resources, _exceptions +from . import _exceptions from ._qs import Querystring from ._types import ( NOT_GIVEN, @@ -25,6 +25,60 @@ get_async_library, ) from ._version import __version__ +from .resources import ( + cards, + files, + events, + groups, + exports, + accounts, + entities, + programs, + documents, + lockboxes, + oauth_tokens, + transactions, + ach_transfers, + card_disputes, + card_payments, + check_deposits, + physical_cards, + wire_transfers, + account_numbers, + check_transfers, + routing_numbers, + intrafi_balances, + account_transfers, + external_accounts, + oauth_connections, + account_statements, + inbound_mail_items, + intrafi_exclusions, + bookkeeping_entries, + event_subscriptions, + real_time_decisions, + ach_prenotifications, + bookkeeping_accounts, + pending_transactions, + declined_transactions, + digital_card_profiles, + digital_wallet_tokens, + inbound_ach_transfers, + bookkeeping_entry_sets, + inbound_check_deposits, + inbound_wire_transfers, + physical_card_profiles, + supplemental_documents, + wire_drawdown_requests, + card_purchase_supplements, + intrafi_account_enrollments, + real_time_payments_transfers, + inbound_wire_drawdown_requests, + proof_of_authorization_requests, + inbound_real_time_payments_transfers, + real_time_payments_request_for_payments, + proof_of_authorization_request_submissions, +) from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( @@ -32,6 +86,7 @@ SyncAPIClient, AsyncAPIClient, ) +from .resources.simulations import simulations __all__ = [ "ENVIRONMENTS", @@ -39,7 +94,6 @@ "Transport", "ProxiesTypes", "RequestOptions", - "resources", "Increase", "AsyncIncrease", "Client", @@ -53,59 +107,63 @@ class Increase(SyncAPIClient): - accounts: resources.AccountsResource - account_numbers: resources.AccountNumbersResource - cards: resources.CardsResource - card_payments: resources.CardPaymentsResource - card_purchase_supplements: resources.CardPurchaseSupplementsResource - card_disputes: resources.CardDisputesResource - physical_cards: resources.PhysicalCardsResource - digital_card_profiles: resources.DigitalCardProfilesResource - physical_card_profiles: resources.PhysicalCardProfilesResource - digital_wallet_tokens: resources.DigitalWalletTokensResource - transactions: resources.TransactionsResource - pending_transactions: resources.PendingTransactionsResource - declined_transactions: resources.DeclinedTransactionsResource - account_transfers: resources.AccountTransfersResource - ach_transfers: resources.ACHTransfersResource - ach_prenotifications: resources.ACHPrenotificationsResource - inbound_ach_transfers: resources.InboundACHTransfersResource - wire_transfers: resources.WireTransfersResource - inbound_wire_transfers: resources.InboundWireTransfersResource - wire_drawdown_requests: resources.WireDrawdownRequestsResource - inbound_wire_drawdown_requests: resources.InboundWireDrawdownRequestsResource - check_transfers: resources.CheckTransfersResource - inbound_check_deposits: resources.InboundCheckDepositsResource - real_time_payments_transfers: resources.RealTimePaymentsTransfersResource - inbound_real_time_payments_transfers: resources.InboundRealTimePaymentsTransfersResource - check_deposits: resources.CheckDepositsResource - lockboxes: resources.LockboxesResource - inbound_mail_items: resources.InboundMailItemsResource - routing_numbers: resources.RoutingNumbersResource - external_accounts: resources.ExternalAccountsResource - entities: resources.EntitiesResource - supplemental_documents: resources.SupplementalDocumentsResource - programs: resources.ProgramsResource - proof_of_authorization_requests: resources.ProofOfAuthorizationRequestsResource - proof_of_authorization_request_submissions: resources.ProofOfAuthorizationRequestSubmissionsResource - account_statements: resources.AccountStatementsResource - files: resources.FilesResource - documents: resources.DocumentsResource - exports: resources.ExportsResource - events: resources.EventsResource - event_subscriptions: resources.EventSubscriptionsResource - real_time_decisions: resources.RealTimeDecisionsResource - bookkeeping_accounts: resources.BookkeepingAccountsResource - bookkeeping_entry_sets: resources.BookkeepingEntrySetsResource - bookkeeping_entries: resources.BookkeepingEntriesResource - groups: resources.GroupsResource - oauth_connections: resources.OAuthConnectionsResource - oauth_tokens: resources.OAuthTokensResource - intrafi_account_enrollments: resources.IntrafiAccountEnrollmentsResource - intrafi_balances: resources.IntrafiBalancesResource - intrafi_exclusions: resources.IntrafiExclusionsResource - real_time_payments_request_for_payments: resources.RealTimePaymentsRequestForPaymentsResource - simulations: resources.SimulationsResource + accounts: accounts.AccountsResource + account_numbers: account_numbers.AccountNumbersResource + cards: cards.CardsResource + card_payments: card_payments.CardPaymentsResource + card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource + card_disputes: card_disputes.CardDisputesResource + physical_cards: physical_cards.PhysicalCardsResource + digital_card_profiles: digital_card_profiles.DigitalCardProfilesResource + physical_card_profiles: physical_card_profiles.PhysicalCardProfilesResource + digital_wallet_tokens: digital_wallet_tokens.DigitalWalletTokensResource + transactions: transactions.TransactionsResource + pending_transactions: pending_transactions.PendingTransactionsResource + declined_transactions: declined_transactions.DeclinedTransactionsResource + account_transfers: account_transfers.AccountTransfersResource + ach_transfers: ach_transfers.ACHTransfersResource + ach_prenotifications: ach_prenotifications.ACHPrenotificationsResource + inbound_ach_transfers: inbound_ach_transfers.InboundACHTransfersResource + wire_transfers: wire_transfers.WireTransfersResource + inbound_wire_transfers: inbound_wire_transfers.InboundWireTransfersResource + wire_drawdown_requests: wire_drawdown_requests.WireDrawdownRequestsResource + inbound_wire_drawdown_requests: inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResource + check_transfers: check_transfers.CheckTransfersResource + inbound_check_deposits: inbound_check_deposits.InboundCheckDepositsResource + real_time_payments_transfers: real_time_payments_transfers.RealTimePaymentsTransfersResource + inbound_real_time_payments_transfers: inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource + check_deposits: check_deposits.CheckDepositsResource + lockboxes: lockboxes.LockboxesResource + inbound_mail_items: inbound_mail_items.InboundMailItemsResource + routing_numbers: routing_numbers.RoutingNumbersResource + external_accounts: external_accounts.ExternalAccountsResource + entities: entities.EntitiesResource + supplemental_documents: supplemental_documents.SupplementalDocumentsResource + programs: programs.ProgramsResource + proof_of_authorization_requests: proof_of_authorization_requests.ProofOfAuthorizationRequestsResource + proof_of_authorization_request_submissions: ( + proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResource + ) + account_statements: account_statements.AccountStatementsResource + files: files.FilesResource + documents: documents.DocumentsResource + exports: exports.ExportsResource + events: events.EventsResource + event_subscriptions: event_subscriptions.EventSubscriptionsResource + real_time_decisions: real_time_decisions.RealTimeDecisionsResource + bookkeeping_accounts: bookkeeping_accounts.BookkeepingAccountsResource + bookkeeping_entry_sets: bookkeeping_entry_sets.BookkeepingEntrySetsResource + bookkeeping_entries: bookkeeping_entries.BookkeepingEntriesResource + groups: groups.GroupsResource + oauth_connections: oauth_connections.OAuthConnectionsResource + oauth_tokens: oauth_tokens.OAuthTokensResource + intrafi_account_enrollments: intrafi_account_enrollments.IntrafiAccountEnrollmentsResource + intrafi_balances: intrafi_balances.IntrafiBalancesResource + intrafi_exclusions: intrafi_exclusions.IntrafiExclusionsResource + real_time_payments_request_for_payments: ( + real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResource + ) + simulations: simulations.SimulationsResource with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -197,59 +255,67 @@ def __init__( self._idempotency_header = "Idempotency-Key" - self.accounts = resources.AccountsResource(self) - self.account_numbers = resources.AccountNumbersResource(self) - self.cards = resources.CardsResource(self) - self.card_payments = resources.CardPaymentsResource(self) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResource(self) - self.card_disputes = resources.CardDisputesResource(self) - self.physical_cards = resources.PhysicalCardsResource(self) - self.digital_card_profiles = resources.DigitalCardProfilesResource(self) - self.physical_card_profiles = resources.PhysicalCardProfilesResource(self) - self.digital_wallet_tokens = resources.DigitalWalletTokensResource(self) - self.transactions = resources.TransactionsResource(self) - self.pending_transactions = resources.PendingTransactionsResource(self) - self.declined_transactions = resources.DeclinedTransactionsResource(self) - self.account_transfers = resources.AccountTransfersResource(self) - self.ach_transfers = resources.ACHTransfersResource(self) - self.ach_prenotifications = resources.ACHPrenotificationsResource(self) - self.inbound_ach_transfers = resources.InboundACHTransfersResource(self) - self.wire_transfers = resources.WireTransfersResource(self) - self.inbound_wire_transfers = resources.InboundWireTransfersResource(self) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResource(self) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResource(self) - self.check_transfers = resources.CheckTransfersResource(self) - self.inbound_check_deposits = resources.InboundCheckDepositsResource(self) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResource(self) - self.inbound_real_time_payments_transfers = resources.InboundRealTimePaymentsTransfersResource(self) - self.check_deposits = resources.CheckDepositsResource(self) - self.lockboxes = resources.LockboxesResource(self) - self.inbound_mail_items = resources.InboundMailItemsResource(self) - self.routing_numbers = resources.RoutingNumbersResource(self) - self.external_accounts = resources.ExternalAccountsResource(self) - self.entities = resources.EntitiesResource(self) - self.supplemental_documents = resources.SupplementalDocumentsResource(self) - self.programs = resources.ProgramsResource(self) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.ProofOfAuthorizationRequestSubmissionsResource(self) - self.account_statements = resources.AccountStatementsResource(self) - self.files = resources.FilesResource(self) - self.documents = resources.DocumentsResource(self) - self.exports = resources.ExportsResource(self) - self.events = resources.EventsResource(self) - self.event_subscriptions = resources.EventSubscriptionsResource(self) - self.real_time_decisions = resources.RealTimeDecisionsResource(self) - self.bookkeeping_accounts = resources.BookkeepingAccountsResource(self) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResource(self) - self.bookkeeping_entries = resources.BookkeepingEntriesResource(self) - self.groups = resources.GroupsResource(self) - self.oauth_connections = resources.OAuthConnectionsResource(self) - self.oauth_tokens = resources.OAuthTokensResource(self) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResource(self) - self.intrafi_balances = resources.IntrafiBalancesResource(self) - self.intrafi_exclusions = resources.IntrafiExclusionsResource(self) - self.real_time_payments_request_for_payments = resources.RealTimePaymentsRequestForPaymentsResource(self) - self.simulations = resources.SimulationsResource(self) + self.accounts = accounts.AccountsResource(self) + self.account_numbers = account_numbers.AccountNumbersResource(self) + self.cards = cards.CardsResource(self) + self.card_payments = card_payments.CardPaymentsResource(self) + self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) + self.card_disputes = card_disputes.CardDisputesResource(self) + self.physical_cards = physical_cards.PhysicalCardsResource(self) + self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResource(self) + self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResource(self) + self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResource(self) + self.transactions = transactions.TransactionsResource(self) + self.pending_transactions = pending_transactions.PendingTransactionsResource(self) + self.declined_transactions = declined_transactions.DeclinedTransactionsResource(self) + self.account_transfers = account_transfers.AccountTransfersResource(self) + self.ach_transfers = ach_transfers.ACHTransfersResource(self) + self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResource(self) + self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResource(self) + self.wire_transfers = wire_transfers.WireTransfersResource(self) + self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResource(self) + self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResource(self) + self.inbound_wire_drawdown_requests = inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResource(self) + self.check_transfers = check_transfers.CheckTransfersResource(self) + self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResource(self) + self.real_time_payments_transfers = real_time_payments_transfers.RealTimePaymentsTransfersResource(self) + self.inbound_real_time_payments_transfers = ( + inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource(self) + ) + self.check_deposits = check_deposits.CheckDepositsResource(self) + self.lockboxes = lockboxes.LockboxesResource(self) + self.inbound_mail_items = inbound_mail_items.InboundMailItemsResource(self) + self.routing_numbers = routing_numbers.RoutingNumbersResource(self) + self.external_accounts = external_accounts.ExternalAccountsResource(self) + self.entities = entities.EntitiesResource(self) + self.supplemental_documents = supplemental_documents.SupplementalDocumentsResource(self) + self.programs = programs.ProgramsResource(self) + self.proof_of_authorization_requests = proof_of_authorization_requests.ProofOfAuthorizationRequestsResource( + self + ) + self.proof_of_authorization_request_submissions = ( + proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResource(self) + ) + self.account_statements = account_statements.AccountStatementsResource(self) + self.files = files.FilesResource(self) + self.documents = documents.DocumentsResource(self) + self.exports = exports.ExportsResource(self) + self.events = events.EventsResource(self) + self.event_subscriptions = event_subscriptions.EventSubscriptionsResource(self) + self.real_time_decisions = real_time_decisions.RealTimeDecisionsResource(self) + self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResource(self) + self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResource(self) + self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResource(self) + self.groups = groups.GroupsResource(self) + self.oauth_connections = oauth_connections.OAuthConnectionsResource(self) + self.oauth_tokens = oauth_tokens.OAuthTokensResource(self) + self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResource(self) + self.intrafi_balances = intrafi_balances.IntrafiBalancesResource(self) + self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResource(self) + self.real_time_payments_request_for_payments = ( + real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResource(self) + ) + self.simulations = simulations.SimulationsResource(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -408,59 +474,65 @@ def _make_status_error( class AsyncIncrease(AsyncAPIClient): - accounts: resources.AsyncAccountsResource - account_numbers: resources.AsyncAccountNumbersResource - cards: resources.AsyncCardsResource - card_payments: resources.AsyncCardPaymentsResource - card_purchase_supplements: resources.AsyncCardPurchaseSupplementsResource - card_disputes: resources.AsyncCardDisputesResource - physical_cards: resources.AsyncPhysicalCardsResource - digital_card_profiles: resources.AsyncDigitalCardProfilesResource - physical_card_profiles: resources.AsyncPhysicalCardProfilesResource - digital_wallet_tokens: resources.AsyncDigitalWalletTokensResource - transactions: resources.AsyncTransactionsResource - pending_transactions: resources.AsyncPendingTransactionsResource - declined_transactions: resources.AsyncDeclinedTransactionsResource - account_transfers: resources.AsyncAccountTransfersResource - ach_transfers: resources.AsyncACHTransfersResource - ach_prenotifications: resources.AsyncACHPrenotificationsResource - inbound_ach_transfers: resources.AsyncInboundACHTransfersResource - wire_transfers: resources.AsyncWireTransfersResource - inbound_wire_transfers: resources.AsyncInboundWireTransfersResource - wire_drawdown_requests: resources.AsyncWireDrawdownRequestsResource - inbound_wire_drawdown_requests: resources.AsyncInboundWireDrawdownRequestsResource - check_transfers: resources.AsyncCheckTransfersResource - inbound_check_deposits: resources.AsyncInboundCheckDepositsResource - real_time_payments_transfers: resources.AsyncRealTimePaymentsTransfersResource - inbound_real_time_payments_transfers: resources.AsyncInboundRealTimePaymentsTransfersResource - check_deposits: resources.AsyncCheckDepositsResource - lockboxes: resources.AsyncLockboxesResource - inbound_mail_items: resources.AsyncInboundMailItemsResource - routing_numbers: resources.AsyncRoutingNumbersResource - external_accounts: resources.AsyncExternalAccountsResource - entities: resources.AsyncEntitiesResource - supplemental_documents: resources.AsyncSupplementalDocumentsResource - programs: resources.AsyncProgramsResource - proof_of_authorization_requests: resources.AsyncProofOfAuthorizationRequestsResource - proof_of_authorization_request_submissions: resources.AsyncProofOfAuthorizationRequestSubmissionsResource - account_statements: resources.AsyncAccountStatementsResource - files: resources.AsyncFilesResource - documents: resources.AsyncDocumentsResource - exports: resources.AsyncExportsResource - events: resources.AsyncEventsResource - event_subscriptions: resources.AsyncEventSubscriptionsResource - real_time_decisions: resources.AsyncRealTimeDecisionsResource - bookkeeping_accounts: resources.AsyncBookkeepingAccountsResource - bookkeeping_entry_sets: resources.AsyncBookkeepingEntrySetsResource - bookkeeping_entries: resources.AsyncBookkeepingEntriesResource - groups: resources.AsyncGroupsResource - oauth_connections: resources.AsyncOAuthConnectionsResource - oauth_tokens: resources.AsyncOAuthTokensResource - intrafi_account_enrollments: resources.AsyncIntrafiAccountEnrollmentsResource - intrafi_balances: resources.AsyncIntrafiBalancesResource - intrafi_exclusions: resources.AsyncIntrafiExclusionsResource - real_time_payments_request_for_payments: resources.AsyncRealTimePaymentsRequestForPaymentsResource - simulations: resources.AsyncSimulationsResource + accounts: accounts.AsyncAccountsResource + account_numbers: account_numbers.AsyncAccountNumbersResource + cards: cards.AsyncCardsResource + card_payments: card_payments.AsyncCardPaymentsResource + card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource + card_disputes: card_disputes.AsyncCardDisputesResource + physical_cards: physical_cards.AsyncPhysicalCardsResource + digital_card_profiles: digital_card_profiles.AsyncDigitalCardProfilesResource + physical_card_profiles: physical_card_profiles.AsyncPhysicalCardProfilesResource + digital_wallet_tokens: digital_wallet_tokens.AsyncDigitalWalletTokensResource + transactions: transactions.AsyncTransactionsResource + pending_transactions: pending_transactions.AsyncPendingTransactionsResource + declined_transactions: declined_transactions.AsyncDeclinedTransactionsResource + account_transfers: account_transfers.AsyncAccountTransfersResource + ach_transfers: ach_transfers.AsyncACHTransfersResource + ach_prenotifications: ach_prenotifications.AsyncACHPrenotificationsResource + inbound_ach_transfers: inbound_ach_transfers.AsyncInboundACHTransfersResource + wire_transfers: wire_transfers.AsyncWireTransfersResource + inbound_wire_transfers: inbound_wire_transfers.AsyncInboundWireTransfersResource + wire_drawdown_requests: wire_drawdown_requests.AsyncWireDrawdownRequestsResource + inbound_wire_drawdown_requests: inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResource + check_transfers: check_transfers.AsyncCheckTransfersResource + inbound_check_deposits: inbound_check_deposits.AsyncInboundCheckDepositsResource + real_time_payments_transfers: real_time_payments_transfers.AsyncRealTimePaymentsTransfersResource + inbound_real_time_payments_transfers: ( + inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource + ) + check_deposits: check_deposits.AsyncCheckDepositsResource + lockboxes: lockboxes.AsyncLockboxesResource + inbound_mail_items: inbound_mail_items.AsyncInboundMailItemsResource + routing_numbers: routing_numbers.AsyncRoutingNumbersResource + external_accounts: external_accounts.AsyncExternalAccountsResource + entities: entities.AsyncEntitiesResource + supplemental_documents: supplemental_documents.AsyncSupplementalDocumentsResource + programs: programs.AsyncProgramsResource + proof_of_authorization_requests: proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResource + proof_of_authorization_request_submissions: ( + proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResource + ) + account_statements: account_statements.AsyncAccountStatementsResource + files: files.AsyncFilesResource + documents: documents.AsyncDocumentsResource + exports: exports.AsyncExportsResource + events: events.AsyncEventsResource + event_subscriptions: event_subscriptions.AsyncEventSubscriptionsResource + real_time_decisions: real_time_decisions.AsyncRealTimeDecisionsResource + bookkeeping_accounts: bookkeeping_accounts.AsyncBookkeepingAccountsResource + bookkeeping_entry_sets: bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource + bookkeeping_entries: bookkeeping_entries.AsyncBookkeepingEntriesResource + groups: groups.AsyncGroupsResource + oauth_connections: oauth_connections.AsyncOAuthConnectionsResource + oauth_tokens: oauth_tokens.AsyncOAuthTokensResource + intrafi_account_enrollments: intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource + intrafi_balances: intrafi_balances.AsyncIntrafiBalancesResource + intrafi_exclusions: intrafi_exclusions.AsyncIntrafiExclusionsResource + real_time_payments_request_for_payments: ( + real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResource + ) + simulations: simulations.AsyncSimulationsResource with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -552,61 +624,69 @@ def __init__( self._idempotency_header = "Idempotency-Key" - self.accounts = resources.AsyncAccountsResource(self) - self.account_numbers = resources.AsyncAccountNumbersResource(self) - self.cards = resources.AsyncCardsResource(self) - self.card_payments = resources.AsyncCardPaymentsResource(self) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResource(self) - self.card_disputes = resources.AsyncCardDisputesResource(self) - self.physical_cards = resources.AsyncPhysicalCardsResource(self) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResource(self) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResource(self) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResource(self) - self.transactions = resources.AsyncTransactionsResource(self) - self.pending_transactions = resources.AsyncPendingTransactionsResource(self) - self.declined_transactions = resources.AsyncDeclinedTransactionsResource(self) - self.account_transfers = resources.AsyncAccountTransfersResource(self) - self.ach_transfers = resources.AsyncACHTransfersResource(self) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResource(self) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResource(self) - self.wire_transfers = resources.AsyncWireTransfersResource(self) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResource(self) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResource(self) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResource(self) - self.check_transfers = resources.AsyncCheckTransfersResource(self) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResource(self) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResource(self) - self.inbound_real_time_payments_transfers = resources.AsyncInboundRealTimePaymentsTransfersResource(self) - self.check_deposits = resources.AsyncCheckDepositsResource(self) - self.lockboxes = resources.AsyncLockboxesResource(self) - self.inbound_mail_items = resources.AsyncInboundMailItemsResource(self) - self.routing_numbers = resources.AsyncRoutingNumbersResource(self) - self.external_accounts = resources.AsyncExternalAccountsResource(self) - self.entities = resources.AsyncEntitiesResource(self) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResource(self) - self.programs = resources.AsyncProgramsResource(self) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResource(self) - self.proof_of_authorization_request_submissions = resources.AsyncProofOfAuthorizationRequestSubmissionsResource( + self.accounts = accounts.AsyncAccountsResource(self) + self.account_numbers = account_numbers.AsyncAccountNumbersResource(self) + self.cards = cards.AsyncCardsResource(self) + self.card_payments = card_payments.AsyncCardPaymentsResource(self) + self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) + self.card_disputes = card_disputes.AsyncCardDisputesResource(self) + self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) + self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResource(self) + self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResource(self) + self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResource(self) + self.transactions = transactions.AsyncTransactionsResource(self) + self.pending_transactions = pending_transactions.AsyncPendingTransactionsResource(self) + self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResource(self) + self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) + self.ach_transfers = ach_transfers.AsyncACHTransfersResource(self) + self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResource(self) + self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResource(self) + self.wire_transfers = wire_transfers.AsyncWireTransfersResource(self) + self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResource(self) + self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResource(self) + self.inbound_wire_drawdown_requests = inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResource( self ) - self.account_statements = resources.AsyncAccountStatementsResource(self) - self.files = resources.AsyncFilesResource(self) - self.documents = resources.AsyncDocumentsResource(self) - self.exports = resources.AsyncExportsResource(self) - self.events = resources.AsyncEventsResource(self) - self.event_subscriptions = resources.AsyncEventSubscriptionsResource(self) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResource(self) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResource(self) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResource(self) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResource(self) - self.groups = resources.AsyncGroupsResource(self) - self.oauth_connections = resources.AsyncOAuthConnectionsResource(self) - self.oauth_tokens = resources.AsyncOAuthTokensResource(self) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResource(self) - self.intrafi_balances = resources.AsyncIntrafiBalancesResource(self) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResource(self) - self.real_time_payments_request_for_payments = resources.AsyncRealTimePaymentsRequestForPaymentsResource(self) - self.simulations = resources.AsyncSimulationsResource(self) + self.check_transfers = check_transfers.AsyncCheckTransfersResource(self) + self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResource(self) + self.real_time_payments_transfers = real_time_payments_transfers.AsyncRealTimePaymentsTransfersResource(self) + self.inbound_real_time_payments_transfers = ( + inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource(self) + ) + self.check_deposits = check_deposits.AsyncCheckDepositsResource(self) + self.lockboxes = lockboxes.AsyncLockboxesResource(self) + self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResource(self) + self.routing_numbers = routing_numbers.AsyncRoutingNumbersResource(self) + self.external_accounts = external_accounts.AsyncExternalAccountsResource(self) + self.entities = entities.AsyncEntitiesResource(self) + self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResource(self) + self.programs = programs.AsyncProgramsResource(self) + self.proof_of_authorization_requests = ( + proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResource(self) + ) + self.proof_of_authorization_request_submissions = ( + proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResource(self) + ) + self.account_statements = account_statements.AsyncAccountStatementsResource(self) + self.files = files.AsyncFilesResource(self) + self.documents = documents.AsyncDocumentsResource(self) + self.exports = exports.AsyncExportsResource(self) + self.events = events.AsyncEventsResource(self) + self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResource(self) + self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResource(self) + self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResource(self) + self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource(self) + self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResource(self) + self.groups = groups.AsyncGroupsResource(self) + self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResource(self) + self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResource(self) + self.intrafi_account_enrollments = intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource(self) + self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResource(self) + self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResource(self) + self.real_time_payments_request_for_payments = ( + real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResource(self) + ) + self.simulations = simulations.AsyncSimulationsResource(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -766,418 +846,508 @@ def _make_status_error( class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: - self.accounts = resources.AccountsResourceWithRawResponse(client.accounts) - self.account_numbers = resources.AccountNumbersResourceWithRawResponse(client.account_numbers) - self.cards = resources.CardsResourceWithRawResponse(client.cards) - self.card_payments = resources.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithRawResponse( + self.accounts = accounts.AccountsResourceWithRawResponse(client.accounts) + self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers) + self.cards = cards.CardsResourceWithRawResponse(client.cards) + self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments) + self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) - self.card_disputes = resources.CardDisputesResourceWithRawResponse(client.card_disputes) - self.physical_cards = resources.PhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithRawResponse(client.digital_card_profiles) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithRawResponse( + self.card_disputes = card_disputes.CardDisputesResourceWithRawResponse(client.card_disputes) + self.physical_cards = physical_cards.PhysicalCardsResourceWithRawResponse(client.physical_cards) + self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithRawResponse( + client.digital_card_profiles + ) + self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResourceWithRawResponse( client.physical_card_profiles ) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithRawResponse(client.digital_wallet_tokens) - self.transactions = resources.TransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithRawResponse(client.pending_transactions) - self.declined_transactions = resources.DeclinedTransactionsResourceWithRawResponse(client.declined_transactions) - self.account_transfers = resources.AccountTransfersResourceWithRawResponse(client.account_transfers) - self.ach_transfers = resources.ACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithRawResponse(client.ach_prenotifications) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithRawResponse(client.inbound_ach_transfers) - self.wire_transfers = resources.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithRawResponse( + self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResourceWithRawResponse( + client.digital_wallet_tokens + ) + self.transactions = transactions.TransactionsResourceWithRawResponse(client.transactions) + self.pending_transactions = pending_transactions.PendingTransactionsResourceWithRawResponse( + client.pending_transactions + ) + self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithRawResponse( + client.declined_transactions + ) + self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) + self.ach_transfers = ach_transfers.ACHTransfersResourceWithRawResponse(client.ach_transfers) + self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithRawResponse( + client.ach_prenotifications + ) + self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResourceWithRawResponse( + client.inbound_ach_transfers + ) + self.wire_transfers = wire_transfers.WireTransfersResourceWithRawResponse(client.wire_transfers) + self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResourceWithRawResponse( client.inbound_wire_transfers ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithRawResponse( + self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResourceWithRawResponse( client.wire_drawdown_requests ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests + self.inbound_wire_drawdown_requests = ( + inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) ) - self.check_transfers = resources.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithRawResponse( + self.check_transfers = check_transfers.CheckTransfersResourceWithRawResponse(client.check_transfers) + self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResourceWithRawResponse( client.inbound_check_deposits ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers + self.real_time_payments_transfers = ( + real_time_payments_transfers.RealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) ) - self.inbound_real_time_payments_transfers = resources.InboundRealTimePaymentsTransfersResourceWithRawResponse( - client.inbound_real_time_payments_transfers + self.inbound_real_time_payments_transfers = ( + inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithRawResponse( + client.inbound_real_time_payments_transfers + ) ) - self.check_deposits = resources.CheckDepositsResourceWithRawResponse(client.check_deposits) - self.lockboxes = resources.LockboxesResourceWithRawResponse(client.lockboxes) - self.inbound_mail_items = resources.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) - self.routing_numbers = resources.RoutingNumbersResourceWithRawResponse(client.routing_numbers) - self.external_accounts = resources.ExternalAccountsResourceWithRawResponse(client.external_accounts) - self.entities = resources.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithRawResponse( + self.check_deposits = check_deposits.CheckDepositsResourceWithRawResponse(client.check_deposits) + self.lockboxes = lockboxes.LockboxesResourceWithRawResponse(client.lockboxes) + self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) + self.routing_numbers = routing_numbers.RoutingNumbersResourceWithRawResponse(client.routing_numbers) + self.external_accounts = external_accounts.ExternalAccountsResourceWithRawResponse(client.external_accounts) + self.entities = entities.EntitiesResourceWithRawResponse(client.entities) + self.supplemental_documents = supplemental_documents.SupplementalDocumentsResourceWithRawResponse( client.supplemental_documents ) - self.programs = resources.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests + self.programs = programs.ProgramsResourceWithRawResponse(client.programs) + self.proof_of_authorization_requests = ( + proof_of_authorization_requests.ProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests + ) ) self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( client.proof_of_authorization_request_submissions ) ) - self.account_statements = resources.AccountStatementsResourceWithRawResponse(client.account_statements) - self.files = resources.FilesResourceWithRawResponse(client.files) - self.documents = resources.DocumentsResourceWithRawResponse(client.documents) - self.exports = resources.ExportsResourceWithRawResponse(client.exports) - self.events = resources.EventsResourceWithRawResponse(client.events) - self.event_subscriptions = resources.EventSubscriptionsResourceWithRawResponse(client.event_subscriptions) - self.real_time_decisions = resources.RealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithRawResponse(client.bookkeeping_accounts) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithRawResponse( + self.account_statements = account_statements.AccountStatementsResourceWithRawResponse(client.account_statements) + self.files = files.FilesResourceWithRawResponse(client.files) + self.documents = documents.DocumentsResourceWithRawResponse(client.documents) + self.exports = exports.ExportsResourceWithRawResponse(client.exports) + self.events = events.EventsResourceWithRawResponse(client.events) + self.event_subscriptions = event_subscriptions.EventSubscriptionsResourceWithRawResponse( + client.event_subscriptions + ) + self.real_time_decisions = real_time_decisions.RealTimeDecisionsResourceWithRawResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResourceWithRawResponse( + client.bookkeeping_accounts + ) + self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithRawResponse( client.bookkeeping_entry_sets ) - self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) - self.groups = resources.GroupsResourceWithRawResponse(client.groups) - self.oauth_connections = resources.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) - self.oauth_tokens = resources.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithRawResponse( + self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResourceWithRawResponse( + client.bookkeeping_entries + ) + self.groups = groups.GroupsResourceWithRawResponse(client.groups) + self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) + self.oauth_tokens = oauth_tokens.OAuthTokensResourceWithRawResponse(client.oauth_tokens) + self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithRawResponse( client.intrafi_account_enrollments ) - self.intrafi_balances = resources.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) + self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) + self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( + real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( client.real_time_payments_request_for_payments ) ) - self.simulations = resources.SimulationsResourceWithRawResponse(client.simulations) + self.simulations = simulations.SimulationsResourceWithRawResponse(client.simulations) class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: - self.accounts = resources.AsyncAccountsResourceWithRawResponse(client.accounts) - self.account_numbers = resources.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) - self.cards = resources.AsyncCardsResourceWithRawResponse(client.cards) - self.card_payments = resources.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithRawResponse( + self.accounts = accounts.AsyncAccountsResourceWithRawResponse(client.accounts) + self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) + self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards) + self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) + self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) - self.card_disputes = resources.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) - self.physical_cards = resources.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithRawResponse( + self.card_disputes = card_disputes.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) + self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) + self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse( client.digital_card_profiles ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithRawResponse( + self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResourceWithRawResponse( client.physical_card_profiles ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithRawResponse( + self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithRawResponse( client.digital_wallet_tokens ) - self.transactions = resources.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithRawResponse( + self.transactions = transactions.AsyncTransactionsResourceWithRawResponse(client.transactions) + self.pending_transactions = pending_transactions.AsyncPendingTransactionsResourceWithRawResponse( client.pending_transactions ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithRawResponse( + self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithRawResponse( client.declined_transactions ) - self.account_transfers = resources.AsyncAccountTransfersResourceWithRawResponse(client.account_transfers) - self.ach_transfers = resources.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithRawResponse( + self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithRawResponse( + client.account_transfers + ) + self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) + self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithRawResponse( client.ach_prenotifications ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithRawResponse( + self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResourceWithRawResponse( client.inbound_ach_transfers ) - self.wire_transfers = resources.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithRawResponse( + self.wire_transfers = wire_transfers.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) + self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResourceWithRawResponse( client.inbound_wire_transfers ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithRawResponse( + self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithRawResponse( client.wire_drawdown_requests ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests + self.inbound_wire_drawdown_requests = ( + inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( + client.inbound_wire_drawdown_requests + ) ) - self.check_transfers = resources.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithRawResponse( + self.check_transfers = check_transfers.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) + self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResourceWithRawResponse( client.inbound_check_deposits ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers + self.real_time_payments_transfers = ( + real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithRawResponse( + client.real_time_payments_transfers + ) ) self.inbound_real_time_payments_transfers = ( - resources.AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( client.inbound_real_time_payments_transfers ) ) - self.check_deposits = resources.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) - self.lockboxes = resources.AsyncLockboxesResourceWithRawResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithRawResponse(client.inbound_mail_items) - self.routing_numbers = resources.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) - self.external_accounts = resources.AsyncExternalAccountsResourceWithRawResponse(client.external_accounts) - self.entities = resources.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents + self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) + self.lockboxes = lockboxes.AsyncLockboxesResourceWithRawResponse(client.lockboxes) + self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithRawResponse( + client.inbound_mail_items ) - self.programs = resources.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests + self.routing_numbers = routing_numbers.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) + self.external_accounts = external_accounts.AsyncExternalAccountsResourceWithRawResponse( + client.external_accounts ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions + self.entities = entities.AsyncEntitiesResourceWithRawResponse(client.entities) + self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResourceWithRawResponse( + client.supplemental_documents + ) + self.programs = programs.AsyncProgramsResourceWithRawResponse(client.programs) + self.proof_of_authorization_requests = ( + proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( + client.proof_of_authorization_requests ) ) - self.account_statements = resources.AsyncAccountStatementsResourceWithRawResponse(client.account_statements) - self.files = resources.AsyncFilesResourceWithRawResponse(client.files) - self.documents = resources.AsyncDocumentsResourceWithRawResponse(client.documents) - self.exports = resources.AsyncExportsResourceWithRawResponse(client.exports) - self.events = resources.AsyncEventsResourceWithRawResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithRawResponse(client.event_subscriptions) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithRawResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithRawResponse( + self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( + client.proof_of_authorization_request_submissions + ) + self.account_statements = account_statements.AsyncAccountStatementsResourceWithRawResponse( + client.account_statements + ) + self.files = files.AsyncFilesResourceWithRawResponse(client.files) + self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents) + self.exports = exports.AsyncExportsResourceWithRawResponse(client.exports) + self.events = events.AsyncEventsResourceWithRawResponse(client.events) + self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResourceWithRawResponse( + client.event_subscriptions + ) + self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResourceWithRawResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithRawResponse( client.bookkeeping_accounts ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithRawResponse( + self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithRawResponse( client.bookkeeping_entry_sets ) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithRawResponse(client.bookkeeping_entries) - self.groups = resources.AsyncGroupsResourceWithRawResponse(client.groups) - self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithRawResponse(client.oauth_connections) - self.oauth_tokens = resources.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments + self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResourceWithRawResponse( + client.bookkeeping_entries + ) + self.groups = groups.AsyncGroupsResourceWithRawResponse(client.groups) + self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithRawResponse( + client.oauth_connections + ) + self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) + self.intrafi_account_enrollments = ( + intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( + client.intrafi_account_enrollments + ) + ) + self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) + self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithRawResponse( + client.intrafi_exclusions ) - self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( + real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( client.real_time_payments_request_for_payments ) ) - self.simulations = resources.AsyncSimulationsResourceWithRawResponse(client.simulations) + self.simulations = simulations.AsyncSimulationsResourceWithRawResponse(client.simulations) class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: - self.accounts = resources.AccountsResourceWithStreamingResponse(client.accounts) - self.account_numbers = resources.AccountNumbersResourceWithStreamingResponse(client.account_numbers) - self.cards = resources.CardsResourceWithStreamingResponse(client.cards) - self.card_payments = resources.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.CardPurchaseSupplementsResourceWithStreamingResponse( + self.accounts = accounts.AccountsResourceWithStreamingResponse(client.accounts) + self.account_numbers = account_numbers.AccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.cards = cards.CardsResourceWithStreamingResponse(client.cards) + self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments) + self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( client.card_purchase_supplements ) - self.card_disputes = resources.CardDisputesResourceWithStreamingResponse(client.card_disputes) - self.physical_cards = resources.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.DigitalCardProfilesResourceWithStreamingResponse( + self.card_disputes = card_disputes.CardDisputesResourceWithStreamingResponse(client.card_disputes) + self.physical_cards = physical_cards.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) + self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles ) - self.physical_card_profiles = resources.PhysicalCardProfilesResourceWithStreamingResponse( + self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResourceWithStreamingResponse( client.physical_card_profiles ) - self.digital_wallet_tokens = resources.DigitalWalletTokensResourceWithStreamingResponse( + self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResourceWithStreamingResponse( client.digital_wallet_tokens ) - self.transactions = resources.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.PendingTransactionsResourceWithStreamingResponse( + self.transactions = transactions.TransactionsResourceWithStreamingResponse(client.transactions) + self.pending_transactions = pending_transactions.PendingTransactionsResourceWithStreamingResponse( client.pending_transactions ) - self.declined_transactions = resources.DeclinedTransactionsResourceWithStreamingResponse( + self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithStreamingResponse( client.declined_transactions ) - self.account_transfers = resources.AccountTransfersResourceWithStreamingResponse(client.account_transfers) - self.ach_transfers = resources.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.ACHPrenotificationsResourceWithStreamingResponse( + self.account_transfers = account_transfers.AccountTransfersResourceWithStreamingResponse( + client.account_transfers + ) + self.ach_transfers = ach_transfers.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) + self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithStreamingResponse( client.ach_prenotifications ) - self.inbound_ach_transfers = resources.InboundACHTransfersResourceWithStreamingResponse( + self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResourceWithStreamingResponse( client.inbound_ach_transfers ) - self.wire_transfers = resources.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.InboundWireTransfersResourceWithStreamingResponse( + self.wire_transfers = wire_transfers.WireTransfersResourceWithStreamingResponse(client.wire_transfers) + self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResourceWithStreamingResponse( client.inbound_wire_transfers ) - self.wire_drawdown_requests = resources.WireDrawdownRequestsResourceWithStreamingResponse( + self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResourceWithStreamingResponse( client.wire_drawdown_requests ) - self.inbound_wire_drawdown_requests = resources.InboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests + self.inbound_wire_drawdown_requests = ( + inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) ) - self.check_transfers = resources.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.InboundCheckDepositsResourceWithStreamingResponse( + self.check_transfers = check_transfers.CheckTransfersResourceWithStreamingResponse(client.check_transfers) + self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResourceWithStreamingResponse( client.inbound_check_deposits ) - self.real_time_payments_transfers = resources.RealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers + self.real_time_payments_transfers = ( + real_time_payments_transfers.RealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) ) self.inbound_real_time_payments_transfers = ( - resources.InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithStreamingResponse( client.inbound_real_time_payments_transfers ) ) - self.check_deposits = resources.CheckDepositsResourceWithStreamingResponse(client.check_deposits) - self.lockboxes = resources.LockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.InboundMailItemsResourceWithStreamingResponse(client.inbound_mail_items) - self.routing_numbers = resources.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) - self.external_accounts = resources.ExternalAccountsResourceWithStreamingResponse(client.external_accounts) - self.entities = resources.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.SupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents + self.check_deposits = check_deposits.CheckDepositsResourceWithStreamingResponse(client.check_deposits) + self.lockboxes = lockboxes.LockboxesResourceWithStreamingResponse(client.lockboxes) + self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithStreamingResponse( + client.inbound_mail_items ) - self.programs = resources.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.ProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests + self.routing_numbers = routing_numbers.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) + self.external_accounts = external_accounts.ExternalAccountsResourceWithStreamingResponse( + client.external_accounts ) - self.proof_of_authorization_request_submissions = ( - resources.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions + self.entities = entities.EntitiesResourceWithStreamingResponse(client.entities) + self.supplemental_documents = supplemental_documents.SupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents + ) + self.programs = programs.ProgramsResourceWithStreamingResponse(client.programs) + self.proof_of_authorization_requests = ( + proof_of_authorization_requests.ProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests ) ) - self.account_statements = resources.AccountStatementsResourceWithStreamingResponse(client.account_statements) - self.files = resources.FilesResourceWithStreamingResponse(client.files) - self.documents = resources.DocumentsResourceWithStreamingResponse(client.documents) - self.exports = resources.ExportsResourceWithStreamingResponse(client.exports) - self.events = resources.EventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.EventSubscriptionsResourceWithStreamingResponse(client.event_subscriptions) - self.real_time_decisions = resources.RealTimeDecisionsResourceWithStreamingResponse(client.real_time_decisions) - self.bookkeeping_accounts = resources.BookkeepingAccountsResourceWithStreamingResponse( + self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + self.account_statements = account_statements.AccountStatementsResourceWithStreamingResponse( + client.account_statements + ) + self.files = files.FilesResourceWithStreamingResponse(client.files) + self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents) + self.exports = exports.ExportsResourceWithStreamingResponse(client.exports) + self.events = events.EventsResourceWithStreamingResponse(client.events) + self.event_subscriptions = event_subscriptions.EventSubscriptionsResourceWithStreamingResponse( + client.event_subscriptions + ) + self.real_time_decisions = real_time_decisions.RealTimeDecisionsResourceWithStreamingResponse( + client.real_time_decisions + ) + self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResourceWithStreamingResponse( client.bookkeeping_accounts ) - self.bookkeeping_entry_sets = resources.BookkeepingEntrySetsResourceWithStreamingResponse( + self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithStreamingResponse( client.bookkeeping_entry_sets ) - self.bookkeeping_entries = resources.BookkeepingEntriesResourceWithStreamingResponse(client.bookkeeping_entries) - self.groups = resources.GroupsResourceWithStreamingResponse(client.groups) - self.oauth_connections = resources.OAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) - self.oauth_tokens = resources.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.IntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments + self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResourceWithStreamingResponse( + client.bookkeeping_entries + ) + self.groups = groups.GroupsResourceWithStreamingResponse(client.groups) + self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithStreamingResponse( + client.oauth_connections + ) + self.oauth_tokens = oauth_tokens.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) + self.intrafi_account_enrollments = ( + intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) + ) + self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) + self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithStreamingResponse( + client.intrafi_exclusions ) - self.intrafi_balances = resources.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.IntrafiExclusionsResourceWithStreamingResponse(client.intrafi_exclusions) self.real_time_payments_request_for_payments = ( - resources.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( client.real_time_payments_request_for_payments ) ) - self.simulations = resources.SimulationsResourceWithStreamingResponse(client.simulations) + self.simulations = simulations.SimulationsResourceWithStreamingResponse(client.simulations) class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: - self.accounts = resources.AsyncAccountsResourceWithStreamingResponse(client.accounts) - self.account_numbers = resources.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) - self.cards = resources.AsyncCardsResourceWithStreamingResponse(client.cards) - self.card_payments = resources.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = resources.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements + self.accounts = accounts.AsyncAccountsResourceWithStreamingResponse(client.accounts) + self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards) + self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) + self.card_purchase_supplements = ( + card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( + client.card_purchase_supplements + ) ) - self.card_disputes = resources.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) - self.physical_cards = resources.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = resources.AsyncDigitalCardProfilesResourceWithStreamingResponse( + self.card_disputes = card_disputes.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) + self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) + self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles ) - self.physical_card_profiles = resources.AsyncPhysicalCardProfilesResourceWithStreamingResponse( + self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResourceWithStreamingResponse( client.physical_card_profiles ) - self.digital_wallet_tokens = resources.AsyncDigitalWalletTokensResourceWithStreamingResponse( + self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithStreamingResponse( client.digital_wallet_tokens ) - self.transactions = resources.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = resources.AsyncPendingTransactionsResourceWithStreamingResponse( + self.transactions = transactions.AsyncTransactionsResourceWithStreamingResponse(client.transactions) + self.pending_transactions = pending_transactions.AsyncPendingTransactionsResourceWithStreamingResponse( client.pending_transactions ) - self.declined_transactions = resources.AsyncDeclinedTransactionsResourceWithStreamingResponse( + self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithStreamingResponse( client.declined_transactions ) - self.account_transfers = resources.AsyncAccountTransfersResourceWithStreamingResponse(client.account_transfers) - self.ach_transfers = resources.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = resources.AsyncACHPrenotificationsResourceWithStreamingResponse( + self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithStreamingResponse( + client.account_transfers + ) + self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) + self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithStreamingResponse( client.ach_prenotifications ) - self.inbound_ach_transfers = resources.AsyncInboundACHTransfersResourceWithStreamingResponse( + self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResourceWithStreamingResponse( client.inbound_ach_transfers ) - self.wire_transfers = resources.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = resources.AsyncInboundWireTransfersResourceWithStreamingResponse( + self.wire_transfers = wire_transfers.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) + self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResourceWithStreamingResponse( client.inbound_wire_transfers ) - self.wire_drawdown_requests = resources.AsyncWireDrawdownRequestsResourceWithStreamingResponse( + self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithStreamingResponse( client.wire_drawdown_requests ) - self.inbound_wire_drawdown_requests = resources.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests + self.inbound_wire_drawdown_requests = ( + inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + client.inbound_wire_drawdown_requests + ) ) - self.check_transfers = resources.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = resources.AsyncInboundCheckDepositsResourceWithStreamingResponse( + self.check_transfers = check_transfers.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) + self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResourceWithStreamingResponse( client.inbound_check_deposits ) - self.real_time_payments_transfers = resources.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers + self.real_time_payments_transfers = ( + real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( + client.real_time_payments_transfers + ) ) self.inbound_real_time_payments_transfers = ( - resources.AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( client.inbound_real_time_payments_transfers ) ) - self.check_deposits = resources.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) - self.lockboxes = resources.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = resources.AsyncInboundMailItemsResourceWithStreamingResponse( + self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) + self.lockboxes = lockboxes.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) + self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithStreamingResponse( client.inbound_mail_items ) - self.routing_numbers = resources.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) - self.external_accounts = resources.AsyncExternalAccountsResourceWithStreamingResponse(client.external_accounts) - self.entities = resources.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = resources.AsyncSupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents + self.routing_numbers = routing_numbers.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) + self.external_accounts = external_accounts.AsyncExternalAccountsResourceWithStreamingResponse( + client.external_accounts ) - self.programs = resources.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = resources.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests + self.entities = entities.AsyncEntitiesResourceWithStreamingResponse(client.entities) + self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResourceWithStreamingResponse( + client.supplemental_documents ) - self.proof_of_authorization_request_submissions = ( - resources.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions + self.programs = programs.AsyncProgramsResourceWithStreamingResponse(client.programs) + self.proof_of_authorization_requests = ( + proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( + client.proof_of_authorization_requests ) ) - self.account_statements = resources.AsyncAccountStatementsResourceWithStreamingResponse( + self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( + client.proof_of_authorization_request_submissions + ) + self.account_statements = account_statements.AsyncAccountStatementsResourceWithStreamingResponse( client.account_statements ) - self.files = resources.AsyncFilesResourceWithStreamingResponse(client.files) - self.documents = resources.AsyncDocumentsResourceWithStreamingResponse(client.documents) - self.exports = resources.AsyncExportsResourceWithStreamingResponse(client.exports) - self.events = resources.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = resources.AsyncEventSubscriptionsResourceWithStreamingResponse( + self.files = files.AsyncFilesResourceWithStreamingResponse(client.files) + self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents) + self.exports = exports.AsyncExportsResourceWithStreamingResponse(client.exports) + self.events = events.AsyncEventsResourceWithStreamingResponse(client.events) + self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResourceWithStreamingResponse( client.event_subscriptions ) - self.real_time_decisions = resources.AsyncRealTimeDecisionsResourceWithStreamingResponse( + self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResourceWithStreamingResponse( client.real_time_decisions ) - self.bookkeeping_accounts = resources.AsyncBookkeepingAccountsResourceWithStreamingResponse( + self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithStreamingResponse( client.bookkeeping_accounts ) - self.bookkeeping_entry_sets = resources.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( + self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( client.bookkeeping_entry_sets ) - self.bookkeeping_entries = resources.AsyncBookkeepingEntriesResourceWithStreamingResponse( + self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResourceWithStreamingResponse( client.bookkeeping_entries ) - self.groups = resources.AsyncGroupsResourceWithStreamingResponse(client.groups) - self.oauth_connections = resources.AsyncOAuthConnectionsResourceWithStreamingResponse(client.oauth_connections) - self.oauth_tokens = resources.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = resources.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments + self.groups = groups.AsyncGroupsResourceWithStreamingResponse(client.groups) + self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithStreamingResponse( + client.oauth_connections ) - self.intrafi_balances = resources.AsyncIntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = resources.AsyncIntrafiExclusionsResourceWithStreamingResponse( + self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) + self.intrafi_account_enrollments = ( + intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( + client.intrafi_account_enrollments + ) + ) + self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResourceWithStreamingResponse( + client.intrafi_balances + ) + self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithStreamingResponse( client.intrafi_exclusions ) - self.real_time_payments_request_for_payments = ( - resources.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) + self.real_time_payments_request_for_payments = real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( + client.real_time_payments_request_for_payments ) - self.simulations = resources.AsyncSimulationsResourceWithStreamingResponse(client.simulations) + self.simulations = simulations.AsyncSimulationsResourceWithStreamingResponse(client.simulations) Client = Increase From 7b243bfcfdd45c323fba0337cf37be9ab1d63c19 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 03:44:22 +0000 Subject: [PATCH 0357/1325] feat(api): api update (#872) --- .stats.yml | 2 +- src/increase/types/export.py | 3 +++ src/increase/types/export_list_params.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 569413132..84325af1d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-78e72b144632da0b6b61ec57723ee42bb7c5d40461ecf2849cb7983d69ee8299.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a027b5e8e2a0be2a6c41a0b9c17ad5978e55e31e2811410b99e279d642cad20c.yml diff --git a/src/increase/types/export.py b/src/increase/types/export.py index e6cb343c4..5eaf69404 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -20,6 +20,7 @@ class Export(BaseModel): "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", + "dashboard_table_csv", ] """The category of the Export. @@ -36,6 +37,8 @@ class Export(BaseModel): - `entity_csv` - Export a CSV of entities with a given status. - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + - `dashboard_table_csv` - Certain dashboard tables are available as CSV exports. + This export cannot be created via the API. """ created_at: datetime diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index 0f42349be..efedbe7d9 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -47,6 +47,7 @@ class ExportListParams(TypedDict, total=False): "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", + "dashboard_table_csv", ] ], }, From 497b16bf50a75a804ab75b9ec0c170a46230e376 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 15 Dec 2024 03:45:36 +0000 Subject: [PATCH 0358/1325] chore(internal): version bump (#873) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1e475d0d..20d437b77 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.168.0" + ".": "0.169.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1ed403793..fb0823bf2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.168.0" +version = "0.169.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1e9350c10..abcc8426c 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.168.0" # x-release-please-version +__version__ = "0.169.0" # x-release-please-version From 5f2dfe4009a4f427311af2a9c2b429e7ce4caf9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 15:46:38 +0000 Subject: [PATCH 0359/1325] docs(readme): example snippet for client context manager (#874) --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 3bd7faa62..b628869aa 100644 --- a/README.md +++ b/README.md @@ -414,6 +414,16 @@ client.with_options(http_client=DefaultHttpxClient(...)) By default the library closes underlying HTTP connections whenever the client is [garbage collected](https://docs.python.org/3/reference/datamodel.html#object.__del__). You can manually close the client using the `.close()` method if desired, or with a context manager that closes when exiting. +```py +from increase import Increase + +with Increase() as client: + # make requests here + ... + +# HTTP client is now closed +``` + ## Versioning This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: From 47ad52af6d5421d7f026b355c6ae127a7d16546a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Dec 2024 17:42:04 +0000 Subject: [PATCH 0360/1325] chore(internal): fix some typos (#876) --- tests/test_client.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index f73ae7701..690c87fb2 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -355,11 +355,11 @@ def test_default_query_option(self) -> None: FinalRequestOptions( method="get", url="/foo", - params={"foo": "baz", "query_param": "overriden"}, + params={"foo": "baz", "query_param": "overridden"}, ) ) url = httpx.URL(request.url) - assert dict(url.params) == {"foo": "baz", "query_param": "overriden"} + assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} def test_request_extra_json(self) -> None: request = self.client._build_request( @@ -1176,11 +1176,11 @@ def test_default_query_option(self) -> None: FinalRequestOptions( method="get", url="/foo", - params={"foo": "baz", "query_param": "overriden"}, + params={"foo": "baz", "query_param": "overridden"}, ) ) url = httpx.URL(request.url) - assert dict(url.params) == {"foo": "baz", "query_param": "overriden"} + assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} def test_request_extra_json(self) -> None: request = self.client._build_request( From 1a31223ce6bbdd72c9dce1d18323628f5ce78ae2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 07:29:43 +0000 Subject: [PATCH 0361/1325] feat(api): api update (#877) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 2 +- src/increase/types/transaction.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 84325af1d..7a86e302a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a027b5e8e2a0be2a6c41a0b9c17ad5978e55e31e2811410b99e279d642cad20c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20c5ad39d175da218956d1a170f2485ea47d8b2f6ea1a13e1e684c770fad6efa.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 45ecaf50e..2dafd6ead 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2265,7 +2265,7 @@ class ElementCardSettlement(BaseModel): """ interchange: Optional[ElementCardSettlementInterchange] = None - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" merchant_acceptor_id: str """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index da4812236..9c7c133af 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1501,7 +1501,7 @@ class SourceCardSettlement(BaseModel): """ interchange: Optional[SourceCardSettlementInterchange] = None - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" merchant_acceptor_id: str """ From a6c914641310c2f26be6d35e365d2509665ffee9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 07:31:20 +0000 Subject: [PATCH 0362/1325] chore(internal): version bump (#878) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 20d437b77..2fc99100f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.169.0" + ".": "0.170.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fb0823bf2..1e1c9fa9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.169.0" +version = "0.170.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index abcc8426c..65d214941 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.169.0" # x-release-please-version +__version__ = "0.170.0" # x-release-please-version From f47b0e64ee091ed589bbf597ff9f03403d4b5c53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:57:17 +0000 Subject: [PATCH 0363/1325] feat(api): api update (#879) --- .stats.yml | 2 +- src/increase/types/inbound_mail_item.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7a86e302a..8e2a25a86 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20c5ad39d175da218956d1a170f2485ea47d8b2f6ea1a13e1e684c770fad6efa.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9a8f92e87439c05437fc55f45933f3c564f6d705b43fe2ac9ffcc87037b15bd8.yml diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index 0bf85f2ad..1849072f1 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -37,7 +37,7 @@ class InboundMailItem(BaseModel): - `no_matching_lockbox` - The mail item does not match any lockbox. - `no_check` - The mail item does not contain a check. - - `lockbox_not_active` - The Lockbox or its associataed Account is not active. + - `lockbox_not_active` - The Lockbox or its associated Account is not active. """ status: Literal["pending", "processed", "rejected"] From aad47968589d6d3a263388af9c9e219c38d57e1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Dec 2024 17:58:34 +0000 Subject: [PATCH 0364/1325] chore(internal): version bump (#881) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2fc99100f..dfe6cb919 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.170.0" + ".": "0.171.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1e1c9fa9a..d1d029a48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.170.0" +version = "0.171.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 65d214941..fc6aa1b7a 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.170.0" # x-release-please-version +__version__ = "0.171.0" # x-release-please-version From 2994b193c932c4013bf7b16cc5e23a82833fc1e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:48:26 +0000 Subject: [PATCH 0365/1325] feat(api): api update (#882) --- .stats.yml | 4 +- api.md | 13 + src/increase/_client.py | 15 + src/increase/resources/__init__.py | 14 + src/increase/resources/oauth_applications.py | 282 ++++++++++++++++++ src/increase/resources/oauth_connections.py | 8 + src/increase/types/__init__.py | 2 + src/increase/types/oauth_application.py | 48 +++ .../types/oauth_application_list_params.py | 18 ++ src/increase/types/oauth_connection.py | 3 + .../types/oauth_connection_list_params.py | 3 + .../api_resources/test_oauth_applications.py | 165 ++++++++++ tests/api_resources/test_oauth_connections.py | 2 + 13 files changed, 575 insertions(+), 2 deletions(-) create mode 100644 src/increase/resources/oauth_applications.py create mode 100644 src/increase/types/oauth_application.py create mode 100644 src/increase/types/oauth_application_list_params.py create mode 100644 tests/api_resources/test_oauth_applications.py diff --git a/.stats.yml b/.stats.yml index 8e2a25a86..d0500faee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9a8f92e87439c05437fc55f45933f3c564f6d705b43fe2ac9ffcc87037b15bd8.yml +configured_endpoints: 201 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6e3f74c1cfeef92447868eb9d50fb5bd703bd25191aa1c4583d659082e1adea7.yml diff --git a/api.md b/api.md index 917c19e38..ed7d8919d 100644 --- a/api.md +++ b/api.md @@ -654,6 +654,19 @@ Methods: - client.groups.retrieve() -> Group +# OAuthApplications + +Types: + +```python +from increase.types import OAuthApplication +``` + +Methods: + +- client.oauth_applications.retrieve(oauth_application_id) -> OAuthApplication +- client.oauth_applications.list(\*\*params) -> SyncPage[OAuthApplication] + # OAuthConnections Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 826929b4e..901c3c42b 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -54,6 +54,7 @@ account_statements, inbound_mail_items, intrafi_exclusions, + oauth_applications, bookkeeping_entries, event_subscriptions, real_time_decisions, @@ -155,6 +156,7 @@ class Increase(SyncAPIClient): bookkeeping_entry_sets: bookkeeping_entry_sets.BookkeepingEntrySetsResource bookkeeping_entries: bookkeeping_entries.BookkeepingEntriesResource groups: groups.GroupsResource + oauth_applications: oauth_applications.OAuthApplicationsResource oauth_connections: oauth_connections.OAuthConnectionsResource oauth_tokens: oauth_tokens.OAuthTokensResource intrafi_account_enrollments: intrafi_account_enrollments.IntrafiAccountEnrollmentsResource @@ -307,6 +309,7 @@ def __init__( self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResource(self) self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResource(self) self.groups = groups.GroupsResource(self) + self.oauth_applications = oauth_applications.OAuthApplicationsResource(self) self.oauth_connections = oauth_connections.OAuthConnectionsResource(self) self.oauth_tokens = oauth_tokens.OAuthTokensResource(self) self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResource(self) @@ -524,6 +527,7 @@ class AsyncIncrease(AsyncAPIClient): bookkeeping_entry_sets: bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource bookkeeping_entries: bookkeeping_entries.AsyncBookkeepingEntriesResource groups: groups.AsyncGroupsResource + oauth_applications: oauth_applications.AsyncOAuthApplicationsResource oauth_connections: oauth_connections.AsyncOAuthConnectionsResource oauth_tokens: oauth_tokens.AsyncOAuthTokensResource intrafi_account_enrollments: intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource @@ -678,6 +682,7 @@ def __init__( self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource(self) self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResource(self) self.groups = groups.AsyncGroupsResource(self) + self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResource(self) self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResource(self) self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResource(self) self.intrafi_account_enrollments = intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource(self) @@ -946,6 +951,7 @@ def __init__(self, client: Increase) -> None: client.bookkeeping_entries ) self.groups = groups.GroupsResourceWithRawResponse(client.groups) + self.oauth_applications = oauth_applications.OAuthApplicationsResourceWithRawResponse(client.oauth_applications) self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) self.oauth_tokens = oauth_tokens.OAuthTokensResourceWithRawResponse(client.oauth_tokens) self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithRawResponse( @@ -1069,6 +1075,9 @@ def __init__(self, client: AsyncIncrease) -> None: client.bookkeeping_entries ) self.groups = groups.AsyncGroupsResourceWithRawResponse(client.groups) + self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResourceWithRawResponse( + client.oauth_applications + ) self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithRawResponse( client.oauth_connections ) @@ -1198,6 +1207,9 @@ def __init__(self, client: Increase) -> None: client.bookkeeping_entries ) self.groups = groups.GroupsResourceWithStreamingResponse(client.groups) + self.oauth_applications = oauth_applications.OAuthApplicationsResourceWithStreamingResponse( + client.oauth_applications + ) self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithStreamingResponse( client.oauth_connections ) @@ -1329,6 +1341,9 @@ def __init__(self, client: AsyncIncrease) -> None: client.bookkeeping_entries ) self.groups = groups.AsyncGroupsResourceWithStreamingResponse(client.groups) + self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResourceWithStreamingResponse( + client.oauth_applications + ) self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithStreamingResponse( client.oauth_connections ) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 20f887773..660cebca4 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -232,6 +232,14 @@ IntrafiExclusionsResourceWithStreamingResponse, AsyncIntrafiExclusionsResourceWithStreamingResponse, ) +from .oauth_applications import ( + OAuthApplicationsResource, + AsyncOAuthApplicationsResource, + OAuthApplicationsResourceWithRawResponse, + AsyncOAuthApplicationsResourceWithRawResponse, + OAuthApplicationsResourceWithStreamingResponse, + AsyncOAuthApplicationsResourceWithStreamingResponse, +) from .bookkeeping_entries import ( BookkeepingEntriesResource, AsyncBookkeepingEntriesResource, @@ -702,6 +710,12 @@ "AsyncGroupsResourceWithRawResponse", "GroupsResourceWithStreamingResponse", "AsyncGroupsResourceWithStreamingResponse", + "OAuthApplicationsResource", + "AsyncOAuthApplicationsResource", + "OAuthApplicationsResourceWithRawResponse", + "AsyncOAuthApplicationsResourceWithRawResponse", + "OAuthApplicationsResourceWithStreamingResponse", + "AsyncOAuthApplicationsResourceWithStreamingResponse", "OAuthConnectionsResource", "AsyncOAuthConnectionsResource", "OAuthConnectionsResourceWithRawResponse", diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py new file mode 100644 index 000000000..c46086de3 --- /dev/null +++ b/src/increase/resources/oauth_applications.py @@ -0,0 +1,282 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import oauth_application_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.oauth_application import OAuthApplication + +__all__ = ["OAuthApplicationsResource", "AsyncOAuthApplicationsResource"] + + +class OAuthApplicationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> OAuthApplicationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return OAuthApplicationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> OAuthApplicationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return OAuthApplicationsResourceWithStreamingResponse(self) + + def retrieve( + self, + oauth_application_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> OAuthApplication: + """ + Retrieve an OAuth Application + + Args: + oauth_application_id: The identifier of the OAuth Application. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not oauth_application_id: + raise ValueError( + f"Expected a non-empty value for `oauth_application_id` but received {oauth_application_id!r}" + ) + return self._get( + f"/oauth_applications/{oauth_application_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=OAuthApplication, + ) + + def list( + self, + *, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[OAuthApplication]: + """ + List OAuth Applications + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/oauth_applications", + page=SyncPage[OAuthApplication], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "limit": limit, + }, + oauth_application_list_params.OAuthApplicationListParams, + ), + ), + model=OAuthApplication, + ) + + +class AsyncOAuthApplicationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncOAuthApplicationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return the + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncOAuthApplicationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncOAuthApplicationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncOAuthApplicationsResourceWithStreamingResponse(self) + + async def retrieve( + self, + oauth_application_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> OAuthApplication: + """ + Retrieve an OAuth Application + + Args: + oauth_application_id: The identifier of the OAuth Application. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not oauth_application_id: + raise ValueError( + f"Expected a non-empty value for `oauth_application_id` but received {oauth_application_id!r}" + ) + return await self._get( + f"/oauth_applications/{oauth_application_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=OAuthApplication, + ) + + def list( + self, + *, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[OAuthApplication, AsyncPage[OAuthApplication]]: + """ + List OAuth Applications + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/oauth_applications", + page=AsyncPage[OAuthApplication], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "limit": limit, + }, + oauth_application_list_params.OAuthApplicationListParams, + ), + ), + model=OAuthApplication, + ) + + +class OAuthApplicationsResourceWithRawResponse: + def __init__(self, oauth_applications: OAuthApplicationsResource) -> None: + self._oauth_applications = oauth_applications + + self.retrieve = to_raw_response_wrapper( + oauth_applications.retrieve, + ) + self.list = to_raw_response_wrapper( + oauth_applications.list, + ) + + +class AsyncOAuthApplicationsResourceWithRawResponse: + def __init__(self, oauth_applications: AsyncOAuthApplicationsResource) -> None: + self._oauth_applications = oauth_applications + + self.retrieve = async_to_raw_response_wrapper( + oauth_applications.retrieve, + ) + self.list = async_to_raw_response_wrapper( + oauth_applications.list, + ) + + +class OAuthApplicationsResourceWithStreamingResponse: + def __init__(self, oauth_applications: OAuthApplicationsResource) -> None: + self._oauth_applications = oauth_applications + + self.retrieve = to_streamed_response_wrapper( + oauth_applications.retrieve, + ) + self.list = to_streamed_response_wrapper( + oauth_applications.list, + ) + + +class AsyncOAuthApplicationsResourceWithStreamingResponse: + def __init__(self, oauth_applications: AsyncOAuthApplicationsResource) -> None: + self._oauth_applications = oauth_applications + + self.retrieve = async_to_streamed_response_wrapper( + oauth_applications.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + oauth_applications.list, + ) diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index 55630cf00..fff55c6c7 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -84,6 +84,7 @@ def list( *, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + oauth_application_id: str | NotGiven = NOT_GIVEN, status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -101,6 +102,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + oauth_application_id: The identifier of the OAuth Application to filter by. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -121,6 +124,7 @@ def list( { "cursor": cursor, "limit": limit, + "oauth_application_id": oauth_application_id, "status": status, }, oauth_connection_list_params.OAuthConnectionListParams, @@ -192,6 +196,7 @@ def list( *, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + oauth_application_id: str | NotGiven = NOT_GIVEN, status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -209,6 +214,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + oauth_application_id: The identifier of the OAuth Application to filter by. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -229,6 +236,7 @@ def list( { "cursor": cursor, "limit": limit, + "oauth_application_id": oauth_application_id, "status": status, }, oauth_connection_list_params.OAuthConnectionListParams, diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index e36613983..da9db5702 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -35,6 +35,7 @@ from .event_list_params import EventListParams as EventListParams from .inbound_mail_item import InboundMailItem as InboundMailItem from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion +from .oauth_application import OAuthApplication as OAuthApplication from .card_create_params import CardCreateParams as CardCreateParams from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams @@ -101,6 +102,7 @@ from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams +from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams diff --git a/src/increase/types/oauth_application.py b/src/increase/types/oauth_application.py new file mode 100644 index 000000000..99bb1f92c --- /dev/null +++ b/src/increase/types/oauth_application.py @@ -0,0 +1,48 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["OAuthApplication"] + + +class OAuthApplication(BaseModel): + id: str + """The OAuth Application's identifier.""" + + client_id: str + """The OAuth Application's client_id. + + Use this to authenticate with the OAuth Application. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth + Application was created. + """ + + deleted_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp when the OAuth + Application was deleted. + """ + + name: Optional[str] = None + """The name you chose for this OAuth Application.""" + + status: Literal["active", "deleted"] + """Whether the application is active. + + - `active` - The application is active and can be used by your users. + - `deleted` - The application is deleted. + """ + + type: Literal["oauth_application"] + """A constant representing the object's type. + + For this resource it will always be `oauth_application`. + """ diff --git a/src/increase/types/oauth_application_list_params.py b/src/increase/types/oauth_application_list_params.py new file mode 100644 index 000000000..fa0d4f42b --- /dev/null +++ b/src/increase/types/oauth_application_list_params.py @@ -0,0 +1,18 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["OAuthApplicationListParams"] + + +class OAuthApplicationListParams(TypedDict, total=False): + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ diff --git a/src/increase/types/oauth_connection.py b/src/increase/types/oauth_connection.py index 0ced8bed6..e8ef81603 100644 --- a/src/increase/types/oauth_connection.py +++ b/src/increase/types/oauth_connection.py @@ -28,6 +28,9 @@ class OAuthConnection(BaseModel): group_id: str """The identifier of the Group that has authorized your OAuth application.""" + oauth_application_id: str + """The identifier of the OAuth application this connection is for.""" + status: Literal["active", "inactive"] """Whether the connection is active. diff --git a/src/increase/types/oauth_connection_list_params.py b/src/increase/types/oauth_connection_list_params.py index 2cd6a5ef1..bc1e3e240 100644 --- a/src/increase/types/oauth_connection_list_params.py +++ b/src/increase/types/oauth_connection_list_params.py @@ -18,6 +18,9 @@ class OAuthConnectionListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + oauth_application_id: str + """The identifier of the OAuth Application to filter by.""" + status: Status diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py new file mode 100644 index 000000000..1aed1fe00 --- /dev/null +++ b/tests/api_resources/test_oauth_applications.py @@ -0,0 +1,165 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import OAuthApplication +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestOAuthApplications: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + oauth_application = client.oauth_applications.retrieve( + "oauth_application_id", + ) + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.oauth_applications.with_raw_response.retrieve( + "oauth_application_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + oauth_application = response.parse() + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.oauth_applications.with_streaming_response.retrieve( + "oauth_application_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + oauth_application = response.parse() + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `oauth_application_id` but received ''"): + client.oauth_applications.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + oauth_application = client.oauth_applications.list() + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + oauth_application = client.oauth_applications.list( + cursor="cursor", + limit=1, + ) + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.oauth_applications.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + oauth_application = response.parse() + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.oauth_applications.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + oauth_application = response.parse() + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncOAuthApplications: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + oauth_application = await async_client.oauth_applications.retrieve( + "oauth_application_id", + ) + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.oauth_applications.with_raw_response.retrieve( + "oauth_application_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + oauth_application = await response.parse() + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.oauth_applications.with_streaming_response.retrieve( + "oauth_application_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + oauth_application = await response.parse() + assert_matches_type(OAuthApplication, oauth_application, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `oauth_application_id` but received ''"): + await async_client.oauth_applications.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + oauth_application = await async_client.oauth_applications.list() + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + oauth_application = await async_client.oauth_applications.list( + cursor="cursor", + limit=1, + ) + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.oauth_applications.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + oauth_application = await response.parse() + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.oauth_applications.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + oauth_application = await response.parse() + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index a62eb4491..d8e08b2d9 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -66,6 +66,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list( cursor="cursor", limit=1, + oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @@ -142,6 +143,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> oauth_connection = await async_client.oauth_connections.list( cursor="cursor", limit=1, + oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) From bfc87f41d05fe07b369d6e441950c23256b7aafa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 14:49:41 +0000 Subject: [PATCH 0366/1325] chore(internal): version bump (#884) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dfe6cb919..bf939b09f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.171.0" + ".": "0.172.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d1d029a48..a15d255d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.171.0" +version = "0.172.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fc6aa1b7a..51c5bdced 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.171.0" # x-release-please-version +__version__ = "0.172.0" # x-release-please-version From 7675c241b806d19e81ef376ab11b2459cc0ed7af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:34:07 +0000 Subject: [PATCH 0367/1325] feat(api): api update (#885) --- .stats.yml | 2 +- src/increase/resources/oauth_applications.py | 8 +++ .../types/oauth_application_list_params.py | 51 ++++++++++++++++++- .../api_resources/test_oauth_applications.py | 15 ++++++ 4 files changed, 73 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d0500faee..8e652dc26 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6e3f74c1cfeef92447868eb9d50fb5bd703bd25191aa1c4583d659082e1adea7.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4bd84f4d9170653e443265bdf92c0520b008f613be5f60334e07b4151765e16a.yml diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index c46086de3..f12c01d6a 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -82,8 +82,10 @@ def retrieve( def list( self, *, + created_at: oauth_application_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: oauth_application_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -118,8 +120,10 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, + "status": status, }, oauth_application_list_params.OAuthApplicationListParams, ), @@ -188,8 +192,10 @@ async def retrieve( def list( self, *, + created_at: oauth_application_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: oauth_application_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -224,8 +230,10 @@ def list( timeout=timeout, query=maybe_transform( { + "created_at": created_at, "cursor": cursor, "limit": limit, + "status": status, }, oauth_application_list_params.OAuthApplicationListParams, ), diff --git a/src/increase/types/oauth_application_list_params.py b/src/increase/types/oauth_application_list_params.py index fa0d4f42b..f0069a737 100644 --- a/src/increase/types/oauth_application_list_params.py +++ b/src/increase/types/oauth_application_list_params.py @@ -2,12 +2,18 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict -__all__ = ["OAuthApplicationListParams"] +from .._utils import PropertyInfo + +__all__ = ["OAuthApplicationListParams", "CreatedAt", "Status"] class OAuthApplicationListParams(TypedDict, total=False): + created_at: CreatedAt + cursor: str """Return the page of entries after this one.""" @@ -16,3 +22,44 @@ class OAuthApplicationListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "deleted"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py index 1aed1fe00..c9e04f15e 100644 --- a/tests/api_resources/test_oauth_applications.py +++ b/tests/api_resources/test_oauth_applications.py @@ -10,6 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import OAuthApplication +from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,8 +65,15 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: oauth_application = client.oauth_applications.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="cursor", limit=1, + status={"in": ["active"]}, ) assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) @@ -139,8 +147,15 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: oauth_application = await async_client.oauth_applications.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, cursor="cursor", limit=1, + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) From 9f8d9ea7c95cb320937228e02e99c32bb8de18f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:35:17 +0000 Subject: [PATCH 0368/1325] chore(internal): version bump (#887) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf939b09f..dd670d780 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.172.0" + ".": "0.173.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a15d255d6..c5b56ca7c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.172.0" +version = "0.173.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 51c5bdced..386576a80 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.172.0" # x-release-please-version +__version__ = "0.173.0" # x-release-please-version From 07c21acf0d6aa164a5033688477d416ab4034858 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:10:15 +0000 Subject: [PATCH 0369/1325] feat(api): api update (#888) --- .stats.yml | 2 +- src/increase/resources/oauth_connections.py | 6 ++++-- src/increase/types/oauth_connection_list_params.py | 5 ++++- 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e652dc26..dcba97fb2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4bd84f4d9170653e443265bdf92c0520b008f613be5f60334e07b4151765e16a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3727ea0756f101eda42b91615cc93da10d2d197565b9522da8c018edc249ad10.yml diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index fff55c6c7..70c780fbb 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -102,7 +102,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - oauth_application_id: The identifier of the OAuth Application to filter by. + oauth_application_id: Filter results to only include OAuth Connections for a specific OAuth + Application. extra_headers: Send extra headers @@ -214,7 +215,8 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - oauth_application_id: The identifier of the OAuth Application to filter by. + oauth_application_id: Filter results to only include OAuth Connections for a specific OAuth + Application. extra_headers: Send extra headers diff --git a/src/increase/types/oauth_connection_list_params.py b/src/increase/types/oauth_connection_list_params.py index bc1e3e240..152563d20 100644 --- a/src/increase/types/oauth_connection_list_params.py +++ b/src/increase/types/oauth_connection_list_params.py @@ -19,7 +19,10 @@ class OAuthConnectionListParams(TypedDict, total=False): """ oauth_application_id: str - """The identifier of the OAuth Application to filter by.""" + """ + Filter results to only include OAuth Connections for a specific OAuth + Application. + """ status: Status From 1403ae2b7fe3040e8e4a9d8ce2d5bc1b8c25518b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Dec 2024 16:11:23 +0000 Subject: [PATCH 0370/1325] chore(internal): version bump (#890) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dd670d780..e61a3857f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.173.0" + ".": "0.174.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c5b56ca7c..824d370de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.173.0" +version = "0.174.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 386576a80..79878e77f 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.173.0" # x-release-please-version +__version__ = "0.174.0" # x-release-please-version From fb9891f8cf04a3a30def44aac841c5d25500bab9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 19:34:59 +0000 Subject: [PATCH 0371/1325] chore(internal): codegen related update (#891) --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index a979e67dd..197f93625 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2024 Increase + Copyright 2025 Increase Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From ae103290a36729507f90a59bcb79fa0f058a4bda Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 22:34:17 +0000 Subject: [PATCH 0372/1325] feat(api): api update (#893) --- .stats.yml | 2 +- .../test_real_time_payments_request_for_payments.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index dcba97fb2..acc9723c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3727ea0756f101eda42b91615cc93da10d2d197565b9522da8c018edc249ad10.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-03ee97dd9c89c89eb1cc9ac40a7f757b3c92e262889d3ad2e654a03259026f44.yml diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py index de382db0d..b429eecf6 100644 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ b/tests/api_resources/test_real_time_payments_request_for_payments.py @@ -30,7 +30,7 @@ def test_method_create(self, client: Increase) -> None: "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", @@ -48,7 +48,7 @@ def test_raw_response_create(self, client: Increase) -> None: "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", @@ -70,7 +70,7 @@ def test_streaming_response_create(self, client: Increase) -> None: "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", @@ -193,7 +193,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", @@ -211,7 +211,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", @@ -233,7 +233,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N "name": "Ian Crease", }, destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2025-12-31"), + expires_at=parse_date("2026-12-31"), remittance_information="Invoice 29582", source_account_number="987654321", source_routing_number="101050001", From a22c1779813b746d495c633d2964174023f624f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Jan 2025 22:35:23 +0000 Subject: [PATCH 0373/1325] chore(internal): version bump (#894) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e61a3857f..6abd47e7a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.174.0" + ".": "0.175.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 824d370de..21c74d6f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.174.0" +version = "0.175.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 79878e77f..28c516236 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.174.0" # x-release-please-version +__version__ = "0.175.0" # x-release-please-version From ac53266e02eb6f08265235101e18361e8a09cdb5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:40:13 +0000 Subject: [PATCH 0374/1325] feat(api): api update (#895) --- .stats.yml | 2 +- src/increase/types/transaction.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index acc9723c7..98a2bad7d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-03ee97dd9c89c89eb1cc9ac40a7f757b3c92e262889d3ad2e654a03259026f44.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6cc3e4ac223759041f330390923fab4098db3de30668152712a863fa81b40849.yml diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 9c7c133af..23e4f1ff8 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2107,7 +2107,7 @@ class SourceInboundWireTransfer(BaseModel): class SourceInterestPayment(BaseModel): - accrued_on_account_id: Optional[str] = None + accrued_on_account_id: str """The account on which the interest was accrued.""" amount: int From b20836940713d369c252dfcb02c772be2010e6fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Jan 2025 22:41:35 +0000 Subject: [PATCH 0375/1325] chore(internal): version bump (#897) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6abd47e7a..864c3f0ed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.175.0" + ".": "0.176.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 21c74d6f3..546e5bc74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.175.0" +version = "0.176.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 28c516236..56de4a275 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.175.0" # x-release-please-version +__version__ = "0.176.0" # x-release-please-version From 0cde94de62fd5a5e776b7f03ee42539a1abccf3f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Jan 2025 17:12:41 +0000 Subject: [PATCH 0376/1325] chore: add missing isclass check (#898) --- src/increase/_models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 7a547ce5c..d56ea1d9e 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -488,7 +488,11 @@ def construct_type(*, value: object, type_: object) -> object: _, items_type = get_args(type_) # Dict[_, items_type] return {key: construct_type(value=item, type_=items_type) for key, item in value.items()} - if not is_literal_type(type_) and (issubclass(origin, BaseModel) or issubclass(origin, GenericModel)): + if ( + not is_literal_type(type_) + and inspect.isclass(origin) + and (issubclass(origin, BaseModel) or issubclass(origin, GenericModel)) + ): if is_list(value): return [cast(Any, type_).construct(**entry) if is_mapping(entry) else entry for entry in value] From 0ba4695c71ffd8d89dce167ce8a54848725e2ac4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 09:29:40 +0000 Subject: [PATCH 0377/1325] chore(internal): bump httpx dependency (#900) --- pyproject.toml | 2 +- requirements-dev.lock | 5 ++--- requirements.lock | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 546e5bc74..3ba9a1797 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,7 +54,7 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - "nest_asyncio==1.6.0" + "nest_asyncio==1.6.0", ] [tool.rye.scripts] diff --git a/requirements-dev.lock b/requirements-dev.lock index f93fb910c..9a6b7d897 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -35,7 +35,7 @@ h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx -httpx==0.25.2 +httpx==0.28.1 # via increase # via respx idna==3.4 @@ -76,7 +76,7 @@ python-dateutil==2.8.2 # via time-machine pytz==2023.3.post1 # via dirty-equals -respx==0.20.2 +respx==0.22.0 rich==13.7.1 ruff==0.6.9 setuptools==68.2.2 @@ -85,7 +85,6 @@ six==1.16.0 # via python-dateutil sniffio==1.3.0 # via anyio - # via httpx # via increase time-machine==2.9.0 tomli==2.0.2 diff --git a/requirements.lock b/requirements.lock index a1809fbc0..be7bd4584 100644 --- a/requirements.lock +++ b/requirements.lock @@ -25,7 +25,7 @@ h11==0.14.0 # via httpcore httpcore==1.0.2 # via httpx -httpx==0.25.2 +httpx==0.28.1 # via increase idna==3.4 # via anyio @@ -36,7 +36,6 @@ pydantic-core==2.27.1 # via pydantic sniffio==1.3.0 # via anyio - # via httpx # via increase typing-extensions==4.12.2 # via anyio From 5c78bf3e5698937968c96b6ab86fea5a61fbae5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:57:43 +0000 Subject: [PATCH 0378/1325] fix(client): only call .close() when needed (#901) --- src/increase/_base_client.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 5d09af06c..40466184d 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -767,6 +767,9 @@ def __init__(self, **kwargs: Any) -> None: class SyncHttpxClientWrapper(DefaultHttpxClient): def __del__(self) -> None: + if self.is_closed: + return + try: self.close() except Exception: @@ -1334,6 +1337,9 @@ def __init__(self, **kwargs: Any) -> None: class AsyncHttpxClientWrapper(DefaultAsyncHttpxClient): def __del__(self) -> None: + if self.is_closed: + return + try: # TODO(someday): support non asyncio runtimes here asyncio.get_running_loop().create_task(self.aclose()) From d549bb1f00a26551ddfe951180ebec34cc75c8fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Jan 2025 19:58:58 +0000 Subject: [PATCH 0379/1325] chore(internal): version bump (#902) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 864c3f0ed..5c0eb511c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.176.0" + ".": "0.176.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3ba9a1797..fb714adfe 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.176.0" +version = "0.176.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 56de4a275..5669ee2c0 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.176.0" # x-release-please-version +__version__ = "0.176.1" # x-release-please-version From 41e36029118735ec078e4150fac32cbe3826d8f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 13:35:29 +0000 Subject: [PATCH 0380/1325] docs: fix typos (#903) --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index b628869aa..ecfc40aa8 100644 --- a/README.md +++ b/README.md @@ -209,7 +209,7 @@ except increase.APIStatusError as e: print(e.response) ``` -Error codes are as followed: +Error codes are as follows: | Status Code | Error Type | | ----------- | -------------------------- | @@ -356,8 +356,7 @@ If you need to access undocumented endpoints, params, or response properties, th #### Undocumented endpoints To make requests to undocumented endpoints, you can make requests using `client.get`, `client.post`, and other -http verbs. Options on the client will be respected (such as retries) will be respected when making this -request. +http verbs. Options on the client will be respected (such as retries) when making this request. ```py import httpx From dd1d390656c359a9dcc9d27c317ceac940138550 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Jan 2025 15:02:46 +0000 Subject: [PATCH 0381/1325] chore(internal): codegen related update (#905) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ecfc40aa8..ad3ccd20a 100644 --- a/README.md +++ b/README.md @@ -428,7 +428,7 @@ with Increase() as client: This package generally follows [SemVer](https://semver.org/spec/v2.0.0.html) conventions, though certain backwards-incompatible changes may be released as minor versions: 1. Changes that only affect static types, without breaking runtime behavior. -2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals)_. +2. Changes to library internals which are technically public but not intended or documented for external use. _(Please open a GitHub issue to let us know if you are relying on such internals.)_ 3. Changes that we do not expect to impact the vast majority of users in practice. We take backwards-compatibility seriously and work hard to ensure you can rely on a smooth upgrade experience. From 18e1b3af727f49ab51dc6dd95d7a317f08adac02 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:19:05 +0000 Subject: [PATCH 0382/1325] fix: correctly handle deserialising `cls` fields (#906) --- src/increase/_models.py | 8 ++++---- tests/test_models.py | 10 ++++++++++ 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index d56ea1d9e..9a918aabf 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -179,14 +179,14 @@ def __str__(self) -> str: @classmethod @override def construct( # pyright: ignore[reportIncompatibleMethodOverride] - cls: Type[ModelT], + __cls: Type[ModelT], _fields_set: set[str] | None = None, **values: object, ) -> ModelT: - m = cls.__new__(cls) + m = __cls.__new__(__cls) fields_values: dict[str, object] = {} - config = get_model_config(cls) + config = get_model_config(__cls) populate_by_name = ( config.allow_population_by_field_name if isinstance(config, _ConfigProtocol) @@ -196,7 +196,7 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] if _fields_set is None: _fields_set = set() - model_fields = get_model_fields(cls) + model_fields = get_model_fields(__cls) for name, field in model_fields.items(): key = field.alias if key is None or (key not in values and populate_by_name): diff --git a/tests/test_models.py b/tests/test_models.py index f4a286767..f8e6daff3 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -844,3 +844,13 @@ class Model(BaseModel): assert m.alias == "foo" assert isinstance(m.union, str) assert m.union == "bar" + + +@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +def test_field_named_cls() -> None: + class Model(BaseModel): + cls: str + + m = construct_type(value={"cls": "foo"}, type_=Model) + assert isinstance(m, Model) + assert isinstance(m.cls, str) From ce18a5eba616eab3796ea2d9317bef7bfcb2b658 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Jan 2025 16:20:17 +0000 Subject: [PATCH 0383/1325] chore(internal): codegen related update (#907) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5c0eb511c..35eef82a5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.176.1" + ".": "0.176.2" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fb714adfe..816bbebe1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.176.1" +version = "0.176.2" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5669ee2c0..7013a656f 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.176.1" # x-release-please-version +__version__ = "0.176.2" # x-release-please-version From 437f994b1a7d00b0988e0a5306b4daa470c2a1f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 00:41:46 +0000 Subject: [PATCH 0384/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 98a2bad7d..52d16370e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6cc3e4ac223759041f330390923fab4098db3de30668152712a863fa81b40849.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-700b81dedcec3b98097b9fa7c1ab7ea971cc812c95d7507db3a235a625660394.yml From 5668b80682158cf3eedbd93f09169a17f88df8dc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 11:47:14 +0000 Subject: [PATCH 0385/1325] chore(internal): update deps (#908) --- mypy.ini | 2 +- requirements-dev.lock | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mypy.ini b/mypy.ini index 42fb84c25..4691e79f1 100644 --- a/mypy.ini +++ b/mypy.ini @@ -41,7 +41,7 @@ cache_fine_grained = True # ``` # Changing this codegen to make mypy happy would increase complexity # and would not be worth it. -disable_error_code = func-returns-value +disable_error_code = func-returns-value,overload-cannot-match # https://github.com/python/mypy/issues/12162 [mypy.overrides] diff --git a/requirements-dev.lock b/requirements-dev.lock index 9a6b7d897..4b5cb16b6 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -48,7 +48,7 @@ markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -mypy==1.13.0 +mypy==1.14.1 mypy-extensions==1.0.0 # via mypy nest-asyncio==1.6.0 @@ -68,7 +68,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.390 +pyright==1.1.391 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 From ebe4eeeda850ed86b7d654e48b27d31272c93f7e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:54:03 +0000 Subject: [PATCH 0386/1325] feat(api): api update (#910) --- .stats.yml | 2 +- src/increase/types/inbound_ach_transfer.py | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 52d16370e..bc10f2d3e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-700b81dedcec3b98097b9fa7c1ab7ea971cc812c95d7507db3a235a625660394.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ea7ed56030d4b00596b425a2efee0459583f4e0e283daad7ebb63a0cd76d29f.yml diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 07a4a70ee..c7238fa24 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -521,7 +521,12 @@ class InboundACHTransfer(BaseModel): """ trace_number: str - """The trace number of the transfer.""" + """A 15 digit number set by the sending bank and transmitted to the receiving bank. + + Along with the amount, date, and originating routing number, this can be used to + identify the ACH transfer. ACH trace numbers are not unique, but are + [used to correlate returns](https://increase.com/documentation/ach-returns#ach-returns). + """ transfer_return: Optional[TransferReturn] = None """If your transfer is returned, this will contain details of the return.""" From f71860886568fade83a1e65a986cc2109b83d3fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Jan 2025 19:55:13 +0000 Subject: [PATCH 0387/1325] chore(internal): version bump (#911) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 35eef82a5..a7a2a76c6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.176.2" + ".": "0.177.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 816bbebe1..dba00c828 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.176.2" +version = "0.177.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7013a656f..8122fa964 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.176.2" # x-release-please-version +__version__ = "0.177.0" # x-release-please-version From 6661520fe41340fc8f81ab25075f163d12f89a63 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 15:43:42 +0000 Subject: [PATCH 0388/1325] chore(internal): bump pyright dependency (#912) --- requirements-dev.lock | 2 +- src/increase/_response.py | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 4b5cb16b6..06d5e5ce5 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -68,7 +68,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.391 +pyright==1.1.392.post0 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 diff --git a/src/increase/_response.py b/src/increase/_response.py index 2f83cff61..cfff40032 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -210,7 +210,13 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: raise ValueError(f"Subclasses of httpx.Response cannot be passed to `cast_to`") return cast(R, response) - if inspect.isclass(origin) and not issubclass(origin, BaseModel) and issubclass(origin, pydantic.BaseModel): + if ( + inspect.isclass( + origin # pyright: ignore[reportUnknownArgumentType] + ) + and not issubclass(origin, BaseModel) + and issubclass(origin, pydantic.BaseModel) + ): raise TypeError("Pydantic models must subclass our base model type, e.g. `from increase import BaseModel`") if ( From 4eb4319408e34abeabe0327c8da47e81bc00c900 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 15 Jan 2025 18:00:45 +0000 Subject: [PATCH 0389/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bc10f2d3e..9478903e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ea7ed56030d4b00596b425a2efee0459583f4e0e283daad7ebb63a0cd76d29f.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9f22ab139c225a56bc829befa825a81eb1f2bc1af4b1a934b6f8888d4e422a58.yml From 867f28c5e95ac67a4311f5285dfbd14b779dcdb3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:07:47 +0000 Subject: [PATCH 0390/1325] docs(raw responses): fix duplicate `the` (#914) --- src/increase/resources/account_numbers.py | 4 ++-- src/increase/resources/account_statements.py | 4 ++-- src/increase/resources/account_transfers.py | 4 ++-- src/increase/resources/accounts.py | 4 ++-- src/increase/resources/ach_prenotifications.py | 4 ++-- src/increase/resources/ach_transfers.py | 4 ++-- src/increase/resources/bookkeeping_accounts.py | 4 ++-- src/increase/resources/bookkeeping_entries.py | 4 ++-- src/increase/resources/bookkeeping_entry_sets.py | 4 ++-- src/increase/resources/card_disputes.py | 4 ++-- src/increase/resources/card_payments.py | 4 ++-- src/increase/resources/card_purchase_supplements.py | 4 ++-- src/increase/resources/cards.py | 4 ++-- src/increase/resources/check_deposits.py | 4 ++-- src/increase/resources/check_transfers.py | 4 ++-- src/increase/resources/declined_transactions.py | 4 ++-- src/increase/resources/digital_card_profiles.py | 4 ++-- src/increase/resources/digital_wallet_tokens.py | 4 ++-- src/increase/resources/documents.py | 4 ++-- src/increase/resources/entities.py | 4 ++-- src/increase/resources/event_subscriptions.py | 4 ++-- src/increase/resources/events.py | 4 ++-- src/increase/resources/exports.py | 4 ++-- src/increase/resources/external_accounts.py | 4 ++-- src/increase/resources/files.py | 4 ++-- src/increase/resources/groups.py | 4 ++-- src/increase/resources/inbound_ach_transfers.py | 4 ++-- src/increase/resources/inbound_check_deposits.py | 4 ++-- src/increase/resources/inbound_mail_items.py | 4 ++-- .../resources/inbound_real_time_payments_transfers.py | 4 ++-- src/increase/resources/inbound_wire_drawdown_requests.py | 4 ++-- src/increase/resources/inbound_wire_transfers.py | 4 ++-- src/increase/resources/intrafi_account_enrollments.py | 4 ++-- src/increase/resources/intrafi_balances.py | 4 ++-- src/increase/resources/intrafi_exclusions.py | 4 ++-- src/increase/resources/lockboxes.py | 4 ++-- src/increase/resources/oauth_applications.py | 4 ++-- src/increase/resources/oauth_connections.py | 4 ++-- src/increase/resources/oauth_tokens.py | 4 ++-- src/increase/resources/pending_transactions.py | 4 ++-- src/increase/resources/physical_card_profiles.py | 4 ++-- src/increase/resources/physical_cards.py | 4 ++-- src/increase/resources/programs.py | 4 ++-- .../resources/proof_of_authorization_request_submissions.py | 4 ++-- src/increase/resources/proof_of_authorization_requests.py | 4 ++-- src/increase/resources/real_time_decisions.py | 4 ++-- .../resources/real_time_payments_request_for_payments.py | 4 ++-- src/increase/resources/real_time_payments_transfers.py | 4 ++-- src/increase/resources/routing_numbers.py | 4 ++-- src/increase/resources/simulations/account_statements.py | 4 ++-- src/increase/resources/simulations/account_transfers.py | 4 ++-- src/increase/resources/simulations/ach_transfers.py | 4 ++-- .../resources/simulations/card_authorization_expirations.py | 4 ++-- src/increase/resources/simulations/card_authorizations.py | 4 ++-- src/increase/resources/simulations/card_disputes.py | 4 ++-- src/increase/resources/simulations/card_fuel_confirmations.py | 4 ++-- src/increase/resources/simulations/card_increments.py | 4 ++-- src/increase/resources/simulations/card_refunds.py | 4 ++-- src/increase/resources/simulations/card_reversals.py | 4 ++-- src/increase/resources/simulations/card_settlements.py | 4 ++-- src/increase/resources/simulations/check_deposits.py | 4 ++-- src/increase/resources/simulations/check_transfers.py | 4 ++-- .../resources/simulations/digital_wallet_token_requests.py | 4 ++-- src/increase/resources/simulations/documents.py | 4 ++-- src/increase/resources/simulations/inbound_ach_transfers.py | 4 ++-- src/increase/resources/simulations/inbound_check_deposits.py | 4 ++-- src/increase/resources/simulations/inbound_funds_holds.py | 4 ++-- src/increase/resources/simulations/inbound_mail_items.py | 4 ++-- .../simulations/inbound_real_time_payments_transfers.py | 4 ++-- .../resources/simulations/inbound_wire_drawdown_requests.py | 4 ++-- src/increase/resources/simulations/inbound_wire_transfers.py | 4 ++-- src/increase/resources/simulations/interest_payments.py | 4 ++-- src/increase/resources/simulations/physical_cards.py | 4 ++-- src/increase/resources/simulations/programs.py | 4 ++-- .../resources/simulations/real_time_payments_transfers.py | 4 ++-- src/increase/resources/simulations/simulations.py | 4 ++-- src/increase/resources/simulations/wire_transfers.py | 4 ++-- src/increase/resources/supplemental_documents.py | 4 ++-- src/increase/resources/transactions.py | 4 ++-- src/increase/resources/wire_drawdown_requests.py | 4 ++-- src/increase/resources/wire_transfers.py | 4 ++-- 81 files changed, 162 insertions(+), 162 deletions(-) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 60942c447..7aefb3a19 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -35,7 +35,7 @@ class AccountNumbersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountNumbersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -294,7 +294,7 @@ class AsyncAccountNumbersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountNumbersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index bcac68ccb..72a0bed63 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -26,7 +26,7 @@ class AccountStatementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -138,7 +138,7 @@ class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 31087746e..9ed099d38 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -29,7 +29,7 @@ class AccountTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -299,7 +299,7 @@ class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index a5f3a10dd..5f083c936 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -39,7 +39,7 @@ class AccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -362,7 +362,7 @@ class AsyncAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 9c1172317..89237765f 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -33,7 +33,7 @@ class ACHPrenotificationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHPrenotificationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -259,7 +259,7 @@ class AsyncACHPrenotificationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHPrenotificationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 5c38a169c..671cc110f 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -31,7 +31,7 @@ class ACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -395,7 +395,7 @@ class AsyncACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 0594eab90..844498447 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -39,7 +39,7 @@ class BookkeepingAccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingAccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -270,7 +270,7 @@ class AsyncBookkeepingAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingAccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index dbeb8d91d..5a8fe0ba9 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -26,7 +26,7 @@ class BookkeepingEntriesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingEntriesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -136,7 +136,7 @@ class AsyncBookkeepingEntriesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingEntriesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index 57fb95b41..ef134c2f2 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -32,7 +32,7 @@ class BookkeepingEntrySetsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> BookkeepingEntrySetsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -204,7 +204,7 @@ class AsyncBookkeepingEntrySetsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncBookkeepingEntrySetsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 61aef4cfa..db762d7c5 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -29,7 +29,7 @@ class CardDisputesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardDisputesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -202,7 +202,7 @@ class AsyncCardDisputesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index ff26923d7..6ba08b132 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -26,7 +26,7 @@ class CardPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -140,7 +140,7 @@ class AsyncCardPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 0a9743c73..7b926776e 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -26,7 +26,7 @@ class CardPurchaseSupplementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardPurchaseSupplementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -139,7 +139,7 @@ class AsyncCardPurchaseSupplementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardPurchaseSupplementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 517a66c76..ae584b344 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -32,7 +32,7 @@ class CardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -325,7 +325,7 @@ class AsyncCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index d91e4b11d..5c50117b3 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -29,7 +29,7 @@ class CheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -208,7 +208,7 @@ class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 8c8d463cc..09e22e1b1 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -35,7 +35,7 @@ class CheckTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -366,7 +366,7 @@ class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index e4eb2d1ef..7ef7c640e 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -26,7 +26,7 @@ class DeclinedTransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DeclinedTransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -144,7 +144,7 @@ class AsyncDeclinedTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDeclinedTransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 6a42346d6..0499e7d6f 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -33,7 +33,7 @@ class DigitalCardProfilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalCardProfilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -355,7 +355,7 @@ class AsyncDigitalCardProfilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalCardProfilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index d541453b9..37eec5d76 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -26,7 +26,7 @@ class DigitalWalletTokensResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalWalletTokensResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -138,7 +138,7 @@ class AsyncDigitalWalletTokensResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalWalletTokensResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 99a81fbc8..7e5e31aea 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -26,7 +26,7 @@ class DocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -138,7 +138,7 @@ class AsyncDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index f03b090b4..a6c942033 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -42,7 +42,7 @@ class EntitiesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EntitiesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -600,7 +600,7 @@ class AsyncEntitiesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEntitiesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 1ae9bc63b..e1c62f5db 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -35,7 +35,7 @@ class EventSubscriptionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EventSubscriptionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -490,7 +490,7 @@ class AsyncEventSubscriptionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEventSubscriptionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 85691c875..3640ca319 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -26,7 +26,7 @@ class EventsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> EventsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -138,7 +138,7 @@ class AsyncEventsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncEventsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 7504246a7..3f02e7dd8 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -31,7 +31,7 @@ class ExportsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ExportsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -240,7 +240,7 @@ class AsyncExportsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 387a3d3f2..9d8a53a1f 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -35,7 +35,7 @@ class ExternalAccountsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ExternalAccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -301,7 +301,7 @@ class AsyncExternalAccountsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncExternalAccountsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 58077f635..b9bfe8da8 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -34,7 +34,7 @@ class FilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> FilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -254,7 +254,7 @@ class AsyncFilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncFilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 98b9ab8de..188e92568 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -23,7 +23,7 @@ class GroupsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> GroupsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -63,7 +63,7 @@ class AsyncGroupsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncGroupsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 070a8567f..f31e91c52 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -36,7 +36,7 @@ class InboundACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -393,7 +393,7 @@ class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 364d705da..eff6a3cdf 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -31,7 +31,7 @@ class InboundCheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -254,7 +254,7 @@ class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 95ee1ea64..041ef09f3 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -26,7 +26,7 @@ class InboundMailItemsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -138,7 +138,7 @@ class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index 19a15d556..599bbd639 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -26,7 +26,7 @@ class InboundRealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -144,7 +144,7 @@ class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index 01b8e6724..d510d8da9 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -26,7 +26,7 @@ class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -132,7 +132,7 @@ class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 7e1d920f3..f0b7f519d 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -28,7 +28,7 @@ class InboundWireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -154,7 +154,7 @@ class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index b07a8e2a1..77bdf1e6a 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -29,7 +29,7 @@ class IntrafiAccountEnrollmentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiAccountEnrollmentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -242,7 +242,7 @@ class AsyncIntrafiAccountEnrollmentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index abf5d5df0..cc9c517d5 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -23,7 +23,7 @@ class IntrafiBalancesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiBalancesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -79,7 +79,7 @@ class AsyncIntrafiBalancesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiBalancesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 5adc284fd..092b3f9d7 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -29,7 +29,7 @@ class IntrafiExclusionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> IntrafiExclusionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -242,7 +242,7 @@ class AsyncIntrafiExclusionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncIntrafiExclusionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 6ade3c08c..5fa0167a1 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -31,7 +31,7 @@ class LockboxesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> LockboxesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -266,7 +266,7 @@ class AsyncLockboxesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncLockboxesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index f12c01d6a..264bffaad 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -26,7 +26,7 @@ class OAuthApplicationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> OAuthApplicationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -136,7 +136,7 @@ class AsyncOAuthApplicationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncOAuthApplicationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index 70c780fbb..cd789dd90 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -26,7 +26,7 @@ class OAuthConnectionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> OAuthConnectionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -139,7 +139,7 @@ class AsyncOAuthConnectionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncOAuthConnectionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index 02522c854..cc257c9fe 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -30,7 +30,7 @@ class OAuthTokensResource(SyncAPIResource): @cached_property def with_raw_response(self) -> OAuthTokensResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -122,7 +122,7 @@ class AsyncOAuthTokensResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncOAuthTokensResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 8d9e1bf4e..e15e4a663 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -26,7 +26,7 @@ class PendingTransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -146,7 +146,7 @@ class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 8cf6d5bcf..73102dfa9 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -33,7 +33,7 @@ class PhysicalCardProfilesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardProfilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -320,7 +320,7 @@ class AsyncPhysicalCardProfilesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardProfilesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 48b6cb36b..1084a1e00 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -31,7 +31,7 @@ class PhysicalCardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -257,7 +257,7 @@ class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 34df34505..96ce2e3b1 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -26,7 +26,7 @@ class ProgramsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProgramsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -130,7 +130,7 @@ class AsyncProgramsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index 91cc71c3b..a8a8747ea 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -35,7 +35,7 @@ class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -238,7 +238,7 @@ class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py index a5ea06c53..8255e6f96 100644 --- a/src/increase/resources/proof_of_authorization_requests.py +++ b/src/increase/resources/proof_of_authorization_requests.py @@ -26,7 +26,7 @@ class ProofOfAuthorizationRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -134,7 +134,7 @@ class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 69dd7d9b9..f2a919cca 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -28,7 +28,7 @@ class RealTimeDecisionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimeDecisionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -162,7 +162,7 @@ class AsyncRealTimeDecisionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimeDecisionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py index f15d12333..15bcc1835 100644 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ b/src/increase/resources/real_time_payments_request_for_payments.py @@ -35,7 +35,7 @@ class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -227,7 +227,7 @@ class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 54fc62024..0a2b701ce 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -29,7 +29,7 @@ class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -246,7 +246,7 @@ class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 90dc005ea..a9689c3e0 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -26,7 +26,7 @@ class RoutingNumbersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RoutingNumbersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -102,7 +102,7 @@ class AsyncRoutingNumbersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRoutingNumbersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index d4eeefd06..141646748 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -28,7 +28,7 @@ class AccountStatementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountStatementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -93,7 +93,7 @@ class AsyncAccountStatementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountStatementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index e77944499..82bbcf024 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -23,7 +23,7 @@ class AccountTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> AccountTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -91,7 +91,7 @@ class AsyncAccountTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncAccountTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 0c7ce1bbc..e1443a6e4 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -30,7 +30,7 @@ class ACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -571,7 +571,7 @@ class AsyncACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py index 9965d1132..08ae22ba6 100644 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -28,7 +28,7 @@ class CardAuthorizationExpirationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardAuthorizationExpirationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -93,7 +93,7 @@ class AsyncCardAuthorizationExpirationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 6c647fb0b..a1f07895d 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -30,7 +30,7 @@ class CardAuthorizationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardAuthorizationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -214,7 +214,7 @@ class AsyncCardAuthorizationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardAuthorizationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 2adbb4002..67c5d923d 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -30,7 +30,7 @@ class CardDisputesResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardDisputesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -119,7 +119,7 @@ class AsyncCardDisputesResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py index de345f21c..7400048d6 100644 --- a/src/increase/resources/simulations/card_fuel_confirmations.py +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -28,7 +28,7 @@ class CardFuelConfirmationsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardFuelConfirmationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -103,7 +103,7 @@ class AsyncCardFuelConfirmationsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardFuelConfirmationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py index 3fcb7c4db..9e8d77e13 100644 --- a/src/increase/resources/simulations/card_increments.py +++ b/src/increase/resources/simulations/card_increments.py @@ -28,7 +28,7 @@ class CardIncrementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardIncrementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -108,7 +108,7 @@ class AsyncCardIncrementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardIncrementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 774c8efa7..b2fb23792 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -28,7 +28,7 @@ class CardRefundsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardRefundsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -93,7 +93,7 @@ class AsyncCardRefundsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardRefundsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py index 2e05d8cd8..d1b070b99 100644 --- a/src/increase/resources/simulations/card_reversals.py +++ b/src/increase/resources/simulations/card_reversals.py @@ -28,7 +28,7 @@ class CardReversalsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardReversalsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -104,7 +104,7 @@ class AsyncCardReversalsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardReversalsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py index d1717800d..c3919d12e 100644 --- a/src/increase/resources/simulations/card_settlements.py +++ b/src/increase/resources/simulations/card_settlements.py @@ -28,7 +28,7 @@ class CardSettlementsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CardSettlementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -110,7 +110,7 @@ class AsyncCardSettlementsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCardSettlementsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 5b35fb58f..8b03a9fd7 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -23,7 +23,7 @@ class CheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -175,7 +175,7 @@ class AsyncCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index af2d8abd3..8d947b849 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -23,7 +23,7 @@ class CheckTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> CheckTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -89,7 +89,7 @@ class AsyncCheckTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncCheckTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 784af0506..a72cf4085 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -28,7 +28,7 @@ class DigitalWalletTokenRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DigitalWalletTokenRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -93,7 +93,7 @@ class AsyncDigitalWalletTokenRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDigitalWalletTokenRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 928921675..63c6f9f29 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -28,7 +28,7 @@ class DocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> DocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -90,7 +90,7 @@ class AsyncDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 73d5a6cc5..f8be7d2c3 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -32,7 +32,7 @@ class InboundACHTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -187,7 +187,7 @@ class AsyncInboundACHTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundACHTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 0a6a09f61..4c124dad5 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -28,7 +28,7 @@ class InboundCheckDepositsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -109,7 +109,7 @@ class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundCheckDepositsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/inbound_funds_holds.py index 08e2dff41..7a1a9be3d 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/inbound_funds_holds.py @@ -23,7 +23,7 @@ class InboundFundsHoldsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -89,7 +89,7 @@ class AsyncInboundFundsHoldsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py index 8e6289850..b74b359da 100755 --- a/src/increase/resources/simulations/inbound_mail_items.py +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -28,7 +28,7 @@ class InboundMailItemsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundMailItemsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -105,7 +105,7 @@ class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundMailItemsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index fd4ddf639..f3adb448c 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -28,7 +28,7 @@ class InboundRealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -122,7 +122,7 @@ class AsyncInboundRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index e5c47f29f..f6e89b686 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -28,7 +28,7 @@ class InboundWireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -178,7 +178,7 @@ class AsyncInboundWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 522e79273..e4f3b4668 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -28,7 +28,7 @@ class InboundWireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InboundWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -174,7 +174,7 @@ class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInboundWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index e4f4d7950..fde1548d3 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -31,7 +31,7 @@ class InterestPaymentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> InterestPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -112,7 +112,7 @@ class AsyncInterestPaymentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncInterestPaymentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 8fea4042f..baf6d1c35 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -30,7 +30,7 @@ class PhysicalCardsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> PhysicalCardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -114,7 +114,7 @@ class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 924f76cdd..4358abc10 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -28,7 +28,7 @@ class ProgramsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> ProgramsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -94,7 +94,7 @@ class AsyncProgramsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncProgramsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 29cba52bb..3f812f40d 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -28,7 +28,7 @@ class RealTimePaymentsTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> RealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -103,7 +103,7 @@ class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncRealTimePaymentsTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 7896297e1..878a9c5ee 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -336,7 +336,7 @@ def documents(self) -> DocumentsResource: @cached_property def with_raw_response(self) -> SimulationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -465,7 +465,7 @@ def documents(self) -> AsyncDocumentsResource: @cached_property def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 4a3fa3565..3bada2696 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -23,7 +23,7 @@ class WireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -133,7 +133,7 @@ class AsyncWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index 514ac236c..b0f7ddc31 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -29,7 +29,7 @@ class SupplementalDocumentsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> SupplementalDocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -159,7 +159,7 @@ class AsyncSupplementalDocumentsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncSupplementalDocumentsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index 39c32b1f5..d9d6a50da 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -26,7 +26,7 @@ class TransactionsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> TransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -143,7 +143,7 @@ class AsyncTransactionsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncTransactionsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index cc951fa43..9a958b3f8 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -31,7 +31,7 @@ class WireDrawdownRequestsResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -257,7 +257,7 @@ class AsyncWireDrawdownRequestsResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 34a675b12..84be74334 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -29,7 +29,7 @@ class WireTransfersResource(SyncAPIResource): @cached_property def with_raw_response(self) -> WireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers @@ -346,7 +346,7 @@ class AsyncWireTransfersResource(AsyncAPIResource): @cached_property def with_raw_response(self) -> AsyncWireTransfersResourceWithRawResponse: """ - This property can be used as a prefix for any HTTP method call to return the + This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers From 7dc60b4a7ef6a90d6fe96e4ef5ec62ca838f5cc8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:19:30 +0000 Subject: [PATCH 0391/1325] fix(tests): make test_get_platform less flaky (#915) --- tests/test_client.py | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 690c87fb2..d4228a6a8 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,6 +6,7 @@ import os import sys import json +import time import asyncio import inspect import subprocess @@ -1739,10 +1740,20 @@ async def test_main() -> None: [sys.executable, "-c", test_code], text=True, ) as process: - try: - process.wait(2) - if process.returncode: - raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") - except subprocess.TimeoutExpired as e: - process.kill() - raise AssertionError("calling get_platform using asyncify resulted in a hung process") from e + timeout = 10 # seconds + + start_time = time.monotonic() + while True: + return_code = process.poll() + if return_code is not None: + if return_code != 0: + raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") + + # success + break + + if time.monotonic() - start_time > timeout: + process.kill() + raise AssertionError("calling get_platform using asyncify resulted in a hung process") + + time.sleep(0.1) From 8237276fe0ad7702a10ef7567f81e59837036bca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 10:20:46 +0000 Subject: [PATCH 0392/1325] chore(internal): version bump (#916) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7a2a76c6..7f4bb0b5b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.177.0" + ".": "0.177.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dba00c828..2dc07ac59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.177.0" +version = "0.177.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8122fa964..fed4d4bcc 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.177.0" # x-release-please-version +__version__ = "0.177.1" # x-release-please-version From 613be2b59a3911a4a19d5a39584b8c7dfb40266e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 20 Jan 2025 12:09:18 +0000 Subject: [PATCH 0393/1325] chore(internal): avoid pytest-asyncio deprecation warning (#917) --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 2dc07ac59..871c2f382 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -129,6 +129,7 @@ testpaths = ["tests"] addopts = "--tb=short" xfail_strict = true asyncio_mode = "auto" +asyncio_default_fixture_loop_scope = "session" filterwarnings = [ "error" ] From 950f489ea1caa5bd589cf43c0b6c8e08531bf3d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 17:59:16 +0000 Subject: [PATCH 0394/1325] chore(internal): minor style changes (#919) --- src/increase/_response.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_response.py b/src/increase/_response.py index cfff40032..9597a5b3b 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -136,6 +136,8 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: if cast_to and is_annotated_type(cast_to): cast_to = extract_type_arg(cast_to, 0) + origin = get_origin(cast_to) or cast_to + if self._is_sse_stream: if to: if not is_stream_class_type(to): @@ -195,8 +197,6 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: if cast_to == bool: return cast(R, response.text.lower() == "true") - origin = get_origin(cast_to) or cast_to - if origin == APIResponse: raise RuntimeError("Unexpected state - cast_to is `APIResponse`") From 6ba728226f64c4236eb05243b9803ede16797749 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 19:46:51 +0000 Subject: [PATCH 0395/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9478903e6..fbfe303ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9f22ab139c225a56bc829befa825a81eb1f2bc1af4b1a934b6f8888d4e422a58.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d0f9cb729e759d76c6e2853df124642232778711c74086512185cd65ab17f5e6.yml From b124d8846b39e1b8a6c0efec6f9518bc982868ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 21:52:48 +0000 Subject: [PATCH 0396/1325] feat(api): api update (#920) --- .stats.yml | 2 +- src/increase/resources/files.py | 6 ++++++ src/increase/types/file.py | 3 +++ src/increase/types/file_create_params.py | 3 +++ src/increase/types/file_list_params.py | 1 + 5 files changed, 14 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fbfe303ce..5eac66deb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d0f9cb729e759d76c6e2853df124642232778711c74086512185cd65ab17f5e6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-03ecb68309b2d2429b7c74b155e110f4d992425d54067160881ecc1d1aa1551e.yml diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index b9bfe8da8..ac54dc1a0 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -59,6 +59,7 @@ def create( "check_image_back", "mailed_check_image", "check_voucher_image", + "check_attachment_image", "form_ss_4", "identity_document", "other", @@ -98,6 +99,8 @@ def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. + - `check_attachment_image` - An image to be printed on an additional page and + mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. @@ -279,6 +282,7 @@ async def create( "check_image_back", "mailed_check_image", "check_voucher_image", + "check_attachment_image", "form_ss_4", "identity_document", "other", @@ -318,6 +322,8 @@ async def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. + - `check_attachment_image` - An image to be printed on an additional page and + mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 362ead3ae..cb9079d4e 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -53,6 +53,7 @@ class File(BaseModel): "processed_check_image_back", "mailed_check_image", "check_voucher_image", + "check_attachment_image", "inbound_mail_item", "form_1099_int", "form_ss_4", @@ -86,6 +87,8 @@ class File(BaseModel): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. + - `check_attachment_image` - An image to be printed on an additional page and + mailed with a check that you've requested Increase print. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_ss_4` - IRS Form SS-4. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index c71a677d4..bbf9fa309 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -24,6 +24,7 @@ class FileCreateParams(TypedDict, total=False): "check_image_back", "mailed_check_image", "check_voucher_image", + "check_attachment_image", "form_ss_4", "identity_document", "other", @@ -45,6 +46,8 @@ class FileCreateParams(TypedDict, total=False): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. + - `check_attachment_image` - An image to be printed on an additional page and + mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index afc00a66c..a6ca7ce80 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -71,6 +71,7 @@ class CreatedAt(TypedDict, total=False): "processed_check_image_back", "mailed_check_image", "check_voucher_image", + "check_attachment_image", "inbound_mail_item", "form_1099_int", "form_ss_4", From 97a8eebde1f9368bb2a1e4f04f8407135d9a1216 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 21 Jan 2025 21:54:56 +0000 Subject: [PATCH 0397/1325] chore(internal): version bump (#921) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f4bb0b5b..ab928dd0c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.177.1" + ".": "0.178.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 871c2f382..77922d9c3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.177.1" +version = "0.178.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fed4d4bcc..a78d6c9f0 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.177.1" # x-release-please-version +__version__ = "0.178.0" # x-release-please-version From e5808d1ba4b0fe1f81dc69e633b4f520e41f2046 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Jan 2025 12:47:21 +0000 Subject: [PATCH 0398/1325] chore(internal): minor formatting changes (#922) --- .github/workflows/ci.yml | 3 +-- scripts/bootstrap | 2 +- scripts/lint | 1 - 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 40293964f..c8a8a4f72 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,6 @@ jobs: lint: name: lint runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 @@ -30,6 +29,7 @@ jobs: - name: Run lints run: ./scripts/lint + test: name: test runs-on: ubuntu-latest @@ -50,4 +50,3 @@ jobs: - name: Run tests run: ./scripts/test - diff --git a/scripts/bootstrap b/scripts/bootstrap index 8c5c60eba..e84fe62c3 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,7 +4,7 @@ set -e cd "$(dirname "$0")/.." -if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then +if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then brew bundle check >/dev/null 2>&1 || { echo "==> Installing Homebrew dependencies…" brew bundle diff --git a/scripts/lint b/scripts/lint index a36d33cc6..76686137c 100755 --- a/scripts/lint +++ b/scripts/lint @@ -9,4 +9,3 @@ rye run lint echo "==> Making sure it imports" rye run python -c 'import increase' - From f571271235d6813a947581c8450a3408b3e3920e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:45:36 +0000 Subject: [PATCH 0399/1325] feat(api): api update (#924) --- .stats.yml | 2 +- src/increase/types/document.py | 3 ++- src/increase/types/document_list_params.py | 2 +- src/increase/types/file.py | 2 ++ src/increase/types/file_list_params.py | 1 + 5 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5eac66deb..e2f616532 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-03ecb68309b2d2429b7c74b155e110f4d992425d54067160881ecc1d1aa1551e.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-936415a7c13aa6a9b75c94e06d628346ea373e89a34c5f4281dbfd68a5114b3c.yml diff --git a/src/increase/types/document.py b/src/increase/types/document.py index de09b640b..fac32ff1f 100644 --- a/src/increase/types/document.py +++ b/src/increase/types/document.py @@ -13,10 +13,11 @@ class Document(BaseModel): id: str """The Document identifier.""" - category: Literal["form_1099_int", "proof_of_authorization", "company_information"] + category: Literal["form_1099_int", "form_1099_misc", "proof_of_authorization", "company_information"] """The type of document. - `form_1099_int` - Internal Revenue Service Form 1099-INT. + - `form_1099_misc` - Internal Revenue Service Form 1099-MISC. - `proof_of_authorization` - A document submitted in response to a proof of authorization request for an ACH transfer. - `company_information` - Company information, such a policies or procedures, diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py index 28b6507cb..aca78e270 100644 --- a/src/increase/types/document_list_params.py +++ b/src/increase/types/document_list_params.py @@ -32,7 +32,7 @@ class DocumentListParams(TypedDict, total=False): _CategoryReservedKeywords = TypedDict( "_CategoryReservedKeywords", { - "in": List[Literal["form_1099_int", "proof_of_authorization", "company_information"]], + "in": List[Literal["form_1099_int", "form_1099_misc", "proof_of_authorization", "company_information"]], }, total=False, ) diff --git a/src/increase/types/file.py b/src/increase/types/file.py index cb9079d4e..f863e0ec5 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -56,6 +56,7 @@ class File(BaseModel): "check_attachment_image", "inbound_mail_item", "form_1099_int", + "form_1099_misc", "form_ss_4", "identity_document", "increase_statement", @@ -91,6 +92,7 @@ class File(BaseModel): mailed with a check that you've requested Increase print. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. + - `form_1099_misc` - IRS Form 1099-MISC. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `increase_statement` - A statement generated by Increase. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index a6ca7ce80..84f353c65 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -74,6 +74,7 @@ class CreatedAt(TypedDict, total=False): "check_attachment_image", "inbound_mail_item", "form_1099_int", + "form_1099_misc", "form_ss_4", "identity_document", "increase_statement", From 6f66ea1679edbbf1807d5daddad3e6f39207bca5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 16:47:02 +0000 Subject: [PATCH 0400/1325] chore(internal): version bump (#925) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ab928dd0c..2bfc13c14 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.178.0" + ".": "0.179.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 77922d9c3..00d5e221b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.178.0" +version = "0.179.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a78d6c9f0..10890a0f6 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.178.0" # x-release-please-version +__version__ = "0.179.0" # x-release-please-version From 153965c048841260012f5ff04516209d4fe33239 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:06:36 +0000 Subject: [PATCH 0401/1325] feat(api): api update (#926) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 12 ++++++++++++ src/increase/types/declined_transaction.py | 4 ++++ src/increase/types/pending_transaction.py | 4 ++++ src/increase/types/real_time_decision.py | 4 ++++ 5 files changed, 25 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e2f616532..12eea302d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-936415a7c13aa6a9b75c94e06d628346ea373e89a34c5f4281dbfd68a5114b3c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-97fb48534a75d68acd544082e2352e69557d798f912cf62c85825e78d9102eca.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 2dafd6ead..b94dd4ce5 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -152,6 +152,7 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -173,6 +174,9 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ @@ -565,6 +569,7 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -586,6 +591,9 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ @@ -2411,6 +2419,7 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -2432,6 +2441,9 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index bc33fc7fe..1a8aee9d0 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -200,6 +200,7 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -221,6 +222,9 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index ce9c2266f..0a7f3fc95 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -147,6 +147,7 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -168,6 +169,9 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 0cc3ef040..4abdf5873 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -162,6 +162,7 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", "other", ] ] = None @@ -183,6 +184,9 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): has enabled Visa's Transaction Advisory Service and requires further authentication to perform the transaction. In practice this is often utilized at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. - `other` - An unspecific reason for stand-in processing. """ From 6c821b34ab6eb38573c6950e9de11232d68eba58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 19:08:12 +0000 Subject: [PATCH 0402/1325] chore(internal): version bump (#928) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2bfc13c14..7d550efe5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.179.0" + ".": "0.180.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 00d5e221b..535248f38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.179.0" +version = "0.180.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 10890a0f6..27cffb695 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.179.0" # x-release-please-version +__version__ = "0.180.0" # x-release-please-version From 7668af20e9d3e2b92d67a455752ade511fc8e07e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 05:18:13 +0000 Subject: [PATCH 0403/1325] feat(api): api update (#929) --- .stats.yml | 2 +- src/increase/types/check_transfer.py | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 12eea302d..e802ef6c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-97fb48534a75d68acd544082e2352e69557d798f912cf62c85825e78d9102eca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fb44f7a35402f0dc2a091841c1ee5c0d0b1c0dc21bbd49f9fe7a07cfaca8dfca.yml diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 846a12d38..02426c1c0 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -102,6 +102,9 @@ class Mailing(BaseModel): the check was mailed. """ + tracking_number: Optional[str] = None + """The tracking number of the shipment, if available for the shipping method.""" + class PhysicalCheckMailingAddress(BaseModel): city: Optional[str] = None From 9d52beda6055c1f45335ee805063d83efe2f0353 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 05:19:32 +0000 Subject: [PATCH 0404/1325] chore(internal): version bump (#931) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7d550efe5..b9a194e0f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.180.0" + ".": "0.181.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 535248f38..fdb7d36b8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.180.0" +version = "0.181.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 27cffb695..e82680e29 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.180.0" # x-release-please-version +__version__ = "0.181.0" # x-release-please-version From abbe7e99abcf256187fad84ebc48fecf20962697 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 06:46:13 +0000 Subject: [PATCH 0405/1325] feat(api): api update (#932) --- .stats.yml | 2 +- src/increase/types/check_transfer.py | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index e802ef6c1..a67f299cb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fb44f7a35402f0dc2a091841c1ee5c0d0b1c0dc21bbd49f9fe7a07cfaca8dfca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-acd347798fc268a8063bde83e83ff69541a1feb789e40bc54b3798937a7492ca.yml diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 02426c1c0..b19e7ce82 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -182,6 +182,13 @@ class PhysicalCheck(BaseModel): return_address: Optional[PhysicalCheckReturnAddress] = None """The return address to be printed on the check.""" + shipping_method: Optional[Literal["usps_first_class", "fedex_overnight"]] = None + """The shipping method for the check. + + - `usps_first_class` - USPS First Class + - `fedex_overnight` - FedEx Overnight + """ + signature_text: Optional[str] = None """The text that will appear as the signature on the check in cursive font. From 1104184cb6d1fb36e050cb61b5d9f58b0d4ee518 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 06:47:29 +0000 Subject: [PATCH 0406/1325] chore(internal): version bump (#934) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b9a194e0f..c69dcd041 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.181.0" + ".": "0.182.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fdb7d36b8..e47cef405 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.181.0" +version = "0.182.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e82680e29..36210efa7 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.181.0" # x-release-please-version +__version__ = "0.182.0" # x-release-please-version From 96e6a6f9657b6cbe292498f4f589dd7aa1fb4f3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 21:29:09 +0000 Subject: [PATCH 0407/1325] feat(api): api update (#935) --- .stats.yml | 2 +- src/increase/resources/check_transfers.py | 20 +++++++++---------- .../types/check_transfer_create_params.py | 14 ++++++------- tests/api_resources/test_check_transfers.py | 10 ++++++++-- 4 files changed, 26 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index a67f299cb..880ecadac 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-acd347798fc268a8063bde83e83ff69541a1feb789e40bc54b3798937a7492ca.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-503b3369995201c52ca638ced198ae20c73a0b26e5db67b8963e107bff5d1c2d.yml diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 09e22e1b1..0d2a96d94 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -56,8 +56,8 @@ def create( *, account_id: str, amount: int, + fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, - fulfillment_method: Literal["physical_check", "third_party"] | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, @@ -77,9 +77,6 @@ def create( amount: The transfer amount in USD cents. - source_account_number_id: The identifier of the Account Number from which to send the transfer and print - on the check. - fulfillment_method: Whether Increase will print and mail the check or if you will do it yourself. - `physical_check` - Increase will print and mail a physical check. @@ -87,6 +84,9 @@ def create( printing and mailing a check with the provided account number, routing number, check number, and amount. + source_account_number_id: The identifier of the Account Number from which to send the transfer and print + on the check. + physical_check: Details relating to the physical check that Increase will print and mail. This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. @@ -113,8 +113,8 @@ def create( { "account_id": account_id, "amount": amount, - "source_account_number_id": source_account_number_id, "fulfillment_method": fulfillment_method, + "source_account_number_id": source_account_number_id, "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, @@ -387,8 +387,8 @@ async def create( *, account_id: str, amount: int, + fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, - fulfillment_method: Literal["physical_check", "third_party"] | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, @@ -408,9 +408,6 @@ async def create( amount: The transfer amount in USD cents. - source_account_number_id: The identifier of the Account Number from which to send the transfer and print - on the check. - fulfillment_method: Whether Increase will print and mail the check or if you will do it yourself. - `physical_check` - Increase will print and mail a physical check. @@ -418,6 +415,9 @@ async def create( printing and mailing a check with the provided account number, routing number, check number, and amount. + source_account_number_id: The identifier of the Account Number from which to send the transfer and print + on the check. + physical_check: Details relating to the physical check that Increase will print and mail. This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. @@ -444,8 +444,8 @@ async def create( { "account_id": account_id, "amount": amount, - "source_account_number_id": source_account_number_id, "fulfillment_method": fulfillment_method, + "source_account_number_id": source_account_number_id, "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index d2e04b85a..590973ad3 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -20,13 +20,7 @@ class CheckTransferCreateParams(TypedDict, total=False): amount: Required[int] """The transfer amount in USD cents.""" - source_account_number_id: Required[str] - """ - The identifier of the Account Number from which to send the transfer and print - on the check. - """ - - fulfillment_method: Literal["physical_check", "third_party"] + fulfillment_method: Required[Literal["physical_check", "third_party"]] """Whether Increase will print and mail the check or if you will do it yourself. - `physical_check` - Increase will print and mail a physical check. @@ -35,6 +29,12 @@ class CheckTransferCreateParams(TypedDict, total=False): check number, and amount. """ + source_account_number_id: Required[str] + """ + The identifier of the Account Number from which to send the transfer and print + on the check. + """ + physical_check: PhysicalCheck """Details relating to the physical check that Increase will print and mail. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index cf04e77c0..a46c2089e 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -26,6 +26,7 @@ def test_method_create(self, client: Increase) -> None: check_transfer = client.check_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -35,8 +36,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: check_transfer = client.check_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, - source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", fulfillment_method="physical_check", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", physical_check={ "mailing_address": { "city": "New York", @@ -69,6 +70,7 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) @@ -82,6 +84,7 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed @@ -302,6 +305,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -311,8 +315,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) check_transfer = await async_client.check_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, - source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", fulfillment_method="physical_check", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", physical_check={ "mailing_address": { "city": "New York", @@ -345,6 +349,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) @@ -358,6 +363,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.check_transfers.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed From f915683dc89b33ede5315ab400e7d26e5e701283 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Jan 2025 21:30:25 +0000 Subject: [PATCH 0408/1325] chore(internal): version bump (#937) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c69dcd041..6f72712c3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.182.0" + ".": "0.183.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e47cef405..0c27c719c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.182.0" +version = "0.183.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 36210efa7..5664860eb 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.182.0" # x-release-please-version +__version__ = "0.183.0" # x-release-please-version From 6b43828006753417edddca9bb176dcb5c87d0d3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:48:28 +0000 Subject: [PATCH 0409/1325] feat(api): api update (#938) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 177 ++++++++++++++++++++++ src/increase/types/pending_transaction.py | 13 ++ src/increase/types/transaction.py | 69 +++++++++ 4 files changed, 260 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 880ecadac..f96c3c096 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-503b3369995201c52ca638ced198ae20c73a0b26e5db67b8963e107bff5d1c2d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b83233a82025949d61c863da86f7d5cb639e8868924719a83bda389714fbf568.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index b94dd4ce5..0b6fc7b84 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -9,6 +9,9 @@ __all__ = [ "CardPayment", "Element", + "ElementCardAuthentication", + "ElementCardAuthenticationChallenge", + "ElementCardAuthenticationChallengeAttempt", "ElementCardAuthorization", "ElementCardAuthorizationNetworkDetails", "ElementCardAuthorizationNetworkDetailsVisa", @@ -63,6 +66,173 @@ ] +class ElementCardAuthenticationChallengeAttempt(BaseModel): + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time of the Card + Authentication Challenge Attempt. + """ + + outcome: Literal["successful", "failed"] + """The outcome of the Card Authentication Challenge Attempt. + + - `successful` - The attempt was successful. + - `failed` - The attempt was unsuccessful. + """ + + +class ElementCardAuthenticationChallenge(BaseModel): + attempts: List[ElementCardAuthenticationChallengeAttempt] + """Details about the challenge verification attempts, if any happened.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card + Authentication Challenge was started. + """ + + one_time_code: str + """The one-time code used for the Card Authentication Challenge.""" + + verification_method: Literal["text_message", "email", "none_available"] + """The method used to verify the Card Authentication Challenge. + + - `text_message` - The one-time code was sent via text message. + - `email` - The one-time code was sent via email. + - `none_available` - The one-time code was not successfully delievered. + """ + + verification_value: Optional[str] = None + """ + E.g., the email address or phone number used for the Card Authentication + Challenge. + """ + + +class ElementCardAuthentication(BaseModel): + id: str + """The Card Authentication identifier.""" + + card_id: str + """The identifier of the Card.""" + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ + + challenge: Optional[ElementCardAuthenticationChallenge] = None + """Details about the challenge, if one was requested.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Card + Authentication was attempted. + """ + + deny_reason: Optional[ + Literal[ + "group_locked", + "card_not_active", + "entity_not_active", + "transaction_not_allowed", + "webhook_denied", + "webhook_timed_out", + ] + ] = None + """The reason why this authentication attempt was denied, if it was. + + - `group_locked` - The group was locked. + - `card_not_active` - The card was not active. + - `entity_not_active` - The entity was not active. + - `transaction_not_allowed` - The transaction was not allowed. + - `webhook_denied` - The webhook was denied. + - `webhook_timed_out` - The webhook timed out. + """ + + device_channel: Optional[Literal["app", "browser", "three_ds_requestor_initiated"]] = None + """The device channel of the card authentication attempt. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: str + """The name of the merchant.""" + + purchase_amount: Optional[int] = None + """The purchase amount in minor units.""" + + purchase_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + authentication attempt's purchase currency. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + authentication attempt. + """ + + status: Literal[ + "denied", + "authenticated_with_challenge", + "authenticated_without_challenge", + "awaiting_challenge", + "validating_challenge", + "canceled", + "timed_out_awaiting_challenge", + "errored", + "exceeded_attempt_threshold", + ] + """The status of the card authentication. + + - `denied` - The authentication attempt was denied. + - `authenticated_with_challenge` - The authentication attempt was authenticated + with a challenge. + - `authenticated_without_challenge` - The authentication attempt was + authenticated without a challenge. + - `awaiting_challenge` - The authentication attempt is awaiting a challenge. + - `validating_challenge` - The authentication attempt is validating a challenge. + - `canceled` - The authentication attempt was canceled. + - `timed_out_awaiting_challenge` - The authentication attempt timed out while + awaiting a challenge. + - `errored` - The authentication attempt errored. + - `exceeded_attempt_threshold` - The authentication attempt exceeded the attempt + threshold. + """ + + type: Literal["card_authentication"] + """A constant representing the object's type. + + For this resource it will always be `card_authentication`. + """ + + class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -2653,6 +2823,13 @@ class ElementCardValidation(BaseModel): class Element(BaseModel): + card_authentication: Optional[ElementCardAuthentication] = None + """A Card Authentication object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_authentication`. + """ + card_authorization: Optional[ElementCardAuthorization] = None """A Card Authorization object. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 0a7f3fc95..0bf113134 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -21,6 +21,7 @@ "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", "SourceInboundFundsHold", + "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", "SourceWireTransferInstruction", ] @@ -548,6 +549,11 @@ class SourceInboundFundsHold(BaseModel): """ +class SourceInboundWireTransferReversal(BaseModel): + inbound_wire_transfer_id: str + """The ID of the Inbound Wire Transfer that is being reversed.""" + + class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -662,6 +668,13 @@ class Source(BaseModel): equal to `inbound_funds_hold`. """ + inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None + """An Inbound Wire Transfer Reversal object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_transfer_reversal`. + """ + other: Optional[object] = None """ If the category of this Transaction source is equal to `other`, this field will diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 23e4f1ff8..d1aecbc8e 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -47,10 +47,14 @@ "SourceInboundACHTransferAddenda", "SourceInboundACHTransferAddendaFreeform", "SourceInboundACHTransferAddendaFreeformEntry", + "SourceInboundACHTransferReturnIntention", + "SourceInboundCheckAdjustment", + "SourceInboundCheckDepositReturnIntention", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundRealTimePaymentsTransferDecline", "SourceInboundWireReversal", "SourceInboundWireTransfer", + "SourceInboundWireTransferReversal", "SourceInterestPayment", "SourceInternalSource", "SourceRealTimePaymentsTransferAcknowledgement", @@ -1865,6 +1869,38 @@ class SourceInboundACHTransfer(BaseModel): """The Inbound ACH Transfer's identifier.""" +class SourceInboundACHTransferReturnIntention(BaseModel): + inbound_ach_transfer_id: str + """The ID of the Inbound ACH Transfer that is being returned.""" + + +class SourceInboundCheckAdjustment(BaseModel): + adjusted_transaction_id: str + """The ID of the transaction that was adjusted.""" + + amount: int + """The amount of the check adjustment.""" + + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"] + """The reason for the adjustment. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + """ + + +class SourceInboundCheckDepositReturnIntention(BaseModel): + inbound_check_deposit_id: str + """The ID of the Inbound Check Deposit that is being returned.""" + + transfer_id: Optional[str] = None + """The identifier of the Check Transfer object that was deposited.""" + + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2106,6 +2142,11 @@ class SourceInboundWireTransfer(BaseModel): """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" +class SourceInboundWireTransferReversal(BaseModel): + inbound_wire_transfer_id: str + """The ID of the Inbound Wire Transfer that is being reversed.""" + + class SourceInterestPayment(BaseModel): accrued_on_account_id: str """The account on which the interest was accrued.""" @@ -2438,6 +2479,27 @@ class Source(BaseModel): equal to `inbound_ach_transfer`. """ + inbound_ach_transfer_return_intention: Optional[SourceInboundACHTransferReturnIntention] = None + """An Inbound ACH Transfer Return Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_ach_transfer_return_intention`. + """ + + inbound_check_adjustment: Optional[SourceInboundCheckAdjustment] = None + """An Inbound Check Adjustment object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_check_adjustment`. + """ + + inbound_check_deposit_return_intention: Optional[SourceInboundCheckDepositReturnIntention] = None + """An Inbound Check Deposit Return Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_check_deposit_return_intention`. + """ + inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. @@ -2466,6 +2528,13 @@ class Source(BaseModel): equal to `inbound_wire_transfer`. """ + inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None + """An Inbound Wire Transfer Reversal Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_wire_transfer_reversal`. + """ + interest_payment: Optional[SourceInterestPayment] = None """An Interest Payment object. From a2763a3313a6a9b53f0955716426b16f10507264 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:49:46 +0000 Subject: [PATCH 0410/1325] chore(internal): version bump (#940) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f72712c3..06ebae073 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.183.0" + ".": "0.184.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0c27c719c..3a9ed9b06 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.183.0" +version = "0.184.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5664860eb..2488e14d3 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.183.0" # x-release-please-version +__version__ = "0.184.0" # x-release-please-version From 2192ffba1e1381f803dc7d2bc163da5365caed39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:57:46 +0000 Subject: [PATCH 0411/1325] feat(api): api update (#941) --- .stats.yml | 2 +- src/increase/types/card_payment.py | 30 ++++--- src/increase/types/pending_transaction.py | 11 ++- src/increase/types/transaction.py | 98 ++++++++++++++++------- 4 files changed, 101 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index f96c3c096..d901d3705 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b83233a82025949d61c863da86f7d5cb639e8868924719a83bda389714fbf568.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8682653c46661e7abcd90fefb10194ac68a8caf701a5fbf7ae887fa50c12b0a6.yml diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 0b6fc7b84..7d6898681 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2827,21 +2827,24 @@ class Element(BaseModel): """A Card Authentication object. This field will be present in the JSON response if and only if `category` is - equal to `card_authentication`. + equal to `card_authentication`. Card Authentications are attempts to + authenticate a transaction or a card with 3DS. """ card_authorization: Optional[ElementCardAuthorization] = None """A Card Authorization object. This field will be present in the JSON response if and only if `category` is - equal to `card_authorization`. + equal to `card_authorization`. Card Authorizations are temporary holds placed on + a customers funds with the intent to later clear a transaction. """ card_authorization_expiration: Optional[ElementCardAuthorizationExpiration] = None """A Card Authorization Expiration object. This field will be present in the JSON response if and only if `category` is - equal to `card_authorization_expiration`. + equal to `card_authorization_expiration`. Card Authorization Expirations are + cancellations of authorizations that were never settled by the acquirer. """ card_decline: Optional[ElementCardDecline] = None @@ -2855,42 +2858,51 @@ class Element(BaseModel): """A Card Fuel Confirmation object. This field will be present in the JSON response if and only if `category` is - equal to `card_fuel_confirmation`. + equal to `card_fuel_confirmation`. Card Fuel Confirmations update the amount of + a Card Authorization after a fuel pump transaction is completed. """ card_increment: Optional[ElementCardIncrement] = None """A Card Increment object. This field will be present in the JSON response if and only if `category` is - equal to `card_increment`. + equal to `card_increment`. Card Increments increase the pending amount of an + authorized transaction. """ card_refund: Optional[ElementCardRefund] = None """A Card Refund object. This field will be present in the JSON response if and only if `category` is - equal to `card_refund`. + equal to `card_refund`. Card Refunds move money back to the cardholder. While + they are usually connected to a Card Settlement an acquirer can also refund + money directly to a card without relation to a transaction. """ card_reversal: Optional[ElementCardReversal] = None """A Card Reversal object. This field will be present in the JSON response if and only if `category` is - equal to `card_reversal`. + equal to `card_reversal`. Card Reversals cancel parts of or the entirety of an + existing Card Authorization. """ card_settlement: Optional[ElementCardSettlement] = None """A Card Settlement object. This field will be present in the JSON response if and only if `category` is - equal to `card_settlement`. + equal to `card_settlement`. Card Settlements are card transactions that have + cleared and settled. While a settlement is usually preceded by an authorization, + an acquirer can also directly clear a transaction without first authorizing it. """ card_validation: Optional[ElementCardValidation] = None """A Card Validation object. This field will be present in the JSON response if and only if `category` is - equal to `card_validation`. + 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. """ category: Literal[ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 0bf113134..2a72048d3 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -604,7 +604,8 @@ class Source(BaseModel): """A Card Authorization object. This field will be present in the JSON response if and only if `category` is - equal to `card_authorization`. + equal to `card_authorization`. Card Authorizations are temporary holds placed on + a customers funds with the intent to later clear a transaction. """ category: Literal[ @@ -665,14 +666,18 @@ class Source(BaseModel): """An Inbound Funds Hold object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_funds_hold`. + equal to `inbound_funds_hold`. We hold funds for certain transaction types to + account for return windows where funds might still be clawed back by the sending + institution. """ inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None """An Inbound Wire Transfer Reversal object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_transfer_reversal`. + equal to `inbound_wire_transfer_reversal`. An Inbound Wire Transfer Reversal is + created when Increase has received a wire and the User requests that it be + reversed. """ other: Optional[object] = None diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d1aecbc8e..d534ec078 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2280,70 +2280,87 @@ class Source(BaseModel): """An Account Transfer Intention object. This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_intention`. + equal to `account_transfer_intention`. Two Account Transfer Intentions are + created from each Account Transfer. One decrements the source account, and the + other increments the destination account. """ ach_transfer_intention: Optional[SourceACHTransferIntention] = None """An ACH Transfer Intention object. This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_intention`. + equal to `ach_transfer_intention`. An ACH Transfer Intention is created from an + ACH Transfer. It reflects the intention to move money into or out of an Increase + account via the ACH network. """ ach_transfer_rejection: Optional[SourceACHTransferRejection] = None """An ACH Transfer Rejection object. This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_rejection`. + equal to `ach_transfer_rejection`. An ACH Transfer Rejection is created when an + ACH Transfer is rejected by Increase. It offsets the ACH Transfer Intention. + These rejections are rare. """ ach_transfer_return: Optional[SourceACHTransferReturn] = None """An ACH Transfer Return object. This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_return`. + equal to `ach_transfer_return`. An ACH Transfer Return is created when an ACH + Transfer is returned by the receiving bank. It offsets the ACH Transfer + Intention. ACH Transfer Returns usually occur within the first two business days + after the transfer is initiated, but can occur much later. """ card_dispute_acceptance: Optional[SourceCardDisputeAcceptance] = None """A Card Dispute Acceptance object. This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_acceptance`. + equal to `card_dispute_acceptance`. Contains the details of a successful Card + Dispute. """ card_dispute_loss: Optional[SourceCardDisputeLoss] = None """A Card Dispute Loss object. This field will be present in the JSON response if and only if `category` is - equal to `card_dispute_loss`. + equal to `card_dispute_loss`. Contains the details of a lost Card Dispute. """ card_refund: Optional[SourceCardRefund] = None """A Card Refund object. This field will be present in the JSON response if and only if `category` is - equal to `card_refund`. + equal to `card_refund`. Card Refunds move money back to the cardholder. While + they are usually connected to a Card Settlement an acquirer can also refund + money directly to a card without relation to a transaction. """ card_revenue_payment: Optional[SourceCardRevenuePayment] = None """A Card Revenue Payment object. This field will be present in the JSON response if and only if `category` is - equal to `card_revenue_payment`. + equal to `card_revenue_payment`. Card Revenue Payments reflect earnings from + fees on card transactions. """ card_settlement: Optional[SourceCardSettlement] = None """A Card Settlement object. This field will be present in the JSON response if and only if `category` is - equal to `card_settlement`. + equal to `card_settlement`. Card Settlements are card transactions that have + cleared and settled. While a settlement is usually preceded by an authorization, + an acquirer can also directly clear a transaction without first authorizing it. """ cashback_payment: Optional[SourceCashbackPayment] = None """A Cashback Payment object. This field will be present in the JSON response if and only if `category` is - equal to `cashback_payment`. + equal to `cashback_payment`. A Cashback Payment represents the cashback paid to + a cardholder for a given period. Cashback is usually paid monthly for the prior + month's transactions. """ category: Literal[ @@ -2448,63 +2465,79 @@ class Source(BaseModel): """A Check Deposit Acceptance object. This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_acceptance`. + equal to `check_deposit_acceptance`. A Check Deposit Acceptance is created when + a Check Deposit is processed and its details confirmed. Check Deposits may be + returned by the receiving bank, which will appear as a Check Deposit Return. """ check_deposit_return: Optional[SourceCheckDepositReturn] = None """A Check Deposit Return object. This field will be present in the JSON response if and only if `category` is - equal to `check_deposit_return`. + equal to `check_deposit_return`. A Check Deposit Return is created when a Check + Deposit is returned by the bank holding the account it was drawn against. Check + Deposits may be returned for a variety of reasons, including insufficient funds + or a mismatched account number. Usually, checks are returned within the first 7 + days after the deposit is made. """ check_transfer_deposit: Optional[SourceCheckTransferDeposit] = None """A Check Transfer Deposit object. This field will be present in the JSON response if and only if `category` is - equal to `check_transfer_deposit`. + equal to `check_transfer_deposit`. An Inbound Check is a check drawn on an + Increase account that has been deposited by an external bank account. These + types of checks are not pre-registered. """ fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. This field will be present in the JSON response if and only if `category` is - equal to `fee_payment`. + equal to `fee_payment`. A Fee Payment represents a payment made to Increase. """ inbound_ach_transfer: Optional[SourceInboundACHTransfer] = None """An Inbound ACH Transfer Intention object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_ach_transfer`. + equal to `inbound_ach_transfer`. An Inbound ACH Transfer Intention is created + when an ACH transfer is initiated at another bank and received by Increase. """ inbound_ach_transfer_return_intention: Optional[SourceInboundACHTransferReturnIntention] = None """An Inbound ACH Transfer Return Intention object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_ach_transfer_return_intention`. + equal to `inbound_ach_transfer_return_intention`. An Inbound ACH Transfer Return + Intention is created when an ACH transfer is initiated at another bank and + returned by Increase. """ inbound_check_adjustment: Optional[SourceInboundCheckAdjustment] = None """An Inbound Check Adjustment object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_check_adjustment`. + equal to `inbound_check_adjustment`. An Inbound Check Adjustment is created when + Increase receives an adjustment for a check or return deposited through Check21. """ inbound_check_deposit_return_intention: Optional[SourceInboundCheckDepositReturnIntention] = None """An Inbound Check Deposit Return Intention object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_check_deposit_return_intention`. + equal to `inbound_check_deposit_return_intention`. An Inbound Check Deposit + Return Intention is created when Increase receives an Inbound Check and the User + requests that it be returned. """ inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_confirmation`. + equal to `inbound_real_time_payments_transfer_confirmation`. An Inbound + Real-Time Payments Transfer Confirmation is created when a Real-Time Payments + transfer is initiated at another bank and received by Increase. """ inbound_real_time_payments_transfer_decline: Optional[SourceInboundRealTimePaymentsTransferDecline] = None @@ -2518,35 +2551,43 @@ class Source(BaseModel): """An Inbound Wire Reversal object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_reversal`. + equal to `inbound_wire_reversal`. An Inbound Wire Reversal represents a reversal + of a wire transfer that was initiated via Increase. The other bank is sending + the money back. This most often happens when the original destination account + details were incorrect. """ inbound_wire_transfer: Optional[SourceInboundWireTransfer] = None """An Inbound Wire Transfer Intention object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_transfer`. + equal to `inbound_wire_transfer`. An Inbound Wire Transfer Intention is created + when a wire transfer is initiated at another bank and received by Increase. """ inbound_wire_transfer_reversal: Optional[SourceInboundWireTransferReversal] = None """An Inbound Wire Transfer Reversal Intention object. This field will be present in the JSON response if and only if `category` is - equal to `inbound_wire_transfer_reversal`. + equal to `inbound_wire_transfer_reversal`. An Inbound Wire Transfer Reversal + Intention is created when Increase has received a wire and the User requests + that it be reversed. """ interest_payment: Optional[SourceInterestPayment] = None """An Interest Payment object. This field will be present in the JSON response if and only if `category` is - equal to `interest_payment`. + equal to `interest_payment`. An Interest Payment represents a payment of + interest on an account. Interest is usually paid monthly. """ internal_source: Optional[SourceInternalSource] = None """An Internal Source object. This field will be present in the JSON response if and only if `category` is - equal to `internal_source`. + equal to `internal_source`. A transaction between the user and Increase. See the + `reason` attribute for more information. """ other: Optional[object] = None @@ -2559,21 +2600,24 @@ class Source(BaseModel): """A Real-Time Payments Transfer Acknowledgement object. This field will be present in the JSON response if and only if `category` is - equal to `real_time_payments_transfer_acknowledgement`. + equal to `real_time_payments_transfer_acknowledgement`. A Real-Time Payments + Transfer Acknowledgement is created when a Real-Time Payments Transfer sent from + Increase is acknowledged by the receiving bank. """ sample_funds: Optional[SourceSampleFunds] = None """A Sample Funds object. This field will be present in the JSON response if and only if `category` is - equal to `sample_funds`. + equal to `sample_funds`. Sample funds for testing purposes. """ wire_transfer_intention: Optional[SourceWireTransferIntention] = None """A Wire Transfer Intention object. This field will be present in the JSON response if and only if `category` is - equal to `wire_transfer_intention`. + equal to `wire_transfer_intention`. A Wire Transfer initiated via Increase and + sent to a different bank. """ From 5c01d78f8bc00f00f94ab89517cfe207a4cfb7d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Jan 2025 16:59:13 +0000 Subject: [PATCH 0412/1325] chore(internal): version bump (#943) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 06ebae073..68019aa59 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.184.0" + ".": "0.185.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3a9ed9b06..bd2a1eb9c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.184.0" +version = "0.185.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2488e14d3..39f9c5038 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.184.0" # x-release-please-version +__version__ = "0.185.0" # x-release-please-version From 7c12d19d94fc31a609cd496efa23ac01037aa8dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Feb 2025 00:12:48 +0000 Subject: [PATCH 0413/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d901d3705..99b864742 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8682653c46661e7abcd90fefb10194ac68a8caf701a5fbf7ae887fa50c12b0a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b56097acbd972355f7273284b58a110f07bc250b3559042f6a55c4d10678b4b5.yml From b5659a6d0da3bf53f3a62568e8ee92ec8994c537 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 14:41:32 +0000 Subject: [PATCH 0414/1325] chore(internal): change default timeout to an int (#944) --- src/increase/_constants.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_constants.py b/src/increase/_constants.py index a2ac3b6f3..6ddf2c717 100644 --- a/src/increase/_constants.py +++ b/src/increase/_constants.py @@ -6,7 +6,7 @@ OVERRIDE_CAST_TO_HEADER = "____stainless_override_cast_to" # default timeout is 1 minute -DEFAULT_TIMEOUT = httpx.Timeout(timeout=60.0, connect=5.0) +DEFAULT_TIMEOUT = httpx.Timeout(timeout=60, connect=5.0) DEFAULT_MAX_RETRIES = 2 DEFAULT_CONNECTION_LIMITS = httpx.Limits(max_connections=100, max_keepalive_connections=20) From 35ef7a1c3e13bfbea01bebfae48689bc7d99ab9f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 15:11:15 +0000 Subject: [PATCH 0415/1325] chore(internal): bummp ruff dependency (#946) --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- scripts/utils/ruffen-docs.py | 4 ++-- src/increase/_models.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index bd2a1eb9c..509ccf091 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -177,7 +177,7 @@ select = [ "T201", "T203", # misuse of typing.TYPE_CHECKING - "TCH004", + "TC004", # import rules "TID251", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index 06d5e5ce5..cd83e41fd 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -78,7 +78,7 @@ pytz==2023.3.post1 # via dirty-equals respx==0.22.0 rich==13.7.1 -ruff==0.6.9 +ruff==0.9.4 setuptools==68.2.2 # via nodeenv six==1.16.0 diff --git a/scripts/utils/ruffen-docs.py b/scripts/utils/ruffen-docs.py index 37b3d94f0..0cf2bd2fd 100644 --- a/scripts/utils/ruffen-docs.py +++ b/scripts/utils/ruffen-docs.py @@ -47,7 +47,7 @@ def _md_match(match: Match[str]) -> str: with _collect_error(match): code = format_code_block(code) code = textwrap.indent(code, match["indent"]) - return f'{match["before"]}{code}{match["after"]}' + return f"{match['before']}{code}{match['after']}" def _pycon_match(match: Match[str]) -> str: code = "" @@ -97,7 +97,7 @@ def finish_fragment() -> None: def _md_pycon_match(match: Match[str]) -> str: code = _pycon_match(match) code = textwrap.indent(code, match["indent"]) - return f'{match["before"]}{code}{match["after"]}' + return f"{match['before']}{code}{match['after']}" src = MD_RE.sub(_md_match, src) src = MD_PYCON_RE.sub(_md_pycon_match, src) diff --git a/src/increase/_models.py b/src/increase/_models.py index 9a918aabf..12c34b7d1 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -172,7 +172,7 @@ def to_json( @override def __str__(self) -> str: # mypy complains about an invalid self arg - return f'{self.__repr_name__()}({self.__repr_str__(", ")})' # type: ignore[misc] + return f"{self.__repr_name__()}({self.__repr_str__(', ')})" # type: ignore[misc] # Override the 'construct' method in a way that supports recursive parsing without validation. # Based on https://github.com/samuelcolvin/pydantic/issues/1168#issuecomment-817742836. From f5baa347b40490447f7ac1430139d108e149a1a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:55:43 +0000 Subject: [PATCH 0416/1325] feat(api): api update (#947) --- .stats.yml | 2 +- src/increase/types/inbound_ach_transfer.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 99b864742..a1005b8ce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b56097acbd972355f7273284b58a110f07bc250b3559042f6a55c4d10678b4b5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-28ffd3b61bd618b2a60b46dd2afb8f52370c43e02cab2e9106465c3cffafb95a.yml diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index c7238fa24..f3a799cab 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -409,6 +409,12 @@ class InboundACHTransfer(BaseModel): automatically_resolves_at: datetime """The time at which the transfer will be automatically resolved.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the inbound ACH transfer was created. + """ + decline: Optional[Decline] = None """If your transfer is declined, this will contain details of the decline.""" From 48816853954100687183d7ea13f9d385368a3e70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Feb 2025 16:56:58 +0000 Subject: [PATCH 0417/1325] chore(internal): version bump (#948) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 68019aa59..b62648db9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.185.0" + ".": "0.186.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 509ccf091..dddc7eb6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.185.0" +version = "0.186.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 39f9c5038..585b0c3b3 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.185.0" # x-release-please-version +__version__ = "0.186.0" # x-release-please-version From 65b105e4512ef607ba772f0aee656b585309a8f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 22:59:03 +0000 Subject: [PATCH 0418/1325] feat(api): api update (#949) --- .stats.yml | 2 +- src/increase/types/account.py | 3 ++- src/increase/types/program.py | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index a1005b8ce..d415aa66b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-28ffd3b61bd618b2a60b46dd2afb8f52370c43e02cab2e9106465c3cffafb95a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ce741f23d99b551b38099da78d730af0cf9019e3b51e61bc988a5e5979c26143.yml diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 4905d0476..b52bd3ff1 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,10 +13,11 @@ class Account(BaseModel): id: str """The Account identifier.""" - bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] + bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "grasshopper_bank"] """The bank the Account is with. - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - `grasshopper_bank` - Grasshopper Bank """ diff --git a/src/increase/types/program.py b/src/increase/types/program.py index bf8c2f6f9..72f79d4bd 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -13,10 +13,11 @@ class Program(BaseModel): id: str """The Program identifier.""" - bank: Literal["blue_ridge_bank", "first_internet_bank", "grasshopper_bank"] + bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "grasshopper_bank"] """The Bank the Program is with. - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - `grasshopper_bank` - Grasshopper Bank """ From d405bc27d9afa6eb67b607ad588134f422613df2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Feb 2025 23:00:19 +0000 Subject: [PATCH 0419/1325] chore(internal): version bump (#951) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b62648db9..623b397aa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.186.0" + ".": "0.187.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dddc7eb6c..4dcdf5865 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.186.0" +version = "0.187.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 585b0c3b3..9e36aab94 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.186.0" # x-release-please-version +__version__ = "0.187.0" # x-release-please-version From a40db128a7c5954e59c049036f8d8501efc535b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Feb 2025 17:13:29 +0000 Subject: [PATCH 0420/1325] feat(client): send `X-Stainless-Read-Timeout` header (#952) --- src/increase/_base_client.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 40466184d..e8ba26a43 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -418,10 +418,17 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: headers[idempotency_header] = options.idempotency_key or self._idempotency_key() - # Don't set the retry count header if it was already set or removed by the caller. We check + # Don't set these headers if they were already set or removed by the caller. We check # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case. - if "x-stainless-retry-count" not in (header.lower() for header in custom_headers): + lower_custom_headers = [header.lower() for header in custom_headers] + if "x-stainless-retry-count" not in lower_custom_headers: headers["x-stainless-retry-count"] = str(retries_taken) + if "x-stainless-read-timeout" not in lower_custom_headers: + timeout = self.timeout if isinstance(options.timeout, NotGiven) else options.timeout + if isinstance(timeout, Timeout): + timeout = timeout.read + if timeout is not None: + headers["x-stainless-read-timeout"] = str(timeout) return headers From b352e65539d634251d6a60b27bafc185400f8efe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 12:55:57 +0000 Subject: [PATCH 0421/1325] chore(internal): fix type traversing dictionary params (#954) --- src/increase/_utils/_transform.py | 12 +++++++++++- tests/test_transform.py | 11 ++++++++++- 2 files changed, 21 insertions(+), 2 deletions(-) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index a6b62cad0..18afd9d8b 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -25,7 +25,7 @@ is_annotated_type, strip_annotated_type, ) -from .._compat import model_dump, is_typeddict +from .._compat import get_origin, model_dump, is_typeddict _T = TypeVar("_T") @@ -164,9 +164,14 @@ def _transform_recursive( inner_type = annotation stripped_type = strip_annotated_type(inner_type) + origin = get_origin(stripped_type) or stripped_type if is_typeddict(stripped_type) and is_mapping(data): return _transform_typeddict(data, stripped_type) + if origin == dict and is_mapping(data): + items_type = get_args(stripped_type)[1] + return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()} + if ( # List[T] (is_list_type(stripped_type) and is_list(data)) @@ -307,9 +312,14 @@ async def _async_transform_recursive( inner_type = annotation stripped_type = strip_annotated_type(inner_type) + origin = get_origin(stripped_type) or stripped_type if is_typeddict(stripped_type) and is_mapping(data): return await _async_transform_typeddict(data, stripped_type) + if origin == dict and is_mapping(data): + items_type = get_args(stripped_type)[1] + return {key: _transform_recursive(value, annotation=items_type) for key, value in data.items()} + if ( # List[T] (is_list_type(stripped_type) and is_list(data)) diff --git a/tests/test_transform.py b/tests/test_transform.py index 1f0743ce0..80c914329 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -2,7 +2,7 @@ import io import pathlib -from typing import Any, List, Union, TypeVar, Iterable, Optional, cast +from typing import Any, Dict, List, Union, TypeVar, Iterable, Optional, cast from datetime import date, datetime from typing_extensions import Required, Annotated, TypedDict @@ -388,6 +388,15 @@ def my_iter() -> Iterable[Baz8]: } +@parametrize +@pytest.mark.asyncio +async def test_dictionary_items(use_async: bool) -> None: + class DictItems(TypedDict): + foo_baz: Annotated[str, PropertyInfo(alias="fooBaz")] + + assert await transform({"foo": {"foo_baz": "bar"}}, Dict[str, DictItems], use_async) == {"foo": {"fooBaz": "bar"}} + + class TypedDictIterableUnionStr(TypedDict): foo: Annotated[Union[str, Iterable[Baz8]], PropertyInfo(alias="FOO")] From a1d1ef92332e1612243ca2540e360a32477e983f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 14:43:31 +0000 Subject: [PATCH 0422/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d415aa66b..69e168349 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ce741f23d99b551b38099da78d730af0cf9019e3b51e61bc988a5e5979c26143.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0be59641921666f0880372329b739dfba43d747021a6efcbd3a8aea7369be2d5.yml From 454949f6ca9a8dddb07532fa599ae36b891fd566 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 16:20:09 +0000 Subject: [PATCH 0423/1325] chore(internal): minor type handling changes (#955) --- src/increase/_models.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 12c34b7d1..c4401ff86 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -426,10 +426,16 @@ def construct_type(*, value: object, type_: object) -> object: If the given value does not match the expected type then it is returned as-is. """ + + # store a reference to the original type we were given before we extract any inner + # types so that we can properly resolve forward references in `TypeAliasType` annotations + original_type = None + # we allow `object` as the input type because otherwise, passing things like # `Literal['value']` will be reported as a type error by type checkers type_ = cast("type[object]", type_) if is_type_alias_type(type_): + original_type = type_ # type: ignore[unreachable] type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` @@ -446,7 +452,7 @@ def construct_type(*, value: object, type_: object) -> object: if is_union(origin): try: - return validate_type(type_=cast("type[object]", type_), value=value) + return validate_type(type_=cast("type[object]", original_type or type_), value=value) except Exception: pass From 5bb01fbbec0e76dc0bfb71e839faa38ae6c44a40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Feb 2025 22:30:21 +0000 Subject: [PATCH 0424/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 69e168349..8f1ea3aca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0be59641921666f0880372329b739dfba43d747021a6efcbd3a8aea7369be2d5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7aa1e3663a83ffd28f86d2c60511be93626acc3d50846c6878fcedfdccaa37ce.yml From 406e5b59f3c3eb8554821d9daf0043e382ae9f9c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 21:11:50 +0000 Subject: [PATCH 0425/1325] feat(api): api update (#956) --- .stats.yml | 2 +- api.md | 2 +- src/increase/resources/intrafi_balances.py | 24 +++++++------- src/increase/types/inbound_wire_transfer.py | 7 ++++ .../types/intrafi_account_enrollment.py | 7 ++++ src/increase/types/intrafi_exclusion.py | 6 ++++ src/increase/types/wire_drawdown_request.py | 7 ++++ tests/api_resources/test_intrafi_balances.py | 32 +++++++++---------- 8 files changed, 57 insertions(+), 30 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8f1ea3aca..34a84563e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7aa1e3663a83ffd28f86d2c60511be93626acc3d50846c6878fcedfdccaa37ce.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-93fa70b01fd9cf6a31edec954dc66bb9a14a26e2ea0fbe2fc22ed86b7774b239.yml diff --git a/api.md b/api.md index ed7d8919d..f3b442442 100644 --- a/api.md +++ b/api.md @@ -717,7 +717,7 @@ from increase.types import IntrafiBalance Methods: -- client.intrafi_balances.retrieve(account_id) -> IntrafiBalance +- client.intrafi_balances.intrafi_balance(account_id) -> IntrafiBalance # IntrafiExclusions diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index cc9c517d5..a5b56f2b0 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -39,7 +39,7 @@ def with_streaming_response(self) -> IntrafiBalancesResourceWithStreamingRespons """ return IntrafiBalancesResourceWithStreamingResponse(self) - def retrieve( + def intrafi_balance( self, account_id: str, *, @@ -67,7 +67,7 @@ def retrieve( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get( - f"/intrafi_balances/{account_id}", + f"/accounts/{account_id}/intrafi_balance", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -95,7 +95,7 @@ def with_streaming_response(self) -> AsyncIntrafiBalancesResourceWithStreamingRe """ return AsyncIntrafiBalancesResourceWithStreamingResponse(self) - async def retrieve( + async def intrafi_balance( self, account_id: str, *, @@ -123,7 +123,7 @@ async def retrieve( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._get( - f"/intrafi_balances/{account_id}", + f"/accounts/{account_id}/intrafi_balance", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -135,8 +135,8 @@ class IntrafiBalancesResourceWithRawResponse: def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: self._intrafi_balances = intrafi_balances - self.retrieve = to_raw_response_wrapper( - intrafi_balances.retrieve, + self.intrafi_balance = to_raw_response_wrapper( + intrafi_balances.intrafi_balance, ) @@ -144,8 +144,8 @@ class AsyncIntrafiBalancesResourceWithRawResponse: def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: self._intrafi_balances = intrafi_balances - self.retrieve = async_to_raw_response_wrapper( - intrafi_balances.retrieve, + self.intrafi_balance = async_to_raw_response_wrapper( + intrafi_balances.intrafi_balance, ) @@ -153,8 +153,8 @@ class IntrafiBalancesResourceWithStreamingResponse: def __init__(self, intrafi_balances: IntrafiBalancesResource) -> None: self._intrafi_balances = intrafi_balances - self.retrieve = to_streamed_response_wrapper( - intrafi_balances.retrieve, + self.intrafi_balance = to_streamed_response_wrapper( + intrafi_balances.intrafi_balance, ) @@ -162,6 +162,6 @@ class AsyncIntrafiBalancesResourceWithStreamingResponse: def __init__(self, intrafi_balances: AsyncIntrafiBalancesResource) -> None: self._intrafi_balances = intrafi_balances - self.retrieve = async_to_streamed_response_wrapper( - intrafi_balances.retrieve, + self.intrafi_balance = async_to_streamed_response_wrapper( + intrafi_balances.intrafi_balance, ) diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index c2d381d36..341f29679 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from typing_extensions import Literal from .._models import BaseModel @@ -36,6 +37,12 @@ class InboundWireTransfer(BaseModel): beneficiary_reference: Optional[str] = None """A free-form reference string set by the sender, to help identify the transfer.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the inbound wire transfer was created. + """ + description: str """An Increase-constructed description of the transfer.""" diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py index 4f7eb73d5..b04e39136 100644 --- a/src/increase/types/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi_account_enrollment.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from typing_extensions import Literal from .._models import BaseModel @@ -15,6 +16,12 @@ class IntrafiAccountEnrollment(BaseModel): account_id: str """The identifier of the Increase Account being swept into the network.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the enrollment was created. + """ + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py index 6b1c35abd..c0a215fa7 100644 --- a/src/increase/types/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -16,6 +16,12 @@ class IntrafiExclusion(BaseModel): bank_name: str """The name of the excluded institution.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the exclusion was created. + """ + entity_id: str """The entity for which this institution is excluded.""" diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index ac56aaa7f..b9c877167 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -1,6 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional +from datetime import datetime from typing_extensions import Literal from .._models import BaseModel @@ -29,6 +30,12 @@ class WireDrawdownRequest(BaseModel): amount: int """The amount being requested in cents.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the wire drawdown request was created. + """ + currency: str """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/test_intrafi_balances.py index 4e3f99c2b..6dd282615 100644 --- a/tests/api_resources/test_intrafi_balances.py +++ b/tests/api_resources/test_intrafi_balances.py @@ -18,15 +18,15 @@ class TestIntrafiBalances: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_retrieve(self, client: Increase) -> None: - intrafi_balance = client.intrafi_balances.retrieve( + def test_method_intrafi_balance(self, client: Increase) -> None: + intrafi_balance = client.intrafi_balances.intrafi_balance( "account_id", ) assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.intrafi_balances.with_raw_response.retrieve( + def test_raw_response_intrafi_balance(self, client: Increase) -> None: + response = client.intrafi_balances.with_raw_response.intrafi_balance( "account_id", ) @@ -36,8 +36,8 @@ def test_raw_response_retrieve(self, client: Increase) -> None: assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.intrafi_balances.with_streaming_response.retrieve( + def test_streaming_response_intrafi_balance(self, client: Increase) -> None: + with client.intrafi_balances.with_streaming_response.intrafi_balance( "account_id", ) as response: assert not response.is_closed @@ -49,9 +49,9 @@ def test_streaming_response_retrieve(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: + def test_path_params_intrafi_balance(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - client.intrafi_balances.with_raw_response.retrieve( + client.intrafi_balances.with_raw_response.intrafi_balance( "", ) @@ -60,15 +60,15 @@ class TestAsyncIntrafiBalances: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - intrafi_balance = await async_client.intrafi_balances.retrieve( + async def test_method_intrafi_balance(self, async_client: AsyncIncrease) -> None: + intrafi_balance = await async_client.intrafi_balances.intrafi_balance( "account_id", ) assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.intrafi_balances.with_raw_response.retrieve( + async def test_raw_response_intrafi_balance(self, async_client: AsyncIncrease) -> None: + response = await async_client.intrafi_balances.with_raw_response.intrafi_balance( "account_id", ) @@ -78,8 +78,8 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.intrafi_balances.with_streaming_response.retrieve( + async def test_streaming_response_intrafi_balance(self, async_client: AsyncIncrease) -> None: + async with async_client.intrafi_balances.with_streaming_response.intrafi_balance( "account_id", ) as response: assert not response.is_closed @@ -91,8 +91,8 @@ async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + async def test_path_params_intrafi_balance(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `account_id` but received ''"): - await async_client.intrafi_balances.with_raw_response.retrieve( + await async_client.intrafi_balances.with_raw_response.intrafi_balance( "", ) From 01166d315bd483cde677c130d6114624b651b1c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:07:23 +0000 Subject: [PATCH 0426/1325] feat(api): api update (#957) --- .stats.yml | 2 +- tests/api_resources/test_oauth_connections.py | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 34a84563e..4803a266d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-93fa70b01fd9cf6a31edec954dc66bb9a14a26e2ea0fbe2fc22ed86b7774b239.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4db2590b8381f1ce20ef003e571392a1b33023e29febd4a3caca983705db688.yml diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index d8e08b2d9..8c218df2f 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -21,14 +21,14 @@ class TestOAuthConnections: @parametrize def test_method_retrieve(self, client: Increase) -> None: oauth_connection = client.oauth_connections.retrieve( - "oauth_connection_id", + "x", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.oauth_connections.with_raw_response.retrieve( - "oauth_connection_id", + "x", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.oauth_connections.with_streaming_response.retrieve( - "oauth_connection_id", + "x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,14 +98,14 @@ class TestAsyncOAuthConnections: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.retrieve( - "oauth_connection_id", + "x", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.oauth_connections.with_raw_response.retrieve( - "oauth_connection_id", + "x", ) assert response.is_closed is True @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.oauth_connections.with_streaming_response.retrieve( - "oauth_connection_id", + "x", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 5c3a71191874fad954fe09d0ef4a9138e017e2d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Feb 2025 23:08:33 +0000 Subject: [PATCH 0427/1325] chore(internal): version bump (#958) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 623b397aa..5ac298d4d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.187.0" + ".": "0.188.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4dcdf5865..d5cdc4520 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.187.0" +version = "0.188.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9e36aab94..00b84fe50 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.187.0" # x-release-please-version +__version__ = "0.188.0" # x-release-please-version From 9c5ef0e8705245ffb5bd5eace5eda6478f88f4b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:39:41 +0000 Subject: [PATCH 0428/1325] feat(api): api update (#959) --- .stats.yml | 2 +- src/increase/resources/accounts.py | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4803a266d..3e854e00e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4db2590b8381f1ce20ef003e571392a1b33023e29febd4a3caca983705db688.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-187abeef8791e6babfd30ee4517635629b0a175d21d292c7689a0710095807b8.yml diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 5f083c936..b6d327d74 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -285,7 +285,8 @@ def balance( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> BalanceLookup: """ - Retrieve an Account Balance + Retrieve the current and available balances for an account in minor units of the + account's currency. Learn more about [account balances](/documentation/balance). Args: account_id: The identifier of the Account to retrieve. @@ -608,7 +609,8 @@ async def balance( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> BalanceLookup: """ - Retrieve an Account Balance + Retrieve the current and available balances for an account in minor units of the + account's currency. Learn more about [account balances](/documentation/balance). Args: account_id: The identifier of the Account to retrieve. From 242a8a2c07f3abbca105ecfa639db149df8a64c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Feb 2025 22:40:54 +0000 Subject: [PATCH 0429/1325] chore(internal): version bump (#961) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ac298d4d..6f3c3ad88 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.188.0" + ".": "0.189.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d5cdc4520..1d5579156 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.188.0" +version = "0.189.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 00b84fe50..8266b5064 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.188.0" # x-release-please-version +__version__ = "0.189.0" # x-release-please-version From 9b6ca28232d0fb9c06646dceec7976acfbaff5e7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 00:35:23 +0000 Subject: [PATCH 0430/1325] feat(api): api update (#962) --- .stats.yml | 2 +- src/increase/types/account.py | 3 +-- src/increase/types/program.py | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3e854e00e..94aeca296 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-187abeef8791e6babfd30ee4517635629b0a175d21d292c7689a0710095807b8.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5e0974f81d8dea4e99659c75d479605f1661bcd04e3c22722f451bba180b308a.yml diff --git a/src/increase/types/account.py b/src/increase/types/account.py index b52bd3ff1..bda7880e7 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,10 +13,9 @@ class Account(BaseModel): id: str """The Account identifier.""" - bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "grasshopper_bank"] + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank"] """The bank the Account is with. - - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - `grasshopper_bank` - Grasshopper Bank diff --git a/src/increase/types/program.py b/src/increase/types/program.py index 72f79d4bd..8ede73010 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -13,10 +13,9 @@ class Program(BaseModel): id: str """The Program identifier.""" - bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "grasshopper_bank"] + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank"] """The Bank the Program is with. - - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - `grasshopper_bank` - Grasshopper Bank From 30827947d288e76c9a6a00281794c6a792629423 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Feb 2025 00:36:36 +0000 Subject: [PATCH 0431/1325] chore(internal): version bump (#964) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6f3c3ad88..620f306a1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.189.0" + ".": "0.190.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1d5579156..323087440 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.189.0" +version = "0.190.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8266b5064..35da20e88 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.189.0" # x-release-please-version +__version__ = "0.190.0" # x-release-please-version From dfe380485e410de4e424aac756e2e7da02469650 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:28:10 +0000 Subject: [PATCH 0432/1325] chore(internal): update client tests (#965) --- tests/test_client.py | 46 +++++++++++++++++++++++++++++--------------- 1 file changed, 30 insertions(+), 16 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index d4228a6a8..b5ea44f9a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -23,6 +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 @@ -32,6 +33,7 @@ BaseClient, make_request_options, ) +from increase.types.account_create_params import AccountCreateParams from .utils import update_env @@ -760,10 +762,13 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) -> No "/accounts", body=cast( object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + maybe_transform( + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + AccountCreateParams, ), ), cast_to=httpx.Response, @@ -782,10 +787,13 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) -> Non "/accounts", body=cast( object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + maybe_transform( + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + AccountCreateParams, ), ), cast_to=httpx.Response, @@ -1595,10 +1603,13 @@ async def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter) "/accounts", body=cast( object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + maybe_transform( + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + AccountCreateParams, ), ), cast_to=httpx.Response, @@ -1617,10 +1628,13 @@ async def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter) "/accounts", body=cast( object, - dict( - name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", + maybe_transform( + dict( + name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", + ), + AccountCreateParams, ), ), cast_to=httpx.Response, From 47eae573c720079891ca87a6a4cd8c1064e20311 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:41:11 +0000 Subject: [PATCH 0433/1325] feat(api): api update (#967) --- .stats.yml | 2 +- .../simulations/card_authorizations.py | 8 ++++ .../card_authorization_create_params.py | 42 ++++++++++++++++++- .../simulations/test_card_authorizations.py | 2 + 4 files changed, 52 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 94aeca296..32dd62903 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5e0974f81d8dea4e99659c75d479605f1661bcd04e3c22722f451bba180b308a.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b3b6572700500a421109ac83ef56b3046e9f1510ca7d1f583d329d1b8ecf5516.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index a1f07895d..a7e8f0413 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -79,6 +79,7 @@ def create( merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, merchant_state: str | NotGiven = NOT_GIVEN, + network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -162,6 +163,8 @@ def create( merchant_state: The state the merchant resides in. + network_details: Fields specific to a given card network. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -194,6 +197,7 @@ def create( "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, "merchant_state": merchant_state, + "network_details": network_details, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, @@ -263,6 +267,7 @@ async def create( merchant_country: str | NotGiven = NOT_GIVEN, merchant_descriptor: str | NotGiven = NOT_GIVEN, merchant_state: str | NotGiven = NOT_GIVEN, + network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -346,6 +351,8 @@ async def create( merchant_state: The state the merchant resides in. + network_details: Fields specific to a given card network. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -378,6 +385,7 @@ async def create( "merchant_country": merchant_country, "merchant_descriptor": merchant_descriptor, "merchant_state": merchant_state, + "network_details": network_details, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 35b5110cd..9232f0e10 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -4,7 +4,7 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardAuthorizationCreateParams"] +__all__ = ["CardAuthorizationCreateParams", "NetworkDetails", "NetworkDetailsVisa"] class CardAuthorizationCreateParams(TypedDict, total=False): @@ -111,6 +111,9 @@ class CardAuthorizationCreateParams(TypedDict, total=False): merchant_state: str """The state the merchant resides in.""" + network_details: NetworkDetails + """Fields specific to a given card network.""" + physical_card_id: str """The identifier of the Physical Card to be authorized.""" @@ -119,3 +122,40 @@ class CardAuthorizationCreateParams(TypedDict, total=False): The terminal identifier (commonly abbreviated as TID) of the terminal the card is transacting with. """ + + +class NetworkDetailsVisa(TypedDict, total=False): + stand_in_processing_reason: Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + """The reason code for the stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class NetworkDetails(TypedDict, total=False): + visa: Required[NetworkDetailsVisa] + """Fields specific to the Visa network.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index eb77386fc..eddb63f32 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -40,6 +40,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: merchant_country="US", merchant_descriptor="AMAZON.COM", merchant_state="NY", + network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, physical_card_id="physical_card_id", terminal_id="x", ) @@ -96,6 +97,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) merchant_country="US", merchant_descriptor="AMAZON.COM", merchant_state="NY", + network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, physical_card_id="physical_card_id", terminal_id="x", ) From 338ef66731d78793b60914321ea410063d035659 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:42:27 +0000 Subject: [PATCH 0434/1325] chore(internal): version bump (#968) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 620f306a1..f7e28725e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.190.0" + ".": "0.191.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 323087440..6d42c6a56 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.190.0" +version = "0.191.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 35da20e88..d76519f0f 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.190.0" # x-release-please-version +__version__ = "0.191.0" # x-release-please-version From 8447804ad76aafcb685a3810db62fcfd91f2cc14 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:26:59 +0000 Subject: [PATCH 0435/1325] feat(api): api update (#969) --- .stats.yml | 2 +- src/increase/types/inbound_check_deposit.py | 4 +++- src/increase/types/transaction.py | 4 +++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 32dd62903..7dad937c5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b3b6572700500a421109ac83ef56b3046e9f1510ca7d1f583d329d1b8ecf5516.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0a850fe9e55426b331fea3fd2f61ad0e72dd5d7d2cac4c258f69bdf5b23aa42b.yml diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 02b1a096a..84e949c0c 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,7 +16,7 @@ class Adjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"] + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving @@ -25,6 +25,8 @@ class Adjustment(BaseModel): depositing institution has reimbursed the funds with a Wrong Payee Credit. - `adjusted_amount` - The check was deposited with a different amount than what was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. """ transaction_id: str diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d534ec078..1f765d93f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1881,7 +1881,7 @@ class SourceInboundCheckAdjustment(BaseModel): amount: int """The amount of the check adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount"] + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving @@ -1890,6 +1890,8 @@ class SourceInboundCheckAdjustment(BaseModel): depositing institution has reimbursed the funds with a Wrong Payee Credit. - `adjusted_amount` - The check was deposited with a different amount than what was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. """ From 07232fc900e54f0451fec5b94ad92359bceb32ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:28:18 +0000 Subject: [PATCH 0436/1325] chore(internal): version bump (#971) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7e28725e..dbf415034 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.191.0" + ".": "0.192.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6d42c6a56..cdbf87234 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.191.0" +version = "0.192.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d76519f0f..92cf9e26d 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.191.0" # x-release-please-version +__version__ = "0.192.0" # x-release-please-version From c192cc069e4e5f5a1cd99c1332509351a9c73deb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Feb 2025 17:40:10 +0000 Subject: [PATCH 0437/1325] chore(internal): codegen related update (#972) --- src/increase/_utils/_sync.py | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index 8b3aaf2b5..ad7ec71b7 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -7,16 +7,20 @@ from typing import Any, TypeVar, Callable, Awaitable from typing_extensions import ParamSpec +import anyio +import sniffio +import anyio.to_thread + T_Retval = TypeVar("T_Retval") T_ParamSpec = ParamSpec("T_ParamSpec") if sys.version_info >= (3, 9): - to_thread = asyncio.to_thread + _asyncio_to_thread = asyncio.to_thread else: # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread # for Python 3.8 support - async def to_thread( + async def _asyncio_to_thread( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs ) -> Any: """Asynchronously run function *func* in a separate thread. @@ -34,6 +38,17 @@ async def to_thread( return await loop.run_in_executor(None, func_call) +async def to_thread( + func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs +) -> T_Retval: + if sniffio.current_async_library() == "asyncio": + return await _asyncio_to_thread(func, *args, **kwargs) + + return await anyio.to_thread.run_sync( + functools.partial(func, *args, **kwargs), + ) + + # inspired by `asyncer`, https://github.com/tiangolo/asyncer def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: """ From bbf75b7e6a1bb6aea3b8bcaf6d165be4db37d6a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:34:54 +0000 Subject: [PATCH 0438/1325] feat(client): allow passing `NotGiven` for body (#974) fix(client): mark some request bodies as optional --- src/increase/_base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index e8ba26a43..978d684f1 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -518,7 +518,7 @@ def _build_request( # so that passing a `TypedDict` doesn't cause an error. # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, - json=json_data, + json=json_data if is_given(json_data) else None, files=files, **kwargs, ) From 7bcc37977280a3375ef8e68970188d1e8ba3b4b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Feb 2025 22:37:20 +0000 Subject: [PATCH 0439/1325] chore(internal): version bump (#975) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dbf415034..544c9a9f6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.192.0" + ".": "0.193.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cdbf87234..59632c900 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.192.0" +version = "0.193.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 92cf9e26d..3606c1b0e 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.192.0" # x-release-please-version +__version__ = "0.193.0" # x-release-please-version From 568ee6a27fab88bf2705e6a4494ab4ce4aeb046b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Feb 2025 15:00:16 +0000 Subject: [PATCH 0440/1325] chore(internal): fix devcontainers setup (#976) --- .devcontainer/Dockerfile | 2 +- .devcontainer/devcontainer.json | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ac9a2e752..55d20255c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -6,4 +6,4 @@ USER vscode RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH -RUN echo "[[ -d .venv ]] && source .venv/bin/activate" >> /home/vscode/.bashrc +RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index bbeb30b14..c17fdc169 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -24,6 +24,9 @@ } } } + }, + "features": { + "ghcr.io/devcontainers/features/node:1": {} } // Features to add to the dev container. More info: https://containers.dev/features. From 3b610ee92abafa453ef5aa60ef57c34e36d97d56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Feb 2025 00:02:57 +0000 Subject: [PATCH 0441/1325] feat(api): api update (#978) --- .stats.yml | 2 +- src/increase/types/digital_wallet_token.py | 26 ++++++++++++++++++++-- 2 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7dad937c5..d9c437e9c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0a850fe9e55426b331fea3fd2f61ad0e72dd5d7d2cac4c258f69bdf5b23aa42b.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-15ead2ecf5c1d979cfa951c578d25ba20f9f5c1b987d109b6eaa4e8eeda973e1.yml diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py index 14aa7792c..de9fb6a49 100644 --- a/src/increase/types/digital_wallet_token.py +++ b/src/increase/types/digital_wallet_token.py @@ -1,11 +1,30 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import List from datetime import datetime from typing_extensions import Literal from .._models import BaseModel -__all__ = ["DigitalWalletToken"] +__all__ = ["DigitalWalletToken", "Update"] + + +class Update(BaseModel): + status: Literal["active", "inactive", "suspended", "deactivated"] + """The status the update changed this Digital Wallet Token to. + + - `active` - The digital wallet token is active. + - `inactive` - The digital wallet token has been created but not successfully + activated via two-factor authentication yet. + - `suspended` - The digital wallet token has been temporarily paused. + - `deactivated` - The digital wallet token has been permanently canceled. + """ + + timestamp: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the update happened. + """ class DigitalWalletToken(BaseModel): @@ -18,7 +37,7 @@ class DigitalWalletToken(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card was created. + the Digital Wallet Token was created. """ status: Literal["active", "inactive", "suspended", "deactivated"] @@ -45,3 +64,6 @@ class DigitalWalletToken(BaseModel): For this resource it will always be `digital_wallet_token`. """ + + updates: List[Update] + """Updates to the Digital Wallet Token.""" From 47dc8234ef5f616292eb597148557bb17afbd9af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Feb 2025 00:04:36 +0000 Subject: [PATCH 0442/1325] chore(internal): version bump (#979) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 544c9a9f6..a2a6d2690 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.193.0" + ".": "0.194.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 59632c900..01188ee0d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.193.0" +version = "0.194.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3606c1b0e..777ad0bd2 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.193.0" # x-release-please-version +__version__ = "0.194.0" # x-release-please-version From a030233e77b98e9d210a407d7646a42bd4a28e3e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:12:48 +0000 Subject: [PATCH 0443/1325] feat(api): api update (#980) --- .stats.yml | 2 +- src/increase/resources/simulations/card_authorizations.py | 4 ++++ src/increase/types/card_payment.py | 2 ++ src/increase/types/declined_transaction.py | 2 ++ .../types/simulations/card_authorization_create_params.py | 2 ++ tests/api_resources/simulations/test_card_authorizations.py | 4 ++-- 6 files changed, 13 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9c437e9c..965dafe41 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-15ead2ecf5c1d979cfa951c578d25ba20f9f5c1b987d109b6eaa4e8eeda973e1.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c3b5c54f9deac8411f40a4a8e14715ed60acd2ae56c5e36e83664586ef5aafd.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index a7e8f0413..2ff7b86d7 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -53,6 +53,7 @@ def create( authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, card_id: str | NotGiven = NOT_GIVEN, decline_reason: Literal[ + "account_closed", "card_not_active", "physical_card_not_active", "entity_not_active", @@ -111,6 +112,7 @@ def create( decline_reason: Forces a card decline with a specific reason. No real time decision will be sent. + - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. @@ -241,6 +243,7 @@ async def create( authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, card_id: str | NotGiven = NOT_GIVEN, decline_reason: Literal[ + "account_closed", "card_not_active", "physical_card_not_active", "entity_not_active", @@ -299,6 +302,7 @@ async def create( decline_reason: Forces a card decline with a specific reason. No real time decision will be sent. + - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 7d6898681..236e444fd 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1037,6 +1037,7 @@ class ElementCardDecline(BaseModel): """ reason: Literal[ + "account_closed", "card_not_active", "physical_card_not_active", "entity_not_active", @@ -1055,6 +1056,7 @@ class ElementCardDecline(BaseModel): ] """Why the transaction was declined. + - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 1a8aee9d0..8faa51eb3 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -498,6 +498,7 @@ class SourceCardDecline(BaseModel): """ reason: Literal[ + "account_closed", "card_not_active", "physical_card_not_active", "entity_not_active", @@ -516,6 +517,7 @@ class SourceCardDecline(BaseModel): ] """Why the transaction was declined. + - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 9232f0e10..323a950b4 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -21,6 +21,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): """The identifier of the Card to be authorized.""" decline_reason: Literal[ + "account_closed", "card_not_active", "physical_card_not_active", "entity_not_active", @@ -41,6 +42,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): No real time decision will be sent. + - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index eddb63f32..5c8e03185 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -30,7 +30,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: amount=1000, authenticated_card_payment_id="authenticated_card_payment_id", card_id="card_oubs0hwk5rn6knuecxg2", - decline_reason="card_not_active", + decline_reason="account_closed", digital_wallet_token_id="digital_wallet_token_id", direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", @@ -87,7 +87,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) amount=1000, authenticated_card_payment_id="authenticated_card_payment_id", card_id="card_oubs0hwk5rn6knuecxg2", - decline_reason="card_not_active", + decline_reason="account_closed", digital_wallet_token_id="digital_wallet_token_id", direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", From e0f64ae9b0b7451ee2373f9cbe9cc86d0c2497eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Feb 2025 19:14:09 +0000 Subject: [PATCH 0444/1325] chore(internal): version bump (#982) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a2a6d2690..e9cee8d37 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.194.0" + ".": "0.195.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 01188ee0d..6a4c34d02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.194.0" +version = "0.195.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 777ad0bd2..2169af86d 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.194.0" # x-release-please-version +__version__ = "0.195.0" # x-release-please-version From 774ea035a233e8e07434ff69e22186d86cf0d32e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 25 Feb 2025 11:01:04 +0000 Subject: [PATCH 0445/1325] chore(internal): properly set __pydantic_private__ (#983) --- src/increase/_base_client.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 978d684f1..67dc8a43d 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -63,7 +63,7 @@ ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping -from ._compat import model_copy, model_dump +from ._compat import PYDANTIC_V2, model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( APIResponse, @@ -207,6 +207,9 @@ def _set_private_attributes( model: Type[_T], options: FinalRequestOptions, ) -> None: + if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + self.__pydantic_private__ = {} + self._model = model self._client = client self._options = options @@ -292,6 +295,9 @@ def _set_private_attributes( client: AsyncAPIClient, options: FinalRequestOptions, ) -> None: + if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + self.__pydantic_private__ = {} + self._model = model self._client = client self._options = options From ba15da8ac01a8d86fbd307de1a69b6d0139bf9da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 18:24:01 +0000 Subject: [PATCH 0446/1325] feat(api): api update (#985) --- .stats.yml | 2 +- tests/api_resources/test_event_subscriptions.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 965dafe41..43048b318 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c3b5c54f9deac8411f40a4a8e14715ed60acd2ae56c5e36e83664586ef5aafd.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d4eedf5add319b076d462be8b764246f0c3251ff60708906a90494e05ed8e93c.yml diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 877e24f0f..b2edc3d62 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -31,7 +31,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.create( url="https://website.com/webhooks", - oauth_connection_id="oauth_connection_id", + oauth_connection_id="x", selected_event_category="account.created", shared_secret="x", ) @@ -194,7 +194,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.create( url="https://website.com/webhooks", - oauth_connection_id="oauth_connection_id", + oauth_connection_id="x", selected_event_category="account.created", shared_secret="x", ) From 836e2bb8c3b250a8bf0ea30dff49f3901912d2f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Feb 2025 18:25:42 +0000 Subject: [PATCH 0447/1325] chore(internal): version bump (#986) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9cee8d37..ba48addfa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.195.0" + ".": "0.196.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6a4c34d02..82d6a30ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.195.0" +version = "0.196.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2169af86d..7c542a20e 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.195.0" # x-release-please-version +__version__ = "0.196.0" # x-release-please-version From 33558bbb630d2103ec8f8627016861022fd482de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 21:56:21 +0000 Subject: [PATCH 0448/1325] docs: update URLs from stainlessapi.com to stainless.com (#987) More details at https://www.stainless.com/changelog/stainless-com --- SECURITY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index c0967acc5..0f599b6d3 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,9 +2,9 @@ ## Reporting Security Issues -This SDK is generated by [Stainless Software Inc](http://stainlessapi.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. +This SDK is generated by [Stainless Software Inc](http://stainless.com). Stainless takes security seriously, and encourages you to report any security vulnerability promptly so that appropriate action can be taken. -To report a security issue, please contact the Stainless team at security@stainlessapi.com. +To report a security issue, please contact the Stainless team at security@stainless.com. ## Responsible Disclosure From 82aa61bf9cce009862de0d9d14ab3f12970c9035 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Feb 2025 22:48:26 +0000 Subject: [PATCH 0449/1325] chore(docs): update client docstring (#989) --- src/increase/_client.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_client.py b/src/increase/_client.py index 901c3c42b..17ea2ecd7 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -200,7 +200,7 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new synchronous increase client instance. + """Construct a new synchronous Increase client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: - `api_key` from `INCREASE_API_KEY` @@ -571,7 +571,7 @@ def __init__( # part of our public interface in the future. _strict_response_validation: bool = False, ) -> None: - """Construct a new async increase client instance. + """Construct a new async AsyncIncrease client instance. This automatically infers the following arguments from their corresponding environment variables if they are not provided: - `api_key` from `INCREASE_API_KEY` From 4736a414c02e727918c94e4215d0f068b2c0299d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:27:22 +0000 Subject: [PATCH 0450/1325] feat(api): api update (#990) --- .stats.yml | 2 +- src/increase/resources/accounts.py | 15 ++------------ src/increase/types/account_list_params.py | 24 +++++++++++++++-------- tests/api_resources/test_accounts.py | 4 ++-- 4 files changed, 21 insertions(+), 24 deletions(-) diff --git a/.stats.yml b/.stats.yml index 43048b318..abd340a25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d4eedf5add319b076d462be8b764246f0c3251ff60708906a90494e05ed8e93c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a39e9d1d0001ea729c1ee2e06ac456278e4fc9064790da323630e54ab02bf056.yml diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index b6d327d74..338659050 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -4,7 +4,6 @@ from typing import Union from datetime import datetime -from typing_extensions import Literal import httpx @@ -206,7 +205,7 @@ def list( informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, program_id: str | NotGiven = NOT_GIVEN, - status: Literal["closed", "open"] | NotGiven = NOT_GIVEN, + status: account_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -234,11 +233,6 @@ def list( program_id: Filter Accounts for those in a specific Program. - status: Filter Accounts for those with the specified status. - - - `closed` - Closed Accounts on which no new activity can occur. - - `open` - Open Accounts that are ready to use. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -530,7 +524,7 @@ def list( informational_entity_id: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, program_id: str | NotGiven = NOT_GIVEN, - status: Literal["closed", "open"] | NotGiven = NOT_GIVEN, + status: account_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -558,11 +552,6 @@ def list( program_id: Filter Accounts for those in a specific Program. - status: Filter Accounts for those with the specified status. - - - `closed` - Closed Accounts on which no new activity can occur. - - `open` - Open Accounts that are ready to use. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/types/account_list_params.py b/src/increase/types/account_list_params.py index 6b5044ba0..1888d6908 100644 --- a/src/increase/types/account_list_params.py +++ b/src/increase/types/account_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["AccountListParams", "CreatedAt"] +__all__ = ["AccountListParams", "CreatedAt", "Status"] class AccountListParams(TypedDict, total=False): @@ -40,12 +40,7 @@ class AccountListParams(TypedDict, total=False): program_id: str """Filter Accounts for those in a specific Program.""" - status: Literal["closed", "open"] - """Filter Accounts for those with the specified status. - - - `closed` - Closed Accounts on which no new activity can occur. - - `open` - Open Accounts that are ready to use. - """ + status: Status class CreatedAt(TypedDict, total=False): @@ -72,3 +67,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["closed", "open"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index b8cfbb9bb..2a06214e3 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -167,7 +167,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: informational_entity_id="informational_entity_id", limit=1, program_id="program_id", - status="closed", + status={"in": ["closed"]}, ) assert_matches_type(SyncPage[Account], account, path=["response"]) @@ -424,7 +424,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> informational_entity_id="informational_entity_id", limit=1, program_id="program_id", - status="closed", + status={"in": ["closed"]}, ) assert_matches_type(AsyncPage[Account], account, path=["response"]) From 760b8605eeaaea2cfd589880caf0ab5b7c5fea24 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Feb 2025 23:28:35 +0000 Subject: [PATCH 0451/1325] chore(internal): version bump (#991) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ba48addfa..ceb465254 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.196.0" + ".": "0.197.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 82d6a30ef..f2e402c36 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.196.0" +version = "0.197.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7c542a20e..e04185b01 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.196.0" # x-release-please-version +__version__ = "0.197.0" # x-release-please-version From 3ef4899815f2044a0647e2d001883d60d4e91fbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 00:08:45 +0000 Subject: [PATCH 0452/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index abd340a25..e53c0fad3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a39e9d1d0001ea729c1ee2e06ac456278e4fc9064790da323630e54ab02bf056.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5dd5f2439cdbbb3bffe2ef733d3d173a10ca3233d15763bad8ccf8f87c10e246.yml From f237614285a992dba7c4de90835eb2a7cc587e08 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 00:34:48 +0000 Subject: [PATCH 0453/1325] feat(api): api update (#992) --- .stats.yml | 2 +- src/increase/resources/account_numbers.py | 30 ++----------- .../resources/inbound_ach_transfers.py | 28 +++--------- .../resources/inbound_wire_transfers.py | 30 +++---------- .../resources/wire_drawdown_requests.py | 24 +---------- .../types/account_number_list_params.py | 43 +++++++++++++------ .../types/inbound_ach_transfer_list_params.py | 31 +++++++------ .../inbound_wire_transfer_list_params.py | 33 ++++++++------ .../wire_drawdown_request_list_params.py | 25 ++++++----- tests/api_resources/test_account_numbers.py | 8 ++-- .../test_inbound_ach_transfers.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- .../test_wire_drawdown_requests.py | 4 +- 13 files changed, 111 insertions(+), 155 deletions(-) diff --git a/.stats.yml b/.stats.yml index e53c0fad3..85960561b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5dd5f2439cdbbb3bffe2ef733d3d173a10ca3233d15763bad8ccf8f87c10e246.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8882da77555a843811f51c01d96a8a0f5dd36dc70de46bdf01a1e624807ba3a6.yml diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 7aefb3a19..15793c0e9 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -217,12 +217,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, + ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + status: account_number_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -236,11 +236,6 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. - ach_debit_status: The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -251,12 +246,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: The status to retrieve Account Numbers for. - - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -476,12 +465,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, + ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + status: account_number_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -495,11 +484,6 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. - ach_debit_status: The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -510,12 +494,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: The status to retrieve Account Numbers for. - - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index f31e91c52..93aad3d51 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -97,7 +97,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, + status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -109,23 +109,15 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -454,7 +446,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, + status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -466,23 +458,15 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index f0b7f519d..6053cd963 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx from ..types import inbound_wire_transfer_list_params @@ -89,7 +87,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, + status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -101,23 +99,15 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -215,7 +205,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, + status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -227,23 +217,15 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 9a958b3f8..4c07e6e14 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params @@ -192,7 +190,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, + status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -214,15 +212,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Wire Drawdown Requests for those with the specified status. - - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -418,7 +407,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, + status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -440,15 +429,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Wire Drawdown Requests for those with the specified status. - - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py index ed027f9b4..57ef69909 100644 --- a/src/increase/types/account_number_list_params.py +++ b/src/increase/types/account_number_list_params.py @@ -2,25 +2,20 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["AccountNumberListParams", "CreatedAt"] +__all__ = ["AccountNumberListParams", "ACHDebitStatus", "CreatedAt", "Status"] class AccountNumberListParams(TypedDict, total=False): account_id: str """Filter Account Numbers to those belonging to the specified Account.""" - ach_debit_status: Literal["allowed", "blocked"] - """The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - """ + ach_debit_status: ACHDebitStatus created_at: CreatedAt @@ -41,13 +36,20 @@ class AccountNumberListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["active", "disabled", "canceled"] - """The status to retrieve Account Numbers for. + status: Status + + +_ACHDebitStatusReservedKeywords = TypedDict( + "_ACHDebitStatusReservedKeywords", + { + "in": List[Literal["allowed", "blocked"]], + }, + total=False, +) - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - """ + +class ACHDebitStatus(_ACHDebitStatusReservedKeywords, total=False): + pass class CreatedAt(TypedDict, total=False): @@ -74,3 +76,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "disabled", "canceled"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_ach_transfer_list_params.py b/src/increase/types/inbound_ach_transfer_list_params.py index cb62d5db8..c5a6b4151 100644 --- a/src/increase/types/inbound_ach_transfer_list_params.py +++ b/src/increase/types/inbound_ach_transfer_list_params.py @@ -2,21 +2,21 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundACHTransferListParams", "CreatedAt"] +__all__ = ["InboundACHTransferListParams", "CreatedAt", "Status"] class InboundACHTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound ACH Tranfers to ones belonging to the specified Account.""" + """Filter Inbound ACH Transfers to ones belonging to the specified Account.""" account_number_id: str - """Filter Inbound ACH Tranfers to ones belonging to the specified Account Number.""" + """Filter Inbound ACH Transfers to ones belonging to the specified Account Number.""" created_at: CreatedAt @@ -29,15 +29,7 @@ class InboundACHTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending", "declined", "accepted", "returned"] - """Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - """ + status: Status class CreatedAt(TypedDict, total=False): @@ -64,3 +56,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "declined", "accepted", "returned"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py index 8c49ebb1f..3e92f2818 100644 --- a/src/increase/types/inbound_wire_transfer_list_params.py +++ b/src/increase/types/inbound_wire_transfer_list_params.py @@ -2,21 +2,23 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundWireTransferListParams", "CreatedAt"] +__all__ = ["InboundWireTransferListParams", "CreatedAt", "Status"] class InboundWireTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound Wire Tranfers to ones belonging to the specified Account.""" + """Filter Inbound Wire Transfers to ones belonging to the specified Account.""" account_number_id: str - """Filter Inbound Wire Tranfers to ones belonging to the specified Account Number.""" + """ + Filter Inbound Wire Transfers to ones belonging to the specified Account Number. + """ created_at: CreatedAt @@ -29,15 +31,7 @@ class InboundWireTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending", "accepted", "declined", "reversed"] - """Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - """ + status: Status class CreatedAt(TypedDict, total=False): @@ -64,3 +58,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "accepted", "declined", "reversed"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index e36ed2aea..f462884c4 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -2,9 +2,10 @@ from __future__ import annotations +from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["WireDrawdownRequestListParams"] +__all__ = ["WireDrawdownRequestListParams", "Status"] class WireDrawdownRequestListParams(TypedDict, total=False): @@ -25,13 +26,17 @@ class WireDrawdownRequestListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] - """Filter Wire Drawdown Requests for those with the specified status. + status: Status - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - """ + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending_submission", "pending_response", "fulfilled", "refused"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 8978259d0..d9f8e4d4a 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -161,7 +161,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.list( account_id="account_id", - ach_debit_status="allowed", + ach_debit_status={"in": ["allowed"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -171,7 +171,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status="active", + status={"in": ["active"]}, ) assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @@ -339,7 +339,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list( account_id="account_id", - ach_debit_status="allowed", + ach_debit_status={"in": ["allowed"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -349,7 +349,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status="active", + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 65088d8e9..f6e589921 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -79,7 +79,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 2ed890683..ed4c8234a 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -77,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @@ -163,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 0acdbcd09..4a4234ad0 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -134,7 +134,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status="pending_submission", + status={"in": ["pending_submission"]}, ) assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status="pending_submission", + status={"in": ["pending_submission"]}, ) assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) From f010a13baa0b97c4169023a2750596a1acfca2d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 00:36:05 +0000 Subject: [PATCH 0454/1325] chore(internal): version bump (#994) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ceb465254..74799872e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.197.0" + ".": "0.198.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f2e402c36..c964503d6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.197.0" +version = "0.198.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e04185b01..4c25b3810 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.197.0" # x-release-please-version +__version__ = "0.198.0" # x-release-please-version From 0c03fa733cc2685aa8d360121b180fc1d9e4e4b5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 01:13:15 +0000 Subject: [PATCH 0455/1325] feat(api): api update (#995) --- .stats.yml | 2 +- src/increase/resources/account_numbers.py | 30 +++++++++++-- .../resources/inbound_ach_transfers.py | 28 +++++++++--- .../resources/inbound_wire_transfers.py | 30 ++++++++++--- .../resources/wire_drawdown_requests.py | 24 ++++++++++- .../types/account_number_list_params.py | 43 ++++++------------- .../types/inbound_ach_transfer_list_params.py | 31 ++++++------- .../inbound_wire_transfer_list_params.py | 33 ++++++-------- .../wire_drawdown_request_list_params.py | 25 +++++------ tests/api_resources/test_account_numbers.py | 8 ++-- .../test_inbound_ach_transfers.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- .../test_wire_drawdown_requests.py | 4 +- 13 files changed, 155 insertions(+), 111 deletions(-) diff --git a/.stats.yml b/.stats.yml index 85960561b..e53c0fad3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8882da77555a843811f51c01d96a8a0f5dd36dc70de46bdf01a1e624807ba3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5dd5f2439cdbbb3bffe2ef733d3d173a10ca3233d15763bad8ccf8f87c10e246.yml diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 15793c0e9..7aefb3a19 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -217,12 +217,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, + ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_number_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -236,6 +236,11 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. + ach_debit_status: The ACH Debit status to retrieve Account Numbers for. + + - `allowed` - ACH Debits are allowed. + - `blocked` - ACH Debits are blocked. + cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -246,6 +251,12 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: The status to retrieve Account Numbers for. + + - `active` - The account number is active. + - `disabled` - The account number is temporarily disabled. + - `canceled` - The account number is permanently disabled. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -465,12 +476,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, + ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: account_number_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -484,6 +495,11 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. + ach_debit_status: The ACH Debit status to retrieve Account Numbers for. + + - `allowed` - ACH Debits are allowed. + - `blocked` - ACH Debits are blocked. + cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -494,6 +510,12 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: The status to retrieve Account Numbers for. + + - `active` - The account number is active. + - `disabled` - The account number is temporarily disabled. + - `canceled` - The account number is permanently disabled. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 93aad3d51..f31e91c52 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -97,7 +97,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -109,15 +109,23 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Inbound ACH Transfers to those with the specified status. + + - `pending` - The Inbound ACH Transfer is awaiting action, will transition + automatically if no action is taken. + - `declined` - The Inbound ACH Transfer has been declined. + - `accepted` - The Inbound ACH Transfer is accepted. + - `returned` - The Inbound ACH Transfer has been returned. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -446,7 +454,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -458,15 +466,23 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Inbound ACH Transfers to those with the specified status. + + - `pending` - The Inbound ACH Transfer is awaiting action, will transition + automatically if no action is taken. + - `declined` - The Inbound ACH Transfer has been declined. + - `accepted` - The Inbound ACH Transfer is accepted. + - `returned` - The Inbound ACH Transfer has been returned. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 6053cd963..f0b7f519d 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..types import inbound_wire_transfer_list_params @@ -87,7 +89,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -99,15 +101,23 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Inbound Wire Transfers to those with the specified status. + + - `pending` - The Inbound Wire Transfer is awaiting action, will transition + automatically if no action is taken. + - `accepted` - The Inbound Wire Transfer is accepted. + - `declined` - The Inbound Wire Transfer was declined. + - `reversed` - The Inbound Wire Transfer was reversed. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -205,7 +215,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -217,15 +227,23 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Inbound Wire Transfers to those with the specified status. + + - `pending` - The Inbound Wire Transfer is awaiting action, will transition + automatically if no action is taken. + - `accepted` - The Inbound Wire Transfer is accepted. + - `declined` - The Inbound Wire Transfer was declined. + - `reversed` - The Inbound Wire Transfer was reversed. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 4c07e6e14..9a958b3f8 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params @@ -190,7 +192,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -212,6 +214,15 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -407,7 +418,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -429,6 +440,15 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + status: Filter Wire Drawdown Requests for those with the specified status. + + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py index 57ef69909..ed027f9b4 100644 --- a/src/increase/types/account_number_list_params.py +++ b/src/increase/types/account_number_list_params.py @@ -2,20 +2,25 @@ from __future__ import annotations -from typing import List, Union +from typing import Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["AccountNumberListParams", "ACHDebitStatus", "CreatedAt", "Status"] +__all__ = ["AccountNumberListParams", "CreatedAt"] class AccountNumberListParams(TypedDict, total=False): account_id: str """Filter Account Numbers to those belonging to the specified Account.""" - ach_debit_status: ACHDebitStatus + ach_debit_status: Literal["allowed", "blocked"] + """The ACH Debit status to retrieve Account Numbers for. + + - `allowed` - ACH Debits are allowed. + - `blocked` - ACH Debits are blocked. + """ created_at: CreatedAt @@ -36,20 +41,13 @@ class AccountNumberListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Status - - -_ACHDebitStatusReservedKeywords = TypedDict( - "_ACHDebitStatusReservedKeywords", - { - "in": List[Literal["allowed", "blocked"]], - }, - total=False, -) - + status: Literal["active", "disabled", "canceled"] + """The status to retrieve Account Numbers for. -class ACHDebitStatus(_ACHDebitStatusReservedKeywords, total=False): - pass + - `active` - The account number is active. + - `disabled` - The account number is temporarily disabled. + - `canceled` - The account number is permanently disabled. + """ class CreatedAt(TypedDict, total=False): @@ -76,16 +74,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["active", "disabled", "canceled"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass diff --git a/src/increase/types/inbound_ach_transfer_list_params.py b/src/increase/types/inbound_ach_transfer_list_params.py index c5a6b4151..cb62d5db8 100644 --- a/src/increase/types/inbound_ach_transfer_list_params.py +++ b/src/increase/types/inbound_ach_transfer_list_params.py @@ -2,21 +2,21 @@ from __future__ import annotations -from typing import List, Union +from typing import Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundACHTransferListParams", "CreatedAt", "Status"] +__all__ = ["InboundACHTransferListParams", "CreatedAt"] class InboundACHTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound ACH Transfers to ones belonging to the specified Account.""" + """Filter Inbound ACH Tranfers to ones belonging to the specified Account.""" account_number_id: str - """Filter Inbound ACH Transfers to ones belonging to the specified Account Number.""" + """Filter Inbound ACH Tranfers to ones belonging to the specified Account Number.""" created_at: CreatedAt @@ -29,7 +29,15 @@ class InboundACHTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Status + status: Literal["pending", "declined", "accepted", "returned"] + """Filter Inbound ACH Transfers to those with the specified status. + + - `pending` - The Inbound ACH Transfer is awaiting action, will transition + automatically if no action is taken. + - `declined` - The Inbound ACH Transfer has been declined. + - `accepted` - The Inbound ACH Transfer is accepted. + - `returned` - The Inbound ACH Transfer has been returned. + """ class CreatedAt(TypedDict, total=False): @@ -56,16 +64,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending", "declined", "accepted", "returned"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py index 3e92f2818..8c49ebb1f 100644 --- a/src/increase/types/inbound_wire_transfer_list_params.py +++ b/src/increase/types/inbound_wire_transfer_list_params.py @@ -2,23 +2,21 @@ from __future__ import annotations -from typing import List, Union +from typing import Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundWireTransferListParams", "CreatedAt", "Status"] +__all__ = ["InboundWireTransferListParams", "CreatedAt"] class InboundWireTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound Wire Transfers to ones belonging to the specified Account.""" + """Filter Inbound Wire Tranfers to ones belonging to the specified Account.""" account_number_id: str - """ - Filter Inbound Wire Transfers to ones belonging to the specified Account Number. - """ + """Filter Inbound Wire Tranfers to ones belonging to the specified Account Number.""" created_at: CreatedAt @@ -31,7 +29,15 @@ class InboundWireTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Status + status: Literal["pending", "accepted", "declined", "reversed"] + """Filter Inbound Wire Transfers to those with the specified status. + + - `pending` - The Inbound Wire Transfer is awaiting action, will transition + automatically if no action is taken. + - `accepted` - The Inbound Wire Transfer is accepted. + - `declined` - The Inbound Wire Transfer was declined. + - `reversed` - The Inbound Wire Transfer was reversed. + """ class CreatedAt(TypedDict, total=False): @@ -58,16 +64,3 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ - - -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending", "accepted", "declined", "reversed"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index f462884c4..e36ed2aea 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -2,10 +2,9 @@ from __future__ import annotations -from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["WireDrawdownRequestListParams", "Status"] +__all__ = ["WireDrawdownRequestListParams"] class WireDrawdownRequestListParams(TypedDict, total=False): @@ -26,17 +25,13 @@ class WireDrawdownRequestListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Status + status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] + """Filter Wire Drawdown Requests for those with the specified status. - -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending_submission", "pending_response", "fulfilled", "refused"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass + - `pending_submission` - The drawdown request is queued to be submitted to + Fedwire. + - `pending_response` - The drawdown request has been sent and the recipient + should respond in some way. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. + - `refused` - The drawdown request has been refused by the recipient. + """ diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index d9f8e4d4a..8978259d0 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -161,7 +161,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.list( account_id="account_id", - ach_debit_status={"in": ["allowed"]}, + ach_debit_status="allowed", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -171,7 +171,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["active"]}, + status="active", ) assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @@ -339,7 +339,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list( account_id="account_id", - ach_debit_status={"in": ["allowed"]}, + ach_debit_status="allowed", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -349,7 +349,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["active"]}, + status="active", ) assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index f6e589921..65088d8e9 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -79,7 +79,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status={"in": ["pending"]}, + status="pending", ) assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status={"in": ["pending"]}, + status="pending", ) assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index ed4c8234a..2ed890683 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -77,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status={"in": ["pending"]}, + status="pending", ) assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @@ -163,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status={"in": ["pending"]}, + status="pending", ) assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 4a4234ad0..0acdbcd09 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -134,7 +134,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_submission"]}, + status="pending_submission", ) assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status={"in": ["pending_submission"]}, + status="pending_submission", ) assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) From 93b92887c3a7886bdcb8fd87dee234defc01fa17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 01:14:28 +0000 Subject: [PATCH 0456/1325] chore(internal): version bump (#997) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 74799872e..e9e924010 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.198.0" + ".": "0.199.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c964503d6..14a65f459 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.198.0" +version = "0.199.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4c25b3810..347f6c8fd 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.198.0" # x-release-please-version +__version__ = "0.199.0" # x-release-please-version From 12e9d8b421afa18bd37ec4d4a16ba51bb147613a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 01:33:36 +0000 Subject: [PATCH 0457/1325] feat(api): api update (#998) --- .stats.yml | 2 +- src/increase/resources/account_numbers.py | 30 ++----------- .../resources/inbound_ach_transfers.py | 28 +++--------- .../resources/inbound_wire_transfers.py | 30 +++---------- .../resources/wire_drawdown_requests.py | 24 +---------- .../types/account_number_list_params.py | 43 +++++++++++++------ .../types/inbound_ach_transfer_list_params.py | 31 +++++++------ .../inbound_wire_transfer_list_params.py | 33 ++++++++------ .../wire_drawdown_request_list_params.py | 25 ++++++----- tests/api_resources/test_account_numbers.py | 8 ++-- .../test_inbound_ach_transfers.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- .../test_wire_drawdown_requests.py | 4 +- 13 files changed, 111 insertions(+), 155 deletions(-) diff --git a/.stats.yml b/.stats.yml index e53c0fad3..85960561b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5dd5f2439cdbbb3bffe2ef733d3d173a10ca3233d15763bad8ccf8f87c10e246.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8882da77555a843811f51c01d96a8a0f5dd36dc70de46bdf01a1e624807ba3a6.yml diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 7aefb3a19..15793c0e9 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -217,12 +217,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, + ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + status: account_number_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -236,11 +236,6 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. - ach_debit_status: The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -251,12 +246,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: The status to retrieve Account Numbers for. - - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -476,12 +465,12 @@ def list( self, *, account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: Literal["allowed", "blocked"] | NotGiven = NOT_GIVEN, + ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + status: account_number_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -495,11 +484,6 @@ def list( Args: account_id: Filter Account Numbers to those belonging to the specified Account. - ach_debit_status: The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -510,12 +494,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: The status to retrieve Account Numbers for. - - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index f31e91c52..93aad3d51 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -97,7 +97,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, + status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -109,23 +109,15 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -454,7 +446,7 @@ def list( created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "declined", "accepted", "returned"] | NotGiven = NOT_GIVEN, + status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -466,23 +458,15 @@ def list( List Inbound ACH Transfers Args: - account_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound ACH Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound ACH Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound ACH Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index f0b7f519d..6053cd963 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx from ..types import inbound_wire_transfer_list_params @@ -89,7 +87,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, + status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -101,23 +99,15 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -215,7 +205,7 @@ def list( created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending", "accepted", "declined", "reversed"] | NotGiven = NOT_GIVEN, + status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -227,23 +217,15 @@ def list( List Inbound Wire Transfers Args: - account_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account. + account_id: Filter Inbound Wire Transfers to ones belonging to the specified Account. - account_number_id: Filter Inbound Wire Tranfers to ones belonging to the specified Account Number. + account_number_id: Filter Inbound Wire Transfers to ones belonging to the specified Account Number. cursor: Return the page of entries after this one. limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 9a958b3f8..4c07e6e14 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params @@ -192,7 +190,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, + status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -214,15 +212,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Wire Drawdown Requests for those with the specified status. - - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -418,7 +407,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] | NotGiven = NOT_GIVEN, + status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -440,15 +429,6 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. - status: Filter Wire Drawdown Requests for those with the specified status. - - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - extra_headers: Send extra headers extra_query: Add additional query parameters to the request diff --git a/src/increase/types/account_number_list_params.py b/src/increase/types/account_number_list_params.py index ed027f9b4..57ef69909 100644 --- a/src/increase/types/account_number_list_params.py +++ b/src/increase/types/account_number_list_params.py @@ -2,25 +2,20 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["AccountNumberListParams", "CreatedAt"] +__all__ = ["AccountNumberListParams", "ACHDebitStatus", "CreatedAt", "Status"] class AccountNumberListParams(TypedDict, total=False): account_id: str """Filter Account Numbers to those belonging to the specified Account.""" - ach_debit_status: Literal["allowed", "blocked"] - """The ACH Debit status to retrieve Account Numbers for. - - - `allowed` - ACH Debits are allowed. - - `blocked` - ACH Debits are blocked. - """ + ach_debit_status: ACHDebitStatus created_at: CreatedAt @@ -41,13 +36,20 @@ class AccountNumberListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["active", "disabled", "canceled"] - """The status to retrieve Account Numbers for. + status: Status + + +_ACHDebitStatusReservedKeywords = TypedDict( + "_ACHDebitStatusReservedKeywords", + { + "in": List[Literal["allowed", "blocked"]], + }, + total=False, +) - - `active` - The account number is active. - - `disabled` - The account number is temporarily disabled. - - `canceled` - The account number is permanently disabled. - """ + +class ACHDebitStatus(_ACHDebitStatusReservedKeywords, total=False): + pass class CreatedAt(TypedDict, total=False): @@ -74,3 +76,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "disabled", "canceled"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_ach_transfer_list_params.py b/src/increase/types/inbound_ach_transfer_list_params.py index cb62d5db8..c5a6b4151 100644 --- a/src/increase/types/inbound_ach_transfer_list_params.py +++ b/src/increase/types/inbound_ach_transfer_list_params.py @@ -2,21 +2,21 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundACHTransferListParams", "CreatedAt"] +__all__ = ["InboundACHTransferListParams", "CreatedAt", "Status"] class InboundACHTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound ACH Tranfers to ones belonging to the specified Account.""" + """Filter Inbound ACH Transfers to ones belonging to the specified Account.""" account_number_id: str - """Filter Inbound ACH Tranfers to ones belonging to the specified Account Number.""" + """Filter Inbound ACH Transfers to ones belonging to the specified Account Number.""" created_at: CreatedAt @@ -29,15 +29,7 @@ class InboundACHTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending", "declined", "accepted", "returned"] - """Filter Inbound ACH Transfers to those with the specified status. - - - `pending` - The Inbound ACH Transfer is awaiting action, will transition - automatically if no action is taken. - - `declined` - The Inbound ACH Transfer has been declined. - - `accepted` - The Inbound ACH Transfer is accepted. - - `returned` - The Inbound ACH Transfer has been returned. - """ + status: Status class CreatedAt(TypedDict, total=False): @@ -64,3 +56,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "declined", "accepted", "returned"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py index 8c49ebb1f..3e92f2818 100644 --- a/src/increase/types/inbound_wire_transfer_list_params.py +++ b/src/increase/types/inbound_wire_transfer_list_params.py @@ -2,21 +2,23 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["InboundWireTransferListParams", "CreatedAt"] +__all__ = ["InboundWireTransferListParams", "CreatedAt", "Status"] class InboundWireTransferListParams(TypedDict, total=False): account_id: str - """Filter Inbound Wire Tranfers to ones belonging to the specified Account.""" + """Filter Inbound Wire Transfers to ones belonging to the specified Account.""" account_number_id: str - """Filter Inbound Wire Tranfers to ones belonging to the specified Account Number.""" + """ + Filter Inbound Wire Transfers to ones belonging to the specified Account Number. + """ created_at: CreatedAt @@ -29,15 +31,7 @@ class InboundWireTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending", "accepted", "declined", "reversed"] - """Filter Inbound Wire Transfers to those with the specified status. - - - `pending` - The Inbound Wire Transfer is awaiting action, will transition - automatically if no action is taken. - - `accepted` - The Inbound Wire Transfer is accepted. - - `declined` - The Inbound Wire Transfer was declined. - - `reversed` - The Inbound Wire Transfer was reversed. - """ + status: Status class CreatedAt(TypedDict, total=False): @@ -64,3 +58,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending", "accepted", "declined", "reversed"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index e36ed2aea..f462884c4 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -2,9 +2,10 @@ from __future__ import annotations +from typing import List from typing_extensions import Literal, TypedDict -__all__ = ["WireDrawdownRequestListParams"] +__all__ = ["WireDrawdownRequestListParams", "Status"] class WireDrawdownRequestListParams(TypedDict, total=False): @@ -25,13 +26,17 @@ class WireDrawdownRequestListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] - """Filter Wire Drawdown Requests for those with the specified status. + status: Status - - `pending_submission` - The drawdown request is queued to be submitted to - Fedwire. - - `pending_response` - The drawdown request has been sent and the recipient - should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - - `refused` - The drawdown request has been refused by the recipient. - """ + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["pending_submission", "pending_response", "fulfilled", "refused"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 8978259d0..d9f8e4d4a 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -161,7 +161,7 @@ def test_method_list(self, client: Increase) -> None: def test_method_list_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.list( account_id="account_id", - ach_debit_status="allowed", + ach_debit_status={"in": ["allowed"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -171,7 +171,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status="active", + status={"in": ["active"]}, ) assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @@ -339,7 +339,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list( account_id="account_id", - ach_debit_status="allowed", + ach_debit_status={"in": ["allowed"]}, created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -349,7 +349,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status="active", + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 65088d8e9..f6e589921 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -79,7 +79,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @@ -306,7 +306,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 2ed890683..ed4c8234a 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -77,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @@ -163,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", limit=1, - status="pending", + status={"in": ["pending"]}, ) assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 0acdbcd09..4a4234ad0 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -134,7 +134,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - status="pending_submission", + status={"in": ["pending_submission"]}, ) assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - status="pending_submission", + status={"in": ["pending_submission"]}, ) assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) From c0c73b81550271e40eebc68fbc2907dd3164891e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 1 Mar 2025 01:34:51 +0000 Subject: [PATCH 0458/1325] chore(internal): version bump (#1000) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9e924010..0e5f1cfb3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.199.0" + ".": "0.200.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 14a65f459..e9ca73d48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.199.0" +version = "0.200.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 347f6c8fd..ea436ce40 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.199.0" # x-release-please-version +__version__ = "0.200.0" # x-release-please-version From 3b33e1bff5cfd07c73be2cc9881f4fbb632965fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 20:35:47 +0000 Subject: [PATCH 0459/1325] chore(internal): remove unused http client options forwarding (#1001) --- src/increase/_base_client.py | 97 +----------------------------------- 1 file changed, 1 insertion(+), 96 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 67dc8a43d..8e8b4ef29 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -9,7 +9,6 @@ import inspect import logging import platform -import warnings import email.utils from types import TracebackType from random import random @@ -36,7 +35,7 @@ import httpx import distro import pydantic -from httpx import URL, Limits +from httpx import URL from pydantic import PrivateAttr from . import _exceptions @@ -51,13 +50,10 @@ Timeout, NotGiven, ResponseT, - Transport, AnyMapping, PostParser, - ProxiesTypes, RequestFiles, HttpxSendArgs, - AsyncTransport, RequestOptions, HttpxRequestFiles, ModelBuilderProtocol, @@ -337,9 +333,6 @@ class BaseClient(Generic[_HttpxClientT, _DefaultStreamT]): _base_url: URL max_retries: int timeout: Union[float, Timeout, None] - _limits: httpx.Limits - _proxies: ProxiesTypes | None - _transport: Transport | AsyncTransport | None _strict_response_validation: bool _idempotency_header: str | None _default_stream_cls: type[_DefaultStreamT] | None = None @@ -352,9 +345,6 @@ def __init__( _strict_response_validation: bool, max_retries: int = DEFAULT_MAX_RETRIES, timeout: float | Timeout | None = DEFAULT_TIMEOUT, - limits: httpx.Limits, - transport: Transport | AsyncTransport | None, - proxies: ProxiesTypes | None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, ) -> None: @@ -362,9 +352,6 @@ def __init__( self._base_url = self._enforce_trailing_slash(URL(base_url)) self.max_retries = max_retries self.timeout = timeout - self._limits = limits - self._proxies = proxies - self._transport = transport self._custom_headers = custom_headers or {} self._custom_query = custom_query or {} self._strict_response_validation = _strict_response_validation @@ -800,46 +787,11 @@ def __init__( base_url: str | URL, max_retries: int = DEFAULT_MAX_RETRIES, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - transport: Transport | None = None, - proxies: ProxiesTypes | None = None, - limits: Limits | None = None, http_client: httpx.Client | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, _strict_response_validation: bool, ) -> None: - kwargs: dict[str, Any] = {} - if limits is not None: - warnings.warn( - "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") - else: - limits = DEFAULT_CONNECTION_LIMITS - - if transport is not None: - kwargs["transport"] = transport - warnings.warn( - "The `transport` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `transport`") - - if proxies is not None: - kwargs["proxies"] = proxies - warnings.warn( - "The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `proxies`") - if not is_given(timeout): # if the user passed in a custom http client with a non-default # timeout set then we use that timeout. @@ -860,12 +812,9 @@ def __init__( super().__init__( version=version, - limits=limits, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - proxies=proxies, base_url=base_url, - transport=transport, max_retries=max_retries, custom_query=custom_query, custom_headers=custom_headers, @@ -875,9 +824,6 @@ def __init__( base_url=base_url, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - limits=limits, - follow_redirects=True, - **kwargs, # type: ignore ) def is_closed(self) -> bool: @@ -1372,45 +1318,10 @@ def __init__( _strict_response_validation: bool, max_retries: int = DEFAULT_MAX_RETRIES, timeout: float | Timeout | None | NotGiven = NOT_GIVEN, - transport: AsyncTransport | None = None, - proxies: ProxiesTypes | None = None, - limits: Limits | None = None, http_client: httpx.AsyncClient | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, ) -> None: - kwargs: dict[str, Any] = {} - if limits is not None: - warnings.warn( - "The `connection_pool_limits` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `connection_pool_limits`") - else: - limits = DEFAULT_CONNECTION_LIMITS - - if transport is not None: - kwargs["transport"] = transport - warnings.warn( - "The `transport` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `transport`") - - if proxies is not None: - kwargs["proxies"] = proxies - warnings.warn( - "The `proxies` argument is deprecated. The `http_client` argument should be passed instead", - category=DeprecationWarning, - stacklevel=3, - ) - if http_client is not None: - raise ValueError("The `http_client` argument is mutually exclusive with `proxies`") - if not is_given(timeout): # if the user passed in a custom http client with a non-default # timeout set then we use that timeout. @@ -1432,11 +1343,8 @@ def __init__( super().__init__( version=version, base_url=base_url, - limits=limits, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - proxies=proxies, - transport=transport, max_retries=max_retries, custom_query=custom_query, custom_headers=custom_headers, @@ -1446,9 +1354,6 @@ def __init__( base_url=base_url, # cast to a valid type because mypy doesn't understand our type narrowing timeout=cast(Timeout, timeout), - limits=limits, - follow_redirects=True, - **kwargs, # type: ignore ) def is_closed(self) -> bool: From 3822f96125f290b142b618410e10cab08fe738d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:08:34 +0000 Subject: [PATCH 0460/1325] feat(api): api update (#1003) --- .stats.yml | 2 +- src/increase/resources/cards.py | 4 ++++ src/increase/types/card_list_params.py | 21 ++++++++++++++++++--- tests/api_resources/test_cards.py | 2 ++ 4 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 85960561b..b861b7f29 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8882da77555a843811f51c01d96a8a0f5dd36dc70de46bdf01a1e624807ba3a6.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a74a7c2c7897ef6df01004d4e776e33d166bad2206cf5e66152e30bba5a6807.yml diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index ae584b344..70c7b7e00 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -232,6 +232,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: card_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -278,6 +279,7 @@ def list( "cursor": cursor, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, card_list_params.CardListParams, ), @@ -525,6 +527,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: card_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -571,6 +574,7 @@ def list( "cursor": cursor, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, card_list_params.CardListParams, ), diff --git a/src/increase/types/card_list_params.py b/src/increase/types/card_list_params.py index 8042a2912..c1eef0f8c 100644 --- a/src/increase/types/card_list_params.py +++ b/src/increase/types/card_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime -from typing_extensions import Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["CardListParams", "CreatedAt"] +__all__ = ["CardListParams", "CreatedAt", "Status"] class CardListParams(TypedDict, total=False): @@ -34,6 +34,8 @@ class CardListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + status: Status + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -59,3 +61,16 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "disabled", "canceled"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 007a6d91a..ea7da68a8 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -187,6 +187,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, + status={"in": ["active"]}, ) assert_matches_type(SyncPage[Card], card, path=["response"]) @@ -420,6 +421,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, + status={"in": ["active"]}, ) assert_matches_type(AsyncPage[Card], card, path=["response"]) From 2b3fa17181fb1ee08c51c5c3d2c4b588078be57f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Mar 2025 21:10:14 +0000 Subject: [PATCH 0461/1325] chore(internal): version bump (#1004) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0e5f1cfb3..45e440e64 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.200.0" + ".": "0.201.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e9ca73d48..88d31bc8e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.200.0" +version = "0.201.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ea436ce40..a11ac61c3 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.200.0" # x-release-please-version +__version__ = "0.201.0" # x-release-please-version From 092a213be6ad32a73ff4937ce85097c189579dfc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 05:18:17 +0000 Subject: [PATCH 0462/1325] feat(api): api update (#1005) --- .stats.yml | 2 +- src/increase/types/check_transfer_create_params.py | 6 ------ tests/api_resources/test_check_transfers.py | 2 -- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index b861b7f29..9bb4654e7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a74a7c2c7897ef6df01004d4e776e33d166bad2206cf5e66152e30bba5a6807.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ecd02bb92f99f15ee369204923a50283b42c9f2e46ed88e437771916e8495214.yml diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 590973ad3..dc62de0c1 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -69,12 +69,6 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): line2: str """The second line of the address component of the check's destination address.""" - name: str - """The name component of the check's destination address. - - Defaults to the provided `recipient_name` parameter. - """ - class PhysicalCheckReturnAddress(TypedDict, total=False): city: Required[str] diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index a46c2089e..26b4e4407 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -45,7 +45,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "postal_code": "10045", "state": "NY", "line2": "x", - "name": "Ian Crease", }, "memo": "Check payment", "recipient_name": "Ian Crease", @@ -324,7 +323,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "postal_code": "10045", "state": "NY", "line2": "x", - "name": "Ian Crease", }, "memo": "Check payment", "recipient_name": "Ian Crease", From 9f2d7e7f419a82e8033d0f178a0dc8aa24b2bab9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 05:20:15 +0000 Subject: [PATCH 0463/1325] chore(internal): version bump (#1007) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 45e440e64..478aa79df 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.201.0" + ".": "0.202.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 88d31bc8e..6f0f93d58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.201.0" +version = "0.202.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a11ac61c3..417e99b03 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.201.0" # x-release-please-version +__version__ = "0.202.0" # x-release-please-version From e4dbf3f07ed3635adda80597883d311bed28247f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 19:55:32 +0000 Subject: [PATCH 0464/1325] feat(api): api update (#1008) --- .stats.yml | 2 +- src/increase/resources/simulations/card_authorizations.py | 4 ++++ src/increase/types/card_payment.py | 2 ++ src/increase/types/declined_transaction.py | 2 ++ .../types/simulations/card_authorization_create_params.py | 2 ++ 5 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 9bb4654e7..0d44f79e9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ecd02bb92f99f15ee369204923a50283b42c9f2e46ed88e437771916e8495214.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9321195a045645c8811a82a028c4dfa4d365efbe1dfe47107a4a5b23679609cd.yml diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 2ff7b86d7..81fc40c65 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -55,6 +55,7 @@ def create( decline_reason: Literal[ "account_closed", "card_not_active", + "card_canceled", "physical_card_not_active", "entity_not_active", "group_locked", @@ -114,6 +115,7 @@ def create( - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. - `group_locked` - The account was inactive. @@ -245,6 +247,7 @@ async def create( decline_reason: Literal[ "account_closed", "card_not_active", + "card_canceled", "physical_card_not_active", "entity_not_active", "group_locked", @@ -304,6 +307,7 @@ async def create( - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. - `group_locked` - The account was inactive. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 236e444fd..ffe464848 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1039,6 +1039,7 @@ class ElementCardDecline(BaseModel): reason: Literal[ "account_closed", "card_not_active", + "card_canceled", "physical_card_not_active", "entity_not_active", "group_locked", @@ -1058,6 +1059,7 @@ class ElementCardDecline(BaseModel): - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. - `group_locked` - The account was inactive. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 8faa51eb3..246058e02 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -500,6 +500,7 @@ class SourceCardDecline(BaseModel): reason: Literal[ "account_closed", "card_not_active", + "card_canceled", "physical_card_not_active", "entity_not_active", "group_locked", @@ -519,6 +520,7 @@ class SourceCardDecline(BaseModel): - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. - `group_locked` - The account was inactive. diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 323a950b4..29203d2ae 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -23,6 +23,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): decline_reason: Literal[ "account_closed", "card_not_active", + "card_canceled", "physical_card_not_active", "entity_not_active", "group_locked", @@ -44,6 +45,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): - `account_closed` - The account has been closed. - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. - `physical_card_not_active` - The Physical Card was not active. - `entity_not_active` - The account's entity was not active. - `group_locked` - The account was inactive. From 519f1c6836ffbd0fa89ba9787f385c0927de6fda Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Mar 2025 19:57:14 +0000 Subject: [PATCH 0465/1325] chore(internal): version bump (#1010) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 478aa79df..cd23ac9ab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.202.0" + ".": "0.203.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6f0f93d58..9a6066869 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.202.0" +version = "0.203.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 417e99b03..e432941ce 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.202.0" # x-release-please-version +__version__ = "0.203.0" # x-release-please-version From ab8027cc7a29e1470a02cf5c32a45c4d7f518007 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Mar 2025 02:54:12 +0000 Subject: [PATCH 0466/1325] feat(api): api update (#1011) --- .stats.yml | 4 +- api.md | 14 - src/increase/_client.py | 31 -- src/increase/resources/__init__.py | 14 - ...real_time_payments_request_for_payments.py | 479 ------------------ src/increase/types/__init__.py | 9 - .../real_time_payments_request_for_payment.py | 245 --------- ...ments_request_for_payment_create_params.py | 62 --- ...ayments_request_for_payment_list_params.py | 64 --- ...real_time_payments_request_for_payments.py | 344 ------------- 10 files changed, 2 insertions(+), 1264 deletions(-) delete mode 100644 src/increase/resources/real_time_payments_request_for_payments.py delete mode 100644 src/increase/types/real_time_payments_request_for_payment.py delete mode 100644 src/increase/types/real_time_payments_request_for_payment_create_params.py delete mode 100644 src/increase/types/real_time_payments_request_for_payment_list_params.py delete mode 100644 tests/api_resources/test_real_time_payments_request_for_payments.py diff --git a/.stats.yml b/.stats.yml index 0d44f79e9..415878013 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9321195a045645c8811a82a028c4dfa4d365efbe1dfe47107a4a5b23679609cd.yml +configured_endpoints: 198 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6283b1811e024111b7521ae87507e4a47c25c01083f6171958712bd60df23af2.yml diff --git a/api.md b/api.md index f3b442442..29e74d846 100644 --- a/api.md +++ b/api.md @@ -734,20 +734,6 @@ Methods: - client.intrafi_exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] - client.intrafi_exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion -# RealTimePaymentsRequestForPayments - -Types: - -```python -from increase.types import RealTimePaymentsRequestForPayment -``` - -Methods: - -- client.real_time_payments_request_for_payments.create(\*\*params) -> RealTimePaymentsRequestForPayment -- client.real_time_payments_request_for_payments.retrieve(request_for_payment_id) -> RealTimePaymentsRequestForPayment -- client.real_time_payments_request_for_payments.list(\*\*params) -> SyncPage[RealTimePaymentsRequestForPayment] - # Simulations ## InterestPayments diff --git a/src/increase/_client.py b/src/increase/_client.py index 17ea2ecd7..d9b1ab59f 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -77,7 +77,6 @@ inbound_wire_drawdown_requests, proof_of_authorization_requests, inbound_real_time_payments_transfers, - real_time_payments_request_for_payments, proof_of_authorization_request_submissions, ) from ._streaming import Stream as Stream, AsyncStream as AsyncStream @@ -162,9 +161,6 @@ class Increase(SyncAPIClient): intrafi_account_enrollments: intrafi_account_enrollments.IntrafiAccountEnrollmentsResource intrafi_balances: intrafi_balances.IntrafiBalancesResource intrafi_exclusions: intrafi_exclusions.IntrafiExclusionsResource - real_time_payments_request_for_payments: ( - real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResource - ) simulations: simulations.SimulationsResource with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -315,9 +311,6 @@ def __init__( self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResource(self) self.intrafi_balances = intrafi_balances.IntrafiBalancesResource(self) self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResource(self) - self.real_time_payments_request_for_payments = ( - real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResource(self) - ) self.simulations = simulations.SimulationsResource(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -533,9 +526,6 @@ class AsyncIncrease(AsyncAPIClient): intrafi_account_enrollments: intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource intrafi_balances: intrafi_balances.AsyncIntrafiBalancesResource intrafi_exclusions: intrafi_exclusions.AsyncIntrafiExclusionsResource - real_time_payments_request_for_payments: ( - real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResource - ) simulations: simulations.AsyncSimulationsResource with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -688,9 +678,6 @@ def __init__( self.intrafi_account_enrollments = intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource(self) self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResource(self) self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResource(self) - self.real_time_payments_request_for_payments = ( - real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResource(self) - ) self.simulations = simulations.AsyncSimulationsResource(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -959,11 +946,6 @@ def __init__(self, client: Increase) -> None: ) self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.real_time_payments_request_for_payments = ( - real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) self.simulations = simulations.SimulationsResourceWithRawResponse(client.simulations) @@ -1091,11 +1073,6 @@ def __init__(self, client: AsyncIncrease) -> None: self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithRawResponse( client.intrafi_exclusions ) - self.real_time_payments_request_for_payments = ( - real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse( - client.real_time_payments_request_for_payments - ) - ) self.simulations = simulations.AsyncSimulationsResourceWithRawResponse(client.simulations) @@ -1223,11 +1200,6 @@ def __init__(self, client: Increase) -> None: self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithStreamingResponse( client.intrafi_exclusions ) - self.real_time_payments_request_for_payments = ( - real_time_payments_request_for_payments.RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) - ) self.simulations = simulations.SimulationsResourceWithStreamingResponse(client.simulations) @@ -1359,9 +1331,6 @@ def __init__(self, client: AsyncIncrease) -> None: self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithStreamingResponse( client.intrafi_exclusions ) - self.real_time_payments_request_for_payments = real_time_payments_request_for_payments.AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse( - client.real_time_payments_request_for_payments - ) self.simulations = simulations.AsyncSimulationsResourceWithStreamingResponse(client.simulations) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 660cebca4..a3ef98738 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -416,14 +416,6 @@ InboundRealTimePaymentsTransfersResourceWithStreamingResponse, AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) -from .real_time_payments_request_for_payments import ( - RealTimePaymentsRequestForPaymentsResource, - AsyncRealTimePaymentsRequestForPaymentsResource, - RealTimePaymentsRequestForPaymentsResourceWithRawResponse, - AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse, - RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, - AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse, -) from .proof_of_authorization_request_submissions import ( ProofOfAuthorizationRequestSubmissionsResource, AsyncProofOfAuthorizationRequestSubmissionsResource, @@ -746,12 +738,6 @@ "AsyncIntrafiExclusionsResourceWithRawResponse", "IntrafiExclusionsResourceWithStreamingResponse", "AsyncIntrafiExclusionsResourceWithStreamingResponse", - "RealTimePaymentsRequestForPaymentsResource", - "AsyncRealTimePaymentsRequestForPaymentsResource", - "RealTimePaymentsRequestForPaymentsResourceWithRawResponse", - "AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse", - "RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", - "AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse", "SimulationsResource", "AsyncSimulationsResource", "SimulationsResourceWithRawResponse", diff --git a/src/increase/resources/real_time_payments_request_for_payments.py b/src/increase/resources/real_time_payments_request_for_payments.py deleted file mode 100644 index 15bcc1835..000000000 --- a/src/increase/resources/real_time_payments_request_for_payments.py +++ /dev/null @@ -1,479 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import date - -import httpx - -from ..types import ( - real_time_payments_request_for_payment_list_params, - real_time_payments_request_for_payment_create_params, -) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.real_time_payments_request_for_payment import RealTimePaymentsRequestForPayment - -__all__ = ["RealTimePaymentsRequestForPaymentsResource", "AsyncRealTimePaymentsRequestForPaymentsResource"] - - -class RealTimePaymentsRequestForPaymentsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return RealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) - - def create( - self, - *, - amount: int, - debtor: real_time_payments_request_for_payment_create_params.Debtor, - destination_account_number_id: str, - expires_at: Union[str, date], - remittance_information: str, - source_account_number: str, - source_routing_number: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> RealTimePaymentsRequestForPayment: - """ - Create a Real-Time Payments Request for Payment - - Args: - amount: The requested amount in USD cents. Must be positive. - - debtor: Details of the person being requested to pay. - - destination_account_number_id: The identifier of the Account Number where the funds will land. - - expires_at: The expiration time for this request, in UTC. The requestee will not be able to - pay after this date. - - remittance_information: Unstructured information that will show on the requestee's bank statement. - - source_account_number: The account number the funds will be requested from. - - source_routing_number: The requestee's American Bankers' Association (ABA) Routing Transit Number - (RTN). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/real_time_payments_request_for_payments", - body=maybe_transform( - { - "amount": amount, - "debtor": debtor, - "destination_account_number_id": destination_account_number_id, - "expires_at": expires_at, - "remittance_information": remittance_information, - "source_account_number": source_account_number, - "source_routing_number": source_routing_number, - }, - real_time_payments_request_for_payment_create_params.RealTimePaymentsRequestForPaymentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=RealTimePaymentsRequestForPayment, - ) - - def retrieve( - self, - request_for_payment_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RealTimePaymentsRequestForPayment: - """ - Retrieve a Real-Time Payments Request for Payment - - Args: - request_for_payment_id: The identifier of the Real-Time Payments Request for Payment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not request_for_payment_id: - raise ValueError( - f"Expected a non-empty value for `request_for_payment_id` but received {request_for_payment_id!r}" - ) - return self._get( - f"/real_time_payments_request_for_payments/{request_for_payment_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=RealTimePaymentsRequestForPayment, - ) - - def list( - self, - *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: real_time_payments_request_for_payment_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[RealTimePaymentsRequestForPayment]: - """ - List Real-Time Payments Request for Payments - - Args: - account_id: Filter Real-Time Payments Request for Payments to those destined to the - specified Account. - - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/real_time_payments_request_for_payments", - page=SyncPage[RealTimePaymentsRequestForPayment], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "account_id": account_id, - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - }, - real_time_payments_request_for_payment_list_params.RealTimePaymentsRequestForPaymentListParams, - ), - ), - model=RealTimePaymentsRequestForPayment, - ) - - -class AsyncRealTimePaymentsRequestForPaymentsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse(self) - - async def create( - self, - *, - amount: int, - debtor: real_time_payments_request_for_payment_create_params.Debtor, - destination_account_number_id: str, - expires_at: Union[str, date], - remittance_information: str, - source_account_number: str, - source_routing_number: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> RealTimePaymentsRequestForPayment: - """ - Create a Real-Time Payments Request for Payment - - Args: - amount: The requested amount in USD cents. Must be positive. - - debtor: Details of the person being requested to pay. - - destination_account_number_id: The identifier of the Account Number where the funds will land. - - expires_at: The expiration time for this request, in UTC. The requestee will not be able to - pay after this date. - - remittance_information: Unstructured information that will show on the requestee's bank statement. - - source_account_number: The account number the funds will be requested from. - - source_routing_number: The requestee's American Bankers' Association (ABA) Routing Transit Number - (RTN). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/real_time_payments_request_for_payments", - body=await async_maybe_transform( - { - "amount": amount, - "debtor": debtor, - "destination_account_number_id": destination_account_number_id, - "expires_at": expires_at, - "remittance_information": remittance_information, - "source_account_number": source_account_number, - "source_routing_number": source_routing_number, - }, - real_time_payments_request_for_payment_create_params.RealTimePaymentsRequestForPaymentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=RealTimePaymentsRequestForPayment, - ) - - async def retrieve( - self, - request_for_payment_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> RealTimePaymentsRequestForPayment: - """ - Retrieve a Real-Time Payments Request for Payment - - Args: - request_for_payment_id: The identifier of the Real-Time Payments Request for Payment. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not request_for_payment_id: - raise ValueError( - f"Expected a non-empty value for `request_for_payment_id` but received {request_for_payment_id!r}" - ) - return await self._get( - f"/real_time_payments_request_for_payments/{request_for_payment_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=RealTimePaymentsRequestForPayment, - ) - - def list( - self, - *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: real_time_payments_request_for_payment_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[RealTimePaymentsRequestForPayment, AsyncPage[RealTimePaymentsRequestForPayment]]: - """ - List Real-Time Payments Request for Payments - - Args: - account_id: Filter Real-Time Payments Request for Payments to those destined to the - specified Account. - - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/real_time_payments_request_for_payments", - page=AsyncPage[RealTimePaymentsRequestForPayment], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "account_id": account_id, - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - }, - real_time_payments_request_for_payment_list_params.RealTimePaymentsRequestForPaymentListParams, - ), - ), - model=RealTimePaymentsRequestForPayment, - ) - - -class RealTimePaymentsRequestForPaymentsResourceWithRawResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: - self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - - self.create = to_raw_response_wrapper( - real_time_payments_request_for_payments.create, - ) - self.retrieve = to_raw_response_wrapper( - real_time_payments_request_for_payments.retrieve, - ) - self.list = to_raw_response_wrapper( - real_time_payments_request_for_payments.list, - ) - - -class AsyncRealTimePaymentsRequestForPaymentsResourceWithRawResponse: - def __init__( - self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource - ) -> None: - self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - - self.create = async_to_raw_response_wrapper( - real_time_payments_request_for_payments.create, - ) - self.retrieve = async_to_raw_response_wrapper( - real_time_payments_request_for_payments.retrieve, - ) - self.list = async_to_raw_response_wrapper( - real_time_payments_request_for_payments.list, - ) - - -class RealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - def __init__(self, real_time_payments_request_for_payments: RealTimePaymentsRequestForPaymentsResource) -> None: - self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - - self.create = to_streamed_response_wrapper( - real_time_payments_request_for_payments.create, - ) - self.retrieve = to_streamed_response_wrapper( - real_time_payments_request_for_payments.retrieve, - ) - self.list = to_streamed_response_wrapper( - real_time_payments_request_for_payments.list, - ) - - -class AsyncRealTimePaymentsRequestForPaymentsResourceWithStreamingResponse: - def __init__( - self, real_time_payments_request_for_payments: AsyncRealTimePaymentsRequestForPaymentsResource - ) -> None: - self._real_time_payments_request_for_payments = real_time_payments_request_for_payments - - self.create = async_to_streamed_response_wrapper( - real_time_payments_request_for_payments.create, - ) - self.retrieve = async_to_streamed_response_wrapper( - real_time_payments_request_for_payments.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - real_time_payments_request_for_payments.list, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index da9db5702..71a969901 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -151,9 +151,6 @@ from .intrafi_account_enrollment_list_params import ( IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, ) -from .real_time_payments_request_for_payment import ( - RealTimePaymentsRequestForPayment as RealTimePaymentsRequestForPayment, -) from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) @@ -181,12 +178,6 @@ from .inbound_real_time_payments_transfer_list_params import ( InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, ) -from .real_time_payments_request_for_payment_list_params import ( - RealTimePaymentsRequestForPaymentListParams as RealTimePaymentsRequestForPaymentListParams, -) -from .real_time_payments_request_for_payment_create_params import ( - RealTimePaymentsRequestForPaymentCreateParams as RealTimePaymentsRequestForPaymentCreateParams, -) from .proof_of_authorization_request_submission_list_params import ( ProofOfAuthorizationRequestSubmissionListParams as ProofOfAuthorizationRequestSubmissionListParams, ) diff --git a/src/increase/types/real_time_payments_request_for_payment.py b/src/increase/types/real_time_payments_request_for_payment.py deleted file mode 100644 index a9dff0165..000000000 --- a/src/increase/types/real_time_payments_request_for_payment.py +++ /dev/null @@ -1,245 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import date, datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["RealTimePaymentsRequestForPayment", "Refusal", "Rejection", "Submission"] - - -class Refusal(BaseModel): - refusal_reason_code: Literal[ - "account_blocked", - "transaction_forbidden", - "transaction_type_not_supported", - "unexpected_amount", - "amount_exceeds_bank_limits", - "invalid_debtor_address", - "invalid_creditor_address", - "creditor_identifier_incorrect", - "requested_by_customer", - "order_rejected", - "end_customer_deceased", - "customer_has_opted_out", - "other", - ] - """ - The reason the request for payment was refused as provided by the recipient bank - or the customer. - - - `account_blocked` - The destination account is currently blocked from - receiving transactions. Corresponds to the Real-Time Payments reason code - `AC06`. - - `transaction_forbidden` - Real-Time Payments transfers are not allowed to the - destination account. Corresponds to the Real-Time Payments reason code `AG01`. - - `transaction_type_not_supported` - Real-Time Payments transfers are not - enabled for the destination account. Corresponds to the Real-Time Payments - reason code `AG03`. - - `unexpected_amount` - The amount of the transfer is different than expected by - the recipient. Corresponds to the Real-Time Payments reason code `AM09`. - - `amount_exceeds_bank_limits` - The amount is higher than the recipient is - authorized to send or receive. Corresponds to the Real-Time Payments reason - code `AM14`. - - `invalid_debtor_address` - The debtor's address is required, but missing or - invalid. Corresponds to the Real-Time Payments reason code `BE07`. - - `invalid_creditor_address` - The creditor's address is required, but missing - or invalid. Corresponds to the Real-Time Payments reason code `BE04`. - - `creditor_identifier_incorrect` - Creditor identifier incorrect. Corresponds - to the Real-Time Payments reason code `CH11`. - - `requested_by_customer` - The customer refused the request. Corresponds to the - Real-Time Payments reason code `CUST`. - - `order_rejected` - The order was rejected. Corresponds to the Real-Time - Payments reason code `DS04`. - - `end_customer_deceased` - The destination account holder is deceased. - Corresponds to the Real-Time Payments reason code `MD07`. - - `customer_has_opted_out` - The customer has opted out of receiving requests - for payments from this creditor. Corresponds to the Real-Time Payments reason - code `SL12`. - - `other` - Some other error or issue has occurred. - """ - - -class Rejection(BaseModel): - reject_reason_code: Literal[ - "account_closed", - "account_blocked", - "invalid_creditor_account_type", - "invalid_creditor_account_number", - "invalid_creditor_financial_institution_identifier", - "end_customer_deceased", - "narrative", - "transaction_forbidden", - "transaction_type_not_supported", - "unexpected_amount", - "amount_exceeds_bank_limits", - "invalid_creditor_address", - "unknown_end_customer", - "invalid_debtor_address", - "timeout", - "unsupported_message_for_recipient", - "recipient_connection_not_available", - "real_time_payments_suspended", - "instructed_agent_signed_off", - "processing_error", - "other", - ] - """ - The reason the request for payment was rejected as provided by the recipient - bank or the Real-Time Payments network. - - - `account_closed` - The destination account is closed. Corresponds to the - Real-Time Payments reason code `AC04`. - - `account_blocked` - The destination account is currently blocked from - receiving transactions. Corresponds to the Real-Time Payments reason code - `AC06`. - - `invalid_creditor_account_type` - The destination account is ineligible to - receive Real-Time Payments transfers. Corresponds to the Real-Time Payments - reason code `AC14`. - - `invalid_creditor_account_number` - The destination account does not exist. - Corresponds to the Real-Time Payments reason code `AC03`. - - `invalid_creditor_financial_institution_identifier` - The destination routing - number is invalid. Corresponds to the Real-Time Payments reason code `RC04`. - - `end_customer_deceased` - The destination account holder is deceased. - Corresponds to the Real-Time Payments reason code `MD07`. - - `narrative` - The reason is provided as narrative information in the - additional information field. - - `transaction_forbidden` - Real-Time Payments transfers are not allowed to the - destination account. Corresponds to the Real-Time Payments reason code `AG01`. - - `transaction_type_not_supported` - Real-Time Payments transfers are not - enabled for the destination account. Corresponds to the Real-Time Payments - reason code `AG03`. - - `unexpected_amount` - The amount of the transfer is different than expected by - the recipient. Corresponds to the Real-Time Payments reason code `AM09`. - - `amount_exceeds_bank_limits` - The amount is higher than the recipient is - authorized to send or receive. Corresponds to the Real-Time Payments reason - code `AM14`. - - `invalid_creditor_address` - The creditor's address is required, but missing - or invalid. Corresponds to the Real-Time Payments reason code `BE04`. - - `unknown_end_customer` - The specified creditor is unknown. Corresponds to the - Real-Time Payments reason code `BE06`. - - `invalid_debtor_address` - The debtor's address is required, but missing or - invalid. Corresponds to the Real-Time Payments reason code `BE07`. - - `timeout` - There was a timeout processing the transfer. Corresponds to the - Real-Time Payments reason code `DS24`. - - `unsupported_message_for_recipient` - Real-Time Payments transfers are not - enabled for the destination account. Corresponds to the Real-Time Payments - reason code `NOAT`. - - `recipient_connection_not_available` - The destination financial institution - is currently not connected to Real-Time Payments. Corresponds to the Real-Time - Payments reason code `9912`. - - `real_time_payments_suspended` - Real-Time Payments is currently unavailable. - Corresponds to the Real-Time Payments reason code `9948`. - - `instructed_agent_signed_off` - The destination financial institution is - currently signed off of Real-Time Payments. Corresponds to the Real-Time - Payments reason code `9910`. - - `processing_error` - The transfer was rejected due to an internal Increase - issue. We have been notified. - - `other` - Some other error or issue has occurred. - """ - - -class Submission(BaseModel): - payment_information_identification: str - """The Real-Time Payments payment information identification of the request.""" - - -class RealTimePaymentsRequestForPayment(BaseModel): - id: str - """The Real-Time Payments Request for Payment's identifier.""" - - amount: int - """The transfer amount in USD cents.""" - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the request for payment was created. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's - currency. For real-time payments transfers this is always equal to `USD`. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_name: str - """The name of the recipient the sender is requesting a transfer from.""" - - destination_account_number_id: str - """The Account Number in which a successful transfer will arrive.""" - - expires_at: date - """The expiration time for this request, in UTC. - - The requestee will not be able to pay after this date. - """ - - fulfillment_transaction_id: Optional[str] = None - """The transaction that fulfilled this request.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - refusal: Optional[Refusal] = None - """ - If the request for payment is refused by the destination financial institution - or the receiving customer, this will contain supplemental details. - """ - - rejection: Optional[Rejection] = None - """ - If the request for payment is rejected by Real-Time Payments or the destination - financial institution, this will contain supplemental details. - """ - - remittance_information: str - """Unstructured information that will show on the recipient's bank statement.""" - - source_account_number: str - """The account number the request is sent to.""" - - source_routing_number: str - """ - The receiver's American Bankers' Association (ABA) Routing Transit Number (RTN). - """ - - status: Literal["pending_submission", "pending_response", "rejected", "accepted", "refused", "fulfilled"] - """The lifecycle status of the request for payment. - - - `pending_submission` - The request for payment is queued to be submitted to - Real-Time Payments. - - `pending_response` - The request for payment has been submitted and is pending - a response from Real-Time Payments. - - `rejected` - The request for payment was rejected by the network or the - recipient. - - `accepted` - The request for payment was accepted by the recipient but has not - yet been paid. - - `refused` - The request for payment was refused by the recipient. - - `fulfilled` - The request for payment was fulfilled by the receiver. - """ - - submission: Optional[Submission] = None - """ - After the request for payment is submitted to Real-Time Payments, this will - contain supplemental details. - """ - - type: Literal["real_time_payments_request_for_payment"] - """A constant representing the object's type. - - For this resource it will always be `real_time_payments_request_for_payment`. - """ diff --git a/src/increase/types/real_time_payments_request_for_payment_create_params.py b/src/increase/types/real_time_payments_request_for_payment_create_params.py deleted file mode 100644 index f179faa09..000000000 --- a/src/increase/types/real_time_payments_request_for_payment_create_params.py +++ /dev/null @@ -1,62 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import date -from typing_extensions import Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["RealTimePaymentsRequestForPaymentCreateParams", "Debtor", "DebtorAddress"] - - -class RealTimePaymentsRequestForPaymentCreateParams(TypedDict, total=False): - amount: Required[int] - """The requested amount in USD cents. Must be positive.""" - - debtor: Required[Debtor] - """Details of the person being requested to pay.""" - - destination_account_number_id: Required[str] - """The identifier of the Account Number where the funds will land.""" - - expires_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] - """The expiration time for this request, in UTC. - - The requestee will not be able to pay after this date. - """ - - remittance_information: Required[str] - """Unstructured information that will show on the requestee's bank statement.""" - - source_account_number: Required[str] - """The account number the funds will be requested from.""" - - source_routing_number: Required[str] - """ - The requestee's American Bankers' Association (ABA) Routing Transit Number - (RTN). - """ - - -class DebtorAddress(TypedDict, total=False): - country: Required[str] - """The ISO 3166, Alpha-2 country code.""" - - city: str - """The town or city.""" - - post_code: str - """The postal code or zip.""" - - street_name: str - """The street name without the street number.""" - - -class Debtor(TypedDict, total=False): - address: Required[DebtorAddress] - """Address of the debtor.""" - - name: Required[str] - """The name of the debtor.""" diff --git a/src/increase/types/real_time_payments_request_for_payment_list_params.py b/src/increase/types/real_time_payments_request_for_payment_list_params.py deleted file mode 100644 index 51749cf2a..000000000 --- a/src/increase/types/real_time_payments_request_for_payment_list_params.py +++ /dev/null @@ -1,64 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["RealTimePaymentsRequestForPaymentListParams", "CreatedAt"] - - -class RealTimePaymentsRequestForPaymentListParams(TypedDict, total=False): - account_id: str - """ - Filter Real-Time Payments Request for Payments to those destined to the - specified Account. - """ - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - idempotency_key: str - """ - Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ diff --git a/tests/api_resources/test_real_time_payments_request_for_payments.py b/tests/api_resources/test_real_time_payments_request_for_payments.py deleted file mode 100644 index b429eecf6..000000000 --- a/tests/api_resources/test_real_time_payments_request_for_payments.py +++ /dev/null @@ -1,344 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ( - RealTimePaymentsRequestForPayment, -) -from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestRealTimePaymentsRequestForPayments: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.real_time_payments_request_for_payments.with_raw_response.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.real_time_payments_request_for_payments.with_streaming_response.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.retrieve( - "request_for_payment_id", - ) - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "request_for_payment_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.real_time_payments_request_for_payments.with_streaming_response.retrieve( - "request_for_payment_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `request_for_payment_id` but received ''" - ): - client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.list() - assert_matches_type( - SyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - real_time_payments_request_for_payment = client.real_time_payments_request_for_payments.list( - account_id="account_id", - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - ) - assert_matches_type( - SyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.real_time_payments_request_for_payments.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - SyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.real_time_payments_request_for_payments.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = response.parse() - assert_matches_type( - SyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncRealTimePaymentsRequestForPayments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.real_time_payments_request_for_payments.with_raw_response.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.real_time_payments_request_for_payments.with_streaming_response.create( - amount=100, - debtor={ - "address": {"country": "US"}, - "name": "Ian Crease", - }, - destination_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - expires_at=parse_date("2026-12-31"), - remittance_information="Invoice 29582", - source_account_number="987654321", - source_routing_number="101050001", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.retrieve( - "request_for_payment_id", - ) - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "request_for_payment_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.real_time_payments_request_for_payments.with_streaming_response.retrieve( - "request_for_payment_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - RealTimePaymentsRequestForPayment, real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `request_for_payment_id` but received ''" - ): - await async_client.real_time_payments_request_for_payments.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.list() - assert_matches_type( - AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - real_time_payments_request_for_payment = await async_client.real_time_payments_request_for_payments.list( - account_id="account_id", - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - ) - assert_matches_type( - AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.real_time_payments_request_for_payments.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.real_time_payments_request_for_payments.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - real_time_payments_request_for_payment = await response.parse() - assert_matches_type( - AsyncPage[RealTimePaymentsRequestForPayment], real_time_payments_request_for_payment, path=["response"] - ) - - assert cast(Any, response.is_closed) is True From 57e84139198c220f73a31129ac9de9316600dfbc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 01:07:43 +0000 Subject: [PATCH 0467/1325] test: add DEFER_PYDANTIC_BUILD=false flag to tests (#1013) --- scripts/test | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/test b/scripts/test index 4fa5698b8..2b8784567 100755 --- a/scripts/test +++ b/scripts/test @@ -52,6 +52,8 @@ else echo fi +export DEFER_PYDANTIC_BUILD=false + echo "==> Running tests" rye run pytest "$@" From f82c0e05ff7607a72422894b0003aed20e843308 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 04:51:55 +0000 Subject: [PATCH 0468/1325] feat(api): api update (#1014) --- .stats.yml | 2 +- src/increase/types/check_transfer_create_params.py | 8 ++++++++ tests/api_resources/test_check_transfers.py | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 415878013..a08326a76 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6283b1811e024111b7521ae87507e4a47c25c01083f6171958712bd60df23af2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-82672744c336fb928794ae216fe177d65ad3b762159a39fb972612d991f01c81.yml diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index dc62de0c1..2e44ed237 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -100,6 +100,14 @@ class PhysicalCheck(TypedDict, total=False): recipient_name: Required[str] """The name that will be printed on the check in the 'To:' field.""" + check_number: str + """The check number Increase should print on the check. + + This should not contain leading zeroes and must be unique across the + `source_account_number`. If this is omitted, Increase will generate a check + number for you. + """ + note: str """The descriptor that will be printed on the letter included with the check.""" diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 26b4e4407..2d1da7a4f 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -48,6 +48,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, "memo": "Check payment", "recipient_name": "Ian Crease", + "check_number": "x", "note": "x", "return_address": { "city": "x", @@ -326,6 +327,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, "memo": "Check payment", "recipient_name": "Ian Crease", + "check_number": "x", "note": "x", "return_address": { "city": "x", From 96f624c211a5349f851c3b3157bc83eff46ae2e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Mar 2025 14:08:02 +0000 Subject: [PATCH 0469/1325] chore(internal): version bump (#1016) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cd23ac9ab..544c63271 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.203.0" + ".": "0.204.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9a6066869..b3136dd19 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.203.0" +version = "0.204.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e432941ce..ff67b2c83 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.203.0" # x-release-please-version +__version__ = "0.204.0" # x-release-please-version From 6d50c0b2b31ab82d805832f8f4153fa669f17656 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 02:12:02 +0000 Subject: [PATCH 0470/1325] feat(api): api update (#1017) --- .stats.yml | 2 +- src/increase/resources/check_transfers.py | 4 +++ .../types/check_transfer_list_params.py | 34 +++++++++++++++++-- tests/api_resources/test_check_transfers.py | 2 ++ 4 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index a08326a76..b219e9a3a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-82672744c336fb928794ae216fe177d65ad3b762159a39fb972612d991f01c81.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c09f0dfa89faafa23f31631468c822ada82b0ab08a1661ce7ee2e47fd78e575c.yml diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 0d2a96d94..83364c819 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -174,6 +174,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -220,6 +221,7 @@ def list( "cursor": cursor, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, check_transfer_list_params.CheckTransferListParams, ), @@ -505,6 +507,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -551,6 +554,7 @@ def list( "cursor": cursor, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, check_transfer_list_params.CheckTransferListParams, ), diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py index 4ec86b6d4..2f8ccf2c3 100644 --- a/src/increase/types/check_transfer_list_params.py +++ b/src/increase/types/check_transfer_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime -from typing_extensions import Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["CheckTransferListParams", "CreatedAt"] +__all__ = ["CheckTransferListParams", "CreatedAt", "Status"] class CheckTransferListParams(TypedDict, total=False): @@ -34,6 +34,8 @@ class CheckTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + status: Status + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -59,3 +61,29 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "canceled", + "pending_submission", + "requires_attention", + "rejected", + "pending_mailing", + "mailed", + "deposited", + "stopped", + "returned", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 2d1da7a4f..03ed3dc18 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -151,6 +151,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) @@ -430,6 +431,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) From 185546876f63e44c082f7b80c6982775d1911ec8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Mar 2025 02:13:45 +0000 Subject: [PATCH 0471/1325] chore(internal): version bump (#1019) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 544c63271..022b8de78 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.204.0" + ".": "0.205.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b3136dd19..94a47e0e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.204.0" +version = "0.205.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ff67b2c83..9fcd0556a 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.204.0" # x-release-please-version +__version__ = "0.205.0" # x-release-please-version From e09a4a6e8c18bd3e35d08ecb8bb1454c7021932e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 16:47:09 +0000 Subject: [PATCH 0472/1325] chore(internal): remove extra empty newlines (#1020) --- pyproject.toml | 2 -- 1 file changed, 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 94a47e0e8..54d7dff58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,6 @@ Homepage = "https://github.com/Increase/increase-python" Repository = "https://github.com/Increase/increase-python" - [tool.rye] managed = true # version pins are in requirements-dev.lock @@ -152,7 +151,6 @@ reportImplicitOverride = true reportImportCycles = false reportPrivateUsage = false - [tool.ruff] line-length = 120 output-format = "grouped" From e068aa45ccbac6530a556eae4d67c3366e1d62a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Mar 2025 22:38:07 +0000 Subject: [PATCH 0473/1325] feat(api): api update (#1022) --- .stats.yml | 2 +- .../resources/simulations/interest_payments.py | 12 ++++++++++-- .../simulations/interest_payment_create_params.py | 8 +++++++- .../simulations/test_interest_payments.py | 2 ++ 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index b219e9a3a..3b32bb026 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c09f0dfa89faafa23f31631468c822ada82b0ab08a1661ce7ee2e47fd78e575c.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9c95b020510d1ae7d912fa71032eb2fef43dacfb6ee2ba7b989f18ed8d0a9348.yml diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index fde1548d3..074e86213 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -52,6 +52,7 @@ def create( *, account_id: str, amount: int, + accrued_on_account_id: str | NotGiven = NOT_GIVEN, period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -68,10 +69,12 @@ def create( automatically on the first of each month. Args: - account_id: The identifier of the Account Number the Interest Payment is for. + account_id: The identifier of the Account the Interest Payment should be paid to is for. amount: The interest amount in cents. Must be positive. + accrued_on_account_id: The identifier of the Account the Interest accrued on. Defaults to `account_id`. + period_end: The end of the interest period. If not provided, defaults to the current time. period_start: The start of the interest period. If not provided, defaults to the current time. @@ -92,6 +95,7 @@ def create( { "account_id": account_id, "amount": amount, + "accrued_on_account_id": accrued_on_account_id, "period_end": period_end, "period_start": period_start, }, @@ -133,6 +137,7 @@ async def create( *, account_id: str, amount: int, + accrued_on_account_id: str | NotGiven = NOT_GIVEN, period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -149,10 +154,12 @@ async def create( automatically on the first of each month. Args: - account_id: The identifier of the Account Number the Interest Payment is for. + account_id: The identifier of the Account the Interest Payment should be paid to is for. amount: The interest amount in cents. Must be positive. + accrued_on_account_id: The identifier of the Account the Interest accrued on. Defaults to `account_id`. + period_end: The end of the interest period. If not provided, defaults to the current time. period_start: The start of the interest period. If not provided, defaults to the current time. @@ -173,6 +180,7 @@ async def create( { "account_id": account_id, "amount": amount, + "accrued_on_account_id": accrued_on_account_id, "period_end": period_end, "period_start": period_start, }, diff --git a/src/increase/types/simulations/interest_payment_create_params.py b/src/increase/types/simulations/interest_payment_create_params.py index a180e1eae..6659005dd 100644 --- a/src/increase/types/simulations/interest_payment_create_params.py +++ b/src/increase/types/simulations/interest_payment_create_params.py @@ -13,11 +13,17 @@ class InterestPaymentCreateParams(TypedDict, total=False): account_id: Required[str] - """The identifier of the Account Number the Interest Payment is for.""" + """The identifier of the Account the Interest Payment should be paid to is for.""" amount: Required[int] """The interest amount in cents. Must be positive.""" + accrued_on_account_id: str + """The identifier of the Account the Interest accrued on. + + Defaults to `account_id`. + """ + period_end: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The end of the interest period. If not provided, defaults to the current time.""" diff --git a/tests/api_resources/simulations/test_interest_payments.py b/tests/api_resources/simulations/test_interest_payments.py index e51d2e67d..a84df20b3 100644 --- a/tests/api_resources/simulations/test_interest_payments.py +++ b/tests/api_resources/simulations/test_interest_payments.py @@ -31,6 +31,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: interest_payment = client.simulations.interest_payments.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + accrued_on_account_id="accrued_on_account_id", period_end=parse_datetime("2019-12-27T18:11:19.117Z"), period_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) @@ -79,6 +80,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) interest_payment = await async_client.simulations.interest_payments.create( account_id="account_in71c4amph0vgo2qllky", amount=1000, + accrued_on_account_id="accrued_on_account_id", period_end=parse_datetime("2019-12-27T18:11:19.117Z"), period_start=parse_datetime("2019-12-27T18:11:19.117Z"), ) From e5838f1407666f49127d393dc317a3bac09c0152 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 01:51:42 +0000 Subject: [PATCH 0474/1325] chore(internal): version bump (#1023) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 022b8de78..fc8cb459a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.205.0" + ".": "0.206.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 54d7dff58..6a615a6f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.205.0" +version = "0.206.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9fcd0556a..87feb9ad0 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.205.0" # x-release-please-version +__version__ = "0.206.0" # x-release-please-version From ec5fef581321b0320bd918f72688d17ced85990a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 04:07:05 +0000 Subject: [PATCH 0475/1325] feat(api): api update (#1024) --- .stats.yml | 2 +- src/increase/resources/files.py | 6 ++++++ .../proof_of_authorization_request_submissions.py | 8 ++++++++ src/increase/types/file.py | 3 +++ src/increase/types/file_create_params.py | 3 +++ src/increase/types/file_list_params.py | 1 + .../types/proof_of_authorization_request_submission.py | 3 +++ ...f_of_authorization_request_submission_create_params.py | 3 +++ .../test_proof_of_authorization_request_submissions.py | 2 ++ 9 files changed, 30 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 3b32bb026..1cce0ab4a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9c95b020510d1ae7d912fa71032eb2fef43dacfb6ee2ba7b989f18ed8d0a9348.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a9b03edcf2324393d39557ff1597830acce6897eb2e1aed988ee03e8a6630ee.yml diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index ac54dc1a0..148690573 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -71,6 +71,7 @@ def create( "document_request", "entity_supplemental_document", "unusual_activity_report_attachment", + "proof_of_authorization_request_submission", ], description: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -119,6 +120,8 @@ def create( Entity. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. + - `proof_of_authorization_request_submission` - A file containing additional + evidence for a Proof of Authorization Request Submission. description: The description you choose to give the File. @@ -294,6 +297,7 @@ async def create( "document_request", "entity_supplemental_document", "unusual_activity_report_attachment", + "proof_of_authorization_request_submission", ], description: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -342,6 +346,8 @@ async def create( Entity. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. + - `proof_of_authorization_request_submission` - A file containing additional + evidence for a Proof of Authorization Request Submission. description: The description you choose to give the File. diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index a8a8747ea..b77a8d993 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -63,6 +63,7 @@ def create( validated_account_ownership_via_credential: bool, validated_account_ownership_with_account_statement: bool, validated_account_ownership_with_microdeposit: bool, + additional_evidence_file_id: str | NotGiven = NOT_GIVEN, authorizer_company: str | NotGiven = NOT_GIVEN, authorizer_ip_address: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -95,6 +96,8 @@ def create( validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. + additional_evidence_file_id: The File containing the check's front image. + authorizer_company: Company of the authorizer. authorizer_ip_address: IP address of the authorizer. @@ -122,6 +125,7 @@ def create( "validated_account_ownership_via_credential": validated_account_ownership_via_credential, "validated_account_ownership_with_account_statement": validated_account_ownership_with_account_statement, "validated_account_ownership_with_microdeposit": validated_account_ownership_with_microdeposit, + "additional_evidence_file_id": additional_evidence_file_id, "authorizer_company": authorizer_company, "authorizer_ip_address": authorizer_ip_address, }, @@ -266,6 +270,7 @@ async def create( validated_account_ownership_via_credential: bool, validated_account_ownership_with_account_statement: bool, validated_account_ownership_with_microdeposit: bool, + additional_evidence_file_id: str | NotGiven = NOT_GIVEN, authorizer_company: str | NotGiven = NOT_GIVEN, authorizer_ip_address: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -298,6 +303,8 @@ async def create( validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. + additional_evidence_file_id: The File containing the check's front image. + authorizer_company: Company of the authorizer. authorizer_ip_address: IP address of the authorizer. @@ -325,6 +332,7 @@ async def create( "validated_account_ownership_via_credential": validated_account_ownership_via_credential, "validated_account_ownership_with_account_statement": validated_account_ownership_with_account_statement, "validated_account_ownership_with_microdeposit": validated_account_ownership_with_microdeposit, + "additional_evidence_file_id": additional_evidence_file_id, "authorizer_company": authorizer_company, "authorizer_ip_address": authorizer_ip_address, }, diff --git a/src/increase/types/file.py b/src/increase/types/file.py index f863e0ec5..7c2e004f9 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -72,6 +72,7 @@ class File(BaseModel): "export", "unusual_activity_report_attachment", "deposit_account_control_agreement", + "proof_of_authorization_request_submission", ] """What the File will be used for. @@ -116,6 +117,8 @@ class File(BaseModel): Report. - `deposit_account_control_agreement` - A document granting another entity access to the funds into your account. + - `proof_of_authorization_request_submission` - A file containing additional + evidence for a Proof of Authorization Request Submission. """ type: Literal["file"] diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index bbf9fa309..05d007974 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -36,6 +36,7 @@ class FileCreateParams(TypedDict, total=False): "document_request", "entity_supplemental_document", "unusual_activity_report_attachment", + "proof_of_authorization_request_submission", ] ] """What the File will be used for in Increase's systems. @@ -66,6 +67,8 @@ class FileCreateParams(TypedDict, total=False): Entity. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. + - `proof_of_authorization_request_submission` - A file containing additional + evidence for a Proof of Authorization Request Submission. """ description: str diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 84f353c65..25ae1bbc8 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -90,6 +90,7 @@ class CreatedAt(TypedDict, total=False): "export", "unusual_activity_report_attachment", "deposit_account_control_agreement", + "proof_of_authorization_request_submission", ] ], }, diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py index d251bd28a..8e7cd02ff 100644 --- a/src/increase/types/proof_of_authorization_request_submission.py +++ b/src/increase/types/proof_of_authorization_request_submission.py @@ -13,6 +13,9 @@ class ProofOfAuthorizationRequestSubmission(BaseModel): id: str """The Proof of Authorization Request Submission identifier.""" + additional_evidence_file_id: Optional[str] = None + """File containing additional evidence.""" + authorization_terms: str """Terms of authorization.""" diff --git a/src/increase/types/proof_of_authorization_request_submission_create_params.py b/src/increase/types/proof_of_authorization_request_submission_create_params.py index 8c30d9d3f..16b22b0c3 100644 --- a/src/increase/types/proof_of_authorization_request_submission_create_params.py +++ b/src/increase/types/proof_of_authorization_request_submission_create_params.py @@ -39,6 +39,9 @@ class ProofOfAuthorizationRequestSubmissionCreateParams(TypedDict, total=False): validated_account_ownership_with_microdeposit: Required[bool] """Whether the account ownership was validated with a microdeposit.""" + additional_evidence_file_id: str + """The File containing the check's front image.""" + authorizer_company: str """Company of the authorizer.""" diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py index 3e30c8f76..5ee9102f0 100644 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ b/tests/api_resources/test_proof_of_authorization_request_submissions.py @@ -50,6 +50,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: validated_account_ownership_via_credential=True, validated_account_ownership_with_account_statement=True, validated_account_ownership_with_microdeposit=True, + additional_evidence_file_id="file_makxrc67oh9l6sg7w9yc", authorizer_company="National Phonograph Company", authorizer_ip_address="x", ) @@ -235,6 +236,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) validated_account_ownership_via_credential=True, validated_account_ownership_with_account_statement=True, validated_account_ownership_with_microdeposit=True, + additional_evidence_file_id="file_makxrc67oh9l6sg7w9yc", authorizer_company="National Phonograph Company", authorizer_ip_address="x", ) From 5e693f2fd0eee0cdb43fec849c3885be987527ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 04:09:22 +0000 Subject: [PATCH 0476/1325] chore(internal): version bump (#1026) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fc8cb459a..4540d34c5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.206.0" + ".": "0.207.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6a615a6f5..3747fc267 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.206.0" +version = "0.207.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 87feb9ad0..edc172554 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.206.0" # x-release-please-version +__version__ = "0.207.0" # x-release-please-version From d70af04ed25dc2070b52e0e7158e17eca0fdd173 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 15:18:02 +0000 Subject: [PATCH 0477/1325] chore(internal): bump rye to 0.44.0 (#1027) --- .devcontainer/Dockerfile | 2 +- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-pypi.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 55d20255c..ff261bad7 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -3,7 +3,7 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT} USER vscode -RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.35.0" RYE_INSTALL_OPTION="--yes" bash +RUN curl -sSf https://rye.astral.sh/get | RYE_VERSION="0.44.0" RYE_INSTALL_OPTION="--yes" bash ENV PATH=/home/vscode/.rye/shims:$PATH RUN echo "[[ -d .venv ]] && source .venv/bin/activate || export PATH=\$PATH" >> /home/vscode/.bashrc diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c8a8a4f72..3b286e5ae 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.35.0' + RYE_VERSION: '0.44.0' RYE_INSTALL_OPTION: '--yes' - name: Install dependencies @@ -42,7 +42,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.35.0' + RYE_VERSION: '0.44.0' RYE_INSTALL_OPTION: '--yes' - name: Bootstrap diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index d889ddf37..10c23f798 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -21,7 +21,7 @@ jobs: curl -sSf https://rye.astral.sh/get | bash echo "$HOME/.rye/shims" >> $GITHUB_PATH env: - RYE_VERSION: '0.35.0' + RYE_VERSION: '0.44.0' RYE_INSTALL_OPTION: '--yes' - name: Publish to PyPI From 159180c9c6e1e7da96ae460dc79af03c7d46793d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 18:02:44 +0000 Subject: [PATCH 0478/1325] chore(internal): codegen related update (#1029) --- requirements-dev.lock | 1 + requirements.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/requirements-dev.lock b/requirements-dev.lock index cd83e41fd..f77926fb3 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -7,6 +7,7 @@ # all-features: true # with-sources: false # generate-hashes: false +# universal: false -e file:. annotated-types==0.6.0 diff --git a/requirements.lock b/requirements.lock index be7bd4584..e30f9a29d 100644 --- a/requirements.lock +++ b/requirements.lock @@ -7,6 +7,7 @@ # all-features: true # with-sources: false # generate-hashes: false +# universal: false -e file:. annotated-types==0.6.0 From f48432da991bc0ba266062c0095067b271610441 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 22:12:25 +0000 Subject: [PATCH 0479/1325] fix(types): handle more discriminated union shapes (#1030) --- src/increase/_models.py | 7 +++++-- tests/test_models.py | 32 ++++++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index c4401ff86..b51a1bf5f 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -65,7 +65,7 @@ from ._constants import RAW_RESPONSE_HEADER if TYPE_CHECKING: - from pydantic_core.core_schema import ModelField, LiteralSchema, ModelFieldsSchema + from pydantic_core.core_schema import ModelField, ModelSchema, LiteralSchema, ModelFieldsSchema __all__ = ["BaseModel", "GenericModel"] @@ -646,15 +646,18 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, def _extract_field_schema_pv2(model: type[BaseModel], field_name: str) -> ModelField | None: schema = model.__pydantic_core_schema__ + if schema["type"] == "definitions": + schema = schema["schema"] + if schema["type"] != "model": return None + schema = cast("ModelSchema", schema) fields_schema = schema["schema"] if fields_schema["type"] != "model-fields": return None fields_schema = cast("ModelFieldsSchema", fields_schema) - field = fields_schema["fields"].get(field_name) if not field: return None diff --git a/tests/test_models.py b/tests/test_models.py index f8e6daff3..556f3a6c7 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -854,3 +854,35 @@ class Model(BaseModel): m = construct_type(value={"cls": "foo"}, type_=Model) assert isinstance(m, Model) assert isinstance(m.cls, str) + + +def test_discriminated_union_case() -> None: + class A(BaseModel): + type: Literal["a"] + + data: bool + + class B(BaseModel): + type: Literal["b"] + + data: List[Union[A, object]] + + class ModelA(BaseModel): + type: Literal["modelA"] + + data: int + + class ModelB(BaseModel): + type: Literal["modelB"] + + required: str + + data: Union[A, B] + + # when constructing ModelA | ModelB, value data doesn't match ModelB exactly - missing `required` + m = construct_type( + value={"type": "modelB", "data": {"type": "a", "data": True}}, + type_=cast(Any, Annotated[Union[ModelA, ModelB], PropertyInfo(discriminator="type")]), + ) + + assert isinstance(m, ModelB) From acc034e4b3bc67ffd1c0e0ba72959bfc5d4c0a86 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Mar 2025 22:13:48 +0000 Subject: [PATCH 0480/1325] chore(internal): version bump (#1031) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4540d34c5..3ba9c38c6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.207.0" + ".": "0.207.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3747fc267..bafdac262 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.207.0" +version = "0.207.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index edc172554..a5a035a8e 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.207.0" # x-release-please-version +__version__ = "0.207.1" # x-release-please-version From 1e6d21bb0649db3848512b9f8201c00a6ee1147c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 05:28:26 +0000 Subject: [PATCH 0481/1325] feat(api): api update (#1032) --- .stats.yml | 4 +- api.md | 14 + src/increase/_client.py | 9 + src/increase/resources/__init__.py | 14 + src/increase/resources/file_links.py | 424 ++++++++++++++++++ src/increase/types/__init__.py | 3 + src/increase/types/file.py | 4 +- src/increase/types/file_link.py | 50 +++ src/increase/types/file_link_create_params.py | 23 + src/increase/types/file_link_list_params.py | 61 +++ tests/api_resources/test_file_links.py | 272 +++++++++++ 11 files changed, 875 insertions(+), 3 deletions(-) create mode 100644 src/increase/resources/file_links.py create mode 100644 src/increase/types/file_link.py create mode 100644 src/increase/types/file_link_create_params.py create mode 100644 src/increase/types/file_link_list_params.py create mode 100644 tests/api_resources/test_file_links.py diff --git a/.stats.yml b/.stats.yml index 1cce0ab4a..6b3168540 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 198 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a9b03edcf2324393d39557ff1597830acce6897eb2e1aed988ee03e8a6630ee.yml +configured_endpoints: 201 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7b89d3a40ae97579e589512ffb00e48f1cdd04e38d075dd8c5a16f80909ccfd5.yml diff --git a/api.md b/api.md index 29e74d846..0af472cde 100644 --- a/api.md +++ b/api.md @@ -532,6 +532,20 @@ Methods: - client.files.retrieve(file_id) -> File - client.files.list(\*\*params) -> SyncPage[File] +# FileLinks + +Types: + +```python +from increase.types import FileLink +``` + +Methods: + +- client.file_links.create(\*\*params) -> FileLink +- client.file_links.retrieve(file_link_id) -> FileLink +- client.file_links.list(\*\*params) -> SyncPage[FileLink] + # Documents Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index d9b1ab59f..97cebfe70 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -36,6 +36,7 @@ programs, documents, lockboxes, + file_links, oauth_tokens, transactions, ach_transfers, @@ -146,6 +147,7 @@ class Increase(SyncAPIClient): ) account_statements: account_statements.AccountStatementsResource files: files.FilesResource + file_links: file_links.FileLinksResource documents: documents.DocumentsResource exports: exports.ExportsResource events: events.EventsResource @@ -296,6 +298,7 @@ def __init__( ) self.account_statements = account_statements.AccountStatementsResource(self) self.files = files.FilesResource(self) + self.file_links = file_links.FileLinksResource(self) self.documents = documents.DocumentsResource(self) self.exports = exports.ExportsResource(self) self.events = events.EventsResource(self) @@ -511,6 +514,7 @@ class AsyncIncrease(AsyncAPIClient): ) account_statements: account_statements.AsyncAccountStatementsResource files: files.AsyncFilesResource + file_links: file_links.AsyncFileLinksResource documents: documents.AsyncDocumentsResource exports: exports.AsyncExportsResource events: events.AsyncEventsResource @@ -663,6 +667,7 @@ def __init__( ) self.account_statements = account_statements.AsyncAccountStatementsResource(self) self.files = files.AsyncFilesResource(self) + self.file_links = file_links.AsyncFileLinksResource(self) self.documents = documents.AsyncDocumentsResource(self) self.exports = exports.AsyncExportsResource(self) self.events = events.AsyncEventsResource(self) @@ -919,6 +924,7 @@ def __init__(self, client: Increase) -> None: ) self.account_statements = account_statements.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = files.FilesResourceWithRawResponse(client.files) + self.file_links = file_links.FileLinksResourceWithRawResponse(client.file_links) self.documents = documents.DocumentsResourceWithRawResponse(client.documents) self.exports = exports.ExportsResourceWithRawResponse(client.exports) self.events = events.EventsResourceWithRawResponse(client.events) @@ -1038,6 +1044,7 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_statements ) self.files = files.AsyncFilesResourceWithRawResponse(client.files) + self.file_links = file_links.AsyncFileLinksResourceWithRawResponse(client.file_links) self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents) self.exports = exports.AsyncExportsResourceWithRawResponse(client.exports) self.events = events.AsyncEventsResourceWithRawResponse(client.events) @@ -1165,6 +1172,7 @@ def __init__(self, client: Increase) -> None: client.account_statements ) self.files = files.FilesResourceWithStreamingResponse(client.files) + self.file_links = file_links.FileLinksResourceWithStreamingResponse(client.file_links) self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents) self.exports = exports.ExportsResourceWithStreamingResponse(client.exports) self.events = events.EventsResourceWithStreamingResponse(client.events) @@ -1294,6 +1302,7 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_statements ) self.files = files.AsyncFilesResourceWithStreamingResponse(client.files) + self.file_links = file_links.AsyncFileLinksResourceWithStreamingResponse(client.file_links) self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents) self.exports = exports.AsyncExportsResourceWithStreamingResponse(client.exports) self.events = events.AsyncEventsResourceWithStreamingResponse(client.events) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index a3ef98738..45e3487a9 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -80,6 +80,14 @@ LockboxesResourceWithStreamingResponse, AsyncLockboxesResourceWithStreamingResponse, ) +from .file_links import ( + FileLinksResource, + AsyncFileLinksResource, + FileLinksResourceWithRawResponse, + AsyncFileLinksResourceWithRawResponse, + FileLinksResourceWithStreamingResponse, + AsyncFileLinksResourceWithStreamingResponse, +) from .simulations import ( SimulationsResource, AsyncSimulationsResource, @@ -648,6 +656,12 @@ "AsyncFilesResourceWithRawResponse", "FilesResourceWithStreamingResponse", "AsyncFilesResourceWithStreamingResponse", + "FileLinksResource", + "AsyncFileLinksResource", + "FileLinksResourceWithRawResponse", + "AsyncFileLinksResourceWithRawResponse", + "FileLinksResourceWithStreamingResponse", + "AsyncFileLinksResourceWithStreamingResponse", "DocumentsResource", "AsyncDocumentsResource", "DocumentsResourceWithRawResponse", diff --git a/src/increase/resources/file_links.py b/src/increase/resources/file_links.py new file mode 100644 index 000000000..30d79e14e --- /dev/null +++ b/src/increase/resources/file_links.py @@ -0,0 +1,424 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime + +import httpx + +from ..types import file_link_list_params, file_link_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import ( + maybe_transform, + async_maybe_transform, +) +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.file_link import FileLink + +__all__ = ["FileLinksResource", "AsyncFileLinksResource"] + + +class FileLinksResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> FileLinksResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return FileLinksResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> FileLinksResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return FileLinksResourceWithStreamingResponse(self) + + def create( + self, + *, + file_id: str, + expires_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> FileLink: + """ + Create a File Link + + Args: + file_id: The File to create a File Link for. + + expires_at: The time at which the File Link will expire. The default is 1 hour from the time + of the request. The maxiumum is 1 day from the time of the request. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/file_links", + body=maybe_transform( + { + "file_id": file_id, + "expires_at": expires_at, + }, + file_link_create_params.FileLinkCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FileLink, + ) + + def retrieve( + self, + file_link_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> FileLink: + """ + Retrieve a File Link + + Args: + file_link_id: The identifier of the File Link. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not file_link_id: + raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}") + return self._get( + f"/file_links/{file_link_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileLink, + ) + + def list( + self, + *, + file_id: str, + created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[FileLink]: + """ + List File Links + + Args: + file_id: The identifier of the File to list File Links for. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/file_links", + page=SyncPage[FileLink], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "file_id": file_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + file_link_list_params.FileLinkListParams, + ), + ), + model=FileLink, + ) + + +class AsyncFileLinksResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncFileLinksResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncFileLinksResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncFileLinksResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncFileLinksResourceWithStreamingResponse(self) + + async def create( + self, + *, + file_id: str, + expires_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> FileLink: + """ + Create a File Link + + Args: + file_id: The File to create a File Link for. + + expires_at: The time at which the File Link will expire. The default is 1 hour from the time + of the request. The maxiumum is 1 day from the time of the request. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/file_links", + body=await async_maybe_transform( + { + "file_id": file_id, + "expires_at": expires_at, + }, + file_link_create_params.FileLinkCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FileLink, + ) + + async def retrieve( + self, + file_link_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> FileLink: + """ + Retrieve a File Link + + Args: + file_link_id: The identifier of the File Link. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not file_link_id: + raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}") + return await self._get( + f"/file_links/{file_link_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FileLink, + ) + + def list( + self, + *, + file_id: str, + created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[FileLink, AsyncPage[FileLink]]: + """ + List File Links + + Args: + file_id: The identifier of the File to list File Links for. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/file_links", + page=AsyncPage[FileLink], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "file_id": file_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + file_link_list_params.FileLinkListParams, + ), + ), + model=FileLink, + ) + + +class FileLinksResourceWithRawResponse: + def __init__(self, file_links: FileLinksResource) -> None: + self._file_links = file_links + + self.create = to_raw_response_wrapper( + file_links.create, + ) + self.retrieve = to_raw_response_wrapper( + file_links.retrieve, + ) + self.list = to_raw_response_wrapper( + file_links.list, + ) + + +class AsyncFileLinksResourceWithRawResponse: + def __init__(self, file_links: AsyncFileLinksResource) -> None: + self._file_links = file_links + + self.create = async_to_raw_response_wrapper( + file_links.create, + ) + self.retrieve = async_to_raw_response_wrapper( + file_links.retrieve, + ) + self.list = async_to_raw_response_wrapper( + file_links.list, + ) + + +class FileLinksResourceWithStreamingResponse: + def __init__(self, file_links: FileLinksResource) -> None: + self._file_links = file_links + + self.create = to_streamed_response_wrapper( + file_links.create, + ) + self.retrieve = to_streamed_response_wrapper( + file_links.retrieve, + ) + self.list = to_streamed_response_wrapper( + file_links.list, + ) + + +class AsyncFileLinksResourceWithStreamingResponse: + def __init__(self, file_links: AsyncFileLinksResource) -> None: + self._file_links = file_links + + self.create = async_to_streamed_response_wrapper( + file_links.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + file_links.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + file_links.list, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 71a969901..16bcc0f21 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -12,6 +12,7 @@ from .lockbox import Lockbox as Lockbox from .program import Program as Program from .document import Document as Document +from .file_link import FileLink as FileLink from .oauth_token import OAuthToken as OAuthToken from .transaction import Transaction as Transaction from .ach_transfer import ACHTransfer as ACHTransfer @@ -60,6 +61,7 @@ from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams +from .file_link_list_params import FileLinkListParams as FileLinkListParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams @@ -67,6 +69,7 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams +from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 7c2e004f9..e3cfe6f99 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -29,7 +29,9 @@ class File(BaseModel): download_url: Optional[str] = None """A URL from where the File can be downloaded at this point in time. - The location of this URL may change over time. + The location of this URL may change over time. This URL requires authentication + with your Increase API key. If you need a URL that does not require + authentication, create a File Link instead. """ filename: Optional[str] = None diff --git a/src/increase/types/file_link.py b/src/increase/types/file_link.py new file mode 100644 index 000000000..926b15119 --- /dev/null +++ b/src/increase/types/file_link.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["FileLink"] + + +class FileLink(BaseModel): + id: str + """The File Link identifier.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File + Link was created. + """ + + expires_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the File + Link will expire. + """ + + file_id: str + """The identifier of the File the File Link points to.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + public_download_url: str + """A URL where the File can be downloaded. + + The URL will expire after the `expires_at` time. This URL is unauthenticated and + can be used to download the File without an Increase API key. + """ + + type: Literal["file_link"] + """A constant representing the object's type. + + For this resource it will always be `file_link`. + """ diff --git a/src/increase/types/file_link_create_params.py b/src/increase/types/file_link_create_params.py new file mode 100644 index 000000000..8707daaa8 --- /dev/null +++ b/src/increase/types/file_link_create_params.py @@ -0,0 +1,23 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["FileLinkCreateParams"] + + +class FileLinkCreateParams(TypedDict, total=False): + file_id: Required[str] + """The File to create a File Link for.""" + + expires_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """The time at which the File Link will expire. + + The default is 1 hour from the time of the request. The maxiumum is 1 day from + the time of the request. + """ diff --git a/src/increase/types/file_link_list_params.py b/src/increase/types/file_link_list_params.py new file mode 100644 index 000000000..432f19d06 --- /dev/null +++ b/src/increase/types/file_link_list_params.py @@ -0,0 +1,61 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["FileLinkListParams", "CreatedAt"] + + +class FileLinkListParams(TypedDict, total=False): + file_id: Required[str] + """The identifier of the File to list File Links for.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/tests/api_resources/test_file_links.py b/tests/api_resources/test_file_links.py new file mode 100644 index 000000000..29df07284 --- /dev/null +++ b/tests/api_resources/test_file_links.py @@ -0,0 +1,272 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import FileLink +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestFileLinks: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + file_link = client.file_links.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + file_link = client.file_links.create( + file_id="file_makxrc67oh9l6sg7w9yc", + expires_at=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.file_links.with_raw_response.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.file_links.with_streaming_response.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + file_link = client.file_links.retrieve( + "file_link_id", + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.file_links.with_raw_response.retrieve( + "file_link_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.file_links.with_streaming_response.retrieve( + "file_link_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_link_id` but received ''"): + client.file_links.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + file_link = client.file_links.list( + file_id="file_id", + ) + assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + file_link = client.file_links.list( + file_id="file_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + ) + assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.file_links.with_raw_response.list( + file_id="file_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = response.parse() + assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.file_links.with_streaming_response.list( + file_id="file_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = response.parse() + assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncFileLinks: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + file_link = await async_client.file_links.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + file_link = await async_client.file_links.create( + file_id="file_makxrc67oh9l6sg7w9yc", + expires_at=parse_datetime("2019-12-27T18:11:19.117Z"), + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.file_links.with_raw_response.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = await response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.file_links.with_streaming_response.create( + file_id="file_makxrc67oh9l6sg7w9yc", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = await response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + file_link = await async_client.file_links.retrieve( + "file_link_id", + ) + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.file_links.with_raw_response.retrieve( + "file_link_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = await response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.file_links.with_streaming_response.retrieve( + "file_link_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = await response.parse() + assert_matches_type(FileLink, file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_link_id` but received ''"): + await async_client.file_links.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + file_link = await async_client.file_links.list( + file_id="file_id", + ) + assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + file_link = await async_client.file_links.list( + file_id="file_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + ) + assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.file_links.with_raw_response.list( + file_id="file_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + file_link = await response.parse() + assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.file_links.with_streaming_response.list( + file_id="file_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + file_link = await response.parse() + assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) + + assert cast(Any, response.is_closed) is True From c2377f85bc73b8768db7efcc158ceea45142bb87 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 05:30:21 +0000 Subject: [PATCH 0482/1325] chore(internal): version bump (#1034) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3ba9c38c6..3a7ed508c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.207.1" + ".": "0.208.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bafdac262..d6e898cd8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.207.1" +version = "0.208.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a5a035a8e..abaad9a5f 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.207.1" # x-release-please-version +__version__ = "0.208.0" # x-release-please-version From d675449998eaa2d574d8c98b567b27b6160ef207 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 15:12:16 +0000 Subject: [PATCH 0483/1325] feat(api): api update (#1035) --- .stats.yml | 4 +- api.md | 2 - src/increase/resources/file_links.py | 221 +------------------- src/increase/types/__init__.py | 1 - src/increase/types/file.py | 8 - src/increase/types/file_link.py | 14 +- src/increase/types/file_link_list_params.py | 61 ------ tests/api_resources/test_file_links.py | 171 --------------- 8 files changed, 11 insertions(+), 471 deletions(-) delete mode 100644 src/increase/types/file_link_list_params.py diff --git a/.stats.yml b/.stats.yml index 6b3168540..a84aabbd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ -configured_endpoints: 201 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7b89d3a40ae97579e589512ffb00e48f1cdd04e38d075dd8c5a16f80909ccfd5.yml +configured_endpoints: 199 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9d92797be06309903a9181e5f4f3c026a669fd40520da94b21f09eda84dfb65d.yml diff --git a/api.md b/api.md index 0af472cde..6c4cfa675 100644 --- a/api.md +++ b/api.md @@ -543,8 +543,6 @@ from increase.types import FileLink Methods: - client.file_links.create(\*\*params) -> FileLink -- client.file_links.retrieve(file_link_id) -> FileLink -- client.file_links.list(\*\*params) -> SyncPage[FileLink] # Documents diff --git a/src/increase/resources/file_links.py b/src/increase/resources/file_links.py index 30d79e14e..9f8cbb7ad 100644 --- a/src/increase/resources/file_links.py +++ b/src/increase/resources/file_links.py @@ -7,7 +7,7 @@ import httpx -from ..types import file_link_list_params, file_link_create_params +from ..types import file_link_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import ( maybe_transform, @@ -21,8 +21,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.file_link import FileLink __all__ = ["FileLinksResource", "AsyncFileLinksResource"] @@ -99,102 +98,6 @@ def create( cast_to=FileLink, ) - def retrieve( - self, - file_link_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FileLink: - """ - Retrieve a File Link - - Args: - file_link_id: The identifier of the File Link. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not file_link_id: - raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}") - return self._get( - f"/file_links/{file_link_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=FileLink, - ) - - def list( - self, - *, - file_id: str, - created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[FileLink]: - """ - List File Links - - Args: - file_id: The identifier of the File to list File Links for. - - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/file_links", - page=SyncPage[FileLink], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "file_id": file_id, - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - }, - file_link_list_params.FileLinkListParams, - ), - ), - model=FileLink, - ) - class AsyncFileLinksResource(AsyncAPIResource): @cached_property @@ -267,102 +170,6 @@ async def create( cast_to=FileLink, ) - async def retrieve( - self, - file_link_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> FileLink: - """ - Retrieve a File Link - - Args: - file_link_id: The identifier of the File Link. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not file_link_id: - raise ValueError(f"Expected a non-empty value for `file_link_id` but received {file_link_id!r}") - return await self._get( - f"/file_links/{file_link_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=FileLink, - ) - - def list( - self, - *, - file_id: str, - created_at: file_link_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[FileLink, AsyncPage[FileLink]]: - """ - List File Links - - Args: - file_id: The identifier of the File to list File Links for. - - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/file_links", - page=AsyncPage[FileLink], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "file_id": file_id, - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - }, - file_link_list_params.FileLinkListParams, - ), - ), - model=FileLink, - ) - class FileLinksResourceWithRawResponse: def __init__(self, file_links: FileLinksResource) -> None: @@ -371,12 +178,6 @@ def __init__(self, file_links: FileLinksResource) -> None: self.create = to_raw_response_wrapper( file_links.create, ) - self.retrieve = to_raw_response_wrapper( - file_links.retrieve, - ) - self.list = to_raw_response_wrapper( - file_links.list, - ) class AsyncFileLinksResourceWithRawResponse: @@ -386,12 +187,6 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None: self.create = async_to_raw_response_wrapper( file_links.create, ) - self.retrieve = async_to_raw_response_wrapper( - file_links.retrieve, - ) - self.list = async_to_raw_response_wrapper( - file_links.list, - ) class FileLinksResourceWithStreamingResponse: @@ -401,12 +196,6 @@ def __init__(self, file_links: FileLinksResource) -> None: self.create = to_streamed_response_wrapper( file_links.create, ) - self.retrieve = to_streamed_response_wrapper( - file_links.retrieve, - ) - self.list = to_streamed_response_wrapper( - file_links.list, - ) class AsyncFileLinksResourceWithStreamingResponse: @@ -416,9 +205,3 @@ def __init__(self, file_links: AsyncFileLinksResource) -> None: self.create = async_to_streamed_response_wrapper( file_links.create, ) - self.retrieve = async_to_streamed_response_wrapper( - file_links.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - file_links.list, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 16bcc0f21..c099e4be4 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -61,7 +61,6 @@ from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams -from .file_link_list_params import FileLinkListParams as FileLinkListParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams diff --git a/src/increase/types/file.py b/src/increase/types/file.py index e3cfe6f99..f99ab79e9 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -26,14 +26,6 @@ class File(BaseModel): - `from_increase` - This File was generated by Increase. """ - download_url: Optional[str] = None - """A URL from where the File can be downloaded at this point in time. - - The location of this URL may change over time. This URL requires authentication - with your Increase API key. If you need a URL that does not require - authentication, create a File Link instead. - """ - filename: Optional[str] = None """The filename that was provided upon upload or generated by Increase.""" diff --git a/src/increase/types/file_link.py b/src/increase/types/file_link.py index 926b15119..5299453d0 100644 --- a/src/increase/types/file_link.py +++ b/src/increase/types/file_link.py @@ -36,15 +36,15 @@ class FileLink(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - public_download_url: str - """A URL where the File can be downloaded. - - The URL will expire after the `expires_at` time. This URL is unauthenticated and - can be used to download the File without an Increase API key. - """ - type: Literal["file_link"] """A constant representing the object's type. For this resource it will always be `file_link`. """ + + unauthenticated_url: str + """A URL where the File can be downloaded. + + The URL will expire after the `expires_at` time. This URL is unauthenticated and + can be used to download the File without an Increase API key. + """ diff --git a/src/increase/types/file_link_list_params.py b/src/increase/types/file_link_list_params.py deleted file mode 100644 index 432f19d06..000000000 --- a/src/increase/types/file_link_list_params.py +++ /dev/null @@ -1,61 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["FileLinkListParams", "CreatedAt"] - - -class FileLinkListParams(TypedDict, total=False): - file_id: Required[str] - """The identifier of the File to list File Links for.""" - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - idempotency_key: str - """ - Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ diff --git a/tests/api_resources/test_file_links.py b/tests/api_resources/test_file_links.py index 29df07284..d742e2366 100644 --- a/tests/api_resources/test_file_links.py +++ b/tests/api_resources/test_file_links.py @@ -11,7 +11,6 @@ from tests.utils import assert_matches_type from increase.types import FileLink from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -58,91 +57,6 @@ def test_streaming_response_create(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - file_link = client.file_links.retrieve( - "file_link_id", - ) - assert_matches_type(FileLink, file_link, path=["response"]) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.file_links.with_raw_response.retrieve( - "file_link_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file_link = response.parse() - assert_matches_type(FileLink, file_link, path=["response"]) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.file_links.with_streaming_response.retrieve( - "file_link_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file_link = response.parse() - assert_matches_type(FileLink, file_link, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_link_id` but received ''"): - client.file_links.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - file_link = client.file_links.list( - file_id="file_id", - ) - assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - file_link = client.file_links.list( - file_id="file_id", - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - ) - assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.file_links.with_raw_response.list( - file_id="file_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file_link = response.parse() - assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.file_links.with_streaming_response.list( - file_id="file_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file_link = response.parse() - assert_matches_type(SyncPage[FileLink], file_link, path=["response"]) - - assert cast(Any, response.is_closed) is True - class TestAsyncFileLinks: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -185,88 +99,3 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert_matches_type(FileLink, file_link, path=["response"]) assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - file_link = await async_client.file_links.retrieve( - "file_link_id", - ) - assert_matches_type(FileLink, file_link, path=["response"]) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.file_links.with_raw_response.retrieve( - "file_link_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file_link = await response.parse() - assert_matches_type(FileLink, file_link, path=["response"]) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.file_links.with_streaming_response.retrieve( - "file_link_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file_link = await response.parse() - assert_matches_type(FileLink, file_link, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `file_link_id` but received ''"): - await async_client.file_links.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - file_link = await async_client.file_links.list( - file_id="file_id", - ) - assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - file_link = await async_client.file_links.list( - file_id="file_id", - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - ) - assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.file_links.with_raw_response.list( - file_id="file_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - file_link = await response.parse() - assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.file_links.with_streaming_response.list( - file_id="file_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - file_link = await response.parse() - assert_matches_type(AsyncPage[FileLink], file_link, path=["response"]) - - assert cast(Any, response.is_closed) is True From f5b1a0aff05f16b69ff9a9d06de9fb0f50cd54bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 15 Mar 2025 15:13:30 +0000 Subject: [PATCH 0484/1325] chore(internal): version bump (#1037) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3a7ed508c..e2504c710 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.208.0" + ".": "0.209.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d6e898cd8..83fe3f7a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.208.0" +version = "0.209.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index abaad9a5f..9ae988484 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.208.0" # x-release-please-version +__version__ = "0.209.0" # x-release-please-version From edf5b6ab4be7edc9f9ed1f12dfb78ec9ffd5b2e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:06:35 +0000 Subject: [PATCH 0485/1325] fix(ci): ensure pip is always available (#1038) --- bin/publish-pypi | 1 + 1 file changed, 1 insertion(+) diff --git a/bin/publish-pypi b/bin/publish-pypi index 05bfccbb7..ebebf9165 100644 --- a/bin/publish-pypi +++ b/bin/publish-pypi @@ -5,5 +5,6 @@ mkdir -p dist rye build --clean # Patching importlib-metadata version until upstream library version is updated # https://github.com/pypa/twine/issues/977#issuecomment-2189800841 +"$HOME/.rye/self/bin/python3" -m ensurepip "$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1' rye publish --yes --token=$PYPI_TOKEN From c811f5ef3e9771cb1981d222a5e7abe1830d7463 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:07:58 +0000 Subject: [PATCH 0486/1325] chore(internal): version bump (#1040) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e2504c710..ce91839ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.209.0" + ".": "0.209.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 83fe3f7a5..ff9e9212f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.209.0" +version = "0.209.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9ae988484..cf08108ff 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.209.0" # x-release-please-version +__version__ = "0.209.1" # x-release-please-version From 5c0ac536ac39712d9916a9be98f3fce21944aabc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 15:51:45 +0000 Subject: [PATCH 0487/1325] fix(ci): remove publishing patch (#1041) --- bin/publish-pypi | 4 ---- pyproject.toml | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/publish-pypi b/bin/publish-pypi index ebebf9165..826054e92 100644 --- a/bin/publish-pypi +++ b/bin/publish-pypi @@ -3,8 +3,4 @@ set -eux mkdir -p dist rye build --clean -# Patching importlib-metadata version until upstream library version is updated -# https://github.com/pypa/twine/issues/977#issuecomment-2189800841 -"$HOME/.rye/self/bin/python3" -m ensurepip -"$HOME/.rye/self/bin/python3" -m pip install 'importlib-metadata==7.2.1' rye publish --yes --token=$PYPI_TOKEN diff --git a/pyproject.toml b/pyproject.toml index ff9e9212f..4d54f554c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -86,7 +86,7 @@ typecheck = { chain = [ "typecheck:mypy" = "mypy ." [build-system] -requires = ["hatchling", "hatch-fancy-pypi-readme"] +requires = ["hatchling==1.26.3", "hatch-fancy-pypi-readme"] build-backend = "hatchling.build" [tool.hatch.build] From 5895f1536c165bd865c656bb75d779820a851ab9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 17:24:01 +0000 Subject: [PATCH 0488/1325] chore(internal): version bump (#1043) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ce91839ad..bf4eb838d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.209.1" + ".": "0.209.2" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4d54f554c..62e61236f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.209.1" +version = "0.209.2" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index cf08108ff..77503f6c4 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.209.1" # x-release-please-version +__version__ = "0.209.2" # x-release-please-version From 0905ee13c682cf89edf961c0a965fe40dc44ce2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:01:08 +0000 Subject: [PATCH 0489/1325] feat(api): api update (#1044) --- .stats.yml | 2 +- .../resources/proof_of_authorization_request_submissions.py | 4 ++-- ...proof_of_authorization_request_submission_create_params.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index a84aabbd9..92685b7c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9d92797be06309903a9181e5f4f3c026a669fd40520da94b21f09eda84dfb65d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a47b11a0e607e967e5084b9ca0602eca8b9d8fcae288dd554172894b4ae4bc5.yml diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py index b77a8d993..1b682a5df 100644 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ b/src/increase/resources/proof_of_authorization_request_submissions.py @@ -96,7 +96,7 @@ def create( validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. - additional_evidence_file_id: The File containing the check's front image. + additional_evidence_file_id: File containing additional evidence. authorizer_company: Company of the authorizer. @@ -303,7 +303,7 @@ async def create( validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. - additional_evidence_file_id: The File containing the check's front image. + additional_evidence_file_id: File containing additional evidence. authorizer_company: Company of the authorizer. diff --git a/src/increase/types/proof_of_authorization_request_submission_create_params.py b/src/increase/types/proof_of_authorization_request_submission_create_params.py index 16b22b0c3..bead2c04c 100644 --- a/src/increase/types/proof_of_authorization_request_submission_create_params.py +++ b/src/increase/types/proof_of_authorization_request_submission_create_params.py @@ -40,7 +40,7 @@ class ProofOfAuthorizationRequestSubmissionCreateParams(TypedDict, total=False): """Whether the account ownership was validated with a microdeposit.""" additional_evidence_file_id: str - """The File containing the check's front image.""" + """File containing additional evidence.""" authorizer_company: str """Company of the authorizer.""" From cf1a921ea71b91addcb7faefda3ce5494709251e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Mar 2025 16:32:19 +0000 Subject: [PATCH 0490/1325] chore(internal): codegen related update (#1046) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bf4eb838d..95701982e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.209.2" + ".": "0.210.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 62e61236f..7a28a44a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.209.2" +version = "0.210.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 77503f6c4..897688c5a 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.209.2" # x-release-please-version +__version__ = "0.210.0" # x-release-please-version From c6f8d8258b6bb7ff009beccb382478686156c2f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 16:13:03 +0000 Subject: [PATCH 0491/1325] feat(api): api update (#1047) --- .stats.yml | 2 +- src/increase/resources/files.py | 10 ++++++++-- src/increase/types/file.py | 5 ++++- src/increase/types/file_create_params.py | 5 ++++- src/increase/types/file_list_params.py | 1 + 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 92685b7c7..a76b111f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a47b11a0e607e967e5084b9ca0602eca8b9d8fcae288dd554172894b4ae4bc5.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc87cb29bb20cb6bb17818eda6283205740084b0a055539bd6a04945eca539ab.yml diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 148690573..f24643772 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -60,6 +60,7 @@ def create( "mailed_check_image", "check_voucher_image", "check_attachment_image", + "check_attachment", "form_ss_4", "identity_document", "other", @@ -100,8 +101,10 @@ def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. - - `check_attachment_image` - An image to be printed on an additional page and + - `check_attachment_image` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_attachment` - A document to be printed on an additional page and mailed + with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. @@ -286,6 +289,7 @@ async def create( "mailed_check_image", "check_voucher_image", "check_attachment_image", + "check_attachment", "form_ss_4", "identity_document", "other", @@ -326,8 +330,10 @@ async def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. - - `check_attachment_image` - An image to be printed on an additional page and + - `check_attachment_image` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_attachment` - A document to be printed on an additional page and mailed + with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index f99ab79e9..0107ba9b3 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -48,6 +48,7 @@ class File(BaseModel): "mailed_check_image", "check_voucher_image", "check_attachment_image", + "check_attachment", "inbound_mail_item", "form_1099_int", "form_1099_misc", @@ -83,8 +84,10 @@ class File(BaseModel): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. - - `check_attachment_image` - An image to be printed on an additional page and + - `check_attachment_image` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_attachment` - A document to be printed on an additional page and mailed + with a check that you've requested Increase print. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_1099_misc` - IRS Form 1099-MISC. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index 05d007974..c4788b37c 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -25,6 +25,7 @@ class FileCreateParams(TypedDict, total=False): "mailed_check_image", "check_voucher_image", "check_attachment_image", + "check_attachment", "form_ss_4", "identity_document", "other", @@ -47,8 +48,10 @@ class FileCreateParams(TypedDict, total=False): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_voucher_image` - An image to be printed on the bottom or voucher of a check that you've requested Increase print. - - `check_attachment_image` - An image to be printed on an additional page and + - `check_attachment_image` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_attachment` - A document to be printed on an additional page and mailed + with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `other` - A file purpose not covered by any of the other cases. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 25ae1bbc8..8b345f5d4 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -72,6 +72,7 @@ class CreatedAt(TypedDict, total=False): "mailed_check_image", "check_voucher_image", "check_attachment_image", + "check_attachment", "inbound_mail_item", "form_1099_int", "form_1099_misc", From 84686583a43ba34e6139604b8d1fab154768e211 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 16:14:20 +0000 Subject: [PATCH 0492/1325] chore(internal): version bump (#1049) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 95701982e..30bf412b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.210.0" + ".": "0.211.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7a28a44a5..83a42bc85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.210.0" +version = "0.211.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 897688c5a..bff435cd0 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.210.0" # x-release-please-version +__version__ = "0.211.0" # x-release-please-version From 0d8c0c0ad2762576783d1ab9598f5e0f18a46f34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 17:52:08 +0000 Subject: [PATCH 0493/1325] feat(api): api update (#1050) --- .stats.yml | 2 +- src/increase/resources/files.py | 12 ------------ src/increase/types/file.py | 6 ------ src/increase/types/file_create_params.py | 6 ------ src/increase/types/file_list_params.py | 2 -- 5 files changed, 1 insertion(+), 27 deletions(-) diff --git a/.stats.yml b/.stats.yml index a76b111f0..38744156e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,2 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc87cb29bb20cb6bb17818eda6283205740084b0a055539bd6a04945eca539ab.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-37dc1802736b75bd7602c7be0989e9bbfcd9d2d93b1a3491011ce86cb150cc5a.yml diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index f24643772..1f74e4992 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -58,8 +58,6 @@ def create( "check_image_front", "check_image_back", "mailed_check_image", - "check_voucher_image", - "check_attachment_image", "check_attachment", "form_ss_4", "identity_document", @@ -99,10 +97,6 @@ def create( deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - - `check_voucher_image` - An image to be printed on the bottom or voucher of a - check that you've requested Increase print. - - `check_attachment_image` - A document to be printed on an additional page and - mailed with a check that you've requested Increase print. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. @@ -287,8 +281,6 @@ async def create( "check_image_front", "check_image_back", "mailed_check_image", - "check_voucher_image", - "check_attachment_image", "check_attachment", "form_ss_4", "identity_document", @@ -328,10 +320,6 @@ async def create( deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - - `check_voucher_image` - An image to be printed on the bottom or voucher of a - check that you've requested Increase print. - - `check_attachment_image` - A document to be printed on an additional page and - mailed with a check that you've requested Increase print. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 0107ba9b3..94c29fadc 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -46,8 +46,6 @@ class File(BaseModel): "processed_check_image_front", "processed_check_image_back", "mailed_check_image", - "check_voucher_image", - "check_attachment_image", "check_attachment", "inbound_mail_item", "form_1099_int", @@ -82,10 +80,6 @@ class File(BaseModel): - `processed_check_image_back` - An image of the back of a deposited check after processing by Increase and submission to the Federal Reserve. - `mailed_check_image` - An image of a check that was mailed to a recipient. - - `check_voucher_image` - An image to be printed on the bottom or voucher of a - check that you've requested Increase print. - - `check_attachment_image` - A document to be printed on an additional page and - mailed with a check that you've requested Increase print. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. - `inbound_mail_item` - A scanned mail item sent to Increase. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index c4788b37c..2bf3ce98c 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -23,8 +23,6 @@ class FileCreateParams(TypedDict, total=False): "check_image_front", "check_image_back", "mailed_check_image", - "check_voucher_image", - "check_attachment_image", "check_attachment", "form_ss_4", "identity_document", @@ -46,10 +44,6 @@ class FileCreateParams(TypedDict, total=False): deposits. - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - - `check_voucher_image` - An image to be printed on the bottom or voucher of a - check that you've requested Increase print. - - `check_attachment_image` - A document to be printed on an additional page and - mailed with a check that you've requested Increase print. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 8b345f5d4..40cfb0456 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -70,8 +70,6 @@ class CreatedAt(TypedDict, total=False): "processed_check_image_front", "processed_check_image_back", "mailed_check_image", - "check_voucher_image", - "check_attachment_image", "check_attachment", "inbound_mail_item", "form_1099_int", From e2cba37759585f080af0c3a69dc210c5200541fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 22 Mar 2025 17:53:20 +0000 Subject: [PATCH 0494/1325] chore(internal): version bump (#1052) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 30bf412b9..27a3cb4d9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.211.0" + ".": "0.212.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 83a42bc85..16424c3ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.211.0" +version = "0.212.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index bff435cd0..3c3f5e7f5 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.211.0" # x-release-please-version +__version__ = "0.212.0" # x-release-please-version From 3f9a1ad53e9c2e3795929f8482bf81b9c51231f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 16:38:50 +0000 Subject: [PATCH 0495/1325] chore: fix typos (#1053) --- src/increase/_models.py | 2 +- src/increase/_utils/_transform.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index b51a1bf5f..349357169 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -681,7 +681,7 @@ def set_pydantic_config(typ: Any, config: pydantic.ConfigDict) -> None: setattr(typ, "__pydantic_config__", config) # noqa: B010 -# our use of subclasssing here causes weirdness for type checkers, +# our use of subclassing here causes weirdness for type checkers, # so we just pretend that we don't subclass if TYPE_CHECKING: GenericModel = BaseModel diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index 18afd9d8b..7ac2e17fb 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -126,7 +126,7 @@ def _get_annotated_type(type_: type) -> type | None: def _maybe_transform_key(key: str, type_: type) -> str: """Transform the given `data` based on the annotations provided in `type_`. - Note: this function only looks at `Annotated` types that contain `PropertInfo` metadata. + Note: this function only looks at `Annotated` types that contain `PropertyInfo` metadata. """ annotated_type = _get_annotated_type(type_) if annotated_type is None: From 849e4879de97abf5c531a21d4e93b4ca4e39a392 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 17:35:17 +0000 Subject: [PATCH 0496/1325] codegen metadata --- .stats.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.stats.yml b/.stats.yml index 38744156e..e0388f0ee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,2 +1,4 @@ configured_endpoints: 199 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-37dc1802736b75bd7602c7be0989e9bbfcd9d2d93b1a3491011ce86cb150cc5a.yml +openapi_spec_hash: 39f7d9e9e5ea008daa92dca19fb9ed28 +config_hash: 20a463ecd33bd32b7b9bc6f4990907ac From 36fd37c7d0a7e1ea77033abe0f8fac1d0d09e553 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:17:11 +0000 Subject: [PATCH 0497/1325] feat(api): api update (#1055) --- .stats.yml | 4 +-- src/increase/resources/ach_transfers.py | 4 +++ .../resources/real_time_payments_transfers.py | 4 +++ .../types/ach_transfer_list_params.py | 33 +++++++++++++++++-- ...real_time_payments_transfer_list_params.py | 32 ++++++++++++++++-- tests/api_resources/test_ach_transfers.py | 2 ++ .../test_real_time_payments_transfers.py | 2 ++ 7 files changed, 73 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index e0388f0ee..43f60f9cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-37dc1802736b75bd7602c7be0989e9bbfcd9d2d93b1a3491011ce86cb150cc5a.yml -openapi_spec_hash: 39f7d9e9e5ea008daa92dca19fb9ed28 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33b4fdf3af0d0c7816a818cea776370220613e9ea8812a8339e6203d0f4b23e6.yml +openapi_spec_hash: 242db9c21568746bbbbdf9cf090db82e config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 671cc110f..4e8b65f13 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -250,6 +250,7 @@ def list( external_account_id: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -299,6 +300,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, ach_transfer_list_params.ACHTransferListParams, ), @@ -614,6 +616,7 @@ def list( external_account_id: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -663,6 +666,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, ach_transfer_list_params.ACHTransferListParams, ), diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 0a2b701ce..58c8ee1a5 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -184,6 +184,7 @@ def list( external_account_id: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: real_time_payments_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -234,6 +235,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), @@ -401,6 +403,7 @@ def list( external_account_id: str | NotGiven = NOT_GIVEN, idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, + status: real_time_payments_transfer_list_params.Status | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -451,6 +454,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), diff --git a/src/increase/types/ach_transfer_list_params.py b/src/increase/types/ach_transfer_list_params.py index f9d5b4c7f..49d621b90 100644 --- a/src/increase/types/ach_transfer_list_params.py +++ b/src/increase/types/ach_transfer_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime -from typing_extensions import Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["ACHTransferListParams", "CreatedAt"] +__all__ = ["ACHTransferListParams", "CreatedAt", "Status"] class ACHTransferListParams(TypedDict, total=False): @@ -37,6 +37,8 @@ class ACHTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + status: Status + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -62,3 +64,28 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "pending_transfer_session_confirmation", + "canceled", + "pending_submission", + "pending_reviewing", + "requires_attention", + "rejected", + "submitted", + "returned", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/real_time_payments_transfer_list_params.py b/src/increase/types/real_time_payments_transfer_list_params.py index 086a5444f..c3f46e2e1 100644 --- a/src/increase/types/real_time_payments_transfer_list_params.py +++ b/src/increase/types/real_time_payments_transfer_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime -from typing_extensions import Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["RealTimePaymentsTransferListParams", "CreatedAt"] +__all__ = ["RealTimePaymentsTransferListParams", "CreatedAt", "Status"] class RealTimePaymentsTransferListParams(TypedDict, total=False): @@ -42,6 +42,8 @@ class RealTimePaymentsTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + status: Status + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -67,3 +69,27 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "requires_attention", + "rejected", + "pending_submission", + "submitted", + "complete", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 3d01225ac..71022037d 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -152,6 +152,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) @@ -388,6 +389,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 8e90ed78e..68f5f75b7 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -137,6 +137,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @@ -280,6 +281,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) From 96f33abc0fd490e6ba6d4210ba1d43d019069354 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Mar 2025 19:18:25 +0000 Subject: [PATCH 0498/1325] chore(internal): version bump (#1056) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 27a3cb4d9..7ad6591ce 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.212.0" + ".": "0.213.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 16424c3ff..75966fb1d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.212.0" +version = "0.213.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3c3f5e7f5..8baa7ef41 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.212.0" # x-release-please-version +__version__ = "0.213.0" # x-release-please-version From bb45dd0ec68be570a08dcbc06f849e93575cfaf6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 14:25:39 +0000 Subject: [PATCH 0499/1325] feat(api): api update (#1057) --- .stats.yml | 4 ++-- src/increase/resources/simulations/ach_transfers.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 43f60f9cc..22f84a370 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33b4fdf3af0d0c7816a818cea776370220613e9ea8812a8339e6203d0f4b23e6.yml -openapi_spec_hash: 242db9c21568746bbbbdf9cf090db82e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0c56c1b233d21b65fc15f6f38bedf45c04afa14afc5ac02bbf6ab23d7bfa9120.yml +openapi_spec_hash: de85d714d7d32c0680577b47c7123390 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index e1443a6e4..394ce3ce7 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -488,7 +488,9 @@ def settle( ) -> ACHTransfer: """ Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal - Reserve. This transfer must first have a `status` of `submitted`. Without this + Reserve. This transfer must first have a `status` of `pending_submission` or + `submitted`. For convenience, if the transfer is in `status`: + `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same Federal Reserve timeline as in production. @@ -1029,7 +1031,9 @@ async def settle( ) -> ACHTransfer: """ Simulates the settlement of an [ACH Transfer](#ach-transfers) by the Federal - Reserve. This transfer must first have a `status` of `submitted`. Without this + Reserve. This transfer must first have a `status` of `pending_submission` or + `submitted`. For convenience, if the transfer is in `status`: + `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same Federal Reserve timeline as in production. From f69b0f75eee208065bf2d911e5e9d62569ae889d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 28 Mar 2025 23:33:25 +0000 Subject: [PATCH 0500/1325] feat(api): api update (#1059) --- .stats.yml | 4 ++-- src/increase/types/check_transfer_create_params.py | 8 ++++++++ tests/api_resources/test_check_transfers.py | 10 ++++++++-- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 22f84a370..b5601607b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0c56c1b233d21b65fc15f6f38bedf45c04afa14afc5ac02bbf6ab23d7bfa9120.yml -openapi_spec_hash: de85d714d7d32c0680577b47c7123390 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc8e6b6ae3f31bfee6a3b1ed5d48604196757c1a78fec7054dc453c44ab8aa86.yml +openapi_spec_hash: 720e772da4156f4325664fb8b8df1d81 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 2e44ed237..a87148450 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -133,3 +133,11 @@ class ThirdParty(TypedDict, total=False): generate a check number for you; you should inspect the response and use that check number. """ + + recipient_name: str + """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 + check is deposited. + """ diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 03ed3dc18..772927741 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -61,7 +61,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "signature_text": "Ian Crease", }, require_approval=True, - third_party={"check_number": "x"}, + third_party={ + "check_number": "x", + "recipient_name": "x", + }, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -341,7 +344,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "signature_text": "Ian Crease", }, require_approval=True, - third_party={"check_number": "x"}, + third_party={ + "check_number": "x", + "recipient_name": "x", + }, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) From 1633ac09f2387edacbeca2083f323b79a5f25ef8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 29 Mar 2025 02:47:57 +0000 Subject: [PATCH 0501/1325] chore(internal): version bump (#1060) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7ad6591ce..e459c8057 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.213.0" + ".": "0.214.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 75966fb1d..2ed2e9e3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.213.0" +version = "0.214.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8baa7ef41..bab479ba3 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.213.0" # x-release-please-version +__version__ = "0.214.0" # x-release-please-version From 39418923b486ecdba0f79e5bf3ed2e7c49e86860 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 04:22:59 +0000 Subject: [PATCH 0502/1325] feat(api): api update (#1061) --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5601607b..d0cc572f2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc8e6b6ae3f31bfee6a3b1ed5d48604196757c1a78fec7054dc453c44ab8aa86.yml -openapi_spec_hash: 720e772da4156f4325664fb8b8df1d81 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-980332df3fb6b765fea4323999ffdf03b0617292e11fb251d4c1cb7bfd669527.yml +openapi_spec_hash: a5853d13470a12038e0a6c5cb069d611 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index b19e7ce82..63a99126c 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -230,7 +230,10 @@ class Submission(BaseModel): class ThirdParty(BaseModel): check_number: Optional[str] = None - """The check number that will be printed on the check.""" + """The check number that you will print on the check.""" + + recipient_name: Optional[str] = None + """The name that you will print on the check.""" class CheckTransfer(BaseModel): From 7d5c13fd6d21e8b7f7d1ff6675da78ee371620b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 04:24:19 +0000 Subject: [PATCH 0503/1325] chore(internal): version bump (#1063) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e459c8057..948485aec 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.214.0" + ".": "0.215.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2ed2e9e3c..a9550f29a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.214.0" +version = "0.215.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index bab479ba3..61e76c2ea 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.214.0" # x-release-please-version +__version__ = "0.215.0" # x-release-please-version From b8702e2b67a23201d274110fc4fe5ae0b0bbbbf7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 31 Mar 2025 21:59:50 +0000 Subject: [PATCH 0504/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index d0cc572f2..f6dba556b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-980332df3fb6b765fea4323999ffdf03b0617292e11fb251d4c1cb7bfd669527.yml -openapi_spec_hash: a5853d13470a12038e0a6c5cb069d611 +openapi_spec_hash: 5557d7055e45f48cd8c15cdd36ca723f config_hash: 20a463ecd33bd32b7b9bc6f4990907ac From 59bdf540c6e3c6f19a5fab34c7c00b2c46b55f40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 00:25:36 +0000 Subject: [PATCH 0505/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f6dba556b..62d58d63a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-980332df3fb6b765fea4323999ffdf03b0617292e11fb251d4c1cb7bfd669527.yml -openapi_spec_hash: 5557d7055e45f48cd8c15cdd36ca723f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f7812edf7cc2702ee2c51eb2bc3bfa559603ab56425fa168273525992de3d2b.yml +openapi_spec_hash: 27bfac0b00197a65304846eda0acbf20 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac From 25f5e6be6a519624f083b5c37b065ce2cb57b161 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 00:26:32 +0000 Subject: [PATCH 0506/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 62d58d63a..fce62660b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f7812edf7cc2702ee2c51eb2bc3bfa559603ab56425fa168273525992de3d2b.yml openapi_spec_hash: 27bfac0b00197a65304846eda0acbf20 -config_hash: 20a463ecd33bd32b7b9bc6f4990907ac +config_hash: f0e682a0f84ccfd3863baa243059a0a1 From 1c42b2ee50b934f539ef568bd0230bca44f7ef17 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 00:33:28 +0000 Subject: [PATCH 0507/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fce62660b..62d58d63a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f7812edf7cc2702ee2c51eb2bc3bfa559603ab56425fa168273525992de3d2b.yml openapi_spec_hash: 27bfac0b00197a65304846eda0acbf20 -config_hash: f0e682a0f84ccfd3863baa243059a0a1 +config_hash: 20a463ecd33bd32b7b9bc6f4990907ac From a3114c395d9022151214653744292e82016f60c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:47:19 +0000 Subject: [PATCH 0508/1325] feat(api): api update (#1064) --- .stats.yml | 4 +- src/increase/types/entity.py | 17 ++-- .../entity_create_beneficial_owner_params.py | 24 +++-- src/increase/types/entity_create_params.py | 24 +++-- ..._update_beneficial_owner_address_params.py | 24 +++-- tests/api_resources/test_entities.py | 94 +++++++------------ 6 files changed, 91 insertions(+), 96 deletions(-) diff --git a/.stats.yml b/.stats.yml index 62d58d63a..208e661be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5f7812edf7cc2702ee2c51eb2bc3bfa559603ab56425fa168273525992de3d2b.yml -openapi_spec_hash: 27bfac0b00197a65304846eda0acbf20 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dbfb4cc4f72a4a3d1f957a3f02cda743d386896e85293e0cb3f2ce0c70af2ae5.yml +openapi_spec_hash: e8943405e5f69ae7d23a305a5c449fad config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index c9289fa41..fe6cd5b0b 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -59,8 +59,11 @@ class CorporationAddress(BaseModel): class CorporationBeneficialOwnerIndividualAddress(BaseModel): - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -68,14 +71,14 @@ class CorporationBeneficialOwnerIndividualAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class CorporationBeneficialOwnerIndividualIdentification(BaseModel): diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index 7c95dc04b..4735ba3d8 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -29,24 +29,30 @@ class EntityCreateBeneficialOwnerParams(TypedDict, total=False): class BeneficialOwnerIndividualAddress(TypedDict, total=False): - city: Required[str] - """The city of the address.""" + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] - """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. - """ + city: str + """The city, district, town, or village of the address. - zip: Required[str] - """The ZIP code of the address.""" + Required in certain countries. + """ line2: str """The second line of the address. This might be the floor or room number.""" + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. + """ + + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" + class BeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index e6d7a5823..7d3d6d52b 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -132,24 +132,30 @@ class CorporationAddress(TypedDict, total=False): class CorporationBeneficialOwnerIndividualAddress(TypedDict, total=False): - city: Required[str] - """The city of the address.""" + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] - """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. - """ + city: str + """The city, district, town, or village of the address. - zip: Required[str] - """The ZIP code of the address.""" + Required in certain countries. + """ line2: str """The second line of the address. This might be the floor or room number.""" + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. + """ + + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" + class CorporationBeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py index 862389978..8024488fa 100644 --- a/src/increase/types/entity_update_beneficial_owner_address_params.py +++ b/src/increase/types/entity_update_beneficial_owner_address_params.py @@ -22,20 +22,26 @@ class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): class Address(TypedDict, total=False): - city: Required[str] - """The city of the address.""" + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] - """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. - """ + city: str + """The city, district, town, or village of the address. - zip: Required[str] - """The ZIP code of the address.""" + Required in certain countries. + """ line2: str """The second line of the address. This might be the floor or room number.""" + + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. + """ + + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 2ddeb653b..4836e1994 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -44,11 +44,12 @@ def test_method_create_with_all_params(self, client: Increase) -> None: { "individual": { "address": { - "city": "New York", + "country": "x", "line1": "33 Liberty Street", + "city": "New York", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -505,10 +506,8 @@ def test_method_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -529,11 +528,12 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase) beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "city": "New York", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -574,10 +574,8 @@ def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -602,10 +600,8 @@ def test_streaming_response_create_beneficial_owner(self, client: Increase) -> N beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -633,10 +629,8 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -730,10 +724,8 @@ def test_method_update_beneficial_owner_address(self, client: Increase) -> None: entity = client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -744,11 +736,12 @@ def test_method_update_beneficial_owner_address_with_all_params(self, client: In entity = client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "city": "New York", + "line2": "Unit 2", "state": "NY", "zip": "10045", - "line2": "Unit 2", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -759,10 +752,8 @@ def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> response = client.entities.with_raw_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -777,10 +768,8 @@ def test_streaming_response_update_beneficial_owner_address(self, client: Increa with client.entities.with_streaming_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) as response: @@ -798,10 +787,8 @@ def test_path_params_update_beneficial_owner_address(self, client: Increase) -> client.entities.with_raw_response.update_beneficial_owner_address( entity_id="", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -875,11 +862,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) { "individual": { "address": { - "city": "New York", + "country": "x", "line1": "33 Liberty Street", + "city": "New York", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1336,10 +1324,8 @@ async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1360,11 +1346,12 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "city": "New York", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1405,10 +1392,8 @@ async def test_raw_response_create_beneficial_owner(self, async_client: AsyncInc beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1433,10 +1418,8 @@ async def test_streaming_response_create_beneficial_owner(self, async_client: As beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1464,10 +1447,8 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr beneficial_owner={ "individual": { "address": { - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, "date_of_birth": parse_date("1970-01-31"), "identification": { @@ -1561,10 +1542,8 @@ async def test_method_update_beneficial_owner_address(self, async_client: AsyncI entity = await async_client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -1575,11 +1554,12 @@ async def test_method_update_beneficial_owner_address_with_all_params(self, asyn entity = await async_client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "city": "New York", + "line2": "Unit 2", "state": "NY", "zip": "10045", - "line2": "Unit 2", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -1590,10 +1570,8 @@ async def test_raw_response_update_beneficial_owner_address(self, async_client: response = await async_client.entities.with_raw_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) @@ -1608,10 +1586,8 @@ async def test_streaming_response_update_beneficial_owner_address(self, async_cl async with async_client.entities.with_streaming_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) as response: @@ -1629,10 +1605,8 @@ async def test_path_params_update_beneficial_owner_address(self, async_client: A await async_client.entities.with_raw_response.update_beneficial_owner_address( entity_id="", address={ - "city": "New York", + "country": "US", "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) From f9efb735fd152392908fee302b0431b4403dc6fb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 14:48:42 +0000 Subject: [PATCH 0509/1325] fix: pluralize `list` response variables (#1066) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 948485aec..345dc1229 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.215.0" + ".": "0.216.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a9550f29a..011ef4b61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.215.0" +version = "0.216.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 61e76c2ea..ed3f7a7b4 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.215.0" # x-release-please-version +__version__ = "0.216.0" # x-release-please-version From ee21431001065ca0fb3c396887dc0d6a156365c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:53:18 +0000 Subject: [PATCH 0510/1325] feat(api): api update (#1067) --- .stats.yml | 4 ++-- .../resources/simulations/card_authorizations.py | 10 ++++++++++ .../simulations/card_authorization_create_params.py | 7 +++++++ .../simulations/test_card_authorizations.py | 2 ++ 4 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 208e661be..7a1085205 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dbfb4cc4f72a4a3d1f957a3f02cda743d386896e85293e0cb3f2ce0c70af2ae5.yml -openapi_spec_hash: e8943405e5f69ae7d23a305a5c449fad +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33bdf702b7e17c6ce26736fdcbf42437952f56eed26df196c073d8c2d0405364.yml +openapi_spec_hash: e528f453ee22576ba66bc039e99977a9 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 81fc40c65..04e192319 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -82,6 +82,7 @@ def create( merchant_descriptor: str | NotGiven = NOT_GIVEN, merchant_state: str | NotGiven = NOT_GIVEN, network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, + network_risk_score: int | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -169,6 +170,9 @@ def create( network_details: Fields specific to a given card network. + network_risk_score: The risk score generated by the card network. For Visa this is the Visa Advanced + Authorization risk score, from 0 to 99, where 99 is the riskiest. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -202,6 +206,7 @@ def create( "merchant_descriptor": merchant_descriptor, "merchant_state": merchant_state, "network_details": network_details, + "network_risk_score": network_risk_score, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, @@ -274,6 +279,7 @@ async def create( merchant_descriptor: str | NotGiven = NOT_GIVEN, merchant_state: str | NotGiven = NOT_GIVEN, network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, + network_risk_score: int | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -361,6 +367,9 @@ async def create( network_details: Fields specific to a given card network. + network_risk_score: The risk score generated by the card network. For Visa this is the Visa Advanced + Authorization risk score, from 0 to 99, where 99 is the riskiest. + physical_card_id: The identifier of the Physical Card to be authorized. terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -394,6 +403,7 @@ async def create( "merchant_descriptor": merchant_descriptor, "merchant_state": merchant_state, "network_details": network_details, + "network_risk_score": network_risk_score, "physical_card_id": physical_card_id, "terminal_id": terminal_id, }, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 29203d2ae..6704fc21e 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -118,6 +118,13 @@ class CardAuthorizationCreateParams(TypedDict, total=False): network_details: NetworkDetails """Fields specific to a given card network.""" + network_risk_score: int + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + physical_card_id: str """The identifier of the Physical Card to be authorized.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index 5c8e03185..891bef151 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -41,6 +41,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: merchant_descriptor="AMAZON.COM", merchant_state="NY", network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, + network_risk_score=0, physical_card_id="physical_card_id", terminal_id="x", ) @@ -98,6 +99,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) merchant_descriptor="AMAZON.COM", merchant_state="NY", network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, + network_risk_score=0, physical_card_id="physical_card_id", terminal_id="x", ) From 1766430ea80cdc9b8094d671cec09d85b1fabfdc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Apr 2025 15:54:30 +0000 Subject: [PATCH 0511/1325] chore(internal): version bump (#1069) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 345dc1229..70486fbf9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.216.0" + ".": "0.217.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 011ef4b61..f21a43ed5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.216.0" +version = "0.217.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ed3f7a7b4..98f841162 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.216.0" # x-release-please-version +__version__ = "0.217.0" # x-release-please-version From 76ae4a2dbc57ab452b44a0645132b76ee0bec9ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 21:24:02 +0000 Subject: [PATCH 0512/1325] feat(api): api update (#1070) --- .stats.yml | 4 +- src/increase/types/digital_wallet_token.py | 52 +++++++++++++++++++++- src/increase/types/real_time_decision.py | 9 ++++ 3 files changed, 61 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7a1085205..d1dcd2971 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33bdf702b7e17c6ce26736fdcbf42437952f56eed26df196c073d8c2d0405364.yml -openapi_spec_hash: e528f453ee22576ba66bc039e99977a9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2f220d665fe0014a15369e084c2ad554dc9dbe6758e079b40af056153807fe1f.yml +openapi_spec_hash: 280b322bc7ae0fc3eb4ea18d73fa01ae config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py index de9fb6a49..034a31788 100644 --- a/src/increase/types/digital_wallet_token.py +++ b/src/increase/types/digital_wallet_token.py @@ -1,12 +1,54 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List +from typing import List, Optional from datetime import datetime from typing_extensions import Literal from .._models import BaseModel -__all__ = ["DigitalWalletToken", "Update"] +__all__ = ["DigitalWalletToken", "Cardholder", "Device", "Update"] + + +class Cardholder(BaseModel): + name: Optional[str] = None + """Name of the cardholder, for example "John Smith".""" + + +class Device(BaseModel): + device_type: Optional[ + Literal[ + "unknown", + "mobile_phone", + "tablet", + "watch", + "mobilephone_or_tablet", + "pc", + "household_device", + "wearable_device", + "automobile_device", + ] + ] = None + """Device type. + + - `unknown` - Unknown + - `mobile_phone` - Mobile Phone + - `tablet` - Tablet + - `watch` - Watch + - `mobilephone_or_tablet` - Mobile Phone or Tablet + - `pc` - PC + - `household_device` - Household Device + - `wearable_device` - Wearable Device + - `automobile_device` - Automobile Device + """ + + identifier: Optional[str] = None + """ID assigned to the device by the digital wallet provider.""" + + ip_address: Optional[str] = None + """IP address of the device.""" + + name: Optional[str] = None + """Name of the device, for example "My Work Phone".""" class Update(BaseModel): @@ -34,12 +76,18 @@ class DigitalWalletToken(BaseModel): card_id: str """The identifier for the Card this Digital Wallet Token belongs to.""" + cardholder: Cardholder + """The cardholder information given when the Digital Wallet Token was created.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Digital Wallet Token was created. """ + device: Device + """The device that was used to create the Digital Wallet Token.""" + status: Literal["active", "inactive", "suspended", "deactivated"] """This indicates if payments can be made with the Digital Wallet Token. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 4abdf5873..2ba75df27 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -21,6 +21,7 @@ "CardAuthorizationVerificationCardholderAddress", "DigitalWalletAuthentication", "DigitalWalletToken", + "DigitalWalletTokenDevice", ] @@ -503,6 +504,11 @@ class DigitalWalletAuthentication(BaseModel): """ +class DigitalWalletTokenDevice(BaseModel): + identifier: Optional[str] = None + """ID assigned to the device by the digital wallet provider.""" + + class DigitalWalletToken(BaseModel): card_id: str """The identifier of the Card that is being tokenized.""" @@ -523,6 +529,9 @@ class DigitalWalletToken(BaseModel): - `decline` - Decline the provisioning request. """ + device: DigitalWalletTokenDevice + """Device that is being used to provision the digital wallet token.""" + digital_wallet: Literal["apple_pay", "google_pay", "samsung_pay", "unknown"] """The digital wallet app being used. From afe89e565a7dac67f05681b1d2d64eac35d2c456 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Apr 2025 21:25:47 +0000 Subject: [PATCH 0513/1325] chore(internal): version bump (#1072) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 70486fbf9..8d521d91f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.217.0" + ".": "0.218.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f21a43ed5..a73d2d154 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.217.0" +version = "0.218.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 98f841162..4dd72ec81 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.217.0" # x-release-please-version +__version__ = "0.218.0" # x-release-please-version From d8bcd9124392cc0077ca61ed535d30f8ebdbf7b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Apr 2025 15:56:02 +0000 Subject: [PATCH 0514/1325] chore(internal): remove trailing character (#1073) --- tests/test_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_client.py b/tests/test_client.py index b5ea44f9a..af9afe1b5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -1739,7 +1739,7 @@ def test_get_platform(self) -> None: import threading from increase._utils import asyncify - from increase._base_client import get_platform + from increase._base_client import get_platform async def test_main() -> None: result = await asyncify(get_platform)() From 3d95cb7f9fc25869ad863b2bb1c924e50b91ca2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 00:06:12 +0000 Subject: [PATCH 0515/1325] feat(api): api update (#1075) --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 8 ++++---- src/increase/types/declined_transaction.py | 2 +- src/increase/types/pending_transaction.py | 2 +- src/increase/types/real_time_decision.py | 2 +- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1dcd2971..55cddcc8c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2f220d665fe0014a15369e084c2ad554dc9dbe6758e079b40af056153807fe1f.yml -openapi_spec_hash: 280b322bc7ae0fc3eb4ea18d73fa01ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-49cf09bfa8351df7daf0d1062d57dc1338c8882c7614ccabbf4903806d9b102e.yml +openapi_spec_hash: c2ae776a3a8e619c33606f2d14716ffe config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index ffe464848..dbb24d19e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -99,7 +99,7 @@ class ElementCardAuthenticationChallenge(BaseModel): - `text_message` - The one-time code was sent via text message. - `email` - The one-time code was sent via email. - - `none_available` - The one-time code was not successfully delievered. + - `none_available` - The one-time code was not successfully delivered. """ verification_value: Optional[str] = None @@ -420,7 +420,7 @@ class ElementCardAuthorizationVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street @@ -837,7 +837,7 @@ class ElementCardDeclineVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street @@ -2691,7 +2691,7 @@ class ElementCardValidationVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 246058e02..b6e27b058 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -298,7 +298,7 @@ class SourceCardDeclineVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 2a72048d3..071a5aec4 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -246,7 +246,7 @@ class SourceCardAuthorizationVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 2ba75df27..b56bcf975 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -290,7 +290,7 @@ class CardAuthorizationVerificationCardholderAddress(BaseModel): ] """The address verification result returned to the card network. - - `not_checked` - No adress was provided in the authorization request. + - `not_checked` - No address was provided in the authorization request. - `postal_code_match_address_not_checked` - Postal code matches, but the street address was not verified. - `postal_code_match_address_no_match` - Postal code matches, but the street From ac45d40a2cacb6084187cd7ceb5bec2fdcec8956 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Apr 2025 00:07:17 +0000 Subject: [PATCH 0516/1325] chore(internal): version bump (#1076) --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8d521d91f..e4e2c7e05 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.218.0" + ".": "0.219.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a73d2d154..1e9f8e103 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.218.0" +version = "0.219.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4dd72ec81..a1d468b81 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.218.0" # x-release-please-version +__version__ = "0.219.0" # x-release-please-version From e3a6dcec5808a3933d95be0ae83ba8676fe739a2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 12:10:34 +0000 Subject: [PATCH 0517/1325] chore(internal): slight transform perf improvement (#1077) --- src/increase/_utils/_transform.py | 22 ++++++++++++++++++++++ tests/test_transform.py | 12 ++++++++++++ 2 files changed, 34 insertions(+) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index 7ac2e17fb..3ec620818 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -142,6 +142,10 @@ def _maybe_transform_key(key: str, type_: type) -> str: return key +def _no_transform_needed(annotation: type) -> bool: + return annotation == float or annotation == int + + def _transform_recursive( data: object, *, @@ -184,6 +188,15 @@ def _transform_recursive( return cast(object, data) inner_type = extract_type_arg(stripped_type, 0) + if _no_transform_needed(inner_type): + # for some types there is no need to transform anything, so we can get a small + # perf boost from skipping that work. + # + # but we still need to convert to a list to ensure the data is json-serializable + if is_list(data): + return data + return list(data) + return [_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data] if is_union_type(stripped_type): @@ -332,6 +345,15 @@ async def _async_transform_recursive( return cast(object, data) inner_type = extract_type_arg(stripped_type, 0) + if _no_transform_needed(inner_type): + # for some types there is no need to transform anything, so we can get a small + # perf boost from skipping that work. + # + # but we still need to convert to a list to ensure the data is json-serializable + if is_list(data): + return data + return list(data) + return [await _async_transform_recursive(d, annotation=annotation, inner_type=inner_type) for d in data] if is_union_type(stripped_type): diff --git a/tests/test_transform.py b/tests/test_transform.py index 80c914329..f100b2dc9 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -432,3 +432,15 @@ async def test_base64_file_input(use_async: bool) -> None: assert await transform({"foo": io.BytesIO(b"Hello, world!")}, TypedDictBase64Input, use_async) == { "foo": "SGVsbG8sIHdvcmxkIQ==" } # type: ignore[comparison-overlap] + + +@parametrize +@pytest.mark.asyncio +async def test_transform_skipping(use_async: bool) -> None: + # lists of ints are left as-is + data = [1, 2, 3] + assert await transform(data, List[int], use_async) is data + + # iterables of ints are converted to a list + data = iter([1, 2, 3]) + assert await transform(data, Iterable[int], use_async) == [1, 2, 3] From dfa227a5f78bc7b708c3c5579cec67c87a10c6e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 14:23:52 +0000 Subject: [PATCH 0518/1325] chore(tests): improve enum examples (#1079) --- .../simulations/test_ach_transfers.py | 16 ++++++------- .../simulations/test_card_disputes.py | 20 ++++++++-------- .../simulations/test_physical_cards.py | 16 ++++++------- tests/api_resources/test_account_numbers.py | 8 +++---- tests/api_resources/test_entities.py | 24 +++++++++---------- tests/api_resources/test_exports.py | 16 ++++++------- .../test_inbound_ach_transfers.py | 20 ++++++++-------- tests/api_resources/test_lockboxes.py | 4 ++-- tests/api_resources/test_physical_cards.py | 16 ++++++------- 9 files changed, 70 insertions(+), 70 deletions(-) diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 72f7146d2..75340d757 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -59,7 +59,7 @@ def test_path_params_acknowledge(self, client: Increase) -> None: def test_method_create_notification_of_change(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -68,7 +68,7 @@ def test_method_create_notification_of_change(self, client: Increase) -> None: def test_raw_response_create_notification_of_change(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -81,7 +81,7 @@ def test_raw_response_create_notification_of_change(self, client: Increase) -> N def test_streaming_response_create_notification_of_change(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) as response: assert not response.is_closed @@ -97,7 +97,7 @@ def test_path_params_create_notification_of_change(self, client: Increase) -> No with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -269,7 +269,7 @@ async def test_path_params_acknowledge(self, async_client: AsyncIncrease) -> Non async def test_method_create_notification_of_change(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @@ -278,7 +278,7 @@ async def test_method_create_notification_of_change(self, async_client: AsyncInc async def test_raw_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) @@ -291,7 +291,7 @@ async def test_raw_response_create_notification_of_change(self, async_client: As async def test_streaming_response_create_notification_of_change(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.create_notification_of_change( ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) as response: assert not response.is_closed @@ -307,7 +307,7 @@ async def test_path_params_create_notification_of_change(self, async_client: Asy with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.create_notification_of_change( ach_transfer_id="", - change_code="incorrect_account_number", + change_code="incorrect_routing_number", corrected_data="123456789", ) diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py index b7b4e2630..15ed4aebc 100644 --- a/tests/api_resources/simulations/test_card_disputes.py +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -21,7 +21,7 @@ class TestCardDisputes: def test_method_action(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -29,7 +29,7 @@ def test_method_action(self, client: Increase) -> None: def test_method_action_with_all_params(self, client: Increase) -> None: card_dispute = client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -38,7 +38,7 @@ def test_method_action_with_all_params(self, client: Increase) -> None: def test_raw_response_action(self, client: Increase) -> None: response = client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) assert response.is_closed is True @@ -50,7 +50,7 @@ def test_raw_response_action(self, client: Increase) -> None: def test_streaming_response_action(self, client: Increase) -> None: with client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -65,7 +65,7 @@ def test_path_params_action(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="pending_user_information", + status="rejected", ) @@ -76,7 +76,7 @@ class TestAsyncCardDisputes: async def test_method_action(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -84,7 +84,7 @@ async def test_method_action(self, async_client: AsyncIncrease) -> None: async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.simulations.card_disputes.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", explanation="This was a valid recurring transaction", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @@ -93,7 +93,7 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) assert response.is_closed is True @@ -105,7 +105,7 @@ async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.card_disputes.with_streaming_response.action( card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="pending_user_information", + status="rejected", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -120,5 +120,5 @@ async def test_path_params_action(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): await async_client.simulations.card_disputes.with_raw_response.action( card_dispute_id="", - status="pending_user_information", + status="rejected", ) diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 4aeaa85ab..419377273 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -21,7 +21,7 @@ class TestPhysicalCards: def test_method_advance_shipment(self, client: Increase) -> None: physical_card = client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -29,7 +29,7 @@ def test_method_advance_shipment(self, client: Increase) -> None: def test_raw_response_advance_shipment(self, client: Increase) -> None: response = client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) assert response.is_closed is True @@ -41,7 +41,7 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None: def test_streaming_response_advance_shipment(self, client: Increase) -> None: with client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,7 +56,7 @@ def test_path_params_advance_shipment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - shipment_status="pending", + shipment_status="shipped", ) @@ -67,7 +67,7 @@ class TestAsyncPhysicalCards: async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -75,7 +75,7 @@ async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> Non async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) assert response.is_closed is True @@ -87,7 +87,7 @@ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="pending", + shipment_status="shipped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,5 +102,5 @@ async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) - with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - shipment_status="pending", + shipment_status="shipped", ) diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index d9f8e4d4a..45d2e6ea9 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -114,10 +114,10 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account_number = client.account_numbers.update( account_number_id="account_number_v18nkfqm6afpsrvy82b2", - inbound_ach={"debit_status": "allowed"}, + inbound_ach={"debit_status": "blocked"}, inbound_checks={"status": "allowed"}, name="x", - status="active", + status="disabled", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @@ -292,10 +292,10 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.update( account_number_id="account_number_v18nkfqm6afpsrvy82b2", - inbound_ach={"debit_status": "allowed"}, + inbound_ach={"debit_status": "blocked"}, inbound_checks={"status": "allowed"}, name="x", - status="active", + status="disabled", ) assert_matches_type(AccountNumber, account_number, path=["response"]) diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 4836e1994..91ffd4dff 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -77,7 +77,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "Ian Crease", "confirmed_no_us_tax_id": True, }, - "prongs": ["ownership"], + "prongs": ["control"], "company_title": "CEO", } ], @@ -516,7 +516,7 @@ def test_method_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -561,7 +561,7 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase) "name": "Ian Crease", "confirmed_no_us_tax_id": True, }, - "prongs": ["ownership"], + "prongs": ["control"], "company_title": "CEO", }, ) @@ -584,7 +584,7 @@ def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) @@ -610,7 +610,7 @@ def test_streaming_response_create_beneficial_owner(self, client: Increase) -> N }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) as response: assert not response.is_closed @@ -639,7 +639,7 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) @@ -895,7 +895,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "Ian Crease", "confirmed_no_us_tax_id": True, }, - "prongs": ["ownership"], + "prongs": ["control"], "company_title": "CEO", } ], @@ -1334,7 +1334,7 @@ async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1379,7 +1379,7 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client "name": "Ian Crease", "confirmed_no_us_tax_id": True, }, - "prongs": ["ownership"], + "prongs": ["control"], "company_title": "CEO", }, ) @@ -1402,7 +1402,7 @@ async def test_raw_response_create_beneficial_owner(self, async_client: AsyncInc }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) @@ -1428,7 +1428,7 @@ async def test_streaming_response_create_beneficial_owner(self, async_client: As }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) as response: assert not response.is_closed @@ -1457,7 +1457,7 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr }, "name": "Ian Crease", }, - "prongs": ["ownership"], + "prongs": ["control"], }, ) diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index c76dbb282..28c52bf07 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -22,14 +22,14 @@ class TestExports: @parametrize def test_method_create(self, client: Increase) -> None: export = client.exports.create( - category="account_statement_ofx", + category="transaction_csv", ) assert_matches_type(Export, export, path=["response"]) @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: export = client.exports.create( - category="account_statement_ofx", + category="transaction_csv", account_statement_ofx={ "account_id": "account_id", "created_at": { @@ -76,7 +76,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.exports.with_raw_response.create( - category="account_statement_ofx", + category="transaction_csv", ) assert response.is_closed is True @@ -87,7 +87,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.exports.with_streaming_response.create( - category="account_statement_ofx", + category="transaction_csv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -184,14 +184,14 @@ class TestAsyncExports: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.create( - category="account_statement_ofx", + category="transaction_csv", ) assert_matches_type(Export, export, path=["response"]) @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.create( - category="account_statement_ofx", + category="transaction_csv", account_statement_ofx={ "account_id": "account_id", "created_at": { @@ -238,7 +238,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.exports.with_raw_response.create( - category="account_statement_ofx", + category="transaction_csv", ) assert response.is_closed is True @@ -249,7 +249,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.exports.with_streaming_response.create( - category="account_statement_ofx", + category="transaction_csv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index f6e589921..72670ef54 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -163,7 +163,7 @@ def test_method_decline(self, client: Increase) -> None: def test_method_decline_with_all_params(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.decline( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -204,7 +204,7 @@ def test_path_params_decline(self, client: Increase) -> None: def test_method_transfer_return(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -212,7 +212,7 @@ def test_method_transfer_return(self, client: Increase) -> None: def test_raw_response_transfer_return(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert response.is_closed is True @@ -224,7 +224,7 @@ def test_raw_response_transfer_return(self, client: Increase) -> None: def test_streaming_response_transfer_return(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,7 +241,7 @@ def test_path_params_transfer_return(self, client: Increase) -> None: ): client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="", - reason="insufficient_funds", + reason="payment_stopped", ) @@ -390,7 +390,7 @@ async def test_method_decline(self, async_client: AsyncIncrease) -> None: async def test_method_decline_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.decline( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -431,7 +431,7 @@ async def test_path_params_decline(self, async_client: AsyncIncrease) -> None: async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @@ -439,7 +439,7 @@ async def test_method_transfer_return(self, async_client: AsyncIncrease) -> None async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) assert response.is_closed is True @@ -451,7 +451,7 @@ async def test_raw_response_transfer_return(self, async_client: AsyncIncrease) - async def test_streaming_response_transfer_return(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.transfer_return( inbound_ach_transfer_id="inbound_ach_transfer_tdrwqr3fq9gnnq49odev", - reason="insufficient_funds", + reason="payment_stopped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -468,5 +468,5 @@ async def test_path_params_transfer_return(self, async_client: AsyncIncrease) -> ): await async_client.inbound_ach_transfers.with_raw_response.transfer_return( inbound_ach_transfer_id="", - reason="insufficient_funds", + reason="payment_stopped", ) diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index 2f1f24439..d101bf24f 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -110,7 +110,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", recipient_name="x", - status="active", + status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -281,7 +281,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) lockbox_id="lockbox_3xt21ok13q19advds4t5", description="x", recipient_name="x", - status="active", + status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index b538d6394..f26214336 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -161,7 +161,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: def test_method_update(self, client: Increase) -> None: physical_card = client.physical_cards.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -169,7 +169,7 @@ def test_method_update(self, client: Increase) -> None: def test_raw_response_update(self, client: Increase) -> None: response = client.physical_cards.with_raw_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) assert response.is_closed is True @@ -181,7 +181,7 @@ def test_raw_response_update(self, client: Increase) -> None: def test_streaming_response_update(self, client: Increase) -> None: with client.physical_cards.with_streaming_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,7 +196,7 @@ def test_path_params_update(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): client.physical_cards.with_raw_response.update( physical_card_id="", - status="active", + status="disabled", ) @parametrize @@ -384,7 +384,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: async def test_method_update(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @@ -392,7 +392,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_cards.with_raw_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) assert response.is_closed is True @@ -404,7 +404,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.physical_cards.with_streaming_response.update( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - status="active", + status="disabled", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -419,7 +419,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): await async_client.physical_cards.with_raw_response.update( physical_card_id="", - status="active", + status="disabled", ) @parametrize From 797e07e8aa8ec580b25deb4b4193a16a52236791 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 21:49:05 +0000 Subject: [PATCH 0519/1325] chore: slight wording improvement in README (#1080) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ad3ccd20a..46b44495b 100644 --- a/README.md +++ b/README.md @@ -163,7 +163,7 @@ print(account.id) ## File uploads -Request parameters that correspond to file uploads can be passed as `bytes`, a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`. +Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`. ```python from pathlib import Path From 2b8ddb9a382150f9f459287fd290f5dee3d57b70 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 21:56:08 +0000 Subject: [PATCH 0520/1325] feat(api): api update (#1081) --- .stats.yml | 4 +-- src/increase/types/check_transfer.py | 42 ++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 55cddcc8c..2321b5ab5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-49cf09bfa8351df7daf0d1062d57dc1338c8882c7614ccabbf4903806d9b102e.yml -openapi_spec_hash: c2ae776a3a8e619c33606f2d14716ffe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b2d84fdfb16939f30882bde0044da8597aec7781ae893427f8b2ae0fe7ae46bd.yml +openapi_spec_hash: c6bda602710711349a6e04dd1a9b8fe6 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 63a99126c..3f5feff94 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -21,6 +21,7 @@ "PhysicalCheckTrackingUpdate", "StopPaymentRequest", "Submission", + "SubmissionSubmittedAddress", "ThirdParty", ] @@ -223,7 +224,48 @@ class StopPaymentRequest(BaseModel): """ +class SubmissionSubmittedAddress(BaseModel): + city: str + """The submitted address city.""" + + line1: str + """The submitted address line 1.""" + + line2: Optional[str] = None + """The submitted address line 2.""" + + recipient_name: str + """The submitted recipient name.""" + + state: str + """The submitted address state.""" + + zip: str + """The submitted address zip.""" + + class Submission(BaseModel): + address_correction_action: Literal["none", "standardization", "standardization_with_address_change", "error"] + """ + Per USPS requirements, Increase will standardize the address to USPS standards + and check it against the USPS National Change of Address (NCOA) database before + mailing it. This indicates what modifications, if any, were made to the address + before printing and mailing the check. + + - `none` - No address correction took place. + - `standardization` - The address was standardized. + - `standardization_with_address_change` - The address was first standardized and + then changed because the recipient moved. + - `error` - An error occurred while correcting the address. This typically means + the USPS could not find that address. The address was not changed. + """ + + submitted_address: SubmissionSubmittedAddress + """The address we submitted to the printer. + + This is what is physically printed on the check. + """ + submitted_at: datetime """When this check transfer was submitted to our check printer.""" From d2f0476c915d8b5d6a41ef46f36e691fb1c00dc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 21:57:11 +0000 Subject: [PATCH 0521/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e4e2c7e05..b2c057915 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.219.0" + ".": "0.220.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1e9f8e103..1a5e70592 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.219.0" +version = "0.220.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a1d468b81..6e99d0923 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.219.0" # x-release-please-version +__version__ = "0.220.0" # x-release-please-version From e00df3921a664a8949db918588e53d6cecb0850e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Apr 2025 22:01:27 +0000 Subject: [PATCH 0522/1325] feat(api): api update (#1082) --- .stats.yml | 4 ++-- src/increase/resources/physical_card_profiles.py | 8 ++++++++ src/increase/types/physical_card_profile_create_params.py | 3 +++ tests/api_resources/test_physical_card_profiles.py | 6 ++++++ 4 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2321b5ab5..31b1c0195 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b2d84fdfb16939f30882bde0044da8597aec7781ae893427f8b2ae0fe7ae46bd.yml -openapi_spec_hash: c6bda602710711349a6e04dd1a9b8fe6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b21d5da00193c0adcbbc6bb89b6eba07c1b8720b9c383e2496d9c68a9426925e.yml +openapi_spec_hash: fb8ac77c8609e18634121b86b378f332 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 73102dfa9..ce72ff36f 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -56,6 +56,7 @@ def create( contact_phone: str, description: str, front_image_file_id: str, + program_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -76,6 +77,8 @@ def create( front_image_file_id: The identifier of the File containing the physical card's front image. + program_id: The identifier for the Program that this Physical Card Profile falls under. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -94,6 +97,7 @@ def create( "contact_phone": contact_phone, "description": description, "front_image_file_id": front_image_file_id, + "program_id": program_id, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, ), @@ -343,6 +347,7 @@ async def create( contact_phone: str, description: str, front_image_file_id: str, + program_id: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -363,6 +368,8 @@ async def create( front_image_file_id: The identifier of the File containing the physical card's front image. + program_id: The identifier for the Program that this Physical Card Profile falls under. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -381,6 +388,7 @@ async def create( "contact_phone": contact_phone, "description": description, "front_image_file_id": front_image_file_id, + "program_id": program_id, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, ), diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index bd67cd31a..5c79e2790 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -19,3 +19,6 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): front_image_file_id: Required[str] """The identifier of the File containing the physical card's front image.""" + + program_id: Required[str] + """The identifier for the Program that this Physical Card Profile falls under.""" diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index c6e34e5c4..45849ccfa 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -27,6 +27,7 @@ def test_method_create(self, client: Increase) -> None: contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @@ -37,6 +38,7 @@ def test_raw_response_create(self, client: Increase) -> None: contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) assert response.is_closed is True @@ -51,6 +53,7 @@ def test_streaming_response_create(self, client: Increase) -> None: contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,6 +244,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @@ -251,6 +255,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) assert response.is_closed is True @@ -265,6 +270,7 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N contact_phone="+16505046304", description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From d9a7a3e7bb317c1da7d7abc59de819521720e3da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 02:39:55 +0000 Subject: [PATCH 0523/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b2c057915..ee93e8ac5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.220.0" + ".": "0.221.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1a5e70592..3c6d7f17f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.220.0" +version = "0.221.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6e99d0923..3f6444f3e 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.220.0" # x-release-please-version +__version__ = "0.221.0" # x-release-please-version From dccf8cd73dfe86be4a0de84124864f6f1964a985 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 16:32:14 +0000 Subject: [PATCH 0524/1325] chore(internal): expand CI branch coverage (#1084) --- .github/workflows/ci.yml | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3b286e5ae..53a3a09c9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,18 @@ name: CI on: push: - branches: - - main - pull_request: - branches: - - main - - next + branches-ignore: + - 'generated' + - 'codegen/**' + - 'integrated/**' + - 'preview-head/**' + - 'preview-base/**' + - 'preview/**' jobs: lint: name: lint runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 @@ -33,7 +33,6 @@ jobs: test: name: test runs-on: ubuntu-latest - steps: - uses: actions/checkout@v4 From 36eb7b6a2fdb944890ecefe699548d4ae180615d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Apr 2025 21:07:46 +0000 Subject: [PATCH 0525/1325] chore(internal): reduce CI branch coverage --- .github/workflows/ci.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53a3a09c9..81f6dc20f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,13 +1,12 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'preview-head/**' - - 'preview-base/**' - - 'preview/**' + branches: + - main + pull_request: + branches: + - main + - next jobs: lint: From 3ded45e64050edd5fea324bf6587281724310315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 06:04:20 +0000 Subject: [PATCH 0526/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 18 ++++++++++-------- src/increase/types/transaction.py | 18 ++++++++++-------- 3 files changed, 22 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31b1c0195..3858b6bd9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b21d5da00193c0adcbbc6bb89b6eba07c1b8720b9c383e2496d9c68a9426925e.yml -openapi_spec_hash: fb8ac77c8609e18634121b86b378f332 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63680844d4d1a81c90d30b2ad628b779e382c4ca7eac979a2f707782d5ffe005.yml +openapi_spec_hash: e9dae8d72e60ff9bd03e3baad11e9f48 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index dbb24d19e..ccd604870 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1280,10 +1280,11 @@ class ElementCardRefundCashback(BaseModel): class ElementCardRefundInterchange(BaseModel): amount: str - """The interchange amount given as a string containing a decimal number. - - The amount is a positive number if it is credited to Increase (e.g., - settlements) and a negative number if it is debited (e.g., refunds). + """ + The interchange amount given as a string containing a decimal number in major + units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + credited to Increase (e.g., settlements) and a negative number if it is debited + (e.g., refunds). """ code: Optional[str] = None @@ -1961,10 +1962,11 @@ class ElementCardSettlementCashback(BaseModel): class ElementCardSettlementInterchange(BaseModel): amount: str - """The interchange amount given as a string containing a decimal number. - - The amount is a positive number if it is credited to Increase (e.g., - settlements) and a negative number if it is debited (e.g., refunds). + """ + The interchange amount given as a string containing a decimal number in major + units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + credited to Increase (e.g., settlements) and a negative number if it is debited + (e.g., refunds). """ code: Optional[str] = None diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 1f765d93f..3f49a6d99 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -433,10 +433,11 @@ class SourceCardRefundCashback(BaseModel): class SourceCardRefundInterchange(BaseModel): amount: str - """The interchange amount given as a string containing a decimal number. - - The amount is a positive number if it is credited to Increase (e.g., - settlements) and a negative number if it is debited (e.g., refunds). + """ + The interchange amount given as a string containing a decimal number in major + units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + credited to Increase (e.g., settlements) and a negative number if it is debited + (e.g., refunds). """ code: Optional[str] = None @@ -1019,10 +1020,11 @@ class SourceCardSettlementCashback(BaseModel): class SourceCardSettlementInterchange(BaseModel): amount: str - """The interchange amount given as a string containing a decimal number. - - The amount is a positive number if it is credited to Increase (e.g., - settlements) and a negative number if it is debited (e.g., refunds). + """ + The interchange amount given as a string containing a decimal number in major + units (so e.g., "3.14" for $3.14). The amount is a positive number if it is + credited to Increase (e.g., settlements) and a negative number if it is debited + (e.g., refunds). """ code: Optional[str] = None From 39780c01df51ddc8e36e9f96689e287a1d581933 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 12:21:21 +0000 Subject: [PATCH 0527/1325] fix(perf): skip traversing types for NotGiven values --- src/increase/_utils/_transform.py | 11 +++++++++++ tests/test_transform.py | 9 ++++++++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index 3ec620818..3b2b8e009 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -12,6 +12,7 @@ from ._utils import ( is_list, + is_given, is_mapping, is_iterable, ) @@ -258,6 +259,11 @@ def _transform_typeddict( result: dict[str, object] = {} annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): + if not is_given(value): + # we don't need to include `NotGiven` values here as they'll + # be stripped out before the request is sent anyway + continue + type_ = annotations.get(key) if type_ is None: # we do not have a type annotation for this field, leave it as is @@ -415,6 +421,11 @@ async def _async_transform_typeddict( result: dict[str, object] = {} annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): + if not is_given(value): + # we don't need to include `NotGiven` values here as they'll + # be stripped out before the request is sent anyway + continue + type_ = annotations.get(key) if type_ is None: # we do not have a type annotation for this field, leave it as is diff --git a/tests/test_transform.py b/tests/test_transform.py index f100b2dc9..bb72d99a9 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,7 +8,7 @@ import pytest -from increase._types import Base64FileInput +from increase._types import NOT_GIVEN, Base64FileInput from increase._utils import ( PropertyInfo, transform as _transform, @@ -444,3 +444,10 @@ async def test_transform_skipping(use_async: bool) -> None: # iterables of ints are converted to a list data = iter([1, 2, 3]) assert await transform(data, Iterable[int], use_async) == [1, 2, 3] + + +@parametrize +@pytest.mark.asyncio +async def test_strips_notgiven(use_async: bool) -> None: + assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} + assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {} From 9f681939de979ccd1bf7934ae5b669ce471043e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 13:32:42 +0000 Subject: [PATCH 0528/1325] fix(perf): optimize some hot paths --- src/increase/_utils/_transform.py | 14 +++++++++++++- src/increase/_utils/_typing.py | 2 ++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index 3b2b8e009..b0cc20a73 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -5,7 +5,7 @@ import pathlib from typing import Any, Mapping, TypeVar, cast from datetime import date, datetime -from typing_extensions import Literal, get_args, override, get_type_hints +from typing_extensions import Literal, get_args, override, get_type_hints as _get_type_hints import anyio import pydantic @@ -13,6 +13,7 @@ from ._utils import ( is_list, is_given, + lru_cache, is_mapping, is_iterable, ) @@ -109,6 +110,7 @@ class Params(TypedDict, total=False): return cast(_T, transformed) +@lru_cache(maxsize=8096) def _get_annotated_type(type_: type) -> type | None: """If the given type is an `Annotated` type then it is returned, if not `None` is returned. @@ -433,3 +435,13 @@ async def _async_transform_typeddict( else: result[_maybe_transform_key(key, type_)] = await _async_transform_recursive(value, annotation=type_) return result + + +@lru_cache(maxsize=8096) +def get_type_hints( + obj: Any, + globalns: dict[str, Any] | None = None, + localns: Mapping[str, Any] | None = None, + include_extras: bool = False, +) -> dict[str, Any]: + return _get_type_hints(obj, globalns=globalns, localns=localns, include_extras=include_extras) diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py index 278749b14..1958820f8 100644 --- a/src/increase/_utils/_typing.py +++ b/src/increase/_utils/_typing.py @@ -13,6 +13,7 @@ get_origin, ) +from ._utils import lru_cache from .._types import InheritsGeneric from .._compat import is_union as _is_union @@ -66,6 +67,7 @@ def is_type_alias_type(tp: Any, /) -> TypeIs[typing_extensions.TypeAliasType]: # Extracts T from Annotated[T, ...] or from Required[Annotated[T, ...]] +@lru_cache(maxsize=8096) def strip_annotated_type(typ: type) -> type: if is_required_type(typ) or is_annotated_type(typ): return strip_annotated_type(cast(type, get_args(typ)[0])) From 9bb1de64b3a1d507aae3bc56f4217b1a28e6397c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Apr 2025 18:53:19 +0000 Subject: [PATCH 0529/1325] feat(api): api update --- .stats.yml | 4 ++-- .../types/check_transfer_create_params.py | 18 ++++++++++++++++++ tests/api_resources/test_check_transfers.py | 4 ++++ 3 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3858b6bd9..853824a8f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63680844d4d1a81c90d30b2ad628b779e382c4ca7eac979a2f707782d5ffe005.yml -openapi_spec_hash: e9dae8d72e60ff9bd03e3baad11e9f48 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f3fa36b4bd3a55445fc8f959c9023e2ace20ec8957e492288d45170f1f284ca6.yml +openapi_spec_hash: 837c92afcea095a3cdd40deca976839c config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index a87148450..cc7d86ee8 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -100,6 +100,14 @@ class PhysicalCheck(TypedDict, total=False): recipient_name: Required[str] """The name that will be printed on the check in the 'To:' field.""" + attachment_file_id: str + """The ID of a File to be attached to the check. + + This must have `purpose: check_attachment`. For details on pricing and + restrictions, see + https://increase.com/documentation/originating-checks#printing-checks . + """ + check_number: str """The check number Increase should print on the check. @@ -118,6 +126,16 @@ class PhysicalCheck(TypedDict, total=False): as delivery failed and shred them. """ + shipping_method: Literal["usps_first_class", "fedex_overnight"] + """How to ship the check. + + For details on pricing, timing, and restrictions, see + https://increase.com/documentation/originating-checks#printing-checks . + + - `usps_first_class` - USPS First Class + - `fedex_overnight` - FedEx Overnight + """ + signature_text: str """The text that will appear as the signature on the check in cursive font. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 772927741..a96bae822 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -48,6 +48,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, "memo": "Check payment", "recipient_name": "Ian Crease", + "attachment_file_id": "attachment_file_id", "check_number": "x", "note": "x", "return_address": { @@ -58,6 +59,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "x", "line2": "x", }, + "shipping_method": "usps_first_class", "signature_text": "Ian Crease", }, require_approval=True, @@ -331,6 +333,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, "memo": "Check payment", "recipient_name": "Ian Crease", + "attachment_file_id": "attachment_file_id", "check_number": "x", "note": "x", "return_address": { @@ -341,6 +344,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "state": "x", "line2": "x", }, + "shipping_method": "usps_first_class", "signature_text": "Ian Crease", }, require_approval=True, From 69a91e059be0f982883680b5b9deb9a112321773 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 02:39:46 +0000 Subject: [PATCH 0530/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ee93e8ac5..b69919dfd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.221.0" + ".": "0.222.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3c6d7f17f..bfbd23ae2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.221.0" +version = "0.222.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3f6444f3e..c6578183e 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.221.0" # x-release-please-version +__version__ = "0.222.0" # x-release-please-version From 1546df28ca7ab6721797fa5acbfd3049a00f17e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 14:55:28 +0000 Subject: [PATCH 0531/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 3 --- src/increase/types/check_transfer_create_params.py | 8 -------- tests/api_resources/test_check_transfers.py | 10 ++-------- 4 files changed, 4 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 853824a8f..8a344222f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f3fa36b4bd3a55445fc8f959c9023e2ace20ec8957e492288d45170f1f284ca6.yml -openapi_spec_hash: 837c92afcea095a3cdd40deca976839c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd3ccbd345fe8583837ec8b40279482a4380e035ef7a4e4aa486add54e4c3f7a.yml +openapi_spec_hash: b7ffee69597c1cbe964b699d1766cbed config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 3f5feff94..404bffa35 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -271,9 +271,6 @@ class Submission(BaseModel): class ThirdParty(BaseModel): - check_number: Optional[str] = None - """The check number that you will print on the check.""" - recipient_name: Optional[str] = None """The name that you will print on the check.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index cc7d86ee8..fb930c320 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -144,14 +144,6 @@ class PhysicalCheck(TypedDict, total=False): class ThirdParty(TypedDict, total=False): - check_number: str - """The check number you will print on the check. - - This should not contain leading zeroes. If this is omitted, Increase will - generate a check number for you; you should inspect the response and use that - check number. - """ - recipient_name: str """The pay-to name you will print on the check. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index a96bae822..063d15862 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -63,10 +63,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "signature_text": "Ian Crease", }, require_approval=True, - third_party={ - "check_number": "x", - "recipient_name": "x", - }, + third_party={"recipient_name": "x"}, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -348,10 +345,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "signature_text": "Ian Crease", }, require_approval=True, - third_party={ - "check_number": "x", - "recipient_name": "x", - }, + third_party={"recipient_name": "x"}, ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) From d77bf15030db8cb3ce076d85899c3247e505dbcf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 15:06:41 +0000 Subject: [PATCH 0532/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8a344222f..ae7de1e45 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd3ccbd345fe8583837ec8b40279482a4380e035ef7a4e4aa486add54e4c3f7a.yml -openapi_spec_hash: b7ffee69597c1cbe964b699d1766cbed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-44771153692833542762edfc47f82089e58e34872499631f161f1cdd3a36db1f.yml +openapi_spec_hash: 2f191b4c8163cbcbf4d749c47bc449a3 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 404bffa35..3e97d2bae 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -168,6 +168,9 @@ class PhysicalCheckTrackingUpdate(BaseModel): class PhysicalCheck(BaseModel): + attachment_file_id: Optional[str] = None + """The ID of the file for the check attachment.""" + mailing_address: PhysicalCheckMailingAddress """Details for where Increase will mail the check.""" From 68eb44e435d1dc199c782fa939e80353266b6f2c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 17:04:28 +0000 Subject: [PATCH 0533/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ae7de1e45..7444dd826 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-44771153692833542762edfc47f82089e58e34872499631f161f1cdd3a36db1f.yml -openapi_spec_hash: 2f191b4c8163cbcbf4d749c47bc449a3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1af979da898b2d73ad65b68d3c673b84d84990a30379f5d4258cff3cc7356f60.yml +openapi_spec_hash: 6fb05b3941e8a7b512ddc372aec3d82b config_hash: 20a463ecd33bd32b7b9bc6f4990907ac From 49223e779de89be2cebbb47ae66d6b0473f693e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 12 Apr 2025 18:15:40 +0000 Subject: [PATCH 0534/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card_profile.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7444dd826..d33052a80 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1af979da898b2d73ad65b68d3c673b84d84990a30379f5d4258cff3cc7356f60.yml -openapi_spec_hash: 6fb05b3941e8a7b512ddc372aec3d82b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-55c174581a08cabdf3fcf2fc66d480d497c5f77ab8f0f5e776cc7113b4960037.yml +openapi_spec_hash: 8f70d88f00c9c15ebd8e9049e9f65063 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py index 85d7cc08d..77eb2ac30 100644 --- a/src/increase/types/physical_card_profile.py +++ b/src/increase/types/physical_card_profile.py @@ -55,6 +55,9 @@ class PhysicalCardProfile(BaseModel): group. """ + program_id: str + """The identifier for the Program this Physical Card Profile belongs to.""" + status: Literal["pending_creating", "pending_reviewing", "rejected", "pending_submitting", "active", "archived"] """The status of the Physical Card Profile. From f9c6da18b5013754af64f467ff948b5a7f10951c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 13 Apr 2025 02:39:25 +0000 Subject: [PATCH 0535/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b69919dfd..e0b999409 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.222.0" + ".": "0.223.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bfbd23ae2..b85bd76ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.222.0" +version = "0.223.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c6578183e..78d0013e7 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.222.0" # x-release-please-version +__version__ = "0.223.0" # x-release-please-version From 56bd32fa912f2459b2d21ccdb8818958cc8177fc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 12:24:17 +0000 Subject: [PATCH 0536/1325] chore(internal): update pyright settings --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index b85bd76ff..698a6b9d7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -147,6 +147,7 @@ exclude = [ ] reportImplicitOverride = true +reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false From 2ae8d5016373c88cc3b2e213a997176d27cfd47a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 14:31:11 +0000 Subject: [PATCH 0537/1325] fix(client): correctly reuse idempotency key --- src/increase/_base_client.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 8e8b4ef29..d7b7d8f08 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -409,7 +409,8 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 idempotency_header = self._idempotency_header if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: - headers[idempotency_header] = options.idempotency_key or self._idempotency_key() + options.idempotency_key = options.idempotency_key or self._idempotency_key() + headers[idempotency_header] = options.idempotency_key # Don't set these headers if they were already set or removed by the caller. We check # `custom_headers`, which can contain `Omit()`, instead of `headers` to account for the removal case. @@ -943,6 +944,10 @@ def _request( request = self._build_request(options, retries_taken=retries_taken) self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth @@ -1475,6 +1480,10 @@ async def _request( request = self._build_request(options, retries_taken=retries_taken) await self._prepare_request(request) + if options.idempotency_key: + # ensure the idempotency key is reused between requests + input_options.idempotency_key = options.idempotency_key + kwargs: HttpxSendArgs = {} if self.custom_auth is not None: kwargs["auth"] = self.custom_auth From 09edb31a293003a53708055b25a0602c98c8df39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:15:20 +0000 Subject: [PATCH 0538/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/ach_transfer.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d33052a80..68698ff6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-55c174581a08cabdf3fcf2fc66d480d497c5f77ab8f0f5e776cc7113b4960037.yml -openapi_spec_hash: 8f70d88f00c9c15ebd8e9049e9f65063 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1044f3fb430b9b4019ec3adeaa8b37e6615264fddb273a48b1d9ddd7c2b7b854.yml +openapi_spec_hash: c2526b64321711688cada903e7b4397d config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 76a44d4c1..63075c23a 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -658,6 +658,9 @@ class ACHTransfer(BaseModel): company_entry_description: Optional[str] = None """The description of the transfer you set to be shown to the recipient.""" + company_id: str + """The company ID associated with the transfer.""" + company_name: Optional[str] = None """The name by which the recipient knows you.""" From 5c642095e4102cc936a4e6363d9a912aa4b60c2d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Apr 2025 17:16:41 +0000 Subject: [PATCH 0539/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e0b999409..b75c06894 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.223.0" + ".": "0.224.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 698a6b9d7..f7534c5ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.223.0" +version = "0.224.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 78d0013e7..cf3cf7d6a 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.223.0" # x-release-please-version +__version__ = "0.224.0" # x-release-please-version From e634ada1408b064acfc9d52935a118fab58eb5a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 12:05:05 +0000 Subject: [PATCH 0540/1325] chore(internal): bump pyright version --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- src/increase/_base_client.py | 6 +++++- src/increase/_models.py | 1 - src/increase/_utils/_typing.py | 2 +- tests/conftest.py | 2 +- tests/test_models.py | 2 +- 7 files changed, 10 insertions(+), 7 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f7534c5ca..b60093719 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ Repository = "https://github.com/Increase/increase-python" managed = true # version pins are in requirements-dev.lock dev-dependencies = [ - "pyright>=1.1.359", + "pyright==1.1.399", "mypy", "respx", "pytest", diff --git a/requirements-dev.lock b/requirements-dev.lock index f77926fb3..888216022 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -69,7 +69,7 @@ pydantic-core==2.27.1 # via pydantic pygments==2.18.0 # via rich -pyright==1.1.392.post0 +pyright==1.1.399 pytest==8.3.3 # via pytest-asyncio pytest-asyncio==0.24.0 diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index d7b7d8f08..6800107b2 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -98,7 +98,11 @@ _AsyncStreamT = TypeVar("_AsyncStreamT", bound=AsyncStream[Any]) if TYPE_CHECKING: - from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT + from httpx._config import ( + DEFAULT_TIMEOUT_CONFIG, # pyright: ignore[reportPrivateImportUsage] + ) + + HTTPX_DEFAULT_TIMEOUT = DEFAULT_TIMEOUT_CONFIG else: try: from httpx._config import DEFAULT_TIMEOUT_CONFIG as HTTPX_DEFAULT_TIMEOUT diff --git a/src/increase/_models.py b/src/increase/_models.py index 349357169..58b9263e8 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -19,7 +19,6 @@ ) import pydantic -import pydantic.generics from pydantic.fields import FieldInfo from ._types import ( diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py index 1958820f8..1bac9542e 100644 --- a/src/increase/_utils/_typing.py +++ b/src/increase/_utils/_typing.py @@ -110,7 +110,7 @@ class MyResponse(Foo[_T]): ``` """ cls = cast(object, get_origin(typ) or typ) - if cls in generic_bases: + if cls in generic_bases: # pyright: ignore[reportUnnecessaryContains] # we're given the class directly return extract_type_arg(typ, index) diff --git a/tests/conftest.py b/tests/conftest.py index b06f8b0f3..f60bfe24a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease if TYPE_CHECKING: - from _pytest.fixtures import FixtureRequest + from _pytest.fixtures import FixtureRequest # pyright: ignore[reportPrivateImportUsage] pytest.register_assert_rewrite("tests.utils") diff --git a/tests/test_models.py b/tests/test_models.py index 556f3a6c7..0eef968ca 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -832,7 +832,7 @@ class B(BaseModel): @pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") def test_type_alias_type() -> None: - Alias = TypeAliasType("Alias", str) + Alias = TypeAliasType("Alias", str) # pyright: ignore class Model(BaseModel): alias: Alias From eadbc469ec0531daddae02d4f7ee03a7b556b952 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 16 Apr 2025 12:59:36 +0000 Subject: [PATCH 0541/1325] chore(internal): base client updates --- src/increase/_base_client.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 6800107b2..33cf9ae7a 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -119,6 +119,7 @@ class PageInfo: url: URL | NotGiven params: Query | NotGiven + json: Body | NotGiven @overload def __init__( @@ -134,19 +135,30 @@ def __init__( params: Query, ) -> None: ... + @overload + def __init__( + self, + *, + json: Body, + ) -> None: ... + def __init__( self, *, url: URL | NotGiven = NOT_GIVEN, + json: Body | NotGiven = NOT_GIVEN, params: Query | NotGiven = NOT_GIVEN, ) -> None: self.url = url + self.json = json self.params = params @override def __repr__(self) -> str: if self.url: return f"{self.__class__.__name__}(url={self.url})" + if self.json: + return f"{self.__class__.__name__}(json={self.json})" return f"{self.__class__.__name__}(params={self.params})" @@ -195,6 +207,19 @@ def _info_to_options(self, info: PageInfo) -> FinalRequestOptions: options.url = str(url) return options + if not isinstance(info.json, NotGiven): + if not is_mapping(info.json): + raise TypeError("Pagination is only supported with mappings") + + if not options.json_data: + options.json_data = {**info.json} + else: + if not is_mapping(options.json_data): + raise TypeError("Pagination is only supported with mappings") + + options.json_data = {**options.json_data, **info.json} + return options + raise ValueError("Unexpected PageInfo state") From ca47da819fafb8f5742acd093f9198466703ecdc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:41:01 +0000 Subject: [PATCH 0542/1325] feat(api): api update --- .stats.yml | 4 ++-- .../proof_of_authorization_request_submission.py | 13 +++++++++---- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 68698ff6f..9dda98aa3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1044f3fb430b9b4019ec3adeaa8b37e6615264fddb273a48b1d9ddd7c2b7b854.yml -openapi_spec_hash: c2526b64321711688cada903e7b4397d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c59b76df806c5e47e90cd1fd64a7645ede31f8031d1751181677326146492505.yml +openapi_spec_hash: e372aa9f4d1857c354b5986db3749f03 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py index 8e7cd02ff..8033f0e8c 100644 --- a/src/increase/types/proof_of_authorization_request_submission.py +++ b/src/increase/types/proof_of_authorization_request_submission.py @@ -1,20 +1,25 @@ # 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__ = ["ProofOfAuthorizationRequestSubmission"] +__all__ = ["ProofOfAuthorizationRequestSubmission", "AdditionalEvidenceFile"] + + +class AdditionalEvidenceFile(BaseModel): + file_id: str + """The File identifier.""" class ProofOfAuthorizationRequestSubmission(BaseModel): id: str """The Proof of Authorization Request Submission identifier.""" - additional_evidence_file_id: Optional[str] = None - """File containing additional evidence.""" + additional_evidence_files: List[AdditionalEvidenceFile] + """Files containing additional evidence.""" authorization_terms: str """Terms of authorization.""" From e3d3c186ce93100d2e1cb26c1279388f376fd1e4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Apr 2025 22:42:19 +0000 Subject: [PATCH 0543/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b75c06894..e6f50fc1e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.224.0" + ".": "0.225.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b60093719..12bd759ad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.224.0" +version = "0.225.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index cf3cf7d6a..5caeb7f66 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.224.0" # x-release-please-version +__version__ = "0.225.0" # x-release-please-version From 9dc7512f45d466af1e18b36eec3a372f985da905 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 05:18:21 +0000 Subject: [PATCH 0544/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/card_authorizations.py | 6 ++++++ src/increase/types/card_payment.py | 3 +++ src/increase/types/declined_transaction.py | 3 +++ .../types/simulations/card_authorization_create_params.py | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9dda98aa3..2a7cb24f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c59b76df806c5e47e90cd1fd64a7645ede31f8031d1751181677326146492505.yml -openapi_spec_hash: e372aa9f4d1857c354b5986db3749f03 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4100338e1b16bbb4a1cb46ad04b5967b0251b12627790379169fbe8570924449.yml +openapi_spec_hash: bb4127dd16fe706216a17ab47cb495b1 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 04e192319..d4662b056 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -69,6 +69,7 @@ def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "failed_3ds_authentication", "suspected_fraud", ] | NotGiven = NOT_GIVEN, @@ -136,6 +137,8 @@ def create( authorization request cryptogram. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. @@ -266,6 +269,7 @@ async def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "failed_3ds_authentication", "suspected_fraud", ] | NotGiven = NOT_GIVEN, @@ -333,6 +337,8 @@ async def create( authorization request cryptogram. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index ccd604870..a9b5aa878 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1053,6 +1053,7 @@ class ElementCardDecline(BaseModel): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "failed_3ds_authentication", "suspected_fraud", ] """Why the transaction was declined. @@ -1079,6 +1080,8 @@ class ElementCardDecline(BaseModel): authorization request cryptogram. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index b6e27b058..12a108869 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -514,6 +514,7 @@ class SourceCardDecline(BaseModel): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "failed_3ds_authentication", "suspected_fraud", ] """Why the transaction was declined. @@ -540,6 +541,8 @@ class SourceCardDecline(BaseModel): authorization request cryptogram. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 6704fc21e..5d0c2e506 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -37,6 +37,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "failed_3ds_authentication", "suspected_fraud", ] """Forces a card decline with a specific reason. @@ -65,6 +66,8 @@ class CardAuthorizationCreateParams(TypedDict, total=False): authorization request cryptogram. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ From e21c7773470e8648a253915ea07777e3c775f564 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 10:17:33 +0000 Subject: [PATCH 0545/1325] chore(internal): update models test --- tests/test_models.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/test_models.py b/tests/test_models.py index 0eef968ca..f06ebcd65 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -492,12 +492,15 @@ class Model(BaseModel): resource_id: Optional[str] = None m = Model.construct() + assert m.resource_id is None assert "resource_id" not in m.model_fields_set m = Model.construct(resource_id=None) + assert m.resource_id is None assert "resource_id" in m.model_fields_set m = Model.construct(resource_id="foo") + assert m.resource_id == "foo" assert "resource_id" in m.model_fields_set From eb645b70ebe391d8ebb8c87ec7c4fe65b04ab8f3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 18:49:46 +0000 Subject: [PATCH 0546/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_wire_drawdown_request.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2a7cb24f1..fd36f5bdb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4100338e1b16bbb4a1cb46ad04b5967b0251b12627790379169fbe8570924449.yml -openapi_spec_hash: bb4127dd16fe706216a17ab47cb495b1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0d41a0dedc2dff4b25289f1af0effdd237078f1ebc049416219c0497c6497499.yml +openapi_spec_hash: aa1a425fa6d076c5ef88ff9ad1b39112 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index 4a1af3d82..16e773f3e 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -49,7 +49,7 @@ class InboundWireDrawdownRequest(BaseModel): message_to_recipient: Optional[str] = None """A message from the drawdown request's originator.""" - originator_account_number: str + originator_account_number: Optional[str] = None """The drawdown request's originator's account number.""" originator_address_line1: Optional[str] = None From 448c479b0eaec837e857e72f0e7a8b8eacacf0d0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Apr 2025 21:22:35 +0000 Subject: [PATCH 0547/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_create_params.py | 19 +++++++++++++++++-- tests/api_resources/test_entities.py | 2 ++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd36f5bdb..b6d277351 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0d41a0dedc2dff4b25289f1af0effdd237078f1ebc049416219c0497c6497499.yml -openapi_spec_hash: aa1a425fa6d076c5ef88ff9ad1b39112 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77c909117116f16f4bd7d5596257445e57c54d288d6534fe5b11ee37126c4c34.yml +openapi_spec_hash: 29e929217173626e3edec897a5b6c5e7 config_hash: 20a463ecd33bd32b7b9bc6f4990907ac diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 7d3d6d52b..8c7169603 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -299,8 +299,9 @@ class Corporation(TypedDict, total=False): beneficial_owners: Required[Iterable[CorporationBeneficialOwner]] """ - The identifying details of anyone controlling or owning 25% or more of the - corporation. + The identifying details of each person who owns 25% or more of the business and + one control person, like the CEO, CFO, or other executive. You can submit + between 1 and 5 people to this list. """ name: Required[str] @@ -309,6 +310,20 @@ class Corporation(TypedDict, total=False): tax_identifier: Required[str] """The Employer Identification Number (EIN) for the corporation.""" + beneficial_ownership_exemption_reason: Literal[ + "regulated_financial_institution", "publicly_traded_company", "public_entity" + ] + """ + If the entity is exempt from the requirement to submit beneficial owners, + provide the justification. If a reason is provided, you do not need to submit a + list of beneficial owners. + + - `regulated_financial_institution` - A regulated financial institution. + - `publicly_traded_company` - A publicly traded company. + - `public_entity` - A public entity acting on behalf of the federal or a state + government. + """ + incorporation_state: str """ The two-letter United States Postal Service (USPS) abbreviation for the diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 91ffd4dff..b584f970d 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -83,6 +83,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ], "name": "National Phonograph Company", "tax_identifier": "602214076", + "beneficial_ownership_exemption_reason": "regulated_financial_institution", "incorporation_state": "NY", "industry_code": "x", "website": "https://example.com", @@ -901,6 +902,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ], "name": "National Phonograph Company", "tax_identifier": "602214076", + "beneficial_ownership_exemption_reason": "regulated_financial_institution", "incorporation_state": "NY", "industry_code": "x", "website": "https://example.com", From 349ce81ec5c9ab4aadf3a063d4b0e18abca14463 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 19 Apr 2025 02:39:01 +0000 Subject: [PATCH 0548/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6f50fc1e..aaefead2d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.225.0" + ".": "0.226.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 12bd759ad..b98faf0be 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.225.0" +version = "0.226.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5caeb7f66..fb7ef2977 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.225.0" # x-release-please-version +__version__ = "0.226.0" # x-release-please-version From 899d9263b1e4a3ebe4ec1a04d7a45b3d041a4427 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 17:15:24 +0000 Subject: [PATCH 0549/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 27 - src/increase/_client.py | 56 -- src/increase/resources/__init__.py | 28 - src/increase/resources/event_subscriptions.py | 12 - ...of_of_authorization_request_submissions.py | 513 ------------------ .../proof_of_authorization_requests.py | 286 ---------- src/increase/types/__init__.py | 13 - src/increase/types/event.py | 6 - src/increase/types/event_list_params.py | 2 - src/increase/types/event_subscription.py | 6 - .../types/event_subscription_create_params.py | 6 - .../types/proof_of_authorization_request.py | 37 -- ...of_of_authorization_request_list_params.py | 50 -- ...oof_of_authorization_request_submission.py | 88 --- ...zation_request_submission_create_params.py | 49 -- ...rization_request_submission_list_params.py | 29 - ...of_of_authorization_request_submissions.py | 390 ------------- .../test_proof_of_authorization_requests.py | 186 ------- 19 files changed, 4 insertions(+), 1788 deletions(-) delete mode 100644 src/increase/resources/proof_of_authorization_request_submissions.py delete mode 100644 src/increase/resources/proof_of_authorization_requests.py delete mode 100644 src/increase/types/proof_of_authorization_request.py delete mode 100644 src/increase/types/proof_of_authorization_request_list_params.py delete mode 100644 src/increase/types/proof_of_authorization_request_submission.py delete mode 100644 src/increase/types/proof_of_authorization_request_submission_create_params.py delete mode 100644 src/increase/types/proof_of_authorization_request_submission_list_params.py delete mode 100644 tests/api_resources/test_proof_of_authorization_request_submissions.py delete mode 100644 tests/api_resources/test_proof_of_authorization_requests.py diff --git a/.stats.yml b/.stats.yml index b6d277351..3ebab9869 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77c909117116f16f4bd7d5596257445e57c54d288d6534fe5b11ee37126c4c34.yml -openapi_spec_hash: 29e929217173626e3edec897a5b6c5e7 -config_hash: 20a463ecd33bd32b7b9bc6f4990907ac +configured_endpoints: 194 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7eefcf9e79e89a7e4a2a064d93c40f83d3efe93ea91c0e9ba7112e491fb69e8f.yml +openapi_spec_hash: 3e3ee435a96bbb79dfe7c28d4bdab846 +config_hash: 6ae27f935d24d38237894dd4fd6bd749 diff --git a/api.md b/api.md index 6c4cfa675..1eb20d61e 100644 --- a/api.md +++ b/api.md @@ -478,33 +478,6 @@ Methods: - client.programs.retrieve(program_id) -> Program - client.programs.list(\*\*params) -> SyncPage[Program] -# ProofOfAuthorizationRequests - -Types: - -```python -from increase.types import ProofOfAuthorizationRequest -``` - -Methods: - -- client.proof_of_authorization_requests.retrieve(proof_of_authorization_request_id) -> ProofOfAuthorizationRequest -- client.proof_of_authorization_requests.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequest] - -# ProofOfAuthorizationRequestSubmissions - -Types: - -```python -from increase.types import ProofOfAuthorizationRequestSubmission -``` - -Methods: - -- client.proof_of_authorization_request_submissions.create(\*\*params) -> ProofOfAuthorizationRequestSubmission -- client.proof_of_authorization_request_submissions.retrieve(proof_of_authorization_request_submission_id) -> ProofOfAuthorizationRequestSubmission -- client.proof_of_authorization_request_submissions.list(\*\*params) -> SyncPage[ProofOfAuthorizationRequestSubmission] - # AccountStatements Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 97cebfe70..470a9e633 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -76,9 +76,7 @@ intrafi_account_enrollments, real_time_payments_transfers, inbound_wire_drawdown_requests, - proof_of_authorization_requests, inbound_real_time_payments_transfers, - proof_of_authorization_request_submissions, ) from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import IncreaseError, APIStatusError @@ -141,10 +139,6 @@ class Increase(SyncAPIClient): entities: entities.EntitiesResource supplemental_documents: supplemental_documents.SupplementalDocumentsResource programs: programs.ProgramsResource - proof_of_authorization_requests: proof_of_authorization_requests.ProofOfAuthorizationRequestsResource - proof_of_authorization_request_submissions: ( - proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResource - ) account_statements: account_statements.AccountStatementsResource files: files.FilesResource file_links: file_links.FileLinksResource @@ -290,12 +284,6 @@ def __init__( self.entities = entities.EntitiesResource(self) self.supplemental_documents = supplemental_documents.SupplementalDocumentsResource(self) self.programs = programs.ProgramsResource(self) - self.proof_of_authorization_requests = proof_of_authorization_requests.ProofOfAuthorizationRequestsResource( - self - ) - self.proof_of_authorization_request_submissions = ( - proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResource(self) - ) self.account_statements = account_statements.AccountStatementsResource(self) self.files = files.FilesResource(self) self.file_links = file_links.FileLinksResource(self) @@ -508,10 +496,6 @@ class AsyncIncrease(AsyncAPIClient): entities: entities.AsyncEntitiesResource supplemental_documents: supplemental_documents.AsyncSupplementalDocumentsResource programs: programs.AsyncProgramsResource - proof_of_authorization_requests: proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResource - proof_of_authorization_request_submissions: ( - proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResource - ) account_statements: account_statements.AsyncAccountStatementsResource files: files.AsyncFilesResource file_links: file_links.AsyncFileLinksResource @@ -659,12 +643,6 @@ def __init__( self.entities = entities.AsyncEntitiesResource(self) self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResource(self) self.programs = programs.AsyncProgramsResource(self) - self.proof_of_authorization_requests = ( - proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResource(self) - ) - self.proof_of_authorization_request_submissions = ( - proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResource(self) - ) self.account_statements = account_statements.AsyncAccountStatementsResource(self) self.files = files.AsyncFilesResource(self) self.file_links = file_links.AsyncFileLinksResource(self) @@ -912,16 +890,6 @@ def __init__(self, client: Increase) -> None: client.supplemental_documents ) self.programs = programs.ProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = ( - proof_of_authorization_requests.ProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - ) - self.proof_of_authorization_request_submissions = ( - proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) - ) self.account_statements = account_statements.AccountStatementsResourceWithRawResponse(client.account_statements) self.files = files.FilesResourceWithRawResponse(client.files) self.file_links = file_links.FileLinksResourceWithRawResponse(client.file_links) @@ -1032,14 +1000,6 @@ def __init__(self, client: AsyncIncrease) -> None: client.supplemental_documents ) self.programs = programs.AsyncProgramsResourceWithRawResponse(client.programs) - self.proof_of_authorization_requests = ( - proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResourceWithRawResponse( - client.proof_of_authorization_requests - ) - ) - self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse( - client.proof_of_authorization_request_submissions - ) self.account_statements = account_statements.AsyncAccountStatementsResourceWithRawResponse( client.account_statements ) @@ -1160,14 +1120,6 @@ def __init__(self, client: Increase) -> None: client.supplemental_documents ) self.programs = programs.ProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = ( - proof_of_authorization_requests.ProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - ) - self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) self.account_statements = account_statements.AccountStatementsResourceWithStreamingResponse( client.account_statements ) @@ -1290,14 +1242,6 @@ def __init__(self, client: AsyncIncrease) -> None: client.supplemental_documents ) self.programs = programs.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.proof_of_authorization_requests = ( - proof_of_authorization_requests.AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse( - client.proof_of_authorization_requests - ) - ) - self.proof_of_authorization_request_submissions = proof_of_authorization_request_submissions.AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse( - client.proof_of_authorization_request_submissions - ) self.account_statements = account_statements.AsyncAccountStatementsResourceWithStreamingResponse( client.account_statements ) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 45e3487a9..88d793281 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -408,14 +408,6 @@ InboundWireDrawdownRequestsResourceWithStreamingResponse, AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) -from .proof_of_authorization_requests import ( - ProofOfAuthorizationRequestsResource, - AsyncProofOfAuthorizationRequestsResource, - ProofOfAuthorizationRequestsResourceWithRawResponse, - AsyncProofOfAuthorizationRequestsResourceWithRawResponse, - ProofOfAuthorizationRequestsResourceWithStreamingResponse, - AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse, -) from .inbound_real_time_payments_transfers import ( InboundRealTimePaymentsTransfersResource, AsyncInboundRealTimePaymentsTransfersResource, @@ -424,14 +416,6 @@ InboundRealTimePaymentsTransfersResourceWithStreamingResponse, AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) -from .proof_of_authorization_request_submissions import ( - ProofOfAuthorizationRequestSubmissionsResource, - AsyncProofOfAuthorizationRequestSubmissionsResource, - ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, - AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse, - ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, - AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse, -) __all__ = [ "AccountsResource", @@ -632,18 +616,6 @@ "AsyncProgramsResourceWithRawResponse", "ProgramsResourceWithStreamingResponse", "AsyncProgramsResourceWithStreamingResponse", - "ProofOfAuthorizationRequestsResource", - "AsyncProofOfAuthorizationRequestsResource", - "ProofOfAuthorizationRequestsResourceWithRawResponse", - "AsyncProofOfAuthorizationRequestsResourceWithRawResponse", - "ProofOfAuthorizationRequestsResourceWithStreamingResponse", - "AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse", - "ProofOfAuthorizationRequestSubmissionsResource", - "AsyncProofOfAuthorizationRequestSubmissionsResource", - "ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", - "AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse", - "ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", - "AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse", "AccountStatementsResource", "AsyncAccountStatementsResource", "AccountStatementsResourceWithRawResponse", diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index e1c62f5db..abaace723 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -129,8 +129,6 @@ def create( "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", @@ -273,10 +271,6 @@ def create( Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of Authorization Request is updated. - - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof - of Authorization Request Submission is created. - - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof - of Authorization Request Submission is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a @@ -584,8 +578,6 @@ async def create( "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", @@ -728,10 +720,6 @@ async def create( Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of Authorization Request is updated. - - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof - of Authorization Request Submission is created. - - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof - of Authorization Request Submission is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a diff --git a/src/increase/resources/proof_of_authorization_request_submissions.py b/src/increase/resources/proof_of_authorization_request_submissions.py deleted file mode 100644 index 1b682a5df..000000000 --- a/src/increase/resources/proof_of_authorization_request_submissions.py +++ /dev/null @@ -1,513 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime - -import httpx - -from ..types import ( - proof_of_authorization_request_submission_list_params, - proof_of_authorization_request_submission_create_params, -) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.proof_of_authorization_request_submission import ProofOfAuthorizationRequestSubmission - -__all__ = ["ProofOfAuthorizationRequestSubmissionsResource", "AsyncProofOfAuthorizationRequestSubmissionsResource"] - - -class ProofOfAuthorizationRequestSubmissionsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) - - def create( - self, - *, - authorization_terms: str, - authorized_at: Union[str, datetime], - authorizer_email: str, - authorizer_name: str, - customer_has_been_offboarded: bool, - proof_of_authorization_request_id: str, - validated_account_ownership_via_credential: bool, - validated_account_ownership_with_account_statement: bool, - validated_account_ownership_with_microdeposit: bool, - additional_evidence_file_id: str | NotGiven = NOT_GIVEN, - authorizer_company: str | NotGiven = NOT_GIVEN, - authorizer_ip_address: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> ProofOfAuthorizationRequestSubmission: - """ - Submit Proof of Authorization - - Args: - authorization_terms: Terms of authorization. - - authorized_at: Time of authorization. - - authorizer_email: Email of the authorizer. - - authorizer_name: Name of the authorizer. - - customer_has_been_offboarded: Whether the customer has been offboarded or suspended. - - proof_of_authorization_request_id: ID of the proof of authorization request. - - validated_account_ownership_via_credential: Whether the account ownership was validated via credential (e.g. Plaid). - - validated_account_ownership_with_account_statement: Whether the account ownership was validated with an account statement. - - validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. - - additional_evidence_file_id: File containing additional evidence. - - authorizer_company: Company of the authorizer. - - authorizer_ip_address: IP address of the authorizer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/proof_of_authorization_request_submissions", - body=maybe_transform( - { - "authorization_terms": authorization_terms, - "authorized_at": authorized_at, - "authorizer_email": authorizer_email, - "authorizer_name": authorizer_name, - "customer_has_been_offboarded": customer_has_been_offboarded, - "proof_of_authorization_request_id": proof_of_authorization_request_id, - "validated_account_ownership_via_credential": validated_account_ownership_via_credential, - "validated_account_ownership_with_account_statement": validated_account_ownership_with_account_statement, - "validated_account_ownership_with_microdeposit": validated_account_ownership_with_microdeposit, - "additional_evidence_file_id": additional_evidence_file_id, - "authorizer_company": authorizer_company, - "authorizer_ip_address": authorizer_ip_address, - }, - proof_of_authorization_request_submission_create_params.ProofOfAuthorizationRequestSubmissionCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=ProofOfAuthorizationRequestSubmission, - ) - - def retrieve( - self, - proof_of_authorization_request_submission_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProofOfAuthorizationRequestSubmission: - """ - Retrieve a Proof of Authorization Request Submission - - Args: - proof_of_authorization_request_submission_id: The identifier of the Proof of Authorization Request Submission. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not proof_of_authorization_request_submission_id: - raise ValueError( - f"Expected a non-empty value for `proof_of_authorization_request_submission_id` but received {proof_of_authorization_request_submission_id!r}" - ) - return self._get( - f"/proof_of_authorization_request_submissions/{proof_of_authorization_request_submission_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=ProofOfAuthorizationRequestSubmission, - ) - - def list( - self, - *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - proof_of_authorization_request_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[ProofOfAuthorizationRequestSubmission]: - """ - List Proof of Authorization Request Submissions - - Args: - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - proof_of_authorization_request_id: ID of the proof of authorization request. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/proof_of_authorization_request_submissions", - page=SyncPage[ProofOfAuthorizationRequestSubmission], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - "proof_of_authorization_request_id": proof_of_authorization_request_id, - }, - proof_of_authorization_request_submission_list_params.ProofOfAuthorizationRequestSubmissionListParams, - ), - ), - model=ProofOfAuthorizationRequestSubmission, - ) - - -class AsyncProofOfAuthorizationRequestSubmissionsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse(self) - - async def create( - self, - *, - authorization_terms: str, - authorized_at: Union[str, datetime], - authorizer_email: str, - authorizer_name: str, - customer_has_been_offboarded: bool, - proof_of_authorization_request_id: str, - validated_account_ownership_via_credential: bool, - validated_account_ownership_with_account_statement: bool, - validated_account_ownership_with_microdeposit: bool, - additional_evidence_file_id: str | NotGiven = NOT_GIVEN, - authorizer_company: str | NotGiven = NOT_GIVEN, - authorizer_ip_address: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> ProofOfAuthorizationRequestSubmission: - """ - Submit Proof of Authorization - - Args: - authorization_terms: Terms of authorization. - - authorized_at: Time of authorization. - - authorizer_email: Email of the authorizer. - - authorizer_name: Name of the authorizer. - - customer_has_been_offboarded: Whether the customer has been offboarded or suspended. - - proof_of_authorization_request_id: ID of the proof of authorization request. - - validated_account_ownership_via_credential: Whether the account ownership was validated via credential (e.g. Plaid). - - validated_account_ownership_with_account_statement: Whether the account ownership was validated with an account statement. - - validated_account_ownership_with_microdeposit: Whether the account ownership was validated with a microdeposit. - - additional_evidence_file_id: File containing additional evidence. - - authorizer_company: Company of the authorizer. - - authorizer_ip_address: IP address of the authorizer. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/proof_of_authorization_request_submissions", - body=await async_maybe_transform( - { - "authorization_terms": authorization_terms, - "authorized_at": authorized_at, - "authorizer_email": authorizer_email, - "authorizer_name": authorizer_name, - "customer_has_been_offboarded": customer_has_been_offboarded, - "proof_of_authorization_request_id": proof_of_authorization_request_id, - "validated_account_ownership_via_credential": validated_account_ownership_via_credential, - "validated_account_ownership_with_account_statement": validated_account_ownership_with_account_statement, - "validated_account_ownership_with_microdeposit": validated_account_ownership_with_microdeposit, - "additional_evidence_file_id": additional_evidence_file_id, - "authorizer_company": authorizer_company, - "authorizer_ip_address": authorizer_ip_address, - }, - proof_of_authorization_request_submission_create_params.ProofOfAuthorizationRequestSubmissionCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=ProofOfAuthorizationRequestSubmission, - ) - - async def retrieve( - self, - proof_of_authorization_request_submission_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProofOfAuthorizationRequestSubmission: - """ - Retrieve a Proof of Authorization Request Submission - - Args: - proof_of_authorization_request_submission_id: The identifier of the Proof of Authorization Request Submission. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not proof_of_authorization_request_submission_id: - raise ValueError( - f"Expected a non-empty value for `proof_of_authorization_request_submission_id` but received {proof_of_authorization_request_submission_id!r}" - ) - return await self._get( - f"/proof_of_authorization_request_submissions/{proof_of_authorization_request_submission_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=ProofOfAuthorizationRequestSubmission, - ) - - def list( - self, - *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - proof_of_authorization_request_id: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ProofOfAuthorizationRequestSubmission, AsyncPage[ProofOfAuthorizationRequestSubmission]]: - """ - List Proof of Authorization Request Submissions - - Args: - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - proof_of_authorization_request_id: ID of the proof of authorization request. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/proof_of_authorization_request_submissions", - page=AsyncPage[ProofOfAuthorizationRequestSubmission], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - "proof_of_authorization_request_id": proof_of_authorization_request_id, - }, - proof_of_authorization_request_submission_list_params.ProofOfAuthorizationRequestSubmissionListParams, - ), - ), - model=ProofOfAuthorizationRequestSubmission, - ) - - -class ProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - def __init__( - self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource - ) -> None: - self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - - self.create = to_raw_response_wrapper( - proof_of_authorization_request_submissions.create, - ) - self.retrieve = to_raw_response_wrapper( - proof_of_authorization_request_submissions.retrieve, - ) - self.list = to_raw_response_wrapper( - proof_of_authorization_request_submissions.list, - ) - - -class AsyncProofOfAuthorizationRequestSubmissionsResourceWithRawResponse: - def __init__( - self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource - ) -> None: - self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - - self.create = async_to_raw_response_wrapper( - proof_of_authorization_request_submissions.create, - ) - self.retrieve = async_to_raw_response_wrapper( - proof_of_authorization_request_submissions.retrieve, - ) - self.list = async_to_raw_response_wrapper( - proof_of_authorization_request_submissions.list, - ) - - -class ProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - def __init__( - self, proof_of_authorization_request_submissions: ProofOfAuthorizationRequestSubmissionsResource - ) -> None: - self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - - self.create = to_streamed_response_wrapper( - proof_of_authorization_request_submissions.create, - ) - self.retrieve = to_streamed_response_wrapper( - proof_of_authorization_request_submissions.retrieve, - ) - self.list = to_streamed_response_wrapper( - proof_of_authorization_request_submissions.list, - ) - - -class AsyncProofOfAuthorizationRequestSubmissionsResourceWithStreamingResponse: - def __init__( - self, proof_of_authorization_request_submissions: AsyncProofOfAuthorizationRequestSubmissionsResource - ) -> None: - self._proof_of_authorization_request_submissions = proof_of_authorization_request_submissions - - self.create = async_to_streamed_response_wrapper( - proof_of_authorization_request_submissions.create, - ) - self.retrieve = async_to_streamed_response_wrapper( - proof_of_authorization_request_submissions.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - proof_of_authorization_request_submissions.list, - ) diff --git a/src/increase/resources/proof_of_authorization_requests.py b/src/increase/resources/proof_of_authorization_requests.py deleted file mode 100644 index 8255e6f96..000000000 --- a/src/increase/resources/proof_of_authorization_requests.py +++ /dev/null @@ -1,286 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..types import proof_of_authorization_request_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.proof_of_authorization_request import ProofOfAuthorizationRequest - -__all__ = ["ProofOfAuthorizationRequestsResource", "AsyncProofOfAuthorizationRequestsResource"] - - -class ProofOfAuthorizationRequestsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> ProofOfAuthorizationRequestsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return ProofOfAuthorizationRequestsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> ProofOfAuthorizationRequestsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return ProofOfAuthorizationRequestsResourceWithStreamingResponse(self) - - def retrieve( - self, - proof_of_authorization_request_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProofOfAuthorizationRequest: - """ - Retrieve a Proof of Authorization Request - - Args: - proof_of_authorization_request_id: The identifier of the Proof of Authorization Request. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not proof_of_authorization_request_id: - raise ValueError( - f"Expected a non-empty value for `proof_of_authorization_request_id` but received {proof_of_authorization_request_id!r}" - ) - return self._get( - f"/proof_of_authorization_requests/{proof_of_authorization_request_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=ProofOfAuthorizationRequest, - ) - - def list( - self, - *, - created_at: proof_of_authorization_request_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[ProofOfAuthorizationRequest]: - """ - List Proof of Authorization Requests - - Args: - cursor: Return the page of entries after this one. - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/proof_of_authorization_requests", - page=SyncPage[ProofOfAuthorizationRequest], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "created_at": created_at, - "cursor": cursor, - "limit": limit, - }, - proof_of_authorization_request_list_params.ProofOfAuthorizationRequestListParams, - ), - ), - model=ProofOfAuthorizationRequest, - ) - - -class AsyncProofOfAuthorizationRequestsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncProofOfAuthorizationRequestsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse(self) - - async def retrieve( - self, - proof_of_authorization_request_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> ProofOfAuthorizationRequest: - """ - Retrieve a Proof of Authorization Request - - Args: - proof_of_authorization_request_id: The identifier of the Proof of Authorization Request. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not proof_of_authorization_request_id: - raise ValueError( - f"Expected a non-empty value for `proof_of_authorization_request_id` but received {proof_of_authorization_request_id!r}" - ) - return await self._get( - f"/proof_of_authorization_requests/{proof_of_authorization_request_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=ProofOfAuthorizationRequest, - ) - - def list( - self, - *, - created_at: proof_of_authorization_request_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[ProofOfAuthorizationRequest, AsyncPage[ProofOfAuthorizationRequest]]: - """ - List Proof of Authorization Requests - - Args: - cursor: Return the page of entries after this one. - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/proof_of_authorization_requests", - page=AsyncPage[ProofOfAuthorizationRequest], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "created_at": created_at, - "cursor": cursor, - "limit": limit, - }, - proof_of_authorization_request_list_params.ProofOfAuthorizationRequestListParams, - ), - ), - model=ProofOfAuthorizationRequest, - ) - - -class ProofOfAuthorizationRequestsResourceWithRawResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: - self._proof_of_authorization_requests = proof_of_authorization_requests - - self.retrieve = to_raw_response_wrapper( - proof_of_authorization_requests.retrieve, - ) - self.list = to_raw_response_wrapper( - proof_of_authorization_requests.list, - ) - - -class AsyncProofOfAuthorizationRequestsResourceWithRawResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: - self._proof_of_authorization_requests = proof_of_authorization_requests - - self.retrieve = async_to_raw_response_wrapper( - proof_of_authorization_requests.retrieve, - ) - self.list = async_to_raw_response_wrapper( - proof_of_authorization_requests.list, - ) - - -class ProofOfAuthorizationRequestsResourceWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: ProofOfAuthorizationRequestsResource) -> None: - self._proof_of_authorization_requests = proof_of_authorization_requests - - self.retrieve = to_streamed_response_wrapper( - proof_of_authorization_requests.retrieve, - ) - self.list = to_streamed_response_wrapper( - proof_of_authorization_requests.list, - ) - - -class AsyncProofOfAuthorizationRequestsResourceWithStreamingResponse: - def __init__(self, proof_of_authorization_requests: AsyncProofOfAuthorizationRequestsResource) -> None: - self._proof_of_authorization_requests = proof_of_authorization_requests - - self.retrieve = async_to_streamed_response_wrapper( - proof_of_authorization_requests.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - proof_of_authorization_requests.list, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c099e4be4..4bc44cb46 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -109,7 +109,6 @@ from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams -from .proof_of_authorization_request import ProofOfAuthorizationRequest as ProofOfAuthorizationRequest from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams @@ -162,15 +161,9 @@ from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) -from .proof_of_authorization_request_submission import ( - ProofOfAuthorizationRequestSubmission as ProofOfAuthorizationRequestSubmission, -) from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) -from .proof_of_authorization_request_list_params import ( - ProofOfAuthorizationRequestListParams as ProofOfAuthorizationRequestListParams, -) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) @@ -180,12 +173,6 @@ from .inbound_real_time_payments_transfer_list_params import ( InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, ) -from .proof_of_authorization_request_submission_list_params import ( - ProofOfAuthorizationRequestSubmissionListParams as ProofOfAuthorizationRequestSubmissionListParams, -) -from .proof_of_authorization_request_submission_create_params import ( - ProofOfAuthorizationRequestSubmissionCreateParams as ProofOfAuthorizationRequestSubmissionCreateParams, -) from .inbound_ach_transfer_create_notification_of_change_params import ( InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, ) diff --git a/src/increase/types/event.py b/src/increase/types/event.py index def2f6076..a87015db4 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -91,8 +91,6 @@ class Event(BaseModel): "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", @@ -218,10 +216,6 @@ class Event(BaseModel): Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of Authorization Request is updated. - - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof - of Authorization Request Submission is created. - - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof - of Authorization Request Submission is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index bcd932d7f..4081a6abe 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -106,8 +106,6 @@ class EventListParams(TypedDict, total=False): "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 090753a5c..23e793c6a 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -104,8 +104,6 @@ class EventSubscription(BaseModel): "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", @@ -231,10 +229,6 @@ class EventSubscription(BaseModel): Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of Authorization Request is updated. - - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof - of Authorization Request Submission is created. - - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof - of Authorization Request Submission is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index ba6500360..574bb6d59 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -90,8 +90,6 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "physical_card_profile.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", - "proof_of_authorization_request_submission.created", - "proof_of_authorization_request_submission.updated", "real_time_decision.card_authorization_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", @@ -216,10 +214,6 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of Authorization Request is updated. - - `proof_of_authorization_request_submission.created` - Occurs whenever a Proof - of Authorization Request Submission is created. - - `proof_of_authorization_request_submission.updated` - Occurs whenever a Proof - of Authorization Request Submission is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a diff --git a/src/increase/types/proof_of_authorization_request.py b/src/increase/types/proof_of_authorization_request.py deleted file mode 100644 index cbe737460..000000000 --- a/src/increase/types/proof_of_authorization_request.py +++ /dev/null @@ -1,37 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ProofOfAuthorizationRequest", "ACHTransfer"] - - -class ACHTransfer(BaseModel): - id: str - """The ACH Transfer identifier.""" - - -class ProofOfAuthorizationRequest(BaseModel): - id: str - """The Proof of Authorization Request identifier.""" - - ach_transfers: List[ACHTransfer] - """The ACH Transfers associated with the request.""" - - created_at: datetime - """The time the Proof of Authorization Request was created.""" - - due_on: datetime - """The time the Proof of Authorization Request is due.""" - - type: Literal["proof_of_authorization_request"] - """A constant representing the object's type. - - For this resource it will always be `proof_of_authorization_request`. - """ - - updated_at: datetime - """The time the Proof of Authorization Request was last updated.""" diff --git a/src/increase/types/proof_of_authorization_request_list_params.py b/src/increase/types/proof_of_authorization_request_list_params.py deleted file mode 100644 index 48cf68d02..000000000 --- a/src/increase/types/proof_of_authorization_request_list_params.py +++ /dev/null @@ -1,50 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["ProofOfAuthorizationRequestListParams", "CreatedAt"] - - -class ProofOfAuthorizationRequestListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ diff --git a/src/increase/types/proof_of_authorization_request_submission.py b/src/increase/types/proof_of_authorization_request_submission.py deleted file mode 100644 index 8033f0e8c..000000000 --- a/src/increase/types/proof_of_authorization_request_submission.py +++ /dev/null @@ -1,88 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import List, Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["ProofOfAuthorizationRequestSubmission", "AdditionalEvidenceFile"] - - -class AdditionalEvidenceFile(BaseModel): - file_id: str - """The File identifier.""" - - -class ProofOfAuthorizationRequestSubmission(BaseModel): - id: str - """The Proof of Authorization Request Submission identifier.""" - - additional_evidence_files: List[AdditionalEvidenceFile] - """Files containing additional evidence.""" - - authorization_terms: str - """Terms of authorization.""" - - authorized_at: datetime - """Time of authorization.""" - - authorizer_company: Optional[str] = None - """Company of the authorizer.""" - - authorizer_email: Optional[str] = None - """Email of the authorizer.""" - - authorizer_ip_address: Optional[str] = None - """IP address of the authorizer.""" - - authorizer_name: Optional[str] = None - """Name of the authorizer.""" - - created_at: datetime - """The time the Proof of Authorization Request Submission was created.""" - - customer_has_been_offboarded: Optional[bool] = None - """Whether the customer has been offboarded.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - proof_of_authorization_request_id: str - """ID of the proof of authorization request.""" - - status: Literal["pending_review", "rejected", "canceled", "pending_sending", "sent"] - """Status of the proof of authorization request submission. - - - `pending_review` - The proof of authorization request submission is pending - review. - - `rejected` - The proof of authorization request submission was rejected. - - `canceled` - The proof of authorization request submission was canceled and - replaced with another. - - `pending_sending` - The proof of authorization request submission is pending - sending. - - `sent` - The proof of authorization request submission was sent. - """ - - type: Literal["proof_of_authorization_request_submission"] - """A constant representing the object's type. - - For this resource it will always be `proof_of_authorization_request_submission`. - """ - - updated_at: datetime - """The time the Proof of Authorization Request Submission was last updated.""" - - validated_account_ownership_via_credential: Optional[bool] = None - """Whether account ownership was validated via credential (for instance, Plaid).""" - - validated_account_ownership_with_account_statement: Optional[bool] = None - """Whether account ownership was validated with an account statement.""" - - validated_account_ownership_with_microdeposit: Optional[bool] = None - """Whether account ownership was validated with microdeposit.""" diff --git a/src/increase/types/proof_of_authorization_request_submission_create_params.py b/src/increase/types/proof_of_authorization_request_submission_create_params.py deleted file mode 100644 index bead2c04c..000000000 --- a/src/increase/types/proof_of_authorization_request_submission_create_params.py +++ /dev/null @@ -1,49 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["ProofOfAuthorizationRequestSubmissionCreateParams"] - - -class ProofOfAuthorizationRequestSubmissionCreateParams(TypedDict, total=False): - authorization_terms: Required[str] - """Terms of authorization.""" - - authorized_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] - """Time of authorization.""" - - authorizer_email: Required[str] - """Email of the authorizer.""" - - authorizer_name: Required[str] - """Name of the authorizer.""" - - customer_has_been_offboarded: Required[bool] - """Whether the customer has been offboarded or suspended.""" - - proof_of_authorization_request_id: Required[str] - """ID of the proof of authorization request.""" - - validated_account_ownership_via_credential: Required[bool] - """Whether the account ownership was validated via credential (e.g. Plaid).""" - - validated_account_ownership_with_account_statement: Required[bool] - """Whether the account ownership was validated with an account statement.""" - - validated_account_ownership_with_microdeposit: Required[bool] - """Whether the account ownership was validated with a microdeposit.""" - - additional_evidence_file_id: str - """File containing additional evidence.""" - - authorizer_company: str - """Company of the authorizer.""" - - authorizer_ip_address: str - """IP address of the authorizer.""" diff --git a/src/increase/types/proof_of_authorization_request_submission_list_params.py b/src/increase/types/proof_of_authorization_request_submission_list_params.py deleted file mode 100644 index a79a2fb1d..000000000 --- a/src/increase/types/proof_of_authorization_request_submission_list_params.py +++ /dev/null @@ -1,29 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["ProofOfAuthorizationRequestSubmissionListParams"] - - -class ProofOfAuthorizationRequestSubmissionListParams(TypedDict, total=False): - cursor: str - """Return the page of entries after this one.""" - - idempotency_key: str - """ - Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - proof_of_authorization_request_id: str - """ID of the proof of authorization request.""" diff --git a/tests/api_resources/test_proof_of_authorization_request_submissions.py b/tests/api_resources/test_proof_of_authorization_request_submissions.py deleted file mode 100644 index 5ee9102f0..000000000 --- a/tests/api_resources/test_proof_of_authorization_request_submissions.py +++ /dev/null @@ -1,390 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ( - ProofOfAuthorizationRequestSubmission, -) -from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestProofOfAuthorizationRequestSubmissions: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - additional_evidence_file_id="file_makxrc67oh9l6sg7w9yc", - authorizer_company="National Phonograph Company", - authorizer_ip_address="x", - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.proof_of_authorization_request_submissions.with_raw_response.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.proof_of_authorization_request_submissions.with_streaming_response.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.retrieve( - "proof_of_authorization_request_submission_id", - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "proof_of_authorization_request_submission_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.proof_of_authorization_request_submissions.with_streaming_response.retrieve( - "proof_of_authorization_request_submission_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises( - ValueError, - match=r"Expected a non-empty value for `proof_of_authorization_request_submission_id` but received ''", - ): - client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.list() - assert_matches_type( - SyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - proof_of_authorization_request_submission = client.proof_of_authorization_request_submissions.list( - cursor="cursor", - idempotency_key="x", - limit=1, - proof_of_authorization_request_id="proof_of_authorization_request_id", - ) - assert_matches_type( - SyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.proof_of_authorization_request_submissions.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - SyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.proof_of_authorization_request_submissions.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = response.parse() - assert_matches_type( - SyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncProofOfAuthorizationRequestSubmissions: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request_submission = ( - await async_client.proof_of_authorization_request_submissions.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request_submission = ( - await async_client.proof_of_authorization_request_submissions.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - additional_evidence_file_id="file_makxrc67oh9l6sg7w9yc", - authorizer_company="National Phonograph Company", - authorizer_ip_address="x", - ) - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.proof_of_authorization_request_submissions.with_raw_response.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.proof_of_authorization_request_submissions.with_streaming_response.create( - authorization_terms="I agree to the terms of service.", - authorized_at=parse_datetime("2020-01-31T23:59:59Z"), - authorizer_email="user@example.com", - authorizer_name="Ian Crease", - customer_has_been_offboarded=True, - proof_of_authorization_request_id="proof_of_authorization_request_iwp8no25h3rjvil6ad3b", - validated_account_ownership_via_credential=True, - validated_account_ownership_with_account_statement=True, - validated_account_ownership_with_microdeposit=True, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request_submission = ( - await async_client.proof_of_authorization_request_submissions.retrieve( - "proof_of_authorization_request_submission_id", - ) - ) - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "proof_of_authorization_request_submission_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.proof_of_authorization_request_submissions.with_streaming_response.retrieve( - "proof_of_authorization_request_submission_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - ProofOfAuthorizationRequestSubmission, proof_of_authorization_request_submission, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises( - ValueError, - match=r"Expected a non-empty value for `proof_of_authorization_request_submission_id` but received ''", - ): - await async_client.proof_of_authorization_request_submissions.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request_submission = await async_client.proof_of_authorization_request_submissions.list() - assert_matches_type( - AsyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request_submission = await async_client.proof_of_authorization_request_submissions.list( - cursor="cursor", - idempotency_key="x", - limit=1, - proof_of_authorization_request_id="proof_of_authorization_request_id", - ) - assert_matches_type( - AsyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.proof_of_authorization_request_submissions.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - AsyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.proof_of_authorization_request_submissions.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request_submission = await response.parse() - assert_matches_type( - AsyncPage[ProofOfAuthorizationRequestSubmission], - proof_of_authorization_request_submission, - path=["response"], - ) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_proof_of_authorization_requests.py b/tests/api_resources/test_proof_of_authorization_requests.py deleted file mode 100644 index 67f041080..000000000 --- a/tests/api_resources/test_proof_of_authorization_requests.py +++ /dev/null @@ -1,186 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ProofOfAuthorizationRequest -from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestProofOfAuthorizationRequests: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - proof_of_authorization_request = client.proof_of_authorization_requests.retrieve( - "proof_of_authorization_request_id", - ) - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.proof_of_authorization_requests.with_raw_response.retrieve( - "proof_of_authorization_request_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.proof_of_authorization_requests.with_streaming_response.retrieve( - "proof_of_authorization_request_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request = response.parse() - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `proof_of_authorization_request_id` but received ''" - ): - client.proof_of_authorization_requests.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - proof_of_authorization_request = client.proof_of_authorization_requests.list() - assert_matches_type(SyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - proof_of_authorization_request = client.proof_of_authorization_requests.list( - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - limit=1, - ) - assert_matches_type(SyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.proof_of_authorization_requests.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = response.parse() - assert_matches_type(SyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.proof_of_authorization_requests.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request = response.parse() - assert_matches_type( - SyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"] - ) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncProofOfAuthorizationRequests: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request = await async_client.proof_of_authorization_requests.retrieve( - "proof_of_authorization_request_id", - ) - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.proof_of_authorization_requests.with_raw_response.retrieve( - "proof_of_authorization_request_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = await response.parse() - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.proof_of_authorization_requests.with_streaming_response.retrieve( - "proof_of_authorization_request_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request = await response.parse() - assert_matches_type(ProofOfAuthorizationRequest, proof_of_authorization_request, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises( - ValueError, match=r"Expected a non-empty value for `proof_of_authorization_request_id` but received ''" - ): - await async_client.proof_of_authorization_requests.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request = await async_client.proof_of_authorization_requests.list() - assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - proof_of_authorization_request = await async_client.proof_of_authorization_requests.list( - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - limit=1, - ) - assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.proof_of_authorization_requests.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - proof_of_authorization_request = await response.parse() - assert_matches_type(AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.proof_of_authorization_requests.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - proof_of_authorization_request = await response.parse() - assert_matches_type( - AsyncPage[ProofOfAuthorizationRequest], proof_of_authorization_request, path=["response"] - ) - - assert cast(Any, response.is_closed) is True From 228f5c56d3c12f2bdde9047bb49ffc044a3c6243 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 20:24:50 +0000 Subject: [PATCH 0550/1325] chore(ci): add timeout thresholds for CI jobs --- .github/workflows/ci.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81f6dc20f..04b083ca7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,7 @@ on: jobs: lint: + timeout-minutes: 10 name: lint runs-on: ubuntu-latest steps: @@ -30,6 +31,7 @@ jobs: run: ./scripts/lint test: + timeout-minutes: 10 name: test runs-on: ubuntu-latest steps: From 32d1d60d67a15bf3523dcf4f94d23ef72c6c9c10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 20:34:51 +0000 Subject: [PATCH 0551/1325] chore(internal): import reformatting --- src/increase/resources/account_numbers.py | 11 ++--------- src/increase/resources/account_transfers.py | 5 +---- src/increase/resources/accounts.py | 12 ++---------- src/increase/resources/ach_prenotifications.py | 5 +---- src/increase/resources/ach_transfers.py | 5 +---- src/increase/resources/bookkeeping_accounts.py | 5 +---- src/increase/resources/bookkeeping_entry_sets.py | 5 +---- src/increase/resources/card_disputes.py | 5 +---- src/increase/resources/cards.py | 5 +---- src/increase/resources/check_deposits.py | 5 +---- src/increase/resources/check_transfers.py | 11 ++--------- src/increase/resources/digital_card_profiles.py | 5 +---- src/increase/resources/entities.py | 5 +---- src/increase/resources/event_subscriptions.py | 11 ++--------- src/increase/resources/exports.py | 5 +---- src/increase/resources/external_accounts.py | 11 ++--------- src/increase/resources/file_links.py | 5 +---- src/increase/resources/files.py | 7 +------ src/increase/resources/inbound_ach_transfers.py | 5 +---- src/increase/resources/inbound_check_deposits.py | 5 +---- .../resources/intrafi_account_enrollments.py | 5 +---- src/increase/resources/intrafi_exclusions.py | 5 +---- src/increase/resources/lockboxes.py | 5 +---- src/increase/resources/oauth_tokens.py | 5 +---- src/increase/resources/physical_card_profiles.py | 5 +---- src/increase/resources/physical_cards.py | 5 +---- src/increase/resources/real_time_decisions.py | 5 +---- .../resources/real_time_payments_transfers.py | 5 +---- .../resources/simulations/account_statements.py | 5 +---- src/increase/resources/simulations/ach_transfers.py | 5 +---- .../simulations/card_authorization_expirations.py | 5 +---- .../resources/simulations/card_authorizations.py | 5 +---- src/increase/resources/simulations/card_disputes.py | 5 +---- .../resources/simulations/card_fuel_confirmations.py | 5 +---- .../resources/simulations/card_increments.py | 5 +---- src/increase/resources/simulations/card_refunds.py | 5 +---- src/increase/resources/simulations/card_reversals.py | 5 +---- .../resources/simulations/card_settlements.py | 5 +---- .../simulations/digital_wallet_token_requests.py | 5 +---- src/increase/resources/simulations/documents.py | 5 +---- .../resources/simulations/inbound_ach_transfers.py | 5 +---- .../resources/simulations/inbound_check_deposits.py | 5 +---- .../resources/simulations/inbound_mail_items.py | 5 +---- .../inbound_real_time_payments_transfers.py | 5 +---- .../simulations/inbound_wire_drawdown_requests.py | 5 +---- .../resources/simulations/inbound_wire_transfers.py | 5 +---- .../resources/simulations/interest_payments.py | 5 +---- src/increase/resources/simulations/physical_cards.py | 5 +---- src/increase/resources/simulations/programs.py | 5 +---- .../simulations/real_time_payments_transfers.py | 5 +---- src/increase/resources/supplemental_documents.py | 5 +---- src/increase/resources/wire_drawdown_requests.py | 5 +---- src/increase/resources/wire_transfers.py | 5 +---- 53 files changed, 58 insertions(+), 240 deletions(-) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 15793c0e9..14196bdc6 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -6,16 +6,9 @@ import httpx -from ..types import ( - account_number_list_params, - account_number_create_params, - account_number_update_params, -) +from ..types import account_number_list_params, account_number_create_params, account_number_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 9ed099d38..15dc40b47 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -6,10 +6,7 @@ from ..types import account_transfer_list_params, account_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 338659050..c524fd217 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -7,17 +7,9 @@ import httpx -from ..types import ( - account_list_params, - account_create_params, - account_update_params, - account_balance_params, -) +from ..types import account_list_params, account_create_params, account_update_params, account_balance_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 89237765f..f0dca38bf 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -10,10 +10,7 @@ from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 4e8b65f13..d6fa46286 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -8,10 +8,7 @@ from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 844498447..82c240637 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -15,10 +15,7 @@ bookkeeping_account_balance_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index ef134c2f2..ccace983c 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -9,10 +9,7 @@ from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index db762d7c5..efc5ab590 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -6,10 +6,7 @@ from ..types import card_dispute_list_params, card_dispute_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 70c7b7e00..5030a9736 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -8,10 +8,7 @@ from ..types import card_list_params, card_create_params, card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 5c50117b3..d5ab3cbc9 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -6,10 +6,7 @@ from ..types import check_deposit_list_params, check_deposit_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 83364c819..f05df959c 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -6,16 +6,9 @@ import httpx -from ..types import ( - check_transfer_list_params, - check_transfer_create_params, - check_transfer_stop_payment_params, -) +from ..types import check_transfer_list_params, check_transfer_create_params, check_transfer_stop_payment_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 0499e7d6f..0c1426b54 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -10,10 +10,7 @@ digital_card_profile_create_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index a6c942033..2ba90c0c7 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -19,10 +19,7 @@ entity_update_beneficial_owner_address_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index abaace723..f6ec570ed 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -6,16 +6,9 @@ import httpx -from ..types import ( - event_subscription_list_params, - event_subscription_create_params, - event_subscription_update_params, -) +from ..types import event_subscription_list_params, event_subscription_create_params, event_subscription_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 3f02e7dd8..c4145b4c4 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -8,10 +8,7 @@ from ..types import export_list_params, export_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 9d8a53a1f..a6f62b31b 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -6,16 +6,9 @@ import httpx -from ..types import ( - external_account_list_params, - external_account_create_params, - external_account_update_params, -) +from ..types import external_account_list_params, external_account_create_params, external_account_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/file_links.py b/src/increase/resources/file_links.py index 9f8cbb7ad..c0979d3ca 100644 --- a/src/increase/resources/file_links.py +++ b/src/increase/resources/file_links.py @@ -9,10 +9,7 @@ from ..types import file_link_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 1f74e4992..a9ce42f63 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -9,12 +9,7 @@ from ..types import file_list_params, file_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes -from .._utils import ( - extract_files, - maybe_transform, - deepcopy_minimal, - async_maybe_transform, -) +from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 93aad3d51..7ef4e87b1 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -13,10 +13,7 @@ inbound_ach_transfer_create_notification_of_change_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index eff6a3cdf..3cfe75998 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -8,10 +8,7 @@ from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 77bdf1e6a..9e2a36bc3 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -6,10 +6,7 @@ from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 092b3f9d7..b0cbe9eee 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -6,10 +6,7 @@ from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 5fa0167a1..41929469c 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -8,10 +8,7 @@ from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index cc257c9fe..b50ee71d9 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -8,10 +8,7 @@ from ..types import oauth_token_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index ce72ff36f..dbe1988ad 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -10,10 +10,7 @@ physical_card_profile_create_params, ) from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 1084a1e00..c329b4bf4 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -8,10 +8,7 @@ from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index f2a919cca..d60d2a577 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -6,10 +6,7 @@ from ..types import real_time_decision_action_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 58c8ee1a5..f92206ff3 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -6,10 +6,7 @@ from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index 141646748..b26241422 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 394ce3ce7..30be6ba94 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -7,10 +7,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py index 08ae22ba6..0b517063f 100644 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index d4662b056..66912d863 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -7,10 +7,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index 67c5d923d..c48a3474a 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -7,10 +7,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py index 7400048d6..487db65ea 100644 --- a/src/increase/resources/simulations/card_fuel_confirmations.py +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py index 9e8d77e13..e45309b26 100644 --- a/src/increase/resources/simulations/card_increments.py +++ b/src/increase/resources/simulations/card_increments.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index b2fb23792..e3c26c46b 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py index d1b070b99..46470cc48 100644 --- a/src/increase/resources/simulations/card_reversals.py +++ b/src/increase/resources/simulations/card_reversals.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py index c3919d12e..20450e8a5 100644 --- a/src/increase/resources/simulations/card_settlements.py +++ b/src/increase/resources/simulations/card_settlements.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index a72cf4085..af31793aa 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 63c6f9f29..1486bbc53 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index f8be7d2c3..6032b9f4c 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -9,10 +9,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 4c124dad5..8b8a642d5 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py index b74b359da..c6a0a683c 100755 --- a/src/increase/resources/simulations/inbound_mail_items.py +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index f3adb448c..147ec04f9 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index f6e89b686..c6e4e41a9 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index e4f3b4668..eaae67014 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index 074e86213..a853190c5 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -8,10 +8,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index baf6d1c35..a2f35c7ea 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -7,10 +7,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 4358abc10..250fb206c 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 3f812f40d..03e36e904 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -5,10 +5,7 @@ import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import ( - maybe_transform, - async_maybe_transform, -) +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index b0f7ddc31..169d3c679 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -6,10 +6,7 @@ from ..types import supplemental_document_list_params, supplemental_document_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 4c07e6e14..48366ded1 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -6,10 +6,7 @@ from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 84be74334..bfa9cb500 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -6,10 +6,7 @@ from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import ( - maybe_transform, - async_maybe_transform, -) +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( From d2874c8b8a55efae9374219c5d8e6f65921b4306 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 22:01:50 +0000 Subject: [PATCH 0552/1325] chore(internal): fix list file params --- src/increase/_utils/_utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index e5811bba4..ea3cf3f2c 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -72,8 +72,16 @@ def _extract_items( from .._files import assert_is_file_content # We have exhausted the path, return the entry we found. - assert_is_file_content(obj, key=flattened_key) assert flattened_key is not None + + if is_list(obj): + files: list[tuple[str, FileTypes]] = [] + for entry in obj: + assert_is_file_content(entry, key=flattened_key + "[]" if flattened_key else "") + files.append((flattened_key + "[]", cast(FileTypes, entry))) + return files + + assert_is_file_content(obj, key=flattened_key) return [(flattened_key, cast(FileTypes, obj))] index += 1 From c3329c9ed05ecff336106ab7ca289032457c3c5d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 22:53:41 +0000 Subject: [PATCH 0553/1325] chore(internal): refactor retries to not use recursion --- src/increase/_base_client.py | 414 +++++++++++++++-------------------- 1 file changed, 175 insertions(+), 239 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 33cf9ae7a..bb1083c08 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -437,8 +437,7 @@ def _build_headers(self, options: FinalRequestOptions, *, retries_taken: int = 0 headers = httpx.Headers(headers_dict) idempotency_header = self._idempotency_header - if idempotency_header and options.method.lower() != "get" and idempotency_header not in headers: - options.idempotency_key = options.idempotency_key or self._idempotency_key() + if idempotency_header and options.idempotency_key and idempotency_header not in headers: headers[idempotency_header] = options.idempotency_key # Don't set these headers if they were already set or removed by the caller. We check @@ -903,7 +902,6 @@ def request( self, cast_to: Type[ResponseT], options: FinalRequestOptions, - remaining_retries: Optional[int] = None, *, stream: Literal[True], stream_cls: Type[_StreamT], @@ -914,7 +912,6 @@ def request( self, cast_to: Type[ResponseT], options: FinalRequestOptions, - remaining_retries: Optional[int] = None, *, stream: Literal[False] = False, ) -> ResponseT: ... @@ -924,7 +921,6 @@ def request( self, cast_to: Type[ResponseT], options: FinalRequestOptions, - remaining_retries: Optional[int] = None, *, stream: bool = False, stream_cls: Type[_StreamT] | None = None, @@ -934,125 +930,109 @@ def request( self, cast_to: Type[ResponseT], options: FinalRequestOptions, - remaining_retries: Optional[int] = None, *, stream: bool = False, stream_cls: type[_StreamT] | None = None, ) -> ResponseT | _StreamT: - if remaining_retries is not None: - retries_taken = options.get_max_retries(self.max_retries) - remaining_retries - else: - retries_taken = 0 - - return self._request( - cast_to=cast_to, - options=options, - stream=stream, - stream_cls=stream_cls, - retries_taken=retries_taken, - ) + cast_to = self._maybe_override_cast_to(cast_to, options) - def _request( - self, - *, - cast_to: Type[ResponseT], - options: FinalRequestOptions, - retries_taken: int, - stream: bool, - stream_cls: type[_StreamT] | None, - ) -> ResponseT | _StreamT: # create a copy of the options we were given so that if the # options are mutated later & we then retry, the retries are # given the original options input_options = model_copy(options) - - cast_to = self._maybe_override_cast_to(cast_to, options) - options = self._prepare_options(options) - - remaining_retries = options.get_max_retries(self.max_retries) - retries_taken - request = self._build_request(options, retries_taken=retries_taken) - self._prepare_request(request) - - if options.idempotency_key: + if input_options.idempotency_key is None and input_options.method.lower() != "get": # ensure the idempotency key is reused between requests - input_options.idempotency_key = options.idempotency_key + input_options.idempotency_key = self._idempotency_key() - kwargs: HttpxSendArgs = {} - if self.custom_auth is not None: - kwargs["auth"] = self.custom_auth + response: httpx.Response | None = None + max_retries = input_options.get_max_retries(self.max_retries) - log.debug("Sending HTTP Request: %s %s", request.method, request.url) + retries_taken = 0 + for retries_taken in range(max_retries + 1): + options = model_copy(input_options) + options = self._prepare_options(options) - try: - response = self._client.send( - request, - stream=stream or self._should_stream_response_body(request=request), - **kwargs, - ) - except httpx.TimeoutException as err: - log.debug("Encountered httpx.TimeoutException", exc_info=True) + remaining_retries = max_retries - retries_taken + request = self._build_request(options, retries_taken=retries_taken) + self._prepare_request(request) - if remaining_retries > 0: - return self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - stream=stream, - stream_cls=stream_cls, - response_headers=None, - ) + kwargs: HttpxSendArgs = {} + if self.custom_auth is not None: + kwargs["auth"] = self.custom_auth - log.debug("Raising timeout error") - raise APITimeoutError(request=request) from err - except Exception as err: - log.debug("Encountered Exception", exc_info=True) + log.debug("Sending HTTP Request: %s %s", request.method, request.url) - if remaining_retries > 0: - return self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - stream=stream, - stream_cls=stream_cls, - response_headers=None, + response = None + try: + response = self._client.send( + request, + stream=stream or self._should_stream_response_body(request=request), + **kwargs, ) + except httpx.TimeoutException as err: + log.debug("Encountered httpx.TimeoutException", exc_info=True) + + if remaining_retries > 0: + self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=None, + ) + continue + + log.debug("Raising timeout error") + raise APITimeoutError(request=request) from err + except Exception as err: + log.debug("Encountered Exception", exc_info=True) + + if remaining_retries > 0: + self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=None, + ) + continue + + log.debug("Raising connection error") + raise APIConnectionError(request=request) from err + + log.debug( + 'HTTP Response: %s %s "%i %s" %s', + request.method, + request.url, + response.status_code, + response.reason_phrase, + response.headers, + ) - log.debug("Raising connection error") - raise APIConnectionError(request=request) from err - - log.debug( - 'HTTP Response: %s %s "%i %s" %s', - request.method, - request.url, - response.status_code, - response.reason_phrase, - response.headers, - ) + try: + response.raise_for_status() + except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code + log.debug("Encountered httpx.HTTPStatusError", exc_info=True) + + if remaining_retries > 0 and self._should_retry(err.response): + err.response.close() + self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=response, + ) + continue - try: - response.raise_for_status() - except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code - log.debug("Encountered httpx.HTTPStatusError", exc_info=True) - - if remaining_retries > 0 and self._should_retry(err.response): - err.response.close() - return self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - response_headers=err.response.headers, - stream=stream, - stream_cls=stream_cls, - ) + # If the response is streamed then we need to explicitly read the response + # to completion before attempting to access the response text. + if not err.response.is_closed: + err.response.read() - # If the response is streamed then we need to explicitly read the response - # to completion before attempting to access the response text. - if not err.response.is_closed: - err.response.read() + log.debug("Re-raising status error") + raise self._make_status_error_from_response(err.response) from None - log.debug("Re-raising status error") - raise self._make_status_error_from_response(err.response) from None + break + assert response is not None, "could not resolve response (should never happen)" return self._process_response( cast_to=cast_to, options=options, @@ -1062,37 +1042,20 @@ def _request( retries_taken=retries_taken, ) - def _retry_request( - self, - options: FinalRequestOptions, - cast_to: Type[ResponseT], - *, - retries_taken: int, - response_headers: httpx.Headers | None, - stream: bool, - stream_cls: type[_StreamT] | None, - ) -> ResponseT | _StreamT: - remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + def _sleep_for_retry( + self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx.Response | None + ) -> None: + remaining_retries = max_retries - retries_taken if remaining_retries == 1: log.debug("1 retry left") else: log.debug("%i retries left", remaining_retries) - timeout = self._calculate_retry_timeout(remaining_retries, options, response_headers) + timeout = self._calculate_retry_timeout(remaining_retries, options, response.headers if response else None) log.info("Retrying request to %s in %f seconds", options.url, timeout) - # In a synchronous context we are blocking the entire thread. Up to the library user to run the client in a - # different thread if necessary. time.sleep(timeout) - return self._request( - options=options, - cast_to=cast_to, - retries_taken=retries_taken + 1, - stream=stream, - stream_cls=stream_cls, - ) - def _process_response( self, *, @@ -1436,7 +1399,6 @@ async def request( options: FinalRequestOptions, *, stream: Literal[False] = False, - remaining_retries: Optional[int] = None, ) -> ResponseT: ... @overload @@ -1447,7 +1409,6 @@ async def request( *, stream: Literal[True], stream_cls: type[_AsyncStreamT], - remaining_retries: Optional[int] = None, ) -> _AsyncStreamT: ... @overload @@ -1458,7 +1419,6 @@ async def request( *, stream: bool, stream_cls: type[_AsyncStreamT] | None = None, - remaining_retries: Optional[int] = None, ) -> ResponseT | _AsyncStreamT: ... async def request( @@ -1468,120 +1428,111 @@ async def request( *, stream: bool = False, stream_cls: type[_AsyncStreamT] | None = None, - remaining_retries: Optional[int] = None, - ) -> ResponseT | _AsyncStreamT: - if remaining_retries is not None: - retries_taken = options.get_max_retries(self.max_retries) - remaining_retries - else: - retries_taken = 0 - - return await self._request( - cast_to=cast_to, - options=options, - stream=stream, - stream_cls=stream_cls, - retries_taken=retries_taken, - ) - - async def _request( - self, - cast_to: Type[ResponseT], - options: FinalRequestOptions, - *, - stream: bool, - stream_cls: type[_AsyncStreamT] | None, - retries_taken: int, ) -> ResponseT | _AsyncStreamT: if self._platform is None: # `get_platform` can make blocking IO calls so we # execute it earlier while we are in an async context self._platform = await asyncify(get_platform)() + cast_to = self._maybe_override_cast_to(cast_to, options) + # create a copy of the options we were given so that if the # options are mutated later & we then retry, the retries are # given the original options input_options = model_copy(options) - - cast_to = self._maybe_override_cast_to(cast_to, options) - options = await self._prepare_options(options) - - remaining_retries = options.get_max_retries(self.max_retries) - retries_taken - request = self._build_request(options, retries_taken=retries_taken) - await self._prepare_request(request) - - if options.idempotency_key: + if input_options.idempotency_key is None and input_options.method.lower() != "get": # ensure the idempotency key is reused between requests - input_options.idempotency_key = options.idempotency_key + input_options.idempotency_key = self._idempotency_key() - kwargs: HttpxSendArgs = {} - if self.custom_auth is not None: - kwargs["auth"] = self.custom_auth + response: httpx.Response | None = None + max_retries = input_options.get_max_retries(self.max_retries) - try: - response = await self._client.send( - request, - stream=stream or self._should_stream_response_body(request=request), - **kwargs, - ) - except httpx.TimeoutException as err: - log.debug("Encountered httpx.TimeoutException", exc_info=True) + retries_taken = 0 + for retries_taken in range(max_retries + 1): + options = model_copy(input_options) + options = await self._prepare_options(options) - if remaining_retries > 0: - return await self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - stream=stream, - stream_cls=stream_cls, - response_headers=None, - ) + remaining_retries = max_retries - retries_taken + request = self._build_request(options, retries_taken=retries_taken) + await self._prepare_request(request) - log.debug("Raising timeout error") - raise APITimeoutError(request=request) from err - except Exception as err: - log.debug("Encountered Exception", exc_info=True) + kwargs: HttpxSendArgs = {} + if self.custom_auth is not None: + kwargs["auth"] = self.custom_auth - if remaining_retries > 0: - return await self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - stream=stream, - stream_cls=stream_cls, - response_headers=None, - ) + log.debug("Sending HTTP Request: %s %s", request.method, request.url) - log.debug("Raising connection error") - raise APIConnectionError(request=request) from err + response = None + try: + response = await self._client.send( + request, + stream=stream or self._should_stream_response_body(request=request), + **kwargs, + ) + except httpx.TimeoutException as err: + log.debug("Encountered httpx.TimeoutException", exc_info=True) + + if remaining_retries > 0: + await self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=None, + ) + continue + + log.debug("Raising timeout error") + raise APITimeoutError(request=request) from err + except Exception as err: + log.debug("Encountered Exception", exc_info=True) + + if remaining_retries > 0: + await self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=None, + ) + continue + + log.debug("Raising connection error") + raise APIConnectionError(request=request) from err + + log.debug( + 'HTTP Response: %s %s "%i %s" %s', + request.method, + request.url, + response.status_code, + response.reason_phrase, + response.headers, + ) - log.debug( - 'HTTP Request: %s %s "%i %s"', request.method, request.url, response.status_code, response.reason_phrase - ) + try: + response.raise_for_status() + except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code + log.debug("Encountered httpx.HTTPStatusError", exc_info=True) + + if remaining_retries > 0 and self._should_retry(err.response): + await err.response.aclose() + await self._sleep_for_retry( + retries_taken=retries_taken, + max_retries=max_retries, + options=input_options, + response=response, + ) + continue - try: - response.raise_for_status() - except httpx.HTTPStatusError as err: # thrown on 4xx and 5xx status code - log.debug("Encountered httpx.HTTPStatusError", exc_info=True) - - if remaining_retries > 0 and self._should_retry(err.response): - await err.response.aclose() - return await self._retry_request( - input_options, - cast_to, - retries_taken=retries_taken, - response_headers=err.response.headers, - stream=stream, - stream_cls=stream_cls, - ) + # If the response is streamed then we need to explicitly read the response + # to completion before attempting to access the response text. + if not err.response.is_closed: + await err.response.aread() - # If the response is streamed then we need to explicitly read the response - # to completion before attempting to access the response text. - if not err.response.is_closed: - await err.response.aread() + log.debug("Re-raising status error") + raise self._make_status_error_from_response(err.response) from None - log.debug("Re-raising status error") - raise self._make_status_error_from_response(err.response) from None + break + assert response is not None, "could not resolve response (should never happen)" return await self._process_response( cast_to=cast_to, options=options, @@ -1591,35 +1542,20 @@ async def _request( retries_taken=retries_taken, ) - async def _retry_request( - self, - options: FinalRequestOptions, - cast_to: Type[ResponseT], - *, - retries_taken: int, - response_headers: httpx.Headers | None, - stream: bool, - stream_cls: type[_AsyncStreamT] | None, - ) -> ResponseT | _AsyncStreamT: - remaining_retries = options.get_max_retries(self.max_retries) - retries_taken + async def _sleep_for_retry( + self, *, retries_taken: int, max_retries: int, options: FinalRequestOptions, response: httpx.Response | None + ) -> None: + remaining_retries = max_retries - retries_taken if remaining_retries == 1: log.debug("1 retry left") else: log.debug("%i retries left", remaining_retries) - timeout = self._calculate_retry_timeout(remaining_retries, options, response_headers) + timeout = self._calculate_retry_timeout(remaining_retries, options, response.headers if response else None) log.info("Retrying request to %s in %f seconds", options.url, timeout) await anyio.sleep(timeout) - return await self._request( - options=options, - cast_to=cast_to, - retries_taken=retries_taken + 1, - stream=stream, - stream_cls=stream_cls, - ) - async def _process_response( self, *, From 3fdc6c3f6c04729ef730bf800df5236de7336b7b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Apr 2025 23:26:45 +0000 Subject: [PATCH 0554/1325] fix(pydantic v1): more robust ModelField.annotation check --- src/increase/_models.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 58b9263e8..798956f17 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -626,8 +626,8 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, # Note: if one variant defines an alias then they all should discriminator_alias = field_info.alias - if field_info.annotation and is_literal_type(field_info.annotation): - for entry in get_args(field_info.annotation): + if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): + for entry in get_args(annotation): if isinstance(entry, str): mapping[entry] = variant From fac63850eee984b5d71d942f89a7e64ed0b74b5c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 02:39:04 +0000 Subject: [PATCH 0555/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aaefead2d..8f3115921 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.226.0" + ".": "0.227.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b98faf0be..721254bb9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.226.0" +version = "0.227.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fb7ef2977..4a02b3f82 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.226.0" # x-release-please-version +__version__ = "0.227.0" # x-release-please-version From 466059b17f186483685bccdbc3e29520fe612458 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 17:55:21 +0000 Subject: [PATCH 0556/1325] chore(ci): run on more branches and use depot runners --- .github/workflows/ci.yml | 16 ++++++++-------- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 04b083ca7..33820422d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,18 +1,18 @@ name: CI on: push: - branches: - - main - pull_request: - branches: - - main - - next + branches-ignore: + - 'generated' + - 'codegen/**' + - 'integrated/**' + - 'stl-preview-head/**' + - 'stl-preview-base/**' jobs: lint: timeout-minutes: 10 name: lint - runs-on: ubuntu-latest + runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: ubuntu-latest + runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 10c23f798..e27511701 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -11,7 +11,7 @@ on: jobs: publish: name: publish - runs-on: ubuntu-latest + runs-on: depot-ubuntu-24.04 steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 6ef88fffb..8f194cc8e 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -8,7 +8,7 @@ on: jobs: release_doctor: name: release doctor - runs-on: ubuntu-latest + runs-on: depot-ubuntu-24.04 if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: From 1767af0850749729747c181dd3063db88b825e53 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 19:59:10 +0000 Subject: [PATCH 0557/1325] chore(ci): only use depot for staging repos --- .github/workflows/ci.yml | 4 ++-- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 33820422d..6050d6f47 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: lint: timeout-minutes: 10 name: lint - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 @@ -33,7 +33,7 @@ jobs: test: timeout-minutes: 10 name: test - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index e27511701..10c23f798 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -11,7 +11,7 @@ on: jobs: publish: name: publish - runs-on: depot-ubuntu-24.04 + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 8f194cc8e..6ef88fffb 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -8,7 +8,7 @@ on: jobs: release_doctor: name: release doctor - runs-on: depot-ubuntu-24.04 + runs-on: ubuntu-latest if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: From 4147ca146a521e42d297de59a809a681402b193b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Apr 2025 22:08:37 +0000 Subject: [PATCH 0558/1325] chore: broadly detect json family of content-type headers --- src/increase/_response.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_response.py b/src/increase/_response.py index 9597a5b3b..7fb2fb75a 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -233,7 +233,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: # split is required to handle cases where additional information is included # in the response, e.g. application/json; charset=utf-8 content_type, *_ = response.headers.get("content-type", "*").split(";") - if content_type != "application/json": + if not content_type.endswith("json"): if is_basemodel(cast_to): try: data = response.json() From 30acba39c1c224a4582615c43baca2b411191e04 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 16:03:07 +0000 Subject: [PATCH 0559/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 16 ++++++++++++++++ .../types/pending_transaction_list_params.py | 1 + src/increase/types/transaction.py | 16 ++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ebab9869..ef1d3d99d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7eefcf9e79e89a7e4a2a064d93c40f83d3efe93ea91c0e9ba7112e491fb69e8f.yml -openapi_spec_hash: 3e3ee435a96bbb79dfe7c28d4bdab846 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ea1cbc57d35054776bb4114a558a9a752b9402c1c35e9ae8b3110b829621f68f.yml +openapi_spec_hash: 2d965f5c4e7347b2a9b916e13d7f8433 config_hash: 6ae27f935d24d38237894dd4fd6bd749 diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 071a5aec4..01602b251 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -23,6 +23,7 @@ "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", + "SourceSwiftTransferInstruction", "SourceWireTransferInstruction", ] @@ -565,6 +566,11 @@ class SourceRealTimePaymentsTransferInstruction(BaseModel): """ +class SourceSwiftTransferInstruction(BaseModel): + transfer_id: str + """The identifier of the Swift Transfer that led to this Pending Transaction.""" + + class SourceWireTransferInstruction(BaseModel): account_number: str """The account number for the destination account.""" @@ -618,6 +624,7 @@ class Source(BaseModel): "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", + "swift_transfer_instruction", "other", ] """The type of the resource. @@ -644,6 +651,8 @@ class Source(BaseModel): the `wire_transfer_instruction` object. - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal: details will be under the `inbound_wire_transfer_reversal` object. + - `swift_transfer_instruction` - Swift Transfer Instruction: details will be + under the `swift_transfer_instruction` object. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ @@ -693,6 +702,13 @@ class Source(BaseModel): equal to `real_time_payments_transfer_instruction`. """ + swift_transfer_instruction: Optional[SourceSwiftTransferInstruction] = None + """A Swift Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `swift_transfer_instruction`. + """ + wire_transfer_instruction: Optional[SourceWireTransferInstruction] = None """A Wire Transfer Instruction object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index c5baebcfc..428ba10f0 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -48,6 +48,7 @@ class PendingTransactionListParams(TypedDict, total=False): "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", + "swift_transfer_instruction", "other", ] ], diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 3f49a6d99..4dbaaff56 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -59,6 +59,7 @@ "SourceInternalSource", "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", + "SourceSwiftTransferIntention", "SourceWireTransferIntention", ] @@ -2262,6 +2263,11 @@ class SourceSampleFunds(BaseModel): """Where the sample funds came from.""" +class SourceSwiftTransferIntention(BaseModel): + transfer_id: str + """The identifier of the Swift Transfer that led to this Transaction.""" + + class SourceWireTransferIntention(BaseModel): account_number: str """The destination account number.""" @@ -2396,6 +2402,7 @@ class Source(BaseModel): "real_time_payments_transfer_acknowledgement", "sample_funds", "wire_transfer_intention", + "swift_transfer_intention", "other", ] """The type of the resource. @@ -2462,6 +2469,8 @@ class Source(BaseModel): object. - `wire_transfer_intention` - Wire Transfer Intention: details will be under the `wire_transfer_intention` object. + - `swift_transfer_intention` - Swift Transfer Intention: details will be under + the `swift_transfer_intention` object. - `other` - The Transaction was made for an undocumented or deprecated reason. """ @@ -2616,6 +2625,13 @@ class Source(BaseModel): equal to `sample_funds`. Sample funds for testing purposes. """ + swift_transfer_intention: Optional[SourceSwiftTransferIntention] = None + """A Swift Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `swift_transfer_intention`. A Swift Transfer initiated via Increase. + """ + wire_transfer_intention: Optional[SourceWireTransferIntention] = None """A Wire Transfer Intention object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index f7bfe16d6..5fcfaba0c 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -68,6 +68,7 @@ class TransactionListParams(TypedDict, total=False): "real_time_payments_transfer_acknowledgement", "sample_funds", "wire_transfer_intention", + "swift_transfer_intention", "other", ] ], From d0be5b14919a8483a271d9bdc5f0432c988edcf8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Apr 2025 18:58:19 +0000 Subject: [PATCH 0560/1325] chore(internal): codegen related update --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8f3115921..77cb942fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.227.0" + ".": "0.228.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 721254bb9..265ec2c6c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.227.0" +version = "0.228.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4a02b3f82..303370d15 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.227.0" # x-release-please-version +__version__ = "0.228.0" # x-release-please-version From ec97d33fcaefa9fba696e93be052f4fe2bb63716 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 00:38:00 +0000 Subject: [PATCH 0561/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ef1d3d99d..07e53313c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ea1cbc57d35054776bb4114a558a9a752b9402c1c35e9ae8b3110b829621f68f.yml -openapi_spec_hash: 2d965f5c4e7347b2a9b916e13d7f8433 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bcb90ff3968f198d1d36120f0abb49b80b4a3f3acbc1d88af9d9c8de94c10c32.yml +openapi_spec_hash: f649e94adde0f37d7f211b3a4e9de28b config_hash: 6ae27f935d24d38237894dd4fd6bd749 From 36d1a497c2fa762a42dde3c3190eef8736376ea7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 25 Apr 2025 16:58:42 +0000 Subject: [PATCH 0562/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 12 ++++++++++++ .../types/check_transfer_create_params.py | 16 ++++++++-------- tests/api_resources/test_check_transfers.py | 4 ++-- 4 files changed, 24 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 07e53313c..fc9313a0c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bcb90ff3968f198d1d36120f0abb49b80b4a3f3acbc1d88af9d9c8de94c10c32.yml -openapi_spec_hash: f649e94adde0f37d7f211b3a4e9de28b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27dc46bb403d49303c0a407c619e63dfcb1be14d16536390f0b4a8dd3b3d8e38.yml +openapi_spec_hash: 679632c6d91d4a35625ce94adc2c6ea0 config_hash: 6ae27f935d24d38237894dd4fd6bd749 diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index f05df959c..b0ed24cc7 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -51,6 +51,7 @@ def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, + check_number: str | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, @@ -80,6 +81,10 @@ def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. + check_number: The check number Increase should use for the check. This should not contain + leading zeroes and must be unique across the `source_account_number`. If this is + omitted, Increase will generate a check number for you. + physical_check: Details relating to the physical check that Increase will print and mail. This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. @@ -108,6 +113,7 @@ def create( "amount": amount, "fulfillment_method": fulfillment_method, "source_account_number_id": source_account_number_id, + "check_number": check_number, "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, @@ -384,6 +390,7 @@ async def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, + check_number: str | NotGiven = NOT_GIVEN, physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, @@ -413,6 +420,10 @@ async def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. + check_number: The check number Increase should use for the check. This should not contain + leading zeroes and must be unique across the `source_account_number`. If this is + omitted, Increase will generate a check number for you. + physical_check: Details relating to the physical check that Increase will print and mail. This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. @@ -441,6 +452,7 @@ async def create( "amount": amount, "fulfillment_method": fulfillment_method, "source_account_number_id": source_account_number_id, + "check_number": check_number, "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index fb930c320..b121014ad 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -35,6 +35,14 @@ class CheckTransferCreateParams(TypedDict, total=False): on the check. """ + check_number: str + """The check number Increase should use for the check. + + This should not contain leading zeroes and must be unique across the + `source_account_number`. If this is omitted, Increase will generate a check + number for you. + """ + physical_check: PhysicalCheck """Details relating to the physical check that Increase will print and mail. @@ -108,14 +116,6 @@ class PhysicalCheck(TypedDict, total=False): https://increase.com/documentation/originating-checks#printing-checks . """ - check_number: str - """The check number Increase should print on the check. - - This should not contain leading zeroes and must be unique across the - `source_account_number`. If this is omitted, Increase will generate a check - number for you. - """ - note: str """The descriptor that will be printed on the letter included with the check.""" diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 063d15862..4df220a95 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: amount=1000, fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + check_number="x", physical_check={ "mailing_address": { "city": "New York", @@ -49,7 +50,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "memo": "Check payment", "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", - "check_number": "x", "note": "x", "return_address": { "city": "x", @@ -320,6 +320,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) amount=1000, fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + check_number="x", physical_check={ "mailing_address": { "city": "New York", @@ -331,7 +332,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "memo": "Check payment", "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", - "check_number": "x", "note": "x", "return_address": { "city": "x", From 127638e9295e50549baaf607d89b24496c08f4f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 26 Apr 2025 05:40:40 +0000 Subject: [PATCH 0563/1325] chore(internal): codegen related update --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 77cb942fe..b1f2bd656 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.228.0" + ".": "0.229.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 265ec2c6c..209279975 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.228.0" +version = "0.229.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 303370d15..812ae98dd 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.228.0" # x-release-please-version +__version__ = "0.229.0" # x-release-please-version From c05f15946f088d9ef965bf643576ef3292ec4bf9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 27 Apr 2025 20:20:15 +0000 Subject: [PATCH 0564/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 28 ++++++++++++++++++++++++++-- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index fc9313a0c..90cd8584e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27dc46bb403d49303c0a407c619e63dfcb1be14d16536390f0b4a8dd3b3d8e38.yml -openapi_spec_hash: 679632c6d91d4a35625ce94adc2c6ea0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-58a2ee2ff5eb6f528503fbaae714862d76b1dc7c64dc6349e0358d4cac6cc9a4.yml +openapi_spec_hash: ff3a1961dead0bea92a692b13b6a96fb config_hash: 6ae27f935d24d38237894dd4fd6bd749 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 5d6acf95c..679d351b8 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -1,12 +1,12 @@ # 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__ = ["PhysicalCard", "Cardholder", "Shipment", "ShipmentAddress", "ShipmentTracking"] +__all__ = ["PhysicalCard", "Cardholder", "Shipment", "ShipmentAddress", "ShipmentTracking", "ShipmentTrackingUpdate"] class Cardholder(BaseModel): @@ -40,6 +40,27 @@ class ShipmentAddress(BaseModel): """The US state of the shipping address.""" +class ShipmentTrackingUpdate(BaseModel): + category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"] + """The type of tracking event. + + - `in_transit` - The physical card is in transit. + - `processed_for_delivery` - The physical card has been processed for delivery. + - `delivered` - The physical card has been delivered. + - `returned_to_sender` - Delivery failed and the physical card was returned to + sender. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the tracking event took place. + """ + + postal_code: str + """The postal code where the event took place.""" + + class ShipmentTracking(BaseModel): number: str """The tracking number.""" @@ -57,6 +78,9 @@ class ShipmentTracking(BaseModel): carrier. """ + updates: List[ShipmentTrackingUpdate] + """Tracking updates relating to the physical card's delivery.""" + class Shipment(BaseModel): address: ShipmentAddress From 32887ad4727bbe1a0664f5e8d43ce2bce11d95a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 28 Apr 2025 14:13:17 +0000 Subject: [PATCH 0565/1325] chore(internal): codegen related update --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b1f2bd656..dd07609eb 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.229.0" + ".": "0.230.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 209279975..1007e3414 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.229.0" +version = "0.230.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 812ae98dd..5a4ba5779 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.229.0" # x-release-please-version +__version__ = "0.230.0" # x-release-please-version From 352dc8f8d6797b3d990835396b75ce8f20a72513 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Apr 2025 17:53:42 +0000 Subject: [PATCH 0566/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + .../resources/inbound_wire_transfers.py | 126 +++++++++++++++++- src/increase/types/__init__.py | 1 + src/increase/types/inbound_wire_transfer.py | 24 +++- .../inbound_wire_transfer_reverse_params.py | 17 +++ .../test_inbound_wire_transfers.py | 88 ++++++++++++ 7 files changed, 258 insertions(+), 7 deletions(-) create mode 100644 src/increase/types/inbound_wire_transfer_reverse_params.py diff --git a/.stats.yml b/.stats.yml index 90cd8584e..3b39bb0c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 194 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-58a2ee2ff5eb6f528503fbaae714862d76b1dc7c64dc6349e0358d4cac6cc9a4.yml -openapi_spec_hash: ff3a1961dead0bea92a692b13b6a96fb -config_hash: 6ae27f935d24d38237894dd4fd6bd749 +configured_endpoints: 195 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10e14c48dec1372ffe696cef97378055ec5009aa2921e346cf22b44c9a158380.yml +openapi_spec_hash: 4d0a40021d67f4424535e3dd65599ff4 +config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/api.md b/api.md index 1eb20d61e..b1e7fc323 100644 --- a/api.md +++ b/api.md @@ -275,6 +275,7 @@ Methods: - client.inbound_wire_transfers.retrieve(inbound_wire_transfer_id) -> InboundWireTransfer - client.inbound_wire_transfers.list(\*\*params) -> SyncPage[InboundWireTransfer] +- client.inbound_wire_transfers.reverse(inbound_wire_transfer_id, \*\*params) -> InboundWireTransfer # WireDrawdownRequests diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 6053cd963..a697f2460 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -2,11 +2,13 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from ..types import inbound_wire_transfer_list_params +from ..types import inbound_wire_transfer_list_params, inbound_wire_transfer_reverse_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -139,6 +141,60 @@ def list( model=InboundWireTransfer, ) + def reverse( + self, + inbound_wire_transfer_id: str, + *, + reason: Literal["duplicate", "creditor_request"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Reverse an Inbound Wire Transfer + + Args: + inbound_wire_transfer_id: The identifier of the Inbound Wire Transfer to reverse. + + reason: Reason for the reversal. + + - `duplicate` - The inbound wire transfer was a duplicate. + - `creditor_request` - The recipient of the wire transfer requested the funds be + returned to the sender. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_wire_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" + ) + return self._post( + f"/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + body=maybe_transform( + {"reason": reason}, inbound_wire_transfer_reverse_params.InboundWireTransferReverseParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + class AsyncInboundWireTransfersResource(AsyncAPIResource): @cached_property @@ -257,6 +313,60 @@ def list( model=InboundWireTransfer, ) + async def reverse( + self, + inbound_wire_transfer_id: str, + *, + reason: Literal["duplicate", "creditor_request"], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> InboundWireTransfer: + """ + Reverse an Inbound Wire Transfer + + Args: + inbound_wire_transfer_id: The identifier of the Inbound Wire Transfer to reverse. + + reason: Reason for the reversal. + + - `duplicate` - The inbound wire transfer was a duplicate. + - `creditor_request` - The recipient of the wire transfer requested the funds be + returned to the sender. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_wire_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" + ) + return await self._post( + f"/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + body=await async_maybe_transform( + {"reason": reason}, inbound_wire_transfer_reverse_params.InboundWireTransferReverseParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundWireTransfer, + ) + class InboundWireTransfersResourceWithRawResponse: def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None: @@ -268,6 +378,9 @@ def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None self.list = to_raw_response_wrapper( inbound_wire_transfers.list, ) + self.reverse = to_raw_response_wrapper( + inbound_wire_transfers.reverse, + ) class AsyncInboundWireTransfersResourceWithRawResponse: @@ -280,6 +393,9 @@ def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> self.list = async_to_raw_response_wrapper( inbound_wire_transfers.list, ) + self.reverse = async_to_raw_response_wrapper( + inbound_wire_transfers.reverse, + ) class InboundWireTransfersResourceWithStreamingResponse: @@ -292,6 +408,9 @@ def __init__(self, inbound_wire_transfers: InboundWireTransfersResource) -> None self.list = to_streamed_response_wrapper( inbound_wire_transfers.list, ) + self.reverse = to_streamed_response_wrapper( + inbound_wire_transfers.reverse, + ) class AsyncInboundWireTransfersResourceWithStreamingResponse: @@ -304,3 +423,6 @@ def __init__(self, inbound_wire_transfers: AsyncInboundWireTransfersResource) -> self.list = async_to_streamed_response_wrapper( inbound_wire_transfers.list, ) + self.reverse = async_to_streamed_response_wrapper( + inbound_wire_transfers.reverse, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 4bc44cb46..c6b3cb5d8 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -143,6 +143,7 @@ from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams +from .inbound_wire_transfer_reverse_params import InboundWireTransferReverseParams as InboundWireTransferReverseParams from .entity_create_beneficial_owner_params import ( EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, ) diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 341f29679..2a83ce566 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -6,7 +6,23 @@ from .._models import BaseModel -__all__ = ["InboundWireTransfer"] +__all__ = ["InboundWireTransfer", "Reversal"] + + +class Reversal(BaseModel): + reason: Literal["duplicate", "creditor_request"] + """The reason for the reversal. + + - `duplicate` - The inbound wire transfer was a duplicate. + - `creditor_request` - The recipient of the wire transfer requested the funds be + returned to the sender. + """ + + reversed_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was reversed. + """ class InboundWireTransfer(BaseModel): @@ -86,6 +102,12 @@ class InboundWireTransfer(BaseModel): originator_to_beneficiary_information_line4: Optional[str] = None """A free-form message set by the wire originator.""" + reversal: Optional[Reversal] = None + """ + Information about the reversal of the inbound wire transfer if it has been + reversed. + """ + sender_reference: Optional[str] = None """The sending bank's reference number for the wire transfer.""" diff --git a/src/increase/types/inbound_wire_transfer_reverse_params.py b/src/increase/types/inbound_wire_transfer_reverse_params.py new file mode 100644 index 000000000..871521cf2 --- /dev/null +++ b/src/increase/types/inbound_wire_transfer_reverse_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundWireTransferReverseParams"] + + +class InboundWireTransferReverseParams(TypedDict, total=False): + reason: Required[Literal["duplicate", "creditor_request"]] + """Reason for the reversal. + + - `duplicate` - The inbound wire transfer was a duplicate. + - `creditor_request` - The recipient of the wire transfer requested the funds be + returned to the sender. + """ diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index ed4c8234a..4efa3a3e4 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -101,6 +101,50 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_reverse(self, client: Increase) -> None: + inbound_wire_transfer = client.inbound_wire_transfers.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_raw_response_reverse(self, client: Increase) -> None: + response = client.inbound_wire_transfers.with_raw_response.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + def test_streaming_response_reverse(self, client: Increase) -> None: + with client.inbound_wire_transfers.with_streaming_response.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_reverse(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_wire_transfer_id` but received ''" + ): + client.inbound_wire_transfers.with_raw_response.reverse( + inbound_wire_transfer_id="", + reason="creditor_request", + ) + class TestAsyncInboundWireTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -186,3 +230,47 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_reverse(self, async_client: AsyncIncrease) -> None: + inbound_wire_transfer = await async_client.inbound_wire_transfers.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_wire_transfers.with_raw_response.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_wire_transfers.with_streaming_response.reverse( + inbound_wire_transfer_id="inbound_wire_transfer_f228m6bmhtcxjco9pwp0", + reason="creditor_request", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_wire_transfer = await response.parse() + assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_wire_transfer_id` but received ''" + ): + await async_client.inbound_wire_transfers.with_raw_response.reverse( + inbound_wire_transfer_id="", + reason="creditor_request", + ) From 99a9643a57c166c1685e997981e420d60af96a39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 30 Apr 2025 04:47:18 +0000 Subject: [PATCH 0567/1325] chore(internal): codegen related update --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dd07609eb..b40ade508 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.230.0" + ".": "0.231.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1007e3414..e7d66f012 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.230.0" +version = "0.231.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5a4ba5779..0de9d8ffa 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.230.0" # x-release-please-version +__version__ = "0.231.0" # x-release-please-version From 30790b4be8c8633311999de092a88109681feda3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 01:19:18 +0000 Subject: [PATCH 0568/1325] feat(api): api update --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3b39bb0c1..2d162283a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10e14c48dec1372ffe696cef97378055ec5009aa2921e346cf22b44c9a158380.yml -openapi_spec_hash: 4d0a40021d67f4424535e3dd65599ff4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a47278641590183f932208eacfc1019b12ef8ff81de2278875a323dffd69d67c.yml +openapi_spec_hash: f942208bd5ec3db80875f03d4ee10941 config_hash: 1619155422217276e2489ae10ce63a25 From e84bc7d3fc2ab575907ce872aa20f4e1ff494b89 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 May 2025 15:29:42 +0000 Subject: [PATCH 0569/1325] chore(internal): codegen related update --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b40ade508..fca531b31 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.231.0" + ".": "0.232.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e7d66f012..5f83c11d4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.231.0" +version = "0.232.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0de9d8ffa..84988eadf 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.231.0" # x-release-please-version +__version__ = "0.232.0" # x-release-please-version From 0dbe9ac50cfd6188e3aab1140d1714d4dc62f416 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 4 May 2025 18:50:56 +0000 Subject: [PATCH 0570/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 8 +++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2d162283a..c4df4d7a0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a47278641590183f932208eacfc1019b12ef8ff81de2278875a323dffd69d67c.yml -openapi_spec_hash: f942208bd5ec3db80875f03d4ee10941 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-16df305f7a47d8eea31d50e9afb8667a56e115ffd137c13b6d219f92e90a60fe.yml +openapi_spec_hash: 0973872d3a75e346faa27e30e228cdf3 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 679d351b8..52e98f502 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -51,15 +51,21 @@ class ShipmentTrackingUpdate(BaseModel): sender. """ + city: Optional[str] = None + """The city where the event took place.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the tracking event took place. """ - postal_code: str + postal_code: Optional[str] = None """The postal code where the event took place.""" + state: Optional[str] = None + """The state where the event took place.""" + class ShipmentTracking(BaseModel): number: str From 06fa69a6c9e3fa09f637994a865e1943ef50635c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 4 May 2025 18:51:52 +0000 Subject: [PATCH 0571/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fca531b31..23d03256b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.232.0" + ".": "0.233.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5f83c11d4..151eeea28 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.232.0" +version = "0.233.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 84988eadf..3308105eb 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.232.0" # x-release-please-version +__version__ = "0.233.0" # x-release-please-version From c6413ba1e203780352e770986832d79fbb995bbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 May 2025 22:01:43 +0000 Subject: [PATCH 0572/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/intrafi_balances.py | 14 ++++++++++---- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4df4d7a0..fcab57af4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-16df305f7a47d8eea31d50e9afb8667a56e115ffd137c13b6d219f92e90a60fe.yml -openapi_spec_hash: 0973872d3a75e346faa27e30e228cdf3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c3638e748a658e68e6e4cd2b63cbbaf83ed0799919b2ab8bd5833f549984106.yml +openapi_spec_hash: 69558e21d0e0671eb3f10dd541c75346 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index a5b56f2b0..8b6ac706e 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -50,8 +50,11 @@ def intrafi_balance( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IntrafiBalance: - """ - Get IntraFi balances by bank + """Returns the IntraFi balance for the given account. + + IntraFi may sweep funds to + multiple banks. This endpoint will include both the total balance and the amount + swept to each institution. Args: account_id: The identifier of the Account to get balances for. @@ -106,8 +109,11 @@ async def intrafi_balance( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> IntrafiBalance: - """ - Get IntraFi balances by bank + """Returns the IntraFi balance for the given account. + + IntraFi may sweep funds to + multiple banks. This endpoint will include both the total balance and the amount + swept to each institution. Args: account_id: The identifier of the Account to get balances for. From ad27817eaee74f63eeaecf71c0264e43a3bd58b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 02:38:38 +0000 Subject: [PATCH 0573/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 23d03256b..115174d9d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.233.0" + ".": "0.234.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 151eeea28..99f80b4f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.233.0" +version = "0.234.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3308105eb..2a8ac1934 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.233.0" # x-release-please-version +__version__ = "0.234.0" # x-release-please-version From 9edffb5bfb655dd7c2e54059109638907a94696a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 04:05:22 +0000 Subject: [PATCH 0574/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fcab57af4..852d2b7b0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c3638e748a658e68e6e4cd2b63cbbaf83ed0799919b2ab8bd5833f549984106.yml -openapi_spec_hash: 69558e21d0e0671eb3f10dd541c75346 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83756f4a82da617a4b41b72a78028e4ed15edad4019e54ec8802db67c04cb242.yml +openapi_spec_hash: 33ff739bdaeee562575bea13c7c5696c config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 52e98f502..4bf29fcdc 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -41,6 +41,12 @@ class ShipmentAddress(BaseModel): class ShipmentTrackingUpdate(BaseModel): + carrier_estimated_delivery_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the + carrier expects the card to be delivered. + """ + category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"] """The type of tracking event. From e042f4d159203373a21a345de365af79aa15ddb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 May 2025 05:00:54 +0000 Subject: [PATCH 0575/1325] feat(api): api update --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 852d2b7b0..f23559fcb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83756f4a82da617a4b41b72a78028e4ed15edad4019e54ec8802db67c04cb242.yml -openapi_spec_hash: 33ff739bdaeee562575bea13c7c5696c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-242cd2c71436a98908280d032939d4eeb3f68721fbcd414d8dcd9280db02558a.yml +openapi_spec_hash: 2511217927c87d37b9e5eaac8bd80a8b config_hash: 1619155422217276e2489ae10ce63a25 From 1136b2743696df3f38ffa5b52af10770374b9359 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 02:42:34 +0000 Subject: [PATCH 0576/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 115174d9d..c8668fd25 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.234.0" + ".": "0.235.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 99f80b4f7..67078b7d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.234.0" +version = "0.235.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2a8ac1934..8134fb114 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.234.0" # x-release-please-version +__version__ = "0.235.0" # x-release-please-version From 95e01079425bf718661406621021df29b7a3b020 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 May 2025 17:34:07 +0000 Subject: [PATCH 0577/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/check_deposit.py | 48 ++++++++++++++++++----------- src/increase/types/transaction.py | 48 ++++++++++++++++++----------- 3 files changed, 62 insertions(+), 38 deletions(-) diff --git a/.stats.yml b/.stats.yml index f23559fcb..114499a2a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-242cd2c71436a98908280d032939d4eeb3f68721fbcd414d8dcd9280db02558a.yml -openapi_spec_hash: 2511217927c87d37b9e5eaac8bd80a8b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3da8c6b718b8b17a54f7c99f1288484fb822cea0439cb3ebac7740d251bed960.yml +openapi_spec_hash: 3a21d60d1574ae11f5a682dfa3d603b3 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index a0bb1defd..2adba3cd5 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -176,34 +176,46 @@ class DepositReturn(BaseModel): against. - `ach_conversion_not_supported` - The check doesn't allow ACH conversion. - - `closed_account` - The account is closed. - - `duplicate_submission` - The check has already been deposited. - - `insufficient_funds` - Insufficient funds - - `no_account` - No account was found matching the check details. - - `not_authorized` - The check was not authorized. - - `stale_dated` - The check is too old. - - `stop_payment` - The payment has been stopped by the account holder. + - `closed_account` - The account is closed. (Check21 return code `D`) + - `duplicate_submission` - The check has already been deposited. (Check21 return + code `Y`) + - `insufficient_funds` - Insufficient funds (Check21 return code `A`) + - `no_account` - No account was found matching the check details. (Check21 + return code `E`) + - `not_authorized` - The check was not authorized. (Check21 return code `Q`) + - `stale_dated` - The check is too old. (Check21 return code `G`) + - `stop_payment` - The payment has been stopped by the account holder. (Check21 + return code `C`) - `unknown_reason` - The reason for the return is unknown. - `unmatched_details` - The image doesn't match the details submitted. - - `unreadable_image` - The image could not be read. - - `endorsement_irregular` - The check endorsement was irregular. + - `unreadable_image` - The image could not be read. (Check21 return code `U`) + - `endorsement_irregular` - The check endorsement was irregular. (Check21 return + code `J`) - `altered_or_fictitious_item` - The check present was either altered or fake. + (Check21 return code `N`) - `frozen_or_blocked_account` - The account this check is drawn on is frozen. - - `post_dated` - The check is post dated. - - `endorsement_missing` - The endorsement was missing. - - `signature_missing` - The check signature was missing. + (Check21 return code `F`) + - `post_dated` - The check is post dated. (Check21 return code `H`) + - `endorsement_missing` - The endorsement was missing. (Check21 return code `I`) + - `signature_missing` - The check signature was missing. (Check21 return code + `K`) - `stop_payment_suspect` - The bank suspects a stop payment will be placed. - - `unusable_image` - The bank cannot read the image. + (Check21 return code `T`) + - `unusable_image` - The bank cannot read the image. (Check21 return code `U`) - `image_fails_security_check` - The check image fails the bank's security - check. - - `cannot_determine_amount` - The bank cannot determine the amount. + check. (Check21 return code `V`) + - `cannot_determine_amount` - The bank cannot determine the amount. (Check21 + return code `W`) - `signature_irregular` - The signature is inconsistent with prior signatures. + (Check21 return code `L`) - `non_cash_item` - The check is a non-cash item and cannot be drawn against the - account. - - `unable_to_process` - The bank is unable to process this check. + account. (Check21 return code `M`) + - `unable_to_process` - The bank is unable to process this check. (Check21 + return code `O`) - `item_exceeds_dollar_limit` - The check exceeds the bank or customer's limit. + (Check21 return code `P`) - `branch_or_account_sold` - The bank sold this account and no longer services - this customer. + this customer. (Check21 return code `R`) """ returned_at: datetime diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 4dbaaff56..7e4160ec6 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1691,34 +1691,46 @@ class SourceCheckDepositReturn(BaseModel): against. - `ach_conversion_not_supported` - The check doesn't allow ACH conversion. - - `closed_account` - The account is closed. - - `duplicate_submission` - The check has already been deposited. - - `insufficient_funds` - Insufficient funds - - `no_account` - No account was found matching the check details. - - `not_authorized` - The check was not authorized. - - `stale_dated` - The check is too old. - - `stop_payment` - The payment has been stopped by the account holder. + - `closed_account` - The account is closed. (Check21 return code `D`) + - `duplicate_submission` - The check has already been deposited. (Check21 return + code `Y`) + - `insufficient_funds` - Insufficient funds (Check21 return code `A`) + - `no_account` - No account was found matching the check details. (Check21 + return code `E`) + - `not_authorized` - The check was not authorized. (Check21 return code `Q`) + - `stale_dated` - The check is too old. (Check21 return code `G`) + - `stop_payment` - The payment has been stopped by the account holder. (Check21 + return code `C`) - `unknown_reason` - The reason for the return is unknown. - `unmatched_details` - The image doesn't match the details submitted. - - `unreadable_image` - The image could not be read. - - `endorsement_irregular` - The check endorsement was irregular. + - `unreadable_image` - The image could not be read. (Check21 return code `U`) + - `endorsement_irregular` - The check endorsement was irregular. (Check21 return + code `J`) - `altered_or_fictitious_item` - The check present was either altered or fake. + (Check21 return code `N`) - `frozen_or_blocked_account` - The account this check is drawn on is frozen. - - `post_dated` - The check is post dated. - - `endorsement_missing` - The endorsement was missing. - - `signature_missing` - The check signature was missing. + (Check21 return code `F`) + - `post_dated` - The check is post dated. (Check21 return code `H`) + - `endorsement_missing` - The endorsement was missing. (Check21 return code `I`) + - `signature_missing` - The check signature was missing. (Check21 return code + `K`) - `stop_payment_suspect` - The bank suspects a stop payment will be placed. - - `unusable_image` - The bank cannot read the image. + (Check21 return code `T`) + - `unusable_image` - The bank cannot read the image. (Check21 return code `U`) - `image_fails_security_check` - The check image fails the bank's security - check. - - `cannot_determine_amount` - The bank cannot determine the amount. + check. (Check21 return code `V`) + - `cannot_determine_amount` - The bank cannot determine the amount. (Check21 + return code `W`) - `signature_irregular` - The signature is inconsistent with prior signatures. + (Check21 return code `L`) - `non_cash_item` - The check is a non-cash item and cannot be drawn against the - account. - - `unable_to_process` - The bank is unable to process this check. + account. (Check21 return code `M`) + - `unable_to_process` - The bank is unable to process this check. (Check21 + return code `O`) - `item_exceeds_dollar_limit` - The check exceeds the bank or customer's limit. + (Check21 return code `P`) - `branch_or_account_sold` - The bank sold this account and no longer services - this customer. + this customer. (Check21 return code `R`) """ returned_at: datetime From 2357078a4ba20e225d6005c04e8f03a1a7d99c99 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 02:41:13 +0000 Subject: [PATCH 0578/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c8668fd25..86a5ef2a8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.235.0" + ".": "0.236.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 67078b7d1..1cddbd7bd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.235.0" +version = "0.236.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8134fb114..f1c6448d3 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.235.0" # x-release-please-version +__version__ = "0.236.0" # x-release-please-version From 2fe5ee52ff8bc2e581b5d43f1667b64f727a1355 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 12:40:38 +0000 Subject: [PATCH 0579/1325] chore(internal): avoid errors for isinstance checks on proxies --- src/increase/_utils/_proxy.py | 5 ++++- tests/test_utils/test_proxy.py | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/increase/_utils/_proxy.py b/src/increase/_utils/_proxy.py index ffd883e9d..0f239a33c 100644 --- a/src/increase/_utils/_proxy.py +++ b/src/increase/_utils/_proxy.py @@ -46,7 +46,10 @@ def __dir__(self) -> Iterable[str]: @property # type: ignore @override def __class__(self) -> type: # pyright: ignore - proxied = self.__get_proxied__() + try: + proxied = self.__get_proxied__() + except Exception: + return type(self) if issubclass(type(proxied), LazyProxy): return type(proxied) return proxied.__class__ diff --git a/tests/test_utils/test_proxy.py b/tests/test_utils/test_proxy.py index 537cfb99a..5ee455b19 100644 --- a/tests/test_utils/test_proxy.py +++ b/tests/test_utils/test_proxy.py @@ -21,3 +21,14 @@ def test_recursive_proxy() -> None: assert dir(proxy) == [] assert type(proxy).__name__ == "RecursiveLazyProxy" assert type(operator.attrgetter("name.foo.bar.baz")(proxy)).__name__ == "RecursiveLazyProxy" + + +def test_isinstance_does_not_error() -> None: + class AlwaysErrorProxy(LazyProxy[Any]): + @override + def __load__(self) -> Any: + raise RuntimeError("Mocking missing dependency") + + proxy = AlwaysErrorProxy() + assert not isinstance(proxy, dict) + assert isinstance(proxy, LazyProxy) From b2260d5e13df4eb1b7618ac3df22441728281f7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 May 2025 23:02:10 +0000 Subject: [PATCH 0580/1325] docs: remove or fix invalid readme examples --- README.md | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/README.md b/README.md index 46b44495b..8c5d77529 100644 --- a/README.md +++ b/README.md @@ -146,21 +146,6 @@ for account in first_page.data: # Remove `await` for non-async usage. ``` -## Nested params - -Nested parameters are dictionaries, typed using `TypedDict`, for example: - -```python -from increase import Increase - -client = Increase() - -account = client.accounts.create( - name="New Account!", -) -print(account.id) -``` - ## File uploads Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`. From 9d9e0ee0a8c12b02b0fd2460d85312cba0198db3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 14:17:28 +0000 Subject: [PATCH 0581/1325] fix(package): support direct resource imports --- src/increase/__init__.py | 5 +++++ src/increase/_utils/_resources_proxy.py | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+) create mode 100644 src/increase/_utils/_resources_proxy.py diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 3e9191eb8..f252d69e2 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -1,5 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import typing as _t + from . import types from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes from ._utils import file_from_path @@ -102,6 +104,9 @@ "DefaultAsyncHttpxClient", ] +if not _t.TYPE_CHECKING: + from ._utils._resources_proxy import resources as resources + _setup_logging() # Update the __module__ attribute for exported symbols so that diff --git a/src/increase/_utils/_resources_proxy.py b/src/increase/_utils/_resources_proxy.py new file mode 100644 index 000000000..bec7a7b76 --- /dev/null +++ b/src/increase/_utils/_resources_proxy.py @@ -0,0 +1,24 @@ +from __future__ import annotations + +from typing import Any +from typing_extensions import override + +from ._proxy import LazyProxy + + +class ResourcesProxy(LazyProxy[Any]): + """A proxy for the `increase.resources` module. + + This is used so that we can lazily import `increase.resources` only when + needed *and* so that users can just import `increase` and reference `increase.resources` + """ + + @override + def __load__(self) -> Any: + import importlib + + mod = importlib.import_module("increase.resources") + return mod + + +resources = ResourcesProxy().__as_proxied__() From 60a00d919bc513728bb400e39c2ca6c7b8a4eb9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 14:18:52 +0000 Subject: [PATCH 0582/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 86a5ef2a8..2eb29ce86 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.236.0" + ".": "0.236.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1cddbd7bd..4cc833695 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.236.0" +version = "0.236.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f1c6448d3..d8541fc27 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.236.0" # x-release-please-version +__version__ = "0.236.1" # x-release-please-version From a0d81e51e9706f7a1c3ae7676a936713382ae785 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 9 May 2025 20:52:04 +0000 Subject: [PATCH 0583/1325] feat(api): api update --- .stats.yml | 4 +-- .../resources/physical_card_profiles.py | 10 +++++++ .../physical_card_profile_create_params.py | 21 ++++++++++++- .../test_physical_card_profiles.py | 30 +++++++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 114499a2a..983dd6311 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3da8c6b718b8b17a54f7c99f1288484fb822cea0439cb3ebac7740d251bed960.yml -openapi_spec_hash: 3a21d60d1574ae11f5a682dfa3d603b3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-983a38b280126eee3cd2a12eb7847bc36551f24cf7fdcdffe20e564e2c0d21c4.yml +openapi_spec_hash: 273aa48b03116314693f8870c4c71f9b config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index dbe1988ad..6b7c2b39a 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -54,6 +54,7 @@ def create( description: str, front_image_file_id: str, program_id: str, + front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -76,6 +77,9 @@ def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + front_text: Text printed on the front of the card. Reach out to + [support@increase.com](mailto:support@increase.com) for more information. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -95,6 +99,7 @@ def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, ), @@ -345,6 +350,7 @@ async def create( description: str, front_image_file_id: str, program_id: str, + front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -367,6 +373,9 @@ async def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + front_text: Text printed on the front of the card. Reach out to + [support@increase.com](mailto:support@increase.com) for more information. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -386,6 +395,7 @@ async def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, ), diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index 5c79e2790..6544cf53f 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -4,7 +4,7 @@ from typing_extensions import Required, TypedDict -__all__ = ["PhysicalCardProfileCreateParams"] +__all__ = ["PhysicalCardProfileCreateParams", "FrontText"] class PhysicalCardProfileCreateParams(TypedDict, total=False): @@ -22,3 +22,22 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): program_id: Required[str] """The identifier for the Program that this Physical Card Profile falls under.""" + + front_text: FrontText + """Text printed on the front of the card. + + Reach out to [support@increase.com](mailto:support@increase.com) for more + information. + """ + + +class FrontText(TypedDict, total=False): + line1: Required[str] + """The first line of text on the front of the card.""" + + line2: str + """The second line of text on the front of the card. + + Providing a second line moves the first line slightly higher and prints the + second line in the spot where the first line would have otherwise been printed. + """ diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 45849ccfa..c574c04a6 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -31,6 +31,21 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + physical_card_profile = client.physical_card_profiles.create( + carrier_image_file_id="file_h6v7mtipe119os47ehlu", + contact_phone="+16505046304", + description="My Card Profile", + front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", + front_text={ + "line1": "x", + "line2": "x", + }, + ) + assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.create( @@ -248,6 +263,21 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + physical_card_profile = await async_client.physical_card_profiles.create( + carrier_image_file_id="file_h6v7mtipe119os47ehlu", + contact_phone="+16505046304", + description="My Card Profile", + front_image_file_id="file_o6aex13wm1jcc36sgcj1", + program_id="program_i2v2os4mwza1oetokh9i", + front_text={ + "line1": "x", + "line2": "x", + }, + ) + assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.create( From dcc6c0048d6e94ba6603f7544bdd85f93d0c1b9f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 10 May 2025 02:44:15 +0000 Subject: [PATCH 0584/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2eb29ce86..4c6bc13ed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.236.1" + ".": "0.237.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4cc833695..efa070f0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.236.1" +version = "0.237.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d8541fc27..c3b079687 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.236.1" # x-release-please-version +__version__ = "0.237.0" # x-release-please-version From 8b5c709ddb38076cc1875663e6fa8f03c9298ce5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 18:31:17 +0000 Subject: [PATCH 0585/1325] feat(api): api update --- .stats.yml | 4 ++-- .../resources/simulations/programs.py | 22 +++++++++++++++++-- .../simulations/program_create_params.py | 3 +++ .../simulations/test_programs.py | 16 ++++++++++++++ 4 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 983dd6311..b5c83ac18 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-983a38b280126eee3cd2a12eb7847bc36551f24cf7fdcdffe20e564e2c0d21c4.yml -openapi_spec_hash: 273aa48b03116314693f8870c4c71f9b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99d09de90656238ac57bf6711950f043967548c1c4e2ad31b606dd51e0daa3e9.yml +openapi_spec_hash: 597d3aed886356d053b7c571cab6380b config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 250fb206c..330ea4bd2 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -45,6 +45,7 @@ def create( self, *, name: str, + reserve_account_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -63,6 +64,8 @@ def create( Args: name: The name of the program being added. + reserve_account_id: The identifier of the Account the Program should be added to is for. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -75,7 +78,13 @@ def create( """ return self._post( "/simulations/programs", - body=maybe_transform({"name": name}, program_create_params.ProgramCreateParams), + body=maybe_transform( + { + "name": name, + "reserve_account_id": reserve_account_id, + }, + program_create_params.ProgramCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -111,6 +120,7 @@ async def create( self, *, name: str, + reserve_account_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -129,6 +139,8 @@ async def create( Args: name: The name of the program being added. + reserve_account_id: The identifier of the Account the Program should be added to is for. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -141,7 +153,13 @@ async def create( """ return await self._post( "/simulations/programs", - body=await async_maybe_transform({"name": name}, program_create_params.ProgramCreateParams), + body=await async_maybe_transform( + { + "name": name, + "reserve_account_id": reserve_account_id, + }, + program_create_params.ProgramCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py index d040579d2..141606abb 100644 --- a/src/increase/types/simulations/program_create_params.py +++ b/src/increase/types/simulations/program_create_params.py @@ -10,3 +10,6 @@ class ProgramCreateParams(TypedDict, total=False): name: Required[str] """The name of the program being added.""" + + reserve_account_id: str + """The identifier of the Account the Program should be added to is for.""" diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 22734a13f..618470552 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -24,6 +24,14 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(Program, program, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + program = client.simulations.programs.create( + name="For Benefit Of", + reserve_account_id="reserve_account_id", + ) + assert_matches_type(Program, program, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.simulations.programs.with_raw_response.create( @@ -59,6 +67,14 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(Program, program, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + program = await async_client.simulations.programs.create( + name="For Benefit Of", + reserve_account_id="reserve_account_id", + ) + assert_matches_type(Program, program, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.programs.with_raw_response.create( From f27b2deb6a7e2f4b7144cc3ca9244be04a08f8c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 22:27:29 +0000 Subject: [PATCH 0586/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/_exceptions.py | 12 ++++++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index b5c83ac18..47691537a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-99d09de90656238ac57bf6711950f043967548c1c4e2ad31b606dd51e0daa3e9.yml -openapi_spec_hash: 597d3aed886356d053b7c571cab6380b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3b98767c54e46b8a6cb396e0ec9c40154ab6566387fe3869ca2f36cb98759633.yml +openapi_spec_hash: 870fbf29bc099f704b2e90a55362d6e5 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index 4c6280428..aa472b775 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -166,12 +166,15 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N class InvalidAPIKeyError(AuthenticationError): detail: Optional[str] = None - reason: Literal["deleted_credential", "expired_credential", "no_credential", "no_header", "wrong_environment"] + reason: Literal[ + "deleted_credential", "expired_credential", "no_credential", "no_header", "no_api_access", "wrong_environment" + ] """ - `deleted_credential` - deleted_credential - `expired_credential` - expired_credential - `no_credential` - no_credential - `no_header` - no_header + - `no_api_access` - no_api_access - `wrong_environment` - wrong_environment """ @@ -192,7 +195,12 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N Any, construct_type( type_=Literal[ - "deleted_credential", "expired_credential", "no_credential", "no_header", "wrong_environment" + "deleted_credential", + "expired_credential", + "no_credential", + "no_header", + "no_api_access", + "wrong_environment", ], value=data.get("reason"), ), From 0a27088177ef149373248e3aad89803f406e11e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 12 May 2025 22:34:13 +0000 Subject: [PATCH 0587/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4c6bc13ed..74de6cae9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.237.0" + ".": "0.238.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index efa070f0c..ebd6888aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.237.0" +version = "0.238.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c3b079687..94c6cabbc 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.237.0" # x-release-please-version +__version__ = "0.238.0" # x-release-please-version From ecf2f5f65636e5594103710cb247a02ef7711814 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 May 2025 17:58:42 +0000 Subject: [PATCH 0588/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 47691537a..36bdb6c1d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3b98767c54e46b8a6cb396e0ec9c40154ab6566387fe3869ca2f36cb98759633.yml -openapi_spec_hash: 870fbf29bc099f704b2e90a55362d6e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-29a316c78aad2055dff3e76eb46261c997a573fef91aaff500a77b2e781aff53.yml +openapi_spec_hash: d07e3f4d14a2e97b309b91b13e1f9f21 config_hash: 1619155422217276e2489ae10ce63a25 From d038b0eba5a00d4f59fbca570c04b0e934f735ba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 18:22:52 +0000 Subject: [PATCH 0589/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/ach_transfer_create_params.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 36bdb6c1d..5143997d1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-29a316c78aad2055dff3e76eb46261c997a573fef91aaff500a77b2e781aff53.yml -openapi_spec_hash: d07e3f4d14a2e97b309b91b13e1f9f21 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-786e7b7218ec5d0c31b230735da4241d31e705db5565faeddfe3942fd04ecd0d.yml +openapi_spec_hash: 806ccc22566ad901a74ce6ea1b38c381 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index 4c8e05cb8..c31dc8569 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -157,8 +157,10 @@ class AddendaFreeform(TypedDict, total=False): entries: Required[Iterable[AddendaFreeformEntry]] """Each entry represents an addendum sent with the transfer. - Please reach out to [support@increase.com](mailto:support@increase.com) to send - more than one addendum. + In general, you should send at most one addendum–most ACH recipients cannot + access beyond the first 80 characters sent. Please reach out to + [support@increase.com](mailto:support@increase.com) to send 2 or more addenda to + a recipient expecting a specific addendum format. """ From b7b39cb54a0ebcbf2a0e2d15a9ac38adfce93296 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 May 2025 23:07:17 +0000 Subject: [PATCH 0590/1325] chore(ci): upload sdks to package manager --- .github/workflows/ci.yml | 24 ++++++++++++++++++++++++ scripts/utils/upload-artifact.sh | 25 +++++++++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100755 scripts/utils/upload-artifact.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6050d6f47..fb41c83d1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,6 +30,30 @@ jobs: - name: Run lints run: ./scripts/lint + upload: + if: github.repository == 'stainless-sdks/increase-python' + timeout-minutes: 10 + name: upload + permissions: + contents: read + id-token: write + runs-on: depot-ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + + - name: Get GitHub OIDC Token + id: github-oidc + uses: actions/github-script@v6 + with: + script: core.setOutput('github_token', await core.getIDToken()); + + - name: Upload tarball + env: + URL: https://pkg.stainless.com/s + AUTH: ${{ steps.github-oidc.outputs.github_token }} + SHA: ${{ github.sha }} + run: ./scripts/utils/upload-artifact.sh + test: timeout-minutes: 10 name: test diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh new file mode 100755 index 000000000..db0896100 --- /dev/null +++ b/scripts/utils/upload-artifact.sh @@ -0,0 +1,25 @@ +#!/usr/bin/env bash +set -exuo pipefail + +RESPONSE=$(curl -X POST "$URL" \ + -H "Authorization: Bearer $AUTH" \ + -H "Content-Type: application/json") + +SIGNED_URL=$(echo "$RESPONSE" | jq -r '.url') + +if [[ "$SIGNED_URL" == "null" ]]; then + echo -e "\033[31mFailed to get signed URL.\033[0m" + exit 1 +fi + +UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ + -H "Content-Type: application/gzip" \ + --data-binary @- "$SIGNED_URL" 2>&1) + +if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then + echo -e "\033[32mUploaded build to Stainless storage.\033[0m" + echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/increase-python/$SHA'\033[0m" +else + echo -e "\033[31mFailed to upload artifact.\033[0m" + exit 1 +fi From 7c4c73ec71592f8f58cdb2d3eebb999c5003f517 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 02:45:13 +0000 Subject: [PATCH 0591/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 74de6cae9..21c96fe00 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.238.0" + ".": "0.239.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ebd6888aa..eb1a4e656 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.238.0" +version = "0.239.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 94c6cabbc..b52b1a9f2 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.238.0" # x-release-please-version +__version__ = "0.239.0" # x-release-please-version From 5a10420214dd5ca272eacdde52e693583a8a2851 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 12:24:09 +0000 Subject: [PATCH 0592/1325] chore(ci): fix installation instructions --- scripts/utils/upload-artifact.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index db0896100..b27770d8b 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -18,7 +18,7 @@ UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: npm install 'https://pkg.stainless.com/s/increase-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/increase-python/$SHA'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 From 47783321eae01f87c8fea0e6829ecf8ea64c6716 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 18:49:21 +0000 Subject: [PATCH 0593/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 3 ++- src/increase/types/entity_create_params.py | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5143997d1..7b040e5db 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-786e7b7218ec5d0c31b230735da4241d31e705db5565faeddfe3942fd04ecd0d.yml -openapi_spec_hash: 806ccc22566ad901a74ce6ea1b38c381 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27f9f4f9013338a67494704ce9fa855698e5de91ea0600decd52fddcf9b298a2.yml +openapi_spec_hash: 21382ccac2711e76cdc2c1af0e2d6954 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index fe6cd5b0b..46c10eba8 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -341,11 +341,12 @@ class ThirdPartyVerification(BaseModel): reference: str """The reference identifier for the third party verification.""" - vendor: Literal["alloy", "middesk"] + vendor: Literal["alloy", "middesk", "oscilar"] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. + - `oscilar` - Oscilar. See https://oscilar.com for more information. """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 8c7169603..fcfe1a3f7 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -686,11 +686,12 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy", "middesk"]] + vendor: Required[Literal["alloy", "middesk", "oscilar"]] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. + - `oscilar` - Oscilar. See https://oscilar.com for more information. """ From ba97beb1e26a7d443c13f33fab1468e38e24448f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 May 2025 18:51:10 +0000 Subject: [PATCH 0594/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21c96fe00..a093f024b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.239.0" + ".": "0.240.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index eb1a4e656..b91ff0014 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.239.0" +version = "0.240.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b52b1a9f2..e50d4e728 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.239.0" # x-release-please-version +__version__ = "0.240.0" # x-release-please-version From 8a8b706c3e8db8d0c68e27c2e9f2a8acce650cfd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 May 2025 06:32:24 +0000 Subject: [PATCH 0595/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 12 ++++++++++ src/increase/types/event.py | 6 +++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 6 +++++ .../types/event_subscription_create_params.py | 6 +++++ src/increase/types/pending_transaction.py | 23 +++++++++++++++++++ .../types/pending_transaction_list_params.py | 1 + src/increase/types/transaction.py | 22 ++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 10 files changed, 81 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b040e5db..229bdad6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27f9f4f9013338a67494704ce9fa855698e5de91ea0600decd52fddcf9b298a2.yml -openapi_spec_hash: 21382ccac2711e76cdc2c1af0e2d6954 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8f6c4012863716d091d2212f4a079ceb2af3b5b4e776b00aab9b5cba7f452960.yml +openapi_spec_hash: 11c039f345002ae50d39988570ae266e config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index f6ec570ed..45ed7e19a 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -114,6 +114,8 @@ def create( "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -250,6 +252,10 @@ 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -563,6 +569,8 @@ async def create( "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -699,6 +707,10 @@ 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event.py b/src/increase/types/event.py index a87015db4..1ad775004 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -83,6 +83,8 @@ class Event(BaseModel): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -202,6 +204,10 @@ 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 4081a6abe..398829c3f 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -98,6 +98,8 @@ class EventListParams(TypedDict, total=False): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 23e793c6a..09706d7ff 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -96,6 +96,8 @@ class EventSubscription(BaseModel): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -215,6 +217,10 @@ 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 574bb6d59..d321be4f7 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -82,6 +82,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", + "outbound_card_push_transfer.created", + "outbound_card_push_transfer.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -200,6 +202,10 @@ 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 01602b251..f11be9327 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -22,6 +22,7 @@ "SourceCheckTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", + "SourceOutboundCardPushTransferInstruction", "SourceRealTimePaymentsTransferInstruction", "SourceSwiftTransferInstruction", "SourceWireTransferInstruction", @@ -555,6 +556,17 @@ 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.""" @@ -625,6 +637,7 @@ class Source(BaseModel): "wire_transfer_instruction", "inbound_wire_transfer_reversal", "swift_transfer_instruction", + "outbound_card_push_transfer_instruction", "other", ] """The type of the resource. @@ -653,6 +666,9 @@ 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. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ @@ -695,6 +711,13 @@ 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 428ba10f0..438522f00 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -49,6 +49,7 @@ class PendingTransactionListParams(TypedDict, total=False): "wire_transfer_instruction", "inbound_wire_transfer_reversal", "swift_transfer_instruction", + "outbound_card_push_transfer_instruction", "other", ] ], diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 7e4160ec6..600b5a037 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -57,6 +57,7 @@ "SourceInboundWireTransferReversal", "SourceInterestPayment", "SourceInternalSource", + "SourceOutboundCardPushTransferAcceptance", "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", "SourceSwiftTransferIntention", @@ -2253,6 +2254,14 @@ 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.""" @@ -2415,6 +2424,7 @@ class Source(BaseModel): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", + "outbound_card_push_transfer_acceptance", "other", ] """The type of the resource. @@ -2483,6 +2493,9 @@ 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. - `other` - The Transaction was made for an undocumented or deprecated reason. """ @@ -2621,6 +2634,15 @@ 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 5fcfaba0c..f57878910 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -69,6 +69,7 @@ class TransactionListParams(TypedDict, total=False): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", + "outbound_card_push_transfer_acceptance", "other", ] ], From 717a6750e92d81011375eddf8cd09e0630c58ef0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 02:46:15 +0000 Subject: [PATCH 0596/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a093f024b..d91d970c0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.240.0" + ".": "0.241.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b91ff0014..fb46ebd63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.240.0" +version = "0.241.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e50d4e728..8c23aba71 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.240.0" # x-release-please-version +__version__ = "0.241.0" # x-release-please-version From c3cc3e993e93aa7b65f75ffbd18b323a5e1187ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 May 2025 15:11:25 +0000 Subject: [PATCH 0597/1325] chore(docs): grammar improvements --- SECURITY.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 0f599b6d3..5a4b96c56 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -16,11 +16,11 @@ before making any information public. ## Reporting Non-SDK Related Security Issues If you encounter security issues that are not directly related to SDKs but pertain to the services -or products provided by Increase please follow the respective company's security reporting guidelines. +or products provided by Increase, please follow the respective company's security reporting guidelines. ### Increase Terms and Policies -Please contact dev-feedback@increase.com for any questions or concerns regarding security of our services. +Please contact dev-feedback@increase.com for any questions or concerns regarding the security of our services. --- From 401b563e712ac0ad73d3d89667347727ee8ad706 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 21:02:39 +0000 Subject: [PATCH 0598/1325] feat(api): api update --- .stats.yml | 4 +-- .../simulations/inbound_ach_transfers.py | 8 +++++ .../inbound_ach_transfer_create_params.py | 29 +++++++++++++++++-- .../simulations/test_inbound_ach_transfers.py | 8 +++++ 4 files changed, 45 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 229bdad6f..c2d3a1136 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8f6c4012863716d091d2212f4a079ceb2af3b5b4e776b00aab9b5cba7f452960.yml -openapi_spec_hash: 11c039f345002ae50d39988570ae266e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10c5725c33a0c36d693b65d868048c361ee08bfd4075b570e0daa3c55dd51b74.yml +openapi_spec_hash: edb571785437dbb44225445325f92c04 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 6032b9f4c..85a462ba1 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -50,6 +50,7 @@ def create( *, account_number_id: str, amount: int, + addenda: inbound_ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, company_entry_description: str | NotGiven = NOT_GIVEN, @@ -105,6 +106,8 @@ def create( pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the receiving account. + addenda: Additional information to include in the transfer. + company_descriptive_date: The description of the date of the transfer. company_discretionary_data: Data associated with the transfer set by the sender. @@ -157,6 +160,7 @@ def create( { "account_number_id": account_number_id, "amount": amount, + "addenda": addenda, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, @@ -205,6 +209,7 @@ async def create( *, account_number_id: str, amount: int, + addenda: inbound_ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, company_descriptive_date: str | NotGiven = NOT_GIVEN, company_discretionary_data: str | NotGiven = NOT_GIVEN, company_entry_description: str | NotGiven = NOT_GIVEN, @@ -260,6 +265,8 @@ async def create( pushing funds to the receiving account. A negative amount originates a debit transfer pulling funds from the receiving account. + addenda: Additional information to include in the transfer. + company_descriptive_date: The description of the date of the transfer. company_discretionary_data: Data associated with the transfer set by the sender. @@ -312,6 +319,7 @@ async def create( { "account_number_id": account_number_id, "amount": amount, + "addenda": addenda, "company_descriptive_date": company_descriptive_date, "company_discretionary_data": company_discretionary_data, "company_entry_description": company_entry_description, diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py index fa743818c..f269429a4 100644 --- a/src/increase/types/simulations/inbound_ach_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import Union, Iterable from datetime import datetime from typing_extensions import Literal, Required, Annotated, TypedDict from ..._utils import PropertyInfo -__all__ = ["InboundACHTransferCreateParams"] +__all__ = ["InboundACHTransferCreateParams", "Addenda", "AddendaFreeform", "AddendaFreeformEntry"] class InboundACHTransferCreateParams(TypedDict, total=False): @@ -23,6 +23,9 @@ class InboundACHTransferCreateParams(TypedDict, total=False): receiving account. """ + addenda: Addenda + """Additional information to include in the transfer.""" + company_descriptive_date: str """The description of the date of the transfer.""" @@ -87,3 +90,25 @@ class InboundACHTransferCreateParams(TypedDict, total=False): - `destroyed_check` - Destroyed Check (XCK). - `international_ach_transaction` - International ACH Transaction (IAT). """ + + +class AddendaFreeformEntry(TypedDict, total=False): + payment_related_information: Required[str] + """The payment related information passed in the addendum.""" + + +class AddendaFreeform(TypedDict, total=False): + entries: Required[Iterable[AddendaFreeformEntry]] + """Each entry represents an addendum sent with the transfer.""" + + +class Addenda(TypedDict, total=False): + category: Required[Literal["freeform"]] + """The type of addenda to simulate being sent with the transfer. + + - `freeform` - Unstructured `payment_related_information` passed through with + the transfer. + """ + + freeform: AddendaFreeform + """Unstructured `payment_related_information` passed through with the transfer.""" diff --git a/tests/api_resources/simulations/test_inbound_ach_transfers.py b/tests/api_resources/simulations/test_inbound_ach_transfers.py index 69291ab83..27af42110 100644 --- a/tests/api_resources/simulations/test_inbound_ach_transfers.py +++ b/tests/api_resources/simulations/test_inbound_ach_transfers.py @@ -31,6 +31,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: inbound_ach_transfer = client.simulations.inbound_ach_transfers.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=1000, + addenda={ + "category": "freeform", + "freeform": {"entries": [{"payment_related_information": "x"}]}, + }, company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", @@ -86,6 +90,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) inbound_ach_transfer = await async_client.simulations.inbound_ach_transfers.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=1000, + addenda={ + "category": "freeform", + "freeform": {"entries": [{"payment_related_information": "x"}]}, + }, company_descriptive_date="x", company_discretionary_data="x", company_entry_description="x", From b5bc3ad0f62d7103bdc1d4ff82b4cb9367dd1478 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 21:04:17 +0000 Subject: [PATCH 0599/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d91d970c0..b32be64d0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.241.0" + ".": "0.242.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fb46ebd63..16626270f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.241.0" +version = "0.242.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8c23aba71..68eddf069 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.241.0" # x-release-please-version +__version__ = "0.242.0" # x-release-please-version From 9232d7749bed0423168683d28da9054eb1445577 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 May 2025 23:20:36 +0000 Subject: [PATCH 0600/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 20 ++++++++++++++++++-- src/increase/types/declined_transaction.py | 10 +++++++++- src/increase/types/pending_transaction.py | 10 +++++++++- src/increase/types/real_time_decision.py | 10 +++++++++- 5 files changed, 47 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2d3a1136..f499909c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10c5725c33a0c36d693b65d868048c361ee08bfd4075b570e0daa3c55dd51b74.yml -openapi_spec_hash: edb571785437dbb44225445325f92c04 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4efe1f515d5c4297c1f4d2f52381e6a0de84cb1c1bcd9a15d53e54f559351b45.yml +openapi_spec_hash: 0ab70cea1b42e0179a3ef3b5e4268634 config_hash: 1619155422217276e2489ae10ce63a25 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a9b5aa878..e7e8cccbe 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -569,7 +569,13 @@ class ElementCardAuthorization(BaseModel): """ processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", ] """ The processing category describes the intent behind the authorization, such as @@ -582,6 +588,8 @@ class ElementCardAuthorization(BaseModel): being known. They are followed by an advice message that updates the amount of the pending transaction. - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. - `purchase` - A regular purchase. - `quasi_cash` - Quasi-cash transactions represent purchases of items which may be convertible to cash. @@ -982,7 +990,13 @@ class ElementCardDecline(BaseModel): """ processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", ] """ The processing category describes the intent behind the authorization, such as @@ -995,6 +1009,8 @@ class ElementCardDecline(BaseModel): being known. They are followed by an advice message that updates the amount of the pending transaction. - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. - `purchase` - A regular purchase. - `quasi_cash` - Quasi-cash transactions represent purchases of items which may be convertible to cash. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 12a108869..3ae15a06c 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -443,7 +443,13 @@ class SourceCardDecline(BaseModel): """ processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", ] """ The processing category describes the intent behind the authorization, such as @@ -456,6 +462,8 @@ class SourceCardDecline(BaseModel): being known. They are followed by an advice message that updates the amount of the pending transaction. - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. - `purchase` - A regular purchase. - `quasi_cash` - Quasi-cash transactions represent purchases of items which may be convertible to cash. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index f11be9327..50d3e9b80 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -397,7 +397,13 @@ class SourceCardAuthorization(BaseModel): """ processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", ] """ The processing category describes the intent behind the authorization, such as @@ -410,6 +416,8 @@ class SourceCardAuthorization(BaseModel): being known. They are followed by an advice message that updates the amount of the pending transaction. - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. - `purchase` - A regular purchase. - `quasi_cash` - Quasi-cash transactions represent purchases of items which may be convertible to cash. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index b56bcf975..65d0e6e8a 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -411,7 +411,13 @@ class CardAuthorization(BaseModel): """ processing_category: Literal[ - "account_funding", "automatic_fuel_dispenser", "bill_payment", "purchase", "quasi_cash", "refund" + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", ] """ The processing category describes the intent behind the authorization, such as @@ -424,6 +430,8 @@ class CardAuthorization(BaseModel): being known. They are followed by an advice message that updates the amount of the pending transaction. - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. - `purchase` - A regular purchase. - `quasi_cash` - Quasi-cash transactions represent purchases of items which may be convertible to cash. From fbe7dd70815a15de7255d03614badca49712487e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 May 2025 02:48:46 +0000 Subject: [PATCH 0601/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b32be64d0..92cb0b2a1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.242.0" + ".": "0.243.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 16626270f..15313835b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.242.0" +version = "0.243.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 68eddf069..16890e082 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.242.0" # x-release-please-version +__version__ = "0.243.0" # x-release-please-version From b5db0ee0f662ffdf30512abd739a8a06ca656d39 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 May 2025 20:52:15 +0000 Subject: [PATCH 0602/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + .../resources/simulations/physical_cards.py | 166 +++++++++++++++++- src/increase/types/simulations/__init__.py | 3 + .../physical_card_tracking_updates_params.py | 38 ++++ .../simulations/test_physical_cards.py | 109 ++++++++++++ 6 files changed, 320 insertions(+), 5 deletions(-) create mode 100644 src/increase/types/simulations/physical_card_tracking_updates_params.py diff --git a/.stats.yml b/.stats.yml index f499909c1..4888be558 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 195 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4efe1f515d5c4297c1f4d2f52381e6a0de84cb1c1bcd9a15d53e54f559351b45.yml -openapi_spec_hash: 0ab70cea1b42e0179a3ef3b5e4268634 -config_hash: 1619155422217276e2489ae10ce63a25 +configured_endpoints: 196 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7d9fa4c95ea0ac8bc1af5a8b1e7c53e57397e98ec4e0b61c90eea8fbf64e137b.yml +openapi_spec_hash: be4986939ec9a3efb0209f9cf1242090 +config_hash: c4ca49f6bac6268578b0734a33a9d1fd diff --git a/api.md b/api.md index b1e7fc323..de8a56707 100644 --- a/api.md +++ b/api.md @@ -787,6 +787,7 @@ Methods: Methods: - client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard +- client.simulations.physical_cards.tracking_updates(physical_card_id, \*\*params) -> PhysicalCard ## DigitalWalletTokenRequests diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index a2f35c7ea..9dc12bce6 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Union +from datetime import datetime from typing_extensions import Literal import httpx @@ -17,7 +19,7 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import physical_card_advance_shipment_params +from ...types.simulations import physical_card_advance_shipment_params, physical_card_tracking_updates_params from ...types.physical_card import PhysicalCard __all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] @@ -106,6 +108,81 @@ def advance_shipment( cast_to=PhysicalCard, ) + def tracking_updates( + self, + physical_card_id: str, + *, + category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], + carrier_estimated_delivery_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + postal_code: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PhysicalCard: + """ + This endpoint allows you to simulate receiving a tracking update for a Physical + Card, to simulate the progress of a shipment. + + Args: + physical_card_id: The Physical Card you would like to action. + + category: The type of tracking event. + + - `in_transit` - The physical card is in transit. + - `processed_for_delivery` - The physical card has been processed for delivery. + - `delivered` - The physical card has been delivered. + - `returned_to_sender` - Delivery failed and the physical card was returned to + sender. + + carrier_estimated_delivery_at: The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the + carrier expects the card to be delivered. + + city: The city where the event took place. + + postal_code: The postal code where the event took place. + + state: The state where the event took place. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not physical_card_id: + raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") + return self._post( + f"/simulations/physical_cards/{physical_card_id}/tracking_updates", + body=maybe_transform( + { + "category": category, + "carrier_estimated_delivery_at": carrier_estimated_delivery_at, + "city": city, + "postal_code": postal_code, + "state": state, + }, + physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PhysicalCard, + ) + class AsyncPhysicalCardsResource(AsyncAPIResource): @cached_property @@ -190,6 +267,81 @@ async def advance_shipment( cast_to=PhysicalCard, ) + async def tracking_updates( + self, + physical_card_id: str, + *, + category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], + carrier_estimated_delivery_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + city: str | NotGiven = NOT_GIVEN, + postal_code: str | NotGiven = NOT_GIVEN, + state: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PhysicalCard: + """ + This endpoint allows you to simulate receiving a tracking update for a Physical + Card, to simulate the progress of a shipment. + + Args: + physical_card_id: The Physical Card you would like to action. + + category: The type of tracking event. + + - `in_transit` - The physical card is in transit. + - `processed_for_delivery` - The physical card has been processed for delivery. + - `delivered` - The physical card has been delivered. + - `returned_to_sender` - Delivery failed and the physical card was returned to + sender. + + carrier_estimated_delivery_at: The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the + carrier expects the card to be delivered. + + city: The city where the event took place. + + postal_code: The postal code where the event took place. + + state: The state where the event took place. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not physical_card_id: + raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") + return await self._post( + f"/simulations/physical_cards/{physical_card_id}/tracking_updates", + body=await async_maybe_transform( + { + "category": category, + "carrier_estimated_delivery_at": carrier_estimated_delivery_at, + "city": city, + "postal_code": postal_code, + "state": state, + }, + physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PhysicalCard, + ) + class PhysicalCardsResourceWithRawResponse: def __init__(self, physical_cards: PhysicalCardsResource) -> None: @@ -198,6 +350,9 @@ def __init__(self, physical_cards: PhysicalCardsResource) -> None: self.advance_shipment = to_raw_response_wrapper( physical_cards.advance_shipment, ) + self.tracking_updates = to_raw_response_wrapper( + physical_cards.tracking_updates, + ) class AsyncPhysicalCardsResourceWithRawResponse: @@ -207,6 +362,9 @@ def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self.advance_shipment = async_to_raw_response_wrapper( physical_cards.advance_shipment, ) + self.tracking_updates = async_to_raw_response_wrapper( + physical_cards.tracking_updates, + ) class PhysicalCardsResourceWithStreamingResponse: @@ -216,6 +374,9 @@ def __init__(self, physical_cards: PhysicalCardsResource) -> None: self.advance_shipment = to_streamed_response_wrapper( physical_cards.advance_shipment, ) + self.tracking_updates = to_streamed_response_wrapper( + physical_cards.tracking_updates, + ) class AsyncPhysicalCardsResourceWithStreamingResponse: @@ -225,3 +386,6 @@ def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self.advance_shipment = async_to_streamed_response_wrapper( physical_cards.advance_shipment, ) + self.tracking_updates = async_to_streamed_response_wrapper( + physical_cards.tracking_updates, + ) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 390c5eae3..94a8ed827 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -23,6 +23,9 @@ from .physical_card_advance_shipment_params import ( PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) +from .physical_card_tracking_updates_params import ( + PhysicalCardTrackingUpdatesParams as PhysicalCardTrackingUpdatesParams, +) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) diff --git a/src/increase/types/simulations/physical_card_tracking_updates_params.py b/src/increase/types/simulations/physical_card_tracking_updates_params.py new file mode 100644 index 000000000..fb60b17eb --- /dev/null +++ b/src/increase/types/simulations/physical_card_tracking_updates_params.py @@ -0,0 +1,38 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["PhysicalCardTrackingUpdatesParams"] + + +class PhysicalCardTrackingUpdatesParams(TypedDict, total=False): + category: Required[Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"]] + """The type of tracking event. + + - `in_transit` - The physical card is in transit. + - `processed_for_delivery` - The physical card has been processed for delivery. + - `delivered` - The physical card has been delivered. + - `returned_to_sender` - Delivery failed and the physical card was returned to + sender. + """ + + carrier_estimated_delivery_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time when the + carrier expects the card to be delivered. + """ + + city: str + """The city where the event took place.""" + + postal_code: str + """The postal code where the event took place.""" + + state: str + """The state where the event took place.""" diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 419377273..fc3247413 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -10,6 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import PhysicalCard +from increase._utils import parse_datetime base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,6 +60,60 @@ def test_path_params_advance_shipment(self, client: Increase) -> None: shipment_status="shipped", ) + @parametrize + def test_method_tracking_updates(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + def test_method_tracking_updates_with_all_params(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), + city="New York", + postal_code="10045", + state="NY", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + def test_raw_response_tracking_updates(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + physical_card = response.parse() + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + def test_streaming_response_tracking_updates(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + physical_card = response.parse() + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_tracking_updates(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): + client.simulations.physical_cards.with_raw_response.tracking_updates( + physical_card_id="", + category="delivered", + ) + class TestAsyncPhysicalCards: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -104,3 +159,57 @@ async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) - physical_card_id="", shipment_status="shipped", ) + + @parametrize + async def test_method_tracking_updates(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + async def test_method_tracking_updates_with_all_params(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), + city="New York", + postal_code="10045", + state="NY", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + async def test_raw_response_tracking_updates(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + physical_card = await response.parse() + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + async def test_streaming_response_tracking_updates(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.tracking_updates( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + physical_card = await response.parse() + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_tracking_updates(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): + await async_client.simulations.physical_cards.with_raw_response.tracking_updates( + physical_card_id="", + category="delivered", + ) From cfc19c5b3216a52df418af95905d45560b6d798d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 02:51:52 +0000 Subject: [PATCH 0603/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 92cb0b2a1..6bacaf3b1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.243.0" + ".": "0.244.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 15313835b..983ff32cf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.243.0" +version = "0.244.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 16890e082..c2cbe05f1 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.243.0" # x-release-please-version +__version__ = "0.244.0" # x-release-please-version From dd08a3535b1e11d79de93f722d217527f3d8cbd6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 May 2025 05:07:43 +0000 Subject: [PATCH 0604/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 12 ++++++++++++ src/increase/types/event.py | 6 ++++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 6 ++++++ .../types/event_subscription_create_params.py | 6 ++++++ 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4888be558..f57d811d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7d9fa4c95ea0ac8bc1af5a8b1e7c53e57397e98ec4e0b61c90eea8fbf64e137b.yml -openapi_spec_hash: be4986939ec9a3efb0209f9cf1242090 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-18c5248f747fed10c6251e99ce19ff8baf99aba8a660b97f3b2f0c956c3b68eb.yml +openapi_spec_hash: fee11521b46e6468507255ffead78f8e config_hash: c4ca49f6bac6268578b0734a33a9d1fd diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 45ed7e19a..07478fb93 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -116,6 +116,8 @@ def create( "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -256,6 +258,10 @@ def create( 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is @@ -571,6 +577,8 @@ async def create( "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -711,6 +719,10 @@ async def create( 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 1ad775004..24602d055 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -85,6 +85,8 @@ class Event(BaseModel): "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -208,6 +210,10 @@ class Event(BaseModel): 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 398829c3f..029e9a030 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -100,6 +100,8 @@ class EventListParams(TypedDict, total=False): "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 09706d7ff..c9111d8c4 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -98,6 +98,8 @@ class EventSubscription(BaseModel): "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -221,6 +223,10 @@ class EventSubscription(BaseModel): 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index d321be4f7..c625307ac 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -84,6 +84,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "oauth_connection.deactivated", "outbound_card_push_transfer.created", "outbound_card_push_transfer.updated", + "outbound_card_validation.created", + "outbound_card_validation.updated", "pending_transaction.created", "pending_transaction.updated", "physical_card.created", @@ -206,6 +208,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): 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. - `pending_transaction.created` - Occurs whenever a Pending Transaction is created. - `pending_transaction.updated` - Occurs whenever a Pending Transaction is From 8e902afa606c676d3b26cb16103855b066082e5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 May 2025 02:53:11 +0000 Subject: [PATCH 0605/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6bacaf3b1..a72f9fd4f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.244.0" + ".": "0.245.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 983ff32cf..6cf99ba09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.244.0" +version = "0.245.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c2cbe05f1..2326e5d8d 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.244.0" # x-release-please-version +__version__ = "0.245.0" # x-release-please-version From 334cd6e0ae77bcf9f8c54ee731ae2a1be5ee6069 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 1 Jun 2025 01:18:24 +0000 Subject: [PATCH 0606/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f57d811d6..c070e3bdf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-18c5248f747fed10c6251e99ce19ff8baf99aba8a660b97f3b2f0c956c3b68eb.yml -openapi_spec_hash: fee11521b46e6468507255ffead78f8e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f960a8250437974efc198bd3dae1e504198d0aab1d6610d1cab02fdc36f113d7.yml +openapi_spec_hash: 3f210fd5c3aa18625258578b348d7662 config_hash: c4ca49f6bac6268578b0734a33a9d1fd From 95d72c90aaa17993f8dc701bd6e6e553846021ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 10:11:32 +0000 Subject: [PATCH 0607/1325] chore(docs): remove reference to rye shell --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index afe17473f..4578ce3ce 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,8 +17,7 @@ $ rye sync --all-features You can then run scripts using `rye run python script.py` or by activating the virtual environment: ```sh -$ rye shell -# or manually activate - https://docs.python.org/3/library/venv.html#how-venvs-work +# Activate the virtual environment - https://docs.python.org/3/library/venv.html#how-venvs-work $ source .venv/bin/activate # now you can omit the `rye run` prefix From 821e100b97ea1d5b318ba8881a6ae8ca86705b28 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 17:33:14 +0000 Subject: [PATCH 0608/1325] feat(client): add follow_redirects request option --- src/increase/_base_client.py | 6 ++++ src/increase/_models.py | 2 ++ src/increase/_types.py | 2 ++ tests/test_client.py | 54 ++++++++++++++++++++++++++++++++++++ 4 files changed, 64 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index bb1083c08..e9896b7e7 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -960,6 +960,9 @@ def request( if self.custom_auth is not None: kwargs["auth"] = self.custom_auth + if options.follow_redirects is not None: + kwargs["follow_redirects"] = options.follow_redirects + log.debug("Sending HTTP Request: %s %s", request.method, request.url) response = None @@ -1460,6 +1463,9 @@ async def request( if self.custom_auth is not None: kwargs["auth"] = self.custom_auth + if options.follow_redirects is not None: + kwargs["follow_redirects"] = options.follow_redirects + log.debug("Sending HTTP Request: %s %s", request.method, request.url) response = None diff --git a/src/increase/_models.py b/src/increase/_models.py index 798956f17..4f2149805 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -737,6 +737,7 @@ class FinalRequestOptionsInput(TypedDict, total=False): idempotency_key: str json_data: Body extra_json: AnyMapping + follow_redirects: bool @final @@ -750,6 +751,7 @@ class FinalRequestOptions(pydantic.BaseModel): files: Union[HttpxRequestFiles, None] = None idempotency_key: Union[str, None] = None post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven() + follow_redirects: Union[bool, None] = None # It should be noted that we cannot use `json` here as that would override # a BaseModel method in an incompatible fashion. diff --git a/src/increase/_types.py b/src/increase/_types.py index dac505fb8..1f224398d 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -100,6 +100,7 @@ class RequestOptions(TypedDict, total=False): params: Query extra_json: AnyMapping idempotency_key: str + follow_redirects: bool # Sentinel class used until PEP 0661 is accepted @@ -215,3 +216,4 @@ class _GenericAlias(Protocol): class HttpxSendArgs(TypedDict, total=False): auth: httpx.Auth + follow_redirects: bool diff --git a/tests/test_client.py b/tests/test_client.py index af9afe1b5..b44f788b5 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -883,6 +883,33 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" + @pytest.mark.respx(base_url=base_url) + def test_follow_redirects(self, respx_mock: MockRouter) -> None: + # Test that the default follow_redirects=True allows following redirects + respx_mock.post("/redirect").mock( + return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) + ) + respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) + + response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + assert response.status_code == 200 + assert response.json() == {"status": "ok"} + + @pytest.mark.respx(base_url=base_url) + def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + # Test that follow_redirects=False prevents following redirects + respx_mock.post("/redirect").mock( + return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) + ) + + with pytest.raises(APIStatusError) as exc_info: + self.client.post( + "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response + ) + + assert exc_info.value.response.status_code == 302 + assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected" + class TestAsyncIncrease: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) @@ -1771,3 +1798,30 @@ async def test_main() -> None: raise AssertionError("calling get_platform using asyncify resulted in a hung process") time.sleep(0.1) + + @pytest.mark.respx(base_url=base_url) + async def test_follow_redirects(self, respx_mock: MockRouter) -> None: + # Test that the default follow_redirects=True allows following redirects + respx_mock.post("/redirect").mock( + return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) + ) + respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) + + response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + assert response.status_code == 200 + assert response.json() == {"status": "ok"} + + @pytest.mark.respx(base_url=base_url) + async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + # Test that follow_redirects=False prevents following redirects + respx_mock.post("/redirect").mock( + return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) + ) + + with pytest.raises(APIStatusError) as exc_info: + await self.client.post( + "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response + ) + + assert exc_info.value.response.status_code == 302 + assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected" From 7d979a067a28228b452437d5d2c8f224fc69de26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 18:56:59 +0000 Subject: [PATCH 0609/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 6 + .../resources/simulations/__init__.py | 14 ++ .../resources/simulations/fee_payments.py | 203 ++++++++++++++++++ .../resources/simulations/simulations.py | 32 +++ src/increase/types/simulations/__init__.py | 1 + .../simulations/fee_payment_create_params.py | 17 ++ .../simulations/test_fee_payments.py | 90 ++++++++ 8 files changed, 367 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/simulations/fee_payments.py create mode 100644 src/increase/types/simulations/fee_payment_create_params.py create mode 100644 tests/api_resources/simulations/test_fee_payments.py diff --git a/.stats.yml b/.stats.yml index c070e3bdf..3086c4403 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f960a8250437974efc198bd3dae1e504198d0aab1d6610d1cab02fdc36f113d7.yml -openapi_spec_hash: 3f210fd5c3aa18625258578b348d7662 -config_hash: c4ca49f6bac6268578b0734a33a9d1fd +configured_endpoints: 197 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8395d213bd5b89435729ea3760762a58bb756b98053c67d1f4ccb3e3794906d5.yml +openapi_spec_hash: 4c06a4061fa9e7b29afe3cd044f36766 +config_hash: 6649a4b29dbd9fbf6c582fe1cfbe748d diff --git a/api.md b/api.md index de8a56707..57345d038 100644 --- a/api.md +++ b/api.md @@ -728,6 +728,12 @@ Methods: - client.simulations.interest_payments.create(\*\*params) -> Transaction +## FeePayments + +Methods: + +- client.simulations.fee_payments.create(\*\*params) -> Transaction + ## CardAuthorizations Types: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index f1f46f9a5..cbe8bf945 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -32,6 +32,14 @@ CardRefundsResourceWithStreamingResponse, AsyncCardRefundsResourceWithStreamingResponse, ) +from .fee_payments import ( + FeePaymentsResource, + AsyncFeePaymentsResource, + FeePaymentsResourceWithRawResponse, + AsyncFeePaymentsResourceWithRawResponse, + FeePaymentsResourceWithStreamingResponse, + AsyncFeePaymentsResourceWithStreamingResponse, +) from .ach_transfers import ( ACHTransfersResource, AsyncACHTransfersResource, @@ -232,6 +240,12 @@ "AsyncInterestPaymentsResourceWithRawResponse", "InterestPaymentsResourceWithStreamingResponse", "AsyncInterestPaymentsResourceWithStreamingResponse", + "FeePaymentsResource", + "AsyncFeePaymentsResource", + "FeePaymentsResourceWithRawResponse", + "AsyncFeePaymentsResourceWithRawResponse", + "FeePaymentsResourceWithStreamingResponse", + "AsyncFeePaymentsResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/fee_payments.py b/src/increase/resources/simulations/fee_payments.py new file mode 100644 index 000000000..1f772b300 --- /dev/null +++ b/src/increase/resources/simulations/fee_payments.py @@ -0,0 +1,203 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import fee_payment_create_params +from ...types.transaction import Transaction + +__all__ = ["FeePaymentsResource", "AsyncFeePaymentsResource"] + + +class FeePaymentsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> FeePaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return FeePaymentsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> FeePaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return FeePaymentsResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + amount: int, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """ + A fee payment is how Increase charges you for technology fees incurred each + month. In production, these payments will be charged to your program's billing + account. + + Args: + account_id: The identifier of the Account to use as the billing account for the fee payment. + + amount: The fee amount in cents. Must be positive. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/fee_payments", + body=maybe_transform( + { + "account_id": account_id, + "amount": amount, + }, + fee_payment_create_params.FeePaymentCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class AsyncFeePaymentsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncFeePaymentsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncFeePaymentsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncFeePaymentsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncFeePaymentsResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + amount: int, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Transaction: + """ + A fee payment is how Increase charges you for technology fees incurred each + month. In production, these payments will be charged to your program's billing + account. + + Args: + account_id: The identifier of the Account to use as the billing account for the fee payment. + + amount: The fee amount in cents. Must be positive. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/fee_payments", + body=await async_maybe_transform( + { + "account_id": account_id, + "amount": amount, + }, + fee_payment_create_params.FeePaymentCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Transaction, + ) + + +class FeePaymentsResourceWithRawResponse: + def __init__(self, fee_payments: FeePaymentsResource) -> None: + self._fee_payments = fee_payments + + self.create = to_raw_response_wrapper( + fee_payments.create, + ) + + +class AsyncFeePaymentsResourceWithRawResponse: + def __init__(self, fee_payments: AsyncFeePaymentsResource) -> None: + self._fee_payments = fee_payments + + self.create = async_to_raw_response_wrapper( + fee_payments.create, + ) + + +class FeePaymentsResourceWithStreamingResponse: + def __init__(self, fee_payments: FeePaymentsResource) -> None: + self._fee_payments = fee_payments + + self.create = to_streamed_response_wrapper( + fee_payments.create, + ) + + +class AsyncFeePaymentsResourceWithStreamingResponse: + def __init__(self, fee_payments: AsyncFeePaymentsResource) -> None: + self._fee_payments = fee_payments + + self.create = async_to_streamed_response_wrapper( + fee_payments.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 878a9c5ee..34dd9a65b 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -28,6 +28,14 @@ CardRefundsResourceWithStreamingResponse, AsyncCardRefundsResourceWithStreamingResponse, ) +from .fee_payments import ( + FeePaymentsResource, + AsyncFeePaymentsResource, + FeePaymentsResourceWithRawResponse, + AsyncFeePaymentsResourceWithRawResponse, + FeePaymentsResourceWithStreamingResponse, + AsyncFeePaymentsResourceWithStreamingResponse, +) from .ach_transfers import ( ACHTransfersResource, AsyncACHTransfersResource, @@ -229,6 +237,10 @@ class SimulationsResource(SyncAPIResource): def interest_payments(self) -> InterestPaymentsResource: return InterestPaymentsResource(self._client) + @cached_property + def fee_payments(self) -> FeePaymentsResource: + return FeePaymentsResource(self._client) + @cached_property def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) @@ -358,6 +370,10 @@ class AsyncSimulationsResource(AsyncAPIResource): def interest_payments(self) -> AsyncInterestPaymentsResource: return AsyncInterestPaymentsResource(self._client) + @cached_property + def fee_payments(self) -> AsyncFeePaymentsResource: + return AsyncFeePaymentsResource(self._client) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) @@ -490,6 +506,10 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + @cached_property + def fee_payments(self) -> FeePaymentsResourceWithRawResponse: + return FeePaymentsResourceWithRawResponse(self._simulations.fee_payments) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -605,6 +625,10 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + @cached_property + def fee_payments(self) -> AsyncFeePaymentsResourceWithRawResponse: + return AsyncFeePaymentsResourceWithRawResponse(self._simulations.fee_payments) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -722,6 +746,10 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + @cached_property + def fee_payments(self) -> FeePaymentsResourceWithStreamingResponse: + return FeePaymentsResourceWithStreamingResponse(self._simulations.fee_payments) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -841,6 +869,10 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + @cached_property + def fee_payments(self) -> AsyncFeePaymentsResourceWithStreamingResponse: + return AsyncFeePaymentsResourceWithStreamingResponse(self._simulations.fee_payments) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 94a8ed827..6a07f0dfa 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -5,6 +5,7 @@ from .program_create_params import ProgramCreateParams as ProgramCreateParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams +from .fee_payment_create_params import FeePaymentCreateParams as FeePaymentCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams diff --git a/src/increase/types/simulations/fee_payment_create_params.py b/src/increase/types/simulations/fee_payment_create_params.py new file mode 100644 index 000000000..9eaf10b9a --- /dev/null +++ b/src/increase/types/simulations/fee_payment_create_params.py @@ -0,0 +1,17 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["FeePaymentCreateParams"] + + +class FeePaymentCreateParams(TypedDict, total=False): + account_id: Required[str] + """ + The identifier of the Account to use as the billing account for the fee payment. + """ + + amount: Required[int] + """The fee amount in cents. Must be positive.""" diff --git a/tests/api_resources/simulations/test_fee_payments.py b/tests/api_resources/simulations/test_fee_payments.py new file mode 100644 index 000000000..5c879e7b0 --- /dev/null +++ b/tests/api_resources/simulations/test_fee_payments.py @@ -0,0 +1,90 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Transaction + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestFeePayments: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + fee_payment = client.simulations.fee_payments.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) + assert_matches_type(Transaction, fee_payment, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.fee_payments.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fee_payment = response.parse() + assert_matches_type(Transaction, fee_payment, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.fee_payments.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fee_payment = response.parse() + assert_matches_type(Transaction, fee_payment, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncFeePayments: + parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + fee_payment = await async_client.simulations.fee_payments.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) + assert_matches_type(Transaction, fee_payment, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.fee_payments.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fee_payment = await response.parse() + assert_matches_type(Transaction, fee_payment, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.fee_payments.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fee_payment = await response.parse() + assert_matches_type(Transaction, fee_payment, path=["response"]) + + assert cast(Any, response.is_closed) is True From dcf1c9c7f6c87fcfbfa1b00af080a39c0796858e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 20:45:22 +0000 Subject: [PATCH 0610/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 6 - .../resources/simulations/__init__.py | 14 -- .../resources/simulations/fee_payments.py | 203 ------------------ .../resources/simulations/simulations.py | 32 --- src/increase/types/simulations/__init__.py | 1 - .../simulations/fee_payment_create_params.py | 17 -- .../simulations/test_fee_payments.py | 90 -------- 8 files changed, 4 insertions(+), 367 deletions(-) delete mode 100644 src/increase/resources/simulations/fee_payments.py delete mode 100644 src/increase/types/simulations/fee_payment_create_params.py delete mode 100644 tests/api_resources/simulations/test_fee_payments.py diff --git a/.stats.yml b/.stats.yml index 3086c4403..c070e3bdf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 197 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8395d213bd5b89435729ea3760762a58bb756b98053c67d1f4ccb3e3794906d5.yml -openapi_spec_hash: 4c06a4061fa9e7b29afe3cd044f36766 -config_hash: 6649a4b29dbd9fbf6c582fe1cfbe748d +configured_endpoints: 196 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f960a8250437974efc198bd3dae1e504198d0aab1d6610d1cab02fdc36f113d7.yml +openapi_spec_hash: 3f210fd5c3aa18625258578b348d7662 +config_hash: c4ca49f6bac6268578b0734a33a9d1fd diff --git a/api.md b/api.md index 57345d038..de8a56707 100644 --- a/api.md +++ b/api.md @@ -728,12 +728,6 @@ Methods: - client.simulations.interest_payments.create(\*\*params) -> Transaction -## FeePayments - -Methods: - -- client.simulations.fee_payments.create(\*\*params) -> Transaction - ## CardAuthorizations Types: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index cbe8bf945..f1f46f9a5 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -32,14 +32,6 @@ CardRefundsResourceWithStreamingResponse, AsyncCardRefundsResourceWithStreamingResponse, ) -from .fee_payments import ( - FeePaymentsResource, - AsyncFeePaymentsResource, - FeePaymentsResourceWithRawResponse, - AsyncFeePaymentsResourceWithRawResponse, - FeePaymentsResourceWithStreamingResponse, - AsyncFeePaymentsResourceWithStreamingResponse, -) from .ach_transfers import ( ACHTransfersResource, AsyncACHTransfersResource, @@ -240,12 +232,6 @@ "AsyncInterestPaymentsResourceWithRawResponse", "InterestPaymentsResourceWithStreamingResponse", "AsyncInterestPaymentsResourceWithStreamingResponse", - "FeePaymentsResource", - "AsyncFeePaymentsResource", - "FeePaymentsResourceWithRawResponse", - "AsyncFeePaymentsResourceWithRawResponse", - "FeePaymentsResourceWithStreamingResponse", - "AsyncFeePaymentsResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/fee_payments.py b/src/increase/resources/simulations/fee_payments.py deleted file mode 100644 index 1f772b300..000000000 --- a/src/increase/resources/simulations/fee_payments.py +++ /dev/null @@ -1,203 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import fee_payment_create_params -from ...types.transaction import Transaction - -__all__ = ["FeePaymentsResource", "AsyncFeePaymentsResource"] - - -class FeePaymentsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> FeePaymentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return FeePaymentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> FeePaymentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return FeePaymentsResourceWithStreamingResponse(self) - - def create( - self, - *, - account_id: str, - amount: int, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """ - A fee payment is how Increase charges you for technology fees incurred each - month. In production, these payments will be charged to your program's billing - account. - - Args: - account_id: The identifier of the Account to use as the billing account for the fee payment. - - amount: The fee amount in cents. Must be positive. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/fee_payments", - body=maybe_transform( - { - "account_id": account_id, - "amount": amount, - }, - fee_payment_create_params.FeePaymentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class AsyncFeePaymentsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncFeePaymentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncFeePaymentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncFeePaymentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncFeePaymentsResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_id: str, - amount: int, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> Transaction: - """ - A fee payment is how Increase charges you for technology fees incurred each - month. In production, these payments will be charged to your program's billing - account. - - Args: - account_id: The identifier of the Account to use as the billing account for the fee payment. - - amount: The fee amount in cents. Must be positive. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/fee_payments", - body=await async_maybe_transform( - { - "account_id": account_id, - "amount": amount, - }, - fee_payment_create_params.FeePaymentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Transaction, - ) - - -class FeePaymentsResourceWithRawResponse: - def __init__(self, fee_payments: FeePaymentsResource) -> None: - self._fee_payments = fee_payments - - self.create = to_raw_response_wrapper( - fee_payments.create, - ) - - -class AsyncFeePaymentsResourceWithRawResponse: - def __init__(self, fee_payments: AsyncFeePaymentsResource) -> None: - self._fee_payments = fee_payments - - self.create = async_to_raw_response_wrapper( - fee_payments.create, - ) - - -class FeePaymentsResourceWithStreamingResponse: - def __init__(self, fee_payments: FeePaymentsResource) -> None: - self._fee_payments = fee_payments - - self.create = to_streamed_response_wrapper( - fee_payments.create, - ) - - -class AsyncFeePaymentsResourceWithStreamingResponse: - def __init__(self, fee_payments: AsyncFeePaymentsResource) -> None: - self._fee_payments = fee_payments - - self.create = async_to_streamed_response_wrapper( - fee_payments.create, - ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 34dd9a65b..878a9c5ee 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -28,14 +28,6 @@ CardRefundsResourceWithStreamingResponse, AsyncCardRefundsResourceWithStreamingResponse, ) -from .fee_payments import ( - FeePaymentsResource, - AsyncFeePaymentsResource, - FeePaymentsResourceWithRawResponse, - AsyncFeePaymentsResourceWithRawResponse, - FeePaymentsResourceWithStreamingResponse, - AsyncFeePaymentsResourceWithStreamingResponse, -) from .ach_transfers import ( ACHTransfersResource, AsyncACHTransfersResource, @@ -237,10 +229,6 @@ class SimulationsResource(SyncAPIResource): def interest_payments(self) -> InterestPaymentsResource: return InterestPaymentsResource(self._client) - @cached_property - def fee_payments(self) -> FeePaymentsResource: - return FeePaymentsResource(self._client) - @cached_property def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) @@ -370,10 +358,6 @@ class AsyncSimulationsResource(AsyncAPIResource): def interest_payments(self) -> AsyncInterestPaymentsResource: return AsyncInterestPaymentsResource(self._client) - @cached_property - def fee_payments(self) -> AsyncFeePaymentsResource: - return AsyncFeePaymentsResource(self._client) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) @@ -506,10 +490,6 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) - @cached_property - def fee_payments(self) -> FeePaymentsResourceWithRawResponse: - return FeePaymentsResourceWithRawResponse(self._simulations.fee_payments) - @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -625,10 +605,6 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) - @cached_property - def fee_payments(self) -> AsyncFeePaymentsResourceWithRawResponse: - return AsyncFeePaymentsResourceWithRawResponse(self._simulations.fee_payments) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -746,10 +722,6 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) - @cached_property - def fee_payments(self) -> FeePaymentsResourceWithStreamingResponse: - return FeePaymentsResourceWithStreamingResponse(self._simulations.fee_payments) - @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -869,10 +841,6 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) - @cached_property - def fee_payments(self) -> AsyncFeePaymentsResourceWithStreamingResponse: - return AsyncFeePaymentsResourceWithStreamingResponse(self._simulations.fee_payments) - @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 6a07f0dfa..94a8ed827 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -5,7 +5,6 @@ from .program_create_params import ProgramCreateParams as ProgramCreateParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams -from .fee_payment_create_params import FeePaymentCreateParams as FeePaymentCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams diff --git a/src/increase/types/simulations/fee_payment_create_params.py b/src/increase/types/simulations/fee_payment_create_params.py deleted file mode 100644 index 9eaf10b9a..000000000 --- a/src/increase/types/simulations/fee_payment_create_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["FeePaymentCreateParams"] - - -class FeePaymentCreateParams(TypedDict, total=False): - account_id: Required[str] - """ - The identifier of the Account to use as the billing account for the fee payment. - """ - - amount: Required[int] - """The fee amount in cents. Must be positive.""" diff --git a/tests/api_resources/simulations/test_fee_payments.py b/tests/api_resources/simulations/test_fee_payments.py deleted file mode 100644 index 5c879e7b0..000000000 --- a/tests/api_resources/simulations/test_fee_payments.py +++ /dev/null @@ -1,90 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Transaction - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestFeePayments: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - fee_payment = client.simulations.fee_payments.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) - assert_matches_type(Transaction, fee_payment, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.fee_payments.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - fee_payment = response.parse() - assert_matches_type(Transaction, fee_payment, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.fee_payments.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - fee_payment = response.parse() - assert_matches_type(Transaction, fee_payment, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncFeePayments: - parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - async def test_method_create(self, async_client: AsyncIncrease) -> None: - fee_payment = await async_client.simulations.fee_payments.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) - assert_matches_type(Transaction, fee_payment, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.fee_payments.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - fee_payment = await response.parse() - assert_matches_type(Transaction, fee_payment, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.fee_payments.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", - amount=1000, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - fee_payment = await response.parse() - assert_matches_type(Transaction, fee_payment, path=["response"]) - - assert cast(Any, response.is_closed) is True From ed975c1c170e451187b3d023872c7c830364217e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Jun 2025 22:46:39 +0000 Subject: [PATCH 0611/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/documents.py | 14 ++++++++++++++ src/increase/types/document.py | 17 ++++++++++++++++- src/increase/types/document_list_params.py | 18 +++++++++++++++++- src/increase/types/file.py | 2 ++ src/increase/types/file_list_params.py | 1 + tests/api_resources/test_documents.py | 2 ++ 7 files changed, 54 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c070e3bdf..8953883b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f960a8250437974efc198bd3dae1e504198d0aab1d6610d1cab02fdc36f113d7.yml -openapi_spec_hash: 3f210fd5c3aa18625258578b348d7662 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-68bbd789dfbd107f02c29239ae129a21d004842700dea205f234136ac27352eb.yml +openapi_spec_hash: 7692e2b2d4fdeac7ff58b07c9d8fef2c config_hash: c4ca49f6bac6268578b0734a33a9d1fd diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 7e5e31aea..298b3737b 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -84,6 +84,7 @@ def list( created_at: document_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, entity_id: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -100,6 +101,11 @@ def list( entity_id: Filter Documents to ones belonging to the specified Entity. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -125,6 +131,7 @@ def list( "created_at": created_at, "cursor": cursor, "entity_id": entity_id, + "idempotency_key": idempotency_key, "limit": limit, }, document_list_params.DocumentListParams, @@ -196,6 +203,7 @@ def list( created_at: document_list_params.CreatedAt | NotGiven = NOT_GIVEN, cursor: str | NotGiven = NOT_GIVEN, entity_id: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -212,6 +220,11 @@ def list( entity_id: Filter Documents to ones belonging to the specified Entity. + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. @@ -237,6 +250,7 @@ def list( "created_at": created_at, "cursor": cursor, "entity_id": entity_id, + "idempotency_key": idempotency_key, "limit": limit, }, document_list_params.DocumentListParams, diff --git a/src/increase/types/document.py b/src/increase/types/document.py index fac32ff1f..8f9d6d8cc 100644 --- a/src/increase/types/document.py +++ b/src/increase/types/document.py @@ -13,7 +13,13 @@ class Document(BaseModel): id: str """The Document identifier.""" - category: Literal["form_1099_int", "form_1099_misc", "proof_of_authorization", "company_information"] + category: Literal[ + "form_1099_int", + "form_1099_misc", + "proof_of_authorization", + "company_information", + "account_verification_letter", + ] """The type of document. - `form_1099_int` - Internal Revenue Service Form 1099-INT. @@ -22,6 +28,7 @@ class Document(BaseModel): authorization request for an ACH transfer. - `company_information` - Company information, such a policies or procedures, typically submitted during our due diligence process. + - `account_verification_letter` - An account verification letter. """ created_at: datetime @@ -36,6 +43,14 @@ class Document(BaseModel): file_id: str """The identifier of the File containing the Document's contents.""" + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + type: Literal["document"] """A constant representing the object's type. diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py index aca78e270..473c12af3 100644 --- a/src/increase/types/document_list_params.py +++ b/src/increase/types/document_list_params.py @@ -22,6 +22,14 @@ class DocumentListParams(TypedDict, total=False): entity_id: str """Filter Documents to ones belonging to the specified Entity.""" + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + limit: int """Limit the size of the list that is returned. @@ -32,7 +40,15 @@ class DocumentListParams(TypedDict, total=False): _CategoryReservedKeywords = TypedDict( "_CategoryReservedKeywords", { - "in": List[Literal["form_1099_int", "form_1099_misc", "proof_of_authorization", "company_information"]], + "in": List[ + Literal[ + "form_1099_int", + "form_1099_misc", + "proof_of_authorization", + "company_information", + "account_verification_letter", + ] + ], }, total=False, ) diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 94c29fadc..13765e92d 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -66,6 +66,7 @@ class File(BaseModel): "unusual_activity_report_attachment", "deposit_account_control_agreement", "proof_of_authorization_request_submission", + "account_verification_letter", ] """What the File will be used for. @@ -110,6 +111,7 @@ class File(BaseModel): access to the funds into your account. - `proof_of_authorization_request_submission` - A file containing additional evidence for a Proof of Authorization Request Submission. + - `account_verification_letter` - An account verification letter. """ type: Literal["file"] diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 40cfb0456..f7e1059a1 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -90,6 +90,7 @@ class CreatedAt(TypedDict, total=False): "unusual_activity_report_attachment", "deposit_account_control_agreement", "proof_of_authorization_request_submission", + "account_verification_letter", ] ], }, diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 1ad9835d1..2133f0ac3 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -74,6 +74,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: }, cursor="cursor", entity_id="entity_id", + idempotency_key="x", limit=1, ) assert_matches_type(SyncPage[Document], document, path=["response"]) @@ -157,6 +158,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> }, cursor="cursor", entity_id="entity_id", + idempotency_key="x", limit=1, ) assert_matches_type(AsyncPage[Document], document, path=["response"]) From a1ce48001ea32cd24c21238bd9bd5a4c8066df92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 02:51:28 +0000 Subject: [PATCH 0612/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a72f9fd4f..be2cee26e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.245.0" + ".": "0.246.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6cf99ba09..a449abb2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.245.0" +version = "0.246.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2326e5d8d..b4725c512 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.245.0" # x-release-please-version +__version__ = "0.246.0" # x-release-please-version From 7a2ff10f5c80d7bf14950f7fa0fde28369c816e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 03:56:33 +0000 Subject: [PATCH 0613/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/documents.py | 122 ++++++++++++++++++- src/increase/types/__init__.py | 1 + src/increase/types/document.py | 10 +- src/increase/types/document_create_params.py | 30 +++++ tests/api_resources/test_documents.py | 86 ++++++++++++- 7 files changed, 250 insertions(+), 8 deletions(-) create mode 100644 src/increase/types/document_create_params.py diff --git a/.stats.yml b/.stats.yml index 8953883b1..43c250262 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 196 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-68bbd789dfbd107f02c29239ae129a21d004842700dea205f234136ac27352eb.yml -openapi_spec_hash: 7692e2b2d4fdeac7ff58b07c9d8fef2c -config_hash: c4ca49f6bac6268578b0734a33a9d1fd +configured_endpoints: 197 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b9a610bb578b82c46d4222f4746d69c8e422f9cfad51a6d72d44c64f8746d709.yml +openapi_spec_hash: a63cc36300445b0201442108b6cc8530 +config_hash: 85850cd9055db4b9e43bcc4aa1a2dcea diff --git a/api.md b/api.md index de8a56707..6b20e4728 100644 --- a/api.md +++ b/api.md @@ -528,6 +528,7 @@ from increase.types import Document Methods: +- client.documents.create(\*\*params) -> Document - client.documents.retrieve(document_id) -> Document - client.documents.list(\*\*params) -> SyncPage[Document] diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 298b3737b..f83829f62 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -2,11 +2,13 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from ..types import document_list_params +from ..types import document_list_params, document_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -42,6 +44,58 @@ def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: """ return DocumentsResourceWithStreamingResponse(self) + def create( + self, + *, + category: Literal["account_verification_letter"], + account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Document: + """ + Create a Document + + Args: + category: The type of document to create. + + - `account_verification_letter` - An account verification letter. + + account_verification_letter: An account verification letter. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/documents", + body=maybe_transform( + { + "category": category, + "account_verification_letter": account_verification_letter, + }, + document_create_params.DocumentCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Document, + ) + def retrieve( self, document_id: str, @@ -161,6 +215,58 @@ def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse """ return AsyncDocumentsResourceWithStreamingResponse(self) + async def create( + self, + *, + category: Literal["account_verification_letter"], + account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Document: + """ + Create a Document + + Args: + category: The type of document to create. + + - `account_verification_letter` - An account verification letter. + + account_verification_letter: An account verification letter. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/documents", + body=await async_maybe_transform( + { + "category": category, + "account_verification_letter": account_verification_letter, + }, + document_create_params.DocumentCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Document, + ) + async def retrieve( self, document_id: str, @@ -264,6 +370,9 @@ class DocumentsResourceWithRawResponse: def __init__(self, documents: DocumentsResource) -> None: self._documents = documents + self.create = to_raw_response_wrapper( + documents.create, + ) self.retrieve = to_raw_response_wrapper( documents.retrieve, ) @@ -276,6 +385,9 @@ class AsyncDocumentsResourceWithRawResponse: def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents + self.create = async_to_raw_response_wrapper( + documents.create, + ) self.retrieve = async_to_raw_response_wrapper( documents.retrieve, ) @@ -288,6 +400,9 @@ class DocumentsResourceWithStreamingResponse: def __init__(self, documents: DocumentsResource) -> None: self._documents = documents + self.create = to_streamed_response_wrapper( + documents.create, + ) self.retrieve = to_streamed_response_wrapper( documents.retrieve, ) @@ -300,6 +415,9 @@ class AsyncDocumentsResourceWithStreamingResponse: def __init__(self, documents: AsyncDocumentsResource) -> None: self._documents = documents + self.create = async_to_streamed_response_wrapper( + documents.create, + ) self.retrieve = async_to_streamed_response_wrapper( documents.retrieve, ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c6b3cb5d8..6b67834ca 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -68,6 +68,7 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams +from .document_create_params import DocumentCreateParams as DocumentCreateParams from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams diff --git a/src/increase/types/document.py b/src/increase/types/document.py index 8f9d6d8cc..941ee35dc 100644 --- a/src/increase/types/document.py +++ b/src/increase/types/document.py @@ -6,13 +6,21 @@ from .._models import BaseModel -__all__ = ["Document"] +__all__ = ["Document", "AccountVerificationLetter"] + + +class AccountVerificationLetter(BaseModel): + account_number_id: str + """The identifier of the Account Number the document was generated for.""" class Document(BaseModel): id: str """The Document identifier.""" + account_verification_letter: Optional[AccountVerificationLetter] = None + """Properties of an account verification letter document.""" + category: Literal[ "form_1099_int", "form_1099_misc", diff --git a/src/increase/types/document_create_params.py b/src/increase/types/document_create_params.py new file mode 100644 index 000000000..0470cb7fb --- /dev/null +++ b/src/increase/types/document_create_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["DocumentCreateParams", "AccountVerificationLetter"] + + +class DocumentCreateParams(TypedDict, total=False): + category: Required[Literal["account_verification_letter"]] + """The type of document to create. + + - `account_verification_letter` - An account verification letter. + """ + + account_verification_letter: AccountVerificationLetter + """An account verification letter.""" + + +class AccountVerificationLetter(TypedDict, total=False): + account_number_id: Required[str] + """The Account Number the bank letter should be generated for.""" + + balance_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """If provided, the letter will include the Account's balance as of the date.""" diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 2133f0ac3..078706b41 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import Document -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -19,6 +19,48 @@ class TestDocuments: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Increase) -> None: + document = client.documents.create( + category="account_verification_letter", + ) + assert_matches_type(Document, document, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + document = client.documents.create( + category="account_verification_letter", + account_verification_letter={ + "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", + "balance_date": parse_date("2024-12-31"), + }, + ) + assert_matches_type(Document, document, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.documents.with_raw_response.create( + category="account_verification_letter", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + document = response.parse() + assert_matches_type(Document, document, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.documents.with_streaming_response.create( + category="account_verification_letter", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + document = response.parse() + assert_matches_type(Document, document, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_retrieve(self, client: Increase) -> None: document = client.documents.retrieve( @@ -103,6 +145,48 @@ 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 + async def test_method_create(self, async_client: AsyncIncrease) -> None: + document = await async_client.documents.create( + category="account_verification_letter", + ) + assert_matches_type(Document, document, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + document = await async_client.documents.create( + category="account_verification_letter", + account_verification_letter={ + "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", + "balance_date": parse_date("2024-12-31"), + }, + ) + assert_matches_type(Document, document, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.documents.with_raw_response.create( + category="account_verification_letter", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + document = await response.parse() + assert_matches_type(Document, document, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.documents.with_streaming_response.create( + category="account_verification_letter", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + document = await response.parse() + assert_matches_type(Document, document, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.retrieve( From f95cf5065afdfdbc67e8bf634b2b6eac9976bb86 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 20:06:19 +0000 Subject: [PATCH 0614/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 43c250262..94d59c04b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 197 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b9a610bb578b82c46d4222f4746d69c8e422f9cfad51a6d72d44c64f8746d709.yml -openapi_spec_hash: a63cc36300445b0201442108b6cc8530 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-644c7608acea9983d97a58a2b89d0f3f6d641c6dba30270e6ed03ea4f9942a90.yml +openapi_spec_hash: a024db2f41e8a801204741e95c4e57fd config_hash: 85850cd9055db4b9e43bcc4aa1a2dcea From b8d6fe0b5b00477133efe20169dcf4c39d52bfa0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Jun 2025 20:20:43 +0000 Subject: [PATCH 0615/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/external_account.py | 8 -------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 94d59c04b..b6b5d3758 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 197 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-644c7608acea9983d97a58a2b89d0f3f6d641c6dba30270e6ed03ea4f9942a90.yml -openapi_spec_hash: a024db2f41e8a801204741e95c4e57fd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-075bbbfbc34a6e34519bb157c21f280d0ba941ce2ddf834eafbbde3dbd3b52b9.yml +openapi_spec_hash: e0f7bef65d2cb1f3332b969254dee00a config_hash: 85850cd9055db4b9e43bcc4aa1a2dcea diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py index d263f8e1c..1e59efa5b 100644 --- a/src/increase/types/external_account.py +++ b/src/increase/types/external_account.py @@ -65,11 +65,3 @@ class ExternalAccount(BaseModel): For this resource it will always be `external_account`. """ - - verification_status: Literal["unverified", "pending", "verified"] - """If you have verified ownership of the External Account. - - - `unverified` - The External Account has not been verified. - - `pending` - The External Account is in the process of being verified. - - `verified` - The External Account is verified. - """ From 7b0cd126c576f3fd0871ac2e39a9ccb3c7544e09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Jun 2025 02:51:10 +0000 Subject: [PATCH 0616/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index be2cee26e..098de4c09 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.246.0" + ".": "0.247.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a449abb2c..2840a695e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.246.0" +version = "0.247.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b4725c512..88b5f51c8 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.246.0" # x-release-please-version +__version__ = "0.247.0" # x-release-please-version From 66b381e76b5fa297c7b77747b2c8c59f3118b448 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Jun 2025 22:03:15 +0000 Subject: [PATCH 0617/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 2 + .../resources/real_time_payments_transfers.py | 200 ++++++++++++++++++ .../test_real_time_payments_transfers.py | 160 ++++++++++++++ 4 files changed, 366 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index b6b5d3758..51cb36719 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 197 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-075bbbfbc34a6e34519bb157c21f280d0ba941ce2ddf834eafbbde3dbd3b52b9.yml -openapi_spec_hash: e0f7bef65d2cb1f3332b969254dee00a -config_hash: 85850cd9055db4b9e43bcc4aa1a2dcea +configured_endpoints: 199 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-75fe352618195712049f1cde5a80bfab2510a7a1e52f792ab0ca560d9d40a4b9.yml +openapi_spec_hash: c8cc277c248d9527fa442d11ce958132 +config_hash: 0c284b69f3dccb22b24877f61d0d8a9a diff --git a/api.md b/api.md index 6b20e4728..c5d928724 100644 --- a/api.md +++ b/api.md @@ -349,6 +349,8 @@ Methods: - client.real_time_payments_transfers.create(\*\*params) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] +- client.real_time_payments_transfers.approve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer +- client.real_time_payments_transfers.cancel(real_time_payments_transfer_id) -> RealTimePaymentsTransfer # InboundRealTimePaymentsTransfers diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index f92206ff3..9e77acc15 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -240,6 +240,94 @@ def list( model=RealTimePaymentsTransfer, ) + def approve( + self, + real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> RealTimePaymentsTransfer: + """ + Approves an Real-Time Payments Transfer in a pending_approval state. + + Args: + real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" + ) + return self._post( + f"/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=RealTimePaymentsTransfer, + ) + + def cancel( + self, + real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> RealTimePaymentsTransfer: + """ + Cancels an Real-Time Payments Transfer in a pending_approval state. + + Args: + real_time_payments_transfer_id: The identifier of the pending Real-Time Payments Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" + ) + return self._post( + f"/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=RealTimePaymentsTransfer, + ) + class AsyncRealTimePaymentsTransfersResource(AsyncAPIResource): @cached_property @@ -459,6 +547,94 @@ def list( model=RealTimePaymentsTransfer, ) + async def approve( + self, + real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> RealTimePaymentsTransfer: + """ + Approves an Real-Time Payments Transfer in a pending_approval state. + + Args: + real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" + ) + return await self._post( + f"/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=RealTimePaymentsTransfer, + ) + + async def cancel( + self, + real_time_payments_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> RealTimePaymentsTransfer: + """ + Cancels an Real-Time Payments Transfer in a pending_approval state. + + Args: + real_time_payments_transfer_id: The identifier of the pending Real-Time Payments Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not real_time_payments_transfer_id: + raise ValueError( + f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" + ) + return await self._post( + f"/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=RealTimePaymentsTransfer, + ) + class RealTimePaymentsTransfersResourceWithRawResponse: def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResource) -> None: @@ -473,6 +649,12 @@ def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResour self.list = to_raw_response_wrapper( real_time_payments_transfers.list, ) + self.approve = to_raw_response_wrapper( + real_time_payments_transfers.approve, + ) + self.cancel = to_raw_response_wrapper( + real_time_payments_transfers.cancel, + ) class AsyncRealTimePaymentsTransfersResourceWithRawResponse: @@ -488,6 +670,12 @@ def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersR self.list = async_to_raw_response_wrapper( real_time_payments_transfers.list, ) + self.approve = async_to_raw_response_wrapper( + real_time_payments_transfers.approve, + ) + self.cancel = async_to_raw_response_wrapper( + real_time_payments_transfers.cancel, + ) class RealTimePaymentsTransfersResourceWithStreamingResponse: @@ -503,6 +691,12 @@ def __init__(self, real_time_payments_transfers: RealTimePaymentsTransfersResour self.list = to_streamed_response_wrapper( real_time_payments_transfers.list, ) + self.approve = to_streamed_response_wrapper( + real_time_payments_transfers.approve, + ) + self.cancel = to_streamed_response_wrapper( + real_time_payments_transfers.cancel, + ) class AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: @@ -518,3 +712,9 @@ def __init__(self, real_time_payments_transfers: AsyncRealTimePaymentsTransfersR self.list = async_to_streamed_response_wrapper( real_time_payments_transfers.list, ) + self.approve = async_to_streamed_response_wrapper( + real_time_payments_transfers.approve, + ) + self.cancel = async_to_streamed_response_wrapper( + real_time_payments_transfers.cancel, + ) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 68f5f75b7..636ed4c4b 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -161,6 +161,86 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_approve(self, client: Increase) -> None: + real_time_payments_transfer = client.real_time_payments_transfers.approve( + "real_time_payments_transfer_id", + ) + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + def test_raw_response_approve(self, client: Increase) -> None: + response = client.real_time_payments_transfers.with_raw_response.approve( + "real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + def test_streaming_response_approve(self, client: Increase) -> None: + with client.real_time_payments_transfers.with_streaming_response.approve( + "real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_approve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" + ): + client.real_time_payments_transfers.with_raw_response.approve( + "", + ) + + @parametrize + def test_method_cancel(self, client: Increase) -> None: + real_time_payments_transfer = client.real_time_payments_transfers.cancel( + "real_time_payments_transfer_id", + ) + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + def test_raw_response_cancel(self, client: Increase) -> None: + response = client.real_time_payments_transfers.with_raw_response.cancel( + "real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + def test_streaming_response_cancel(self, client: Increase) -> None: + with client.real_time_payments_transfers.with_streaming_response.cancel( + "real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_cancel(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" + ): + client.real_time_payments_transfers.with_raw_response.cancel( + "", + ) + class TestAsyncRealTimePaymentsTransfers: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) @@ -304,3 +384,83 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_approve(self, async_client: AsyncIncrease) -> None: + real_time_payments_transfer = await async_client.real_time_payments_transfers.approve( + "real_time_payments_transfer_id", + ) + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: + response = await async_client.real_time_payments_transfers.with_raw_response.approve( + "real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = await response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: + async with async_client.real_time_payments_transfers.with_streaming_response.approve( + "real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = await response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" + ): + await async_client.real_time_payments_transfers.with_raw_response.approve( + "", + ) + + @parametrize + async def test_method_cancel(self, async_client: AsyncIncrease) -> None: + real_time_payments_transfer = await async_client.real_time_payments_transfers.cancel( + "real_time_payments_transfer_id", + ) + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: + response = await async_client.real_time_payments_transfers.with_raw_response.cancel( + "real_time_payments_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + real_time_payments_transfer = await response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: + async with async_client.real_time_payments_transfers.with_streaming_response.cancel( + "real_time_payments_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + real_time_payments_transfer = await response.parse() + assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `real_time_payments_transfer_id` but received ''" + ): + await async_client.real_time_payments_transfers.with_raw_response.cancel( + "", + ) From 465ec097eb2c64c471c7dcaf58a263995a1de2b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Jun 2025 02:51:58 +0000 Subject: [PATCH 0618/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 098de4c09..e6115961d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.247.0" + ".": "0.248.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2840a695e..d951d837c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.247.0" +version = "0.248.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 88b5f51c8..421a3d457 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.247.0" # x-release-please-version +__version__ = "0.248.0" # x-release-please-version From 27b3909afa70a632462c54f241bcce0c48fa9de3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 8 Jun 2025 01:51:16 +0000 Subject: [PATCH 0619/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 16 ++++++++++++++++ .../types/pending_transaction_list_params.py | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 51cb36719..bccf31fb0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-75fe352618195712049f1cde5a80bfab2510a7a1e52f792ab0ca560d9d40a4b9.yml -openapi_spec_hash: c8cc277c248d9527fa442d11ce958132 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0ecd4933d3a1f2e6363dc40b619d296a033732ec245018effd3e5f687f60bb04.yml +openapi_spec_hash: 41f0a23615d13ed80758208130da6abd config_hash: 0c284b69f3dccb22b24877f61d0d8a9a diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 50d3e9b80..009304ddd 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -20,6 +20,7 @@ "SourceCardAuthorizationVerificationCardholderAddress", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", + "SourceGroupInitiatedHold", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceOutboundCardPushTransferInstruction", @@ -501,6 +502,11 @@ class SourceCheckTransferInstruction(BaseModel): """The identifier of the Check Transfer that led to this Pending Transaction.""" +class SourceGroupInitiatedHold(BaseModel): + id: str + """The Group Initiated Hold identifier.""" + + class SourceInboundFundsHold(BaseModel): id: str """The Inbound Funds Hold identifier.""" @@ -641,6 +647,7 @@ class Source(BaseModel): "check_deposit_instruction", "check_transfer_instruction", "inbound_funds_hold", + "group_initiated_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", @@ -665,6 +672,8 @@ class Source(BaseModel): under the `check_transfer_instruction` object. - `inbound_funds_hold` - Inbound Funds Hold: details will be under the `inbound_funds_hold` object. + - `group_initiated_hold` - Group Initiated Hold Source: details will be under + the `group_initiated_hold` object. - `real_time_payments_transfer_instruction` - Real-Time Payments Transfer Instruction: details will be under the `real_time_payments_transfer_instruction` object. @@ -695,6 +704,13 @@ class Source(BaseModel): equal to `check_transfer_instruction`. """ + group_initiated_hold: Optional[SourceGroupInitiatedHold] = None + """A Group Initiated Hold Source object. + + This field will be present in the JSON response if and only if `category` is + equal to `group_initiated_hold`. + """ + inbound_funds_hold: Optional[SourceInboundFundsHold] = None """An Inbound Funds Hold object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 438522f00..2979d4bde 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -45,6 +45,7 @@ class PendingTransactionListParams(TypedDict, total=False): "check_deposit_instruction", "check_transfer_instruction", "inbound_funds_hold", + "group_initiated_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", From b17ddde32ffe602bec72a41a37be8552955337a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Jun 2025 02:52:25 +0000 Subject: [PATCH 0620/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6115961d..7d0480c96 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.248.0" + ".": "0.249.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d951d837c..e64a060a7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.248.0" +version = "0.249.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 421a3d457..9fea6c936 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.248.0" # x-release-please-version +__version__ = "0.249.0" # x-release-please-version From 82349cd18588725a5cb070d8239e4af49c178ccf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:26:28 +0000 Subject: [PATCH 0621/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 2 + .../resources/pending_transactions.py | 244 +++++++++++++++++- src/increase/types/__init__.py | 1 + src/increase/types/pending_transaction.py | 27 +- .../pending_transaction_create_params.py | 22 ++ .../types/pending_transaction_list_params.py | 2 +- .../test_pending_transactions.py | 166 ++++++++++++ 8 files changed, 449 insertions(+), 23 deletions(-) create mode 100644 src/increase/types/pending_transaction_create_params.py diff --git a/.stats.yml b/.stats.yml index bccf31fb0..a78c7eb65 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 199 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0ecd4933d3a1f2e6363dc40b619d296a033732ec245018effd3e5f687f60bb04.yml -openapi_spec_hash: 41f0a23615d13ed80758208130da6abd -config_hash: 0c284b69f3dccb22b24877f61d0d8a9a +configured_endpoints: 201 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-101cab80ae65141fb306c316367abab195616ae8f2ce61d87e0d66e3caa4ef2f.yml +openapi_spec_hash: 9338ab9453d1a0f426e9998e574bff67 +config_hash: 97774f946585cecb19181a1817870d0b diff --git a/api.md b/api.md index c5d928724..eadc8e228 100644 --- a/api.md +++ b/api.md @@ -169,8 +169,10 @@ from increase.types import PendingTransaction Methods: +- client.pending_transactions.create(\*\*params) -> PendingTransaction - client.pending_transactions.retrieve(pending_transaction_id) -> PendingTransaction - client.pending_transactions.list(\*\*params) -> SyncPage[PendingTransaction] +- client.pending_transactions.release(pending_transaction_id) -> PendingTransaction # DeclinedTransactions diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index e15e4a663..e431de9ce 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -4,9 +4,9 @@ import httpx -from ..types import pending_transaction_list_params +from ..types import pending_transaction_list_params, pending_transaction_create_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -42,6 +42,66 @@ def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingRes """ return PendingTransactionsResourceWithStreamingResponse(self) + def create( + self, + *, + account_id: str, + amount: int, + description: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PendingTransaction: + """Creates a pending transaction on an account. + + This can be useful to hold funds + for an external payment or known future transaction outside of Increase. The + resulting Pending Transaction will have a `category` of `user_initiated_hold` + and can be released via the API to unlock the held funds. + + Args: + account_id: The Account to place the hold on. + + amount: The amount to hold in the minor unit of the account's currency. For dollars, for + example, this is cents. This should be a negative amount - to hold $1.00 from + the account, you would pass -100. + + description: The description you choose to give the hold. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/pending_transactions", + body=maybe_transform( + { + "account_id": account_id, + "amount": amount, + "description": description, + }, + pending_transaction_create_params.PendingTransactionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PendingTransaction, + ) + def retrieve( self, pending_transaction_id: str, @@ -141,6 +201,54 @@ def list( model=PendingTransaction, ) + def release( + self, + pending_transaction_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PendingTransaction: + """Release a Pending Transaction you had previously created. + + The Pending + Transaction must have a `category` of `user_initiated_hold` and a `status` of + `pending`. This will unlock the held funds and mark the Pending Transaction as + complete. + + Args: + pending_transaction_id: The identifier of the Pending Transaction to release. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not pending_transaction_id: + raise ValueError( + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" + ) + return self._post( + f"/pending_transactions/{pending_transaction_id}/release", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PendingTransaction, + ) + class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property @@ -162,6 +270,66 @@ def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreami """ return AsyncPendingTransactionsResourceWithStreamingResponse(self) + async def create( + self, + *, + account_id: str, + amount: int, + description: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PendingTransaction: + """Creates a pending transaction on an account. + + This can be useful to hold funds + for an external payment or known future transaction outside of Increase. The + resulting Pending Transaction will have a `category` of `user_initiated_hold` + and can be released via the API to unlock the held funds. + + Args: + account_id: The Account to place the hold on. + + amount: The amount to hold in the minor unit of the account's currency. For dollars, for + example, this is cents. This should be a negative amount - to hold $1.00 from + the account, you would pass -100. + + description: The description you choose to give the hold. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/pending_transactions", + body=await async_maybe_transform( + { + "account_id": account_id, + "amount": amount, + "description": description, + }, + pending_transaction_create_params.PendingTransactionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PendingTransaction, + ) + async def retrieve( self, pending_transaction_id: str, @@ -261,50 +429,122 @@ def list( model=PendingTransaction, ) + async def release( + self, + pending_transaction_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> PendingTransaction: + """Release a Pending Transaction you had previously created. + + The Pending + Transaction must have a `category` of `user_initiated_hold` and a `status` of + `pending`. This will unlock the held funds and mark the Pending Transaction as + complete. + + Args: + pending_transaction_id: The identifier of the Pending Transaction to release. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not pending_transaction_id: + raise ValueError( + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" + ) + return await self._post( + f"/pending_transactions/{pending_transaction_id}/release", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PendingTransaction, + ) + class PendingTransactionsResourceWithRawResponse: def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions + self.create = to_raw_response_wrapper( + pending_transactions.create, + ) self.retrieve = to_raw_response_wrapper( pending_transactions.retrieve, ) self.list = to_raw_response_wrapper( pending_transactions.list, ) + self.release = to_raw_response_wrapper( + pending_transactions.release, + ) class AsyncPendingTransactionsResourceWithRawResponse: def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions + self.create = async_to_raw_response_wrapper( + pending_transactions.create, + ) self.retrieve = async_to_raw_response_wrapper( pending_transactions.retrieve, ) self.list = async_to_raw_response_wrapper( pending_transactions.list, ) + self.release = async_to_raw_response_wrapper( + pending_transactions.release, + ) class PendingTransactionsResourceWithStreamingResponse: def __init__(self, pending_transactions: PendingTransactionsResource) -> None: self._pending_transactions = pending_transactions + self.create = to_streamed_response_wrapper( + pending_transactions.create, + ) self.retrieve = to_streamed_response_wrapper( pending_transactions.retrieve, ) self.list = to_streamed_response_wrapper( pending_transactions.list, ) + self.release = to_streamed_response_wrapper( + pending_transactions.release, + ) class AsyncPendingTransactionsResourceWithStreamingResponse: def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: self._pending_transactions = pending_transactions + self.create = async_to_streamed_response_wrapper( + pending_transactions.create, + ) self.retrieve = async_to_streamed_response_wrapper( pending_transactions.retrieve, ) self.list = async_to_streamed_response_wrapper( pending_transactions.list, ) + self.release = async_to_streamed_response_wrapper( + pending_transactions.release, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 6b67834ca..82f6cda1a 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -128,6 +128,7 @@ from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams +from .pending_transaction_create_params import PendingTransactionCreateParams as PendingTransactionCreateParams from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 009304ddd..1e1bd94c6 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -20,7 +20,6 @@ "SourceCardAuthorizationVerificationCardholderAddress", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", - "SourceGroupInitiatedHold", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceOutboundCardPushTransferInstruction", @@ -502,11 +501,6 @@ class SourceCheckTransferInstruction(BaseModel): """The identifier of the Check Transfer that led to this Pending Transaction.""" -class SourceGroupInitiatedHold(BaseModel): - id: str - """The Group Initiated Hold identifier.""" - - class SourceInboundFundsHold(BaseModel): id: str """The Inbound Funds Hold identifier.""" @@ -647,7 +641,7 @@ class Source(BaseModel): "check_deposit_instruction", "check_transfer_instruction", "inbound_funds_hold", - "group_initiated_hold", + "user_initiated_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", @@ -672,8 +666,8 @@ class Source(BaseModel): under the `check_transfer_instruction` object. - `inbound_funds_hold` - Inbound Funds Hold: details will be under the `inbound_funds_hold` object. - - `group_initiated_hold` - Group Initiated Hold Source: details will be under - the `group_initiated_hold` object. + - `user_initiated_hold` - User Initiated Hold: details will be under the + `user_initiated_hold` object. - `real_time_payments_transfer_instruction` - Real-Time Payments Transfer Instruction: details will be under the `real_time_payments_transfer_instruction` object. @@ -704,13 +698,6 @@ class Source(BaseModel): equal to `check_transfer_instruction`. """ - group_initiated_hold: Optional[SourceGroupInitiatedHold] = None - """A Group Initiated Hold Source object. - - This field will be present in the JSON response if and only if `category` is - equal to `group_initiated_hold`. - """ - inbound_funds_hold: Optional[SourceInboundFundsHold] = None """An Inbound Funds Hold object. @@ -756,6 +743,14 @@ class Source(BaseModel): equal to `swift_transfer_instruction`. """ + user_initiated_hold: Optional[object] = None + """An User Initiated Hold object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_initiated_hold`. Created when a user initiates a hold on funds in + their account. + """ + wire_transfer_instruction: Optional[SourceWireTransferInstruction] = None """A Wire Transfer Instruction object. diff --git a/src/increase/types/pending_transaction_create_params.py b/src/increase/types/pending_transaction_create_params.py new file mode 100644 index 000000000..3d3f2f798 --- /dev/null +++ b/src/increase/types/pending_transaction_create_params.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["PendingTransactionCreateParams"] + + +class PendingTransactionCreateParams(TypedDict, total=False): + account_id: Required[str] + """The Account to place the hold on.""" + + amount: Required[int] + """The amount to hold in the minor unit of the account's currency. + + For dollars, for example, this is cents. This should be a negative amount - to + hold $1.00 from the account, you would pass -100. + """ + + description: str + """The description you choose to give the hold.""" diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 2979d4bde..8cec9832d 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -45,7 +45,7 @@ class PendingTransactionListParams(TypedDict, total=False): "check_deposit_instruction", "check_transfer_instruction", "inbound_funds_hold", - "group_initiated_hold", + "user_initiated_hold", "real_time_payments_transfer_instruction", "wire_transfer_instruction", "inbound_wire_transfer_reversal", diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 7130bf502..11a7b8a06 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -19,6 +19,49 @@ class TestPendingTransactions: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Increase) -> None: + pending_transaction = client.pending_transactions.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + pending_transaction = client.pending_transactions.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + description="Hold for pending transaction", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.pending_transactions.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.pending_transactions.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_retrieve(self, client: Increase) -> None: pending_transaction = client.pending_transactions.retrieve( @@ -102,10 +145,93 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_release(self, client: Increase) -> None: + pending_transaction = client.pending_transactions.release( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_raw_response_release(self, client: Increase) -> None: + response = client.pending_transactions.with_raw_response.release( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_streaming_response_release(self, client: Increase) -> None: + with client.pending_transactions.with_streaming_response.release( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_release(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + client.pending_transactions.with_raw_response.release( + "", + ) + class TestAsyncPendingTransactions: parametrize = pytest.mark.parametrize("async_client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + pending_transaction = await async_client.pending_transactions.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + pending_transaction = await async_client.pending_transactions.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + description="Hold for pending transaction", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.pending_transactions.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.pending_transactions.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=-1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.retrieve( @@ -188,3 +314,43 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_release(self, async_client: AsyncIncrease) -> None: + pending_transaction = await async_client.pending_transactions.release( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: + response = await async_client.pending_transactions.with_raw_response.release( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_streaming_response_release(self, async_client: AsyncIncrease) -> None: + async with async_client.pending_transactions.with_streaming_response.release( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_release(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + await async_client.pending_transactions.with_raw_response.release( + "", + ) From c8caee07273953724a9918aee8d623d9e9284876 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Jun 2025 22:27:35 +0000 Subject: [PATCH 0622/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7d0480c96..e6cb33b1e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.249.0" + ".": "0.250.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e64a060a7..049d24718 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.249.0" +version = "0.250.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9fea6c936..331b94da9 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.249.0" # x-release-please-version +__version__ = "0.250.0" # x-release-please-version From e488e68436fc1dfe5dd84abd69ddf1412315153a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 03:51:03 +0000 Subject: [PATCH 0623/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a78c7eb65..c20d72427 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-101cab80ae65141fb306c316367abab195616ae8f2ce61d87e0d66e3caa4ef2f.yml -openapi_spec_hash: 9338ab9453d1a0f426e9998e574bff67 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c62370ab61731722fddc5be1652ccfd9188ae052be44fae639b4a7920afc3b3.yml +openapi_spec_hash: aefdd344388757e80e1fea0ad0506be8 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 1e1bd94c6..c7ab2546d 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -772,6 +772,17 @@ class PendingTransaction(BaseModel): For dollars, for example, this is cents. """ + balance_impact: Literal["affects_available_balance", "none"] + """ + How the Pending Transaction affects the balance of its Account while its status + is `pending`. + + - `affects_available_balance` - This Pending Transaction will decrement the + available balance on the Account while its status is `pending`. + - `none` - This Pending Transaction does not affect the available balance on the + Account. + """ + completed_at: Optional[datetime] = None """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending From 578697ed0b2bfddb532b790cde20c5accb233d3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 03:52:09 +0000 Subject: [PATCH 0624/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6cb33b1e..a97e60e5e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.250.0" + ".": "0.251.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 049d24718..8043c17d2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.250.0" +version = "0.251.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 331b94da9..ebeaa6b5f 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.250.0" # x-release-please-version +__version__ = "0.251.0" # x-release-please-version From 953f46d3659ea858b4c1a4fee2ba9748ba814d61 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 10:28:05 +0000 Subject: [PATCH 0625/1325] chore(tests): run tests in parallel --- pyproject.toml | 3 ++- requirements-dev.lock | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8043c17d2..58ebf51cc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,6 +54,7 @@ dev-dependencies = [ "importlib-metadata>=6.7.0", "rich>=13.7.1", "nest_asyncio==1.6.0", + "pytest-xdist>=3.6.1", ] [tool.rye.scripts] @@ -125,7 +126,7 @@ replacement = '[\1](https://github.com/Increase/increase-python/tree/main/\g<2>) [tool.pytest.ini_options] testpaths = ["tests"] -addopts = "--tb=short" +addopts = "--tb=short -n auto" xfail_strict = true asyncio_mode = "auto" asyncio_default_fixture_loop_scope = "session" diff --git a/requirements-dev.lock b/requirements-dev.lock index 888216022..fbb27d18c 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -30,6 +30,8 @@ distro==1.8.0 exceptiongroup==1.2.2 # via anyio # via pytest +execnet==2.1.1 + # via pytest-xdist filelock==3.12.4 # via virtualenv h11==0.14.0 @@ -72,7 +74,9 @@ pygments==2.18.0 pyright==1.1.399 pytest==8.3.3 # via pytest-asyncio + # via pytest-xdist pytest-asyncio==0.24.0 +pytest-xdist==3.7.0 python-dateutil==2.8.2 # via time-machine pytz==2023.3.post1 From 516e3952a53a4de075e8b18a34ee550c66afa3a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 16:43:23 +0000 Subject: [PATCH 0626/1325] fix(client): correctly parse binary response | stream --- src/increase/_base_client.py | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index e9896b7e7..1e3ed6ac2 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1071,7 +1071,14 @@ def _process_response( ) -> ResponseT: origin = get_origin(cast_to) or cast_to - if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): + if ( + inspect.isclass(origin) + and issubclass(origin, BaseAPIResponse) + # we only want to actually return the custom BaseAPIResponse class if we're + # returning the raw response, or if we're not streaming SSE, as if we're streaming + # SSE then `cast_to` doesn't actively reflect the type we need to parse into + and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER))) + ): if not issubclass(origin, APIResponse): raise TypeError(f"API Response types must subclass {APIResponse}; Received {origin}") @@ -1574,7 +1581,14 @@ async def _process_response( ) -> ResponseT: origin = get_origin(cast_to) or cast_to - if inspect.isclass(origin) and issubclass(origin, BaseAPIResponse): + if ( + inspect.isclass(origin) + and issubclass(origin, BaseAPIResponse) + # we only want to actually return the custom BaseAPIResponse class if we're + # returning the raw response, or if we're not streaming SSE, as if we're streaming + # SSE then `cast_to` doesn't actively reflect the type we need to parse into + and (not stream or bool(response.request.headers.get(RAW_RESPONSE_HEADER))) + ): if not issubclass(origin, AsyncAPIResponse): raise TypeError(f"API Response types must subclass {AsyncAPIResponse}; Received {origin}") From 66cff973f9c766b1e15fa1da34c8b68aae126e57 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Jun 2025 16:44:25 +0000 Subject: [PATCH 0627/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a97e60e5e..85234f042 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.251.0" + ".": "0.251.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 58ebf51cc..24d611201 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.251.0" +version = "0.251.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ebeaa6b5f..990d7148e 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.251.0" # x-release-please-version +__version__ = "0.251.1" # x-release-please-version From b4282738f8925844228f7843ab3434971c13feb8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 03:29:42 +0000 Subject: [PATCH 0628/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/physical_cards.py | 12 ++++++++++-- src/increase/types/physical_card.py | 6 +++++- .../physical_card_advance_shipment_params.py | 6 +++++- 4 files changed, 22 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index c20d72427..8987be955 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-2c62370ab61731722fddc5be1652ccfd9188ae052be44fae639b4a7920afc3b3.yml -openapi_spec_hash: aefdd344388757e80e1fea0ad0506be8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-28729916b00389bc7694a721eac0688ab5405bbc29b7df60708d6abaabd89c29.yml +openapi_spec_hash: e28396bf17aa29a4454a73b2e21ba852 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 9dc12bce6..6a8cd98cd 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -49,7 +49,9 @@ def advance_shipment( self, physical_card_id: str, *, - shipment_status: Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"], + shipment_status: Literal[ + "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" + ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -79,6 +81,8 @@ def advance_shipment( - `shipped` - The physical card has been shipped. - `returned` - The physical card shipment was returned to the sender and destroyed by the production facility. + - `requires_attention` - The physical card shipment requires attention from + Increase before progressing. extra_headers: Send extra headers @@ -208,7 +212,9 @@ async def advance_shipment( self, physical_card_id: str, *, - shipment_status: Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"], + shipment_status: Literal[ + "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" + ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -238,6 +244,8 @@ async def advance_shipment( - `shipped` - The physical card has been shipped. - `returned` - The physical card shipment was returned to the sender and destroyed by the production facility. + - `requires_attention` - The physical card shipment requires attention from + Increase before progressing. extra_headers: Send extra headers diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 4bf29fcdc..f7cde2203 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -106,7 +106,9 @@ class Shipment(BaseModel): - `fedex_2_day` - FedEx 2-day. """ - status: Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"] + status: Literal[ + "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" + ] """The status of this shipment. - `pending` - The physical card has not yet been shipped. @@ -120,6 +122,8 @@ class Shipment(BaseModel): - `shipped` - The physical card has been shipped. - `returned` - The physical card shipment was returned to the sender and destroyed by the production facility. + - `requires_attention` - The physical card shipment requires attention from + Increase before progressing. """ tracking: Optional[ShipmentTracking] = None diff --git a/src/increase/types/simulations/physical_card_advance_shipment_params.py b/src/increase/types/simulations/physical_card_advance_shipment_params.py index 8d3d45e5f..25c75bb80 100644 --- a/src/increase/types/simulations/physical_card_advance_shipment_params.py +++ b/src/increase/types/simulations/physical_card_advance_shipment_params.py @@ -9,7 +9,9 @@ class PhysicalCardAdvanceShipmentParams(TypedDict, total=False): shipment_status: Required[ - Literal["pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned"] + Literal[ + "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" + ] ] """The shipment status to move the Physical Card to. @@ -24,4 +26,6 @@ class PhysicalCardAdvanceShipmentParams(TypedDict, total=False): - `shipped` - The physical card has been shipped. - `returned` - The physical card shipment was returned to the sender and destroyed by the production facility. + - `requires_attention` - The physical card shipment requires attention from + Increase before progressing. """ From 7a62a2aef4c9e6d6003669b735e5c34ed75b734b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Jun 2025 03:30:45 +0000 Subject: [PATCH 0629/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 85234f042..b5ea4de57 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.251.1" + ".": "0.252.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 24d611201..52c017dd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.251.1" +version = "0.252.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 990d7148e..aa591b4c1 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.251.1" # x-release-please-version +__version__ = "0.252.0" # x-release-please-version From c24fecab781916dfdf76ce83ac3e6a3cccd51a67 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 14:18:03 +0000 Subject: [PATCH 0630/1325] chore(tests): add tests for httpx client instantiation & proxies --- tests/test_client.py | 46 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index b44f788b5..bb3bc5775 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -31,6 +31,8 @@ DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, + DefaultHttpxClient, + DefaultAsyncHttpxClient, make_request_options, ) from increase.types.account_create_params import AccountCreateParams @@ -883,6 +885,28 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" + def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: + # Test that the proxy environment variables are set correctly + monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + + client = DefaultHttpxClient() + + mounts = tuple(client._mounts.items()) + assert len(mounts) == 1 + assert mounts[0][0].pattern == "https://" + + @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") + def test_default_client_creation(self) -> None: + # Ensure that the client can be initialized without any exceptions + DefaultHttpxClient( + verify=True, + cert=None, + trust_env=True, + http1=True, + http2=False, + limits=httpx.Limits(max_connections=100, max_keepalive_connections=20), + ) + @pytest.mark.respx(base_url=base_url) def test_follow_redirects(self, respx_mock: MockRouter) -> None: # Test that the default follow_redirects=True allows following redirects @@ -1799,6 +1823,28 @@ async def test_main() -> None: time.sleep(0.1) + async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: + # Test that the proxy environment variables are set correctly + monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + + client = DefaultAsyncHttpxClient() + + mounts = tuple(client._mounts.items()) + assert len(mounts) == 1 + assert mounts[0][0].pattern == "https://" + + @pytest.mark.filterwarnings("ignore:.*deprecated.*:DeprecationWarning") + async def test_default_client_creation(self) -> None: + # Ensure that the client can be initialized without any exceptions + DefaultAsyncHttpxClient( + verify=True, + cert=None, + trust_env=True, + http1=True, + http2=False, + limits=httpx.Limits(max_connections=100, max_keepalive_connections=20), + ) + @pytest.mark.respx(base_url=base_url) async def test_follow_redirects(self, respx_mock: MockRouter) -> None: # Test that the default follow_redirects=True allows following redirects From dc64bcba9b42dd82dc8fb93bbdc3a8c7e4ce67a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:53:56 +0000 Subject: [PATCH 0631/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b5ea4de57..972c11e34 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.252.0" + ".": "0.252.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 52c017dd7..6eb3a9c39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.252.0" +version = "0.252.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index aa591b4c1..9629d18cb 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.0" # x-release-please-version +__version__ = "0.252.1" # x-release-please-version From ae786e7c10214fa5ef762efbbace91e9d0a26729 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 16:54:45 +0000 Subject: [PATCH 0632/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8987be955..9417f9412 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-ec09866b27548ccd02de1307a9444b383128950ae3e9b6d7f9664a0681807603.yml +openapi_spec_hash: f420ad94cfcf2d7b9409d4a84734a497 config_hash: 97774f946585cecb19181a1817870d0b From 3a9fb04c7b2b02e0e1ec3b78a335fe79e655074f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 18:57:21 +0000 Subject: [PATCH 0633/1325] chore(internal): update conftest.py --- tests/conftest.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index f60bfe24a..060f5dda0 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + from __future__ import annotations import os From e508ca48f4e42753b1c13c50818a208ab101e710 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:44:42 +0000 Subject: [PATCH 0634/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9417f9412..43af81d37 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-ec09866b27548ccd02de1307a9444b383128950ae3e9b6d7f9664a0681807603.yml -openapi_spec_hash: f420ad94cfcf2d7b9409d4a84734a497 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0a7a38daa75e8f8cfceaa02d9d184fef11de6d4ebdd0d3d703d50a0a425f8979.yml +openapi_spec_hash: f0e1b6278b338a2b3b4334f78cb16095 config_hash: 97774f946585cecb19181a1817870d0b From c2a6e2e9108b33ef71f8dcaa491b993538c988d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Jun 2025 22:59:25 +0000 Subject: [PATCH 0635/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/event_subscriptions.py | 52 +++++++++++++------ src/increase/types/card_payment.py | 14 ++--- src/increase/types/event.py | 26 +++++++--- src/increase/types/event_list_params.py | 4 ++ src/increase/types/event_subscription.py | 26 +++++++--- .../types/event_subscription_create_params.py | 26 +++++++--- src/increase/types/pending_transaction.py | 42 +++++++-------- .../types/pending_transaction_list_params.py | 2 +- src/increase/types/transaction.py | 43 ++++++++------- src/increase/types/transaction_list_params.py | 2 +- 11 files changed, 145 insertions(+), 96 deletions(-) diff --git a/.stats.yml b/.stats.yml index 43af81d37..c6a42f6e5 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-0a7a38daa75e8f8cfceaa02d9d184fef11de6d4ebdd0d3d703d50a0a425f8979.yml -openapi_spec_hash: f0e1b6278b338a2b3b4334f78cb16095 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cf3fe2ba9c3b27c841d2680acc7153e4e77376cf4627686305e0e3316a749595.yml +openapi_spec_hash: 2f4e50063759a64c2ee4fa2c2346acf4 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 07478fb93..dbf3aac79 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", @@ -254,14 +258,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 @@ -579,6 +589,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", @@ -715,14 +729,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 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/event.py b/src/increase/types/event.py index 24602d055..1228f25e0 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", @@ -206,14 +210,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 diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 029e9a030..1c276cdcd 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", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index c9111d8c4..4715af84f 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", @@ -219,14 +223,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 diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index c625307ac..1f53ada5c 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", @@ -204,14 +208,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 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", ] ], From f6582666fa922688326994f4111783bc666171d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 00:09:14 +0000 Subject: [PATCH 0636/1325] chore(ci): enable for pull requests --- .github/workflows/ci.yml | 4 ++++ 1 file changed, 4 insertions(+) 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: From 26e491945acce5cff9906779b410c7ba7232a6c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:31:42 +0000 Subject: [PATCH 0637/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c6a42f6e5..8d74fb122 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-cf3fe2ba9c3b27c841d2680acc7153e4e77376cf4627686305e0e3316a749595.yml -openapi_spec_hash: 2f4e50063759a64c2ee4fa2c2346acf4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8fa8b313edec69eb17149f293bc69616490adb3ccb07376b22f1f1b555b800c7.yml +openapi_spec_hash: 0c078eeca22e12fa282d4aa4f638a843 config_hash: 97774f946585cecb19181a1817870d0b From cfe71dd18ecbfd42b525013db5fe3296cf67c59a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 14:51:35 +0000 Subject: [PATCH 0638/1325] chore(readme): update badges --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 8c5d77529..5ddf66db4 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, From d7293db0492c8644c90e11c16cc47046351e7933 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 21:10:20 +0000 Subject: [PATCH 0639/1325] fix(tests): fix: tests which call HTTP endpoints directly with the example parameters --- tests/test_client.py | 85 +++++++------------------------------------- 1 file changed, 12 insertions(+), 73 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index bb3bc5775..c792dc38a 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 @@ -756,52 +753,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]) @@ -1646,52 +1612,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]) From f8f3cc5684740fc2bb7bda02edff64807266713b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Jun 2025 21:56:39 +0000 Subject: [PATCH 0640/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_mail_item.py | 18 ++++++++++++++++-- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8d74fb122..4fe0c2945 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-8fa8b313edec69eb17149f293bc69616490adb3ccb07376b22f1f1b555b800c7.yml -openapi_spec_hash: 0c078eeca22e12fa282d4aa4f638a843 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3b0c9217a75af2d86d38e83c81301c1e3997b9827ab88600152dfc6359605798.yml +openapi_spec_hash: 9ae9741413c5b6d5cbca0e6935a76b57 config_hash: 97774f946585cecb19181a1817870d0b 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 From 4f9d6b8d925847a880b8bf3dbbad2d5830bf4684 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 12:39:54 +0000 Subject: [PATCH 0641/1325] docs(client): fix httpx.Timeout documentation reference --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 5ddf66db4..5f5e8f201 100644 --- a/README.md +++ b/README.md @@ -235,7 +235,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 From dc3c765424d7e2dae2df9dff6af4aa393f8e674d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:57:40 +0000 Subject: [PATCH 0642/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 13 +++++++++++++ src/increase/types/check_transfer_create_params.py | 14 ++++++++++++++ tests/api_resources/test_check_transfers.py | 2 ++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4fe0c2945..8698c74be 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-3b0c9217a75af2d86d38e83c81301c1e3997b9827ab88600152dfc6359605798.yml -openapi_spec_hash: 9ae9741413c5b6d5cbca0e6935a76b57 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-306cbeb685cc68137e43f11068e3ac941bc6ae00518079dbbd4ae4ab8afaf2a0.yml +openapi_spec_hash: 37c942aa611a138df9aa9e0bc7166d38 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 3e97d2bae..e9efc5c33 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -17,6 +17,7 @@ "Mailing", "PhysicalCheck", "PhysicalCheckMailingAddress", + "PhysicalCheckPayee", "PhysicalCheckReturnAddress", "PhysicalCheckTrackingUpdate", "StopPaymentRequest", @@ -127,6 +128,11 @@ class PhysicalCheckMailingAddress(BaseModel): """The state of the check's destination.""" +class PhysicalCheckPayee(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.""" + payee: List[PhysicalCheckPayee] + """The payee 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..359e962f9 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", + "PhysicalCheckPayee", "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 PhysicalCheckPayee(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,13 @@ class PhysicalCheck(TypedDict, total=False): note: str """The descriptor that will be printed on the letter included with the check.""" + payee: Iterable[PhysicalCheckPayee] + """The payee of the check. + + This will be printed on the top-left portion of the check and defaults to the + return address if unspecified. + """ + return_address: PhysicalCheckReturnAddress """The return address to be printed on the check. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 4df220a95..ad16d1dd8 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", + "payee": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", @@ -333,6 +334,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", + "payee": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", From e8c81db7df073e25bce33a25d75915a9760fe567 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:16:34 +0000 Subject: [PATCH 0643/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer_create_params.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8698c74be..8da2724ca 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-306cbeb685cc68137e43f11068e3ac941bc6ae00518079dbbd4ae4ab8afaf2a0.yml -openapi_spec_hash: 37c942aa611a138df9aa9e0bc7166d38 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ecd35ffed09db6db8c319d56963438390d85e74974779c878dbc833859d29ab2.yml +openapi_spec_hash: 0bf2f8b692445ed24574840e2fd6daaf config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 359e962f9..a8125fdeb 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -130,7 +130,8 @@ class PhysicalCheck(TypedDict, total=False): """The payee of the check. This will be printed on the top-left portion of the check and defaults to the - return address if unspecified. + return address if unspecified. This should be an array of up to 4 elements, each + of which represents a line of the payee. """ return_address: PhysicalCheckReturnAddress From 75dbebcb61ee0631c41a4d1fdafaadfe450530b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Jun 2025 22:35:34 +0000 Subject: [PATCH 0644/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 8 ++++---- src/increase/types/check_transfer_create_params.py | 12 ++++++------ tests/api_resources/test_check_transfers.py | 4 ++-- 4 files changed, 14 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8da2724ca..2c45b1747 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-ecd35ffed09db6db8c319d56963438390d85e74974779c878dbc833859d29ab2.yml -openapi_spec_hash: 0bf2f8b692445ed24574840e2fd6daaf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6460f62f1b66c372e7c68ac8410cff47009fd4aca268f8ec9da23493d039b33.yml +openapi_spec_hash: d4f52d6b9b0b42659973c372968eb501 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index e9efc5c33..a93c151e3 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -17,7 +17,7 @@ "Mailing", "PhysicalCheck", "PhysicalCheckMailingAddress", - "PhysicalCheckPayee", + "PhysicalCheckPayer", "PhysicalCheckReturnAddress", "PhysicalCheckTrackingUpdate", "StopPaymentRequest", @@ -128,7 +128,7 @@ class PhysicalCheckMailingAddress(BaseModel): """The state of the check's destination.""" -class PhysicalCheckPayee(BaseModel): +class PhysicalCheckPayer(BaseModel): contents: str """The contents of the line.""" @@ -186,8 +186,8 @@ class PhysicalCheck(BaseModel): note: Optional[str] = None """The descriptor that will be printed on the letter included with the check.""" - payee: List[PhysicalCheckPayee] - """The payee of 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. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index a8125fdeb..4c66f65b6 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -9,7 +9,7 @@ "CheckTransferCreateParams", "PhysicalCheck", "PhysicalCheckMailingAddress", - "PhysicalCheckPayee", + "PhysicalCheckPayer", "PhysicalCheckReturnAddress", "ThirdParty", ] @@ -80,7 +80,7 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): """The second line of the address component of the check's destination address.""" -class PhysicalCheckPayee(TypedDict, total=False): +class PhysicalCheckPayer(TypedDict, total=False): contents: Required[str] """The contents of the line.""" @@ -126,12 +126,12 @@ class PhysicalCheck(TypedDict, total=False): note: str """The descriptor that will be printed on the letter included with the check.""" - payee: Iterable[PhysicalCheckPayee] - """The payee of 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 payee. + of which represents a line of the payer. """ return_address: PhysicalCheckReturnAddress @@ -163,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/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index ad16d1dd8..1b29ffb02 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -51,7 +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", - "payee": [{"contents": "x"}], + "payer": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", @@ -334,7 +334,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", - "payee": [{"contents": "x"}], + "payer": [{"contents": "x"}], "return_address": { "city": "x", "line1": "x", From eb17b425812c94397dc60d24c2435a2179caf6d2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Jun 2025 19:04:48 +0000 Subject: [PATCH 0645/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 8 ++++++++ src/increase/types/event.py | 4 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 4 ++++ src/increase/types/event_subscription_create_params.py | 4 ++++ 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2c45b1747..d0e5b0a91 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-b6460f62f1b66c372e7c68ac8410cff47009fd4aca268f8ec9da23493d039b33.yml -openapi_spec_hash: d4f52d6b9b0b42659973c372968eb501 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0a5e8f74bd6cea9f1b4874a3b30ffbeb2f04c0dd03794426126fc41dd96218e0.yml +openapi_spec_hash: 2c6ba02c1cdaad0dc6f2dd7d82148f17 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index dbf3aac79..d3c66fb73 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -139,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", @@ -306,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. @@ -610,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", @@ -777,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/event.py b/src/increase/types/event.py index 1228f25e0..53e290081 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -108,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", @@ -258,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 1c276cdcd..1aa2d6f7e 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -123,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 4715af84f..f0c6da4d2 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -121,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", @@ -271,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 1f53ada5c..a7a47e161 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -107,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", @@ -256,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. From b86405d2544d497eaf68f3cf783dd3e6f867c323 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Jun 2025 18:00:32 +0000 Subject: [PATCH 0646/1325] feat(client): add support for aiohttp --- README.md | 36 ++++++++++++++++ pyproject.toml | 2 + requirements-dev.lock | 27 ++++++++++++ requirements.lock | 27 ++++++++++++ src/increase/__init__.py | 3 +- src/increase/_base_client.py | 22 ++++++++++ .../simulations/test_account_statements.py | 4 +- .../simulations/test_account_transfers.py | 4 +- .../simulations/test_ach_transfers.py | 4 +- .../test_card_authorization_expirations.py | 4 +- .../simulations/test_card_authorizations.py | 4 +- .../simulations/test_card_disputes.py | 4 +- .../test_card_fuel_confirmations.py | 4 +- .../simulations/test_card_increments.py | 4 +- .../simulations/test_card_refunds.py | 4 +- .../simulations/test_card_reversals.py | 4 +- .../simulations/test_card_settlements.py | 4 +- .../simulations/test_check_deposits.py | 4 +- .../simulations/test_check_transfers.py | 4 +- .../test_digital_wallet_token_requests.py | 4 +- .../simulations/test_documents.py | 4 +- .../simulations/test_inbound_ach_transfers.py | 4 +- .../test_inbound_check_deposits.py | 4 +- .../simulations/test_inbound_funds_holds.py | 4 +- .../simulations/test_inbound_mail_items.py | 4 +- ...st_inbound_real_time_payments_transfers.py | 4 +- .../test_inbound_wire_drawdown_requests.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- .../simulations/test_interest_payments.py | 4 +- .../simulations/test_physical_cards.py | 4 +- .../simulations/test_programs.py | 4 +- .../test_real_time_payments_transfers.py | 4 +- .../simulations/test_wire_transfers.py | 4 +- tests/api_resources/test_account_numbers.py | 4 +- .../api_resources/test_account_statements.py | 4 +- tests/api_resources/test_account_transfers.py | 4 +- tests/api_resources/test_accounts.py | 4 +- .../test_ach_prenotifications.py | 4 +- tests/api_resources/test_ach_transfers.py | 4 +- .../test_bookkeeping_accounts.py | 4 +- .../api_resources/test_bookkeeping_entries.py | 4 +- .../test_bookkeeping_entry_sets.py | 4 +- tests/api_resources/test_card_disputes.py | 4 +- tests/api_resources/test_card_payments.py | 4 +- .../test_card_purchase_supplements.py | 4 +- tests/api_resources/test_cards.py | 4 +- tests/api_resources/test_check_deposits.py | 4 +- tests/api_resources/test_check_transfers.py | 4 +- .../test_declined_transactions.py | 4 +- .../test_digital_card_profiles.py | 4 +- .../test_digital_wallet_tokens.py | 4 +- tests/api_resources/test_documents.py | 4 +- tests/api_resources/test_entities.py | 4 +- .../api_resources/test_event_subscriptions.py | 4 +- tests/api_resources/test_events.py | 4 +- tests/api_resources/test_exports.py | 4 +- tests/api_resources/test_external_accounts.py | 4 +- tests/api_resources/test_file_links.py | 4 +- tests/api_resources/test_files.py | 4 +- tests/api_resources/test_groups.py | 4 +- .../test_inbound_ach_transfers.py | 4 +- .../test_inbound_check_deposits.py | 4 +- .../api_resources/test_inbound_mail_items.py | 4 +- ...st_inbound_real_time_payments_transfers.py | 4 +- .../test_inbound_wire_drawdown_requests.py | 4 +- .../test_inbound_wire_transfers.py | 4 +- .../test_intrafi_account_enrollments.py | 4 +- tests/api_resources/test_intrafi_balances.py | 4 +- .../api_resources/test_intrafi_exclusions.py | 4 +- tests/api_resources/test_lockboxes.py | 4 +- .../api_resources/test_oauth_applications.py | 4 +- tests/api_resources/test_oauth_connections.py | 4 +- tests/api_resources/test_oauth_tokens.py | 4 +- .../test_pending_transactions.py | 4 +- .../test_physical_card_profiles.py | 4 +- tests/api_resources/test_physical_cards.py | 4 +- tests/api_resources/test_programs.py | 4 +- .../api_resources/test_real_time_decisions.py | 4 +- .../test_real_time_payments_transfers.py | 4 +- tests/api_resources/test_routing_numbers.py | 4 +- .../test_supplemental_documents.py | 4 +- tests/api_resources/test_transactions.py | 4 +- .../test_wire_drawdown_requests.py | 4 +- tests/api_resources/test_wire_transfers.py | 4 +- tests/conftest.py | 43 ++++++++++++++++--- 85 files changed, 387 insertions(+), 85 deletions(-) diff --git a/README.md b/README.md index 5f5e8f201..d7c96062a 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/pyproject.toml b/pyproject.toml index 6eb3a9c39..3824f4bfc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 1e3ed6ac2..239543408 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/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 1b29ffb02..a8fd171f8 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -302,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: 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 060f5dda0..23340d746 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -6,10 +6,12 @@ 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] @@ -27,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") @@ -45,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 From d90055202ff9ac3ec889e97b4d3484b47912e529 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:24:54 +0000 Subject: [PATCH 0647/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/inbound_ach_transfer.py | 29 ++++++++++++++++------ 2 files changed, 24 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index d0e5b0a91..5662f4463 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-0a5e8f74bd6cea9f1b4874a3b30ffbeb2f04c0dd03794426126fc41dd96218e0.yml -openapi_spec_hash: 2c6ba02c1cdaad0dc6f2dd7d82148f17 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1fe7c53a3392354e88ae0794df9732ba764f7ce51434a5f78019ab21d0b72ba2.yml +openapi_spec_hash: d0b3cba533f30cc6d187ae674302e145 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index f3a799cab..51ef5fd4b 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: Optional[Settlement] = None + """ + 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", From ec0e08fea1c57cbbd5c3ab678ffac6c3a704e53b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 17:31:02 +0000 Subject: [PATCH 0648/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_ach_transfer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5662f4463..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-1fe7c53a3392354e88ae0794df9732ba764f7ce51434a5f78019ab21d0b72ba2.yml -openapi_spec_hash: d0b3cba533f30cc6d187ae674302e145 +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/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 51ef5fd4b..a87775eeb 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -487,7 +487,7 @@ class InboundACHTransfer(BaseModel): receiver_name: Optional[str] = None """The name of the receiver of the transfer.""" - settlement: Optional[Settlement] = None + settlement: Settlement """ A subhash containing information about when and how the transfer settled at the Federal Reserve. From d44cba67584935fa8b508aee7c2802a1da3b4b09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 18:48:34 +0000 Subject: [PATCH 0649/1325] chore(tests): skip some failing tests on the latest python versions --- tests/test_client.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index c792dc38a..840a15bd9 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -191,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") @@ -1036,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") From 1951a8c07251c127c69dd8c94b57a510ee0ec7ed Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Jun 2025 21:49:23 +0000 Subject: [PATCH 0650/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) 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/pyproject.toml b/pyproject.toml index 3824f4bfc..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" 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 From 2490c73b7287c30d80f8fd8145e29a93e71ca9e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 00:13:07 +0000 Subject: [PATCH 0651/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/documents.py | 14 ++++++++++++-- src/increase/types/document.py | 12 +++++++++++- src/increase/types/document_create_params.py | 13 +++++++++++-- src/increase/types/document_list_params.py | 1 + src/increase/types/file.py | 2 ++ src/increase/types/file_list_params.py | 1 + tests/api_resources/test_documents.py | 2 ++ 8 files changed, 42 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 54fbc742d..3a8d9d1b8 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-d85c059af2ebfb614d1027bf04c10ddcb6188920c7e8a29b040968cd962124b6.yml -openapi_spec_hash: 3a5546d73dd733025e0d6d9d673bca04 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8ba0a76a7d25f12b1aa44ebd3283129560f7a65c95a098ad89deeee6ea46c8a8.yml +openapi_spec_hash: 30519b66ae8c018865d8de252d6f5d2d config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index f83829f62..244ca7b12 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -47,8 +47,9 @@ def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: def create( self, *, - category: Literal["account_verification_letter"], + category: Literal["account_verification_letter", "funding_instructions"], account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, + funding_instructions: document_create_params.FundingInstructions | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -64,9 +65,12 @@ def create( category: The type of document to create. - `account_verification_letter` - An account verification letter. + - `funding_instructions` - Funding instructions. account_verification_letter: An account verification letter. + funding_instructions: Funding instructions. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -83,6 +87,7 @@ def create( { "category": category, "account_verification_letter": account_verification_letter, + "funding_instructions": funding_instructions, }, document_create_params.DocumentCreateParams, ), @@ -218,8 +223,9 @@ def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse async def create( self, *, - category: Literal["account_verification_letter"], + category: Literal["account_verification_letter", "funding_instructions"], account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, + funding_instructions: document_create_params.FundingInstructions | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -235,9 +241,12 @@ async def create( category: The type of document to create. - `account_verification_letter` - An account verification letter. + - `funding_instructions` - Funding instructions. account_verification_letter: An account verification letter. + funding_instructions: Funding instructions. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -254,6 +263,7 @@ async def create( { "category": category, "account_verification_letter": account_verification_letter, + "funding_instructions": funding_instructions, }, document_create_params.DocumentCreateParams, ), diff --git a/src/increase/types/document.py b/src/increase/types/document.py index 941ee35dc..1c6c7f33f 100644 --- a/src/increase/types/document.py +++ b/src/increase/types/document.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["Document", "AccountVerificationLetter"] +__all__ = ["Document", "AccountVerificationLetter", "FundingInstructions"] class AccountVerificationLetter(BaseModel): @@ -14,6 +14,11 @@ class AccountVerificationLetter(BaseModel): """The identifier of the Account Number the document was generated for.""" +class FundingInstructions(BaseModel): + account_number_id: str + """The identifier of the Account Number the document was generated for.""" + + class Document(BaseModel): id: str """The Document identifier.""" @@ -27,6 +32,7 @@ class Document(BaseModel): "proof_of_authorization", "company_information", "account_verification_letter", + "funding_instructions", ] """The type of document. @@ -37,6 +43,7 @@ class Document(BaseModel): - `company_information` - Company information, such a policies or procedures, typically submitted during our due diligence process. - `account_verification_letter` - An account verification letter. + - `funding_instructions` - Funding instructions. """ created_at: datetime @@ -51,6 +58,9 @@ class Document(BaseModel): file_id: str """The identifier of the File containing the Document's contents.""" + funding_instructions: Optional[FundingInstructions] = None + """Properties of a funding instructions document.""" + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. diff --git a/src/increase/types/document_create_params.py b/src/increase/types/document_create_params.py index 0470cb7fb..1f4d9245e 100644 --- a/src/increase/types/document_create_params.py +++ b/src/increase/types/document_create_params.py @@ -8,19 +8,23 @@ from .._utils import PropertyInfo -__all__ = ["DocumentCreateParams", "AccountVerificationLetter"] +__all__ = ["DocumentCreateParams", "AccountVerificationLetter", "FundingInstructions"] class DocumentCreateParams(TypedDict, total=False): - category: Required[Literal["account_verification_letter"]] + category: Required[Literal["account_verification_letter", "funding_instructions"]] """The type of document to create. - `account_verification_letter` - An account verification letter. + - `funding_instructions` - Funding instructions. """ account_verification_letter: AccountVerificationLetter """An account verification letter.""" + funding_instructions: FundingInstructions + """Funding instructions.""" + class AccountVerificationLetter(TypedDict, total=False): account_number_id: Required[str] @@ -28,3 +32,8 @@ class AccountVerificationLetter(TypedDict, total=False): balance_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] """If provided, the letter will include the Account's balance as of the date.""" + + +class FundingInstructions(TypedDict, total=False): + account_number_id: Required[str] + """The Account Number the funding instructions should be generated for.""" diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py index 473c12af3..2e12d424d 100644 --- a/src/increase/types/document_list_params.py +++ b/src/increase/types/document_list_params.py @@ -47,6 +47,7 @@ class DocumentListParams(TypedDict, total=False): "proof_of_authorization", "company_information", "account_verification_letter", + "funding_instructions", ] ], }, diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 13765e92d..0ae829947 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -67,6 +67,7 @@ class File(BaseModel): "deposit_account_control_agreement", "proof_of_authorization_request_submission", "account_verification_letter", + "funding_instructions", ] """What the File will be used for. @@ -112,6 +113,7 @@ class File(BaseModel): - `proof_of_authorization_request_submission` - A file containing additional evidence for a Proof of Authorization Request Submission. - `account_verification_letter` - An account verification letter. + - `funding_instructions` - Funding instructions. """ type: Literal["file"] diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index f7e1059a1..440509eda 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -91,6 +91,7 @@ class CreatedAt(TypedDict, total=False): "deposit_account_control_agreement", "proof_of_authorization_request_submission", "account_verification_letter", + "funding_instructions", ] ], }, diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 1f6c24678..acf2b50ec 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -34,6 +34,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", "balance_date": parse_date("2024-12-31"), }, + funding_instructions={"account_number_id": "account_number_id"}, ) assert_matches_type(Document, document, path=["response"]) @@ -162,6 +163,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", "balance_date": parse_date("2024-12-31"), }, + funding_instructions={"account_number_id": "account_number_id"}, ) assert_matches_type(Document, document, path=["response"]) From e94f1b6f9851ea7adc13edaaf27020235a000307 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 00:14:14 +0000 Subject: [PATCH 0652/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b81befa4..82432f4e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.253.0" + ".": "0.254.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 89331ba1f..dbb5e4b2d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.253.0" +version = "0.254.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 48b37de46..4f4dc567c 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.253.0" # x-release-please-version +__version__ = "0.254.0" # x-release-please-version From efb458c94ddaa035e5ed50687cdd493ae25f7e33 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Jun 2025 21:43:39 +0000 Subject: [PATCH 0653/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3a8d9d1b8..5b1101662 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-8ba0a76a7d25f12b1aa44ebd3283129560f7a65c95a098ad89deeee6ea46c8a8.yml -openapi_spec_hash: 30519b66ae8c018865d8de252d6f5d2d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-26cf97b4b05afc71ff1d3546e3412c4e9d30c3ac2f05a3c76444a0c945c390ea.yml +openapi_spec_hash: 0a885f91c1947c633734f6702320f2e3 config_hash: 97774f946585cecb19181a1817870d0b From aed79a15ac75c0fe7e777866b7053fe62cd8c115 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 18:28:31 +0000 Subject: [PATCH 0654/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 10 ++++++++++ src/increase/types/declined_transaction.py | 5 +++++ src/increase/types/pending_transaction.py | 5 +++++ src/increase/types/real_time_decision.py | 5 +++++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5b1101662..56ae88a7d 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-26cf97b4b05afc71ff1d3546e3412c4e9d30c3ac2f05a3c76444a0c945c390ea.yml -openapi_spec_hash: 0a885f91c1947c633734f6702320f2e3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1808ec74d811de7f25be15e6bdedfa927081d8b9bc87545c7caee71c6770f434.yml +openapi_spec_hash: c0d89f59c9870f7f3c862c313c312015 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 12eb7958b..37c019e64 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -576,6 +576,8 @@ class ElementCardAuthorization(BaseModel): "purchase", "quasi_cash", "refund", + "cash_disbursement", + "unknown", ] """ The processing category describes the intent behind the authorization, such as @@ -595,6 +597,9 @@ class ElementCardAuthorization(BaseModel): be convertible to cash. - `refund` - A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. """ real_time_decision_id: Optional[str] = None @@ -997,6 +1002,8 @@ class ElementCardDecline(BaseModel): "purchase", "quasi_cash", "refund", + "cash_disbursement", + "unknown", ] """ The processing category describes the intent behind the authorization, such as @@ -1016,6 +1023,9 @@ class ElementCardDecline(BaseModel): be convertible to cash. - `refund` - A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. """ real_time_decision_id: Optional[str] = None diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 3ae15a06c..47a2968b2 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -450,6 +450,8 @@ class SourceCardDecline(BaseModel): "purchase", "quasi_cash", "refund", + "cash_disbursement", + "unknown", ] """ The processing category describes the intent behind the authorization, such as @@ -469,6 +471,9 @@ class SourceCardDecline(BaseModel): be convertible to cash. - `refund` - A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. """ real_time_decision_id: Optional[str] = None diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 5af66d521..cc78b0eaf 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -404,6 +404,8 @@ class SourceCardAuthorization(BaseModel): "purchase", "quasi_cash", "refund", + "cash_disbursement", + "unknown", ] """ The processing category describes the intent behind the authorization, such as @@ -423,6 +425,9 @@ class SourceCardAuthorization(BaseModel): be convertible to cash. - `refund` - A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. """ real_time_decision_id: Optional[str] = None diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 65d0e6e8a..3fb13abc1 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -418,6 +418,8 @@ class CardAuthorization(BaseModel): "purchase", "quasi_cash", "refund", + "cash_disbursement", + "unknown", ] """ The processing category describes the intent behind the authorization, such as @@ -437,6 +439,9 @@ class CardAuthorization(BaseModel): be convertible to cash. - `refund` - A refund card authorization, sometimes referred to as a credit voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. """ request_details: CardAuthorizationRequestDetails From bc05c357022fe701a7e692485e93dfda07bfe235 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:40:31 +0000 Subject: [PATCH 0655/1325] feat(api): api update --- .stats.yml | 4 +-- .../entity_create_beneficial_owner_params.py | 7 ++-- src/increase/types/entity_create_params.py | 35 +++++++++++++------ 3 files changed, 32 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 56ae88a7d..1a71796b1 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-1808ec74d811de7f25be15e6bdedfa927081d8b9bc87545c7caee71c6770f434.yml -openapi_spec_hash: c0d89f59c9870f7f3c862c313c312015 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-96d05b8e37bf249bf8308adae52fd62efc5a37bf7dff2911bdfddb89c503bb30.yml +openapi_spec_hash: 35c0fded197228fc0680fe6ce04f6c82 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index 4735ba3d8..bdc31d5d7 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -72,7 +72,7 @@ class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -93,7 +93,10 @@ class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index fcfe1a3f7..60fb6227c 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -175,7 +175,7 @@ class CorporationBeneficialOwnerIndividualIdentificationOther(TypedDict, total=F country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -196,7 +196,10 @@ class CorporationBeneficialOwnerIndividualIdentificationOther(TypedDict, total=F class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" @@ -431,7 +434,7 @@ class JointIndividualIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -452,7 +455,10 @@ class JointIndividualIdentificationOther(TypedDict, total=False): class JointIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + passport (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" @@ -577,7 +583,7 @@ class NaturalPersonIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -598,7 +604,10 @@ class NaturalPersonIdentificationOther(TypedDict, total=False): class NaturalPersonIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + passport (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" @@ -753,7 +762,7 @@ class TrustTrusteeIndividualIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -774,7 +783,10 @@ class TrustTrusteeIndividualIdentificationOther(TypedDict, total=False): class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + passport (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" @@ -905,7 +917,7 @@ class TrustGrantorIdentificationOther(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - document. + document (e.g., `US`). """ description: Required[str] @@ -926,7 +938,10 @@ class TrustGrantorIdentificationOther(TypedDict, total=False): class TrustGrantorIdentificationPassport(TypedDict, total=False): country: Required[str] - """The country that issued the passport.""" + """ + The two-character ISO 3166-1 code representing the country that issued the + passport (e.g., `US`). + """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The passport's expiration date in YYYY-MM-DD format.""" From aa2f5f0445869e10724947723dc8cf0c021789f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 21:41:40 +0000 Subject: [PATCH 0656/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 82432f4e3..e5534a5d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.254.0" + ".": "0.255.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dbb5e4b2d..cfb831943 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.254.0" +version = "0.255.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4f4dc567c..f47493c39 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.254.0" # x-release-please-version +__version__ = "0.255.0" # x-release-please-version From ffbd8a62bb0b8d137a362577af190d1dc3c311a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Jun 2025 22:18:08 +0000 Subject: [PATCH 0657/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/card_authorizations.py | 4 ++++ src/increase/types/card_payment.py | 2 ++ src/increase/types/declined_transaction.py | 2 ++ .../types/simulations/card_authorization_create_params.py | 2 ++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1a71796b1..3214686ae 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-96d05b8e37bf249bf8308adae52fd62efc5a37bf7dff2911bdfddb89c503bb30.yml -openapi_spec_hash: 35c0fded197228fc0680fe6ce04f6c82 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a036361d5f4353d6fa381e4eddaa1bb2db893536cc2f092401fe3b44922f5cb.yml +openapi_spec_hash: 9dba9c19b2647d2d1da5a3d0c1f9e26a config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 66912d863..708dee077 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -58,6 +58,7 @@ def create( "group_locked", "insufficient_funds", "cvv2_mismatch", + "pin_mismatch", "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", @@ -121,6 +122,7 @@ def create( - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. - `card_expiration_mismatch` - The given expiration date did not match the card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per @@ -258,6 +260,7 @@ async def create( "group_locked", "insufficient_funds", "cvv2_mismatch", + "pin_mismatch", "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", @@ -321,6 +324,7 @@ async def create( - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. - `card_expiration_mismatch` - The given expiration date did not match the card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 37c019e64..9793d7e1e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1071,6 +1071,7 @@ class ElementCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "pin_mismatch", "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", @@ -1093,6 +1094,7 @@ class ElementCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. - `card_expiration_mismatch` - The given expiration date did not match the card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 47a2968b2..7b0334515 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -519,6 +519,7 @@ class SourceCardDecline(BaseModel): "group_locked", "insufficient_funds", "cvv2_mismatch", + "pin_mismatch", "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", @@ -541,6 +542,7 @@ class SourceCardDecline(BaseModel): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. - `card_expiration_mismatch` - The given expiration date did not match the card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 5d0c2e506..83b5349b6 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -29,6 +29,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): "group_locked", "insufficient_funds", "cvv2_mismatch", + "pin_mismatch", "card_expiration_mismatch", "transaction_not_allowed", "breaches_limit", @@ -53,6 +54,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): - `insufficient_funds` - The Card's Account did not have a sufficient available balance. - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. - `card_expiration_mismatch` - The given expiration date did not match the card's value. Only applies when a CVV2 is present. - `transaction_not_allowed` - The attempted card transaction is not allowed per From 0a95ca5cc8997ce0ab8f76174a6c1af34a376c4c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 00:20:12 +0000 Subject: [PATCH 0658/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/wire_transfers.py | 10 ++++++++++ src/increase/types/wire_transfer.py | 6 ++++++ src/increase/types/wire_transfer_create_params.py | 6 ++++++ tests/api_resources/test_wire_transfers.py | 2 ++ 5 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3214686ae..246713324 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-1a036361d5f4353d6fa381e4eddaa1bb2db893536cc2f092401fe3b44922f5cb.yml -openapi_spec_hash: 9dba9c19b2647d2d1da5a3d0c1f9e26a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a027ea8bf72e85055306ceaf380c0311b8ed5e6e83962de0ccf48f62c85403fc.yml +openapi_spec_hash: 5a69ed697dee32af7deae0c6ebf27377 config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index bfa9cb500..6e961865d 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -54,6 +54,7 @@ def create( beneficiary_address_line2: str | NotGiven = NOT_GIVEN, beneficiary_address_line3: str | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, + inbound_wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, originator_address_line1: str | NotGiven = NOT_GIVEN, originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, @@ -92,6 +93,9 @@ def create( external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent. + inbound_wire_drawdown_request_id: The ID of an Inbound Wire Drawdown Request in response to which this transfer is + being sent. + originator_address_line1: The originator's address line 1. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. @@ -134,6 +138,7 @@ def create( "beneficiary_address_line2": beneficiary_address_line2, "beneficiary_address_line3": beneficiary_address_line3, "external_account_id": external_account_id, + "inbound_wire_drawdown_request_id": inbound_wire_drawdown_request_id, "originator_address_line1": originator_address_line1, "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, @@ -371,6 +376,7 @@ async def create( beneficiary_address_line2: str | NotGiven = NOT_GIVEN, beneficiary_address_line3: str | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, + inbound_wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, originator_address_line1: str | NotGiven = NOT_GIVEN, originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, @@ -409,6 +415,9 @@ async def create( external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent. + inbound_wire_drawdown_request_id: The ID of an Inbound Wire Drawdown Request in response to which this transfer is + being sent. + originator_address_line1: The originator's address line 1. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. @@ -451,6 +460,7 @@ async def create( "beneficiary_address_line2": beneficiary_address_line2, "beneficiary_address_line3": beneficiary_address_line3, "external_account_id": external_account_id, + "inbound_wire_drawdown_request_id": inbound_wire_drawdown_request_id, "originator_address_line1": originator_address_line1, "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 52e1b5178..969711df4 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -232,6 +232,12 @@ class WireTransfer(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + inbound_wire_drawdown_request_id: Optional[str] = None + """ + The ID of an Inbound Wire Drawdown Request in response to which this transfer + was sent. + """ + message_to_recipient: Optional[str] = None """The message that will show on the recipient's bank statement.""" diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index 894fb6349..16fb3ca6e 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -39,6 +39,12 @@ class WireTransferCreateParams(TypedDict, total=False): absent. """ + inbound_wire_drawdown_request_id: str + """ + The ID of an Inbound Wire Drawdown Request in response to which this transfer is + being sent. + """ + originator_address_line1: str """The originator's address line 1. diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 4fa783c00..1208531c7 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -41,6 +41,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: beneficiary_address_line2="New York", beneficiary_address_line3="NY 10045", external_account_id="external_account_id", + inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", originator_address_line1="x", originator_address_line2="x", originator_address_line3="x", @@ -265,6 +266,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) beneficiary_address_line2="New York", beneficiary_address_line3="NY 10045", external_account_id="external_account_id", + inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", originator_address_line1="x", originator_address_line2="x", originator_address_line3="x", From b431a9e72d79a4e34c6da3de4645088bcb5cbf05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 00:21:11 +0000 Subject: [PATCH 0659/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e5534a5d1..41a5b5529 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.255.0" + ".": "0.256.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cfb831943..6058c39b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.255.0" +version = "0.256.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f47493c39..691796c3c 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.255.0" # x-release-please-version +__version__ = "0.256.0" # x-release-please-version From b0b0360a17f413ad2be5e41be2f1bf972ab472b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Jun 2025 14:05:22 +0000 Subject: [PATCH 0660/1325] =?UTF-8?q?fix(ci):=20release-doctor=20=E2=80=94?= =?UTF-8?q?=20report=20correct=20token=20name?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bin/check-release-environment | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/check-release-environment b/bin/check-release-environment index 4beff05b9..b845b0f4c 100644 --- a/bin/check-release-environment +++ b/bin/check-release-environment @@ -3,7 +3,7 @@ errors=() if [ -z "${PYPI_TOKEN}" ]; then - errors+=("The INCREASE_PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") + errors+=("The PYPI_TOKEN secret has not been set. Please set it in either this repository's secrets or your organization secrets.") fi lenErrors=${#errors[@]} From 280982cebd1276014bb81280296ce6a1ecff6976 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 02:53:42 +0000 Subject: [PATCH 0661/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 41a5b5529..655e50d25 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.256.0" + ".": "0.256.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6058c39b5..d19a5133b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.256.0" +version = "0.256.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 691796c3c..b72855586 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.256.0" # x-release-please-version +__version__ = "0.256.1" # x-release-please-version From c3754d5581e951330cd608f4562b63b28262d6bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 22:37:59 +0000 Subject: [PATCH 0662/1325] chore(ci): only run for pushes and fork pull requests --- .github/workflows/ci.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0a2272b93..527c529f9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,6 +17,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -42,6 +43,7 @@ jobs: contents: read id-token: write runs-on: depot-ubuntu-24.04 + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 @@ -62,6 +64,7 @@ jobs: timeout-minutes: 10 name: test runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 From ae496e63131ca69c696da19d46022d1b93b574c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Jun 2025 23:49:36 +0000 Subject: [PATCH 0663/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 246713324..107106630 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-a027ea8bf72e85055306ceaf380c0311b8ed5e6e83962de0ccf48f62c85403fc.yml -openapi_spec_hash: 5a69ed697dee32af7deae0c6ebf27377 +openapi_spec_hash: 4e35ead65a06ac0783945b2b213ce83c config_hash: 97774f946585cecb19181a1817870d0b From 9dbf30bc8c06551bc1a31173d594ffb28fecafeb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 06:17:52 +0000 Subject: [PATCH 0664/1325] fix(ci): correct conditional --- .github/workflows/ci.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 527c529f9..bd314ddba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,14 +36,13 @@ jobs: run: ./scripts/lint upload: - if: github.repository == 'stainless-sdks/increase-python' + if: github.repository == 'stainless-sdks/increase-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 name: upload permissions: contents: read id-token: write runs-on: depot-ubuntu-24.04 - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - uses: actions/checkout@v4 From 8ebe818d5e6b91493da93d16c12153001a3a0362 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 29 Jun 2025 06:18:53 +0000 Subject: [PATCH 0665/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 655e50d25..b62909048 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.256.1" + ".": "0.256.2" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d19a5133b..98681d147 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.256.1" +version = "0.256.2" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b72855586..c518685b6 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.256.1" # x-release-please-version +__version__ = "0.256.2" # x-release-please-version From 23aabeea53ba122337702b48114e5c1641ca6410 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 00:07:49 +0000 Subject: [PATCH 0666/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 107106630..f4d9da919 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-a027ea8bf72e85055306ceaf380c0311b8ed5e6e83962de0ccf48f62c85403fc.yml -openapi_spec_hash: 4e35ead65a06ac0783945b2b213ce83c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ecc4ad6f5be0044f754af3287b5761a538db602135968b5e2631b1694b5ad0d2.yml +openapi_spec_hash: df21e4b9b5dc5d58d55555e1a7ce5f58 config_hash: 97774f946585cecb19181a1817870d0b From 02dfc843d5dc2a308804efd74436e915389eb02f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:54:20 +0000 Subject: [PATCH 0667/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/file.py | 2 ++ src/increase/types/file_list_params.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f4d9da919..a3290ea74 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-ecc4ad6f5be0044f754af3287b5761a538db602135968b5e2631b1694b5ad0d2.yml -openapi_spec_hash: df21e4b9b5dc5d58d55555e1a7ce5f58 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-930514b98f2a5e85e56fe454b7a1f2e16e1f0a4a4e2804b31acc3da98526f2ed.yml +openapi_spec_hash: 8e35630e1ad9cfb1ac15ad87701f806f config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 0ae829947..35e9bd3c8 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -68,6 +68,7 @@ class File(BaseModel): "proof_of_authorization_request_submission", "account_verification_letter", "funding_instructions", + "hold_harmless_letter", ] """What the File will be used for. @@ -114,6 +115,7 @@ class File(BaseModel): evidence for a Proof of Authorization Request Submission. - `account_verification_letter` - An account verification letter. - `funding_instructions` - Funding instructions. + - `hold_harmless_letter` - A Hold Harmless Letter. """ type: Literal["file"] diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 440509eda..6c4235ab6 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -92,6 +92,7 @@ class CreatedAt(TypedDict, total=False): "proof_of_authorization_request_submission", "account_verification_letter", "funding_instructions", + "hold_harmless_letter", ] ], }, From 78cd4a4cf65442dad3531ecb3243fe456efdc061 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 17:55:22 +0000 Subject: [PATCH 0668/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b62909048..02a070605 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.256.2" + ".": "0.257.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 98681d147..6346e7ab4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.256.2" +version = "0.257.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c518685b6..2581c7994 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.256.2" # x-release-please-version +__version__ = "0.257.0" # x-release-please-version From ba9f0e536fae667d9fbad6bd32461f4835c9f539 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 1 Jul 2025 23:34:09 +0000 Subject: [PATCH 0669/1325] chore(ci): change upload type --- .github/workflows/ci.yml | 18 ++++++++++++++++-- scripts/utils/upload-artifact.sh | 12 +++++++----- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bd314ddba..f275b5aa1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,10 +35,10 @@ jobs: - name: Run lints run: ./scripts/lint - upload: + build: if: github.repository == 'stainless-sdks/increase-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) timeout-minutes: 10 - name: upload + name: build permissions: contents: read id-token: write @@ -46,6 +46,20 @@ jobs: steps: - uses: actions/checkout@v4 + - name: Install Rye + run: | + curl -sSf https://rye.astral.sh/get | bash + echo "$HOME/.rye/shims" >> $GITHUB_PATH + env: + RYE_VERSION: '0.44.0' + RYE_INSTALL_OPTION: '--yes' + + - name: Install dependencies + run: rye sync --all-features + + - name: Run build + run: rye build + - name: Get GitHub OIDC Token id: github-oidc uses: actions/github-script@v6 diff --git a/scripts/utils/upload-artifact.sh b/scripts/utils/upload-artifact.sh index b27770d8b..7f63b4fa1 100755 --- a/scripts/utils/upload-artifact.sh +++ b/scripts/utils/upload-artifact.sh @@ -1,7 +1,9 @@ #!/usr/bin/env bash set -exuo pipefail -RESPONSE=$(curl -X POST "$URL" \ +FILENAME=$(basename dist/*.whl) + +RESPONSE=$(curl -X POST "$URL?filename=$FILENAME" \ -H "Authorization: Bearer $AUTH" \ -H "Content-Type: application/json") @@ -12,13 +14,13 @@ if [[ "$SIGNED_URL" == "null" ]]; then exit 1 fi -UPLOAD_RESPONSE=$(tar -cz . | curl -v -X PUT \ - -H "Content-Type: application/gzip" \ - --data-binary @- "$SIGNED_URL" 2>&1) +UPLOAD_RESPONSE=$(curl -v -X PUT \ + -H "Content-Type: binary/octet-stream" \ + --data-binary "@dist/$FILENAME" "$SIGNED_URL" 2>&1) if echo "$UPLOAD_RESPONSE" | grep -q "HTTP/[0-9.]* 200"; then echo -e "\033[32mUploaded build to Stainless storage.\033[0m" - echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/increase-python/$SHA'\033[0m" + echo -e "\033[32mInstallation: pip install 'https://pkg.stainless.com/s/increase-python/$SHA/$FILENAME'\033[0m" else echo -e "\033[31mFailed to upload artifact.\033[0m" exit 1 From 5c1f90cc0496e5c26c5e5d0c77698b5335ad4c6b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 22:45:38 +0000 Subject: [PATCH 0670/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/inbound_ach_transfers.py | 8 -------- .../types/inbound_ach_transfer_transfer_return_params.py | 4 ---- 3 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index a3290ea74..a3c642efc 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-930514b98f2a5e85e56fe454b7a1f2e16e1f0a4a4e2804b31acc3da98526f2ed.yml -openapi_spec_hash: 8e35630e1ad9cfb1ac15ad87701f806f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-86936f20d6eab34ef44aed8b323cea5043d733402022fd34c7e24e2234875306.yml +openapi_spec_hash: cb262d222b0031cce34498409149e4ae config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 7ef4e87b1..3e475ab67 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -297,7 +297,6 @@ def transfer_return( *, reason: Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -327,9 +326,6 @@ def transfer_return( - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This @@ -646,7 +642,6 @@ async def transfer_return( *, reason: Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -676,9 +671,6 @@ async def transfer_return( - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This diff --git a/src/increase/types/inbound_ach_transfer_transfer_return_params.py b/src/increase/types/inbound_ach_transfer_transfer_return_params.py index 79742df96..9f0535c3c 100644 --- a/src/increase/types/inbound_ach_transfer_transfer_return_params.py +++ b/src/increase/types/inbound_ach_transfer_transfer_return_params.py @@ -11,7 +11,6 @@ class InboundACHTransferTransferReturnParams(TypedDict, total=False): reason: Required[ Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -29,9 +28,6 @@ class InboundACHTransferTransferReturnParams(TypedDict, total=False): - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This From cfc1f00144d18ea2f977c3d7998f42590c6c82f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 2 Jul 2025 22:46:35 +0000 Subject: [PATCH 0671/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 02a070605..b7101200d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.257.0" + ".": "0.258.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6346e7ab4..c48d3433b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.257.0" +version = "0.258.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2581c7994..4d97c4f52 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.257.0" # x-release-please-version +__version__ = "0.258.0" # x-release-please-version From 32a536a0bfc9397e8bb8f963dd591c2efaee7811 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 3 Jul 2025 18:13:43 +0000 Subject: [PATCH 0672/1325] feat(api): api update --- .stats.yml | 4 ++-- .../types/physical_card_create_params.py | 16 ++++++++++++++++ tests/api_resources/test_physical_cards.py | 2 ++ 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a3c642efc..36159e51e 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-86936f20d6eab34ef44aed8b323cea5043d733402022fd34c7e24e2234875306.yml -openapi_spec_hash: cb262d222b0031cce34498409149e4ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e6901efc888494eb4da789fe5dda70b211de1920b0d7f234bd17fcd35ce33fde.yml +openapi_spec_hash: 9691deaf77e6a5ac9fef7d7775d6426e config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/physical_card_create_params.py b/src/increase/types/physical_card_create_params.py index 9ffed26dd..935d1cd31 100644 --- a/src/increase/types/physical_card_create_params.py +++ b/src/increase/types/physical_card_create_params.py @@ -69,3 +69,19 @@ class Shipment(TypedDict, total=False): - `fedex_priority_overnight` - FedEx Priority Overnight, no signature. - `fedex_2_day` - FedEx 2-day. """ + + schedule: Literal["next_day", "same_day"] + """When this physical card should be produced by the card printer. + + The default timeline is the day after the card printer receives the order, + except for `FEDEX_PRIORITY_OVERNIGHT` cards, which default to `SAME_DAY`. To use + faster production methods, please reach out to + [support@increase.com](mailto:support@increase.com). + + - `next_day` - The physical card will be shipped one business day after the + order is received by the card printer. A card that is submitted to Increase on + a Monday evening (Pacific Time) will ship out on Wednesday. + - `same_day` - The physical card will be shipped on the same business day that + the order is received by the card printer. A card that is submitted to + Increase on a Monday evening (Pacific Time) will ship out on Tuesday. + """ diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index bb65d8e39..e324b9b62 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -62,6 +62,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "phone_number": "x", }, "method": "usps", + "schedule": "next_day", }, physical_card_profile_id="physical_card_profile_id", ) @@ -287,6 +288,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "phone_number": "x", }, "method": "usps", + "schedule": "next_day", }, physical_card_profile_id="physical_card_profile_id", ) From ea8a210ec9326d15e6e83bd02938a6b74e914a38 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 03:19:11 +0000 Subject: [PATCH 0673/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 36159e51e..724183797 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-e6901efc888494eb4da789fe5dda70b211de1920b0d7f234bd17fcd35ce33fde.yml -openapi_spec_hash: 9691deaf77e6a5ac9fef7d7775d6426e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aacfe98109b9754d30676d3e95714223190bca5543e8060a90d7b946589f1c16.yml +openapi_spec_hash: d6a090b406bd5936e2d939ce9b9e061b config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index f7cde2203..8cf4a3b6e 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -106,6 +106,22 @@ class Shipment(BaseModel): - `fedex_2_day` - FedEx 2-day. """ + schedule: Literal["next_day", "same_day"] + """When this physical card should be produced by the card printer. + + The default timeline is the day after the card printer receives the order, + except for `FEDEX_PRIORITY_OVERNIGHT` cards, which default to `SAME_DAY`. To use + faster production methods, please reach out to + [support@increase.com](mailto:support@increase.com). + + - `next_day` - The physical card will be shipped one business day after the + order is received by the card printer. A card that is submitted to Increase on + a Monday evening (Pacific Time) will ship out on Wednesday. + - `same_day` - The physical card will be shipped on the same business day that + the order is received by the card printer. A card that is submitted to + Increase on a Monday evening (Pacific Time) will ship out on Tuesday. + """ + status: Literal[ "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" ] From 373c9abfc58fc60bf31aca21d3857f2f01d80fd3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 03:52:07 +0000 Subject: [PATCH 0674/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b7101200d..8d6ed7aed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.258.0" + ".": "0.259.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c48d3433b..fdf679dd0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.258.0" +version = "0.259.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4d97c4f52..ac81cf79a 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.258.0" # x-release-please-version +__version__ = "0.259.0" # x-release-please-version From 37a42b0d7925834fcea3c78dba5ac38703744bc2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 22:49:48 +0000 Subject: [PATCH 0675/1325] feat(api): api update --- requirements-dev.lock | 2 +- requirements.lock | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 74b536387..5022a9b12 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -56,7 +56,7 @@ httpx==0.28.1 # via httpx-aiohttp # via increase # via respx -httpx-aiohttp==0.1.6 +httpx-aiohttp==0.1.8 # via increase idna==3.4 # via anyio diff --git a/requirements.lock b/requirements.lock index c5358924c..1a5a58073 100644 --- a/requirements.lock +++ b/requirements.lock @@ -43,7 +43,7 @@ httpcore==1.0.2 httpx==0.28.1 # via httpx-aiohttp # via increase -httpx-aiohttp==0.1.6 +httpx-aiohttp==0.1.8 # via increase idna==3.4 # via anyio From 984f3b3420a514da5d399511c8c881fad6179a83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 4 Jul 2025 22:50:43 +0000 Subject: [PATCH 0676/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8d6ed7aed..1e9a53acd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.259.0" + ".": "0.260.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fdf679dd0..635beeca4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.259.0" +version = "0.260.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ac81cf79a..e94d4215f 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.259.0" # x-release-please-version +__version__ = "0.260.0" # x-release-please-version From 8b147afff000bdd5c4e1cfcc579209b29625ac83 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:35:40 +0000 Subject: [PATCH 0677/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/card_authorizations.py | 6 ++++++ src/increase/types/card_payment.py | 3 +++ src/increase/types/declined_transaction.py | 3 +++ .../types/simulations/card_authorization_create_params.py | 3 +++ 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 724183797..a7be6ee39 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-aacfe98109b9754d30676d3e95714223190bca5543e8060a90d7b946589f1c16.yml -openapi_spec_hash: d6a090b406bd5936e2d939ce9b9e061b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fa06f0029b2f1cf3d611a6cb6c7fabdbf09dba80d0953e49dd4395bbd3bc3107.yml +openapi_spec_hash: 724b6c1c0e7c9e28f35e9ad66e3fe54e config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index 708dee077..d1feb92d8 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -68,6 +68,7 @@ def create( "invalid_physical_card", "missing_original_authorization", "failed_3ds_authentication", + "suspected_card_testing", "suspected_fraud", ] | NotGiven = NOT_GIVEN, @@ -138,6 +139,8 @@ def create( incremental authorization does not exist. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. @@ -270,6 +273,7 @@ async def create( "invalid_physical_card", "missing_original_authorization", "failed_3ds_authentication", + "suspected_card_testing", "suspected_fraud", ] | NotGiven = NOT_GIVEN, @@ -340,6 +344,8 @@ async def create( incremental authorization does not exist. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 9793d7e1e..3e33714d5 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1081,6 +1081,7 @@ class ElementCardDecline(BaseModel): "invalid_physical_card", "missing_original_authorization", "failed_3ds_authentication", + "suspected_card_testing", "suspected_fraud", ] """Why the transaction was declined. @@ -1110,6 +1111,8 @@ class ElementCardDecline(BaseModel): incremental authorization does not exist. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 7b0334515..a71f24c81 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -529,6 +529,7 @@ class SourceCardDecline(BaseModel): "invalid_physical_card", "missing_original_authorization", "failed_3ds_authentication", + "suspected_card_testing", "suspected_fraud", ] """Why the transaction was declined. @@ -558,6 +559,8 @@ class SourceCardDecline(BaseModel): incremental authorization does not exist. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 83b5349b6..d578690fe 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -39,6 +39,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): "invalid_physical_card", "missing_original_authorization", "failed_3ds_authentication", + "suspected_card_testing", "suspected_fraud", ] """Forces a card decline with a specific reason. @@ -70,6 +71,8 @@ class CardAuthorizationCreateParams(TypedDict, total=False): incremental authorization does not exist. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. - `suspected_fraud` - The transaction was suspected to be fraudulent. Please reach out to support@increase.com for more information. """ From 60cb235a740c5df923ddb5d5964a88c46e73c6ae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 7 Jul 2025 23:36:35 +0000 Subject: [PATCH 0678/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1e9a53acd..a0e3f4c85 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.260.0" + ".": "0.261.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 635beeca4..d08b431d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.260.0" +version = "0.261.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e94d4215f..6e18e0898 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.260.0" # x-release-please-version +__version__ = "0.261.0" # x-release-please-version From 901aba44acd836c170ee3ecd97383d08586ba30e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 14:25:01 +0000 Subject: [PATCH 0679/1325] chore(internal): bump pinned h11 dep --- requirements-dev.lock | 4 ++-- requirements.lock | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 5022a9b12..ab1226978 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -48,9 +48,9 @@ filelock==3.12.4 frozenlist==1.6.2 # via aiohttp # via aiosignal -h11==0.14.0 +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via httpx-aiohttp diff --git a/requirements.lock b/requirements.lock index 1a5a58073..c3a472639 100644 --- a/requirements.lock +++ b/requirements.lock @@ -36,9 +36,9 @@ exceptiongroup==1.2.2 frozenlist==1.6.2 # via aiohttp # via aiosignal -h11==0.14.0 +h11==0.16.0 # via httpcore -httpcore==1.0.2 +httpcore==1.0.9 # via httpx httpx==0.28.1 # via httpx-aiohttp From a0faac45ce1f1e67bfb05653a4293d3342679fb3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 15:26:21 +0000 Subject: [PATCH 0680/1325] chore(package): mark python 3.13 as supported --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index d08b431d8..4c03c23eb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", From 041501cc2f1b83d6639ef94554163deff91a7112 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 8 Jul 2025 21:13:47 +0000 Subject: [PATCH 0681/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/wire_drawdown_requests.py | 140 +++++--------- src/increase/types/wire_drawdown_request.py | 108 +++++++---- .../wire_drawdown_request_create_params.py | 90 +++++---- .../test_wire_drawdown_requests.py | 178 +++++++++++++----- 5 files changed, 307 insertions(+), 213 deletions(-) diff --git a/.stats.yml b/.stats.yml index a7be6ee39..327b8df67 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-fa06f0029b2f1cf3d611a6cb6c7fabdbf09dba80d0953e49dd4395bbd3bc3107.yml -openapi_spec_hash: 724b6c1c0e7c9e28f35e9ad66e3fe54e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e25bdcd9c9cd987962f1507200b619dc7c32f91b940e5ca9110f24bdb294b14a.yml +openapi_spec_hash: 693a205b039e410d9a6b49a5b0ccc72c config_hash: 97774f946585cecb19181a1817870d0b diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 48366ded1..970889d0e 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -47,17 +47,13 @@ def create( *, account_number_id: str, amount: int, - message_to_recipient: str, - recipient_account_number: str, - recipient_name: str, - recipient_routing_number: str, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - recipient_address_line1: str | NotGiven = NOT_GIVEN, - recipient_address_line2: str | NotGiven = NOT_GIVEN, - recipient_address_line3: str | NotGiven = NOT_GIVEN, + creditor_address: wire_drawdown_request_create_params.CreditorAddress, + creditor_name: str, + debtor_account_number: str, + debtor_address: wire_drawdown_request_create_params.DebtorAddress, + debtor_name: str, + debtor_routing_number: str, + unstructured_remittance_information: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -70,39 +66,23 @@ def create( Create a Wire Drawdown Request Args: - account_number_id: The Account Number to which the recipient should send funds. + account_number_id: The Account Number to which the debtor should send funds. - amount: The amount requested from the recipient, in USD cents. + amount: The amount requested from the debtor, in USD cents. - message_to_recipient: A message the recipient will see as part of the request. + creditor_address: The creditor's address. - recipient_account_number: The drawdown request's recipient's account number. + creditor_name: The creditor's name. - recipient_name: The drawdown request's recipient's name. + debtor_account_number: The debtor's account number. - recipient_routing_number: The drawdown request's recipient's routing number. + debtor_address: The debtor's address. - originator_address_line1: The drawdown request originator's address line 1. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + debtor_name: The debtor's name. - originator_address_line2: The drawdown request originator's address line 2. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + debtor_routing_number: The debtor's routing number. - originator_address_line3: The drawdown request originator's address line 3. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. - - originator_name: The drawdown request originator's name. This is only necessary if you're - requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. - - recipient_address_line1: Line 1 of the drawdown request's recipient's address. - - recipient_address_line2: Line 2 of the drawdown request's recipient's address. - - recipient_address_line3: Line 3 of the drawdown request's recipient's address. + unstructured_remittance_information: Remittance information the debtor will see as part of the request. extra_headers: Send extra headers @@ -120,17 +100,13 @@ def create( { "account_number_id": account_number_id, "amount": amount, - "message_to_recipient": message_to_recipient, - "recipient_account_number": recipient_account_number, - "recipient_name": recipient_name, - "recipient_routing_number": recipient_routing_number, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "recipient_address_line1": recipient_address_line1, - "recipient_address_line2": recipient_address_line2, - "recipient_address_line3": recipient_address_line3, + "creditor_address": creditor_address, + "creditor_name": creditor_name, + "debtor_account_number": debtor_account_number, + "debtor_address": debtor_address, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "unstructured_remittance_information": unstructured_remittance_information, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), @@ -264,17 +240,13 @@ async def create( *, account_number_id: str, amount: int, - message_to_recipient: str, - recipient_account_number: str, - recipient_name: str, - recipient_routing_number: str, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - recipient_address_line1: str | NotGiven = NOT_GIVEN, - recipient_address_line2: str | NotGiven = NOT_GIVEN, - recipient_address_line3: str | NotGiven = NOT_GIVEN, + creditor_address: wire_drawdown_request_create_params.CreditorAddress, + creditor_name: str, + debtor_account_number: str, + debtor_address: wire_drawdown_request_create_params.DebtorAddress, + debtor_name: str, + debtor_routing_number: str, + unstructured_remittance_information: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -287,39 +259,23 @@ async def create( Create a Wire Drawdown Request Args: - account_number_id: The Account Number to which the recipient should send funds. - - amount: The amount requested from the recipient, in USD cents. - - message_to_recipient: A message the recipient will see as part of the request. - - recipient_account_number: The drawdown request's recipient's account number. - - recipient_name: The drawdown request's recipient's name. + account_number_id: The Account Number to which the debtor should send funds. - recipient_routing_number: The drawdown request's recipient's routing number. + amount: The amount requested from the debtor, in USD cents. - originator_address_line1: The drawdown request originator's address line 1. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + creditor_address: The creditor's address. - originator_address_line2: The drawdown request originator's address line 2. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + creditor_name: The creditor's name. - originator_address_line3: The drawdown request originator's address line 3. This is only necessary if - you're requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + debtor_account_number: The debtor's account number. - originator_name: The drawdown request originator's name. This is only necessary if you're - requesting a payment to a commingled account. Otherwise, we'll use the - associated entity's details. + debtor_address: The debtor's address. - recipient_address_line1: Line 1 of the drawdown request's recipient's address. + debtor_name: The debtor's name. - recipient_address_line2: Line 2 of the drawdown request's recipient's address. + debtor_routing_number: The debtor's routing number. - recipient_address_line3: Line 3 of the drawdown request's recipient's address. + unstructured_remittance_information: Remittance information the debtor will see as part of the request. extra_headers: Send extra headers @@ -337,17 +293,13 @@ async def create( { "account_number_id": account_number_id, "amount": amount, - "message_to_recipient": message_to_recipient, - "recipient_account_number": recipient_account_number, - "recipient_name": recipient_name, - "recipient_routing_number": recipient_routing_number, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "recipient_address_line1": recipient_address_line1, - "recipient_address_line2": recipient_address_line2, - "recipient_address_line3": recipient_address_line3, + "creditor_address": creditor_address, + "creditor_name": creditor_name, + "debtor_account_number": debtor_account_number, + "debtor_address": debtor_address, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "unstructured_remittance_information": unstructured_remittance_information, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index b9c877167..320191b1c 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -6,7 +6,55 @@ from .._models import BaseModel -__all__ = ["WireDrawdownRequest", "Submission"] +__all__ = ["WireDrawdownRequest", "CreditorAddress", "DebtorAddress", "Submission"] + + +class CreditorAddress(BaseModel): + city: str + """The city, district, town, or village of the address.""" + + country: str + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + postal_code: Optional[str] = None + """The ZIP code of the address.""" + + state: Optional[str] = None + """The address state.""" + + +class DebtorAddress(BaseModel): + city: str + """The city, district, town, or village of the address.""" + + country: str + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + postal_code: Optional[str] = None + """The ZIP code of the address.""" + + state: Optional[str] = None + """The address state.""" class Submission(BaseModel): @@ -23,8 +71,8 @@ class WireDrawdownRequest(BaseModel): account_number_id: str """ - The Account Number to which the recipient of this request is being requested to - send funds. + The Account Number to which the debtor—the recipient of this request—is being + requested to send funds. """ amount: int @@ -36,12 +84,30 @@ class WireDrawdownRequest(BaseModel): the wire drawdown request was created. """ + creditor_address: CreditorAddress + """The creditor's address.""" + + creditor_name: str + """The creditor's name.""" + currency: str """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being requested. Will always be "USD". """ + debtor_account_number: str + """The debtor's account number.""" + + debtor_address: DebtorAddress + """The debtor's address.""" + + debtor_name: str + """The debtor's name.""" + + debtor_routing_number: str + """The debtor's routing number.""" + fulfillment_inbound_wire_transfer_id: Optional[str] = None """ If the recipient fulfills the drawdown request by sending funds, then this will @@ -56,39 +122,6 @@ class WireDrawdownRequest(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - message_to_recipient: str - """The message the recipient will see as part of the drawdown request.""" - - originator_address_line1: Optional[str] = None - """The originator's address line 1.""" - - originator_address_line2: Optional[str] = None - """The originator's address line 2.""" - - originator_address_line3: Optional[str] = None - """The originator's address line 3.""" - - originator_name: Optional[str] = None - """The originator's name.""" - - recipient_account_number: str - """The drawdown request's recipient's account number.""" - - recipient_address_line1: Optional[str] = None - """Line 1 of the drawdown request's recipient's address.""" - - recipient_address_line2: Optional[str] = None - """Line 2 of the drawdown request's recipient's address.""" - - recipient_address_line3: Optional[str] = None - """Line 3 of the drawdown request's recipient's address.""" - - recipient_name: Optional[str] = None - """The drawdown request's recipient's name.""" - - recipient_routing_number: str - """The drawdown request's recipient's routing number.""" - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] """The lifecycle status of the drawdown request. @@ -111,3 +144,6 @@ class WireDrawdownRequest(BaseModel): For this resource it will always be `wire_drawdown_request`. """ + + unstructured_remittance_information: str + """Remittance information the debtor will see as part of the drawdown request.""" diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index 614ea73cc..1902998ff 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -4,61 +4,81 @@ from typing_extensions import Required, TypedDict -__all__ = ["WireDrawdownRequestCreateParams"] +__all__ = ["WireDrawdownRequestCreateParams", "CreditorAddress", "DebtorAddress"] class WireDrawdownRequestCreateParams(TypedDict, total=False): account_number_id: Required[str] - """The Account Number to which the recipient should send funds.""" + """The Account Number to which the debtor should send funds.""" amount: Required[int] - """The amount requested from the recipient, in USD cents.""" + """The amount requested from the debtor, in USD cents.""" - message_to_recipient: Required[str] - """A message the recipient will see as part of the request.""" + creditor_address: Required[CreditorAddress] + """The creditor's address.""" - recipient_account_number: Required[str] - """The drawdown request's recipient's account number.""" + creditor_name: Required[str] + """The creditor's name.""" - recipient_name: Required[str] - """The drawdown request's recipient's name.""" + debtor_account_number: Required[str] + """The debtor's account number.""" - recipient_routing_number: Required[str] - """The drawdown request's recipient's routing number.""" + debtor_address: Required[DebtorAddress] + """The debtor's address.""" - originator_address_line1: str - """The drawdown request originator's address line 1. + debtor_name: Required[str] + """The debtor's name.""" - This is only necessary if you're requesting a payment to a commingled account. - Otherwise, we'll use the associated entity's details. - """ + debtor_routing_number: Required[str] + """The debtor's routing number.""" - originator_address_line2: str - """The drawdown request originator's address line 2. + unstructured_remittance_information: Required[str] + """Remittance information the debtor will see as part of the request.""" - This is only necessary if you're requesting a payment to a commingled account. - Otherwise, we'll use the associated entity's details. - """ - originator_address_line3: str - """The drawdown request originator's address line 3. +class CreditorAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" - This is only necessary if you're requesting a payment to a commingled account. - Otherwise, we'll use the associated entity's details. + country: Required[str] + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. """ - originator_name: str - """The drawdown request originator's name. + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + postal_code: str + """The ZIP code of the address.""" - This is only necessary if you're requesting a payment to a commingled account. - Otherwise, we'll use the associated entity's details. + state: str + """The address state.""" + + +class DebtorAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + + country: Required[str] """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" - recipient_address_line1: str - """Line 1 of the drawdown request's recipient's address.""" + line2: str + """The second line of the address. This might be the floor or room number.""" - recipient_address_line2: str - """Line 2 of the drawdown request's recipient's address.""" + postal_code: str + """The ZIP code of the address.""" - recipient_address_line3: str - """Line 3 of the drawdown request's recipient's address.""" + state: str + """The address state.""" diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 3d7c33167..01d77f275 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -23,10 +23,21 @@ def test_method_create(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -35,17 +46,27 @@ def test_method_create_with_all_params(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - recipient_address_line1="33 Liberty Street", - recipient_address_line2="New York, NY, 10045", - recipient_address_line3="x", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -54,10 +75,21 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert response.is_closed is True @@ -70,10 +102,21 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -169,10 +212,21 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -181,17 +235,27 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) wire_drawdown_request = await async_client.wire_drawdown_requests.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - recipient_address_line1="33 Liberty Street", - recipient_address_line2="New York, NY, 10045", - recipient_address_line3="x", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -200,10 +264,21 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) assert response.is_closed is True @@ -216,10 +291,21 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.wire_drawdown_requests.with_streaming_response.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=10000, - message_to_recipient="Invoice 29582", - recipient_account_number="987654321", - recipient_name="Ian Crease", - recipient_routing_number="101050001", + creditor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + creditor_name="National Phonograph Company", + debtor_account_number="987654321", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="Ian Crease", + debtor_routing_number="101050001", + unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From be9ee42740963fcc1c9e949d450d8aa4e8577ef5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 03:49:56 +0000 Subject: [PATCH 0682/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a0e3f4c85..37458fa12 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.261.0" + ".": "0.262.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4c03c23eb..5c4060bbc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.261.0" +version = "0.262.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6e18e0898..e2507b339 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.261.0" # x-release-please-version +__version__ = "0.262.0" # x-release-please-version From dfad5d67eb65790ef5a550942f70457d7f8b1d72 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 10:16:25 +0000 Subject: [PATCH 0683/1325] fix(parsing): correctly handle nested discriminated unions --- src/increase/_models.py | 13 +++++++----- tests/test_models.py | 45 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 53 insertions(+), 5 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 4f2149805..528d56803 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -2,9 +2,10 @@ import os import inspect -from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, cast +from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast from datetime import date, datetime from typing_extensions import ( + List, Unpack, Literal, ClassVar, @@ -366,7 +367,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: if type_ is None: raise RuntimeError(f"Unexpected field type is None for {key}") - return construct_type(value=value, type_=type_) + return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None)) def is_basemodel(type_: type) -> bool: @@ -420,7 +421,7 @@ def construct_type_unchecked(*, value: object, type_: type[_T]) -> _T: return cast(_T, construct_type(value=value, type_=type_)) -def construct_type(*, value: object, type_: object) -> object: +def construct_type(*, value: object, type_: object, metadata: Optional[List[Any]] = None) -> object: """Loose coercion to the expected type with construction of nested values. If the given value does not match the expected type then it is returned as-is. @@ -438,8 +439,10 @@ def construct_type(*, value: object, type_: object) -> object: type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` - if is_annotated_type(type_): - meta: tuple[Any, ...] = get_args(type_)[1:] + if metadata is not None: + meta: tuple[Any, ...] = tuple(metadata) + elif is_annotated_type(type_): + meta = get_args(type_)[1:] type_ = extract_type_arg(type_, 0) else: meta = tuple() diff --git a/tests/test_models.py b/tests/test_models.py index f06ebcd65..43aa0a417 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -889,3 +889,48 @@ class ModelB(BaseModel): ) assert isinstance(m, ModelB) + + +def test_nested_discriminated_union() -> None: + class InnerType1(BaseModel): + type: Literal["type_1"] + + class InnerModel(BaseModel): + inner_value: str + + class InnerType2(BaseModel): + type: Literal["type_2"] + some_inner_model: InnerModel + + class Type1(BaseModel): + base_type: Literal["base_type_1"] + value: Annotated[ + Union[ + InnerType1, + InnerType2, + ], + PropertyInfo(discriminator="type"), + ] + + class Type2(BaseModel): + base_type: Literal["base_type_2"] + + T = Annotated[ + Union[ + Type1, + Type2, + ], + PropertyInfo(discriminator="base_type"), + ] + + model = construct_type( + type_=T, + value={ + "base_type": "base_type_1", + "value": { + "type": "type_2", + }, + }, + ) + assert isinstance(model, Type1) + assert isinstance(model.value, InnerType2) From c194927bb56183797ad16ab4373953ad057134d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 21:53:14 +0000 Subject: [PATCH 0684/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 6 + .../resources/inbound_wire_transfers.py | 10 + .../resources/simulations/__init__.py | 14 ++ .../simulations/inbound_wire_transfers.py | 10 + .../resources/simulations/simulations.py | 32 +++ .../simulations/wire_drawdown_requests.py | 185 ++++++++++++++++++ .../inbound_wire_transfer_list_params.py | 6 + .../inbound_wire_transfer_create_params.py | 6 + .../test_inbound_wire_transfers.py | 2 + .../test_wire_drawdown_requests.py | 104 ++++++++++ .../test_inbound_wire_transfers.py | 2 + 12 files changed, 381 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/simulations/wire_drawdown_requests.py create mode 100644 tests/api_resources/simulations/test_wire_drawdown_requests.py diff --git a/.stats.yml b/.stats.yml index 327b8df67..18daa6ba3 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-e25bdcd9c9cd987962f1507200b619dc7c32f91b940e5ca9110f24bdb294b14a.yml -openapi_spec_hash: 693a205b039e410d9a6b49a5b0ccc72c -config_hash: 97774f946585cecb19181a1817870d0b +configured_endpoints: 202 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7e0e17a385ddfb049d0fe4e5d05785901cf40f464c51399d7c2cd1f863696c0.yml +openapi_spec_hash: b4bca6edf466e9061a72c98207f92c6d +config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/api.md b/api.md index eadc8e228..95b1fcc7c 100644 --- a/api.md +++ b/api.md @@ -853,6 +853,12 @@ Methods: - client.simulations.inbound_wire_transfers.create(\*\*params) -> InboundWireTransfer +## WireDrawdownRequests + +Methods: + +- client.simulations.wire_drawdown_requests.refuse(wire_drawdown_request_id) -> WireDrawdownRequest + ## InboundWireDrawdownRequests Methods: diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index a697f2460..1bca46b3e 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -90,6 +90,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, + wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -110,6 +111,9 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + wire_drawdown_request_id: Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown + Request. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -134,6 +138,7 @@ def list( "cursor": cursor, "limit": limit, "status": status, + "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_list_params.InboundWireTransferListParams, ), @@ -262,6 +267,7 @@ def list( cursor: str | NotGiven = NOT_GIVEN, limit: int | NotGiven = NOT_GIVEN, status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, + wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -282,6 +288,9 @@ def list( limit: Limit the size of the list that is returned. The default (and maximum) is 100 objects. + wire_drawdown_request_id: Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown + Request. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -306,6 +315,7 @@ def list( "cursor": cursor, "limit": limit, "status": status, + "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_list_params.InboundWireTransferListParams, ), diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index f1f46f9a5..262890320 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -176,6 +176,14 @@ InboundWireTransfersResourceWithStreamingResponse, AsyncInboundWireTransfersResourceWithStreamingResponse, ) +from .wire_drawdown_requests import ( + WireDrawdownRequestsResource, + AsyncWireDrawdownRequestsResource, + WireDrawdownRequestsResourceWithRawResponse, + AsyncWireDrawdownRequestsResourceWithRawResponse, + WireDrawdownRequestsResourceWithStreamingResponse, + AsyncWireDrawdownRequestsResourceWithStreamingResponse, +) from .card_fuel_confirmations import ( CardFuelConfirmationsResource, AsyncCardFuelConfirmationsResource, @@ -328,6 +336,12 @@ "AsyncInboundWireTransfersResourceWithRawResponse", "InboundWireTransfersResourceWithStreamingResponse", "AsyncInboundWireTransfersResourceWithStreamingResponse", + "WireDrawdownRequestsResource", + "AsyncWireDrawdownRequestsResource", + "WireDrawdownRequestsResourceWithRawResponse", + "AsyncWireDrawdownRequestsResourceWithRawResponse", + "WireDrawdownRequestsResourceWithStreamingResponse", + "AsyncWireDrawdownRequestsResourceWithStreamingResponse", "InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource", "InboundWireDrawdownRequestsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index eaae67014..1b17c95b1 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -61,6 +61,7 @@ def create( originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, sender_reference: str | NotGiven = NOT_GIVEN, + wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -122,6 +123,9 @@ def create( sender_reference: The sending bank will set sender_reference in production. You can simulate any value here. + wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is + fulfilling. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -153,6 +157,7 @@ def create( "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, "sender_reference": sender_reference, + "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), @@ -207,6 +212,7 @@ async def create( originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, sender_reference: str | NotGiven = NOT_GIVEN, + wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -268,6 +274,9 @@ async def create( sender_reference: The sending bank will set sender_reference in production. You can simulate any value here. + wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is + fulfilling. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -299,6 +308,7 @@ async def create( "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, "sender_reference": sender_reference, + "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, ), diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 878a9c5ee..d91595500 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -172,6 +172,14 @@ InboundWireTransfersResourceWithStreamingResponse, AsyncInboundWireTransfersResourceWithStreamingResponse, ) +from .wire_drawdown_requests import ( + WireDrawdownRequestsResource, + AsyncWireDrawdownRequestsResource, + WireDrawdownRequestsResourceWithRawResponse, + AsyncWireDrawdownRequestsResourceWithRawResponse, + WireDrawdownRequestsResourceWithStreamingResponse, + AsyncWireDrawdownRequestsResourceWithStreamingResponse, +) from .card_fuel_confirmations import ( CardFuelConfirmationsResource, AsyncCardFuelConfirmationsResource, @@ -293,6 +301,10 @@ def wire_transfers(self) -> WireTransfersResource: def inbound_wire_transfers(self) -> InboundWireTransfersResource: return InboundWireTransfersResource(self._client) + @cached_property + def wire_drawdown_requests(self) -> WireDrawdownRequestsResource: + return WireDrawdownRequestsResource(self._client) + @cached_property def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: return InboundWireDrawdownRequestsResource(self._client) @@ -422,6 +434,10 @@ def wire_transfers(self) -> AsyncWireTransfersResource: def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: return AsyncInboundWireTransfersResource(self._client) + @cached_property + def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResource: + return AsyncWireDrawdownRequestsResource(self._client) + @cached_property def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: return AsyncInboundWireDrawdownRequestsResource(self._client) @@ -554,6 +570,10 @@ def wire_transfers(self) -> WireTransfersResourceWithRawResponse: def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithRawResponse: return InboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) + @cached_property + def wire_drawdown_requests(self) -> WireDrawdownRequestsResourceWithRawResponse: + return WireDrawdownRequestsResourceWithRawResponse(self._simulations.wire_drawdown_requests) + @cached_property def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithRawResponse: return InboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @@ -671,6 +691,10 @@ def wire_transfers(self) -> AsyncWireTransfersResourceWithRawResponse: def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithRawResponse: return AsyncInboundWireTransfersResourceWithRawResponse(self._simulations.inbound_wire_transfers) + @cached_property + def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: + return AsyncWireDrawdownRequestsResourceWithRawResponse(self._simulations.wire_drawdown_requests) + @cached_property def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithRawResponse: return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._simulations.inbound_wire_drawdown_requests) @@ -788,6 +812,10 @@ def wire_transfers(self) -> WireTransfersResourceWithStreamingResponse: def inbound_wire_transfers(self) -> InboundWireTransfersResourceWithStreamingResponse: return InboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + @cached_property + def wire_drawdown_requests(self) -> WireDrawdownRequestsResourceWithStreamingResponse: + return WireDrawdownRequestsResourceWithStreamingResponse(self._simulations.wire_drawdown_requests) + @cached_property def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResourceWithStreamingResponse: return InboundWireDrawdownRequestsResourceWithStreamingResponse( @@ -909,6 +937,10 @@ def wire_transfers(self) -> AsyncWireTransfersResourceWithStreamingResponse: def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResourceWithStreamingResponse: return AsyncInboundWireTransfersResourceWithStreamingResponse(self._simulations.inbound_wire_transfers) + @cached_property + def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: + return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self._simulations.wire_drawdown_requests) + @cached_property def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( diff --git a/src/increase/resources/simulations/wire_drawdown_requests.py b/src/increase/resources/simulations/wire_drawdown_requests.py new file mode 100644 index 000000000..f60e766d1 --- /dev/null +++ b/src/increase/resources/simulations/wire_drawdown_requests.py @@ -0,0 +1,185 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.wire_drawdown_request import WireDrawdownRequest + +__all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] + + +class WireDrawdownRequestsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> WireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return WireDrawdownRequestsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> WireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return WireDrawdownRequestsResourceWithStreamingResponse(self) + + def refuse( + self, + wire_drawdown_request_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireDrawdownRequest: + """ + Simulates a Wire Drawdown Request being refused by the debtor. + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request you wish to refuse. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_drawdown_request_id: + raise ValueError( + f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" + ) + return self._post( + f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireDrawdownRequest, + ) + + +class AsyncWireDrawdownRequestsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncWireDrawdownRequestsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncWireDrawdownRequestsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncWireDrawdownRequestsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self) + + async def refuse( + self, + wire_drawdown_request_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireDrawdownRequest: + """ + Simulates a Wire Drawdown Request being refused by the debtor. + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request you wish to refuse. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_drawdown_request_id: + raise ValueError( + f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" + ) + return await self._post( + f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireDrawdownRequest, + ) + + +class WireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: + self._wire_drawdown_requests = wire_drawdown_requests + + self.refuse = to_raw_response_wrapper( + wire_drawdown_requests.refuse, + ) + + +class AsyncWireDrawdownRequestsResourceWithRawResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: + self._wire_drawdown_requests = wire_drawdown_requests + + self.refuse = async_to_raw_response_wrapper( + wire_drawdown_requests.refuse, + ) + + +class WireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: + self._wire_drawdown_requests = wire_drawdown_requests + + self.refuse = to_streamed_response_wrapper( + wire_drawdown_requests.refuse, + ) + + +class AsyncWireDrawdownRequestsResourceWithStreamingResponse: + def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> None: + self._wire_drawdown_requests = wire_drawdown_requests + + self.refuse = async_to_streamed_response_wrapper( + wire_drawdown_requests.refuse, + ) diff --git a/src/increase/types/inbound_wire_transfer_list_params.py b/src/increase/types/inbound_wire_transfer_list_params.py index 3e92f2818..6c65d52d9 100644 --- a/src/increase/types/inbound_wire_transfer_list_params.py +++ b/src/increase/types/inbound_wire_transfer_list_params.py @@ -33,6 +33,12 @@ class InboundWireTransferListParams(TypedDict, total=False): status: Status + wire_drawdown_request_id: str + """ + Filter Inbound Wire Transfers to ones belonging to the specified Wire Drawdown + Request. + """ + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py index 6e25dc5a8..818242af7 100644 --- a/src/increase/types/simulations/inbound_wire_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -103,3 +103,9 @@ class InboundWireTransferCreateParams(TypedDict, total=False): You can simulate any value here. """ + + wire_drawdown_request_id: str + """ + The identifier of a Wire Drawdown Request the inbound Wire Transfer is + fulfilling. + """ diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py index a2e63e0af..bbf5f2169 100644 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -45,6 +45,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", sender_reference="x", + wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @@ -108,6 +109,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_to_beneficiary_information_line3="x", originator_to_beneficiary_information_line4="x", sender_reference="x", + wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) diff --git a/tests/api_resources/simulations/test_wire_drawdown_requests.py b/tests/api_resources/simulations/test_wire_drawdown_requests.py new file mode 100644 index 000000000..938fd5a3f --- /dev/null +++ b/tests/api_resources/simulations/test_wire_drawdown_requests.py @@ -0,0 +1,104 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import WireDrawdownRequest + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestWireDrawdownRequests: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_refuse(self, client: Increase) -> None: + wire_drawdown_request = client.simulations.wire_drawdown_requests.refuse( + "wire_drawdown_request_id", + ) + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + def test_raw_response_refuse(self, client: Increase) -> None: + response = client.simulations.wire_drawdown_requests.with_raw_response.refuse( + "wire_drawdown_request_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_drawdown_request = response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + def test_streaming_response_refuse(self, client: Increase) -> None: + with client.simulations.wire_drawdown_requests.with_streaming_response.refuse( + "wire_drawdown_request_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_drawdown_request = response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_refuse(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `wire_drawdown_request_id` but received ''" + ): + client.simulations.wire_drawdown_requests.with_raw_response.refuse( + "", + ) + + +class TestAsyncWireDrawdownRequests: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_refuse(self, async_client: AsyncIncrease) -> None: + wire_drawdown_request = await async_client.simulations.wire_drawdown_requests.refuse( + "wire_drawdown_request_id", + ) + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + async def test_raw_response_refuse(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_drawdown_requests.with_raw_response.refuse( + "wire_drawdown_request_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_drawdown_request = await response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + async def test_streaming_response_refuse(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_drawdown_requests.with_streaming_response.refuse( + "wire_drawdown_request_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_drawdown_request = await response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_refuse(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `wire_drawdown_request_id` but received ''" + ): + await async_client.simulations.wire_drawdown_requests.with_raw_response.refuse( + "", + ) diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 707135866..984e76ab3 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -78,6 +78,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, status={"in": ["pending"]}, + wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @@ -210,6 +211,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, status={"in": ["pending"]}, + wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) From 71d9e502f9eb6f611a7b2c1535ba301edded0e1d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 9 Jul 2025 21:54:16 +0000 Subject: [PATCH 0685/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 37458fa12..fd30b1d67 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.262.0" + ".": "0.263.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5c4060bbc..867e13cf4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.262.0" +version = "0.263.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e2507b339..dbd23f52a 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.262.0" # x-release-please-version +__version__ = "0.263.0" # x-release-please-version From bd589cc2443ad34d6e3ad85c6637bd5f5d9eac5f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 17:45:13 +0000 Subject: [PATCH 0686/1325] chore(readme): fix version rendering on pypi --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d7c96062a..16abab576 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,7 @@ # Increase Python API library -[![PyPI version]()](https://pypi.org/project/increase/) + +[![PyPI version](https://img.shields.io/pypi/v/increase.svg?label=pypi%20(stable))](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, From 5cbab6290e1efdd54f46a53e7e8bc7bf9aa52d0a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 10 Jul 2025 20:54:43 +0000 Subject: [PATCH 0687/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_details.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 18daa6ba3..083e8155e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7e0e17a385ddfb049d0fe4e5d05785901cf40f464c51399d7c2cd1f863696c0.yml -openapi_spec_hash: b4bca6edf466e9061a72c98207f92c6d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0b14ed0b6857930b2bbb80a8a0580dff2aad5510240f608ea9385a8b1d1b66b.yml +openapi_spec_hash: ea869bb98167424f60f8ef006da70945 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/card_details.py b/src/increase/types/card_details.py index 54bb5d619..33b9578f7 100644 --- a/src/increase/types/card_details.py +++ b/src/increase/types/card_details.py @@ -17,6 +17,9 @@ class CardDetails(BaseModel): expiration_year: int """The year the card expires in YYYY format (e.g., 2025).""" + pin: str + """The 4-digit PIN for the card, for use with ATMs.""" + primary_account_number: str """The card number.""" From 5aaa952266dfe62db656b070b31941aac0b76439 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 03:52:27 +0000 Subject: [PATCH 0688/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fd30b1d67..7f4bdc4f6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.263.0" + ".": "0.264.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 867e13cf4..c7a8b12cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.263.0" +version = "0.264.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index dbd23f52a..9df4fef3e 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.263.0" # x-release-please-version +__version__ = "0.264.0" # x-release-please-version From b23f1f7ed4ba4325e9f33c79fe364b39e6d375a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 12:12:47 +0000 Subject: [PATCH 0689/1325] fix(client): don't send Content-Type header on GET requests --- pyproject.toml | 2 +- src/increase/_base_client.py | 11 +++++++++-- tests/test_client.py | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index c7a8b12cd..0205453de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ Homepage = "https://github.com/Increase/increase-python" Repository = "https://github.com/Increase/increase-python" [project.optional-dependencies] -aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.6"] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] [tool.rye] managed = true diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 239543408..f62f9d0aa 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -529,6 +529,15 @@ def _build_request( # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} + is_body_allowed = options.method.lower() != "get" + + if is_body_allowed: + kwargs["json"] = json_data if is_given(json_data) else None + kwargs["files"] = files + else: + headers.pop("Content-Type", None) + kwargs.pop("data", None) + # TODO: report this error to httpx return self._client.build_request( # pyright: ignore[reportUnknownMemberType] headers=headers, @@ -540,8 +549,6 @@ def _build_request( # so that passing a `TypedDict` doesn't cause an error. # https://github.com/microsoft/pyright/issues/3526#event-6715453066 params=self.qs.stringify(cast(Mapping[str, Any], params)) if params else None, - json=json_data if is_given(json_data) else None, - files=files, **kwargs, ) diff --git a/tests/test_client.py b/tests/test_client.py index 840a15bd9..a80d5b47b 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -464,7 +464,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, client: Increase) -> None: request = client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, @@ -1310,7 +1310,7 @@ def test_request_extra_query(self) -> None: def test_multipart_repeating_array(self, async_client: AsyncIncrease) -> None: request = async_client._build_request( FinalRequestOptions.construct( - method="get", + method="post", url="/foo", headers={"Content-Type": "multipart/form-data; boundary=6b7ba517decee4a450543ea6ae821c82"}, json_data={"array": ["foo", "bar"]}, From 73b959ff114994c805f499009032a1c701947f16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:53:13 +0000 Subject: [PATCH 0690/1325] feat(api): api update --- .stats.yml | 4 +-- .../resources/simulations/programs.py | 28 +++++++++++++++++++ .../simulations/program_create_params.py | 12 +++++++- .../simulations/test_programs.py | 2 ++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 083e8155e..076aae75a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0b14ed0b6857930b2bbb80a8a0580dff2aad5510240f608ea9385a8b1d1b66b.yml -openapi_spec_hash: ea869bb98167424f60f8ef006da70945 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9d527ceb849bd9a01edc968016381f25fcc375a1409eb113d7e876ae0f2f529.yml +openapi_spec_hash: c7820089282fc6db267d08eaa465075f config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 330ea4bd2..c965a47d4 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -45,6 +47,10 @@ def create( self, *, name: str, + bank: Literal[ + "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" + ] + | NotGiven = NOT_GIVEN, reserve_account_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -64,6 +70,14 @@ def create( Args: name: The name of the program being added. + bank: The bank for the program's accounts, defaults to First Internet Bank. + + - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `core_bank` - Core Bank + - `first_internet_bank` - First Internet Bank of Indiana + - `global_innovations_bank` - Global Innovations Bank + - `grasshopper_bank` - Grasshopper Bank + reserve_account_id: The identifier of the Account the Program should be added to is for. extra_headers: Send extra headers @@ -81,6 +95,7 @@ def create( body=maybe_transform( { "name": name, + "bank": bank, "reserve_account_id": reserve_account_id, }, program_create_params.ProgramCreateParams, @@ -120,6 +135,10 @@ async def create( self, *, name: str, + bank: Literal[ + "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" + ] + | NotGiven = NOT_GIVEN, reserve_account_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -139,6 +158,14 @@ async def create( Args: name: The name of the program being added. + bank: The bank for the program's accounts, defaults to First Internet Bank. + + - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `core_bank` - Core Bank + - `first_internet_bank` - First Internet Bank of Indiana + - `global_innovations_bank` - Global Innovations Bank + - `grasshopper_bank` - Grasshopper Bank + reserve_account_id: The identifier of the Account the Program should be added to is for. extra_headers: Send extra headers @@ -156,6 +183,7 @@ async def create( body=await async_maybe_transform( { "name": name, + "bank": bank, "reserve_account_id": reserve_account_id, }, program_create_params.ProgramCreateParams, diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py index 141606abb..d8718d60d 100644 --- a/src/increase/types/simulations/program_create_params.py +++ b/src/increase/types/simulations/program_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["ProgramCreateParams"] @@ -11,5 +11,15 @@ class ProgramCreateParams(TypedDict, total=False): name: Required[str] """The name of the program being added.""" + bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank"] + """The bank for the program's accounts, defaults to First Internet Bank. + + - `blue_ridge_bank` - Blue Ridge Bank, N.A. + - `core_bank` - Core Bank + - `first_internet_bank` - First Internet Bank of Indiana + - `global_innovations_bank` - Global Innovations Bank + - `grasshopper_bank` - Grasshopper Bank + """ + reserve_account_id: str """The identifier of the Account the Program should be added to is for.""" diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 68a7e9de7..1439c6bcf 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -28,6 +28,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: program = client.simulations.programs.create( name="For Benefit Of", + bank="blue_ridge_bank", reserve_account_id="reserve_account_id", ) assert_matches_type(Program, program, path=["response"]) @@ -73,6 +74,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: program = await async_client.simulations.programs.create( name="For Benefit Of", + bank="blue_ridge_bank", reserve_account_id="reserve_account_id", ) assert_matches_type(Program, program, path=["response"]) From 2d794bb6b27cf5afca2affa1615035e2897e7d32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 11 Jul 2025 13:54:12 +0000 Subject: [PATCH 0691/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f4bdc4f6..c8ed07941 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.264.0" + ".": "0.265.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0205453de..3df61dac1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.264.0" +version = "0.265.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9df4fef3e..478d15b2e 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.264.0" # x-release-please-version +__version__ = "0.265.0" # x-release-please-version From 40cf29109f92c547eac292c210c116db79374d01 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 14 Jul 2025 17:30:26 +0000 Subject: [PATCH 0692/1325] feat: clean up environment call outs --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 16abab576..0bac60aee 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,6 @@ 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 @@ -97,7 +96,7 @@ 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 + api_key="My API Key", http_client=DefaultAioHttpClient(), ) as client: account = await client.accounts.create( From a0aca80ccb2aba9069923c43af07293fe76eb2cc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 17 Jul 2025 19:31:26 +0000 Subject: [PATCH 0693/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 076aae75a..e5f614ec2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c9d527ceb849bd9a01edc968016381f25fcc375a1409eb113d7e876ae0f2f529.yml -openapi_spec_hash: c7820089282fc6db267d08eaa465075f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c3c84498ed204ebe6297ac77700cd63bf1353915e4577508baabf8ed1e4201ae.yml +openapi_spec_hash: e6cfa093a4bba7d0d1961515b0aed651 config_hash: a185e9a72778cc4658ea73fb3a7f1354 From 59d1fff62c9d2e80a0a4cb316a75a1c013e63103 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 18 Jul 2025 17:10:23 +0000 Subject: [PATCH 0694/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/accounts.py | 24 +++++++++++++++++++-- src/increase/types/account_update_params.py | 6 ++++++ tests/api_resources/test_accounts.py | 2 ++ 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index e5f614ec2..b26d90908 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c3c84498ed204ebe6297ac77700cd63bf1353915e4577508baabf8ed1e4201ae.yml -openapi_spec_hash: e6cfa093a4bba7d0d1961515b0aed651 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7f26440e2137fb4f39521c361e76d56bad7c56d81cd06d0677d7735e73f7c160.yml +openapi_spec_hash: aa475d425f493e41eb8485ae17a3d0f9 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index c524fd217..b3a417e50 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -145,6 +145,7 @@ def update( self, account_id: str, *, + credit_limit: int | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -160,6 +161,9 @@ def update( Args: account_id: The identifier of the Account to update. + credit_limit: The new credit limit of the Account, if and only if the Account is a loan + account. + name: The new name of the Account. extra_headers: Send extra headers @@ -176,7 +180,13 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._patch( f"/accounts/{account_id}", - body=maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=maybe_transform( + { + "credit_limit": credit_limit, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -464,6 +474,7 @@ async def update( self, account_id: str, *, + credit_limit: int | NotGiven = NOT_GIVEN, name: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -479,6 +490,9 @@ async def update( Args: account_id: The identifier of the Account to update. + credit_limit: The new credit limit of the Account, if and only if the Account is a loan + account. + name: The new name of the Account. extra_headers: Send extra headers @@ -495,7 +509,13 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._patch( f"/accounts/{account_id}", - body=await async_maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=await async_maybe_transform( + { + "credit_limit": credit_limit, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py index 86ec914d0..32eaaba0f 100644 --- a/src/increase/types/account_update_params.py +++ b/src/increase/types/account_update_params.py @@ -8,5 +8,11 @@ class AccountUpdateParams(TypedDict, total=False): + credit_limit: int + """ + The new credit limit of the Account, if and only if the Account is a loan + account. + """ + name: str """The new name of the Account.""" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index f87c593ed..d445753d8 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -112,6 +112,7 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account = client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -371,6 +372,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) From 95a002ec09c732a619642222859e0d28943c7686 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 19 Jul 2025 03:52:14 +0000 Subject: [PATCH 0695/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c8ed07941..a587f67dd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.265.0" + ".": "0.266.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3df61dac1..60ab96bed 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.265.0" +version = "0.266.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 478d15b2e..243a8bbe0 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.265.0" # x-release-please-version +__version__ = "0.266.0" # x-release-please-version From 174960ae875f8460f31528b5b0d97ef61b282f1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 12:27:49 +0000 Subject: [PATCH 0696/1325] fix(parsing): ignore empty metadata --- src/increase/_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 528d56803..ffcbf67bc 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -439,7 +439,7 @@ def construct_type(*, value: object, type_: object, metadata: Optional[List[Any] type_ = type_.__value__ # type: ignore[unreachable] # unwrap `Annotated[T, ...]` -> `T` - if metadata is not None: + if metadata is not None and len(metadata) > 0: meta: tuple[Any, ...] = tuple(metadata) elif is_annotated_type(type_): meta = get_args(type_)[1:] From 95e2e422242fccf1c146027ce3d1b0dd1021db43 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:32:00 +0000 Subject: [PATCH 0697/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 8 ++++++++ src/increase/types/event.py | 4 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 4 ++++ src/increase/types/event_subscription_create_params.py | 4 ++++ 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b26d90908..d843fc927 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7f26440e2137fb4f39521c361e76d56bad7c56d81cd06d0677d7735e73f7c160.yml -openapi_spec_hash: aa475d425f493e41eb8485ae17a3d0f9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2965cbcf43d274ee029249246f9e3760a82372b9120a033bd651cad24765a4fb.yml +openapi_spec_hash: ae42e357b1bedbf992105c2a37f1b544 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index d3c66fb73..c99568526 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -128,6 +128,8 @@ def create( "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", @@ -284,6 +286,8 @@ def create( created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of @@ -603,6 +607,8 @@ async def create( "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", @@ -759,6 +765,8 @@ async def create( created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 53e290081..e83b425af 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -97,6 +97,8 @@ class Event(BaseModel): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", @@ -236,6 +238,8 @@ class Event(BaseModel): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 1aa2d6f7e..2c9d7f5be 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -112,6 +112,8 @@ class EventListParams(TypedDict, total=False): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index f0c6da4d2..75ec1ff71 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -110,6 +110,8 @@ class EventSubscription(BaseModel): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", @@ -249,6 +251,8 @@ class EventSubscription(BaseModel): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index a7a47e161..9bc5d78fb 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -96,6 +96,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "program.created", + "program.updated", "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", @@ -234,6 +236,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of Authorization Request is created. - `proof_of_authorization_request.updated` - Occurs whenever a Proof of From af0fd38b0a82faec1860bc2e08e10e3a6a194d58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 16:33:28 +0000 Subject: [PATCH 0698/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a587f67dd..75b3f25b4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.266.0" + ".": "0.267.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 60ab96bed..f990a6e5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.266.0" +version = "0.267.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 243a8bbe0..aef3497be 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.266.0" # x-release-please-version +__version__ = "0.267.0" # x-release-please-version From 41b83ba8d224ba03f4a1ed7a17d4faf53d13a75f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:43:53 +0000 Subject: [PATCH 0699/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_create_params.py | 3 --- tests/api_resources/test_entities.py | 6 ++---- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index d843fc927..02225f19a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2965cbcf43d274ee029249246f9e3760a82372b9120a033bd651cad24765a4fb.yml -openapi_spec_hash: ae42e357b1bedbf992105c2a37f1b544 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-43d34b4805f305e7e2c71644ade73722d053018acd6009352360e8a87cbe2250.yml +openapi_spec_hash: cfff23de89960d895052350a33499cf1 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 60fb6227c..bf2ea8aae 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -541,9 +541,6 @@ class Joint(TypedDict, total=False): individuals: Required[Iterable[JointIndividual]] """The two individuals that share control of the entity.""" - name: str - """The name of the joint entity.""" - class NaturalPersonAddress(TypedDict, total=False): city: Required[str] diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 54fcbd14f..b0b86d7e5 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -139,8 +139,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "x", "confirmed_no_us_tax_id": True, } - ], - "name": "x", + ] }, natural_person={ "address": { @@ -960,8 +959,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "x", "confirmed_no_us_tax_id": True, } - ], - "name": "x", + ] }, natural_person={ "address": { From 5cb1cbcb8e8d4bdb80ec40e08302da76c651357d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 21 Jul 2025 19:45:00 +0000 Subject: [PATCH 0700/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 75b3f25b4..37556d6b0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.267.0" + ".": "0.268.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f990a6e5d..e00559bbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.267.0" +version = "0.268.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index aef3497be..308918e30 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.267.0" # x-release-please-version +__version__ = "0.268.0" # x-release-please-version From f84422a9c96eedbed870a65f1e5a516b41f236c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 12:04:27 +0000 Subject: [PATCH 0701/1325] fix(parsing): parse extra field types --- src/increase/_models.py | 25 +++++++++++++++++++++++-- tests/test_models.py | 29 ++++++++++++++++++++++++++++- 2 files changed, 51 insertions(+), 3 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index ffcbf67bc..b8387ce98 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -208,14 +208,18 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] else: fields_values[name] = field_get_default(field) + extra_field_type = _get_extra_fields_type(__cls) + _extra = {} for key, value in values.items(): if key not in model_fields: + parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value + if PYDANTIC_V2: - _extra[key] = value + _extra[key] = parsed else: _fields_set.add(key) - fields_values[key] = value + fields_values[key] = parsed object.__setattr__(m, "__dict__", fields_values) @@ -370,6 +374,23 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: return construct_type(value=value, type_=type_, metadata=getattr(field, "metadata", None)) +def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None: + if not PYDANTIC_V2: + # TODO + return None + + schema = cls.__pydantic_core_schema__ + if schema["type"] == "model": + fields = schema["schema"] + if fields["type"] == "model-fields": + extras = fields.get("extras_schema") + if extras and "cls" in extras: + # mypy can't narrow the type + return extras["cls"] # type: ignore[no-any-return] + + return None + + def is_basemodel(type_: type) -> bool: """Returns whether or not the given type is either a `BaseModel` or a union of `BaseModel`""" if is_union(type_): diff --git a/tests/test_models.py b/tests/test_models.py index 43aa0a417..e97a30009 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -1,5 +1,5 @@ import json -from typing import Any, Dict, List, Union, Optional, cast +from typing import TYPE_CHECKING, Any, Dict, List, Union, Optional, cast from datetime import datetime, timezone from typing_extensions import Literal, Annotated, TypeAliasType @@ -934,3 +934,30 @@ class Type2(BaseModel): ) assert isinstance(model, Type1) assert isinstance(model.value, InnerType2) + + +@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now") +def test_extra_properties() -> None: + class Item(BaseModel): + prop: int + + class Model(BaseModel): + __pydantic_extra__: Dict[str, Item] = Field(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + other: str + + if TYPE_CHECKING: + + def __getattr__(self, attr: str) -> Item: ... + + model = construct_type( + type_=Model, + value={ + "a": {"prop": 1}, + "other": "foo", + }, + ) + assert isinstance(model, Model) + assert model.a.prop == 1 + assert isinstance(model.a, Item) + assert model.other == "foo" From c826a75c021c87b36f9da2846cb56c1c41d80f07 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:33:41 +0000 Subject: [PATCH 0702/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 10 +++++++--- src/increase/types/physical_card_create_params.py | 15 ++++++++++++--- tests/api_resources/test_physical_cards.py | 2 ++ 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 02225f19a..4f46bd0e2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-43d34b4805f305e7e2c71644ade73722d053018acd6009352360e8a87cbe2250.yml -openapi_spec_hash: cfff23de89960d895052350a33499cf1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f755cd0f7b44abb0c5ec9857c8ac47d778b3d753335d9a5cc3b73e4fdf9f2f96.yml +openapi_spec_hash: 16295ba5ba27744cd4f1464d640dadcf config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 8cf4a3b6e..0f00f8688 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -21,6 +21,9 @@ class ShipmentAddress(BaseModel): city: str """The city of the shipping address.""" + country: str + """The country of the shipping address.""" + line1: str """The first line of the shipping address.""" @@ -37,7 +40,7 @@ class ShipmentAddress(BaseModel): """The postal code of the shipping address.""" state: str - """The US state of the shipping address.""" + """The state of the shipping address.""" class ShipmentTrackingUpdate(BaseModel): @@ -98,12 +101,13 @@ class Shipment(BaseModel): address: ShipmentAddress """The location to where the card's packing label is addressed.""" - method: Literal["usps", "fedex_priority_overnight", "fedex_2_day"] + method: Literal["usps", "fedex_priority_overnight", "fedex_2_day", "dhl_worldwide_express"] """The shipping method. - - `usps` - USPS Post with tracking. + - `usps` - USPS Post. - `fedex_priority_overnight` - FedEx Priority Overnight, no signature. - `fedex_2_day` - FedEx 2-day. + - `dhl_worldwide_express` - DHL Worldwide Express, international shipping only. """ schedule: Literal["next_day", "same_day"] diff --git a/src/increase/types/physical_card_create_params.py b/src/increase/types/physical_card_create_params.py index 935d1cd31..3de994bc1 100644 --- a/src/increase/types/physical_card_create_params.py +++ b/src/increase/types/physical_card_create_params.py @@ -46,7 +46,15 @@ class ShipmentAddress(TypedDict, total=False): """The postal code of the shipping address.""" state: Required[str] - """The US state of the shipping address.""" + """The state of the shipping address.""" + + country: str + """ + The two-character ISO 3166-1 code of the country where the card should be + shipped (e.g., `US`). Please reach out to + [support@increase.com](mailto:support@increase.com) to ship cards + internationally. + """ line2: str """The second line of the shipping address.""" @@ -62,12 +70,13 @@ class Shipment(TypedDict, total=False): address: Required[ShipmentAddress] """The address to where the card should be shipped.""" - method: Required[Literal["usps", "fedex_priority_overnight", "fedex_2_day"]] + method: Required[Literal["usps", "fedex_priority_overnight", "fedex_2_day", "dhl_worldwide_express"]] """The shipping method to use. - - `usps` - USPS Post with tracking. + - `usps` - USPS Post. - `fedex_priority_overnight` - FedEx Priority Overnight, no signature. - `fedex_2_day` - FedEx 2-day. + - `dhl_worldwide_express` - DHL Worldwide Express, international shipping only. """ schedule: Literal["next_day", "same_day"] diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index e324b9b62..ca526387f 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -57,6 +57,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "country": "x", "line2": "Unit 2", "line3": "x", "phone_number": "x", @@ -283,6 +284,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "Ian Crease", "postal_code": "10045", "state": "NY", + "country": "x", "line2": "Unit 2", "line3": "x", "phone_number": "x", From 16939c1f12a218b102002e35cc293a84b9854a40 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 17:35:36 +0000 Subject: [PATCH 0703/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 37556d6b0..fa440d4de 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.268.0" + ".": "0.269.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e00559bbf..370d145d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.268.0" +version = "0.269.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 308918e30..9a198e68f 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.268.0" # x-release-please-version +__version__ = "0.269.0" # x-release-please-version From 50344eb21f9c23af17be13bfcf64c499dc259462 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 22:23:35 +0000 Subject: [PATCH 0704/1325] feat(api): api update --- .stats.yml | 4 +- .../simulations/card_authorizations.py | 30 ++++------ .../card_authorization_create_params.py | 55 +++++++++++++++---- .../simulations/test_card_authorizations.py | 4 +- 4 files changed, 57 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4f46bd0e2..f0529b710 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f755cd0f7b44abb0c5ec9857c8ac47d778b3d753335d9a5cc3b73e4fdf9f2f96.yml -openapi_spec_hash: 16295ba5ba27744cd4f1464d640dadcf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d843be8e5d44f9d79115d585ffdcda4b4d86a5f515fb00e547ba085156f44bb.yml +openapi_spec_hash: f5473cf6107b72c78bc87ecbc421dc5e config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index d1feb92d8..a15dcf9c1 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -73,7 +73,6 @@ def create( ] | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, - direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, merchant_acceptor_id: str | NotGiven = NOT_GIVEN, merchant_category_code: str | NotGiven = NOT_GIVEN, @@ -84,6 +83,7 @@ def create( network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, network_risk_score: int | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, + processing_category: card_authorization_create_params.ProcessingCategory | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -146,14 +146,6 @@ def create( digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. - direction: The direction describes the direction the funds will move, either from the - cardholder to the merchant or from the merchant to the cardholder. - - - `settlement` - A regular card authorization where funds are debited from the - cardholder. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any @@ -180,6 +172,9 @@ def create( physical_card_id: The identifier of the Physical Card to be authorized. + processing_category: Fields specific to a specific type of authorization, such as Automatic Fuel + Dispensers, Refund Authorizations, or Cash Disbursements. + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card is transacting with. @@ -202,7 +197,6 @@ def create( "card_id": card_id, "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, - "direction": direction, "event_subscription_id": event_subscription_id, "merchant_acceptor_id": merchant_acceptor_id, "merchant_category_code": merchant_category_code, @@ -213,6 +207,7 @@ def create( "network_details": network_details, "network_risk_score": network_risk_score, "physical_card_id": physical_card_id, + "processing_category": processing_category, "terminal_id": terminal_id, }, card_authorization_create_params.CardAuthorizationCreateParams, @@ -278,7 +273,6 @@ async def create( ] | NotGiven = NOT_GIVEN, digital_wallet_token_id: str | NotGiven = NOT_GIVEN, - direction: Literal["settlement", "refund"] | NotGiven = NOT_GIVEN, event_subscription_id: str | NotGiven = NOT_GIVEN, merchant_acceptor_id: str | NotGiven = NOT_GIVEN, merchant_category_code: str | NotGiven = NOT_GIVEN, @@ -289,6 +283,7 @@ async def create( network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, network_risk_score: int | NotGiven = NOT_GIVEN, physical_card_id: str | NotGiven = NOT_GIVEN, + processing_category: card_authorization_create_params.ProcessingCategory | NotGiven = NOT_GIVEN, terminal_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -351,14 +346,6 @@ async def create( digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. - direction: The direction describes the direction the funds will move, either from the - cardholder to the merchant or from the merchant to the cardholder. - - - `settlement` - A regular card authorization where funds are debited from the - cardholder. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time decision event subscription, you can use this field to route events to any @@ -385,6 +372,9 @@ async def create( physical_card_id: The identifier of the Physical Card to be authorized. + processing_category: Fields specific to a specific type of authorization, such as Automatic Fuel + Dispensers, Refund Authorizations, or Cash Disbursements. + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card is transacting with. @@ -407,7 +397,6 @@ async def create( "card_id": card_id, "decline_reason": decline_reason, "digital_wallet_token_id": digital_wallet_token_id, - "direction": direction, "event_subscription_id": event_subscription_id, "merchant_acceptor_id": merchant_acceptor_id, "merchant_category_code": merchant_category_code, @@ -418,6 +407,7 @@ async def create( "network_details": network_details, "network_risk_score": network_risk_score, "physical_card_id": physical_card_id, + "processing_category": processing_category, "terminal_id": terminal_id, }, card_authorization_create_params.CardAuthorizationCreateParams, diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index d578690fe..98cfa68fe 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -4,7 +4,7 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardAuthorizationCreateParams", "NetworkDetails", "NetworkDetailsVisa"] +__all__ = ["CardAuthorizationCreateParams", "NetworkDetails", "NetworkDetailsVisa", "ProcessingCategory"] class CardAuthorizationCreateParams(TypedDict, total=False): @@ -80,17 +80,6 @@ class CardAuthorizationCreateParams(TypedDict, total=False): digital_wallet_token_id: str """The identifier of the Digital Wallet Token to be authorized.""" - direction: Literal["settlement", "refund"] - """ - The direction describes the direction the funds will move, either from the - cardholder to the merchant or from the merchant to the cardholder. - - - `settlement` - A regular card authorization where funds are debited from the - cardholder. - - `refund` - A refund card authorization, sometimes referred to as a credit - voucher authorization, where funds are credited to the cardholder. - """ - event_subscription_id: str """The identifier of the Event Subscription to use. @@ -136,6 +125,12 @@ class CardAuthorizationCreateParams(TypedDict, total=False): physical_card_id: str """The identifier of the Physical Card to be authorized.""" + processing_category: ProcessingCategory + """ + Fields specific to a specific type of authorization, such as Automatic Fuel + Dispensers, Refund Authorizations, or Cash Disbursements. + """ + terminal_id: str """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -178,3 +173,39 @@ class NetworkDetailsVisa(TypedDict, total=False): class NetworkDetails(TypedDict, total=False): visa: Required[NetworkDetailsVisa] """Fields specific to the Visa network.""" + + +class ProcessingCategory(TypedDict, total=False): + category: Required[ + Literal[ + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", + "cash_disbursement", + ] + ] + """ + The processing category describes the intent behind the authorization, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + """ diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index 8701d79dd..e75da86aa 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -32,7 +32,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: card_id="card_oubs0hwk5rn6knuecxg2", decline_reason="account_closed", digital_wallet_token_id="digital_wallet_token_id", - direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", @@ -43,6 +42,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, network_risk_score=0, physical_card_id="physical_card_id", + processing_category={"category": "account_funding"}, terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) @@ -92,7 +92,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) card_id="card_oubs0hwk5rn6knuecxg2", decline_reason="account_closed", digital_wallet_token_id="digital_wallet_token_id", - direction="settlement", event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", merchant_acceptor_id="5665270011000168", merchant_category_code="5734", @@ -103,6 +102,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, network_risk_score=0, physical_card_id="physical_card_id", + processing_category={"category": "account_funding"}, terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) From 73255fe5253a4e7f7d92adaa31661ac7f68db3ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 22 Jul 2025 22:24:36 +0000 Subject: [PATCH 0705/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fa440d4de..9114bb1ed 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.269.0" + ".": "0.270.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 370d145d8..e466f44a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.269.0" +version = "0.270.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9a198e68f..b54cf92e2 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.269.0" # x-release-please-version +__version__ = "0.270.0" # x-release-please-version From 83e1a6f9a39252f5013794705b6bd7144372a5dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 23 Jul 2025 21:46:09 +0000 Subject: [PATCH 0706/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index f0529b710..c8c782764 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d843be8e5d44f9d79115d585ffdcda4b4d86a5f515fb00e547ba085156f44bb.yml -openapi_spec_hash: f5473cf6107b72c78bc87ecbc421dc5e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c88cd4c32889125cd4b50b7d6c53436b4bf61f3f1fa4acbb7494e778aa891f40.yml +openapi_spec_hash: d381528847ebbd39bbf825f9fe678925 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index b0ed24cc7..5b16ab167 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -326,7 +326,7 @@ def stop_payment( idempotency_key: str | None = None, ) -> CheckTransfer: """ - Request a stop payment on a Check Transfer + Stop payment on a Check Transfer Args: check_transfer_id: The identifier of the Check Transfer. @@ -665,7 +665,7 @@ async def stop_payment( idempotency_key: str | None = None, ) -> CheckTransfer: """ - Request a stop payment on a Check Transfer + Stop payment on a Check Transfer Args: check_transfer_id: The identifier of the Check Transfer. From b46de3d4db7c3696721b81ef902646d7ea5699fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 03:45:35 +0000 Subject: [PATCH 0707/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9114bb1ed..a5928db68 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.270.0" + ".": "0.271.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e466f44a9..7dfa5156f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.270.0" +version = "0.271.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b54cf92e2..4ea8201c8 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.270.0" # x-release-please-version +__version__ = "0.271.0" # x-release-please-version From 574f96e8d995bcddf148b3c5deddad1685e56f81 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 24 Jul 2025 14:24:33 +0000 Subject: [PATCH 0708/1325] chore(project): add settings file for vscode --- .gitignore | 1 - .vscode/settings.json | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 .vscode/settings.json diff --git a/.gitignore b/.gitignore index 877974080..95ceb189a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,4 @@ .prism.log -.vscode _dev __pycache__ diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 000000000..5b0103078 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.analysis.importFormat": "relative", +} From fad3d2dab15866bad1af04f2c2dc093477f94ef2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:40:10 +0000 Subject: [PATCH 0709/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c8c782764..093b8c5d0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c88cd4c32889125cd4b50b7d6c53436b4bf61f3f1fa4acbb7494e778aa891f40.yml -openapi_spec_hash: d381528847ebbd39bbf825f9fe678925 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-976ae14d2349a3599f9bd33dba52b3c12c265493a8af9e581c71b2e819b8de04.yml +openapi_spec_hash: d8a9fef4dfe082acdf834ac0339e800c config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 3e33714d5..c24bc4077 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1933,12 +1933,24 @@ class ElementCardReversal(BaseModel): pending_transaction_id: Optional[str] = None """The identifier of the Pending Transaction associated with this Card Reversal.""" + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's + presentment currency. + """ + reversal_amount: int """The amount of this reversal in the minor unit of the transaction's currency. For dollars, for example, this is cents. """ + reversal_presentment_amount: int + """ + The amount of this reversal in the minor unit of the transaction's presentment + currency. For dollars, for example, this is cents. + """ + reversal_reason: Optional[ Literal[ "reversed_by_customer", "reversed_by_network_or_acquirer", "reversed_by_point_of_sale", "partial_reversal" @@ -1973,6 +1985,12 @@ class ElementCardReversal(BaseModel): transaction's currency. For dollars, for example, this is cents. """ + updated_authorization_presentment_amount: int + """ + The amount left pending on the Card Authorization in the minor unit of the + transaction's presentment currency. For dollars, for example, this is cents. + """ + class ElementCardSettlementCashback(BaseModel): amount: str From 70442b67397bf118c6bcf60031734dfe2261db96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:41:09 +0000 Subject: [PATCH 0710/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a5928db68..5dc618705 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.271.0" + ".": "0.272.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7dfa5156f..bf9cb4874 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.271.0" +version = "0.272.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4ea8201c8..b295ac433 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.271.0" # x-release-please-version +__version__ = "0.272.0" # x-release-please-version From 44ebc9143c2808078aa2dd8ba335062886459129 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 19:44:29 +0000 Subject: [PATCH 0711/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 093b8c5d0..99a466a4b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-976ae14d2349a3599f9bd33dba52b3c12c265493a8af9e581c71b2e819b8de04.yml -openapi_spec_hash: d8a9fef4dfe082acdf834ac0339e800c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6ae166326e75ab7910187ae85e1002c088fb75b9e9246b4dcf2ddc0f1244afa4.yml +openapi_spec_hash: b41d1557dc1ff1028abbcd979823b2d5 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index c24bc4077..12acd2905 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1273,6 +1273,18 @@ class ElementCardIncrement(BaseModel): pending_transaction_id: Optional[str] = None """The identifier of the Pending Transaction associated with this Card Increment.""" + presentment_amount: int + """ + The amount of this increment in the minor unit of the transaction's presentment + currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + real_time_decision_id: Optional[str] = None """ The identifier of the Real-Time Decision sent to approve or decline this From 2e2910425297dc4f16733809c74daaddafcc2171 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:21:31 +0000 Subject: [PATCH 0712/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 588 +++++++++++++++++++++ src/increase/types/declined_transaction.py | 147 ++++++ src/increase/types/pending_transaction.py | 147 ++++++ src/increase/types/real_time_decision.py | 147 ++++++ 5 files changed, 1031 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 99a466a4b..1cc1a647b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6ae166326e75ab7910187ae85e1002c088fb75b9e9246b4dcf2ddc0f1244afa4.yml -openapi_spec_hash: b41d1557dc1ff1028abbcd979823b2d5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fa3dfeb071930598ed9243dd96db808cf54d4a455c99b1acceadc3335f1a387.yml +openapi_spec_hash: 18dfa4d31cd512dcd83b646e40fb2c86 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 12acd2905..2f5c7bbf0 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -13,6 +13,16 @@ "ElementCardAuthenticationChallenge", "ElementCardAuthenticationChallengeAttempt", "ElementCardAuthorization", + "ElementCardAuthorizationAdditionalAmounts", + "ElementCardAuthorizationAdditionalAmountsClinic", + "ElementCardAuthorizationAdditionalAmountsDental", + "ElementCardAuthorizationAdditionalAmountsPrescription", + "ElementCardAuthorizationAdditionalAmountsSurcharge", + "ElementCardAuthorizationAdditionalAmountsTotalCumulative", + "ElementCardAuthorizationAdditionalAmountsTotalHealthcare", + "ElementCardAuthorizationAdditionalAmountsTransit", + "ElementCardAuthorizationAdditionalAmountsUnknown", + "ElementCardAuthorizationAdditionalAmountsVision", "ElementCardAuthorizationNetworkDetails", "ElementCardAuthorizationNetworkDetailsVisa", "ElementCardAuthorizationNetworkIdentifiers", @@ -21,6 +31,16 @@ "ElementCardAuthorizationVerificationCardholderAddress", "ElementCardAuthorizationExpiration", "ElementCardDecline", + "ElementCardDeclineAdditionalAmounts", + "ElementCardDeclineAdditionalAmountsClinic", + "ElementCardDeclineAdditionalAmountsDental", + "ElementCardDeclineAdditionalAmountsPrescription", + "ElementCardDeclineAdditionalAmountsSurcharge", + "ElementCardDeclineAdditionalAmountsTotalCumulative", + "ElementCardDeclineAdditionalAmountsTotalHealthcare", + "ElementCardDeclineAdditionalAmountsTransit", + "ElementCardDeclineAdditionalAmountsUnknown", + "ElementCardDeclineAdditionalAmountsVision", "ElementCardDeclineNetworkDetails", "ElementCardDeclineNetworkDetailsVisa", "ElementCardDeclineNetworkIdentifiers", @@ -30,6 +50,16 @@ "ElementCardFuelConfirmation", "ElementCardFuelConfirmationNetworkIdentifiers", "ElementCardIncrement", + "ElementCardIncrementAdditionalAmounts", + "ElementCardIncrementAdditionalAmountsClinic", + "ElementCardIncrementAdditionalAmountsDental", + "ElementCardIncrementAdditionalAmountsPrescription", + "ElementCardIncrementAdditionalAmountsSurcharge", + "ElementCardIncrementAdditionalAmountsTotalCumulative", + "ElementCardIncrementAdditionalAmountsTotalHealthcare", + "ElementCardIncrementAdditionalAmountsTransit", + "ElementCardIncrementAdditionalAmountsUnknown", + "ElementCardIncrementAdditionalAmountsVision", "ElementCardIncrementNetworkIdentifiers", "ElementCardRefund", "ElementCardRefundCashback", @@ -56,6 +86,16 @@ "ElementCardSettlementPurchaseDetailsTravelAncillaryService", "ElementCardSettlementPurchaseDetailsTravelTripLeg", "ElementCardValidation", + "ElementCardValidationAdditionalAmounts", + "ElementCardValidationAdditionalAmountsClinic", + "ElementCardValidationAdditionalAmountsDental", + "ElementCardValidationAdditionalAmountsPrescription", + "ElementCardValidationAdditionalAmountsSurcharge", + "ElementCardValidationAdditionalAmountsTotalCumulative", + "ElementCardValidationAdditionalAmountsTotalHealthcare", + "ElementCardValidationAdditionalAmountsTransit", + "ElementCardValidationAdditionalAmountsUnknown", + "ElementCardValidationAdditionalAmountsVision", "ElementCardValidationNetworkDetails", "ElementCardValidationNetworkDetailsVisa", "ElementCardValidationNetworkIdentifiers", @@ -233,6 +273,136 @@ class ElementCardAuthentication(BaseModel): """ +class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardAuthorizationAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardAuthorizationAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardAuthorizationAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[ElementCardAuthorizationAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardAuthorizationAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardAuthorizationAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardAuthorizationAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardAuthorizationAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardAuthorizationAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardAuthorizationAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -461,6 +631,13 @@ class ElementCardAuthorization(BaseModel): processing. """ + additional_amounts: ElementCardAuthorizationAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + amount: int """The pending amount in the minor unit of the transaction's currency. @@ -663,6 +840,136 @@ class ElementCardAuthorizationExpiration(BaseModel): """ +class ElementCardDeclineAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardDeclineAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardDeclineAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardDeclineAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[ElementCardDeclineAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardDeclineAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardDeclineAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardDeclineAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardDeclineAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardDeclineAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardDeclineAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class ElementCardDeclineNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -891,6 +1198,13 @@ class ElementCardDecline(BaseModel): processing. """ + additional_amounts: ElementCardDeclineAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + amount: int """The declined amount in the minor unit of the destination account currency. @@ -1196,6 +1510,136 @@ class ElementCardFuelConfirmation(BaseModel): """ +class ElementCardIncrementAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardIncrementAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardIncrementAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardIncrementAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[ElementCardIncrementAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardIncrementAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardIncrementAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardIncrementAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardIncrementAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardIncrementAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardIncrementAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class ElementCardIncrementNetworkIdentifiers(BaseModel): retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1232,6 +1676,13 @@ class ElementCardIncrement(BaseModel): processing. """ + additional_amounts: ElementCardIncrementAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + amount: int """The amount of this increment in the minor unit of the transaction's currency. @@ -2570,6 +3021,136 @@ class ElementCardSettlement(BaseModel): """ +class ElementCardValidationAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardValidationAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardValidationAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardValidationAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[ElementCardValidationAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardValidationAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardValidationAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardValidationAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardValidationAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardValidationAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardValidationAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class ElementCardValidationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -2798,6 +3379,13 @@ class ElementCardValidation(BaseModel): processing. """ + additional_amounts: ElementCardValidationAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index a71f24c81..ead0f33b2 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -11,6 +11,16 @@ "Source", "SourceACHDecline", "SourceCardDecline", + "SourceCardDeclineAdditionalAmounts", + "SourceCardDeclineAdditionalAmountsClinic", + "SourceCardDeclineAdditionalAmountsDental", + "SourceCardDeclineAdditionalAmountsPrescription", + "SourceCardDeclineAdditionalAmountsSurcharge", + "SourceCardDeclineAdditionalAmountsTotalCumulative", + "SourceCardDeclineAdditionalAmountsTotalHealthcare", + "SourceCardDeclineAdditionalAmountsTransit", + "SourceCardDeclineAdditionalAmountsUnknown", + "SourceCardDeclineAdditionalAmountsVision", "SourceCardDeclineNetworkDetails", "SourceCardDeclineNetworkDetailsVisa", "SourceCardDeclineNetworkIdentifiers", @@ -111,6 +121,136 @@ class SourceACHDecline(BaseModel): """ +class SourceCardDeclineAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardDeclineAdditionalAmounts(BaseModel): + clinic: Optional[SourceCardDeclineAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[SourceCardDeclineAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[SourceCardDeclineAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[SourceCardDeclineAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[SourceCardDeclineAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[SourceCardDeclineAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[SourceCardDeclineAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[SourceCardDeclineAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[SourceCardDeclineAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class SourceCardDeclineNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -339,6 +479,13 @@ class SourceCardDecline(BaseModel): processing. """ + additional_amounts: SourceCardDeclineAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + amount: int """The declined amount in the minor unit of the destination account currency. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index cc78b0eaf..7aa126d5d 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -12,6 +12,16 @@ "SourceAccountTransferInstruction", "SourceACHTransferInstruction", "SourceCardAuthorization", + "SourceCardAuthorizationAdditionalAmounts", + "SourceCardAuthorizationAdditionalAmountsClinic", + "SourceCardAuthorizationAdditionalAmountsDental", + "SourceCardAuthorizationAdditionalAmountsPrescription", + "SourceCardAuthorizationAdditionalAmountsSurcharge", + "SourceCardAuthorizationAdditionalAmountsTotalCumulative", + "SourceCardAuthorizationAdditionalAmountsTotalHealthcare", + "SourceCardAuthorizationAdditionalAmountsTransit", + "SourceCardAuthorizationAdditionalAmountsUnknown", + "SourceCardAuthorizationAdditionalAmountsVision", "SourceCardAuthorizationNetworkDetails", "SourceCardAuthorizationNetworkDetailsVisa", "SourceCardAuthorizationNetworkIdentifiers", @@ -61,6 +71,136 @@ class SourceACHTransferInstruction(BaseModel): """The identifier of the ACH Transfer that led to this Pending Transaction.""" +class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardAuthorizationAdditionalAmounts(BaseModel): + clinic: Optional[SourceCardAuthorizationAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[SourceCardAuthorizationAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[SourceCardAuthorizationAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[SourceCardAuthorizationAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[SourceCardAuthorizationAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[SourceCardAuthorizationAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[SourceCardAuthorizationAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[SourceCardAuthorizationAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[SourceCardAuthorizationAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -289,6 +429,13 @@ class SourceCardAuthorization(BaseModel): processing. """ + additional_amounts: SourceCardAuthorizationAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + amount: int """The pending amount in the minor unit of the transaction's currency. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 3fb13abc1..19b4f1d34 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -11,6 +11,16 @@ "CardAuthentication", "CardAuthenticationChallenge", "CardAuthorization", + "CardAuthorizationAdditionalAmounts", + "CardAuthorizationAdditionalAmountsClinic", + "CardAuthorizationAdditionalAmountsDental", + "CardAuthorizationAdditionalAmountsPrescription", + "CardAuthorizationAdditionalAmountsSurcharge", + "CardAuthorizationAdditionalAmountsTotalCumulative", + "CardAuthorizationAdditionalAmountsTotalHealthcare", + "CardAuthorizationAdditionalAmountsTransit", + "CardAuthorizationAdditionalAmountsUnknown", + "CardAuthorizationAdditionalAmountsVision", "CardAuthorizationNetworkDetails", "CardAuthorizationNetworkDetailsVisa", "CardAuthorizationNetworkIdentifiers", @@ -74,6 +84,136 @@ class CardAuthenticationChallenge(BaseModel): """ +class CardAuthorizationAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field.""" + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardAuthorizationAdditionalAmounts(BaseModel): + clinic: Optional[CardAuthorizationAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[CardAuthorizationAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[CardAuthorizationAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[CardAuthorizationAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[CardAuthorizationAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[CardAuthorizationAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[CardAuthorizationAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[CardAuthorizationAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[CardAuthorizationAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + class CardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -320,6 +460,13 @@ class CardAuthorization(BaseModel): account_id: str """The identifier of the Account the authorization will debit.""" + additional_amounts: CardAuthorizationAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + card_id: str """The identifier of the Card that is being authorized.""" From 3efa71e00f0b0ecdbaa11d8ea3a54440803a3b19 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:22:30 +0000 Subject: [PATCH 0713/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5dc618705..f1d4e1531 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.272.0" + ".": "0.273.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bf9cb4874..7803d62da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.272.0" +version = "0.273.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b295ac433..8ee4663e6 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.272.0" # x-release-please-version +__version__ = "0.273.0" # x-release-please-version From fafea0a08b7d7a928bceb459e4ddcb69256d0daf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:31:06 +0000 Subject: [PATCH 0714/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ src/increase/types/declined_transaction.py | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1cc1a647b..931309613 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5fa3dfeb071930598ed9243dd96db808cf54d4a455c99b1acceadc3335f1a387.yml -openapi_spec_hash: 18dfa4d31cd512dcd83b646e40fb2c86 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-743c412709d3e4ca1ed8b1e2107036c9658afe40dd538c0576f64ae302087b4f.yml +openapi_spec_hash: 2a5da3cdf8dfb91dbd0f875cc180a3a1 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 2f5c7bbf0..7dc01f57b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1247,6 +1247,12 @@ class ElementCardDecline(BaseModel): voucher authorization, where funds are credited to the cardholder. """ + incremented_card_authorization_id: Optional[str] = None + """ + The identifier of the card authorization this request attempted to incrementally + authorize. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index ead0f33b2..73fa89d16 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -528,6 +528,12 @@ class SourceCardDecline(BaseModel): voucher authorization, where funds are credited to the cardholder. """ + incremented_card_authorization_id: Optional[str] = None + """ + The identifier of the card authorization this request attempted to incrementally + authorize. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card From 406f8efc1b0568a039c1fd10f86883052378f163 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 29 Jul 2025 20:32:03 +0000 Subject: [PATCH 0715/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1d4e1531..72584123a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.273.0" + ".": "0.274.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7803d62da..eb172cd7f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.273.0" +version = "0.274.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8ee4663e6..ace0261ad 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.273.0" # x-release-please-version +__version__ = "0.274.0" # x-release-please-version From 365f16476a4da2b2b2098bae27516c3a2727d750 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 30 Jul 2025 17:03:32 +0000 Subject: [PATCH 0716/1325] feat(client): support file upload requests --- src/increase/_base_client.py | 5 ++++- src/increase/_files.py | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index f62f9d0aa..8f32ec421 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -532,7 +532,10 @@ def _build_request( is_body_allowed = options.method.lower() != "get" if is_body_allowed: - kwargs["json"] = json_data if is_given(json_data) else None + if isinstance(json_data, bytes): + kwargs["content"] = json_data + else: + kwargs["json"] = json_data if is_given(json_data) else None kwargs["files"] = files else: headers.pop("Content-Type", None) diff --git a/src/increase/_files.py b/src/increase/_files.py index e0ed1db41..08afe4fac 100644 --- a/src/increase/_files.py +++ b/src/increase/_files.py @@ -69,12 +69,12 @@ def _transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], _read_file_content(file[1]), *file[2:]) + return (file[0], read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -def _read_file_content(file: FileContent) -> HttpxFileContent: +def read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return pathlib.Path(file).read_bytes() return file @@ -111,12 +111,12 @@ async def _async_transform_file(file: FileTypes) -> HttpxFileTypes: return file if is_tuple_t(file): - return (file[0], await _async_read_file_content(file[1]), *file[2:]) + return (file[0], await async_read_file_content(file[1]), *file[2:]) raise TypeError(f"Expected file types input to be a FileContent type or to be a tuple") -async def _async_read_file_content(file: FileContent) -> HttpxFileContent: +async def async_read_file_content(file: FileContent) -> HttpxFileContent: if isinstance(file, os.PathLike): return await anyio.Path(file).read_bytes() From 58e80a1c151e1693e44d67d2138b9fa88d32e077 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 00:03:51 +0000 Subject: [PATCH 0717/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 931309613..5ca6ef24d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-743c412709d3e4ca1ed8b1e2107036c9658afe40dd538c0576f64ae302087b4f.yml -openapi_spec_hash: 2a5da3cdf8dfb91dbd0f875cc180a3a1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7676b5dbe8bdcdb0ffd762bb7faef842a7a005be8fe9b560f4c5317db2f0beba.yml +openapi_spec_hash: b61b1ed2f6851a2c1b249785439a946e config_hash: a185e9a72778cc4658ea73fb3a7f1354 From 7abf692a4e590101c10f2a896240f533a2b76ffa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:13:30 +0000 Subject: [PATCH 0718/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/physical_card_profiles.py | 8 ++++++++ src/increase/types/physical_card_profile_clone_params.py | 3 +++ tests/api_resources/test_physical_card_profiles.py | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5ca6ef24d..9c25f999b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7676b5dbe8bdcdb0ffd762bb7faef842a7a005be8fe9b560f4c5317db2f0beba.yml -openapi_spec_hash: b61b1ed2f6851a2c1b249785439a946e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d7dabd389c8b061d384ec0a57cc7c8a426f12c87dabce0989af22a192a5fcfa9.yml +openapi_spec_hash: 35af34c9cffe387af0519e2df596d145 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 6b7c2b39a..e12191d9d 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -260,6 +260,7 @@ def clone( description: str | NotGiven = NOT_GIVEN, front_image_file_id: str | NotGiven = NOT_GIVEN, front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN, + program_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -285,6 +286,8 @@ def clone( front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. + program_id: The identifier of the Program to use for the cloned Physical Card Profile. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -308,6 +311,7 @@ def clone( "description": description, "front_image_file_id": front_image_file_id, "front_text": front_text, + "program_id": program_id, }, physical_card_profile_clone_params.PhysicalCardProfileCloneParams, ), @@ -556,6 +560,7 @@ async def clone( description: str | NotGiven = NOT_GIVEN, front_image_file_id: str | NotGiven = NOT_GIVEN, front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN, + program_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -581,6 +586,8 @@ async def clone( front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. + program_id: The identifier of the Program to use for the cloned Physical Card Profile. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -604,6 +611,7 @@ async def clone( "description": description, "front_image_file_id": front_image_file_id, "front_text": front_text, + "program_id": program_id, }, physical_card_profile_clone_params.PhysicalCardProfileCloneParams, ), diff --git a/src/increase/types/physical_card_profile_clone_params.py b/src/increase/types/physical_card_profile_clone_params.py index 3be52b966..917b9becf 100644 --- a/src/increase/types/physical_card_profile_clone_params.py +++ b/src/increase/types/physical_card_profile_clone_params.py @@ -27,6 +27,9 @@ class PhysicalCardProfileCloneParams(TypedDict, total=False): information. """ + program_id: str + """The identifier of the Program to use for the cloned Physical Card Profile.""" + class FrontText(TypedDict, total=False): line1: Required[str] diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 1a0ebb7af..1e86b92f3 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -212,6 +212,7 @@ def test_method_clone_with_all_params(self, client: Increase) -> None: "line1": "x", "line2": "x", }, + program_id="program_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @@ -446,6 +447,7 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) - "line1": "x", "line2": "x", }, + program_id="program_id", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) From 141eab65604305da318415f117c6833163d0ad88 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:34:39 +0000 Subject: [PATCH 0719/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 7 +++++-- src/increase/types/entity_create_params.py | 7 +++++-- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9c25f999b..00b0b5aa0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d7dabd389c8b061d384ec0a57cc7c8a426f12c87dabce0989af22a192a5fcfa9.yml -openapi_spec_hash: 35af34c9cffe387af0519e2df596d145 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5afe14a5606cebef2ccc6c4781d566b43509e01513e8e02e41adbdeaf3275f48.yml +openapi_spec_hash: 56857e37c0c6131096bf519d91ef76d2 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 46c10eba8..4fdaeebb4 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -203,10 +203,13 @@ class GovernmentAuthority(BaseModel): authorized_persons: List[GovernmentAuthorityAuthorizedPerson] """The identifying details of authorized persons of the government authority.""" - category: Literal["municipality"] + category: Literal["municipality", "state_agency", "state_government", "federal_agency"] """The category of the government authority. - - `municipality` - The Public Entity is a Municipality. + - `municipality` - A municipality. + - `state_agency` - A state agency. + - `state_government` - A state government. + - `federal_agency` - A federal agency. """ name: str diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index bf2ea8aae..47559b358 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -380,10 +380,13 @@ class GovernmentAuthority(TypedDict, total=False): authorized_persons: Required[Iterable[GovernmentAuthorityAuthorizedPerson]] """The identifying details of authorized officials acting on the entity's behalf.""" - category: Required[Literal["municipality"]] + category: Required[Literal["municipality", "state_agency", "state_government", "federal_agency"]] """The category of the government authority. - - `municipality` - The Public Entity is a Municipality. + - `municipality` - A municipality. + - `state_agency` - A state agency. + - `state_government` - A state government. + - `federal_agency` - A federal agency. """ name: Required[str] From e4ab7b7ba5eabb999b261a37c204a3ae70aa0a26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 1 Aug 2025 16:35:38 +0000 Subject: [PATCH 0720/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 72584123a..dfd2bb98a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.274.0" + ".": "0.275.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index eb172cd7f..af1e7dca8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.274.0" +version = "0.275.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ace0261ad..9a933941f 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.274.0" # x-release-please-version +__version__ = "0.275.0" # x-release-please-version From 89d8038626691474d108062741f65b4381851298 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:49:34 +0000 Subject: [PATCH 0721/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/ach_transfers.py | 6 ++++-- src/increase/types/ach_transfer.py | 3 ++- src/increase/types/ach_transfer_create_params.py | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 00b0b5aa0..7168a74e1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5afe14a5606cebef2ccc6c4781d566b43509e01513e8e02e41adbdeaf3275f48.yml -openapi_spec_hash: 56857e37c0c6131096bf519d91ef76d2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aceb2cce1f9a46b1059a04de979b4c40210190639a4c264944b4402042168804.yml +openapi_spec_hash: 5b4ea7615676e742cea44d107b8038ca config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index d6fa46286..b8ff47baa 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -58,7 +58,7 @@ def create( company_name: str | NotGiven = NOT_GIVEN, destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, individual_name: str | NotGiven = NOT_GIVEN, preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, @@ -128,6 +128,7 @@ def create( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A bank's general ledger. Uncommon. individual_id: Your identifier for the transfer recipient. @@ -424,7 +425,7 @@ async def create( company_name: str | NotGiven = NOT_GIVEN, destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, external_account_id: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger"] | NotGiven = NOT_GIVEN, individual_id: str | NotGiven = NOT_GIVEN, individual_name: str | NotGiven = NOT_GIVEN, preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, @@ -494,6 +495,7 @@ async def create( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A bank's general ledger. Uncommon. individual_id: Your identifier for the transfer recipient. diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 63075c23a..b6ed76965 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -699,11 +699,12 @@ class ACHTransfer(BaseModel): external_account_id: Optional[str] = None """The identifier of the External Account the transfer was made to, if any.""" - funding: Literal["checking", "savings"] + funding: Literal["checking", "savings", "general_ledger"] """The type of the account to which the transfer will be sent. - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A bank's general ledger. Uncommon. """ idempotency_key: Optional[str] = None diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index c31dc8569..aabf372cd 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -92,11 +92,12 @@ class ACHTransferCreateParams(TypedDict, total=False): must be absent. """ - funding: Literal["checking", "savings"] + funding: Literal["checking", "savings", "general_ledger"] """The type of the account to which the transfer will be sent. - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A bank's general ledger. Uncommon. """ individual_id: str From 332ac5bea5a9085b867bdf735a5c87d21b2ecced Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 4 Aug 2025 16:54:24 +0000 Subject: [PATCH 0722/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dfd2bb98a..bac125e6e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.275.0" + ".": "0.276.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index af1e7dca8..3de748765 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.275.0" +version = "0.276.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9a933941f..9c13b86dd 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.275.0" # x-release-please-version +__version__ = "0.276.0" # x-release-please-version From a71a965a89ed401c096b74002d874e85d4a80f12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 5 Aug 2025 11:23:40 +0000 Subject: [PATCH 0723/1325] chore(internal): fix ruff target version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 3de748765..bf9422a67 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -159,7 +159,7 @@ reportPrivateUsage = false [tool.ruff] line-length = 120 output-format = "grouped" -target-version = "py37" +target-version = "py38" [tool.ruff.format] docstring-code-format = true From 30ba1af72bfa8fdce8924cf0a70a160c7acee52d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 20:51:18 +0000 Subject: [PATCH 0724/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/transaction.py | 63 +++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 3 files changed, 66 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7168a74e1..a81891058 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aceb2cce1f9a46b1059a04de979b4c40210190639a4c264944b4402042168804.yml -openapi_spec_hash: 5b4ea7615676e742cea44d107b8038ca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-147712ba3a72b1dea9a966f9b0ebc99ccebe38e1789426115f3b4c8977ed03c8.yml +openapi_spec_hash: 6c6fc01c8ea4f34b3c2553928945c100 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 406e5145b..9699a022f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -14,6 +14,8 @@ "SourceACHTransferRejection", "SourceACHTransferReturn", "SourceCardDisputeAcceptance", + "SourceCardDisputeFinancial", + "SourceCardDisputeFinancialVisa", "SourceCardDisputeLoss", "SourceCardPushTransferAcceptance", "SourceCardRefund", @@ -393,6 +395,57 @@ class SourceCardDisputeAcceptance(BaseModel): """ +class SourceCardDisputeFinancialVisa(BaseModel): + event_type: Literal[ + "chargeback_submitted", + "merchant_prearbitration_declined", + "merchant_prearbitration_received", + "represented", + "user_prearbitration_declined", + "user_prearbitration_submitted", + ] + """The type of card dispute financial event. + + - `chargeback_submitted` - The user's chargeback was submitted. + - `merchant_prearbitration_declined` - The user declined the merchant's request + for pre-arbitration. + - `merchant_prearbitration_received` - The merchant's request for + pre-arbitration was received. + - `represented` - The transaction was represented by the merchant. + - `user_prearbitration_declined` - The user's request for pre-arbitration was + declined. + - `user_prearbitration_submitted` - The user's request for pre-arbitration was + submitted. + """ + + +class SourceCardDisputeFinancial(BaseModel): + amount: int + """The amount of the financial event.""" + + card_dispute_id: str + """The identifier of the Card Dispute the financial event is associated with.""" + + network: Literal["visa"] + """The network that the Card Dispute is associated with. + + - `visa` - Visa: details will be under the `visa` object. + """ + + transaction_id: str + """ + The identifier of the Transaction that was created to credit or debit the + disputed funds to or from your account. + """ + + visa: Optional[SourceCardDisputeFinancialVisa] = None + """ + Information for events related to card dispute for card payments processed over + Visa's network. This field will be present in the JSON response if and only if + `network` is equal to `visa`. + """ + + class SourceCardDisputeLoss(BaseModel): card_dispute_id: str """The identifier of the Card Dispute that was lost.""" @@ -2352,6 +2405,13 @@ class Source(BaseModel): Dispute. """ + card_dispute_financial: Optional[SourceCardDisputeFinancial] = None + """A Card Dispute Financial object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_dispute_financial`. Financial event related to a Card Dispute. + """ + card_dispute_loss: Optional[SourceCardDisputeLoss] = None """A Card Dispute Loss object. @@ -2410,6 +2470,7 @@ class Source(BaseModel): "ach_transfer_return", "cashback_payment", "card_dispute_acceptance", + "card_dispute_financial", "card_dispute_loss", "card_refund", "card_settlement", @@ -2453,6 +2514,8 @@ class Source(BaseModel): `cashback_payment` object. - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the `card_dispute_acceptance` object. + - `card_dispute_financial` - Card Dispute Financial: details will be under the + `card_dispute_financial` object. - `card_dispute_loss` - Card Dispute Loss: details will be under the `card_dispute_loss` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 3502becb7..6f94d99c2 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -46,6 +46,7 @@ class TransactionListParams(TypedDict, total=False): "ach_transfer_return", "cashback_payment", "card_dispute_acceptance", + "card_dispute_financial", "card_dispute_loss", "card_refund", "card_settlement", From 7dc697a69648e916732eacaf6663fdbd2b3a725a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 20:54:04 +0000 Subject: [PATCH 0725/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bac125e6e..ebebec494 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.276.0" + ".": "0.277.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bf9422a67..af87aad39 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.276.0" +version = "0.277.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9c13b86dd..f9c7c4ada 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.276.0" # x-release-please-version +__version__ = "0.277.0" # x-release-please-version From b8785de623f72f924abd4e77966ea299dda7131d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:43:17 +0000 Subject: [PATCH 0726/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 24 +++++++++++++----------- 2 files changed, 15 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index a81891058..f77503ab4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-147712ba3a72b1dea9a966f9b0ebc99ccebe38e1789426115f3b4c8977ed03c8.yml -openapi_spec_hash: 6c6fc01c8ea4f34b3c2553928945c100 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aca6b5e100fcf8da7f6fc67bfbf47543f197f1c3fed52d5f1147b7cbad515546.yml +openapi_spec_hash: 369011703600762a5a5d701b4e843f7b config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 9699a022f..dea8dd407 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -398,24 +398,26 @@ class SourceCardDisputeAcceptance(BaseModel): class SourceCardDisputeFinancialVisa(BaseModel): event_type: Literal[ "chargeback_submitted", - "merchant_prearbitration_declined", - "merchant_prearbitration_received", + "merchant_prearbitration_request_decline_submitted", + "merchant_prearbitration_request_received", "represented", - "user_prearbitration_declined", - "user_prearbitration_submitted", + "user_prearbitration_request_decline_received", + "user_prearbitration_request_submitted", + "user_withdrawal_submitted", ] """The type of card dispute financial event. - `chargeback_submitted` - The user's chargeback was submitted. - - `merchant_prearbitration_declined` - The user declined the merchant's request - for pre-arbitration. - - `merchant_prearbitration_received` - The merchant's request for + - `merchant_prearbitration_request_decline_submitted` - The user declined the + merchant's request for pre-arbitration. + - `merchant_prearbitration_request_received` - The merchant's request for pre-arbitration was received. - `represented` - The transaction was represented by the merchant. - - `user_prearbitration_declined` - The user's request for pre-arbitration was - declined. - - `user_prearbitration_submitted` - The user's request for pre-arbitration was - submitted. + - `user_prearbitration_request_decline_received` - The user's request for + pre-arbitration was declined. + - `user_prearbitration_request_submitted` - The user's request for + pre-arbitration was submitted. + - `user_withdrawal_submitted` - The user withdrew from the dispute. """ From e9934cbcb5e57d8e528f8a37b89362edec122c58 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 6 Aug 2025 23:45:51 +0000 Subject: [PATCH 0727/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ebebec494..156b3887c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.277.0" + ".": "0.278.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index af87aad39..1da469412 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.277.0" +version = "0.278.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f9c7c4ada..d3f4d639c 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.277.0" # x-release-please-version +__version__ = "0.278.0" # x-release-please-version From 5c259af19b5bf0b0974bba56e50f51f3f41dc0a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 04:57:38 +0000 Subject: [PATCH 0728/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 4 ++++ src/increase/types/file.py | 2 ++ src/increase/types/file_create_params.py | 2 ++ src/increase/types/file_list_params.py | 1 + tests/api_resources/test_files.py | 4 ++-- 6 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index f77503ab4..ae7a72a04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aca6b5e100fcf8da7f6fc67bfbf47543f197f1c3fed52d5f1147b7cbad515546.yml -openapi_spec_hash: 369011703600762a5a5d701b4e843f7b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-66fad62aee38079ae7b0574a128763512b551d0b0f107a056bc981123d8e348d.yml +openapi_spec_hash: 299b75e8d2f36e6fe3d2df4c10d2557c config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index a9ce42f63..28ed80ac5 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -50,6 +50,7 @@ def create( *, file: FileTypes, purpose: Literal[ + "card_dispute_attachment", "check_image_front", "check_image_back", "mailed_check_image", @@ -88,6 +89,7 @@ def create( purpose: What the File will be used for in Increase's systems. + - `card_dispute_attachment` - A file to be attached to a Card Dispute. - `check_image_front` - An image of the front of a check, used for check deposits. - `check_image_back` - An image of the back of a check, used for check deposits. @@ -273,6 +275,7 @@ async def create( *, file: FileTypes, purpose: Literal[ + "card_dispute_attachment", "check_image_front", "check_image_back", "mailed_check_image", @@ -311,6 +314,7 @@ async def create( purpose: What the File will be used for in Increase's systems. + - `card_dispute_attachment` - A file to be attached to a Card Dispute. - `check_image_front` - An image of the front of a check, used for check deposits. - `check_image_back` - An image of the back of a check, used for check deposits. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 35e9bd3c8..73af3da80 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -41,6 +41,7 @@ class File(BaseModel): """The MIME type of the file.""" purpose: Literal[ + "card_dispute_attachment", "check_image_front", "check_image_back", "processed_check_image_front", @@ -75,6 +76,7 @@ class File(BaseModel): We may add additional possible values for this enum over time; your application should be able to handle such additions gracefully. + - `card_dispute_attachment` - A file to be attached to a Card Dispute. - `check_image_front` - An image of the front of a check, used for check deposits. - `check_image_back` - An image of the back of a check, used for check deposits. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index 2bf3ce98c..e55d115a2 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -20,6 +20,7 @@ class FileCreateParams(TypedDict, total=False): purpose: Required[ Literal[ + "card_dispute_attachment", "check_image_front", "check_image_back", "mailed_check_image", @@ -40,6 +41,7 @@ class FileCreateParams(TypedDict, total=False): ] """What the File will be used for in Increase's systems. + - `card_dispute_attachment` - A file to be attached to a Card Dispute. - `check_image_front` - An image of the front of a check, used for check deposits. - `check_image_back` - An image of the back of a check, used for check deposits. diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 6c4235ab6..c6b9a4def 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -65,6 +65,7 @@ class CreatedAt(TypedDict, total=False): { "in": List[ Literal[ + "card_dispute_attachment", "check_image_front", "check_image_back", "processed_check_image_front", diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 06f7bc080..1862590f8 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -117,7 +117,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front"]}, + purpose={"in": ["card_dispute_attachment"]}, ) assert_matches_type(SyncPage[File], file, path=["response"]) @@ -245,7 +245,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", idempotency_key="x", limit=1, - purpose={"in": ["check_image_front"]}, + purpose={"in": ["card_dispute_attachment"]}, ) assert_matches_type(AsyncPage[File], file, path=["response"]) From 95565e6b780ec65a48cbd7057872aeb73cf452d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 05:00:07 +0000 Subject: [PATCH 0729/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 156b3887c..fd675b6dc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.278.0" + ".": "0.279.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1da469412..aff6f0d8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.278.0" +version = "0.279.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d3f4d639c..ab8ae5950 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.278.0" # x-release-please-version +__version__ = "0.279.0" # x-release-please-version From 1b60e35ce6ed43e35cce50eeff72506e3319e28b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:23:42 +0000 Subject: [PATCH 0730/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 25 ++++++++++++------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/.stats.yml b/.stats.yml index ae7a72a04..318e5b772 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-66fad62aee38079ae7b0574a128763512b551d0b0f107a056bc981123d8e348d.yml -openapi_spec_hash: 299b75e8d2f36e6fe3d2df4c10d2557c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-244805b184601a0639e868cb601337a5ebe0f259576a7e22d46c881ee22e17d3.yml +openapi_spec_hash: a667a8fca7bc57f82f22ddc2a9829e19 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index dea8dd407..f594635f8 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -398,25 +398,24 @@ class SourceCardDisputeAcceptance(BaseModel): class SourceCardDisputeFinancialVisa(BaseModel): event_type: Literal[ "chargeback_submitted", - "merchant_prearbitration_request_decline_submitted", - "merchant_prearbitration_request_received", + "merchant_prearbitration_decline_submitted", + "merchant_prearbitration_received", "represented", - "user_prearbitration_request_decline_received", - "user_prearbitration_request_submitted", + "user_prearbitration_decline_received", + "user_prearbitration_submitted", "user_withdrawal_submitted", ] """The type of card dispute financial event. - `chargeback_submitted` - The user's chargeback was submitted. - - `merchant_prearbitration_request_decline_submitted` - The user declined the - merchant's request for pre-arbitration. - - `merchant_prearbitration_request_received` - The merchant's request for - pre-arbitration was received. - - `represented` - The transaction was represented by the merchant. - - `user_prearbitration_request_decline_received` - The user's request for - pre-arbitration was declined. - - `user_prearbitration_request_submitted` - The user's request for - pre-arbitration was submitted. + - `merchant_prearbitration_decline_submitted` - The user declined the merchant's + pre-arbitration submission. + - `merchant_prearbitration_received` - The merchant's pre-arbitration submission + was received. + - `represented` - The transaction was re-presented by the merchant. + - `user_prearbitration_decline_received` - The user's pre-arbitration was + declined by the merchant. + - `user_prearbitration_submitted` - The user's pre-arbitration was submitted. - `user_withdrawal_submitted` - The user withdrew from the dispute. """ From 83e9d7fe7d42d12634411d432f8c491b2ccf7d94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 7 Aug 2025 22:26:21 +0000 Subject: [PATCH 0731/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fd675b6dc..f3620a283 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.279.0" + ".": "0.280.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index aff6f0d8a..18a8d2e8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.279.0" +version = "0.280.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ab8ae5950..43e3e849a 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.279.0" # x-release-please-version +__version__ = "0.280.0" # x-release-please-version From 5438a5ed7db0595eb213c5a76be35f396d7a6aac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 17:58:00 +0000 Subject: [PATCH 0732/1325] chore: update @stainless-api/prism-cli to v5.15.0 --- scripts/mock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/mock b/scripts/mock index d2814ae6a..0b28f6ea2 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,7 +21,7 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & # Wait for server to come online echo -n "Waiting for server" @@ -37,5 +37,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stainless-api/prism-cli@5.8.5 -- prism mock "$URL" + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" fi From b003b44c9a0afc87286d93cb316d0a7fb1cdc7bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 8 Aug 2025 21:23:36 +0000 Subject: [PATCH 0733/1325] chore(internal): update comment in script --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index 2b8784567..dbeda2d21 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! prism_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the prism command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stoplight/prism-cli@~5.3.2 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" echo exit 1 From 1a6120228d383bd9800e3803c2e2b00e3f97e599 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:06:34 +0000 Subject: [PATCH 0734/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_wire_transfer.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 318e5b772..4b3aa93d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-244805b184601a0639e868cb601337a5ebe0f259576a7e22d46c881ee22e17d3.yml -openapi_spec_hash: a667a8fca7bc57f82f22ddc2a9829e19 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-65d55098340df71e6f5c251c62e6853ad5184102c603d9f74622e8b33581c800.yml +openapi_spec_hash: 9f772e02b53a65c6e8ada7ac684117fb config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 2a83ce566..8157ac696 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -126,3 +126,6 @@ class InboundWireTransfer(BaseModel): For this resource it will always be `inbound_wire_transfer`. """ + + wire_drawdown_request_id: Optional[str] = None + """The wire drawdown request the inbound wire transfer is fulfilling.""" From 63fc10ca9054a77ec04cc0a9cd3331d96fe2f27e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 22:09:12 +0000 Subject: [PATCH 0735/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f3620a283..b8478cb7b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.280.0" + ".": "0.281.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 18a8d2e8b..cfb52b9ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.280.0" +version = "0.281.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 43e3e849a..6c4d6bc42 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.280.0" # x-release-please-version +__version__ = "0.281.0" # x-release-please-version From 18a92f234fb7acfe35e4489a545336c814ac2085 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 23:20:37 +0000 Subject: [PATCH 0736/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 12 ++++++++++++ src/increase/types/event.py | 6 ++++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 6 ++++++ .../types/event_subscription_create_params.py | 6 ++++++ 6 files changed, 34 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4b3aa93d3..8e3dd65ec 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-65d55098340df71e6f5c251c62e6853ad5184102c603d9f74622e8b33581c800.yml -openapi_spec_hash: 9f772e02b53a65c6e8ada7ac684117fb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-37ce9b56dd0adf1b5dce2b5135f6fe1cf22244fab923c8934dd98488f69c3ae3.yml +openapi_spec_hash: a478c8758b24bbf44a6a6a262f5c0a63 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index c99568526..9ffdd354b 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -110,6 +110,8 @@ def create( "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -257,6 +259,10 @@ def create( Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. @@ -589,6 +595,8 @@ async def create( "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -736,6 +744,10 @@ async def create( Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event.py b/src/increase/types/event.py index e83b425af..b0f8da02c 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -79,6 +79,8 @@ class Event(BaseModel): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -209,6 +211,10 @@ class Event(BaseModel): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 2c9d7f5be..a28518a30 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -94,6 +94,8 @@ class EventListParams(TypedDict, total=False): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 75ec1ff71..6ebbe1f19 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -92,6 +92,8 @@ class EventSubscription(BaseModel): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -222,6 +224,10 @@ class EventSubscription(BaseModel): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 9bc5d78fb..eb38e7cbc 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -78,6 +78,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "intrafi_account_enrollment.updated", "intrafi_exclusion.created", "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -207,6 +209,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Enrollment is updated. - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. From 55f22cf107f020b0313e6b6938a93eb9a04d4f5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 11 Aug 2025 23:23:11 +0000 Subject: [PATCH 0737/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b8478cb7b..633bf86d7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.281.0" + ".": "0.282.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cfb52b9ca..b5f85b165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.281.0" +version = "0.282.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6c4d6bc42..505020c1c 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.281.0" # x-release-please-version +__version__ = "0.282.0" # x-release-please-version From 90db53755fb70f140a40975521b5833caf586fbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 16:55:05 +0000 Subject: [PATCH 0738/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 5 +++++ src/increase/types/wire_transfer.py | 5 +++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e3dd65ec..70b3003b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-37ce9b56dd0adf1b5dce2b5135f6fe1cf22244fab923c8934dd98488f69c3ae3.yml -openapi_spec_hash: a478c8758b24bbf44a6a6a262f5c0a63 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2ed4af5a2141f4524ffc8306c747f21c77e00fc5d478e08df7cbe53c92764038.yml +openapi_spec_hash: f693361a7fb14090da484e6a02b86021 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index f594635f8..38db4f4b2 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2125,6 +2125,11 @@ class SourceInboundWireReversal(BaseModel): the transfer. """ + originator_to_beneficiary_information: Optional[str] = None + """ + Additional information included in the wire reversal by the reversal originator. + """ + previous_message_input_cycle_date: date """ The Fedwire cycle date for the wire transfer that is being reversed by this diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 969711df4..ab6989d18 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -123,6 +123,11 @@ class Reversal(BaseModel): the transfer. """ + originator_to_beneficiary_information: Optional[str] = None + """ + Additional information included in the wire reversal by the reversal originator. + """ + previous_message_input_cycle_date: date """ The Fedwire cycle date for the wire transfer that is being reversed by this From f934dde6b158e742c5648126d0cf1d82fadac568 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 16:57:56 +0000 Subject: [PATCH 0739/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 633bf86d7..6dcf4e374 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.282.0" + ".": "0.283.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b5f85b165..e523c88bc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.282.0" +version = "0.283.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 505020c1c..377e1d849 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.282.0" # x-release-please-version +__version__ = "0.283.0" # x-release-please-version From 821d7c9a6fd7ecd943d1198dc5b4c576aa654c43 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 12 Aug 2025 19:00:57 +0000 Subject: [PATCH 0740/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 70b3003b4..23af125ad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2ed4af5a2141f4524ffc8306c747f21c77e00fc5d478e08df7cbe53c92764038.yml -openapi_spec_hash: f693361a7fb14090da484e6a02b86021 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-024f3386be8ca056f950169a65db9117e03b79351fe4a6dcaa950751f4d87338.yml +openapi_spec_hash: b129bc67ffdb2e1bd0fb1bab639dba76 config_hash: a185e9a72778cc4658ea73fb3a7f1354 From d724ea2ba98cdd32ec98eaf4f18dcef97ee94437 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 20:55:17 +0000 Subject: [PATCH 0741/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 23af125ad..4e2a1cd4e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-024f3386be8ca056f950169a65db9117e03b79351fe4a6dcaa950751f4d87338.yml -openapi_spec_hash: b129bc67ffdb2e1bd0fb1bab639dba76 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-86536168d84b951766d3c56adf7b371f15e15de83fff1de4b8052f55bb98034d.yml +openapi_spec_hash: 28053671bf8df1b93086dbe6123f8163 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/account.py b/src/increase/types/account.py index bda7880e7..5921c7098 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -46,7 +46,7 @@ class Account(BaseModel): - `USD` - US Dollar (USD) """ - entity_id: Optional[str] = None + entity_id: str """The identifier for the Entity the Account belongs to.""" idempotency_key: Optional[str] = None From c08544b65d82b4eeae0c5213d1be66236efc995b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 13 Aug 2025 20:58:00 +0000 Subject: [PATCH 0742/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6dcf4e374..2a4a5d792 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.283.0" + ".": "0.284.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e523c88bc..683224994 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.283.0" +version = "0.284.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 377e1d849..23e1590c5 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.283.0" # x-release-please-version +__version__ = "0.284.0" # x-release-please-version From 595decc3d3c11337c92c86ebcc8e5f4400b05c90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 05:55:25 +0000 Subject: [PATCH 0743/1325] feat(api): api update --- .stats.yml | 4 +-- .../entity_create_beneficial_owner_params.py | 9 ++---- src/increase/types/entity_create_params.py | 9 ++---- ..._update_beneficial_owner_address_params.py | 9 ++---- tests/api_resources/test_entities.py | 28 +++++++++++++++---- 5 files changed, 33 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4e2a1cd4e..c3a436da3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-86536168d84b951766d3c56adf7b371f15e15de83fff1de4b8052f55bb98034d.yml -openapi_spec_hash: 28053671bf8df1b93086dbe6123f8163 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-06c4af41ee358cc77681ee9eb3e3997fb985c94baa60639f3b21bba1a73dd990.yml +openapi_spec_hash: 636b35479a21d9be089b2d9b95646ba9 config_hash: a185e9a72778cc4658ea73fb3a7f1354 diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index bdc31d5d7..9876edb42 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -29,18 +29,15 @@ class EntityCreateBeneficialOwnerParams(TypedDict, total=False): class BeneficialOwnerIndividualAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + country: Required[str] """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - city: str - """The city, district, town, or village of the address. - - Required in certain countries. - """ - line2: str """The second line of the address. This might be the floor or room number.""" diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 47559b358..65cff4053 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -132,18 +132,15 @@ class CorporationAddress(TypedDict, total=False): class CorporationBeneficialOwnerIndividualAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + country: Required[str] """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - city: str - """The city, district, town, or village of the address. - - Required in certain countries. - """ - line2: str """The second line of the address. This might be the floor or room number.""" diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py index 8024488fa..bbf846143 100644 --- a/src/increase/types/entity_update_beneficial_owner_address_params.py +++ b/src/increase/types/entity_update_beneficial_owner_address_params.py @@ -22,18 +22,15 @@ class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): class Address(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + country: Required[str] """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - city: str - """The city, district, town, or village of the address. - - Required in certain countries. - """ - line2: str """The second line of the address. This might be the floor or room number.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index b0b86d7e5..b0b4e8aeb 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -44,9 +44,9 @@ def test_method_create_with_all_params(self, client: Increase) -> None: { "individual": { "address": { + "city": "New York", "country": "x", "line1": "33 Liberty Street", - "city": "New York", "line2": "x", "state": "NY", "zip": "10045", @@ -506,6 +506,7 @@ def test_method_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -528,9 +529,9 @@ def test_method_create_beneficial_owner_with_all_params(self, client: Increase) beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", - "city": "New York", "line2": "x", "state": "NY", "zip": "10045", @@ -574,6 +575,7 @@ def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -600,6 +602,7 @@ def test_streaming_response_create_beneficial_owner(self, client: Increase) -> N beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -629,6 +632,7 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -724,6 +728,7 @@ def test_method_update_beneficial_owner_address(self, client: Increase) -> None: entity = client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -736,9 +741,9 @@ def test_method_update_beneficial_owner_address_with_all_params(self, client: In entity = client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", - "city": "New York", "line2": "Unit 2", "state": "NY", "zip": "10045", @@ -752,6 +757,7 @@ def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> response = client.entities.with_raw_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -768,6 +774,7 @@ def test_streaming_response_update_beneficial_owner_address(self, client: Increa with client.entities.with_streaming_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -787,6 +794,7 @@ def test_path_params_update_beneficial_owner_address(self, client: Increase) -> client.entities.with_raw_response.update_beneficial_owner_address( entity_id="", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -864,9 +872,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) { "individual": { "address": { + "city": "New York", "country": "x", "line1": "33 Liberty Street", - "city": "New York", "line2": "x", "state": "NY", "zip": "10045", @@ -1326,6 +1334,7 @@ async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1348,9 +1357,9 @@ async def test_method_create_beneficial_owner_with_all_params(self, async_client beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", - "city": "New York", "line2": "x", "state": "NY", "zip": "10045", @@ -1394,6 +1403,7 @@ async def test_raw_response_create_beneficial_owner(self, async_client: AsyncInc beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1420,6 +1430,7 @@ async def test_streaming_response_create_beneficial_owner(self, async_client: As beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1449,6 +1460,7 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr beneficial_owner={ "individual": { "address": { + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1544,6 +1556,7 @@ async def test_method_update_beneficial_owner_address(self, async_client: AsyncI entity = await async_client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1556,9 +1569,9 @@ async def test_method_update_beneficial_owner_address_with_all_params(self, asyn entity = await async_client.entities.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", - "city": "New York", "line2": "Unit 2", "state": "NY", "zip": "10045", @@ -1572,6 +1585,7 @@ async def test_raw_response_update_beneficial_owner_address(self, async_client: response = await async_client.entities.with_raw_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1588,6 +1602,7 @@ async def test_streaming_response_update_beneficial_owner_address(self, async_cl async with async_client.entities.with_streaming_response.update_beneficial_owner_address( entity_id="entity_n8y8tnk2p9339ti393yi", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, @@ -1607,6 +1622,7 @@ async def test_path_params_update_beneficial_owner_address(self, async_client: A await async_client.entities.with_raw_response.update_beneficial_owner_address( entity_id="", address={ + "city": "New York", "country": "US", "line1": "33 Liberty Street", }, From c2af9435cb70ef2f1980defea1beee0c812e3f64 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 06:05:24 +0000 Subject: [PATCH 0744/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2a4a5d792..182fd7857 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.284.0" + ".": "0.285.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 683224994..b12e5035c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.284.0" +version = "0.285.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 23e1590c5..136fbbeb9 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.284.0" # x-release-please-version +__version__ = "0.285.0" # x-release-please-version From a1f78824fa96220d2d0153d1cacb80657ae80ee1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 12:57:06 +0000 Subject: [PATCH 0745/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 50 ++ src/increase/_client.py | 37 + src/increase/resources/__init__.py | 42 + src/increase/resources/card_push_transfers.py | 826 ++++++++++++++++++ src/increase/resources/card_tokens.py | 369 ++++++++ src/increase/resources/card_validations.py | 506 +++++++++++ .../resources/simulations/__init__.py | 14 + .../resources/simulations/card_tokens.py | 226 +++++ .../resources/simulations/simulations.py | 32 + src/increase/types/__init__.py | 9 + src/increase/types/card_push_transfer.py | 451 ++++++++++ .../types/card_push_transfer_create_params.py | 111 +++ .../types/card_push_transfer_list_params.py | 87 ++ src/increase/types/card_token.py | 40 + src/increase/types/card_token_capabilities.py | 42 + src/increase/types/card_token_list_params.py | 50 ++ src/increase/types/card_validation.py | 379 ++++++++ .../types/card_validation_create_params.py | 54 ++ .../types/card_validation_list_params.py | 76 ++ src/increase/types/simulations/__init__.py | 1 + .../simulations/card_token_create_params.py | 51 ++ .../simulations/test_card_tokens.py | 109 +++ .../api_resources/test_card_push_transfers.py | 536 ++++++++++++ tests/api_resources/test_card_tokens.py | 256 ++++++ tests/api_resources/test_card_validations.py | 320 +++++++ 26 files changed, 4678 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/card_push_transfers.py create mode 100644 src/increase/resources/card_tokens.py create mode 100644 src/increase/resources/card_validations.py create mode 100644 src/increase/resources/simulations/card_tokens.py create mode 100644 src/increase/types/card_push_transfer.py create mode 100644 src/increase/types/card_push_transfer_create_params.py create mode 100644 src/increase/types/card_push_transfer_list_params.py create mode 100644 src/increase/types/card_token.py create mode 100644 src/increase/types/card_token_capabilities.py create mode 100644 src/increase/types/card_token_list_params.py create mode 100644 src/increase/types/card_validation.py create mode 100644 src/increase/types/card_validation_create_params.py create mode 100644 src/increase/types/card_validation_list_params.py create mode 100644 src/increase/types/simulations/card_token_create_params.py create mode 100644 tests/api_resources/simulations/test_card_tokens.py create mode 100644 tests/api_resources/test_card_push_transfers.py create mode 100644 tests/api_resources/test_card_tokens.py create mode 100644 tests/api_resources/test_card_validations.py diff --git a/.stats.yml b/.stats.yml index c3a436da3..72e9c5c32 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 202 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-06c4af41ee358cc77681ee9eb3e3997fb985c94baa60639f3b21bba1a73dd990.yml -openapi_spec_hash: 636b35479a21d9be089b2d9b95646ba9 -config_hash: a185e9a72778cc4658ea73fb3a7f1354 +configured_endpoints: 214 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-931013cdbe08378a853b2fd05800091aba88acebe919ec5088d2dd25c0846331.yml +openapi_spec_hash: 6cfed987ca287da4d3e52ace77b0e417 +config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/api.md b/api.md index 95b1fcc7c..1189be49d 100644 --- a/api.md +++ b/api.md @@ -725,6 +725,50 @@ Methods: - client.intrafi_exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] - client.intrafi_exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion +# CardTokens + +Types: + +```python +from increase.types import CardToken, CardTokenCapabilities +``` + +Methods: + +- client.card_tokens.retrieve(card_token_id) -> CardToken +- client.card_tokens.list(\*\*params) -> SyncPage[CardToken] +- client.card_tokens.capabilities(card_token_id) -> CardTokenCapabilities + +# CardPushTransfers + +Types: + +```python +from increase.types import CardPushTransfer +``` + +Methods: + +- client.card_push_transfers.create(\*\*params) -> CardPushTransfer +- client.card_push_transfers.retrieve(card_push_transfer_id) -> CardPushTransfer +- client.card_push_transfers.list(\*\*params) -> SyncPage[CardPushTransfer] +- client.card_push_transfers.approve(card_push_transfer_id) -> CardPushTransfer +- client.card_push_transfers.cancel(card_push_transfer_id) -> CardPushTransfer + +# CardValidations + +Types: + +```python +from increase.types import CardValidation +``` + +Methods: + +- client.card_validations.create(\*\*params) -> CardValidation +- client.card_validations.retrieve(card_validation_id) -> CardValidation +- client.card_validations.list(\*\*params) -> SyncPage[CardValidation] + # Simulations ## InterestPayments @@ -920,3 +964,9 @@ Methods: Methods: - client.simulations.documents.create(\*\*params) -> Document + +## CardTokens + +Methods: + +- client.simulations.card_tokens.create(\*\*params) -> CardToken diff --git a/src/increase/_client.py b/src/increase/_client.py index 470a9e633..599831eae 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -37,6 +37,7 @@ documents, lockboxes, file_links, + card_tokens, oauth_tokens, transactions, ach_transfers, @@ -48,6 +49,7 @@ account_numbers, check_transfers, routing_numbers, + card_validations, intrafi_balances, account_transfers, external_accounts, @@ -57,6 +59,7 @@ intrafi_exclusions, oauth_applications, bookkeeping_entries, + card_push_transfers, event_subscriptions, real_time_decisions, ach_prenotifications, @@ -157,6 +160,9 @@ class Increase(SyncAPIClient): intrafi_account_enrollments: intrafi_account_enrollments.IntrafiAccountEnrollmentsResource intrafi_balances: intrafi_balances.IntrafiBalancesResource intrafi_exclusions: intrafi_exclusions.IntrafiExclusionsResource + card_tokens: card_tokens.CardTokensResource + card_push_transfers: card_push_transfers.CardPushTransfersResource + card_validations: card_validations.CardValidationsResource simulations: simulations.SimulationsResource with_raw_response: IncreaseWithRawResponse with_streaming_response: IncreaseWithStreamedResponse @@ -302,6 +308,9 @@ def __init__( self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResource(self) self.intrafi_balances = intrafi_balances.IntrafiBalancesResource(self) self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResource(self) + self.card_tokens = card_tokens.CardTokensResource(self) + self.card_push_transfers = card_push_transfers.CardPushTransfersResource(self) + self.card_validations = card_validations.CardValidationsResource(self) self.simulations = simulations.SimulationsResource(self) self.with_raw_response = IncreaseWithRawResponse(self) self.with_streaming_response = IncreaseWithStreamedResponse(self) @@ -514,6 +523,9 @@ class AsyncIncrease(AsyncAPIClient): intrafi_account_enrollments: intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource intrafi_balances: intrafi_balances.AsyncIntrafiBalancesResource intrafi_exclusions: intrafi_exclusions.AsyncIntrafiExclusionsResource + card_tokens: card_tokens.AsyncCardTokensResource + card_push_transfers: card_push_transfers.AsyncCardPushTransfersResource + card_validations: card_validations.AsyncCardValidationsResource simulations: simulations.AsyncSimulationsResource with_raw_response: AsyncIncreaseWithRawResponse with_streaming_response: AsyncIncreaseWithStreamedResponse @@ -661,6 +673,9 @@ def __init__( self.intrafi_account_enrollments = intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource(self) self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResource(self) self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResource(self) + self.card_tokens = card_tokens.AsyncCardTokensResource(self) + self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResource(self) + self.card_validations = card_validations.AsyncCardValidationsResource(self) self.simulations = simulations.AsyncSimulationsResource(self) self.with_raw_response = AsyncIncreaseWithRawResponse(self) self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) @@ -920,6 +935,11 @@ def __init__(self, client: Increase) -> None: ) self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) + self.card_tokens = card_tokens.CardTokensResourceWithRawResponse(client.card_tokens) + self.card_push_transfers = card_push_transfers.CardPushTransfersResourceWithRawResponse( + client.card_push_transfers + ) + self.card_validations = card_validations.CardValidationsResourceWithRawResponse(client.card_validations) self.simulations = simulations.SimulationsResourceWithRawResponse(client.simulations) @@ -1040,6 +1060,11 @@ def __init__(self, client: AsyncIncrease) -> None: self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithRawResponse( client.intrafi_exclusions ) + self.card_tokens = card_tokens.AsyncCardTokensResourceWithRawResponse(client.card_tokens) + self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResourceWithRawResponse( + client.card_push_transfers + ) + self.card_validations = card_validations.AsyncCardValidationsResourceWithRawResponse(client.card_validations) self.simulations = simulations.AsyncSimulationsResourceWithRawResponse(client.simulations) @@ -1160,6 +1185,11 @@ def __init__(self, client: Increase) -> None: self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithStreamingResponse( client.intrafi_exclusions ) + self.card_tokens = card_tokens.CardTokensResourceWithStreamingResponse(client.card_tokens) + self.card_push_transfers = card_push_transfers.CardPushTransfersResourceWithStreamingResponse( + client.card_push_transfers + ) + self.card_validations = card_validations.CardValidationsResourceWithStreamingResponse(client.card_validations) self.simulations = simulations.SimulationsResourceWithStreamingResponse(client.simulations) @@ -1284,6 +1314,13 @@ def __init__(self, client: AsyncIncrease) -> None: self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithStreamingResponse( client.intrafi_exclusions ) + self.card_tokens = card_tokens.AsyncCardTokensResourceWithStreamingResponse(client.card_tokens) + self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResourceWithStreamingResponse( + client.card_push_transfers + ) + self.card_validations = card_validations.AsyncCardValidationsResourceWithStreamingResponse( + client.card_validations + ) self.simulations = simulations.AsyncSimulationsResourceWithStreamingResponse(client.simulations) diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 88d793281..a32da536a 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -88,6 +88,14 @@ FileLinksResourceWithStreamingResponse, AsyncFileLinksResourceWithStreamingResponse, ) +from .card_tokens import ( + CardTokensResource, + AsyncCardTokensResource, + CardTokensResourceWithRawResponse, + AsyncCardTokensResourceWithRawResponse, + CardTokensResourceWithStreamingResponse, + AsyncCardTokensResourceWithStreamingResponse, +) from .simulations import ( SimulationsResource, AsyncSimulationsResource, @@ -184,6 +192,14 @@ RoutingNumbersResourceWithStreamingResponse, AsyncRoutingNumbersResourceWithStreamingResponse, ) +from .card_validations import ( + CardValidationsResource, + AsyncCardValidationsResource, + CardValidationsResourceWithRawResponse, + AsyncCardValidationsResourceWithRawResponse, + CardValidationsResourceWithStreamingResponse, + AsyncCardValidationsResourceWithStreamingResponse, +) from .intrafi_balances import ( IntrafiBalancesResource, AsyncIntrafiBalancesResource, @@ -256,6 +272,14 @@ BookkeepingEntriesResourceWithStreamingResponse, AsyncBookkeepingEntriesResourceWithStreamingResponse, ) +from .card_push_transfers import ( + CardPushTransfersResource, + AsyncCardPushTransfersResource, + CardPushTransfersResourceWithRawResponse, + AsyncCardPushTransfersResourceWithRawResponse, + CardPushTransfersResourceWithStreamingResponse, + AsyncCardPushTransfersResourceWithStreamingResponse, +) from .event_subscriptions import ( EventSubscriptionsResource, AsyncEventSubscriptionsResource, @@ -724,6 +748,24 @@ "AsyncIntrafiExclusionsResourceWithRawResponse", "IntrafiExclusionsResourceWithStreamingResponse", "AsyncIntrafiExclusionsResourceWithStreamingResponse", + "CardTokensResource", + "AsyncCardTokensResource", + "CardTokensResourceWithRawResponse", + "AsyncCardTokensResourceWithRawResponse", + "CardTokensResourceWithStreamingResponse", + "AsyncCardTokensResourceWithStreamingResponse", + "CardPushTransfersResource", + "AsyncCardPushTransfersResource", + "CardPushTransfersResourceWithRawResponse", + "AsyncCardPushTransfersResourceWithRawResponse", + "CardPushTransfersResourceWithStreamingResponse", + "AsyncCardPushTransfersResourceWithStreamingResponse", + "CardValidationsResource", + "AsyncCardValidationsResource", + "CardValidationsResourceWithRawResponse", + "AsyncCardValidationsResourceWithRawResponse", + "CardValidationsResourceWithStreamingResponse", + "AsyncCardValidationsResourceWithStreamingResponse", "SimulationsResource", "AsyncSimulationsResource", "SimulationsResourceWithRawResponse", diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py new file mode 100644 index 000000000..c28035cef --- /dev/null +++ b/src/increase/resources/card_push_transfers.py @@ -0,0 +1,826 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from ..types import card_push_transfer_list_params, card_push_transfer_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.card_push_transfer import CardPushTransfer + +__all__ = ["CardPushTransfersResource", "AsyncCardPushTransfersResource"] + + +class CardPushTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardPushTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardPushTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardPushTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardPushTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + amount: int, + business_application_identifier: Literal[ + "account_to_account", + "business_to_business", + "money_transfer_bank_initiated", + "non_card_bill_payment", + "consumer_bill_payment", + "card_bill_payment", + "funds_disbursement", + "funds_transfer", + "loyalty_and_offers", + "merchant_disbursement", + "merchant_payment", + "person_to_person", + "top_up", + "wallet_transfer", + ], + card_token_id: str, + merchant_category_code: str, + merchant_city_name: str, + merchant_name: str, + merchant_name_prefix: str, + merchant_postal_code: str, + merchant_state: str, + recipient_name: str, + sender_address_city: str, + sender_address_line1: str, + sender_address_postal_code: str, + sender_address_state: str, + sender_name: str, + source_account_number_id: str, + require_approval: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """Create a Card Push Transfer + + Args: + amount: The transfer amount in USD cents. + + For Card Push transfers, must be positive. + + business_application_identifier: The Business Application Identifier describes the type of transaction being + performed. Your program must be approved for the specified Business Application + Identifier in order to use it. + + - `account_to_account` - Account to Account + - `business_to_business` - Business to Business + - `money_transfer_bank_initiated` - Money Transfer Bank Initiated + - `non_card_bill_payment` - Non-Card Bill Payment + - `consumer_bill_payment` - Consumer Bill Payment + - `card_bill_payment` - Card Bill Payment + - `funds_disbursement` - Funds Disbursement + - `funds_transfer` - Funds Transfer + - `loyalty_and_offers` - Loyalty and Offers + - `merchant_disbursement` - Merchant Disbursement + - `merchant_payment` - Merchant Payment + - `person_to_person` - Person to Person + - `top_up` - Top Up + - `wallet_transfer` - Wallet Transfer + + card_token_id: The Increase identifier for the Card Token that represents the card number + you're pushing funds to. + + merchant_category_code: The merchant category code (MCC) of the merchant (generally your business) + sending the transfer. This is a four-digit code that describes the type of + business or service provided by the merchant. Your program must be approved for + the specified MCC in order to use it. + + merchant_city_name: The city name of the merchant (generally your business) sending the transfer. + + merchant_name: The merchant name shows up as the statement descriptor for the transfer. This is + typically the name of your business or organization. + + merchant_name_prefix: For certain Business Application Identifiers, the statement descriptor is + `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + four character prefix that identifies the merchant. + + merchant_postal_code: The postal code of the merchant (generally your business) sending the transfer. + + merchant_state: The state of the merchant (generally your business) sending the transfer. + + recipient_name: The name of the funds recipient. + + sender_address_city: The city of the sender. + + sender_address_line1: The address line 1 of the sender. + + sender_address_postal_code: The postal code of the sender. + + sender_address_state: The state of the sender. + + sender_name: The name of the funds originator. + + source_account_number_id: The identifier of the Account Number from which to send the transfer. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/card_push_transfers", + body=maybe_transform( + { + "amount": amount, + "business_application_identifier": business_application_identifier, + "card_token_id": card_token_id, + "merchant_category_code": merchant_category_code, + "merchant_city_name": merchant_city_name, + "merchant_name": merchant_name, + "merchant_name_prefix": merchant_name_prefix, + "merchant_postal_code": merchant_postal_code, + "merchant_state": merchant_state, + "recipient_name": recipient_name, + "sender_address_city": sender_address_city, + "sender_address_line1": sender_address_line1, + "sender_address_postal_code": sender_address_postal_code, + "sender_address_state": sender_address_state, + "sender_name": sender_name, + "source_account_number_id": source_account_number_id, + "require_approval": require_approval, + }, + card_push_transfer_create_params.CardPushTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + def retrieve( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardPushTransfer: + """ + Retrieve a Card Push Transfer + + Args: + card_push_transfer_id: The identifier of the Card Push Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return self._get( + f"/card_push_transfers/{card_push_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardPushTransfer, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: card_push_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + status: card_push_transfer_list_params.Status | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[CardPushTransfer]: + """ + List Card Push Transfers + + Args: + account_id: Filter Card Push Transfers to ones belonging to the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_push_transfers", + page=SyncPage[CardPushTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_push_transfer_list_params.CardPushTransferListParams, + ), + ), + model=CardPushTransfer, + ) + + def approve( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """ + Approves a Card Push Transfer in a pending_approval state. + + Args: + card_push_transfer_id: The identifier of the Card Push Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return self._post( + f"/card_push_transfers/{card_push_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + def cancel( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """ + Cancels a Card Push Transfer in a pending_approval state. + + Args: + card_push_transfer_id: The identifier of the pending Card Push Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return self._post( + f"/card_push_transfers/{card_push_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + +class AsyncCardPushTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardPushTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardPushTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardPushTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardPushTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + amount: int, + business_application_identifier: Literal[ + "account_to_account", + "business_to_business", + "money_transfer_bank_initiated", + "non_card_bill_payment", + "consumer_bill_payment", + "card_bill_payment", + "funds_disbursement", + "funds_transfer", + "loyalty_and_offers", + "merchant_disbursement", + "merchant_payment", + "person_to_person", + "top_up", + "wallet_transfer", + ], + card_token_id: str, + merchant_category_code: str, + merchant_city_name: str, + merchant_name: str, + merchant_name_prefix: str, + merchant_postal_code: str, + merchant_state: str, + recipient_name: str, + sender_address_city: str, + sender_address_line1: str, + sender_address_postal_code: str, + sender_address_state: str, + sender_name: str, + source_account_number_id: str, + require_approval: bool | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """Create a Card Push Transfer + + Args: + amount: The transfer amount in USD cents. + + For Card Push transfers, must be positive. + + business_application_identifier: The Business Application Identifier describes the type of transaction being + performed. Your program must be approved for the specified Business Application + Identifier in order to use it. + + - `account_to_account` - Account to Account + - `business_to_business` - Business to Business + - `money_transfer_bank_initiated` - Money Transfer Bank Initiated + - `non_card_bill_payment` - Non-Card Bill Payment + - `consumer_bill_payment` - Consumer Bill Payment + - `card_bill_payment` - Card Bill Payment + - `funds_disbursement` - Funds Disbursement + - `funds_transfer` - Funds Transfer + - `loyalty_and_offers` - Loyalty and Offers + - `merchant_disbursement` - Merchant Disbursement + - `merchant_payment` - Merchant Payment + - `person_to_person` - Person to Person + - `top_up` - Top Up + - `wallet_transfer` - Wallet Transfer + + card_token_id: The Increase identifier for the Card Token that represents the card number + you're pushing funds to. + + merchant_category_code: The merchant category code (MCC) of the merchant (generally your business) + sending the transfer. This is a four-digit code that describes the type of + business or service provided by the merchant. Your program must be approved for + the specified MCC in order to use it. + + merchant_city_name: The city name of the merchant (generally your business) sending the transfer. + + merchant_name: The merchant name shows up as the statement descriptor for the transfer. This is + typically the name of your business or organization. + + merchant_name_prefix: For certain Business Application Identifiers, the statement descriptor is + `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + four character prefix that identifies the merchant. + + merchant_postal_code: The postal code of the merchant (generally your business) sending the transfer. + + merchant_state: The state of the merchant (generally your business) sending the transfer. + + recipient_name: The name of the funds recipient. + + sender_address_city: The city of the sender. + + sender_address_line1: The address line 1 of the sender. + + sender_address_postal_code: The postal code of the sender. + + sender_address_state: The state of the sender. + + sender_name: The name of the funds originator. + + source_account_number_id: The identifier of the Account Number from which to send the transfer. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/card_push_transfers", + body=await async_maybe_transform( + { + "amount": amount, + "business_application_identifier": business_application_identifier, + "card_token_id": card_token_id, + "merchant_category_code": merchant_category_code, + "merchant_city_name": merchant_city_name, + "merchant_name": merchant_name, + "merchant_name_prefix": merchant_name_prefix, + "merchant_postal_code": merchant_postal_code, + "merchant_state": merchant_state, + "recipient_name": recipient_name, + "sender_address_city": sender_address_city, + "sender_address_line1": sender_address_line1, + "sender_address_postal_code": sender_address_postal_code, + "sender_address_state": sender_address_state, + "sender_name": sender_name, + "source_account_number_id": source_account_number_id, + "require_approval": require_approval, + }, + card_push_transfer_create_params.CardPushTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + async def retrieve( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardPushTransfer: + """ + Retrieve a Card Push Transfer + + Args: + card_push_transfer_id: The identifier of the Card Push Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return await self._get( + f"/card_push_transfers/{card_push_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardPushTransfer, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: card_push_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + status: card_push_transfer_list_params.Status | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[CardPushTransfer, AsyncPage[CardPushTransfer]]: + """ + List Card Push Transfers + + Args: + account_id: Filter Card Push Transfers to ones belonging to the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_push_transfers", + page=AsyncPage[CardPushTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_push_transfer_list_params.CardPushTransferListParams, + ), + ), + model=CardPushTransfer, + ) + + async def approve( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """ + Approves a Card Push Transfer in a pending_approval state. + + Args: + card_push_transfer_id: The identifier of the Card Push Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return await self._post( + f"/card_push_transfers/{card_push_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + async def cancel( + self, + card_push_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardPushTransfer: + """ + Cancels a Card Push Transfer in a pending_approval state. + + Args: + card_push_transfer_id: The identifier of the pending Card Push Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_push_transfer_id: + raise ValueError( + f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" + ) + return await self._post( + f"/card_push_transfers/{card_push_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPushTransfer, + ) + + +class CardPushTransfersResourceWithRawResponse: + def __init__(self, card_push_transfers: CardPushTransfersResource) -> None: + self._card_push_transfers = card_push_transfers + + self.create = to_raw_response_wrapper( + card_push_transfers.create, + ) + self.retrieve = to_raw_response_wrapper( + card_push_transfers.retrieve, + ) + self.list = to_raw_response_wrapper( + card_push_transfers.list, + ) + self.approve = to_raw_response_wrapper( + card_push_transfers.approve, + ) + self.cancel = to_raw_response_wrapper( + card_push_transfers.cancel, + ) + + +class AsyncCardPushTransfersResourceWithRawResponse: + def __init__(self, card_push_transfers: AsyncCardPushTransfersResource) -> None: + self._card_push_transfers = card_push_transfers + + self.create = async_to_raw_response_wrapper( + card_push_transfers.create, + ) + self.retrieve = async_to_raw_response_wrapper( + card_push_transfers.retrieve, + ) + self.list = async_to_raw_response_wrapper( + card_push_transfers.list, + ) + self.approve = async_to_raw_response_wrapper( + card_push_transfers.approve, + ) + self.cancel = async_to_raw_response_wrapper( + card_push_transfers.cancel, + ) + + +class CardPushTransfersResourceWithStreamingResponse: + def __init__(self, card_push_transfers: CardPushTransfersResource) -> None: + self._card_push_transfers = card_push_transfers + + self.create = to_streamed_response_wrapper( + card_push_transfers.create, + ) + self.retrieve = to_streamed_response_wrapper( + card_push_transfers.retrieve, + ) + self.list = to_streamed_response_wrapper( + card_push_transfers.list, + ) + self.approve = to_streamed_response_wrapper( + card_push_transfers.approve, + ) + self.cancel = to_streamed_response_wrapper( + card_push_transfers.cancel, + ) + + +class AsyncCardPushTransfersResourceWithStreamingResponse: + def __init__(self, card_push_transfers: AsyncCardPushTransfersResource) -> None: + self._card_push_transfers = card_push_transfers + + self.create = async_to_streamed_response_wrapper( + card_push_transfers.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + card_push_transfers.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + card_push_transfers.list, + ) + self.approve = async_to_streamed_response_wrapper( + card_push_transfers.approve, + ) + self.cancel = async_to_streamed_response_wrapper( + card_push_transfers.cancel, + ) diff --git a/src/increase/resources/card_tokens.py b/src/increase/resources/card_tokens.py new file mode 100644 index 000000000..37fbd236e --- /dev/null +++ b/src/increase/resources/card_tokens.py @@ -0,0 +1,369 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import card_token_list_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.card_token import CardToken +from ..types.card_token_capabilities import CardTokenCapabilities + +__all__ = ["CardTokensResource", "AsyncCardTokensResource"] + + +class CardTokensResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardTokensResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardTokensResourceWithStreamingResponse(self) + + def retrieve( + self, + card_token_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardToken: + """ + Retrieve a Card Token + + Args: + card_token_id: The identifier of the Card Token. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_token_id: + raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") + return self._get( + f"/card_tokens/{card_token_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardToken, + ) + + def list( + self, + *, + created_at: card_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[CardToken]: + """ + List Card Tokens + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_tokens", + page=SyncPage[CardToken], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + card_token_list_params.CardTokenListParams, + ), + ), + model=CardToken, + ) + + def capabilities( + self, + card_token_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardTokenCapabilities: + """ + The capabilities of a Card Token describe whether the card can be used for + specific operations, such as Card Push Transfers. The capabilities can change + over time based on the issuing bank's configuration of the card range. + + Args: + card_token_id: The identifier of the Card Token. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_token_id: + raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") + return self._get( + f"/card_tokens/{card_token_id}/capabilities", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardTokenCapabilities, + ) + + +class AsyncCardTokensResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardTokensResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardTokensResourceWithStreamingResponse(self) + + async def retrieve( + self, + card_token_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardToken: + """ + Retrieve a Card Token + + Args: + card_token_id: The identifier of the Card Token. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_token_id: + raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") + return await self._get( + f"/card_tokens/{card_token_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardToken, + ) + + def list( + self, + *, + created_at: card_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[CardToken, AsyncPage[CardToken]]: + """ + List Card Tokens + + Args: + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_tokens", + page=AsyncPage[CardToken], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + card_token_list_params.CardTokenListParams, + ), + ), + model=CardToken, + ) + + async def capabilities( + self, + card_token_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardTokenCapabilities: + """ + The capabilities of a Card Token describe whether the card can be used for + specific operations, such as Card Push Transfers. The capabilities can change + over time based on the issuing bank's configuration of the card range. + + Args: + card_token_id: The identifier of the Card Token. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_token_id: + raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") + return await self._get( + f"/card_tokens/{card_token_id}/capabilities", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardTokenCapabilities, + ) + + +class CardTokensResourceWithRawResponse: + def __init__(self, card_tokens: CardTokensResource) -> None: + self._card_tokens = card_tokens + + self.retrieve = to_raw_response_wrapper( + card_tokens.retrieve, + ) + self.list = to_raw_response_wrapper( + card_tokens.list, + ) + self.capabilities = to_raw_response_wrapper( + card_tokens.capabilities, + ) + + +class AsyncCardTokensResourceWithRawResponse: + def __init__(self, card_tokens: AsyncCardTokensResource) -> None: + self._card_tokens = card_tokens + + self.retrieve = async_to_raw_response_wrapper( + card_tokens.retrieve, + ) + self.list = async_to_raw_response_wrapper( + card_tokens.list, + ) + self.capabilities = async_to_raw_response_wrapper( + card_tokens.capabilities, + ) + + +class CardTokensResourceWithStreamingResponse: + def __init__(self, card_tokens: CardTokensResource) -> None: + self._card_tokens = card_tokens + + self.retrieve = to_streamed_response_wrapper( + card_tokens.retrieve, + ) + self.list = to_streamed_response_wrapper( + card_tokens.list, + ) + self.capabilities = to_streamed_response_wrapper( + card_tokens.capabilities, + ) + + +class AsyncCardTokensResourceWithStreamingResponse: + def __init__(self, card_tokens: AsyncCardTokensResource) -> None: + self._card_tokens = card_tokens + + self.retrieve = async_to_streamed_response_wrapper( + card_tokens.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + card_tokens.list, + ) + self.capabilities = async_to_streamed_response_wrapper( + card_tokens.capabilities, + ) diff --git a/src/increase/resources/card_validations.py b/src/increase/resources/card_validations.py new file mode 100644 index 000000000..d1a94f6a6 --- /dev/null +++ b/src/increase/resources/card_validations.py @@ -0,0 +1,506 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import card_validation_list_params, card_validation_create_params +from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.card_validation import CardValidation + +__all__ = ["CardValidationsResource", "AsyncCardValidationsResource"] + + +class CardValidationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardValidationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardValidationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardValidationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardValidationsResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + card_token_id: str, + merchant_category_code: str, + merchant_city_name: str, + merchant_name: str, + merchant_postal_code: str, + merchant_state: str, + cardholder_first_name: str | NotGiven = NOT_GIVEN, + cardholder_last_name: str | NotGiven = NOT_GIVEN, + cardholder_middle_name: str | NotGiven = NOT_GIVEN, + cardholder_postal_code: str | NotGiven = NOT_GIVEN, + cardholder_street_address: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardValidation: + """ + Create a Card Validation + + Args: + account_id: The identifier of the Account from which to send the validation. + + card_token_id: The Increase identifier for the Card Token that represents the card number + you're validating. + + merchant_category_code: A four-digit code (MCC) identifying the type of business or service provided by + the merchant. + + merchant_city_name: The city where the merchant (typically your business) is located. + + merchant_name: The merchant name that will appear in the cardholder’s statement descriptor. + Typically your business name. + + merchant_postal_code: The postal code for the merchant’s (typically your business’s) location. + + merchant_state: The U.S. state where the merchant (typically your business) is located. + + cardholder_first_name: The cardholder's first name. + + cardholder_last_name: The cardholder's last name. + + cardholder_middle_name: The cardholder's middle name. + + cardholder_postal_code: The postal code of the cardholder's address. + + cardholder_street_address: The cardholder's street address. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/card_validations", + body=maybe_transform( + { + "account_id": account_id, + "card_token_id": card_token_id, + "merchant_category_code": merchant_category_code, + "merchant_city_name": merchant_city_name, + "merchant_name": merchant_name, + "merchant_postal_code": merchant_postal_code, + "merchant_state": merchant_state, + "cardholder_first_name": cardholder_first_name, + "cardholder_last_name": cardholder_last_name, + "cardholder_middle_name": cardholder_middle_name, + "cardholder_postal_code": cardholder_postal_code, + "cardholder_street_address": cardholder_street_address, + }, + card_validation_create_params.CardValidationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardValidation, + ) + + def retrieve( + self, + card_validation_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardValidation: + """ + Retrieve a Card Validation + + Args: + card_validation_id: The identifier of the Card Validation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_validation_id: + raise ValueError(f"Expected a non-empty value for `card_validation_id` but received {card_validation_id!r}") + return self._get( + f"/card_validations/{card_validation_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardValidation, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: card_validation_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + status: card_validation_list_params.Status | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> SyncPage[CardValidation]: + """ + List Card Validations + + Args: + account_id: Filter Card Validations to ones belonging to the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_validations", + page=SyncPage[CardValidation], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_validation_list_params.CardValidationListParams, + ), + ), + model=CardValidation, + ) + + +class AsyncCardValidationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardValidationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardValidationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardValidationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardValidationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + card_token_id: str, + merchant_category_code: str, + merchant_city_name: str, + merchant_name: str, + merchant_postal_code: str, + merchant_state: str, + cardholder_first_name: str | NotGiven = NOT_GIVEN, + cardholder_last_name: str | NotGiven = NOT_GIVEN, + cardholder_middle_name: str | NotGiven = NOT_GIVEN, + cardholder_postal_code: str | NotGiven = NOT_GIVEN, + cardholder_street_address: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardValidation: + """ + Create a Card Validation + + Args: + account_id: The identifier of the Account from which to send the validation. + + card_token_id: The Increase identifier for the Card Token that represents the card number + you're validating. + + merchant_category_code: A four-digit code (MCC) identifying the type of business or service provided by + the merchant. + + merchant_city_name: The city where the merchant (typically your business) is located. + + merchant_name: The merchant name that will appear in the cardholder’s statement descriptor. + Typically your business name. + + merchant_postal_code: The postal code for the merchant’s (typically your business’s) location. + + merchant_state: The U.S. state where the merchant (typically your business) is located. + + cardholder_first_name: The cardholder's first name. + + cardholder_last_name: The cardholder's last name. + + cardholder_middle_name: The cardholder's middle name. + + cardholder_postal_code: The postal code of the cardholder's address. + + cardholder_street_address: The cardholder's street address. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/card_validations", + body=await async_maybe_transform( + { + "account_id": account_id, + "card_token_id": card_token_id, + "merchant_category_code": merchant_category_code, + "merchant_city_name": merchant_city_name, + "merchant_name": merchant_name, + "merchant_postal_code": merchant_postal_code, + "merchant_state": merchant_state, + "cardholder_first_name": cardholder_first_name, + "cardholder_last_name": cardholder_last_name, + "cardholder_middle_name": cardholder_middle_name, + "cardholder_postal_code": cardholder_postal_code, + "cardholder_street_address": cardholder_street_address, + }, + card_validation_create_params.CardValidationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardValidation, + ) + + async def retrieve( + self, + card_validation_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> CardValidation: + """ + Retrieve a Card Validation + + Args: + card_validation_id: The identifier of the Card Validation. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_validation_id: + raise ValueError(f"Expected a non-empty value for `card_validation_id` but received {card_validation_id!r}") + return await self._get( + f"/card_validations/{card_validation_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardValidation, + ) + + def list( + self, + *, + account_id: str | NotGiven = NOT_GIVEN, + created_at: card_validation_list_params.CreatedAt | NotGiven = NOT_GIVEN, + cursor: str | NotGiven = NOT_GIVEN, + idempotency_key: str | NotGiven = NOT_GIVEN, + limit: int | NotGiven = NOT_GIVEN, + status: card_validation_list_params.Status | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + ) -> AsyncPaginator[CardValidation, AsyncPage[CardValidation]]: + """ + List Card Validations + + Args: + account_id: Filter Card Validations to ones belonging to the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_validations", + page=AsyncPage[CardValidation], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_validation_list_params.CardValidationListParams, + ), + ), + model=CardValidation, + ) + + +class CardValidationsResourceWithRawResponse: + def __init__(self, card_validations: CardValidationsResource) -> None: + self._card_validations = card_validations + + self.create = to_raw_response_wrapper( + card_validations.create, + ) + self.retrieve = to_raw_response_wrapper( + card_validations.retrieve, + ) + self.list = to_raw_response_wrapper( + card_validations.list, + ) + + +class AsyncCardValidationsResourceWithRawResponse: + def __init__(self, card_validations: AsyncCardValidationsResource) -> None: + self._card_validations = card_validations + + self.create = async_to_raw_response_wrapper( + card_validations.create, + ) + self.retrieve = async_to_raw_response_wrapper( + card_validations.retrieve, + ) + self.list = async_to_raw_response_wrapper( + card_validations.list, + ) + + +class CardValidationsResourceWithStreamingResponse: + def __init__(self, card_validations: CardValidationsResource) -> None: + self._card_validations = card_validations + + self.create = to_streamed_response_wrapper( + card_validations.create, + ) + self.retrieve = to_streamed_response_wrapper( + card_validations.retrieve, + ) + self.list = to_streamed_response_wrapper( + card_validations.list, + ) + + +class AsyncCardValidationsResourceWithStreamingResponse: + def __init__(self, card_validations: AsyncCardValidationsResource) -> None: + self._card_validations = card_validations + + self.create = async_to_streamed_response_wrapper( + card_validations.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + card_validations.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + card_validations.list, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 262890320..fc5a02d8c 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -16,6 +16,14 @@ DocumentsResourceWithStreamingResponse, AsyncDocumentsResourceWithStreamingResponse, ) +from .card_tokens import ( + CardTokensResource, + AsyncCardTokensResource, + CardTokensResourceWithRawResponse, + AsyncCardTokensResourceWithRawResponse, + CardTokensResourceWithStreamingResponse, + AsyncCardTokensResourceWithStreamingResponse, +) from .simulations import ( SimulationsResource, AsyncSimulationsResource, @@ -402,6 +410,12 @@ "AsyncDocumentsResourceWithRawResponse", "DocumentsResourceWithStreamingResponse", "AsyncDocumentsResourceWithStreamingResponse", + "CardTokensResource", + "AsyncCardTokensResource", + "CardTokensResourceWithRawResponse", + "AsyncCardTokensResourceWithRawResponse", + "CardTokensResourceWithStreamingResponse", + "AsyncCardTokensResourceWithStreamingResponse", "SimulationsResource", "AsyncSimulationsResource", "SimulationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_tokens.py b/src/increase/resources/simulations/card_tokens.py new file mode 100644 index 000000000..950073777 --- /dev/null +++ b/src/increase/resources/simulations/card_tokens.py @@ -0,0 +1,226 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union, Iterable +from datetime import date + +import httpx + +from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.card_token import CardToken +from ...types.simulations import card_token_create_params + +__all__ = ["CardTokensResource", "AsyncCardTokensResource"] + + +class CardTokensResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardTokensResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardTokensResourceWithStreamingResponse(self) + + def create( + self, + *, + capabilities: Iterable[card_token_create_params.Capability] | NotGiven = NOT_GIVEN, + expiration: Union[str, date] | NotGiven = NOT_GIVEN, + last4: str | NotGiven = NOT_GIVEN, + prefix: str | NotGiven = NOT_GIVEN, + primary_account_number_length: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardToken: + """ + Simulates tokenizing a card in the sandbox environment. + + Args: + capabilities: The capabilities of the outbound card token. + + expiration: The expiration date of the card. + + last4: The last 4 digits of the card number. + + prefix: The prefix of the card number, usually the first 8 digits. + + primary_account_number_length: The total length of the card number, including prefix and last4. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_tokens", + body=maybe_transform( + { + "capabilities": capabilities, + "expiration": expiration, + "last4": last4, + "prefix": prefix, + "primary_account_number_length": primary_account_number_length, + }, + card_token_create_params.CardTokenCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardToken, + ) + + +class AsyncCardTokensResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardTokensResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardTokensResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardTokensResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardTokensResourceWithStreamingResponse(self) + + async def create( + self, + *, + capabilities: Iterable[card_token_create_params.Capability] | NotGiven = NOT_GIVEN, + expiration: Union[str, date] | NotGiven = NOT_GIVEN, + last4: str | NotGiven = NOT_GIVEN, + prefix: str | NotGiven = NOT_GIVEN, + primary_account_number_length: int | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardToken: + """ + Simulates tokenizing a card in the sandbox environment. + + Args: + capabilities: The capabilities of the outbound card token. + + expiration: The expiration date of the card. + + last4: The last 4 digits of the card number. + + prefix: The prefix of the card number, usually the first 8 digits. + + primary_account_number_length: The total length of the card number, including prefix and last4. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_tokens", + body=await async_maybe_transform( + { + "capabilities": capabilities, + "expiration": expiration, + "last4": last4, + "prefix": prefix, + "primary_account_number_length": primary_account_number_length, + }, + card_token_create_params.CardTokenCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardToken, + ) + + +class CardTokensResourceWithRawResponse: + def __init__(self, card_tokens: CardTokensResource) -> None: + self._card_tokens = card_tokens + + self.create = to_raw_response_wrapper( + card_tokens.create, + ) + + +class AsyncCardTokensResourceWithRawResponse: + def __init__(self, card_tokens: AsyncCardTokensResource) -> None: + self._card_tokens = card_tokens + + self.create = async_to_raw_response_wrapper( + card_tokens.create, + ) + + +class CardTokensResourceWithStreamingResponse: + def __init__(self, card_tokens: CardTokensResource) -> None: + self._card_tokens = card_tokens + + self.create = to_streamed_response_wrapper( + card_tokens.create, + ) + + +class AsyncCardTokensResourceWithStreamingResponse: + def __init__(self, card_tokens: AsyncCardTokensResource) -> None: + self._card_tokens = card_tokens + + self.create = async_to_streamed_response_wrapper( + card_tokens.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index d91595500..2dd37a337 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -20,6 +20,14 @@ AsyncDocumentsResourceWithStreamingResponse, ) from ..._resource import SyncAPIResource, AsyncAPIResource +from .card_tokens import ( + CardTokensResource, + AsyncCardTokensResource, + CardTokensResourceWithRawResponse, + AsyncCardTokensResourceWithRawResponse, + CardTokensResourceWithStreamingResponse, + AsyncCardTokensResourceWithStreamingResponse, +) from .card_refunds import ( CardRefundsResource, AsyncCardRefundsResource, @@ -345,6 +353,10 @@ def account_statements(self) -> AccountStatementsResource: def documents(self) -> DocumentsResource: return DocumentsResource(self._client) + @cached_property + def card_tokens(self) -> CardTokensResource: + return CardTokensResource(self._client) + @cached_property def with_raw_response(self) -> SimulationsResourceWithRawResponse: """ @@ -478,6 +490,10 @@ def account_statements(self) -> AsyncAccountStatementsResource: def documents(self) -> AsyncDocumentsResource: return AsyncDocumentsResource(self._client) + @cached_property + def card_tokens(self) -> AsyncCardTokensResource: + return AsyncCardTokensResource(self._client) + @cached_property def with_raw_response(self) -> AsyncSimulationsResourceWithRawResponse: """ @@ -616,6 +632,10 @@ def account_statements(self) -> AccountStatementsResourceWithRawResponse: def documents(self) -> DocumentsResourceWithRawResponse: return DocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def card_tokens(self) -> CardTokensResourceWithRawResponse: + return CardTokensResourceWithRawResponse(self._simulations.card_tokens) + class AsyncSimulationsResourceWithRawResponse: def __init__(self, simulations: AsyncSimulationsResource) -> None: @@ -737,6 +757,10 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: def documents(self) -> AsyncDocumentsResourceWithRawResponse: return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def card_tokens(self) -> AsyncCardTokensResourceWithRawResponse: + return AsyncCardTokensResourceWithRawResponse(self._simulations.card_tokens) + class SimulationsResourceWithStreamingResponse: def __init__(self, simulations: SimulationsResource) -> None: @@ -860,6 +884,10 @@ def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: def documents(self) -> DocumentsResourceWithStreamingResponse: return DocumentsResourceWithStreamingResponse(self._simulations.documents) + @cached_property + def card_tokens(self) -> CardTokensResourceWithStreamingResponse: + return CardTokensResourceWithStreamingResponse(self._simulations.card_tokens) + class AsyncSimulationsResourceWithStreamingResponse: def __init__(self, simulations: AsyncSimulationsResource) -> None: @@ -988,3 +1016,7 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingRespo @cached_property def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + + @cached_property + def card_tokens(self) -> AsyncCardTokensResourceWithStreamingResponse: + return AsyncCardTokensResourceWithStreamingResponse(self._simulations.card_tokens) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 82f6cda1a..3e4272dc6 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -13,6 +13,7 @@ from .program import Program as Program from .document import Document as Document from .file_link import FileLink as FileLink +from .card_token import CardToken as CardToken from .oauth_token import OAuthToken as OAuthToken from .transaction import Transaction as Transaction from .ach_transfer import ACHTransfer as ACHTransfer @@ -25,6 +26,7 @@ from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer +from .card_validation import CardValidation as CardValidation from .intrafi_balance import IntrafiBalance as IntrafiBalance from .account_transfer import AccountTransfer as AccountTransfer from .card_list_params import CardListParams as CardListParams @@ -38,6 +40,7 @@ from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .oauth_application import OAuthApplication as OAuthApplication from .card_create_params import CardCreateParams as CardCreateParams +from .card_push_transfer import CardPushTransfer as CardPushTransfer from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams from .event_subscription import EventSubscription as EventSubscription @@ -68,7 +71,9 @@ from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams +from .card_token_list_params import CardTokenListParams as CardTokenListParams from .document_create_params import DocumentCreateParams as DocumentCreateParams +from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams @@ -86,6 +91,7 @@ from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams +from .card_validation_list_params import CardValidationListParams as CardValidationListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams from .physical_card_update_params import PhysicalCardUpdateParams as PhysicalCardUpdateParams @@ -102,11 +108,13 @@ from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams +from .card_validation_create_params import CardValidationCreateParams as CardValidationCreateParams from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams +from .card_push_transfer_list_params import CardPushTransferListParams as CardPushTransferListParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams @@ -114,6 +122,7 @@ from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams +from .card_push_transfer_create_params import CardPushTransferCreateParams as CardPushTransferCreateParams from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams from .digital_wallet_token_list_params import DigitalWalletTokenListParams as DigitalWalletTokenListParams diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py new file mode 100644 index 000000000..d659da368 --- /dev/null +++ b/src/increase/types/card_push_transfer.py @@ -0,0 +1,451 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "CardPushTransfer", + "Acceptance", + "Approval", + "Cancellation", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "Decline", + "Submission", +] + + +class Acceptance(BaseModel): + accepted_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was accepted by the issuing bank. + """ + + authorization_identification_response: str + """The authorization identification response from the issuing bank.""" + + card_verification_value2_result: Optional[Literal["match", "no_match"]] = None + """The result of the Card Verification Value 2 match. + + - `match` - The Card Verification Value 2 (CVV2) matches the expected value. + - `no_match` - The Card Verification Value 2 (CVV2) does not match the expected + value. + """ + + network_transaction_identifier: Optional[str] = None + """A unique identifier for the transaction on the card network.""" + + +class Approval(BaseModel): + approved_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was approved. + """ + + approved_by: Optional[str] = None + """ + If the Transfer was approved by a user in the dashboard, the email address of + that user. + """ + + +class Cancellation(BaseModel): + canceled_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Transfer was canceled. + """ + + canceled_by: Optional[str] = None + """ + If the Transfer was canceled by a user in the dashboard, the email address of + that user. + """ + + +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + +class Decline(BaseModel): + declined_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer declined. + """ + + network_transaction_identifier: Optional[str] = None + """A unique identifier for the transaction on the card network.""" + + reason: Literal[ + "do_not_honor", + "activity_count_limit_exceeded", + "refer_to_card_issuer", + "refer_to_card_issuer_special_condition", + "invalid_merchant", + "pick_up_card", + "error", + "pick_up_card_special", + "invalid_transaction", + "invalid_amount", + "invalid_account_number", + "no_such_issuer", + "re_enter_transaction", + "no_credit_account", + "pick_up_card_lost", + "pick_up_card_stolen", + "closed_account", + "insufficient_funds", + "no_checking_account", + "no_savings_account", + "expired_card", + "transaction_not_permitted_to_cardholder", + "transaction_not_allowed_at_terminal", + "suspected_fraud", + "activity_amount_limit_exceeded", + "restricted_card", + "security_violation", + "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_first_use", + "credit_issuer_unavailable", + "negative_card_verification_value_results", + "issuer_unavailable", + "financial_institution_cannot_be_found", + "transaction_cannot_be_completed", + "duplicate_transaction", + "system_malfunction", + "additional_customer_authentication_required", + "surcharge_amount_not_permitted", + "decline_for_cvv2_failure", + "stop_payment_order", + "revocation_of_authorization_order", + "revocation_of_all_authorizations_order", + ] + """The reason why the transfer was declined. + + - `do_not_honor` - The card issuer has declined the transaction without + providing a specific reason. + - `activity_count_limit_exceeded` - The number of transactions for the card has + exceeded the limit set by the issuer. + - `refer_to_card_issuer` - The card issuer requires the cardholder to contact + them for further information regarding the transaction. + - `refer_to_card_issuer_special_condition` - The card issuer requires the + cardholder to contact them due to a special condition related to the + transaction. + - `invalid_merchant` - The merchant is not valid for this transaction. + - `pick_up_card` - The card should be retained by the terminal. + - `error` - An error occurred during processing of the transaction. + - `pick_up_card_special` - The card should be retained by the terminal due to a + special condition. + - `invalid_transaction` - The transaction is invalid and cannot be processed. + - `invalid_amount` - The amount of the transaction is invalid. + - `invalid_account_number` - The account number provided is invalid. + - `no_such_issuer` - The issuer of the card could not be found. + - `re_enter_transaction` - The transaction should be re-entered for processing. + - `no_credit_account` - There is no credit account associated with the card. + - `pick_up_card_lost` - The card should be retained by the terminal because it + has been reported lost. + - `pick_up_card_stolen` - The card should be retained by the terminal because it + has been reported stolen. + - `closed_account` - The account associated with the card has been closed. + - `insufficient_funds` - There are insufficient funds in the account to complete + the transaction. + - `no_checking_account` - There is no checking account associated with the card. + - `no_savings_account` - There is no savings account associated with the card. + - `expired_card` - The card has expired and cannot be used for transactions. + - `transaction_not_permitted_to_cardholder` - The transaction is not permitted + for this cardholder. + - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this + terminal. + - `suspected_fraud` - The transaction has been flagged as suspected fraud and + cannot be processed. + - `activity_amount_limit_exceeded` - The amount of activity on the card has + exceeded the limit set by the issuer. + - `restricted_card` - The card has restrictions that prevent it from being used + for this transaction. + - `security_violation` - A security violation has occurred, preventing the + transaction from being processed. + - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The + transaction does not meet the anti-money laundering requirements set by the + issuer. + - `blocked_first_use` - The first use of the card has been blocked by the + issuer. + - `credit_issuer_unavailable` - The credit issuer is currently unavailable to + process the transaction. + - `negative_card_verification_value_results` - The card verification value (CVV) + results were negative, indicating a potential issue with the card. + - `issuer_unavailable` - The issuer of the card is currently unavailable to + process the transaction. + - `financial_institution_cannot_be_found` - The financial institution associated + with the card could not be found. + - `transaction_cannot_be_completed` - The transaction cannot be completed due to + an unspecified reason. + - `duplicate_transaction` - The transaction is a duplicate of a previous + transaction and cannot be processed again. + - `system_malfunction` - A system malfunction occurred, preventing the + transaction from being processed. + - `additional_customer_authentication_required` - Additional customer + authentication is required to complete the transaction. + - `surcharge_amount_not_permitted` - The surcharge amount applied to the + transaction is not permitted by the issuer. + - `decline_for_cvv2_failure` - The transaction was declined due to a failure in + verifying the CVV2 code. + - `stop_payment_order` - A stop payment order has been placed on this + transaction. + - `revocation_of_authorization_order` - An order has been placed to revoke + authorization for this transaction. + - `revocation_of_all_authorizations_order` - An order has been placed to revoke + all authorizations for this cardholder. + """ + + +class Submission(BaseModel): + retrieval_reference_number: str + """A 12-digit retrieval reference number that identifies the transfer. + + Usually a combination of a timestamp and the trace number. + """ + + sender_reference: str + """A unique reference for the transfer.""" + + submitted_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was submitted to card network. + """ + + trace_number: str + """ + A 6-digit trace number that identifies the transfer within a small window of + time. + """ + + +class CardPushTransfer(BaseModel): + id: str + """The Card Push Transfer's identifier.""" + + acceptance: Optional[Acceptance] = None + """ + If the transfer is accepted by the recipient bank, this will contain + supplemental details. + """ + + account_id: str + """The Account from which the transfer was sent.""" + + amount: int + """The transfer amount in USD cents.""" + + approval: Optional[Approval] = None + """ + If your account requires approvals for transfers and the transfer was approved, + this will contain details of the approval. + """ + + business_application_identifier: Literal[ + "account_to_account", + "business_to_business", + "money_transfer_bank_initiated", + "non_card_bill_payment", + "consumer_bill_payment", + "card_bill_payment", + "funds_disbursement", + "funds_transfer", + "loyalty_and_offers", + "merchant_disbursement", + "merchant_payment", + "person_to_person", + "top_up", + "wallet_transfer", + ] + """ + The Business Application Identifier describes the type of transaction being + performed. Your program must be approved for the specified Business Application + Identifier in order to use it. + + - `account_to_account` - Account to Account + - `business_to_business` - Business to Business + - `money_transfer_bank_initiated` - Money Transfer Bank Initiated + - `non_card_bill_payment` - Non-Card Bill Payment + - `consumer_bill_payment` - Consumer Bill Payment + - `card_bill_payment` - Card Bill Payment + - `funds_disbursement` - Funds Disbursement + - `funds_transfer` - Funds Transfer + - `loyalty_and_offers` - Loyalty and Offers + - `merchant_disbursement` - Merchant Disbursement + - `merchant_payment` - Merchant Payment + - `person_to_person` - Person to Person + - `top_up` - Top Up + - `wallet_transfer` - Wallet Transfer + """ + + cancellation: Optional[Cancellation] = None + """ + If your account requires approvals for transfers and the transfer was not + approved, this will contain details of the cancellation. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + decline: Optional[Decline] = None + """ + If the transfer is rejected by the card network or the destination financial + institution, this will contain supplemental details. + """ + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + merchant_category_code: str + """ + The merchant category code (MCC) of the merchant (generally your business) + sending the transfer. This is a four-digit code that describes the type of + business or service provided by the merchant. Your program must be approved for + the specified MCC in order to use it. + """ + + merchant_city_name: str + """The city name of the merchant (generally your business) sending the transfer.""" + + merchant_name: str + """The merchant name shows up as the statement descriptor for the transfer. + + This is typically the name of your business or organization. + """ + + merchant_name_prefix: str + """ + For certain Business Application Identifiers, the statement descriptor is + `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + four character prefix that identifies the merchant. + """ + + merchant_postal_code: str + """The postal code of the merchant (generally your business) sending the transfer.""" + + merchant_state: str + """The state of the merchant (generally your business) sending the transfer.""" + + recipient_name: str + """The name of the funds recipient.""" + + sender_address_city: str + """The city of the sender.""" + + sender_address_line1: str + """The address line 1 of the sender.""" + + sender_address_postal_code: str + """The postal code of the sender.""" + + sender_address_state: str + """The state of the sender.""" + + sender_name: str + """The name of the funds originator.""" + + source_account_number_id: str + """The Account Number the recipient will see as having sent the transfer.""" + + status: Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "requires_attention", + "pending_submission", + "submitted", + "complete", + "declined", + ] + """The lifecycle status of the transfer. + + - `pending_approval` - The transfer is pending approval. + - `canceled` - The transfer has been canceled. + - `pending_reviewing` - The transfer is pending review by Increase. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `pending_submission` - The transfer is queued to be submitted to the card + network. + - `submitted` - The transfer has been submitted and is pending a response from + the card network. + - `complete` - The transfer has been sent successfully and is complete. + - `declined` - The transfer was declined by the network or the recipient's bank. + """ + + submission: Optional[Submission] = None + """ + After the transfer is submitted to the card network, this will contain + supplemental details. + """ + + type: Literal["card_push_transfer"] + """A constant representing the object's type. + + For this resource it will always be `card_push_transfer`. + """ diff --git a/src/increase/types/card_push_transfer_create_params.py b/src/increase/types/card_push_transfer_create_params.py new file mode 100644 index 000000000..9fae1c4e9 --- /dev/null +++ b/src/increase/types/card_push_transfer_create_params.py @@ -0,0 +1,111 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["CardPushTransferCreateParams"] + + +class CardPushTransferCreateParams(TypedDict, total=False): + amount: Required[int] + """The transfer amount in USD cents. For Card Push transfers, must be positive.""" + + business_application_identifier: Required[ + Literal[ + "account_to_account", + "business_to_business", + "money_transfer_bank_initiated", + "non_card_bill_payment", + "consumer_bill_payment", + "card_bill_payment", + "funds_disbursement", + "funds_transfer", + "loyalty_and_offers", + "merchant_disbursement", + "merchant_payment", + "person_to_person", + "top_up", + "wallet_transfer", + ] + ] + """ + The Business Application Identifier describes the type of transaction being + performed. Your program must be approved for the specified Business Application + Identifier in order to use it. + + - `account_to_account` - Account to Account + - `business_to_business` - Business to Business + - `money_transfer_bank_initiated` - Money Transfer Bank Initiated + - `non_card_bill_payment` - Non-Card Bill Payment + - `consumer_bill_payment` - Consumer Bill Payment + - `card_bill_payment` - Card Bill Payment + - `funds_disbursement` - Funds Disbursement + - `funds_transfer` - Funds Transfer + - `loyalty_and_offers` - Loyalty and Offers + - `merchant_disbursement` - Merchant Disbursement + - `merchant_payment` - Merchant Payment + - `person_to_person` - Person to Person + - `top_up` - Top Up + - `wallet_transfer` - Wallet Transfer + """ + + card_token_id: Required[str] + """ + The Increase identifier for the Card Token that represents the card number + you're pushing funds to. + """ + + merchant_category_code: Required[str] + """ + The merchant category code (MCC) of the merchant (generally your business) + sending the transfer. This is a four-digit code that describes the type of + business or service provided by the merchant. Your program must be approved for + the specified MCC in order to use it. + """ + + merchant_city_name: Required[str] + """The city name of the merchant (generally your business) sending the transfer.""" + + merchant_name: Required[str] + """The merchant name shows up as the statement descriptor for the transfer. + + This is typically the name of your business or organization. + """ + + merchant_name_prefix: Required[str] + """ + For certain Business Application Identifiers, the statement descriptor is + `merchant_name_prefix*sender_name`, where the `merchant_name_prefix` is a one to + four character prefix that identifies the merchant. + """ + + merchant_postal_code: Required[str] + """The postal code of the merchant (generally your business) sending the transfer.""" + + merchant_state: Required[str] + """The state of the merchant (generally your business) sending the transfer.""" + + recipient_name: Required[str] + """The name of the funds recipient.""" + + sender_address_city: Required[str] + """The city of the sender.""" + + sender_address_line1: Required[str] + """The address line 1 of the sender.""" + + sender_address_postal_code: Required[str] + """The postal code of the sender.""" + + sender_address_state: Required[str] + """The state of the sender.""" + + sender_name: Required[str] + """The name of the funds originator.""" + + source_account_number_id: Required[str] + """The identifier of the Account Number from which to send the transfer.""" + + require_approval: bool + """Whether the transfer requires explicit approval via the dashboard or API.""" diff --git a/src/increase/types/card_push_transfer_list_params.py b/src/increase/types/card_push_transfer_list_params.py new file mode 100644 index 000000000..27b290596 --- /dev/null +++ b/src/increase/types/card_push_transfer_list_params.py @@ -0,0 +1,87 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["CardPushTransferListParams", "CreatedAt", "Status"] + + +class CardPushTransferListParams(TypedDict, total=False): + account_id: str + """Filter Card Push Transfers to ones belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "requires_attention", + "pending_submission", + "submitted", + "complete", + "declined", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/card_token.py b/src/increase/types/card_token.py new file mode 100644 index 000000000..b7f1b4a09 --- /dev/null +++ b/src/increase/types/card_token.py @@ -0,0 +1,40 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from datetime import date, datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["CardToken"] + + +class CardToken(BaseModel): + id: str + """The Card Token's identifier.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the card token was created. + """ + + expiration_date: date + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date when the card + expires. + """ + + last4: str + """The last 4 digits of the card number.""" + + length: int + """The length of the card number.""" + + prefix: str + """The prefix of the card number, usually 8 digits.""" + + type: Literal["card_token"] + """A constant representing the object's type. + + For this resource it will always be `card_token`. + """ diff --git a/src/increase/types/card_token_capabilities.py b/src/increase/types/card_token_capabilities.py new file mode 100644 index 000000000..0b2543b60 --- /dev/null +++ b/src/increase/types/card_token_capabilities.py @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["CardTokenCapabilities", "Route"] + + +class Route(BaseModel): + cross_border_push_transfers: Literal["supported", "not_supported"] + """Whether you can push funds to the card using cross-border Card Push Transfers. + + - `supported` - The capability is supported. + - `not_supported` - The capability is not supported. + """ + + domestic_push_transfers: Literal["supported", "not_supported"] + """Whether you can push funds to the card using domestic Card Push Transfers. + + - `supported` - The capability is supported. + - `not_supported` - The capability is not supported. + """ + + route: Literal["visa", "mastercard"] + """The card network route the capabilities apply to. + + - `visa` - Visa and Interlink + - `mastercard` - Mastercard and Maestro + """ + + +class CardTokenCapabilities(BaseModel): + routes: List[Route] + """Each route represent a path e.g., a push transfer can take.""" + + type: Literal["card_token_capabilities"] + """A constant representing the object's type. + + For this resource it will always be `card_token_capabilities`. + """ diff --git a/src/increase/types/card_token_list_params.py b/src/increase/types/card_token_list_params.py new file mode 100644 index 000000000..68c5a04db --- /dev/null +++ b/src/increase/types/card_token_list_params.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["CardTokenListParams", "CreatedAt"] + + +class CardTokenListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py new file mode 100644 index 000000000..595ebdc4e --- /dev/null +++ b/src/increase/types/card_validation.py @@ -0,0 +1,379 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "CardValidation", + "Acceptance", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "Decline", + "Submission", +] + + +class Acceptance(BaseModel): + accepted_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the validation was accepted by the issuing bank. + """ + + authorization_identification_response: str + """The authorization identification response from the issuing bank.""" + + card_verification_value2_result: Optional[Literal["match", "no_match"]] = None + """The result of the Card Verification Value 2 match. + + - `match` - The Card Verification Value 2 (CVV2) matches the expected value. + - `no_match` - The Card Verification Value 2 (CVV2) does not match the expected + value. + """ + + cardholder_first_name_result: Optional[Literal["match", "no_match", "partial_match"]] = None + """The result of the cardholder first name match. + + - `match` - The cardholder name component matches the expected value. + - `no_match` - The cardholder name component does not match the expected value. + - `partial_match` - The cardholder name component partially matches the expected + value. + """ + + cardholder_full_name_result: Optional[Literal["match", "no_match", "partial_match"]] = None + """The result of the cardholder full name match. + + - `match` - The cardholder name component matches the expected value. + - `no_match` - The cardholder name component does not match the expected value. + - `partial_match` - The cardholder name component partially matches the expected + value. + """ + + cardholder_last_name_result: Optional[Literal["match", "no_match", "partial_match"]] = None + """The result of the cardholder last name match. + + - `match` - The cardholder name component matches the expected value. + - `no_match` - The cardholder name component does not match the expected value. + - `partial_match` - The cardholder name component partially matches the expected + value. + """ + + cardholder_middle_name_result: Optional[Literal["match", "no_match", "partial_match"]] = None + """The result of the cardholder middle name match. + + - `match` - The cardholder name component matches the expected value. + - `no_match` - The cardholder name component does not match the expected value. + - `partial_match` - The cardholder name component partially matches the expected + value. + """ + + cardholder_postal_code_result: Optional[Literal["match", "no_match"]] = None + """The result of the cardholder postal code match. + + - `match` - The cardholder address component matches the expected value. + - `no_match` - The cardholder address component does not match the expected + value. + """ + + cardholder_street_address_result: Optional[Literal["match", "no_match"]] = None + """The result of the cardholder street address match. + + - `match` - The cardholder address component matches the expected value. + - `no_match` - The cardholder address component does not match the expected + value. + """ + + network_transaction_identifier: Optional[str] = None + """A unique identifier for the transaction on the card network.""" + + +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + +class Decline(BaseModel): + declined_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the validation was declined. + """ + + network_transaction_identifier: Optional[str] = None + """A unique identifier for the transaction on the card network.""" + + reason: Literal[ + "do_not_honor", + "activity_count_limit_exceeded", + "refer_to_card_issuer", + "refer_to_card_issuer_special_condition", + "invalid_merchant", + "pick_up_card", + "error", + "pick_up_card_special", + "invalid_transaction", + "invalid_amount", + "invalid_account_number", + "no_such_issuer", + "re_enter_transaction", + "no_credit_account", + "pick_up_card_lost", + "pick_up_card_stolen", + "closed_account", + "insufficient_funds", + "no_checking_account", + "no_savings_account", + "expired_card", + "transaction_not_permitted_to_cardholder", + "transaction_not_allowed_at_terminal", + "suspected_fraud", + "activity_amount_limit_exceeded", + "restricted_card", + "security_violation", + "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_first_use", + "credit_issuer_unavailable", + "negative_card_verification_value_results", + "issuer_unavailable", + "financial_institution_cannot_be_found", + "transaction_cannot_be_completed", + "duplicate_transaction", + "system_malfunction", + "additional_customer_authentication_required", + "surcharge_amount_not_permitted", + "decline_for_cvv2_failure", + "stop_payment_order", + "revocation_of_authorization_order", + "revocation_of_all_authorizations_order", + ] + """The reason why the validation was declined. + + - `do_not_honor` - The card issuer has declined the transaction without + providing a specific reason. + - `activity_count_limit_exceeded` - The number of transactions for the card has + exceeded the limit set by the issuer. + - `refer_to_card_issuer` - The card issuer requires the cardholder to contact + them for further information regarding the transaction. + - `refer_to_card_issuer_special_condition` - The card issuer requires the + cardholder to contact them due to a special condition related to the + transaction. + - `invalid_merchant` - The merchant is not valid for this transaction. + - `pick_up_card` - The card should be retained by the terminal. + - `error` - An error occurred during processing of the transaction. + - `pick_up_card_special` - The card should be retained by the terminal due to a + special condition. + - `invalid_transaction` - The transaction is invalid and cannot be processed. + - `invalid_amount` - The amount of the transaction is invalid. + - `invalid_account_number` - The account number provided is invalid. + - `no_such_issuer` - The issuer of the card could not be found. + - `re_enter_transaction` - The transaction should be re-entered for processing. + - `no_credit_account` - There is no credit account associated with the card. + - `pick_up_card_lost` - The card should be retained by the terminal because it + has been reported lost. + - `pick_up_card_stolen` - The card should be retained by the terminal because it + has been reported stolen. + - `closed_account` - The account associated with the card has been closed. + - `insufficient_funds` - There are insufficient funds in the account to complete + the transaction. + - `no_checking_account` - There is no checking account associated with the card. + - `no_savings_account` - There is no savings account associated with the card. + - `expired_card` - The card has expired and cannot be used for transactions. + - `transaction_not_permitted_to_cardholder` - The transaction is not permitted + for this cardholder. + - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this + terminal. + - `suspected_fraud` - The transaction has been flagged as suspected fraud and + cannot be processed. + - `activity_amount_limit_exceeded` - The amount of activity on the card has + exceeded the limit set by the issuer. + - `restricted_card` - The card has restrictions that prevent it from being used + for this transaction. + - `security_violation` - A security violation has occurred, preventing the + transaction from being processed. + - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The + transaction does not meet the anti-money laundering requirements set by the + issuer. + - `blocked_first_use` - The first use of the card has been blocked by the + issuer. + - `credit_issuer_unavailable` - The credit issuer is currently unavailable to + process the transaction. + - `negative_card_verification_value_results` - The card verification value (CVV) + results were negative, indicating a potential issue with the card. + - `issuer_unavailable` - The issuer of the card is currently unavailable to + process the transaction. + - `financial_institution_cannot_be_found` - The financial institution associated + with the card could not be found. + - `transaction_cannot_be_completed` - The transaction cannot be completed due to + an unspecified reason. + - `duplicate_transaction` - The transaction is a duplicate of a previous + transaction and cannot be processed again. + - `system_malfunction` - A system malfunction occurred, preventing the + transaction from being processed. + - `additional_customer_authentication_required` - Additional customer + authentication is required to complete the transaction. + - `surcharge_amount_not_permitted` - The surcharge amount applied to the + transaction is not permitted by the issuer. + - `decline_for_cvv2_failure` - The transaction was declined due to a failure in + verifying the CVV2 code. + - `stop_payment_order` - A stop payment order has been placed on this + transaction. + - `revocation_of_authorization_order` - An order has been placed to revoke + authorization for this transaction. + - `revocation_of_all_authorizations_order` - An order has been placed to revoke + all authorizations for this cardholder. + """ + + +class Submission(BaseModel): + retrieval_reference_number: str + """A 12-digit retrieval reference number that identifies the validation. + + Usually a combination of a timestamp and the trace number. + """ + + submitted_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the validation was submitted to the card network. + """ + + trace_number: str + """ + A 6-digit trace number that identifies the validation within a short time + window. + """ + + +class CardValidation(BaseModel): + id: str + """The Card Validation's identifier.""" + + acceptance: Optional[Acceptance] = None + """ + If the validation is accepted by the recipient bank, this will contain + supplemental details. + """ + + account_id: str + """The identifier of the Account from which to send the validation.""" + + cardholder_first_name: Optional[str] = None + """The cardholder's first name.""" + + cardholder_last_name: Optional[str] = None + """The cardholder's last name.""" + + cardholder_middle_name: Optional[str] = None + """The cardholder's middle name.""" + + cardholder_postal_code: Optional[str] = None + """The postal code of the cardholder's address.""" + + cardholder_street_address: Optional[str] = None + """The cardholder's street address.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the validation was created. + """ + + created_by: Optional[CreatedBy] = None + """What object created the validation, either via the API or the dashboard.""" + + decline: Optional[Decline] = None + """ + If the validation is rejected by the card network or the destination financial + institution, this will contain supplemental details. + """ + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + merchant_category_code: str + """ + A four-digit code (MCC) identifying the type of business or service provided by + the merchant. + """ + + merchant_city_name: str + """The city where the merchant (typically your business) is located.""" + + merchant_name: str + """The merchant name that will appear in the cardholder’s statement descriptor. + + Typically your business name. + """ + + merchant_postal_code: str + """The postal code for the merchant’s (typically your business’s) location.""" + + merchant_state: str + """The U.S. state where the merchant (typically your business) is located.""" + + status: Literal["requires_attention", "pending_submission", "submitted", "complete", "declined"] + """The lifecycle status of the validation. + + - `requires_attention` - The validation requires attention from an Increase + operator. + - `pending_submission` - The validation is queued to be submitted to the card + network. + - `submitted` - The validation has been submitted and is pending a response from + the card network. + - `complete` - The validation has been sent successfully and is complete. + - `declined` - The validation was declined by the network or the recipient's + bank. + """ + + submission: Optional[Submission] = None + """ + After the validation is submitted to the card network, this will contain + supplemental details. + """ + + type: Literal["card_validation"] + """A constant representing the object's type. + + For this resource it will always be `card_validation`. + """ diff --git a/src/increase/types/card_validation_create_params.py b/src/increase/types/card_validation_create_params.py new file mode 100644 index 000000000..e8af74976 --- /dev/null +++ b/src/increase/types/card_validation_create_params.py @@ -0,0 +1,54 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["CardValidationCreateParams"] + + +class CardValidationCreateParams(TypedDict, total=False): + account_id: Required[str] + """The identifier of the Account from which to send the validation.""" + + card_token_id: Required[str] + """ + The Increase identifier for the Card Token that represents the card number + you're validating. + """ + + merchant_category_code: Required[str] + """ + A four-digit code (MCC) identifying the type of business or service provided by + the merchant. + """ + + merchant_city_name: Required[str] + """The city where the merchant (typically your business) is located.""" + + merchant_name: Required[str] + """The merchant name that will appear in the cardholder’s statement descriptor. + + Typically your business name. + """ + + merchant_postal_code: Required[str] + """The postal code for the merchant’s (typically your business’s) location.""" + + merchant_state: Required[str] + """The U.S. state where the merchant (typically your business) is located.""" + + cardholder_first_name: str + """The cardholder's first name.""" + + cardholder_last_name: str + """The cardholder's last name.""" + + cardholder_middle_name: str + """The cardholder's middle name.""" + + cardholder_postal_code: str + """The postal code of the cardholder's address.""" + + cardholder_street_address: str + """The cardholder's street address.""" diff --git a/src/increase/types/card_validation_list_params.py b/src/increase/types/card_validation_list_params.py new file mode 100644 index 000000000..f883d98df --- /dev/null +++ b/src/increase/types/card_validation_list_params.py @@ -0,0 +1,76 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["CardValidationListParams", "CreatedAt", "Status"] + + +class CardValidationListParams(TypedDict, total=False): + account_id: str + """Filter Card Validations to ones belonging to the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["requires_attention", "pending_submission", "submitted", "complete", "declined"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 94a8ed827..f7a621737 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -4,6 +4,7 @@ from .program_create_params import ProgramCreateParams as ProgramCreateParams from .document_create_params import DocumentCreateParams as DocumentCreateParams +from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py new file mode 100644 index 000000000..f1272e9a6 --- /dev/null +++ b/src/increase/types/simulations/card_token_create_params.py @@ -0,0 +1,51 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union, Iterable +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from ..._utils import PropertyInfo + +__all__ = ["CardTokenCreateParams", "Capability"] + + +class CardTokenCreateParams(TypedDict, total=False): + capabilities: Iterable[Capability] + """The capabilities of the outbound card token.""" + + expiration: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The expiration date of the card.""" + + last4: str + """The last 4 digits of the card number.""" + + prefix: str + """The prefix of the card number, usually the first 8 digits.""" + + primary_account_number_length: int + """The total length of the card number, including prefix and last4.""" + + +class Capability(TypedDict, total=False): + cross_border_push_transfers: Required[Literal["supported", "not_supported"]] + """The cross-border push transfers capability. + + - `supported` - The capability is supported. + - `not_supported` - The capability is not supported. + """ + + domestic_push_transfers: Required[Literal["supported", "not_supported"]] + """The domestic push transfers capability. + + - `supported` - The capability is supported. + - `not_supported` - The capability is not supported. + """ + + route: Required[Literal["visa", "mastercard"]] + """The route of the capability. + + - `visa` - Visa and Interlink + - `mastercard` - Mastercard and Maestro + """ diff --git a/tests/api_resources/simulations/test_card_tokens.py b/tests/api_resources/simulations/test_card_tokens.py new file mode 100644 index 000000000..9294cf3e1 --- /dev/null +++ b/tests/api_resources/simulations/test_card_tokens.py @@ -0,0 +1,109 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardToken +from increase._utils import parse_date + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardTokens: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_token = client.simulations.card_tokens.create() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_token = client.simulations.card_tokens.create( + capabilities=[ + { + "cross_border_push_transfers": "supported", + "domestic_push_transfers": "supported", + "route": "visa", + } + ], + expiration=parse_date("2019-12-27"), + last4="1234", + prefix="41234567", + primary_account_number_length=16, + ) + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_tokens.with_raw_response.create() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_tokens.with_streaming_response.create() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardTokens: + 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: + card_token = await async_client.simulations.card_tokens.create() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_token = await async_client.simulations.card_tokens.create( + capabilities=[ + { + "cross_border_push_transfers": "supported", + "domestic_push_transfers": "supported", + "route": "visa", + } + ], + expiration=parse_date("2019-12-27"), + last4="1234", + prefix="41234567", + primary_account_number_length=16, + ) + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_tokens.with_raw_response.create() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = await response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_tokens.with_streaming_response.create() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = await response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py new file mode 100644 index 000000000..aeaff762b --- /dev/null +++ b/tests/api_resources/test_card_push_transfers.py @@ -0,0 +1,536 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPushTransfer +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardPushTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + require_approval=True, + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.card_push_transfers.with_raw_response.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.card_push_transfers.with_streaming_response.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.retrieve( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.card_push_transfers.with_raw_response.retrieve( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.card_push_transfers.with_streaming_response.retrieve( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + client.card_push_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.list() + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["pending_approval"]}, + ) + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.card_push_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = response.parse() + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.card_push_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = response.parse() + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_approve(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.approve( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_raw_response_approve(self, client: Increase) -> None: + response = client.card_push_transfers.with_raw_response.approve( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_streaming_response_approve(self, client: Increase) -> None: + with client.card_push_transfers.with_streaming_response.approve( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_approve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + client.card_push_transfers.with_raw_response.approve( + "", + ) + + @parametrize + def test_method_cancel(self, client: Increase) -> None: + card_push_transfer = client.card_push_transfers.cancel( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_raw_response_cancel(self, client: Increase) -> None: + response = client.card_push_transfers.with_raw_response.cancel( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + def test_streaming_response_cancel(self, client: Increase) -> None: + with client.card_push_transfers.with_streaming_response.cancel( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_cancel(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + client.card_push_transfers.with_raw_response.cancel( + "", + ) + + +class TestAsyncCardPushTransfers: + 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: + card_push_transfer = await async_client.card_push_transfers.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + require_approval=True, + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_push_transfers.with_raw_response.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.card_push_transfers.with_streaming_response.create( + amount=100, + business_application_identifier="funds_disbursement", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_name_prefix="Acme", + merchant_postal_code="10045", + merchant_state="NY", + recipient_name="Ian Crease", + sender_address_city="New York", + sender_address_line1="33 Liberty Street", + sender_address_postal_code="10045", + sender_address_state="NY", + sender_name="Ian Crease", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.retrieve( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_push_transfers.with_raw_response.retrieve( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.card_push_transfers.with_streaming_response.retrieve( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + await async_client.card_push_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.list() + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["pending_approval"]}, + ) + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_push_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = await response.parse() + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.card_push_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = await response.parse() + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_approve(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.approve( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_push_transfers.with_raw_response.approve( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: + async with async_client.card_push_transfers.with_streaming_response.approve( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + await async_client.card_push_transfers.with_raw_response.approve( + "", + ) + + @parametrize + async def test_method_cancel(self, async_client: AsyncIncrease) -> None: + card_push_transfer = await async_client.card_push_transfers.cancel( + "card_push_transfer_id", + ) + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_push_transfers.with_raw_response.cancel( + "card_push_transfer_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: + async with async_client.card_push_transfers.with_streaming_response.cancel( + "card_push_transfer_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_push_transfer = await response.parse() + assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_push_transfer_id` but received ''"): + await async_client.card_push_transfers.with_raw_response.cancel( + "", + ) diff --git a/tests/api_resources/test_card_tokens.py b/tests/api_resources/test_card_tokens.py new file mode 100644 index 000000000..18d7ad665 --- /dev/null +++ b/tests/api_resources/test_card_tokens.py @@ -0,0 +1,256 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardToken, CardTokenCapabilities +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardTokens: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + card_token = client.card_tokens.retrieve( + "card_token_id", + ) + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.card_tokens.with_raw_response.retrieve( + "card_token_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.card_tokens.with_streaming_response.retrieve( + "card_token_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_token_id` but received ''"): + client.card_tokens.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + card_token = client.card_tokens.list() + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + card_token = client.card_tokens.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.card_tokens.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = response.parse() + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.card_tokens.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = response.parse() + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_capabilities(self, client: Increase) -> None: + card_token = client.card_tokens.capabilities( + "card_token_id", + ) + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + @parametrize + def test_raw_response_capabilities(self, client: Increase) -> None: + response = client.card_tokens.with_raw_response.capabilities( + "card_token_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = response.parse() + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + @parametrize + def test_streaming_response_capabilities(self, client: Increase) -> None: + with client.card_tokens.with_streaming_response.capabilities( + "card_token_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = response.parse() + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_capabilities(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_token_id` but received ''"): + client.card_tokens.with_raw_response.capabilities( + "", + ) + + +class TestAsyncCardTokens: + 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: + card_token = await async_client.card_tokens.retrieve( + "card_token_id", + ) + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_tokens.with_raw_response.retrieve( + "card_token_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = await response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.card_tokens.with_streaming_response.retrieve( + "card_token_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = await response.parse() + assert_matches_type(CardToken, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_token_id` but received ''"): + await async_client.card_tokens.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + card_token = await async_client.card_tokens.list() + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + card_token = await async_client.card_tokens.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_tokens.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = await response.parse() + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.card_tokens.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = await response.parse() + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_capabilities(self, async_client: AsyncIncrease) -> None: + card_token = await async_client.card_tokens.capabilities( + "card_token_id", + ) + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + @parametrize + async def test_raw_response_capabilities(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_tokens.with_raw_response.capabilities( + "card_token_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_token = await response.parse() + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + @parametrize + async def test_streaming_response_capabilities(self, async_client: AsyncIncrease) -> None: + async with async_client.card_tokens.with_streaming_response.capabilities( + "card_token_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_token = await response.parse() + assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_capabilities(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_token_id` but received ''"): + await async_client.card_tokens.with_raw_response.capabilities( + "", + ) diff --git a/tests/api_resources/test_card_validations.py b/tests/api_resources/test_card_validations.py new file mode 100644 index 000000000..bc23df5ad --- /dev/null +++ b/tests/api_resources/test_card_validations.py @@ -0,0 +1,320 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardValidation +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardValidations: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_validation = client.card_validations.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_validation = client.card_validations.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + cardholder_first_name="Dee", + cardholder_last_name="Hock", + cardholder_middle_name="Ward", + cardholder_postal_code="10045", + cardholder_street_address="33 Liberty Street", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.card_validations.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.card_validations.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + card_validation = client.card_validations.retrieve( + "card_validation_id", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.card_validations.with_raw_response.retrieve( + "card_validation_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.card_validations.with_streaming_response.retrieve( + "card_validation_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_validation_id` but received ''"): + client.card_validations.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + card_validation = client.card_validations.list() + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + card_validation = client.card_validations.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["requires_attention"]}, + ) + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.card_validations.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = response.parse() + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.card_validations.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = response.parse() + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardValidations: + 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: + card_validation = await async_client.card_validations.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_validation = await async_client.card_validations.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + cardholder_first_name="Dee", + cardholder_last_name="Hock", + cardholder_middle_name="Ward", + cardholder_postal_code="10045", + cardholder_street_address="33 Liberty Street", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_validations.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = await response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.card_validations.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", + merchant_category_code="1234", + merchant_city_name="New York", + merchant_name="Acme Corp", + merchant_postal_code="10045", + merchant_state="NY", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = await response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + card_validation = await async_client.card_validations.retrieve( + "card_validation_id", + ) + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_validations.with_raw_response.retrieve( + "card_validation_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = await response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.card_validations.with_streaming_response.retrieve( + "card_validation_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = await response.parse() + assert_matches_type(CardValidation, card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_validation_id` but received ''"): + await async_client.card_validations.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + card_validation = await async_client.card_validations.list() + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + card_validation = await async_client.card_validations.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["requires_attention"]}, + ) + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_validations.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_validation = await response.parse() + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.card_validations.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_validation = await response.parse() + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + + assert cast(Any, response.is_closed) is True From b14bba0e044ccf8d508f2b12a90f9e0f724f86d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:03:15 +0000 Subject: [PATCH 0746/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 72e9c5c32..28ec9075a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-931013cdbe08378a853b2fd05800091aba88acebe919ec5088d2dd25c0846331.yml -openapi_spec_hash: 6cfed987ca287da4d3e52ace77b0e417 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7861b46606a5a2d849c4403583805c1074983cffaf7acfe0a4d7bafa38c5efd.yml +openapi_spec_hash: a1cad356ebe1b02a67dbafbde7d7f1d4 config_hash: b0b366d8c705ea0efe62093bae953e5a From 4b56175830dbe28a0c67157bdd531ce4a65535fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 14 Aug 2025 13:12:50 +0000 Subject: [PATCH 0747/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 182fd7857..eaf24516e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.285.0" + ".": "0.286.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b12e5035c..12d510d99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.285.0" +version = "0.286.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 136fbbeb9..0a35013b0 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.285.0" # x-release-please-version +__version__ = "0.286.0" # x-release-please-version From cb514455d900126438da8692ff944ea8f38cc386 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 16:00:51 +0000 Subject: [PATCH 0748/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/external_accounts.py | 12 ++++++++---- src/increase/types/external_account.py | 3 ++- src/increase/types/external_account_create_params.py | 3 ++- src/increase/types/external_account_update_params.py | 3 ++- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 28ec9075a..2adac204c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a7861b46606a5a2d849c4403583805c1074983cffaf7acfe0a4d7bafa38c5efd.yml -openapi_spec_hash: a1cad356ebe1b02a67dbafbde7d7f1d4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-70837ed2f8d4ade9021fc0f50bf3cd77cdf05f308c4ed75b2b4dcc42f1ec2378.yml +openapi_spec_hash: 09cf1c77dce2927cb41426a287a15437 config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index a6f62b31b..504541b01 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -51,7 +51,7 @@ def create( description: str, routing_number: str, account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "other"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -81,6 +81,7 @@ def create( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. extra_headers: Send extra headers @@ -158,7 +159,7 @@ def update( *, account_holder: Literal["business", "individual"] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "other"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, status: Literal["active", "archived"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -185,6 +186,7 @@ def update( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. status: The status of the External Account. @@ -317,7 +319,7 @@ async def create( description: str, routing_number: str, account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "other"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -347,6 +349,7 @@ async def create( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. extra_headers: Send extra headers @@ -424,7 +427,7 @@ async def update( *, account_holder: Literal["business", "individual"] | NotGiven = NOT_GIVEN, description: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "other"] | NotGiven = NOT_GIVEN, + funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, status: Literal["active", "archived"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -451,6 +454,7 @@ async def update( - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. status: The status of the External Account. diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py index 1e59efa5b..42c40dcf9 100644 --- a/src/increase/types/external_account.py +++ b/src/increase/types/external_account.py @@ -33,11 +33,12 @@ class ExternalAccount(BaseModel): description: str """The External Account's description for display purposes.""" - funding: Literal["checking", "savings", "other"] + funding: Literal["checking", "savings", "general_ledger", "other"] """The type of the account to which the transfer will be sent. - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. """ diff --git a/src/increase/types/external_account_create_params.py b/src/increase/types/external_account_create_params.py index 9e867766b..92e46b9de 100644 --- a/src/increase/types/external_account_create_params.py +++ b/src/increase/types/external_account_create_params.py @@ -28,10 +28,11 @@ class ExternalAccountCreateParams(TypedDict, total=False): - `unknown` - It's unknown what kind of entity owns the External Account. """ - funding: Literal["checking", "savings", "other"] + funding: Literal["checking", "savings", "general_ledger", "other"] """The type of the destination account. Defaults to `checking`. - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. """ diff --git a/src/increase/types/external_account_update_params.py b/src/increase/types/external_account_update_params.py index 9e776857f..574b6dcc3 100644 --- a/src/increase/types/external_account_update_params.py +++ b/src/increase/types/external_account_update_params.py @@ -18,11 +18,12 @@ class ExternalAccountUpdateParams(TypedDict, total=False): description: str """The description you choose to give the external account.""" - funding: Literal["checking", "savings", "other"] + funding: Literal["checking", "savings", "general_ledger", "other"] """The funding type of the External Account. - `checking` - A checking account. - `savings` - A savings account. + - `general_ledger` - A general ledger account. - `other` - A different type of account. """ From 19ecf0bf707c77713c973eba8941052e08fe9824 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 15 Aug 2025 16:03:40 +0000 Subject: [PATCH 0749/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index eaf24516e..bc9e45054 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.286.0" + ".": "0.287.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 12d510d99..08c7e46f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.286.0" +version = "0.287.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0a35013b0..6698e5d0b 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.286.0" # x-release-please-version +__version__ = "0.287.0" # x-release-please-version From 1c02d07c35404ebe3e933812de244b9f10ef85ce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 11:21:59 +0000 Subject: [PATCH 0750/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2adac204c..35b80bba7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-70837ed2f8d4ade9021fc0f50bf3cd77cdf05f308c4ed75b2b4dcc42f1ec2378.yml -openapi_spec_hash: 09cf1c77dce2927cb41426a287a15437 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e861c5dc0fe5d8ac8a5099eff9f99482ce5510988a1c3dd056f954c7709ae194.yml +openapi_spec_hash: da9c977849121632540be2bb9fa7571b config_hash: b0b366d8c705ea0efe62093bae953e5a From 42b712633e99f11e1468ba7ecbf7ffd992236acb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 17:47:01 +0000 Subject: [PATCH 0751/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/wire_drawdown_requests.py | 42 ++++++++++++------- .../wire_drawdown_request_create_params.py | 19 ++++++--- .../test_wire_drawdown_requests.py | 22 +++------- 4 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index 35b80bba7..31cc203c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e861c5dc0fe5d8ac8a5099eff9f99482ce5510988a1c3dd056f954c7709ae194.yml -openapi_spec_hash: da9c977849121632540be2bb9fa7571b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b232355836603d9dbb0ca86d4a946b458726531675db3fa1c4feeee10ff41011.yml +openapi_spec_hash: e986bdc1f77192e14e9075a7b1eac0f9 config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 970889d0e..8b5e86906 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -49,11 +49,12 @@ def create( amount: int, creditor_address: wire_drawdown_request_create_params.CreditorAddress, creditor_name: str, - debtor_account_number: str, debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, - debtor_routing_number: str, unstructured_remittance_information: str, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_external_account_id: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -74,16 +75,19 @@ def create( creditor_name: The creditor's name. - debtor_account_number: The debtor's account number. - debtor_address: The debtor's address. debtor_name: The debtor's name. - debtor_routing_number: The debtor's routing number. - unstructured_remittance_information: Remittance information the debtor will see as part of the request. + debtor_account_number: The debtor's account number. + + debtor_external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is + provided, `debtor_account_number` and `debtor_routing_number` must be absent. + + debtor_routing_number: The debtor's routing number. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -102,11 +106,12 @@ def create( "amount": amount, "creditor_address": creditor_address, "creditor_name": creditor_name, - "debtor_account_number": debtor_account_number, "debtor_address": debtor_address, "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, "unstructured_remittance_information": unstructured_remittance_information, + "debtor_account_number": debtor_account_number, + "debtor_external_account_id": debtor_external_account_id, + "debtor_routing_number": debtor_routing_number, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), @@ -242,11 +247,12 @@ async def create( amount: int, creditor_address: wire_drawdown_request_create_params.CreditorAddress, creditor_name: str, - debtor_account_number: str, debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, - debtor_routing_number: str, unstructured_remittance_information: str, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_external_account_id: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -267,16 +273,19 @@ async def create( creditor_name: The creditor's name. - debtor_account_number: The debtor's account number. - debtor_address: The debtor's address. debtor_name: The debtor's name. - debtor_routing_number: The debtor's routing number. - unstructured_remittance_information: Remittance information the debtor will see as part of the request. + debtor_account_number: The debtor's account number. + + debtor_external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is + provided, `debtor_account_number` and `debtor_routing_number` must be absent. + + debtor_routing_number: The debtor's routing number. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -295,11 +304,12 @@ async def create( "amount": amount, "creditor_address": creditor_address, "creditor_name": creditor_name, - "debtor_account_number": debtor_account_number, "debtor_address": debtor_address, "debtor_name": debtor_name, - "debtor_routing_number": debtor_routing_number, "unstructured_remittance_information": unstructured_remittance_information, + "debtor_account_number": debtor_account_number, + "debtor_external_account_id": debtor_external_account_id, + "debtor_routing_number": debtor_routing_number, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index 1902998ff..d7d44da47 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -20,21 +20,28 @@ class WireDrawdownRequestCreateParams(TypedDict, total=False): creditor_name: Required[str] """The creditor's name.""" - debtor_account_number: Required[str] - """The debtor's account number.""" - debtor_address: Required[DebtorAddress] """The debtor's address.""" debtor_name: Required[str] """The debtor's name.""" - debtor_routing_number: Required[str] - """The debtor's routing number.""" - unstructured_remittance_information: Required[str] """Remittance information the debtor will see as part of the request.""" + debtor_account_number: str + """The debtor's account number.""" + + debtor_external_account_id: str + """The ID of an External Account to initiate a transfer to. + + If this parameter is provided, `debtor_account_number` and + `debtor_routing_number` must be absent. + """ + + debtor_routing_number: str + """The debtor's routing number.""" + class CreditorAddress(TypedDict, total=False): city: Required[str] diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 01d77f275..8773766f8 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -29,14 +29,12 @@ def test_method_create(self, client: Increase) -> None: "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -55,7 +53,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "NY", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", @@ -65,8 +62,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "NY", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", + debtor_account_number="987654321", + debtor_external_account_id="debtor_external_account_id", + debtor_routing_number="101050001", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -81,14 +80,12 @@ def test_raw_response_create(self, client: Increase) -> None: "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) @@ -108,14 +105,12 @@ def test_streaming_response_create(self, client: Increase) -> None: "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed @@ -218,14 +213,12 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -244,7 +237,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "state": "NY", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", @@ -254,8 +246,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "state": "NY", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", + debtor_account_number="987654321", + debtor_external_account_id="debtor_external_account_id", + debtor_routing_number="101050001", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -270,14 +264,12 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) @@ -297,14 +289,12 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N "line1": "33 Liberty Street", }, creditor_name="National Phonograph Company", - debtor_account_number="987654321", debtor_address={ "city": "New York", "country": "US", "line1": "33 Liberty Street", }, debtor_name="Ian Crease", - debtor_routing_number="101050001", unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed From 39c6dbecadcde0ea10dd17a78d010c538b4e4a51 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 17:49:48 +0000 Subject: [PATCH 0752/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc9e45054..401c03881 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.287.0" + ".": "0.288.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 08c7e46f3..edeb4a486 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.287.0" +version = "0.288.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6698e5d0b..105a66fb8 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.287.0" # x-release-please-version +__version__ = "0.288.0" # x-release-please-version From 9f19ccfe1712a8295b4f66d4de164bb83ee9e61b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 18:58:09 +0000 Subject: [PATCH 0753/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/wire_drawdown_request.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 31cc203c9..49e48a70c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b232355836603d9dbb0ca86d4a946b458726531675db3fa1c4feeee10ff41011.yml -openapi_spec_hash: e986bdc1f77192e14e9075a7b1eac0f9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db453f5a5c4734d0cc56f9f61a1cbfaceb9b51f47076b75595bdc9fdedd439c7.yml +openapi_spec_hash: 0cd9098d2af2b4cee4f6678d01fb9516 config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index 320191b1c..a10180ae3 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -102,6 +102,9 @@ class WireDrawdownRequest(BaseModel): debtor_address: DebtorAddress """The debtor's address.""" + debtor_external_account_id: Optional[str] = None + """The debtor's external account identifier.""" + debtor_name: str """The debtor's name.""" From d41c73fd5ecdb7f9c0fa61a737366e905b9c5afe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 18 Aug 2025 19:01:04 +0000 Subject: [PATCH 0754/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 401c03881..092529719 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.288.0" + ".": "0.289.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index edeb4a486..47fc95e9a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.288.0" +version = "0.289.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 105a66fb8..3a542dbd7 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.288.0" # x-release-please-version +__version__ = "0.289.0" # x-release-please-version From 6ca221dae42c3bd6f2c01fea9c7cffe6bbf755dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 04:28:14 +0000 Subject: [PATCH 0755/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 49e48a70c..1e6dd5822 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db453f5a5c4734d0cc56f9f61a1cbfaceb9b51f47076b75595bdc9fdedd439c7.yml -openapi_spec_hash: 0cd9098d2af2b4cee4f6678d01fb9516 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a4a3a387e174d09e347540b5d614828b38020d2687f219337783e1f79d42889.yml +openapi_spec_hash: d6259b2fa93b0557413f7a21ae6a7ccd config_hash: b0b366d8c705ea0efe62093bae953e5a From 2c8cf974812e0228ea65efeaf7c8d27daf449cc8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 18:25:41 +0000 Subject: [PATCH 0756/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e6dd5822..6c8ed5eb7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a4a3a387e174d09e347540b5d614828b38020d2687f219337783e1f79d42889.yml -openapi_spec_hash: d6259b2fa93b0557413f7a21ae6a7ccd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5d00a1f3cc31adb9e28a09287bc20126f96e6cd866d60603c63ddcd92545b678.yml +openapi_spec_hash: 7ab8de7087209fcf49713651d997d5a2 config_hash: b0b366d8c705ea0efe62093bae953e5a From 637ae918103c5cd41bb131e1e2a670ddfb42e4f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 23:30:08 +0000 Subject: [PATCH 0757/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/inbound_wire_transfer.py | 46 +++++++++++++++++++++ 2 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6c8ed5eb7..18686e944 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5d00a1f3cc31adb9e28a09287bc20126f96e6cd866d60603c63ddcd92545b678.yml -openapi_spec_hash: 7ab8de7087209fcf49713651d997d5a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dea7b54f0adc920e4d2bc337bab1133189114389cb1f124b2f9cccedcedf881c.yml +openapi_spec_hash: c1349e34f78bfe5ba28b946fe7bb15dd config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 8157ac696..13cc6332f 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -59,9 +59,36 @@ class InboundWireTransfer(BaseModel): the inbound wire transfer was created. """ + creditor_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" + + creditor_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" + + creditor_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" + + creditor_name: Optional[str] = None + """A name set by the sender.""" + + debtor_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_name: Optional[str] = None + """A name set by the sender.""" + description: str """An Increase-constructed description of the transfer.""" + end_to_end_identification: Optional[str] = None + """A free-form reference string set by the sender, to help identify the transfer.""" + input_message_accountability_data: Optional[str] = None """ A unique identifier available to the originating and receiving banks, commonly @@ -69,6 +96,15 @@ class InboundWireTransfer(BaseModel): service and is helpful when debugging wires with the originating bank. """ + instructing_agent_routing_number: Optional[str] = None + """ + The American Banking Association (ABA) routing number of the bank that sent the + wire. + """ + + instruction_identification: Optional[str] = None + """The sending bank's identifier for the wire transfer.""" + originator_address_line1: Optional[str] = None """The address of the wire originator, set by the sending bank.""" @@ -127,5 +163,15 @@ class InboundWireTransfer(BaseModel): For this resource it will always be `inbound_wire_transfer`. """ + unique_end_to_end_transaction_reference: Optional[str] = None + """ + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. + """ + + unstructured_remittance_information: Optional[str] = None + """A free-form message set by the sender.""" + wire_drawdown_request_id: Optional[str] = None """The wire drawdown request the inbound wire transfer is fulfilling.""" From cfcd31ae3e74c5c9ad203eff0f4ebc62a15593ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 19 Aug 2025 23:32:51 +0000 Subject: [PATCH 0758/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 092529719..f1401f154 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.289.0" + ".": "0.290.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 47fc95e9a..cac1d04a9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.289.0" +version = "0.290.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3a542dbd7..0d5866dad 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.289.0" # x-release-please-version +__version__ = "0.290.0" # x-release-please-version From cb610b1030f63c8be9a5ecaa5588d2707585eda5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:16:05 +0000 Subject: [PATCH 0759/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/inbound_wire_transfer.py | 51 --------------------- 2 files changed, 2 insertions(+), 53 deletions(-) diff --git a/.stats.yml b/.stats.yml index 18686e944..ebd672bf3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dea7b54f0adc920e4d2bc337bab1133189114389cb1f124b2f9cccedcedf881c.yml -openapi_spec_hash: c1349e34f78bfe5ba28b946fe7bb15dd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e37d9eb06122e71071da98a7375420ce776ad9aa05176bed89a232bd6854f26b.yml +openapi_spec_hash: 8ffb1a0fd8523b24113105717c5d85d8 config_hash: b0b366d8c705ea0efe62093bae953e5a diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 13cc6332f..07c638079 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -38,21 +38,6 @@ class InboundWireTransfer(BaseModel): amount: int """The amount in USD cents.""" - beneficiary_address_line1: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line2: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_address_line3: Optional[str] = None - """A free-form address field set by the sender.""" - - beneficiary_name: Optional[str] = None - """A name set by the sender.""" - - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" - created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -105,48 +90,12 @@ class InboundWireTransfer(BaseModel): instruction_identification: Optional[str] = None """The sending bank's identifier for the wire transfer.""" - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" - reversal: Optional[Reversal] = None """ Information about the reversal of the inbound wire transfer if it has been reversed. """ - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire transfer.""" - status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. From c90e3070959aa2033905db52f0e3e211dd6c2fda Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:18:48 +0000 Subject: [PATCH 0760/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f1401f154..bb57c8a49 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.290.0" + ".": "0.291.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cac1d04a9..7c55e9162 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.290.0" +version = "0.291.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0d5866dad..22dae204c 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.290.0" # x-release-please-version +__version__ = "0.291.0" # x-release-please-version From f0b5efad9aafd9219f7c187d977474c72eaca611 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:38:13 +0000 Subject: [PATCH 0761/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 3 +- src/increase/resources/cards.py | 123 +++++++++++++++++- src/increase/types/__init__.py | 2 + .../card_create_details_iframe_params.py | 12 ++ src/increase/types/card_iframe_url.py | 22 ++++ tests/api_resources/test_cards.py | 98 +++++++++++++- 7 files changed, 259 insertions(+), 9 deletions(-) create mode 100644 src/increase/types/card_create_details_iframe_params.py create mode 100644 src/increase/types/card_iframe_url.py diff --git a/.stats.yml b/.stats.yml index ebd672bf3..564ef9424 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e37d9eb06122e71071da98a7375420ce776ad9aa05176bed89a232bd6854f26b.yml -openapi_spec_hash: 8ffb1a0fd8523b24113105717c5d85d8 -config_hash: b0b366d8c705ea0efe62093bae953e5a +configured_endpoints: 215 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9a5905fe541badfa11ad0641e7aea625c9fb0bc59ba33b1d43d8e88cbbdd71b2.yml +openapi_spec_hash: 4347de40c3142cd56c2185aac9a6739e +config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/api.md b/api.md index 1189be49d..25a3bb2c9 100644 --- a/api.md +++ b/api.md @@ -35,7 +35,7 @@ Methods: Types: ```python -from increase.types import Card, CardDetails +from increase.types import Card, CardDetails, CardIframeURL ``` Methods: @@ -44,6 +44,7 @@ Methods: - client.cards.retrieve(card_id) -> Card - client.cards.update(card_id, \*\*params) -> Card - client.cards.list(\*\*params) -> SyncPage[Card] +- client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL - client.cards.details(card_id) -> CardDetails # CardPayments diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 5030a9736..5f44c9a85 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,7 +6,7 @@ import httpx -from ..types import card_list_params, card_create_params, card_update_params +from ..types import card_list_params, card_create_params, card_update_params, card_create_details_iframe_params from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -21,6 +21,7 @@ from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails +from ..types.card_iframe_url import CardIframeURL __all__ = ["CardsResource", "AsyncCardsResource"] @@ -284,6 +285,57 @@ def list( model=Card, ) + def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to retrieve details for. + + physical_card_id: The identifier of the Physical Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._post( + f"/cards/{card_id}/create_details_iframe", + body=maybe_transform( + {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + def details( self, card_id: str, @@ -296,7 +348,8 @@ def details( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardDetails: """ - Retrieve sensitive details for a Card + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. Args: card_id: The identifier of the Card to retrieve details for. @@ -579,6 +632,57 @@ def list( model=Card, ) + async def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to retrieve details for. + + physical_card_id: The identifier of the Physical Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._post( + f"/cards/{card_id}/create_details_iframe", + body=await async_maybe_transform( + {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + async def details( self, card_id: str, @@ -591,7 +695,8 @@ async def details( timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, ) -> CardDetails: """ - Retrieve sensitive details for a Card + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. Args: card_id: The identifier of the Card to retrieve details for. @@ -631,6 +736,9 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_raw_response_wrapper( cards.list, ) + self.create_details_iframe = to_raw_response_wrapper( + cards.create_details_iframe, + ) self.details = to_raw_response_wrapper( cards.details, ) @@ -652,6 +760,9 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_raw_response_wrapper( cards.list, ) + self.create_details_iframe = async_to_raw_response_wrapper( + cards.create_details_iframe, + ) self.details = async_to_raw_response_wrapper( cards.details, ) @@ -673,6 +784,9 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_streamed_response_wrapper( cards.list, ) + self.create_details_iframe = to_streamed_response_wrapper( + cards.create_details_iframe, + ) self.details = to_streamed_response_wrapper( cards.details, ) @@ -694,6 +808,9 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) + self.create_details_iframe = async_to_streamed_response_wrapper( + cards.create_details_iframe, + ) self.details = async_to_streamed_response_wrapper( cards.details, ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 3e4272dc6..d84ce1265 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -26,6 +26,7 @@ from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer +from .card_iframe_url import CardIframeURL as CardIframeURL from .card_validation import CardValidation as CardValidation from .intrafi_balance import IntrafiBalance as IntrafiBalance from .account_transfer import AccountTransfer as AccountTransfer @@ -134,6 +135,7 @@ from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams +from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams diff --git a/src/increase/types/card_create_details_iframe_params.py b/src/increase/types/card_create_details_iframe_params.py new file mode 100644 index 000000000..9af571640 --- /dev/null +++ b/src/increase/types/card_create_details_iframe_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["CardCreateDetailsIframeParams"] + + +class CardCreateDetailsIframeParams(TypedDict, total=False): + physical_card_id: str + """The identifier of the Physical Card to retrieve details for.""" diff --git a/src/increase/types/card_iframe_url.py b/src/increase/types/card_iframe_url.py new file mode 100644 index 000000000..e4da2319c --- /dev/null +++ b/src/increase/types/card_iframe_url.py @@ -0,0 +1,22 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["CardIframeURL"] + + +class CardIframeURL(BaseModel): + expires_at: datetime + """The time the iframe URL will expire.""" + + iframe_url: str + """The iframe URL for the Card. Treat this as an opaque URL.""" + + type: Literal["card_iframe_url"] + """A constant representing the object's type. + + For this resource it will always be `card_iframe_url`. + """ diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index c93eab95e..9be877a70 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -9,7 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Card, CardDetails +from increase.types import ( + Card, + CardDetails, + CardIframeURL, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage @@ -211,6 +215,52 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_create_details_iframe(self, client: Increase) -> None: + card = client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None: + card = client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_raw_response_create_details_iframe(self, client: Increase) -> None: + response = client.cards.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_streaming_response_create_details_iframe(self, client: Increase) -> None: + with client.cards.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_details_iframe(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.cards.with_raw_response.create_details_iframe( + card_id="", + ) + @parametrize def test_method_details(self, client: Increase) -> None: card = client.cards.details( @@ -447,6 +497,52 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True + @parametrize + async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = await response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.cards.with_raw_response.create_details_iframe( + card_id="", + ) + @parametrize async def test_method_details(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.details( From 36da0845d557ae369611704047d36ac642eff72f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 00:41:08 +0000 Subject: [PATCH 0762/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bb57c8a49..0c3706a77 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.291.0" + ".": "0.292.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7c55e9162..0c9c7af4c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.291.0" +version = "0.292.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 22dae204c..d0a7bf6b3 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.291.0" # x-release-please-version +__version__ = "0.292.0" # x-release-please-version From bc0deb25eba8de9c5a83890da7e01f588065a99b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 01:49:00 +0000 Subject: [PATCH 0763/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 564ef9424..269d73dce 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9a5905fe541badfa11ad0641e7aea625c9fb0bc59ba33b1d43d8e88cbbdd71b2.yml -openapi_spec_hash: 4347de40c3142cd56c2185aac9a6739e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4ee4bd7629047dec495946c846442763038ad4cf85d4fd51c97df7efb047df15.yml +openapi_spec_hash: d123ec2ac3a99520926a3dd8d6a98074 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 From bc05fc4ee134a9ec14f37527ee14252a9a13721f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 02:28:54 +0000 Subject: [PATCH 0764/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 17 +++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 3 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 269d73dce..0b576c5e5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4ee4bd7629047dec495946c846442763038ad4cf85d4fd51c97df7efb047df15.yml -openapi_spec_hash: d123ec2ac3a99520926a3dd8d6a98074 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-289025fcb79a47841395734231b11fd75ad3d80dec533e0eb4533e6afaf82cdf.yml +openapi_spec_hash: 511ad2e7d8c798641f073775ccdab523 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 38db4f4b2..d922d8722 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -63,6 +63,7 @@ "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", "SourceSwiftTransferIntention", + "SourceSwiftTransferReturn", "SourceWireTransferIntention", ] @@ -2348,6 +2349,11 @@ class SourceSwiftTransferIntention(BaseModel): """The identifier of the Swift Transfer that led to this Transaction.""" +class SourceSwiftTransferReturn(BaseModel): + transfer_id: str + """The identifier of the Swift Transfer that led to this Transaction.""" + + class SourceWireTransferIntention(BaseModel): account_number: str """The destination account number.""" @@ -2500,6 +2506,7 @@ class Source(BaseModel): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", + "swift_transfer_return", "card_push_transfer_acceptance", "other", ] @@ -2571,6 +2578,8 @@ class Source(BaseModel): `wire_transfer_intention` object. - `swift_transfer_intention` - Swift Transfer Intention: details will be under the `swift_transfer_intention` object. + - `swift_transfer_return` - Swift Transfer Return: details will be under the + `swift_transfer_return` 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. @@ -2734,6 +2743,14 @@ class Source(BaseModel): equal to `swift_transfer_intention`. A Swift Transfer initiated via Increase. """ + swift_transfer_return: Optional[SourceSwiftTransferReturn] = None + """A Swift Transfer Return object. + + This field will be present in the JSON response if and only if `category` is + equal to `swift_transfer_return`. A Swift Transfer Return is created when a + Swift Transfer is returned by the receiving bank. + """ + wire_transfer_intention: Optional[SourceWireTransferIntention] = None """A Wire Transfer Intention object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 6f94d99c2..e7f4a3fa4 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -70,6 +70,7 @@ class TransactionListParams(TypedDict, total=False): "sample_funds", "wire_transfer_intention", "swift_transfer_intention", + "swift_transfer_return", "card_push_transfer_acceptance", "other", ] From 5a5aa52e5e28799fe372184a4142e79caf9e1069 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 02:31:53 +0000 Subject: [PATCH 0765/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0c3706a77..db7ac1523 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.292.0" + ".": "0.293.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0c9c7af4c..25b8df650 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.292.0" +version = "0.293.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d0a7bf6b3..bd2e4e701 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.292.0" # x-release-please-version +__version__ = "0.293.0" # x-release-please-version From b6f7df8f93b762e8840c1a0eaf950a39e4ac4ea9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:17:51 +0000 Subject: [PATCH 0766/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/exports.py | 16 +++++++++++++ src/increase/types/export.py | 3 +++ src/increase/types/export_create_params.py | 28 +++++++++++++++++++++- src/increase/types/export_list_params.py | 1 + tests/api_resources/test_exports.py | 10 +++++++- 6 files changed, 58 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0b576c5e5..5a572e980 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-289025fcb79a47841395734231b11fd75ad3d80dec533e0eb4533e6afaf82cdf.yml -openapi_spec_hash: 511ad2e7d8c798641f073775ccdab523 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-07fdb9f8710b3220dfcd37252b9d7acd4c278b9e74647a2203c3a8f120db9ad5.yml +openapi_spec_hash: 0bd908255f95090693ed26cfbbd123ed config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index c4145b4c4..e81c74caf 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -49,12 +49,14 @@ def create( *, category: Literal[ "account_statement_ofx", + "account_statement_bai2", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", ], + account_statement_bai2: export_create_params.AccountStatementBai2 | NotGiven = NOT_GIVEN, account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, @@ -77,6 +79,8 @@ def create( - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. - `transaction_csv` - Export a CSV of all transactions for a given time range. - `balance_csv` - Export a CSV of account balances for the dates in a given range. @@ -86,6 +90,9 @@ def create( - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + account_statement_bai2: Options for the created export. Required if `category` is equal to + `account_statement_bai2`. + account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. @@ -117,6 +124,7 @@ def create( body=maybe_transform( { "category": category, + "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, @@ -258,12 +266,14 @@ async def create( *, category: Literal[ "account_statement_ofx", + "account_statement_bai2", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", ], + account_statement_bai2: export_create_params.AccountStatementBai2 | NotGiven = NOT_GIVEN, account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, @@ -286,6 +296,8 @@ async def create( - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. - `transaction_csv` - Export a CSV of all transactions for a given time range. - `balance_csv` - Export a CSV of account balances for the dates in a given range. @@ -295,6 +307,9 @@ async def create( - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + account_statement_bai2: Options for the created export. Required if `category` is equal to + `account_statement_bai2`. + account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. @@ -326,6 +341,7 @@ async def create( body=await async_maybe_transform( { "category": category, + "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 5eaf69404..350be3956 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -15,6 +15,7 @@ class Export(BaseModel): category: Literal[ "account_statement_ofx", + "account_statement_bai2", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", @@ -29,6 +30,8 @@ class Export(BaseModel): - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. - `transaction_csv` - Export a CSV of all transactions for a given time range. - `balance_csv` - Export a CSV of account balances for the dates in a given range. diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 2e0d1312e..175d3a4fa 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -3,13 +3,14 @@ from __future__ import annotations from typing import List, Union -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo __all__ = [ "ExportCreateParams", + "AccountStatementBai2", "AccountStatementOfx", "AccountStatementOfxCreatedAt", "BalanceCsv", @@ -27,6 +28,7 @@ class ExportCreateParams(TypedDict, total=False): category: Required[ Literal[ "account_statement_ofx", + "account_statement_bai2", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", @@ -38,6 +40,8 @@ class ExportCreateParams(TypedDict, total=False): - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. - `transaction_csv` - Export a CSV of all transactions for a given time range. - `balance_csv` - Export a CSV of account balances for the dates in a given range. @@ -48,6 +52,12 @@ class ExportCreateParams(TypedDict, total=False): management dashboard. """ + account_statement_bai2: AccountStatementBai2 + """Options for the created export. + + Required if `category` is equal to `account_statement_bai2`. + """ + account_statement_ofx: AccountStatementOfx """Options for the created export. @@ -85,6 +95,22 @@ class ExportCreateParams(TypedDict, total=False): """ +class AccountStatementBai2(TypedDict, total=False): + account_id: str + """The Account to create a BAI2 report for. + + If not provided, all open accounts will be included. + """ + + effective_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The date to create a BAI2 report for. + + If not provided, the current date will be used. The timezone is UTC. If the + current date is used, the report will include intraday balances, otherwise it + will include end-of-day balances for the provided date. + """ + + class AccountStatementOfxCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index efedbe7d9..237a7ceaa 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -42,6 +42,7 @@ class ExportListParams(TypedDict, total=False): "in": List[ Literal[ "account_statement_ofx", + "account_statement_bai2", "transaction_csv", "balance_csv", "bookkeeping_account_balance_csv", diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 005b47caf..33b670625 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import Export -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -30,6 +30,10 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: export = client.exports.create( category="transaction_csv", + account_statement_bai2={ + "account_id": "account_id", + "effective_date": parse_date("2019-12-27"), + }, account_statement_ofx={ "account_id": "account_id", "created_at": { @@ -194,6 +198,10 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.create( category="transaction_csv", + account_statement_bai2={ + "account_id": "account_id", + "effective_date": parse_date("2019-12-27"), + }, account_statement_ofx={ "account_id": "account_id", "created_at": { From a6d3b5f15e11810864ecc770f6a420f4686e3849 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:20:46 +0000 Subject: [PATCH 0767/1325] feat(api): api update --- .stats.yml | 4 +-- .../resources/ach_prenotifications.py | 32 +++++++++---------- src/increase/types/ach_prenotification.py | 28 ++++++++++++++++ .../ach_prenotification_create_params.py | 16 +++++----- src/increase/types/card_validation.py | 3 ++ src/increase/types/check_transfer.py | 9 ++++++ .../types/intrafi_account_enrollment.py | 3 ++ 7 files changed, 69 insertions(+), 26 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a572e980..be347cd13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-07fdb9f8710b3220dfcd37252b9d7acd4c278b9e74647a2203c3a8f120db9ad5.yml -openapi_spec_hash: 0bd908255f95090693ed26cfbbd123ed +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ce8ac7ef645ad6089e9730ae2b44492a6a958a2abcc8bb50130c5ebd7ba1a390.yml +openapi_spec_hash: 90a27266ac1eeab3464f6825d8fd8650 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index f0dca38bf..393e831fe 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -80,7 +80,7 @@ def create( Create an ACH Prenotification Args: - account_id: The Increase identifier for the account that will send the transfer. + account_id: The Increase identifier for the account that will send the ACH Prenotification. account_number: The account number for the destination account. @@ -89,11 +89,11 @@ def create( addendum: Additional information that will be sent to the recipient. - company_descriptive_date: The description of the date of the transfer. + company_descriptive_date: The description of the date of the ACH Prenotification. - company_discretionary_data: The data you choose to associate with the transfer. + company_discretionary_data: The data you choose to associate with the ACH Prenotification. - company_entry_description: The description of the transfer you wish to be shown to the recipient. + company_entry_description: The description you wish to be shown to the recipient. company_name: The name by which the recipient knows you. @@ -102,13 +102,13 @@ def create( - `credit` - The Prenotification is for an anticipated credit. - `debit` - The Prenotification is for an anticipated debit. - effective_date: The transfer effective date in + effective_date: The ACH Prenotification effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - individual_id: Your identifier for the transfer recipient. + individual_id: Your identifier for the recipient. - individual_name: The name of the transfer recipient. This value is information and not verified - by the recipient's bank. + individual_name: The name of therecipient. This value is informational and not verified by the + recipient's bank. standard_entry_class_code: The Standard Entry Class (SEC) code to use for the ACH Prenotification. @@ -306,7 +306,7 @@ async def create( Create an ACH Prenotification Args: - account_id: The Increase identifier for the account that will send the transfer. + account_id: The Increase identifier for the account that will send the ACH Prenotification. account_number: The account number for the destination account. @@ -315,11 +315,11 @@ async def create( addendum: Additional information that will be sent to the recipient. - company_descriptive_date: The description of the date of the transfer. + company_descriptive_date: The description of the date of the ACH Prenotification. - company_discretionary_data: The data you choose to associate with the transfer. + company_discretionary_data: The data you choose to associate with the ACH Prenotification. - company_entry_description: The description of the transfer you wish to be shown to the recipient. + company_entry_description: The description you wish to be shown to the recipient. company_name: The name by which the recipient knows you. @@ -328,13 +328,13 @@ async def create( - `credit` - The Prenotification is for an anticipated credit. - `debit` - The Prenotification is for an anticipated debit. - effective_date: The transfer effective date in + effective_date: The ACH Prenotification effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. - individual_id: Your identifier for the transfer recipient. + individual_id: Your identifier for the recipient. - individual_name: The name of the transfer recipient. This value is information and not verified - by the recipient's bank. + individual_name: The name of therecipient. This value is informational and not verified by the + recipient's bank. standard_entry_class_code: The Standard Entry Class (SEC) code to use for the ACH Prenotification. diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py index 43ef00cf8..02fdeec9b 100644 --- a/src/increase/types/ach_prenotification.py +++ b/src/increase/types/ach_prenotification.py @@ -322,6 +322,9 @@ class ACHPrenotification(BaseModel): id: str """The ACH Prenotification's identifier.""" + account_id: Optional[str] = None + """The account that sent the ACH Prenotification.""" + account_number: str """The destination account number.""" @@ -366,6 +369,15 @@ class ACHPrenotification(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + individual_id: Optional[str] = None + """Your identifier for the recipient.""" + + individual_name: Optional[str] = None + """The name of the recipient. + + This value is informational and not verified by the recipient's bank. + """ + notifications_of_change: List[NotificationsOfChange] """ If the receiving bank notifies that future transfers should use different @@ -378,6 +390,22 @@ class ACHPrenotification(BaseModel): routing_number: str """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" + standard_entry_class_code: Optional[ + Literal[ + "corporate_credit_or_debit", + "corporate_trade_exchange", + "prearranged_payments_and_deposit", + "internet_initiated", + ] + ] = None + """The Standard Entry Class (SEC) code to use for the ACH Prenotification. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). + - `internet_initiated` - Internet Initiated (WEB). + """ + status: Literal["pending_submitting", "requires_attention", "returned", "submitted"] """The lifecycle status of the ACH Prenotification. diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py index 0ed052895..d3b02fd90 100644 --- a/src/increase/types/ach_prenotification_create_params.py +++ b/src/increase/types/ach_prenotification_create_params.py @@ -13,7 +13,7 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): account_id: Required[str] - """The Increase identifier for the account that will send the transfer.""" + """The Increase identifier for the account that will send the ACH Prenotification.""" account_number: Required[str] """The account number for the destination account.""" @@ -28,13 +28,13 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): """Additional information that will be sent to the recipient.""" company_descriptive_date: str - """The description of the date of the transfer.""" + """The description of the date of the ACH Prenotification.""" company_discretionary_data: str - """The data you choose to associate with the transfer.""" + """The data you choose to associate with the ACH Prenotification.""" company_entry_description: str - """The description of the transfer you wish to be shown to the recipient.""" + """The description you wish to be shown to the recipient.""" company_name: str """The name by which the recipient knows you.""" @@ -48,17 +48,17 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): effective_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] """ - The transfer effective date in + The ACH Prenotification effective date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format. """ individual_id: str - """Your identifier for the transfer recipient.""" + """Your identifier for the recipient.""" individual_name: str - """The name of the transfer recipient. + """The name of therecipient. - This value is information and not verified by the recipient's bank. + This value is informational and not verified by the recipient's bank. """ standard_entry_class_code: Literal[ diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 595ebdc4e..1fe048745 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -293,6 +293,9 @@ class CardValidation(BaseModel): account_id: str """The identifier of the Account from which to send the validation.""" + card_token_id: str + """The ID of the Card Token that was used to validate the card.""" + cardholder_first_name: Optional[str] = None """The cardholder's first name.""" diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index a93c151e3..8baa04e9a 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -316,6 +316,15 @@ class CheckTransfer(BaseModel): identifier of the Inbound Check Deposit object with details of the deposit. """ + balance_check: Optional[Literal["full", "none"]] = None + """How the account's available balance should be checked. + + - `full` - The available balance of the account must be at least the amount of + the check, and a Pending Transaction will be created for the full amount. + - `none` - No balance check will performed; a zero-dollar Pending Transaction + will be created. + """ + cancellation: Optional[Cancellation] = None """ If your account requires approvals for transfers and the transfer was not diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py index b04e39136..89444fc6f 100644 --- a/src/increase/types/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi_account_enrollment.py @@ -22,6 +22,9 @@ class IntrafiAccountEnrollment(BaseModel): the enrollment was created. """ + email_address: Optional[str] = None + """The contact email for the account owner, to be shared with IntraFi.""" + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. From fa8284f6da8bc632fd3083888d0796a918a3ef77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 16:24:18 +0000 Subject: [PATCH 0768/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index db7ac1523..ec9c98a35 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.293.0" + ".": "0.294.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 25b8df650..6525dcfe0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.293.0" +version = "0.294.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index bd2e4e701..ef8d17823 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.293.0" # x-release-please-version +__version__ = "0.294.0" # x-release-please-version From 331c8e781cfeadc01678aaf3750f643d5230e042 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 20:45:34 +0000 Subject: [PATCH 0769/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/real_time_payments_transfers.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index be347cd13..fd1dcd264 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ce8ac7ef645ad6089e9730ae2b44492a6a958a2abcc8bb50130c5ebd7ba1a390.yml -openapi_spec_hash: 90a27266ac1eeab3464f6825d8fd8650 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3db2c20491e1218b324938f048e489f800270f608505ac2293f66d1691294f4f.yml +openapi_spec_hash: d821b4d13c8fc8257b34a544515e91f7 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 9e77acc15..0a52effd7 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -253,7 +253,7 @@ def approve( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Approves an Real-Time Payments Transfer in a pending_approval state. + Approves a Real-Time Payments Transfer in a pending_approval state. Args: real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer to approve. @@ -297,7 +297,7 @@ def cancel( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Cancels an Real-Time Payments Transfer in a pending_approval state. + Cancels a Real-Time Payments Transfer in a pending_approval state. Args: real_time_payments_transfer_id: The identifier of the pending Real-Time Payments Transfer to cancel. @@ -560,7 +560,7 @@ async def approve( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Approves an Real-Time Payments Transfer in a pending_approval state. + Approves a Real-Time Payments Transfer in a pending_approval state. Args: real_time_payments_transfer_id: The identifier of the Real-Time Payments Transfer to approve. @@ -604,7 +604,7 @@ async def cancel( idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ - Cancels an Real-Time Payments Transfer in a pending_approval state. + Cancels a Real-Time Payments Transfer in a pending_approval state. Args: real_time_payments_transfer_id: The identifier of the pending Real-Time Payments Transfer to cancel. From d3a7dcf5a6374b89d7b5bd5960599871845a0830 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 20 Aug 2025 20:48:26 +0000 Subject: [PATCH 0770/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ec9c98a35..07070f383 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.294.0" + ".": "0.295.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6525dcfe0..32aeca342 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.294.0" +version = "0.295.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ef8d17823..2795937ce 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.294.0" # x-release-please-version +__version__ = "0.295.0" # x-release-please-version From b8ecaa7caf625125746d1c4d1298c24661e80c47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 06:43:27 +0000 Subject: [PATCH 0771/1325] feat(api): api update --- .stats.yml | 4 +- .../simulations/inbound_wire_transfers.py | 216 ++++++++---------- .../inbound_wire_transfer_create_params.py | 68 +++--- .../test_inbound_wire_transfers.py | 56 +++-- 4 files changed, 154 insertions(+), 190 deletions(-) diff --git a/.stats.yml b/.stats.yml index fd1dcd264..7e9d89ef1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3db2c20491e1218b324938f048e489f800270f608505ac2293f66d1691294f4f.yml -openapi_spec_hash: d821b4d13c8fc8257b34a544515e91f7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6af0e334922042aa3906776c1e9ddf8cd789c43597cf1c1afd1ed331c350586.yml +openapi_spec_hash: c65d4f39d2a971c60c9671444282ebe9 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 1b17c95b1..6815a6006 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -46,21 +46,19 @@ def create( *, account_number_id: str, amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | NotGiven = NOT_GIVEN, + creditor_address_line2: str | NotGiven = NOT_GIVEN, + creditor_address_line3: str | NotGiven = NOT_GIVEN, + creditor_name: str | NotGiven = NOT_GIVEN, + debtor_address_line1: str | NotGiven = NOT_GIVEN, + debtor_address_line2: str | NotGiven = NOT_GIVEN, + debtor_address_line3: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + end_to_end_identification: str | NotGiven = NOT_GIVEN, + instructing_agent_routing_number: str | NotGiven = NOT_GIVEN, + instruction_identification: str | NotGiven = NOT_GIVEN, + unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, + unstructured_remittance_information: str | NotGiven = NOT_GIVEN, wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -78,50 +76,44 @@ def create( amount: The transfer amount in cents. Must be positive. - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. + creditor_address_line1: The sending bank will set creditor_address_line1 in production. You can simulate + any value here. - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. + creditor_address_line2: The sending bank will set creditor_address_line2 in production. You can simulate + any value here. - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. + creditor_address_line3: The sending bank will set creditor_address_line3 in production. You can simulate + any value here. - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + creditor_name: The sending bank will set creditor_name in production. You can simulate any value here. - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + debtor_address_line1: The sending bank will set debtor_address_line1 in production. You can simulate any value here. - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. + debtor_address_line2: The sending bank will set debtor_address_line2 in production. You can simulate + any value here. - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + debtor_address_line3: The sending bank will set debtor_address_line3 in production. You can simulate + any value here. - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + debtor_name: The sending bank will set debtor_name in production. You can simulate any value + here. - originator_routing_number: The sending bank will set originator_routing_number in production. You can + end_to_end_identification: The sending bank will set end_to_end_identification in production. You can simulate any value here. - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + instructing_agent_routing_number: The sending bank will set instructing_agent_routing_number in production. You + can simulate any value here. - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + instruction_identification: The sending bank will set instruction_identification in production. You can + simulate any value here. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + unique_end_to_end_transaction_reference: The sending bank will set unique_end_to_end_transaction_reference in production. + You can simulate any value here. - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. + unstructured_remittance_information: The sending bank will set unstructured_remittance_information in production. You + can simulate any value here. wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is fulfilling. @@ -142,21 +134,19 @@ def create( { "account_number_id": account_number_id, "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, + "creditor_address_line1": creditor_address_line1, + "creditor_address_line2": creditor_address_line2, + "creditor_address_line3": creditor_address_line3, + "creditor_name": creditor_name, + "debtor_address_line1": debtor_address_line1, + "debtor_address_line2": debtor_address_line2, + "debtor_address_line3": debtor_address_line3, + "debtor_name": debtor_name, + "end_to_end_identification": end_to_end_identification, + "instructing_agent_routing_number": instructing_agent_routing_number, + "instruction_identification": instruction_identification, + "unique_end_to_end_transaction_reference": unique_end_to_end_transaction_reference, + "unstructured_remittance_information": unstructured_remittance_information, "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, @@ -197,21 +187,19 @@ async def create( *, account_number_id: str, amount: int, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - beneficiary_reference: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_routing_number: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, - sender_reference: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | NotGiven = NOT_GIVEN, + creditor_address_line2: str | NotGiven = NOT_GIVEN, + creditor_address_line3: str | NotGiven = NOT_GIVEN, + creditor_name: str | NotGiven = NOT_GIVEN, + debtor_address_line1: str | NotGiven = NOT_GIVEN, + debtor_address_line2: str | NotGiven = NOT_GIVEN, + debtor_address_line3: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + end_to_end_identification: str | NotGiven = NOT_GIVEN, + instructing_agent_routing_number: str | NotGiven = NOT_GIVEN, + instruction_identification: str | NotGiven = NOT_GIVEN, + unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, + unstructured_remittance_information: str | NotGiven = NOT_GIVEN, wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -229,50 +217,44 @@ async def create( amount: The transfer amount in cents. Must be positive. - beneficiary_address_line1: The sending bank will set beneficiary_address_line1 in production. You can - simulate any value here. + creditor_address_line1: The sending bank will set creditor_address_line1 in production. You can simulate + any value here. - beneficiary_address_line2: The sending bank will set beneficiary_address_line2 in production. You can - simulate any value here. + creditor_address_line2: The sending bank will set creditor_address_line2 in production. You can simulate + any value here. - beneficiary_address_line3: The sending bank will set beneficiary_address_line3 in production. You can - simulate any value here. + creditor_address_line3: The sending bank will set creditor_address_line3 in production. You can simulate + any value here. - beneficiary_name: The sending bank will set beneficiary_name in production. You can simulate any + creditor_name: The sending bank will set creditor_name in production. You can simulate any value here. - beneficiary_reference: The sending bank will set beneficiary_reference in production. You can simulate + debtor_address_line1: The sending bank will set debtor_address_line1 in production. You can simulate any value here. - originator_address_line1: The sending bank will set originator_address_line1 in production. You can - simulate any value here. - - originator_address_line2: The sending bank will set originator_address_line2 in production. You can - simulate any value here. + debtor_address_line2: The sending bank will set debtor_address_line2 in production. You can simulate + any value here. - originator_address_line3: The sending bank will set originator_address_line3 in production. You can - simulate any value here. + debtor_address_line3: The sending bank will set debtor_address_line3 in production. You can simulate + any value here. - originator_name: The sending bank will set originator_name in production. You can simulate any - value here. + debtor_name: The sending bank will set debtor_name in production. You can simulate any value + here. - originator_routing_number: The sending bank will set originator_routing_number in production. You can + end_to_end_identification: The sending bank will set end_to_end_identification in production. You can simulate any value here. - originator_to_beneficiary_information_line1: The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. - - originator_to_beneficiary_information_line2: The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + instructing_agent_routing_number: The sending bank will set instructing_agent_routing_number in production. You + can simulate any value here. - originator_to_beneficiary_information_line3: The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. + instruction_identification: The sending bank will set instruction_identification in production. You can + simulate any value here. - originator_to_beneficiary_information_line4: The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + unique_end_to_end_transaction_reference: The sending bank will set unique_end_to_end_transaction_reference in production. + You can simulate any value here. - sender_reference: The sending bank will set sender_reference in production. You can simulate any - value here. + unstructured_remittance_information: The sending bank will set unstructured_remittance_information in production. You + can simulate any value here. wire_drawdown_request_id: The identifier of a Wire Drawdown Request the inbound Wire Transfer is fulfilling. @@ -293,21 +275,19 @@ async def create( { "account_number_id": account_number_id, "amount": amount, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "beneficiary_reference": beneficiary_reference, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_routing_number": originator_routing_number, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, - "sender_reference": sender_reference, + "creditor_address_line1": creditor_address_line1, + "creditor_address_line2": creditor_address_line2, + "creditor_address_line3": creditor_address_line3, + "creditor_name": creditor_name, + "debtor_address_line1": debtor_address_line1, + "debtor_address_line2": debtor_address_line2, + "debtor_address_line3": debtor_address_line3, + "debtor_name": debtor_name, + "end_to_end_identification": end_to_end_identification, + "instructing_agent_routing_number": instructing_agent_routing_number, + "instruction_identification": instruction_identification, + "unique_end_to_end_transaction_reference": unique_end_to_end_transaction_reference, + "unstructured_remittance_information": unstructured_remittance_information, "wire_drawdown_request_id": wire_drawdown_request_id, }, inbound_wire_transfer_create_params.InboundWireTransferCreateParams, diff --git a/src/increase/types/simulations/inbound_wire_transfer_create_params.py b/src/increase/types/simulations/inbound_wire_transfer_create_params.py index 818242af7..997861e09 100644 --- a/src/increase/types/simulations/inbound_wire_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_wire_transfer_create_params.py @@ -14,92 +14,80 @@ class InboundWireTransferCreateParams(TypedDict, total=False): amount: Required[int] """The transfer amount in cents. Must be positive.""" - beneficiary_address_line1: str - """The sending bank will set beneficiary_address_line1 in production. + creditor_address_line1: str + """The sending bank will set creditor_address_line1 in production. You can simulate any value here. """ - beneficiary_address_line2: str - """The sending bank will set beneficiary_address_line2 in production. + creditor_address_line2: str + """The sending bank will set creditor_address_line2 in production. You can simulate any value here. """ - beneficiary_address_line3: str - """The sending bank will set beneficiary_address_line3 in production. + creditor_address_line3: str + """The sending bank will set creditor_address_line3 in production. You can simulate any value here. """ - beneficiary_name: str - """The sending bank will set beneficiary_name in production. + creditor_name: str + """The sending bank will set creditor_name in production. You can simulate any value here. """ - beneficiary_reference: str - """The sending bank will set beneficiary_reference in production. + debtor_address_line1: str + """The sending bank will set debtor_address_line1 in production. You can simulate any value here. """ - originator_address_line1: str - """The sending bank will set originator_address_line1 in production. + debtor_address_line2: str + """The sending bank will set debtor_address_line2 in production. You can simulate any value here. """ - originator_address_line2: str - """The sending bank will set originator_address_line2 in production. + debtor_address_line3: str + """The sending bank will set debtor_address_line3 in production. You can simulate any value here. """ - originator_address_line3: str - """The sending bank will set originator_address_line3 in production. + debtor_name: str + """The sending bank will set debtor_name in production. You can simulate any value here. """ - originator_name: str - """The sending bank will set originator_name in production. + end_to_end_identification: str + """The sending bank will set end_to_end_identification in production. You can simulate any value here. """ - originator_routing_number: str - """The sending bank will set originator_routing_number in production. + instructing_agent_routing_number: str + """The sending bank will set instructing_agent_routing_number in production. You can simulate any value here. """ - originator_to_beneficiary_information_line1: str - """ - The sending bank will set originator_to_beneficiary_information_line1 in - production. You can simulate any value here. - """ + instruction_identification: str + """The sending bank will set instruction_identification in production. - originator_to_beneficiary_information_line2: str - """ - The sending bank will set originator_to_beneficiary_information_line2 in - production. You can simulate any value here. + You can simulate any value here. """ - originator_to_beneficiary_information_line3: str - """ - The sending bank will set originator_to_beneficiary_information_line3 in - production. You can simulate any value here. - """ + unique_end_to_end_transaction_reference: str + """The sending bank will set unique_end_to_end_transaction_reference in production. - originator_to_beneficiary_information_line4: str - """ - The sending bank will set originator_to_beneficiary_information_line4 in - production. You can simulate any value here. + You can simulate any value here. """ - sender_reference: str - """The sending bank will set sender_reference in production. + unstructured_remittance_information: str + """The sending bank will set unstructured_remittance_information in production. You can simulate any value here. """ diff --git a/tests/api_resources/simulations/test_inbound_wire_transfers.py b/tests/api_resources/simulations/test_inbound_wire_transfers.py index bbf5f2169..f57c174b4 100644 --- a/tests/api_resources/simulations/test_inbound_wire_transfers.py +++ b/tests/api_resources/simulations/test_inbound_wire_transfers.py @@ -30,21 +30,19 @@ def test_method_create_with_all_params(self, client: Increase) -> None: inbound_wire_transfer = client.simulations.inbound_wire_transfers.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", - sender_reference="x", + creditor_address_line1="x", + creditor_address_line2="x", + creditor_address_line3="x", + creditor_name="x", + debtor_address_line1="x", + debtor_address_line2="x", + debtor_address_line3="x", + debtor_name="x", + end_to_end_identification="x", + instructing_agent_routing_number="x", + instruction_identification="x", + unique_end_to_end_transaction_reference="x", + unstructured_remittance_information="x", wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @@ -94,21 +92,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) inbound_wire_transfer = await async_client.simulations.inbound_wire_transfers.create( account_number_id="account_number_v18nkfqm6afpsrvy82b2", amount=1000, - beneficiary_address_line1="x", - beneficiary_address_line2="x", - beneficiary_address_line3="x", - beneficiary_name="x", - beneficiary_reference="x", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", - originator_routing_number="x", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", - sender_reference="x", + creditor_address_line1="x", + creditor_address_line2="x", + creditor_address_line3="x", + creditor_name="x", + debtor_address_line1="x", + debtor_address_line2="x", + debtor_address_line3="x", + debtor_name="x", + end_to_end_identification="x", + instructing_agent_routing_number="x", + instruction_identification="x", + unique_end_to_end_transaction_reference="x", + unstructured_remittance_information="x", wire_drawdown_request_id="wire_drawdown_request_id", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) From 9f52e1d57d116cfd6f484864b64a29df27b92f05 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 06:46:11 +0000 Subject: [PATCH 0772/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 07070f383..869c71652 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.295.0" + ".": "0.296.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 32aeca342..0a8df0c42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.295.0" +version = "0.296.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2795937ce..b7e456c49 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.295.0" # x-release-please-version +__version__ = "0.296.0" # x-release-please-version From d4d7d8c52de25bae8bb37c2426719135442c4ea5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 17:52:19 +0000 Subject: [PATCH 0773/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/transaction.py | 68 +++++++++++++++---------------- 2 files changed, 35 insertions(+), 37 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7e9d89ef1..372ce8332 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6af0e334922042aa3906776c1e9ddf8cd789c43597cf1c1afd1ed331c350586.yml -openapi_spec_hash: c65d4f39d2a971c60c9671444282ebe9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ead33c34bfbcc450c88d09e7d880fa5be57c504a66102e098ac03c5b220dea80.yml +openapi_spec_hash: 1544de50d73f80b843d5761009764ab6 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d922d8722..0b3762cf5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2166,24 +2166,36 @@ class SourceInboundWireTransfer(BaseModel): amount: int """The amount in USD cents.""" - beneficiary_address_line1: Optional[str] = None + creditor_address_line1: Optional[str] = None """A free-form address field set by the sender.""" - beneficiary_address_line2: Optional[str] = None + creditor_address_line2: Optional[str] = None """A free-form address field set by the sender.""" - beneficiary_address_line3: Optional[str] = None + creditor_address_line3: Optional[str] = None """A free-form address field set by the sender.""" - beneficiary_name: Optional[str] = None + creditor_name: Optional[str] = None """A name set by the sender.""" - beneficiary_reference: Optional[str] = None - """A free-form reference string set by the sender, to help identify the transfer.""" + debtor_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" + + debtor_name: Optional[str] = None + """A name set by the sender.""" description: str """An Increase-constructed description of the transfer.""" + end_to_end_identification: Optional[str] = None + """A free-form reference string set by the sender, to help identify the transfer.""" + input_message_accountability_data: Optional[str] = None """ A unique identifier available to the originating and receiving banks, commonly @@ -2191,42 +2203,28 @@ class SourceInboundWireTransfer(BaseModel): service and is helpful when debugging wires with the originating bank. """ - originator_address_line1: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line2: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_address_line3: Optional[str] = None - """The address of the wire originator, set by the sending bank.""" - - originator_name: Optional[str] = None - """The originator of the wire, set by the sending bank.""" - - originator_routing_number: Optional[str] = None + instructing_agent_routing_number: Optional[str] = None """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. + The American Banking Association (ABA) routing number of the bank that sent the + wire. """ - originator_to_beneficiary_information: Optional[str] = None - """An Increase-created concatenation of the Originator-to-Beneficiary lines.""" - - originator_to_beneficiary_information_line1: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line2: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line3: Optional[str] = None - """A free-form message set by the wire originator.""" - - originator_to_beneficiary_information_line4: Optional[str] = None - """A free-form message set by the wire originator.""" + instruction_identification: Optional[str] = None + """The sending bank's identifier for the wire transfer.""" transfer_id: str """The ID of the Inbound Wire Transfer object that resulted in this Transaction.""" + unique_end_to_end_transaction_reference: Optional[str] = None + """ + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. + """ + + unstructured_remittance_information: Optional[str] = None + """A free-form message set by the sender.""" + class SourceInboundWireTransferReversal(BaseModel): inbound_wire_transfer_id: str From f52c7b166c7fb7bd2a82bffb017cc49ce961c823 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 17:55:15 +0000 Subject: [PATCH 0774/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 869c71652..5739e4841 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.296.0" + ".": "0.297.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a8df0c42..a98446804 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.296.0" +version = "0.297.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b7e456c49..a76a6901d 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.296.0" # x-release-please-version +__version__ = "0.297.0" # x-release-please-version From 30879a29b4608367eb6a6ec0a0f9a5b150ec1fb4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 21 Aug 2025 19:29:56 +0000 Subject: [PATCH 0775/1325] chore: update github action --- .github/workflows/ci.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f275b5aa1..4929c13ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: run: ./scripts/lint build: - if: github.repository == 'stainless-sdks/increase-python' && (github.event_name == 'push' || github.event.pull_request.head.repo.fork) + if: github.event_name == 'push' || github.event.pull_request.head.repo.fork timeout-minutes: 10 name: build permissions: @@ -61,12 +61,14 @@ jobs: run: rye build - name: Get GitHub OIDC Token + if: github.repository == 'stainless-sdks/increase-python' id: github-oidc uses: actions/github-script@v6 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball + if: github.repository == 'stainless-sdks/increase-python' env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} From fca1dbe2513ced2d50153233df11a621bcb1175f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 15:46:03 +0000 Subject: [PATCH 0776/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/transaction.py | 74 ------------------- src/increase/types/transaction_list_params.py | 1 - 3 files changed, 2 insertions(+), 77 deletions(-) diff --git a/.stats.yml b/.stats.yml index 372ce8332..5ff82d3b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ead33c34bfbcc450c88d09e7d880fa5be57c504a66102e098ac03c5b220dea80.yml -openapi_spec_hash: 1544de50d73f80b843d5761009764ab6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b2b1b8766fa7146f21f8d4d52ff033e8650a6b25d1d161679959cca0d4153211.yml +openapi_spec_hash: 17af6a2d612ce076f58c585565f98c22 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 0b3762cf5..0af672c4a 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -54,7 +54,6 @@ "SourceInboundCheckAdjustment", "SourceInboundCheckDepositReturnIntention", "SourceInboundRealTimePaymentsTransferConfirmation", - "SourceInboundRealTimePaymentsTransferDecline", "SourceInboundWireReversal", "SourceInboundWireTransfer", "SourceInboundWireTransferReversal", @@ -2024,68 +2023,6 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" -class SourceInboundRealTimePaymentsTransferDecline(BaseModel): - amount: int - """The declined amount in the minor unit of the destination account currency. - - For dollars, for example, this is cents. - """ - - creditor_name: str - """The name the sender of the transfer specified as the recipient of the transfer.""" - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined - transfer's currency. This will always be "USD" for a Real-Time Payments - transfer. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - debtor_account_number: str - """The account number of the account that sent the transfer.""" - - debtor_name: str - """The name provided by the sender of the transfer.""" - - debtor_routing_number: str - """The routing number of the account that sent the transfer.""" - - reason: Literal[ - "account_number_canceled", - "account_number_disabled", - "account_restricted", - "group_locked", - "entity_not_active", - "real_time_payments_not_enabled", - ] - """Why the transfer was declined. - - - `account_number_canceled` - The account number is canceled. - - `account_number_disabled` - The account number is disabled. - - `account_restricted` - Your account is restricted. - - `group_locked` - Your account is inactive. - - `entity_not_active` - The account's entity is not active. - - `real_time_payments_not_enabled` - Your account is not enabled to receive - Real-Time Payments transfers. - """ - - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - - transaction_identification: str - """The Real-Time Payments network identification of the declined transfer.""" - - transfer_id: str - """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" - - class SourceInboundWireReversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" @@ -2494,7 +2431,6 @@ class Source(BaseModel): "inbound_check_deposit_return_intention", "inbound_check_adjustment", "inbound_real_time_payments_transfer_confirmation", - "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", @@ -2554,9 +2490,6 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments - Transfer Decline: details will be under the - `inbound_real_time_payments_transfer_decline` object. - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the `inbound_wire_reversal` object. - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be @@ -2662,13 +2595,6 @@ class Source(BaseModel): transfer is initiated at another bank and received by Increase. """ - inbound_real_time_payments_transfer_decline: Optional[SourceInboundRealTimePaymentsTransferDecline] = None - """An Inbound Real-Time Payments Transfer Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `inbound_real_time_payments_transfer_decline`. - """ - inbound_wire_reversal: Optional[SourceInboundWireReversal] = None """An Inbound Wire Reversal object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index e7f4a3fa4..d975132b9 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -60,7 +60,6 @@ class TransactionListParams(TypedDict, total=False): "inbound_check_deposit_return_intention", "inbound_check_adjustment", "inbound_real_time_payments_transfer_confirmation", - "inbound_real_time_payments_transfer_decline", "inbound_wire_reversal", "inbound_wire_transfer", "inbound_wire_transfer_reversal", From 8f0566b7cb29a47f36d18caccb92c7cf2f80b144 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 22 Aug 2025 16:22:58 +0000 Subject: [PATCH 0777/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account.py | 9 ++++++++- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5ff82d3b6..267b1ca2c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b2b1b8766fa7146f21f8d4d52ff033e8650a6b25d1d161679959cca0d4153211.yml -openapi_spec_hash: 17af6a2d612ce076f58c585565f98c22 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47271d8ef6b398d5273312e3c39405688f782f8ec811ddee55283f5c0bd1a355.yml +openapi_spec_hash: 304a3d8409f0cc03144052411acab7a1 config_hash: 0b0a2503208283b283fc5bc6df6a07a5 diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 5921c7098..de69efb7e 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -13,6 +13,13 @@ class Account(BaseModel): id: str """The Account identifier.""" + account_revenue_rate: Optional[str] = None + """ + The account revenue rate currently being earned on the account, as a string + containing a decimal number. For example, a 1% account revenue rate would be + represented as "0.01". + """ + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank"] """The bank the Account is with. @@ -77,7 +84,7 @@ class Account(BaseModel): interest_rate: str """ - The Interest Rate currently being earned on the account, as a string containing + The interest rate currently being earned on the account, as a string containing a decimal number. For example, a 1% interest rate would be represented as "0.01". """ From c91d5c5787c5038647c1ed8563e2cda2b9d01e54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 15:01:36 +0000 Subject: [PATCH 0778/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + .../simulations/wire_drawdown_requests.py | 100 ++++++++++++++++++ .../test_wire_drawdown_requests.py | 80 ++++++++++++++ 4 files changed, 185 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 267b1ca2c..f4bfa5a9c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 215 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47271d8ef6b398d5273312e3c39405688f782f8ec811ddee55283f5c0bd1a355.yml -openapi_spec_hash: 304a3d8409f0cc03144052411acab7a1 -config_hash: 0b0a2503208283b283fc5bc6df6a07a5 +configured_endpoints: 216 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e692ae6a744df0b2e6df643237f2338fb9afc9f55d456afde4fc392bc61ac438.yml +openapi_spec_hash: 121549528ff41d1a1f7ddb76a3c391de +config_hash: 29e452035e915a07cd64333b10a83077 diff --git a/api.md b/api.md index 25a3bb2c9..9846531e1 100644 --- a/api.md +++ b/api.md @@ -903,6 +903,7 @@ Methods: Methods: - client.simulations.wire_drawdown_requests.refuse(wire_drawdown_request_id) -> WireDrawdownRequest +- client.simulations.wire_drawdown_requests.submit(wire_drawdown_request_id) -> WireDrawdownRequest ## InboundWireDrawdownRequests diff --git a/src/increase/resources/simulations/wire_drawdown_requests.py b/src/increase/resources/simulations/wire_drawdown_requests.py index f60e766d1..1d4f89344 100644 --- a/src/increase/resources/simulations/wire_drawdown_requests.py +++ b/src/increase/resources/simulations/wire_drawdown_requests.py @@ -83,6 +83,50 @@ def refuse( cast_to=WireDrawdownRequest, ) + def submit( + self, + wire_drawdown_request_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireDrawdownRequest: + """ + Simulates a Wire Drawdown Request being submitted to Fedwire. + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_drawdown_request_id: + raise ValueError( + f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" + ) + return self._post( + f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireDrawdownRequest, + ) + class AsyncWireDrawdownRequestsResource(AsyncAPIResource): @cached_property @@ -148,6 +192,50 @@ async def refuse( cast_to=WireDrawdownRequest, ) + async def submit( + self, + wire_drawdown_request_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> WireDrawdownRequest: + """ + Simulates a Wire Drawdown Request being submitted to Fedwire. + + Args: + wire_drawdown_request_id: The identifier of the Wire Drawdown Request you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not wire_drawdown_request_id: + raise ValueError( + f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" + ) + return await self._post( + f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=WireDrawdownRequest, + ) + class WireDrawdownRequestsResourceWithRawResponse: def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None: @@ -156,6 +244,9 @@ def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None self.refuse = to_raw_response_wrapper( wire_drawdown_requests.refuse, ) + self.submit = to_raw_response_wrapper( + wire_drawdown_requests.submit, + ) class AsyncWireDrawdownRequestsResourceWithRawResponse: @@ -165,6 +256,9 @@ def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> self.refuse = async_to_raw_response_wrapper( wire_drawdown_requests.refuse, ) + self.submit = async_to_raw_response_wrapper( + wire_drawdown_requests.submit, + ) class WireDrawdownRequestsResourceWithStreamingResponse: @@ -174,6 +268,9 @@ def __init__(self, wire_drawdown_requests: WireDrawdownRequestsResource) -> None self.refuse = to_streamed_response_wrapper( wire_drawdown_requests.refuse, ) + self.submit = to_streamed_response_wrapper( + wire_drawdown_requests.submit, + ) class AsyncWireDrawdownRequestsResourceWithStreamingResponse: @@ -183,3 +280,6 @@ def __init__(self, wire_drawdown_requests: AsyncWireDrawdownRequestsResource) -> self.refuse = async_to_streamed_response_wrapper( wire_drawdown_requests.refuse, ) + self.submit = async_to_streamed_response_wrapper( + wire_drawdown_requests.submit, + ) diff --git a/tests/api_resources/simulations/test_wire_drawdown_requests.py b/tests/api_resources/simulations/test_wire_drawdown_requests.py index 938fd5a3f..2a2c3172b 100644 --- a/tests/api_resources/simulations/test_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_wire_drawdown_requests.py @@ -57,6 +57,46 @@ def test_path_params_refuse(self, client: Increase) -> None: "", ) + @parametrize + def test_method_submit(self, client: Increase) -> None: + wire_drawdown_request = client.simulations.wire_drawdown_requests.submit( + "wire_drawdown_request_id", + ) + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + def test_raw_response_submit(self, client: Increase) -> None: + response = client.simulations.wire_drawdown_requests.with_raw_response.submit( + "wire_drawdown_request_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_drawdown_request = response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + def test_streaming_response_submit(self, client: Increase) -> None: + with client.simulations.wire_drawdown_requests.with_streaming_response.submit( + "wire_drawdown_request_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_drawdown_request = response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_submit(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `wire_drawdown_request_id` but received ''" + ): + client.simulations.wire_drawdown_requests.with_raw_response.submit( + "", + ) + class TestAsyncWireDrawdownRequests: parametrize = pytest.mark.parametrize( @@ -102,3 +142,43 @@ async def test_path_params_refuse(self, async_client: AsyncIncrease) -> None: await async_client.simulations.wire_drawdown_requests.with_raw_response.refuse( "", ) + + @parametrize + async def test_method_submit(self, async_client: AsyncIncrease) -> None: + wire_drawdown_request = await async_client.simulations.wire_drawdown_requests.submit( + "wire_drawdown_request_id", + ) + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.wire_drawdown_requests.with_raw_response.submit( + "wire_drawdown_request_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + wire_drawdown_request = await response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + @parametrize + async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.wire_drawdown_requests.with_streaming_response.submit( + "wire_drawdown_request_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + wire_drawdown_request = await response.parse() + assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `wire_drawdown_request_id` but received ''" + ): + await async_client.simulations.wire_drawdown_requests.with_raw_response.submit( + "", + ) From 346cf7e1c2f62a1b7d353c6ad42fa8af787e9e09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 16:18:31 +0000 Subject: [PATCH 0779/1325] feat(api): api update --- .stats.yml | 4 +- .../inbound_wire_drawdown_requests.py | 230 +++++++++--------- .../types/inbound_wire_drawdown_request.py | 95 ++++---- ...und_wire_drawdown_request_create_params.py | 96 ++++---- .../test_inbound_wire_drawdown_requests.py | 108 ++++---- 5 files changed, 254 insertions(+), 279 deletions(-) diff --git a/.stats.yml b/.stats.yml index f4bfa5a9c..c4ea22888 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e692ae6a744df0b2e6df643237f2338fb9afc9f55d456afde4fc392bc61ac438.yml -openapi_spec_hash: 121549528ff41d1a1f7ddb76a3c391de +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-658e39148e80216f2f6064ec405b424afb64c63842e8f6c61f14100bb149d069.yml +openapi_spec_hash: 38618257a4272f341695cd522f3e6dce config_hash: 29e452035e915a07cd64333b10a83077 diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index c6e4e41a9..494eaa8e0 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -45,25 +45,24 @@ def create( self, *, amount: int, - beneficiary_account_number: str, - beneficiary_routing_number: str, + creditor_account_number: str, + creditor_routing_number: str, currency: str, - message_to_recipient: str, - originator_account_number: str, - originator_routing_number: str, recipient_account_number_id: str, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | NotGiven = NOT_GIVEN, + creditor_address_line2: str | NotGiven = NOT_GIVEN, + creditor_address_line3: str | NotGiven = NOT_GIVEN, + creditor_name: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_address_line1: str | NotGiven = NOT_GIVEN, + debtor_address_line2: str | NotGiven = NOT_GIVEN, + debtor_address_line3: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + end_to_end_identification: str | NotGiven = NOT_GIVEN, + instruction_identification: str | NotGiven = NOT_GIVEN, + unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, + unstructured_remittance_information: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -79,49 +78,50 @@ def create( Args: amount: The amount being requested in cents. - beneficiary_account_number: The drawdown request's beneficiary's account number. + creditor_account_number: The creditor's account number. - beneficiary_routing_number: The drawdown request's beneficiary's routing number. + creditor_routing_number: The creditor's routing number. currency: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being requested. Will always be "USD". - message_to_recipient: A message from the drawdown request's originator. - - originator_account_number: The drawdown request's originator's account number. - - originator_routing_number: The drawdown request's originator's routing number. - recipient_account_number_id: The Account Number to which the recipient of this request is being requested to send funds from. - beneficiary_address_line1: Line 1 of the drawdown request's beneficiary's address. + creditor_address_line1: A free-form address field set by the sender representing the first line of the + creditor's address. + + creditor_address_line2: A free-form address field set by the sender representing the second line of the + creditor's address. + + creditor_address_line3: A free-form address field set by the sender representing the third line of the + creditor's address. - beneficiary_address_line2: Line 2 of the drawdown request's beneficiary's address. + creditor_name: A free-form name field set by the sender representing the creditor's name. - beneficiary_address_line3: Line 3 of the drawdown request's beneficiary's address. + debtor_account_number: The debtor's account number. - beneficiary_name: The drawdown request's beneficiary's name. + debtor_address_line1: A free-form address field set by the sender representing the first line of the + debtor's address. - originator_address_line1: Line 1 of the drawdown request's originator's address. + debtor_address_line2: A free-form address field set by the sender representing the second line of the + debtor's address. - originator_address_line2: Line 2 of the drawdown request's originator's address. + debtor_address_line3: A free-form address field set by the sender. - originator_address_line3: Line 3 of the drawdown request's originator's address. + debtor_name: A free-form name field set by the sender representing the debtor's name. - originator_name: The drawdown request's originator's name. + debtor_routing_number: The debtor's routing number. - originator_to_beneficiary_information_line1: Line 1 of the information conveyed from the originator of the message to the - beneficiary. + end_to_end_identification: A free-form reference string set by the sender, to help identify the transfer. - originator_to_beneficiary_information_line2: Line 2 of the information conveyed from the originator of the message to the - beneficiary. + instruction_identification: The sending bank's identifier for the wire transfer. - originator_to_beneficiary_information_line3: Line 3 of the information conveyed from the originator of the message to the - beneficiary. + unique_end_to_end_transaction_reference: The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. - originator_to_beneficiary_information_line4: Line 4 of the information conveyed from the originator of the message to the - beneficiary. + unstructured_remittance_information: A free-form message set by the sender. extra_headers: Send extra headers @@ -138,25 +138,24 @@ def create( body=maybe_transform( { "amount": amount, - "beneficiary_account_number": beneficiary_account_number, - "beneficiary_routing_number": beneficiary_routing_number, + "creditor_account_number": creditor_account_number, + "creditor_routing_number": creditor_routing_number, "currency": currency, - "message_to_recipient": message_to_recipient, - "originator_account_number": originator_account_number, - "originator_routing_number": originator_routing_number, "recipient_account_number_id": recipient_account_number_id, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "creditor_address_line1": creditor_address_line1, + "creditor_address_line2": creditor_address_line2, + "creditor_address_line3": creditor_address_line3, + "creditor_name": creditor_name, + "debtor_account_number": debtor_account_number, + "debtor_address_line1": debtor_address_line1, + "debtor_address_line2": debtor_address_line2, + "debtor_address_line3": debtor_address_line3, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "end_to_end_identification": end_to_end_identification, + "instruction_identification": instruction_identification, + "unique_end_to_end_transaction_reference": unique_end_to_end_transaction_reference, + "unstructured_remittance_information": unstructured_remittance_information, }, inbound_wire_drawdown_request_create_params.InboundWireDrawdownRequestCreateParams, ), @@ -195,25 +194,24 @@ async def create( self, *, amount: int, - beneficiary_account_number: str, - beneficiary_routing_number: str, + creditor_account_number: str, + creditor_routing_number: str, currency: str, - message_to_recipient: str, - originator_account_number: str, - originator_routing_number: str, recipient_account_number_id: str, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - beneficiary_name: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line1: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line2: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line3: str | NotGiven = NOT_GIVEN, - originator_to_beneficiary_information_line4: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | NotGiven = NOT_GIVEN, + creditor_address_line2: str | NotGiven = NOT_GIVEN, + creditor_address_line3: str | NotGiven = NOT_GIVEN, + creditor_name: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | NotGiven = NOT_GIVEN, + debtor_address_line1: str | NotGiven = NOT_GIVEN, + debtor_address_line2: str | NotGiven = NOT_GIVEN, + debtor_address_line3: str | NotGiven = NOT_GIVEN, + debtor_name: str | NotGiven = NOT_GIVEN, + debtor_routing_number: str | NotGiven = NOT_GIVEN, + end_to_end_identification: str | NotGiven = NOT_GIVEN, + instruction_identification: str | NotGiven = NOT_GIVEN, + unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, + unstructured_remittance_information: str | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -229,49 +227,50 @@ async def create( Args: amount: The amount being requested in cents. - beneficiary_account_number: The drawdown request's beneficiary's account number. + creditor_account_number: The creditor's account number. - beneficiary_routing_number: The drawdown request's beneficiary's routing number. + creditor_routing_number: The creditor's routing number. currency: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the amount being requested. Will always be "USD". - message_to_recipient: A message from the drawdown request's originator. - - originator_account_number: The drawdown request's originator's account number. - - originator_routing_number: The drawdown request's originator's routing number. - recipient_account_number_id: The Account Number to which the recipient of this request is being requested to send funds from. - beneficiary_address_line1: Line 1 of the drawdown request's beneficiary's address. + creditor_address_line1: A free-form address field set by the sender representing the first line of the + creditor's address. + + creditor_address_line2: A free-form address field set by the sender representing the second line of the + creditor's address. + + creditor_address_line3: A free-form address field set by the sender representing the third line of the + creditor's address. - beneficiary_address_line2: Line 2 of the drawdown request's beneficiary's address. + creditor_name: A free-form name field set by the sender representing the creditor's name. - beneficiary_address_line3: Line 3 of the drawdown request's beneficiary's address. + debtor_account_number: The debtor's account number. - beneficiary_name: The drawdown request's beneficiary's name. + debtor_address_line1: A free-form address field set by the sender representing the first line of the + debtor's address. - originator_address_line1: Line 1 of the drawdown request's originator's address. + debtor_address_line2: A free-form address field set by the sender representing the second line of the + debtor's address. - originator_address_line2: Line 2 of the drawdown request's originator's address. + debtor_address_line3: A free-form address field set by the sender. - originator_address_line3: Line 3 of the drawdown request's originator's address. + debtor_name: A free-form name field set by the sender representing the debtor's name. - originator_name: The drawdown request's originator's name. + debtor_routing_number: The debtor's routing number. - originator_to_beneficiary_information_line1: Line 1 of the information conveyed from the originator of the message to the - beneficiary. + end_to_end_identification: A free-form reference string set by the sender, to help identify the transfer. - originator_to_beneficiary_information_line2: Line 2 of the information conveyed from the originator of the message to the - beneficiary. + instruction_identification: The sending bank's identifier for the wire transfer. - originator_to_beneficiary_information_line3: Line 3 of the information conveyed from the originator of the message to the - beneficiary. + unique_end_to_end_transaction_reference: The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. - originator_to_beneficiary_information_line4: Line 4 of the information conveyed from the originator of the message to the - beneficiary. + unstructured_remittance_information: A free-form message set by the sender. extra_headers: Send extra headers @@ -288,25 +287,24 @@ async def create( body=await async_maybe_transform( { "amount": amount, - "beneficiary_account_number": beneficiary_account_number, - "beneficiary_routing_number": beneficiary_routing_number, + "creditor_account_number": creditor_account_number, + "creditor_routing_number": creditor_routing_number, "currency": currency, - "message_to_recipient": message_to_recipient, - "originator_account_number": originator_account_number, - "originator_routing_number": originator_routing_number, "recipient_account_number_id": recipient_account_number_id, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, - "beneficiary_name": beneficiary_name, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "originator_to_beneficiary_information_line1": originator_to_beneficiary_information_line1, - "originator_to_beneficiary_information_line2": originator_to_beneficiary_information_line2, - "originator_to_beneficiary_information_line3": originator_to_beneficiary_information_line3, - "originator_to_beneficiary_information_line4": originator_to_beneficiary_information_line4, + "creditor_address_line1": creditor_address_line1, + "creditor_address_line2": creditor_address_line2, + "creditor_address_line3": creditor_address_line3, + "creditor_name": creditor_name, + "debtor_account_number": debtor_account_number, + "debtor_address_line1": debtor_address_line1, + "debtor_address_line2": debtor_address_line2, + "debtor_address_line3": debtor_address_line3, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "end_to_end_identification": end_to_end_identification, + "instruction_identification": instruction_identification, + "unique_end_to_end_transaction_reference": unique_end_to_end_transaction_reference, + "unstructured_remittance_information": unstructured_remittance_information, }, inbound_wire_drawdown_request_create_params.InboundWireDrawdownRequestCreateParams, ), diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index 16e773f3e..3810c3424 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -16,29 +16,29 @@ class InboundWireDrawdownRequest(BaseModel): amount: int """The amount being requested in cents.""" - beneficiary_account_number: str - """The drawdown request's beneficiary's account number.""" + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the inbound wire drawdown requested was created. + """ - beneficiary_address_line1: Optional[str] = None - """Line 1 of the drawdown request's beneficiary's address.""" + creditor_account_number: str + """The creditor's account number.""" - beneficiary_address_line2: Optional[str] = None - """Line 2 of the drawdown request's beneficiary's address.""" + creditor_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" - beneficiary_address_line3: Optional[str] = None - """Line 3 of the drawdown request's beneficiary's address.""" + creditor_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" - beneficiary_name: Optional[str] = None - """The drawdown request's beneficiary's name.""" + creditor_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" - beneficiary_routing_number: str - """The drawdown request's beneficiary's routing number.""" + creditor_name: Optional[str] = None + """A name set by the sender.""" - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the inbound wire drawdown requested was created. - """ + creditor_routing_number: str + """The creditor's routing number.""" currency: str """ @@ -46,50 +46,33 @@ class InboundWireDrawdownRequest(BaseModel): requested. Will always be "USD". """ - message_to_recipient: Optional[str] = None - """A message from the drawdown request's originator.""" - - originator_account_number: Optional[str] = None - """The drawdown request's originator's account number.""" + debtor_address_line1: Optional[str] = None + """A free-form address field set by the sender.""" - originator_address_line1: Optional[str] = None - """Line 1 of the drawdown request's originator's address.""" + debtor_address_line2: Optional[str] = None + """A free-form address field set by the sender.""" - originator_address_line2: Optional[str] = None - """Line 2 of the drawdown request's originator's address.""" + debtor_address_line3: Optional[str] = None + """A free-form address field set by the sender.""" - originator_address_line3: Optional[str] = None - """Line 3 of the drawdown request's originator's address.""" + debtor_name: Optional[str] = None + """A name set by the sender.""" - originator_name: Optional[str] = None - """The drawdown request's originator's name.""" - - originator_routing_number: str - """The drawdown request's originator's routing number.""" - - originator_to_beneficiary_information_line1: Optional[str] = None + end_to_end_identification: Optional[str] = None """ - Line 1 of the information conveyed from the originator of the message to the - beneficiary. + A free-form reference string set by the sender, to help identify the drawdown + request. """ - originator_to_beneficiary_information_line2: Optional[str] = None + input_message_accountability_data: Optional[str] = None """ - Line 2 of the information conveyed from the originator of the message to the - beneficiary. + A unique identifier available to the originating and receiving banks, commonly + abbreviated as IMAD. It is created when the wire is submitted to the Fedwire + service and is helpful when debugging wires with the originating bank. """ - originator_to_beneficiary_information_line3: Optional[str] = None - """ - Line 3 of the information conveyed from the originator of the message to the - beneficiary. - """ - - originator_to_beneficiary_information_line4: Optional[str] = None - """ - Line 4 of the information conveyed from the originator of the message to the - beneficiary. - """ + instruction_identification: Optional[str] = None + """The sending bank's identifier for the drawdown request.""" recipient_account_number_id: str """ @@ -102,3 +85,13 @@ class InboundWireDrawdownRequest(BaseModel): For this resource it will always be `inbound_wire_drawdown_request`. """ + + unique_end_to_end_transaction_reference: Optional[str] = None + """ + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the drawdown request. + """ + + unstructured_remittance_information: Optional[str] = None + """A free-form message set by the sender.""" diff --git a/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py b/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py index 5aac92594..224b6766f 100644 --- a/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py +++ b/src/increase/types/simulations/inbound_wire_drawdown_request_create_params.py @@ -11,11 +11,11 @@ class InboundWireDrawdownRequestCreateParams(TypedDict, total=False): amount: Required[int] """The amount being requested in cents.""" - beneficiary_account_number: Required[str] - """The drawdown request's beneficiary's account number.""" + creditor_account_number: Required[str] + """The creditor's account number.""" - beneficiary_routing_number: Required[str] - """The drawdown request's beneficiary's routing number.""" + creditor_routing_number: Required[str] + """The creditor's routing number.""" currency: Required[str] """ @@ -23,65 +23,69 @@ class InboundWireDrawdownRequestCreateParams(TypedDict, total=False): requested. Will always be "USD". """ - message_to_recipient: Required[str] - """A message from the drawdown request's originator.""" - - originator_account_number: Required[str] - """The drawdown request's originator's account number.""" - - originator_routing_number: Required[str] - """The drawdown request's originator's routing number.""" - recipient_account_number_id: Required[str] """ The Account Number to which the recipient of this request is being requested to send funds from. """ - beneficiary_address_line1: str - """Line 1 of the drawdown request's beneficiary's address.""" - - beneficiary_address_line2: str - """Line 2 of the drawdown request's beneficiary's address.""" - - beneficiary_address_line3: str - """Line 3 of the drawdown request's beneficiary's address.""" - - beneficiary_name: str - """The drawdown request's beneficiary's name.""" + creditor_address_line1: str + """ + A free-form address field set by the sender representing the first line of the + creditor's address. + """ - originator_address_line1: str - """Line 1 of the drawdown request's originator's address.""" + creditor_address_line2: str + """ + A free-form address field set by the sender representing the second line of the + creditor's address. + """ - originator_address_line2: str - """Line 2 of the drawdown request's originator's address.""" + creditor_address_line3: str + """ + A free-form address field set by the sender representing the third line of the + creditor's address. + """ - originator_address_line3: str - """Line 3 of the drawdown request's originator's address.""" + creditor_name: str + """A free-form name field set by the sender representing the creditor's name.""" - originator_name: str - """The drawdown request's originator's name.""" + debtor_account_number: str + """The debtor's account number.""" - originator_to_beneficiary_information_line1: str + debtor_address_line1: str """ - Line 1 of the information conveyed from the originator of the message to the - beneficiary. + A free-form address field set by the sender representing the first line of the + debtor's address. """ - originator_to_beneficiary_information_line2: str + debtor_address_line2: str """ - Line 2 of the information conveyed from the originator of the message to the - beneficiary. + A free-form address field set by the sender representing the second line of the + debtor's address. """ - originator_to_beneficiary_information_line3: str - """ - Line 3 of the information conveyed from the originator of the message to the - beneficiary. - """ + debtor_address_line3: str + """A free-form address field set by the sender.""" + + debtor_name: str + """A free-form name field set by the sender representing the debtor's name.""" - originator_to_beneficiary_information_line4: str + debtor_routing_number: str + """The debtor's routing number.""" + + end_to_end_identification: str + """A free-form reference string set by the sender, to help identify the transfer.""" + + instruction_identification: str + """The sending bank's identifier for the wire transfer.""" + + unique_end_to_end_transaction_reference: str """ - Line 4 of the information conveyed from the originator of the message to the - beneficiary. + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. """ + + unstructured_remittance_information: str + """A free-form message set by the sender.""" 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 181c8e96e..7a3b305ec 100644 --- a/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_inbound_wire_drawdown_requests.py @@ -21,12 +21,9 @@ class TestInboundWireDrawdownRequests: def test_method_create(self, client: Increase) -> None: inbound_wire_drawdown_request = client.simulations.inbound_wire_drawdown_requests.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @@ -35,25 +32,24 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: inbound_wire_drawdown_request = client.simulations.inbound_wire_drawdown_requests.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - beneficiary_address_line1="33 Liberty Street", - beneficiary_address_line2="New York, NY, 10045", - beneficiary_address_line3="x", - beneficiary_name="Ian Crease", - originator_address_line1="33 Liberty Street", - originator_address_line2="New York, NY, 10045", - originator_address_line3="x", - originator_name="Ian Crease", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + creditor_address_line1="33 Liberty Street", + creditor_address_line2="New York, NY, 10045", + creditor_address_line3="x", + creditor_name="Ian Crease", + debtor_account_number="987654321", + debtor_address_line1="33 Liberty Street", + debtor_address_line2="New York, NY, 10045", + debtor_address_line3="x", + debtor_name="Ian Crease", + debtor_routing_number="101050001", + end_to_end_identification="x", + instruction_identification="x", + unique_end_to_end_transaction_reference="x", + unstructured_remittance_information="x", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @@ -61,12 +57,9 @@ def test_method_create_with_all_params(self, client: Increase) -> None: def test_raw_response_create(self, client: Increase) -> None: response = client.simulations.inbound_wire_drawdown_requests.with_raw_response.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) @@ -79,12 +72,9 @@ def test_raw_response_create(self, client: Increase) -> None: def test_streaming_response_create(self, client: Increase) -> None: with client.simulations.inbound_wire_drawdown_requests.with_streaming_response.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed @@ -105,12 +95,9 @@ class TestAsyncInboundWireDrawdownRequests: async def test_method_create(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.simulations.inbound_wire_drawdown_requests.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @@ -119,25 +106,24 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.simulations.inbound_wire_drawdown_requests.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", - beneficiary_address_line1="33 Liberty Street", - beneficiary_address_line2="New York, NY, 10045", - beneficiary_address_line3="x", - beneficiary_name="Ian Crease", - originator_address_line1="33 Liberty Street", - originator_address_line2="New York, NY, 10045", - originator_address_line3="x", - originator_name="Ian Crease", - originator_to_beneficiary_information_line1="x", - originator_to_beneficiary_information_line2="x", - originator_to_beneficiary_information_line3="x", - originator_to_beneficiary_information_line4="x", + creditor_address_line1="33 Liberty Street", + creditor_address_line2="New York, NY, 10045", + creditor_address_line3="x", + creditor_name="Ian Crease", + debtor_account_number="987654321", + debtor_address_line1="33 Liberty Street", + debtor_address_line2="New York, NY, 10045", + debtor_address_line3="x", + debtor_name="Ian Crease", + debtor_routing_number="101050001", + end_to_end_identification="x", + instruction_identification="x", + unique_end_to_end_transaction_reference="x", + unstructured_remittance_information="x", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @@ -145,12 +131,9 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.inbound_wire_drawdown_requests.with_raw_response.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) @@ -163,12 +146,9 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.inbound_wire_drawdown_requests.with_streaming_response.create( amount=10000, - beneficiary_account_number="987654321", - beneficiary_routing_number="101050001", + creditor_account_number="987654321", + creditor_routing_number="101050001", currency="USD", - message_to_recipient="Invoice 29582", - originator_account_number="987654321", - originator_routing_number="101050001", recipient_account_number_id="account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed From 612ce049464b4490e529841bfdcaaa34d2e1f0a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 22:24:58 +0000 Subject: [PATCH 0780/1325] chore(internal): change ci workflow machines --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4929c13ea..e5bc9245f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -42,7 +42,7 @@ jobs: permissions: contents: read id-token: write - runs-on: depot-ubuntu-24.04 + runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - uses: actions/checkout@v4 From 69888a30a716909cbc55bd505112641aad4c00f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 25 Aug 2025 22:28:05 +0000 Subject: [PATCH 0781/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5739e4841..62a56493a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.297.0" + ".": "0.298.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a98446804..a6e4cbd48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.297.0" +version = "0.298.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a76a6901d..3d047f0f1 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.297.0" # x-release-please-version +__version__ = "0.298.0" # x-release-please-version From 1c04e5caff34381b834619b3aa408b38b2985cbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:02:43 +0000 Subject: [PATCH 0782/1325] fix: avoid newer type syntax --- src/increase/_models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index b8387ce98..92f7c10bc 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -304,7 +304,7 @@ def model_dump( exclude_none=exclude_none, ) - return cast(dict[str, Any], json_safe(dumped)) if mode == "json" else dumped + return cast("dict[str, Any]", json_safe(dumped)) if mode == "json" else dumped @override def model_dump_json( From bae30cfdfc0691385a20b1e149150397b86588a8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:05:32 +0000 Subject: [PATCH 0783/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 62a56493a..ab7b844a7 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.298.0" + ".": "0.298.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a6e4cbd48..d65cdc0c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.298.0" +version = "0.298.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3d047f0f1..d2a7691f2 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.298.0" # x-release-please-version +__version__ = "0.298.1" # x-release-please-version From faf4a00145b3531c7cfb8750772601ad26838a27 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:34:49 +0000 Subject: [PATCH 0784/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 6 +++--- src/increase/types/wire_transfer.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4ea22888..fca327de8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-658e39148e80216f2f6064ec405b424afb64c63842e8f6c61f14100bb149d069.yml -openapi_spec_hash: 38618257a4272f341695cd522f3e6dce +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f9cc7049ef70f37da85a196a822ee878a193af22d9894422fdc9100255b2a4c6.yml +openapi_spec_hash: efc2e40d9d10c87827994458d0101cd0 config_hash: 29e452035e915a07cd64333b10a83077 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 0af672c4a..a7c60e946 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2068,19 +2068,19 @@ class SourceInboundWireReversal(BaseModel): Additional information included in the wire reversal by the reversal originator. """ - previous_message_input_cycle_date: date + previous_message_input_cycle_date: Optional[date] = None """ The Fedwire cycle date for the wire transfer that is being reversed by this message. """ - previous_message_input_message_accountability_data: str + previous_message_input_message_accountability_data: Optional[str] = None """The Fedwire transaction identifier for the wire transfer that was reversed.""" previous_message_input_sequence_number: str """The Fedwire sequence number for the wire transfer that was reversed.""" - previous_message_input_source: str + previous_message_input_source: Optional[str] = None """The Fedwire input source identifier for the wire transfer that was reversed.""" receiver_financial_institution_information: Optional[str] = None diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index ab6989d18..3b0b0332a 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -128,19 +128,19 @@ class Reversal(BaseModel): Additional information included in the wire reversal by the reversal originator. """ - previous_message_input_cycle_date: date + previous_message_input_cycle_date: Optional[date] = None """ The Fedwire cycle date for the wire transfer that is being reversed by this message. """ - previous_message_input_message_accountability_data: str + previous_message_input_message_accountability_data: Optional[str] = None """The Fedwire transaction identifier for the wire transfer that was reversed.""" previous_message_input_sequence_number: str """The Fedwire sequence number for the wire transfer that was reversed.""" - previous_message_input_source: str + previous_message_input_source: Optional[str] = None """The Fedwire input source identifier for the wire transfer that was reversed.""" receiver_financial_institution_information: Optional[str] = None From 99d4f7009083f91ee4ba001158ac1698f2840686 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 16:37:39 +0000 Subject: [PATCH 0785/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ab7b844a7..32a4dbb4e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.298.1" + ".": "0.299.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d65cdc0c5..6ee9d8669 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.298.1" +version = "0.299.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d2a7691f2..76a746d9c 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.298.1" # x-release-please-version +__version__ = "0.299.0" # x-release-please-version From 45b2e082947ca66fcac0e038fc125c7161702425 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:51:44 +0000 Subject: [PATCH 0786/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ src/increase/types/transaction.py | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fca327de8..28f0f87b7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f9cc7049ef70f37da85a196a822ee878a193af22d9894422fdc9100255b2a4c6.yml -openapi_spec_hash: efc2e40d9d10c87827994458d0101cd0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-740517a6a575bb225c5bfa111ab83611c58533d5b1514f505aab22185f4a8992.yml +openapi_spec_hash: 8bfd6dcf11d076c24e4f092dc7e151ac config_hash: 29e452035e915a07cd64333b10a83077 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 7dc01f57b..72e58564f 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -2996,6 +2996,12 @@ class ElementCardSettlement(BaseModel): merchant_state: Optional[str] = None """The state the merchant resides in.""" + network: Literal["visa"] + """The card network on which this transaction was processed. + + - `visa` - Visa + """ + network_identifiers: ElementCardSettlementNetworkIdentifiers """Network-specific identifiers for this refund.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index a7c60e946..db2dbbe3d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1597,6 +1597,12 @@ class SourceCardSettlement(BaseModel): merchant_state: Optional[str] = None """The state the merchant resides in.""" + network: Literal["visa"] + """The card network on which this transaction was processed. + + - `visa` - Visa + """ + network_identifiers: SourceCardSettlementNetworkIdentifiers """Network-specific identifiers for this refund.""" From 61d69852e8a3d6de1ca66b43b6b0e9ffe6f6c464 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 19:54:34 +0000 Subject: [PATCH 0787/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 32a4dbb4e..87081a10a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.299.0" + ".": "0.300.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6ee9d8669..044be8c7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.299.0" +version = "0.300.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 76a746d9c..0ad13f7e2 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.299.0" # x-release-please-version +__version__ = "0.300.0" # x-release-please-version From b3f935ff16da15eded56cbe4abfdf1090077f920 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 21:53:32 +0000 Subject: [PATCH 0788/1325] chore(internal): update pyright exclude list --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index 044be8c7e..acc20ad46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -148,6 +148,7 @@ exclude = [ "_dev", ".venv", ".nox", + ".git", ] reportImplicitOverride = true From ea664465a998d05ddd4a6b6f351071d93d177aab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:19:23 +0000 Subject: [PATCH 0789/1325] feat(api): api update --- .stats.yml | 6 +- api.md | 10 +- .../resources/simulations/__init__.py | 26 ++--- ...funds_holds.py => pending_transactions.py} | 102 ++++++++--------- .../resources/simulations/simulations.py | 38 +++---- src/increase/types/simulations/__init__.py | 1 - .../inbound_funds_hold_release_response.py | 67 ----------- .../simulations/test_inbound_funds_holds.py | 100 ----------------- .../simulations/test_pending_transactions.py | 104 ++++++++++++++++++ 9 files changed, 193 insertions(+), 261 deletions(-) rename src/increase/resources/simulations/{inbound_funds_holds.py => pending_transactions.py} (55%) delete mode 100644 src/increase/types/simulations/inbound_funds_hold_release_response.py delete mode 100644 tests/api_resources/simulations/test_inbound_funds_holds.py create mode 100644 tests/api_resources/simulations/test_pending_transactions.py diff --git a/.stats.yml b/.stats.yml index 28f0f87b7..d35c27b7d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-740517a6a575bb225c5bfa111ab83611c58533d5b1514f505aab22185f4a8992.yml -openapi_spec_hash: 8bfd6dcf11d076c24e4f092dc7e151ac -config_hash: 29e452035e915a07cd64333b10a83077 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6c7f7c551cd8635ddf3fa27eb1040a4e3888c8190326472c19fd919a5e2c8c5.yml +openapi_spec_hash: 287cbadcab1cec9f352da22a4e39c160 +config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/api.md b/api.md index 9846531e1..b4cd2e43e 100644 --- a/api.md +++ b/api.md @@ -851,17 +851,11 @@ Methods: - client.simulations.digital_wallet_token_requests.create(\*\*params) -> DigitalWalletTokenRequestCreateResponse -## InboundFundsHolds - -Types: - -```python -from increase.types.simulations import InboundFundsHoldReleaseResponse -``` +## PendingTransactions Methods: -- client.simulations.inbound_funds_holds.release(inbound_funds_hold_id) -> InboundFundsHoldReleaseResponse +- client.simulations.pending_transactions.release_inbound_funds_hold(pending_transaction_id) -> PendingTransaction ## AccountTransfers diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index fc5a02d8c..fddc2a393 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -152,13 +152,13 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) -from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, +from .pending_transactions import ( + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( InboundACHTransfersResource, @@ -308,12 +308,12 @@ "AsyncDigitalWalletTokenRequestsResourceWithRawResponse", "DigitalWalletTokenRequestsResourceWithStreamingResponse", "AsyncDigitalWalletTokenRequestsResourceWithStreamingResponse", - "InboundFundsHoldsResource", - "AsyncInboundFundsHoldsResource", - "InboundFundsHoldsResourceWithRawResponse", - "AsyncInboundFundsHoldsResourceWithRawResponse", - "InboundFundsHoldsResourceWithStreamingResponse", - "AsyncInboundFundsHoldsResourceWithStreamingResponse", + "PendingTransactionsResource", + "AsyncPendingTransactionsResource", + "PendingTransactionsResourceWithRawResponse", + "AsyncPendingTransactionsResourceWithRawResponse", + "PendingTransactionsResourceWithStreamingResponse", + "AsyncPendingTransactionsResourceWithStreamingResponse", "AccountTransfersResource", "AsyncAccountTransfersResource", "AccountTransfersResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_funds_holds.py b/src/increase/resources/simulations/pending_transactions.py similarity index 55% rename from src/increase/resources/simulations/inbound_funds_holds.py rename to src/increase/resources/simulations/pending_transactions.py index 7a1a9be3d..8124c03d8 100644 --- a/src/increase/resources/simulations/inbound_funds_holds.py +++ b/src/increase/resources/simulations/pending_transactions.py @@ -14,34 +14,34 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations.inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse +from ...types.pending_transaction import PendingTransaction -__all__ = ["InboundFundsHoldsResource", "AsyncInboundFundsHoldsResource"] +__all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] -class InboundFundsHoldsResource(SyncAPIResource): +class PendingTransactionsResource(SyncAPIResource): @cached_property - def with_raw_response(self) -> InboundFundsHoldsResourceWithRawResponse: + def with_raw_response(self) -> PendingTransactionsResourceWithRawResponse: """ This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers """ - return InboundFundsHoldsResourceWithRawResponse(self) + return PendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> InboundFundsHoldsResourceWithStreamingResponse: + def with_streaming_response(self) -> PendingTransactionsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. For more information, see https://www.github.com/Increase/increase-python#with_streaming_response """ - return InboundFundsHoldsResourceWithStreamingResponse(self) + return PendingTransactionsResourceWithStreamingResponse(self) - def release( + def release_inbound_funds_hold( self, - inbound_funds_hold_id: str, + pending_transaction_id: str, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -50,13 +50,14 @@ def release( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundFundsHoldReleaseResponse: + ) -> PendingTransaction: """ This endpoint simulates immediately releasing an Inbound Funds Hold, which might - be created as a result of e.g., an ACH debit. + be created as a result of, for example, an ACH debit. Args: - inbound_funds_hold_id: The inbound funds hold to release. + pending_transaction_id: The pending transaction to release. The pending transaction must have a + `inbound_funds_hold` source. extra_headers: Send extra headers @@ -68,12 +69,12 @@ def release( idempotency_key: Specify a custom idempotency key for this request """ - if not inbound_funds_hold_id: + if not pending_transaction_id: raise ValueError( - f"Expected a non-empty value for `inbound_funds_hold_id` but received {inbound_funds_hold_id!r}" + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return self._post( - f"/simulations/inbound_funds_holds/{inbound_funds_hold_id}/release", + f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -81,33 +82,33 @@ def release( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundFundsHoldReleaseResponse, + cast_to=PendingTransaction, ) -class AsyncInboundFundsHoldsResource(AsyncAPIResource): +class AsyncPendingTransactionsResource(AsyncAPIResource): @cached_property - def with_raw_response(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: + def with_raw_response(self) -> AsyncPendingTransactionsResourceWithRawResponse: """ This property can be used as a prefix for any HTTP method call to return the raw response object instead of the parsed content. For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers """ - return AsyncInboundFundsHoldsResourceWithRawResponse(self) + return AsyncPendingTransactionsResourceWithRawResponse(self) @cached_property - def with_streaming_response(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: + def with_streaming_response(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: """ An alternative to `.with_raw_response` that doesn't eagerly read the response body. For more information, see https://www.github.com/Increase/increase-python#with_streaming_response """ - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self) + return AsyncPendingTransactionsResourceWithStreamingResponse(self) - async def release( + async def release_inbound_funds_hold( self, - inbound_funds_hold_id: str, + pending_transaction_id: str, *, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -116,13 +117,14 @@ async def release( extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, idempotency_key: str | None = None, - ) -> InboundFundsHoldReleaseResponse: + ) -> PendingTransaction: """ This endpoint simulates immediately releasing an Inbound Funds Hold, which might - be created as a result of e.g., an ACH debit. + be created as a result of, for example, an ACH debit. Args: - inbound_funds_hold_id: The inbound funds hold to release. + pending_transaction_id: The pending transaction to release. The pending transaction must have a + `inbound_funds_hold` source. extra_headers: Send extra headers @@ -134,12 +136,12 @@ async def release( idempotency_key: Specify a custom idempotency key for this request """ - if not inbound_funds_hold_id: + if not pending_transaction_id: raise ValueError( - f"Expected a non-empty value for `inbound_funds_hold_id` but received {inbound_funds_hold_id!r}" + f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return await self._post( - f"/simulations/inbound_funds_holds/{inbound_funds_hold_id}/release", + f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -147,41 +149,41 @@ async def release( timeout=timeout, idempotency_key=idempotency_key, ), - cast_to=InboundFundsHoldReleaseResponse, + cast_to=PendingTransaction, ) -class InboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class PendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = to_raw_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = to_raw_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class AsyncInboundFundsHoldsResourceWithRawResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class AsyncPendingTransactionsResourceWithRawResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = async_to_raw_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = async_to_raw_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class InboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: InboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class PendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: PendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = to_streamed_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = to_streamed_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) -class AsyncInboundFundsHoldsResourceWithStreamingResponse: - def __init__(self, inbound_funds_holds: AsyncInboundFundsHoldsResource) -> None: - self._inbound_funds_holds = inbound_funds_holds +class AsyncPendingTransactionsResourceWithStreamingResponse: + def __init__(self, pending_transactions: AsyncPendingTransactionsResource) -> None: + self._pending_transactions = pending_transactions - self.release = async_to_streamed_response_wrapper( - inbound_funds_holds.release, + self.release_inbound_funds_hold = async_to_streamed_response_wrapper( + pending_transactions.release_inbound_funds_hold, ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 2dd37a337..977defe5c 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -148,13 +148,13 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) -from .inbound_funds_holds import ( - InboundFundsHoldsResource, - AsyncInboundFundsHoldsResource, - InboundFundsHoldsResourceWithRawResponse, - AsyncInboundFundsHoldsResourceWithRawResponse, - InboundFundsHoldsResourceWithStreamingResponse, - AsyncInboundFundsHoldsResourceWithStreamingResponse, +from .pending_transactions import ( + PendingTransactionsResource, + AsyncPendingTransactionsResource, + PendingTransactionsResourceWithRawResponse, + AsyncPendingTransactionsResourceWithRawResponse, + PendingTransactionsResourceWithStreamingResponse, + AsyncPendingTransactionsResourceWithStreamingResponse, ) from .inbound_ach_transfers import ( InboundACHTransfersResource, @@ -286,8 +286,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: return DigitalWalletTokenRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResource: - return InboundFundsHoldsResource(self._client) + def pending_transactions(self) -> PendingTransactionsResource: + return PendingTransactionsResource(self._client) @cached_property def account_transfers(self) -> AccountTransfersResource: @@ -423,8 +423,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour return AsyncDigitalWalletTokenRequestsResource(self._client) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResource: - return AsyncInboundFundsHoldsResource(self._client) + def pending_transactions(self) -> AsyncPendingTransactionsResource: + return AsyncPendingTransactionsResource(self._client) @cached_property def account_transfers(self) -> AsyncAccountTransfersResource: @@ -563,8 +563,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit return DigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithRawResponse: - return InboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> PendingTransactionsResourceWithRawResponse: + return PendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AccountTransfersResourceWithRawResponse: @@ -688,8 +688,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour return AsyncDigitalWalletTokenRequestsResourceWithRawResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithRawResponse: - return AsyncInboundFundsHoldsResourceWithRawResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> AsyncPendingTransactionsResourceWithRawResponse: + return AsyncPendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: @@ -813,8 +813,8 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit return DigitalWalletTokenRequestsResourceWithStreamingResponse(self._simulations.digital_wallet_token_requests) @cached_property - def inbound_funds_holds(self) -> InboundFundsHoldsResourceWithStreamingResponse: - return InboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> PendingTransactionsResourceWithStreamingResponse: + return PendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: @@ -942,8 +942,8 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour ) @cached_property - def inbound_funds_holds(self) -> AsyncInboundFundsHoldsResourceWithStreamingResponse: - return AsyncInboundFundsHoldsResourceWithStreamingResponse(self._simulations.inbound_funds_holds) + def pending_transactions(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: + return AsyncPendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) @cached_property def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index f7a621737..bb4acb5a0 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -18,7 +18,6 @@ from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams -from .inbound_funds_hold_release_response import InboundFundsHoldReleaseResponse as InboundFundsHoldReleaseResponse from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams from .physical_card_advance_shipment_params import ( diff --git a/src/increase/types/simulations/inbound_funds_hold_release_response.py b/src/increase/types/simulations/inbound_funds_hold_release_response.py deleted file mode 100644 index ae8d93d3e..000000000 --- a/src/increase/types/simulations/inbound_funds_hold_release_response.py +++ /dev/null @@ -1,67 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from ..._models import BaseModel - -__all__ = ["InboundFundsHoldReleaseResponse"] - - -class InboundFundsHoldReleaseResponse(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - - amount: int - """The held amount in the minor unit of the account's currency. - - For dollars, for example, this is cents. - """ - - automatically_releases_at: datetime - """When the hold will be released automatically. - - Certain conditions may cause it to be released before this time. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the hold - was created. - """ - - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's - currency. - - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - - `USD` - US Dollar (USD) - """ - - held_transaction_id: Optional[str] = None - """The ID of the Transaction for which funds were held.""" - - pending_transaction_id: Optional[str] = None - """The ID of the Pending Transaction representing the held funds.""" - - released_at: Optional[datetime] = None - """When the hold was released (if it has been released).""" - - status: Literal["held", "complete"] - """The status of the hold. - - - `held` - Funds are still being held. - - `complete` - Funds have been released. - """ - - type: Literal["inbound_funds_hold"] - """A constant representing the object's type. - - For this resource it will always be `inbound_funds_hold`. - """ diff --git a/tests/api_resources/simulations/test_inbound_funds_holds.py b/tests/api_resources/simulations/test_inbound_funds_holds.py deleted file mode 100644 index e3dd90b01..000000000 --- a/tests/api_resources/simulations/test_inbound_funds_holds.py +++ /dev/null @@ -1,100 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types.simulations import InboundFundsHoldReleaseResponse - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestInboundFundsHolds: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_release(self, client: Increase) -> None: - inbound_funds_hold = client.simulations.inbound_funds_holds.release( - "inbound_funds_hold_id", - ) - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - def test_raw_response_release(self, client: Increase) -> None: - response = client.simulations.inbound_funds_holds.with_raw_response.release( - "inbound_funds_hold_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - def test_streaming_response_release(self, client: Increase) -> None: - with client.simulations.inbound_funds_holds.with_streaming_response.release( - "inbound_funds_hold_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_funds_hold = response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_release(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_funds_hold_id` but received ''"): - client.simulations.inbound_funds_holds.with_raw_response.release( - "", - ) - - -class TestAsyncInboundFundsHolds: - 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: - inbound_funds_hold = await async_client.simulations.inbound_funds_holds.release( - "inbound_funds_hold_id", - ) - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.inbound_funds_holds.with_raw_response.release( - "inbound_funds_hold_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - inbound_funds_hold = await response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - @parametrize - async def test_streaming_response_release(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.inbound_funds_holds.with_streaming_response.release( - "inbound_funds_hold_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - inbound_funds_hold = await response.parse() - assert_matches_type(InboundFundsHoldReleaseResponse, inbound_funds_hold, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_release(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_funds_hold_id` but received ''"): - await async_client.simulations.inbound_funds_holds.with_raw_response.release( - "", - ) diff --git a/tests/api_resources/simulations/test_pending_transactions.py b/tests/api_resources/simulations/test_pending_transactions.py new file mode 100644 index 000000000..21ea3aa43 --- /dev/null +++ b/tests/api_resources/simulations/test_pending_transactions.py @@ -0,0 +1,104 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import PendingTransaction + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestPendingTransactions: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_release_inbound_funds_hold(self, client: Increase) -> None: + pending_transaction = client.simulations.pending_transactions.release_inbound_funds_hold( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_raw_response_release_inbound_funds_hold(self, client: Increase) -> None: + response = client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + def test_streaming_response_release_inbound_funds_hold(self, client: Increase) -> None: + with client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_release_inbound_funds_hold(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "", + ) + + +class TestAsyncPendingTransactions: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + pending_transaction = await async_client.simulations.pending_transactions.release_inbound_funds_hold( + "pending_transaction_id", + ) + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_raw_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "pending_transaction_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + @parametrize + async def test_streaming_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( + "pending_transaction_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + pending_transaction = await response.parse() + assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `pending_transaction_id` but received ''" + ): + await async_client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( + "", + ) From ebb9db835142be9f45983a57233d7ddfa184997c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:22:16 +0000 Subject: [PATCH 0790/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 87081a10a..529f1380a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.300.0" + ".": "0.301.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index acc20ad46..65c348c95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.300.0" +version = "0.301.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0ad13f7e2..b5d976a92 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.300.0" # x-release-please-version +__version__ = "0.301.0" # x-release-please-version From 3c08878a00bf5e59db9885151d94f3532eb29a98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 26 Aug 2025 23:58:35 +0000 Subject: [PATCH 0791/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/ach_transfer.py | 3 --- src/increase/types/check_deposit.py | 3 --- src/increase/types/pending_transaction.py | 3 --- 4 files changed, 2 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index d35c27b7d..a52464a81 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6c7f7c551cd8635ddf3fa27eb1040a4e3888c8190326472c19fd919a5e2c8c5.yml -openapi_spec_hash: 287cbadcab1cec9f352da22a4e39c160 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f848edf1a38bbdc834fb3855aaf2eaeb77711e36e9a560cadfeb49428b4ac3de.yml +openapi_spec_hash: 52e32b8e609fa290c285bbd44f8bc74a config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index b6ed76965..a0cbd820b 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -156,9 +156,6 @@ class CreatedBy(BaseModel): class InboundFundsHold(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - amount: int """The held amount in the minor unit of the account's currency. diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 2adba3cd5..bbb0e0744 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -253,9 +253,6 @@ class DepositSubmission(BaseModel): class InboundFundsHold(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - amount: int """The held amount in the minor unit of the account's currency. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 7aa126d5d..1204107e8 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -662,9 +662,6 @@ class SourceCheckTransferInstruction(BaseModel): class SourceInboundFundsHold(BaseModel): - id: str - """The Inbound Funds Hold identifier.""" - amount: int """The held amount in the minor unit of the account's currency. From 1bb3cc00203787f01ef80b9f367004ad27b8a8bb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 00:01:27 +0000 Subject: [PATCH 0792/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 529f1380a..028c6e3fc 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.301.0" + ".": "0.302.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 65c348c95..f7f68371f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.301.0" +version = "0.302.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b5d976a92..84a84f4c7 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.301.0" # x-release-please-version +__version__ = "0.302.0" # x-release-please-version From 8bf63d6a3cd01cd2150863e2ee1a2ba7008f63d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:25:19 +0000 Subject: [PATCH 0793/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/transaction.py | 43 +++++------------------------ src/increase/types/wire_transfer.py | 43 +++++------------------------ 3 files changed, 16 insertions(+), 74 deletions(-) diff --git a/.stats.yml b/.stats.yml index a52464a81..cb84ec279 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f848edf1a38bbdc834fb3855aaf2eaeb77711e36e9a560cadfeb49428b4ac3de.yml -openapi_spec_hash: 52e32b8e609fa290c285bbd44f8bc74a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a98d22578526265c9d1ef5ee69db277ab4e3548d5f12ab740eabc7babd33ba1c.yml +openapi_spec_hash: eefa018725a526a04f4fda690fedf0ec config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index db2dbbe3d..877dd1687 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2039,14 +2039,14 @@ class SourceInboundWireReversal(BaseModel): the reversal was created. """ + debtor_routing_number: Optional[str] = None + """The debtor's routing number.""" + description: str """ The description on the reversal message from Fedwire, set by the reversing bank. """ - financial_institution_to_financial_institution_information: Optional[str] = None - """Additional financial institution information included in the wire reversal.""" - input_cycle_date: date """The Fedwire cycle date for the wire reversal. @@ -2063,40 +2063,11 @@ class SourceInboundWireReversal(BaseModel): input_source: str """The Fedwire input source identifier.""" - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """ - Additional information included in the wire reversal by the reversal originator. - """ - - previous_message_input_cycle_date: Optional[date] = None - """ - The Fedwire cycle date for the wire transfer that is being reversed by this - message. - """ - - previous_message_input_message_accountability_data: Optional[str] = None - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: Optional[str] = None - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - receiver_financial_institution_information: Optional[str] = None - """ - Information included in the wire reversal for the receiving financial - institution. - """ + instruction_identification: Optional[str] = None + """The sending bank's identifier for the reversal.""" - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" + return_reason_additional_information: Optional[str] = None + """Additional information about the reason for the reversal.""" transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 3b0b0332a..be58bd9e8 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -93,14 +93,14 @@ class Reversal(BaseModel): the reversal was created. """ + debtor_routing_number: Optional[str] = None + """The debtor's routing number.""" + description: str """ The description on the reversal message from Fedwire, set by the reversing bank. """ - financial_institution_to_financial_institution_information: Optional[str] = None - """Additional financial institution information included in the wire reversal.""" - input_cycle_date: date """The Fedwire cycle date for the wire reversal. @@ -117,40 +117,11 @@ class Reversal(BaseModel): input_source: str """The Fedwire input source identifier.""" - originator_routing_number: Optional[str] = None - """ - The American Banking Association (ABA) routing number of the bank originating - the transfer. - """ - - originator_to_beneficiary_information: Optional[str] = None - """ - Additional information included in the wire reversal by the reversal originator. - """ - - previous_message_input_cycle_date: Optional[date] = None - """ - The Fedwire cycle date for the wire transfer that is being reversed by this - message. - """ - - previous_message_input_message_accountability_data: Optional[str] = None - """The Fedwire transaction identifier for the wire transfer that was reversed.""" - - previous_message_input_sequence_number: str - """The Fedwire sequence number for the wire transfer that was reversed.""" - - previous_message_input_source: Optional[str] = None - """The Fedwire input source identifier for the wire transfer that was reversed.""" - - receiver_financial_institution_information: Optional[str] = None - """ - Information included in the wire reversal for the receiving financial - institution. - """ + instruction_identification: Optional[str] = None + """The sending bank's identifier for the reversal.""" - sender_reference: Optional[str] = None - """The sending bank's reference number for the wire reversal.""" + return_reason_additional_information: Optional[str] = None + """Additional information about the reason for the reversal.""" transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" From d26b1dc5950f70094a9faa50248cbfa2f31dedfa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 20:28:19 +0000 Subject: [PATCH 0794/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 028c6e3fc..7915eb1e2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.302.0" + ".": "0.303.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f7f68371f..2a79813bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.302.0" +version = "0.303.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 84a84f4c7..8fb795242 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.302.0" # x-release-please-version +__version__ = "0.303.0" # x-release-please-version From f4d4911146c3fee5587100e2a973a7df9b6aa93f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:10:05 +0000 Subject: [PATCH 0795/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account.py | 3 ++- src/increase/types/transaction.py | 24 +++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 4 files changed, 29 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index cb84ec279..c5bae0923 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a98d22578526265c9d1ef5ee69db277ab4e3548d5f12ab740eabc7babd33ba1c.yml -openapi_spec_hash: eefa018725a526a04f4fda690fedf0ec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1c5db818b8692ac57a83f3785c2f0a1d1ea95b9ed35fd4632619947448c22526.yml +openapi_spec_hash: 0b2954fbe726a422219f22f5cddda6d6 config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/account.py b/src/increase/types/account.py index de69efb7e..a10f4b4ee 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -17,7 +17,8 @@ class Account(BaseModel): """ The account revenue rate currently being earned on the account, as a string containing a decimal number. For example, a 1% account revenue rate would be - represented as "0.01". + represented as "0.01". Account revenue is a type of non-interest income accrued + on the account. """ bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank"] diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 877dd1687..64341588d 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -9,6 +9,7 @@ __all__ = [ "Transaction", "Source", + "SourceAccountRevenuePayment", "SourceAccountTransferIntention", "SourceACHTransferIntention", "SourceACHTransferRejection", @@ -67,6 +68,17 @@ ] +class SourceAccountRevenuePayment(BaseModel): + accrued_on_account_id: str + """The account on which the account revenue was accrued.""" + + period_end: datetime + """The end of the period for which this transaction paid account revenue.""" + + period_start: datetime + """The start of the period for which this transaction paid account revenue.""" + + class SourceAccountTransferIntention(BaseModel): amount: int """The pending amount in the minor unit of the transaction's currency. @@ -2284,6 +2296,15 @@ class SourceWireTransferIntention(BaseModel): class Source(BaseModel): + account_revenue_payment: Optional[SourceAccountRevenuePayment] = None + """An Account Revenue Payment object. + + This field will be present in the JSON response if and only if `category` is + equal to `account_revenue_payment`. A Account Revenue Payment represents a + payment made to an account from the bank. Account revenue is a type of + non-interest income. + """ + account_transfer_intention: Optional[SourceAccountTransferIntention] = None """An Account Transfer Intention object. @@ -2419,6 +2440,7 @@ class Source(BaseModel): "swift_transfer_intention", "swift_transfer_return", "card_push_transfer_acceptance", + "account_revenue_payment", "other", ] """The type of the resource. @@ -2490,6 +2512,8 @@ class Source(BaseModel): `swift_transfer_return` object. - `card_push_transfer_acceptance` - Card Push Transfer Acceptance: details will be under the `card_push_transfer_acceptance` object. + - `account_revenue_payment` - Account Revenue Payment: details will be under the + `account_revenue_payment` object. - `other` - The Transaction was made for an undocumented or deprecated reason. """ diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index d975132b9..9ad7e745f 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -71,6 +71,7 @@ class TransactionListParams(TypedDict, total=False): "swift_transfer_intention", "swift_transfer_return", "card_push_transfer_acceptance", + "account_revenue_payment", "other", ] ], From 5df8424a083fc9171e74ce980c9dd04872b0fdbb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 27 Aug 2025 22:12:54 +0000 Subject: [PATCH 0796/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7915eb1e2..b2fb223c6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.303.0" + ".": "0.304.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2a79813bb..03e2a99f9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.303.0" +version = "0.304.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8fb795242..70b741f31 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.303.0" # x-release-please-version +__version__ = "0.304.0" # x-release-please-version From 9dee7de2afc21dc2ae5ebb0e70f0b2105a5e5185 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:09:19 +0000 Subject: [PATCH 0797/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/declined_transaction.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c5bae0923..a9bb289dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1c5db818b8692ac57a83f3785c2f0a1d1ea95b9ed35fd4632619947448c22526.yml -openapi_spec_hash: 0b2954fbe726a422219f22f5cddda6d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6db60f3531381822fadaf766a9191d837e5f512c5dee67d09e4a42b4d307b9c6.yml +openapi_spec_hash: 236e86b03890539f5f36e6e458fc01c4 config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 73fa89d16..d95e08302 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -776,6 +776,7 @@ class SourceCheckDecline(BaseModel): "no_account_number_found", "refer_to_image", "unable_to_process", + "unusable_image", "user_initiated", ] """Why the check was declined. @@ -800,6 +801,7 @@ class SourceCheckDecline(BaseModel): - `refer_to_image` - The check is not readable. Please refer to the image. - `unable_to_process` - The check cannot be processed. This is rare: please contact support. + - `unusable_image` - The check image is unusable. - `user_initiated` - Your integration declined this check via the API. """ From c4cace96385e57a5bca217fd84208253dfa7b759 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:12:08 +0000 Subject: [PATCH 0798/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b2fb223c6..d0c8cad18 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.304.0" + ".": "0.305.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 03e2a99f9..6d274ad3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.304.0" +version = "0.305.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 70b741f31..ce47872a8 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.304.0" # x-release-please-version +__version__ = "0.305.0" # x-release-please-version From 3b7dfaf1910980efcf3537984ef4bf79927883f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:28:25 +0000 Subject: [PATCH 0799/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a9bb289dd..ee49d1d7a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6db60f3531381822fadaf766a9191d837e5f512c5dee67d09e4a42b4d307b9c6.yml -openapi_spec_hash: 236e86b03890539f5f36e6e458fc01c4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9248672744e41beeace115acdb3650f03f65b90ed9ff1a6aafbab4adb089e36a.yml +openapi_spec_hash: c64ff311199f2f8d045ed0f9a4307ddc config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 64341588d..fc6a226b9 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2223,6 +2223,7 @@ class SourceInternalSource(BaseModel): "negative_balance_forgiveness", "sample_funds", "sample_funds_return", + "account_revenue_payment_distribution", ] """An Internal Source is a transaction between you and Increase. @@ -2243,6 +2244,7 @@ class SourceInternalSource(BaseModel): - `negative_balance_forgiveness` - Negative balance forgiveness - `sample_funds` - Sample funds - `sample_funds_return` - Sample funds return + - `account_revenue_payment_distribution` - Account revenue payment distribution """ From 13086827219e204152ab10e98b6d4ae1aab719b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 04:31:23 +0000 Subject: [PATCH 0800/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d0c8cad18..a694817d6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.305.0" + ".": "0.306.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6d274ad3a..7989fcadc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.305.0" +version = "0.306.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ce47872a8..67f467515 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.305.0" # x-release-please-version +__version__ = "0.306.0" # x-release-please-version From ea143b17deed4e63a5809425c71aef4c051f27e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 12:58:36 +0000 Subject: [PATCH 0801/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index ee49d1d7a..3ae82a1b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9248672744e41beeace115acdb3650f03f65b90ed9ff1a6aafbab4adb089e36a.yml -openapi_spec_hash: c64ff311199f2f8d045ed0f9a4307ddc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ecfd5d7d11e1ed73e093008b8ec107f9c1d0d455f660badf74e0a12d98805ed.yml +openapi_spec_hash: ec6f6ea0766c1c56085f9032da2a9e24 config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index fc6a226b9..1cbc7e0ff 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2302,7 +2302,7 @@ class Source(BaseModel): """An Account Revenue Payment object. This field will be present in the JSON response if and only if `category` is - equal to `account_revenue_payment`. A Account Revenue Payment represents a + equal to `account_revenue_payment`. An Account Revenue Payment represents a payment made to an account from the bank. Account revenue is a type of non-interest income. """ From 32ab8a75de8061c0e49af2c4400c152aef86afd4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 13:01:28 +0000 Subject: [PATCH 0802/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a694817d6..e6a02ed0a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.306.0" + ".": "0.307.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7989fcadc..0af2b3316 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.306.0" +version = "0.307.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 67f467515..7a7eb9c72 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.306.0" # x-release-please-version +__version__ = "0.307.0" # x-release-please-version From d8f502507d56a06883ab0d84d141229b89e0ae34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 17:16:45 +0000 Subject: [PATCH 0803/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ae82a1b8..24b3407c3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ecfd5d7d11e1ed73e093008b8ec107f9c1d0d455f660badf74e0a12d98805ed.yml -openapi_spec_hash: ec6f6ea0766c1c56085f9032da2a9e24 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f53b2a737b80cf584e4c30b143f41b7afe73bce6c02e00ccd09ff36d30e3d913.yml +openapi_spec_hash: eda3be244729410eb2747752c40a1124 config_hash: 632b628b59d8f0b717153b3d8133f6cb From 7b08853fc612196b6ea96fa2bf8d15e2cb0b9dce Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 18:18:05 +0000 Subject: [PATCH 0804/1325] feat(api): api update --- .stats.yml | 4 +- api.md | 2 +- .../resources/simulations/ach_transfers.py | 44 +++++++++++++++++-- src/increase/types/simulations/__init__.py | 1 + .../simulations/ach_transfer_settle_params.py | 20 +++++++++ .../simulations/test_ach_transfers.py | 32 ++++++++++---- 6 files changed, 89 insertions(+), 14 deletions(-) create mode 100644 src/increase/types/simulations/ach_transfer_settle_params.py diff --git a/.stats.yml b/.stats.yml index 24b3407c3..160b294b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f53b2a737b80cf584e4c30b143f41b7afe73bce6c02e00ccd09ff36d30e3d913.yml -openapi_spec_hash: eda3be244729410eb2747752c40a1124 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a6d99e6e3e405acf3e592e273aa1c5d519ed4f1157d0f87f1dcf21e7710f59b5.yml +openapi_spec_hash: f1f21c7331c905f2e5549978454059dc config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/api.md b/api.md index b4cd2e43e..37602676f 100644 --- a/api.md +++ b/api.md @@ -870,7 +870,7 @@ Methods: - client.simulations.ach_transfers.acknowledge(ach_transfer_id) -> ACHTransfer - client.simulations.ach_transfers.create_notification_of_change(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach*transfers.return*(ach_transfer_id, \*\*params) -> ACHTransfer -- client.simulations.ach_transfers.settle(ach_transfer_id) -> ACHTransfer +- client.simulations.ach_transfers.settle(ach_transfer_id, \*\*params) -> ACHTransfer - client.simulations.ach_transfers.submit(ach_transfer_id) -> ACHTransfer ## InboundACHTransfers diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 30be6ba94..69ba3e5ac 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -17,7 +17,11 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import ach_transfer_return_params, ach_transfer_create_notification_of_change_params +from ...types.simulations import ( + ach_transfer_return_params, + ach_transfer_settle_params, + ach_transfer_create_notification_of_change_params, +) from ...types.ach_transfer import ACHTransfer __all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] @@ -475,6 +479,8 @@ def settle( self, ach_transfer_id: str, *, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -489,11 +495,22 @@ def settle( `submitted`. For convenience, if the transfer is in `status`: `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same - Federal Reserve timeline as in production. + Federal Reserve timeline as in production. Additionally, you can specify the + behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. Args: ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + inbound_funds_hold_behavior: The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -508,6 +525,10 @@ def settle( raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( f"/simulations/ach_transfers/{ach_transfer_id}/settle", + body=maybe_transform( + {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, + ach_transfer_settle_params.ACHTransferSettleParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -1018,6 +1039,8 @@ async def settle( self, ach_transfer_id: str, *, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -1032,11 +1055,22 @@ async def settle( `submitted`. For convenience, if the transfer is in `status`: `pending_submission`, the simulation will also submit the transfer. Without this simulation the transfer will eventually settle on its own following the same - Federal Reserve timeline as in production. + Federal Reserve timeline as in production. Additionally, you can specify the + behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. Args: ach_transfer_id: The identifier of the ACH Transfer you wish to become settled. + inbound_funds_hold_behavior: The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -1051,6 +1085,10 @@ async def settle( raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( f"/simulations/ach_transfers/{ach_transfer_id}/settle", + body=await async_maybe_transform( + {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, + ach_transfer_settle_params.ACHTransferSettleParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index bb4acb5a0..8f74919bf 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -7,6 +7,7 @@ from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams +from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams diff --git a/src/increase/types/simulations/ach_transfer_settle_params.py b/src/increase/types/simulations/ach_transfer_settle_params.py new file mode 100644 index 000000000..c885df8fa --- /dev/null +++ b/src/increase/types/simulations/ach_transfer_settle_params.py @@ -0,0 +1,20 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["ACHTransferSettleParams"] + + +class ACHTransferSettleParams(TypedDict, total=False): + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] + """ + The behavior of the inbound funds hold that is created when the ACH Transfer is + settled. If no behavior is specified, the inbound funds hold will be released + immediately in order for the funds to be available for use. + + - `release_immediately` - Release the inbound funds hold immediately. + - `release_on_default_schedule` - Release the inbound funds hold on the default + schedule. + """ diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 1e78f1f70..53f6f6d30 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -150,14 +150,22 @@ def test_path_params_return(self, client: Increase) -> None: @parametrize def test_method_settle(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + def test_method_settle_with_all_params(self, client: Increase) -> None: + ach_transfer = client.simulations.ach_transfers.settle( + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + inbound_funds_hold_behavior="release_immediately", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_settle(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -168,7 +176,7 @@ def test_raw_response_settle(self, client: Increase) -> None: @parametrize def test_streaming_response_settle(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -182,7 +190,7 @@ def test_streaming_response_settle(self, client: Increase) -> None: def test_path_params_settle(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): client.simulations.ach_transfers.with_raw_response.settle( - "", + ach_transfer_id="", ) @parametrize @@ -362,14 +370,22 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_settle(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + ) + assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) + + @parametrize + async def test_method_settle_with_all_params(self, async_client: AsyncIncrease) -> None: + ach_transfer = await async_client.simulations.ach_transfers.settle( + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", + inbound_funds_hold_behavior="release_immediately", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_settle(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -380,7 +396,7 @@ async def test_raw_response_settle(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_settle(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.settle( - "ach_transfer_id", + ach_transfer_id="ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -394,7 +410,7 @@ async def test_streaming_response_settle(self, async_client: AsyncIncrease) -> N async def test_path_params_settle(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `ach_transfer_id` but received ''"): await async_client.simulations.ach_transfers.with_raw_response.settle( - "", + ach_transfer_id="", ) @parametrize From 3365908aadae4bb9319466a27f1655cfa6c4d276 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 28 Aug 2025 18:20:58 +0000 Subject: [PATCH 0805/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e6a02ed0a..68764d436 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.307.0" + ".": "0.308.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0af2b3316..afa225597 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.307.0" +version = "0.308.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7a7eb9c72..889b58752 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.307.0" # x-release-please-version +__version__ = "0.308.0" # x-release-please-version From 0f41ab97aad4f61091ec9aabd12a0c8285cbffb4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 14:11:15 +0000 Subject: [PATCH 0806/1325] feat(api): api update --- .stats.yml | 4 +-- .../simulations/inbound_check_deposits.py | 26 +++++++++++++++++++ .../inbound_check_deposit_create_params.py | 15 ++++++++++- .../test_inbound_check_deposits.py | 20 ++++++++++++++ 4 files changed, 62 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 160b294b4..7d655a6dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a6d99e6e3e405acf3e592e273aa1c5d519ed4f1157d0f87f1dcf21e7710f59b5.yml -openapi_spec_hash: f1f21c7331c905f2e5549978454059dc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7d240ad280fc9ed22a8bbe219835ed737b075963291d84b75efbbb38195eff8b.yml +openapi_spec_hash: f2a2cad4f01bf5ab66e1f3dcb719315a config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 8b8a642d5..f68b011e3 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven @@ -47,6 +49,7 @@ def create( account_number_id: str, amount: int, check_number: str, + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -71,6 +74,16 @@ def create( check_number: The check number on the check to be deposited. + payee_name_analysis: Simulate the outcome of + [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches). + Defaults to `not_evaluated`. + + - `name_matches` - The details on the check match the recipient name of the + check transfer. + - `does_not_match` - The details on the check do not match the recipient name of + the check transfer. + - `not_evaluated` - The payee name analysis was not evaluated. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -88,6 +101,7 @@ def create( "account_number_id": account_number_id, "amount": amount, "check_number": check_number, + "payee_name_analysis": payee_name_analysis, }, inbound_check_deposit_create_params.InboundCheckDepositCreateParams, ), @@ -128,6 +142,7 @@ async def create( account_number_id: str, amount: int, check_number: str, + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -152,6 +167,16 @@ async def create( check_number: The check number on the check to be deposited. + payee_name_analysis: Simulate the outcome of + [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches). + Defaults to `not_evaluated`. + + - `name_matches` - The details on the check match the recipient name of the + check transfer. + - `does_not_match` - The details on the check do not match the recipient name of + the check transfer. + - `not_evaluated` - The payee name analysis was not evaluated. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -169,6 +194,7 @@ async def create( "account_number_id": account_number_id, "amount": amount, "check_number": check_number, + "payee_name_analysis": payee_name_analysis, }, inbound_check_deposit_create_params.InboundCheckDepositCreateParams, ), diff --git a/src/increase/types/simulations/inbound_check_deposit_create_params.py b/src/increase/types/simulations/inbound_check_deposit_create_params.py index 8d7e7b0aa..16c4a4e8d 100644 --- a/src/increase/types/simulations/inbound_check_deposit_create_params.py +++ b/src/increase/types/simulations/inbound_check_deposit_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["InboundCheckDepositCreateParams"] @@ -16,3 +16,16 @@ class InboundCheckDepositCreateParams(TypedDict, total=False): check_number: Required[str] """The check number on the check to be deposited.""" + + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] + """ + Simulate the outcome of + [payee name checking](https://increase.com/documentation/positive-pay#payee-name-mismatches). + Defaults to `not_evaluated`. + + - `name_matches` - The details on the check match the recipient name of the + check transfer. + - `does_not_match` - The details on the check do not match the recipient name of + the check transfer. + - `not_evaluated` - The payee name analysis was not evaluated. + """ diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index f51919de7..eef5ded60 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -26,6 +26,16 @@ def test_method_create(self, client: Increase) -> None: ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_check_deposit = client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + payee_name_analysis="name_matches", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.simulations.inbound_check_deposits.with_raw_response.create( @@ -69,6 +79,16 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.simulations.inbound_check_deposits.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + check_number="1234567890", + payee_name_analysis="name_matches", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.inbound_check_deposits.with_raw_response.create( From 00c8713486fde492c6ed45ae1168b4d8f407369d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 14:14:13 +0000 Subject: [PATCH 0807/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 68764d436..2ba52d0aa 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.308.0" + ".": "0.309.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index afa225597..022bc15f1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.308.0" +version = "0.309.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 889b58752..e5e6d8737 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.308.0" # x-release-please-version +__version__ = "0.309.0" # x-release-please-version From fff8311f90c977f84c716e15e1644e664a54ed20 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:13:17 +0000 Subject: [PATCH 0808/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 10 ++++++++++ src/increase/types/wire_transfer.py | 10 ++++++++++ 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d655a6dd..76d80ce71 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7d240ad280fc9ed22a8bbe219835ed737b075963291d84b75efbbb38195eff8b.yml -openapi_spec_hash: f2a2cad4f01bf5ab66e1f3dcb719315a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a3db5141ad8a06aca3ec4fbc0a4414af61ffea1bbd6470b4a9ad13f8b24ed9eb.yml +openapi_spec_hash: 1192108447914f9233f6e0933dd36033 config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 1cbc7e0ff..3439507df 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2081,6 +2081,16 @@ class SourceInboundWireReversal(BaseModel): return_reason_additional_information: Optional[str] = None """Additional information about the reason for the reversal.""" + return_reason_code: Optional[str] = None + """A code provided by the sending bank giving a reason for the reversal. + + It will generally be one of the codes defined in the ISO20022 + `ExternalReturnReason1Code` code set, but this is not enforced by the network. + """ + + return_reason_code_description: Optional[str] = None + """An Increase-generated description of the `return_reason_code`.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index be58bd9e8..8b3de1ebf 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -123,6 +123,16 @@ class Reversal(BaseModel): return_reason_additional_information: Optional[str] = None """Additional information about the reason for the reversal.""" + return_reason_code: Optional[str] = None + """A code provided by the sending bank giving a reason for the reversal. + + It will generally be one of the codes defined in the ISO20022 + `ExternalReturnReason1Code` code set, but this is not enforced by the network. + """ + + return_reason_code_description: Optional[str] = None + """An Increase-generated description of the `return_reason_code`.""" + transaction_id: str """The ID for the Transaction associated with the transfer reversal.""" From bec4ecd9658628f075b1cd6d4ae19dabf2dd894f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 17:16:17 +0000 Subject: [PATCH 0809/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ba52d0aa..bfd395f2e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.309.0" + ".": "0.310.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 022bc15f1..7a02658b1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.309.0" +version = "0.310.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e5e6d8737..5eb1d6f3a 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.309.0" # x-release-please-version +__version__ = "0.310.0" # x-release-please-version From 5f08779afec4c8dab6a4a0e798cb78365ac2cdb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 19:15:19 +0000 Subject: [PATCH 0810/1325] chore(internal): add Sequence related utils --- src/increase/_types.py | 36 ++++++++++++++++++++++++++++++++- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_typing.py | 5 +++++ tests/utils.py | 10 ++++++++- 4 files changed, 50 insertions(+), 2 deletions(-) diff --git a/src/increase/_types.py b/src/increase/_types.py index 1f224398d..5c54a7e80 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -13,10 +13,21 @@ Mapping, TypeVar, Callable, + Iterator, Optional, Sequence, ) -from typing_extensions import Set, Literal, Protocol, TypeAlias, TypedDict, override, runtime_checkable +from typing_extensions import ( + Set, + Literal, + Protocol, + TypeAlias, + TypedDict, + SupportsIndex, + overload, + override, + runtime_checkable, +) import httpx import pydantic @@ -217,3 +228,26 @@ class _GenericAlias(Protocol): class HttpxSendArgs(TypedDict, total=False): auth: httpx.Auth follow_redirects: bool + + +_T_co = TypeVar("_T_co", covariant=True) + + +if TYPE_CHECKING: + # This works because str.__contains__ does not accept object (either in typeshed or at runtime) + # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + class SequenceNotStr(Protocol[_T_co]): + @overload + def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... + @overload + def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... + def __contains__(self, value: object, /) -> bool: ... + def __len__(self) -> int: ... + def __iter__(self) -> Iterator[_T_co]: ... + def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... + def count(self, value: Any, /) -> int: ... + def __reversed__(self) -> Iterator[_T_co]: ... +else: + # just point this to a normal `Sequence` at runtime to avoid having to special case + # deserializing our custom sequence type + SequenceNotStr = Sequence diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index d4fda26f3..ca547ce52 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -38,6 +38,7 @@ extract_type_arg as extract_type_arg, is_iterable_type as is_iterable_type, is_required_type as is_required_type, + is_sequence_type as is_sequence_type, is_annotated_type as is_annotated_type, is_type_alias_type as is_type_alias_type, strip_annotated_type as strip_annotated_type, diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py index 1bac9542e..845cd6b28 100644 --- a/src/increase/_utils/_typing.py +++ b/src/increase/_utils/_typing.py @@ -26,6 +26,11 @@ def is_list_type(typ: type) -> bool: return (get_origin(typ) or typ) == list +def is_sequence_type(typ: type) -> bool: + origin = get_origin(typ) or typ + return origin == typing_extensions.Sequence or origin == typing.Sequence or origin == _c_abc.Sequence + + def is_iterable_type(typ: type) -> bool: """If the given type is `typing.Iterable[T]`""" origin = get_origin(typ) or typ diff --git a/tests/utils.py b/tests/utils.py index 553f11c59..ed9af8295 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -4,7 +4,7 @@ import inspect import traceback import contextlib -from typing import Any, TypeVar, Iterator, cast +from typing import Any, TypeVar, Iterator, Sequence, cast from datetime import date, datetime from typing_extensions import Literal, get_args, get_origin, assert_type @@ -15,6 +15,7 @@ is_list_type, is_union_type, extract_type_arg, + is_sequence_type, is_annotated_type, is_type_alias_type, ) @@ -71,6 +72,13 @@ def assert_matches_type( if is_list_type(type_): return _assert_list_type(type_, value) + if is_sequence_type(type_): + assert isinstance(value, Sequence) + inner_type = get_args(type_)[0] + for entry in value: # type: ignore + assert_type(inner_type, entry) # type: ignore + return + if origin == str: assert isinstance(value, str) elif origin == int: From 3512ce21d5b1a8dc74e7170bfe1b0520529fe96d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 21:28:03 +0000 Subject: [PATCH 0811/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/documents.py | 12 ++++++++---- src/increase/resources/entities.py | 4 ++-- src/increase/types/ach_transfer_create_params.py | 8 ++++++-- src/increase/types/document_create_params.py | 10 ++++++++-- src/increase/types/entity_create_params.py | 5 +++-- 6 files changed, 29 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 76d80ce71..a123afd0f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a3db5141ad8a06aca3ec4fbc0a4414af61ffea1bbd6470b4a9ad13f8b24ed9eb.yml -openapi_spec_hash: 1192108447914f9233f6e0933dd36033 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4951789bd74367647a7109ac527206883115628aac13b8131b0bc046ead9cc5c.yml +openapi_spec_hash: 924a557a551c40624e4fe4703dec71cc config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 244ca7b12..772adfe32 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -67,9 +67,11 @@ def create( - `account_verification_letter` - An account verification letter. - `funding_instructions` - Funding instructions. - account_verification_letter: An account verification letter. + account_verification_letter: An account verification letter. Required if and only if `category` is + `account_verification_letter`. - funding_instructions: Funding instructions. + funding_instructions: Funding instructions. Required if and only if `category` is + `funding_instructions`. extra_headers: Send extra headers @@ -243,9 +245,11 @@ async def create( - `account_verification_letter` - An account verification letter. - `funding_instructions` - Funding instructions. - account_verification_letter: An account verification letter. + account_verification_letter: An account verification letter. Required if and only if `category` is + `account_verification_letter`. - funding_instructions: Funding instructions. + funding_instructions: Funding instructions. Required if and only if `category` is + `funding_instructions`. extra_headers: Send extra headers diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 2ba90c0c7..8f7a39fd5 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -93,7 +93,7 @@ def create( description: The description you choose to give the entity. government_authority: Details of the Government Authority entity to create. Required if `structure` is - equal to `Government Authority`. + equal to `government_authority`. joint: Details of the joint entity to create. Required if `structure` is equal to `joint`. @@ -651,7 +651,7 @@ async def create( description: The description you choose to give the entity. government_authority: Details of the Government Authority entity to create. Required if `structure` is - equal to `Government Authority`. + equal to `government_authority`. joint: Details of the joint entity to create. Required if `structure` is equal to `joint`. diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index aabf372cd..d4b0566cd 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -193,13 +193,17 @@ class Addenda(TypedDict, total=False): """ freeform: AddendaFreeform - """Unstructured `payment_related_information` passed through with the transfer.""" + """Unstructured `payment_related_information` passed through with the transfer. + + Required if and only if `category` is `freeform`. + """ payment_order_remittance_advice: AddendaPaymentOrderRemittanceAdvice """Structured ASC X12 820 remittance advice records. Please reach out to [support@increase.com](mailto:support@increase.com) for more - information. + information. Required if and only if `category` is + `payment_order_remittance_advice`. """ diff --git a/src/increase/types/document_create_params.py b/src/increase/types/document_create_params.py index 1f4d9245e..986255c7a 100644 --- a/src/increase/types/document_create_params.py +++ b/src/increase/types/document_create_params.py @@ -20,10 +20,16 @@ class DocumentCreateParams(TypedDict, total=False): """ account_verification_letter: AccountVerificationLetter - """An account verification letter.""" + """An account verification letter. + + Required if and only if `category` is `account_verification_letter`. + """ funding_instructions: FundingInstructions - """Funding instructions.""" + """Funding instructions. + + Required if and only if `category` is `funding_instructions`. + """ class AccountVerificationLetter(TypedDict, total=False): diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 65cff4053..7b43b7df9 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -78,7 +78,7 @@ class EntityCreateParams(TypedDict, total=False): government_authority: GovernmentAuthority """Details of the Government Authority entity to create. - Required if `structure` is equal to `Government Authority`. + Required if `structure` is equal to `government_authority`. """ joint: Joint @@ -872,7 +872,8 @@ class TrustTrustee(TypedDict, total=False): individual: TrustTrusteeIndividual """Details of the individual trustee. - Required when the trustee `structure` is equal to `individual`. + Within the trustee object, this is required if `structure` is equal to + `individual`. """ From aadafb6474d47bc56e5813e219fa5f5e1a3f77e9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 29 Aug 2025 21:30:50 +0000 Subject: [PATCH 0812/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bfd395f2e..269cfb5d4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.310.0" + ".": "0.311.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7a02658b1..34a0dc541 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.310.0" +version = "0.311.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5eb1d6f3a..7811b46b3 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.310.0" # x-release-please-version +__version__ = "0.311.0" # x-release-please-version From f1ef2d615325b19d77349a3d1056b48d75c5f0af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Sep 2025 15:13:48 +0000 Subject: [PATCH 0813/1325] feat(types): replace List[str] with SequenceNotStr in params --- src/increase/_utils/_transform.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index b0cc20a73..f0bcefd49 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -16,6 +16,7 @@ lru_cache, is_mapping, is_iterable, + is_sequence, ) from .._files import is_base64_file_input from ._typing import ( @@ -24,6 +25,7 @@ extract_type_arg, is_iterable_type, is_required_type, + is_sequence_type, is_annotated_type, strip_annotated_type, ) @@ -184,6 +186,8 @@ def _transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. @@ -346,6 +350,8 @@ async def _async_transform_recursive( (is_list_type(stripped_type) and is_list(data)) # Iterable[T] or (is_iterable_type(stripped_type) and is_iterable(data) and not isinstance(data, str)) + # Sequence[T] + or (is_sequence_type(stripped_type) and is_sequence(data) and not isinstance(data, str)) ): # dicts are technically iterable, but it is an iterable on the keys of the dict and is not usually # intended as an iterable, so we don't transform it. From 9993e5412d601155d14ee3592e26265cc2c8b12e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Sep 2025 22:06:07 +0000 Subject: [PATCH 0814/1325] feat: improve future compat with pydantic v3 --- src/increase/_base_client.py | 6 +- src/increase/_compat.py | 96 ++++++++--------- src/increase/_models.py | 80 +++++++------- src/increase/_utils/__init__.py | 10 +- src/increase/_utils/_compat.py | 45 ++++++++ src/increase/_utils/_datetime_parse.py | 136 ++++++++++++++++++++++++ src/increase/_utils/_transform.py | 6 +- src/increase/_utils/_typing.py | 2 +- src/increase/_utils/_utils.py | 1 - tests/test_models.py | 48 ++++----- tests/test_transform.py | 16 +-- tests/test_utils/test_datetime_parse.py | 110 +++++++++++++++++++ tests/utils.py | 8 +- 13 files changed, 432 insertions(+), 132 deletions(-) create mode 100644 src/increase/_utils/_compat.py create mode 100644 src/increase/_utils/_datetime_parse.py create mode 100644 tests/test_utils/test_datetime_parse.py diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 8f32ec421..24ccf6744 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -59,7 +59,7 @@ ModelBuilderProtocol, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping -from ._compat import PYDANTIC_V2, model_copy, model_dump +from ._compat import PYDANTIC_V1, model_copy, model_dump from ._models import GenericModel, FinalRequestOptions, validate_type, construct_type from ._response import ( APIResponse, @@ -232,7 +232,7 @@ def _set_private_attributes( model: Type[_T], options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model @@ -320,7 +320,7 @@ def _set_private_attributes( client: AsyncAPIClient, options: FinalRequestOptions, ) -> None: - if PYDANTIC_V2 and getattr(self, "__pydantic_private__", None) is None: + if (not PYDANTIC_V1) and getattr(self, "__pydantic_private__", None) is None: self.__pydantic_private__ = {} self._model = model diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 92d9ee61e..bdef67f04 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -12,14 +12,13 @@ _T = TypeVar("_T") _ModelT = TypeVar("_ModelT", bound=pydantic.BaseModel) -# --------------- Pydantic v2 compatibility --------------- +# --------------- Pydantic v2, v3 compatibility --------------- # Pyright incorrectly reports some of our functions as overriding a method when they don't # pyright: reportIncompatibleMethodOverride=false -PYDANTIC_V2 = pydantic.VERSION.startswith("2.") +PYDANTIC_V1 = pydantic.VERSION.startswith("1.") -# v1 re-exports if TYPE_CHECKING: def parse_date(value: date | StrBytesIntFloat) -> date: # noqa: ARG001 @@ -44,90 +43,92 @@ def is_typeddict(type_: type[Any]) -> bool: # noqa: ARG001 ... else: - if PYDANTIC_V2: - from pydantic.v1.typing import ( + # v1 re-exports + if PYDANTIC_V1: + from pydantic.typing import ( get_args as get_args, is_union as is_union, get_origin as get_origin, is_typeddict as is_typeddict, is_literal_type as is_literal_type, ) - from pydantic.v1.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime + from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime else: - from pydantic.typing import ( + from ._utils import ( get_args as get_args, is_union as is_union, get_origin as get_origin, + parse_date as parse_date, is_typeddict as is_typeddict, + parse_datetime as parse_datetime, is_literal_type as is_literal_type, ) - from pydantic.datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime # refactored config if TYPE_CHECKING: from pydantic import ConfigDict as ConfigDict else: - if PYDANTIC_V2: - from pydantic import ConfigDict - else: + if PYDANTIC_V1: # TODO: provide an error message here? ConfigDict = None + else: + from pydantic import ConfigDict as ConfigDict # renamed methods / properties def parse_obj(model: type[_ModelT], value: object) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(value) - else: + if PYDANTIC_V1: return cast(_ModelT, model.parse_obj(value)) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + else: + return model.model_validate(value) def field_is_required(field: FieldInfo) -> bool: - if PYDANTIC_V2: - return field.is_required() - return field.required # type: ignore + if PYDANTIC_V1: + return field.required # type: ignore + return field.is_required() def field_get_default(field: FieldInfo) -> Any: value = field.get_default() - if PYDANTIC_V2: - from pydantic_core import PydanticUndefined - - if value == PydanticUndefined: - return None + if PYDANTIC_V1: return value + from pydantic_core import PydanticUndefined + + if value == PydanticUndefined: + return None return value def field_outer_type(field: FieldInfo) -> Any: - if PYDANTIC_V2: - return field.annotation - return field.outer_type_ # type: ignore + if PYDANTIC_V1: + return field.outer_type_ # type: ignore + return field.annotation def get_model_config(model: type[pydantic.BaseModel]) -> Any: - if PYDANTIC_V2: - return model.model_config - return model.__config__ # type: ignore + if PYDANTIC_V1: + return model.__config__ # type: ignore + return model.model_config def get_model_fields(model: type[pydantic.BaseModel]) -> dict[str, FieldInfo]: - if PYDANTIC_V2: - return model.model_fields - return model.__fields__ # type: ignore + if PYDANTIC_V1: + return model.__fields__ # type: ignore + return model.model_fields def model_copy(model: _ModelT, *, deep: bool = False) -> _ModelT: - if PYDANTIC_V2: - return model.model_copy(deep=deep) - return model.copy(deep=deep) # type: ignore + if PYDANTIC_V1: + return model.copy(deep=deep) # type: ignore + return model.model_copy(deep=deep) def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: - if PYDANTIC_V2: - return model.model_dump_json(indent=indent) - return model.json(indent=indent) # type: ignore + if PYDANTIC_V1: + return model.json(indent=indent) # type: ignore + return model.model_dump_json(indent=indent) def model_dump( @@ -139,14 +140,14 @@ def model_dump( warnings: bool = True, mode: Literal["json", "python"] = "python", ) -> dict[str, Any]: - if PYDANTIC_V2 or hasattr(model, "model_dump"): + if (not PYDANTIC_V1) or hasattr(model, "model_dump"): return model.model_dump( mode=mode, exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 - warnings=warnings if PYDANTIC_V2 else True, + warnings=True if PYDANTIC_V1 else warnings, ) return cast( "dict[str, Any]", @@ -159,9 +160,9 @@ def model_dump( def model_parse(model: type[_ModelT], data: Any) -> _ModelT: - if PYDANTIC_V2: - return model.model_validate(data) - return model.parse_obj(data) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return model.parse_obj(data) # pyright: ignore[reportDeprecated] + return model.model_validate(data) # generic models @@ -170,17 +171,16 @@ def model_parse(model: type[_ModelT], data: Any) -> _ModelT: class GenericModel(pydantic.BaseModel): ... else: - if PYDANTIC_V2: + if PYDANTIC_V1: + import pydantic.generics + + class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... + else: # there no longer needs to be a distinction in v2 but # we still have to create our own subclass to avoid # inconsistent MRO ordering errors class GenericModel(pydantic.BaseModel): ... - else: - import pydantic.generics - - class GenericModel(pydantic.generics.GenericModel, pydantic.BaseModel): ... - # cached properties if TYPE_CHECKING: diff --git a/src/increase/_models.py b/src/increase/_models.py index 92f7c10bc..3a6017ef2 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -50,7 +50,7 @@ strip_annotated_type, ) from ._compat import ( - PYDANTIC_V2, + PYDANTIC_V1, ConfigDict, GenericModel as BaseGenericModel, get_args, @@ -81,11 +81,7 @@ class _ConfigProtocol(Protocol): class BaseModel(pydantic.BaseModel): - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict( - extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) - ) - else: + if PYDANTIC_V1: @property @override @@ -95,6 +91,10 @@ def model_fields_set(self) -> set[str]: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] extra: Any = pydantic.Extra.allow # type: ignore + else: + model_config: ClassVar[ConfigDict] = ConfigDict( + extra="allow", defer_build=coerce_boolean(os.environ.get("DEFER_PYDANTIC_BUILD", "true")) + ) def to_dict( self, @@ -215,25 +215,25 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] if key not in model_fields: parsed = construct_type(value=value, type_=extra_field_type) if extra_field_type is not None else value - if PYDANTIC_V2: - _extra[key] = parsed - else: + if PYDANTIC_V1: _fields_set.add(key) fields_values[key] = parsed + else: + _extra[key] = parsed object.__setattr__(m, "__dict__", fields_values) - if PYDANTIC_V2: - # these properties are copied from Pydantic's `model_construct()` method - object.__setattr__(m, "__pydantic_private__", None) - object.__setattr__(m, "__pydantic_extra__", _extra) - object.__setattr__(m, "__pydantic_fields_set__", _fields_set) - else: + if PYDANTIC_V1: # init_private_attributes() does not exist in v2 m._init_private_attributes() # type: ignore # copied from Pydantic v1's `construct()` method object.__setattr__(m, "__fields_set__", _fields_set) + else: + # these properties are copied from Pydantic's `model_construct()` method + object.__setattr__(m, "__pydantic_private__", None) + object.__setattr__(m, "__pydantic_extra__", _extra) + object.__setattr__(m, "__pydantic_fields_set__", _fields_set) return m @@ -243,7 +243,7 @@ def construct( # pyright: ignore[reportIncompatibleMethodOverride] # although not in practice model_construct = construct - if not PYDANTIC_V2: + if PYDANTIC_V1: # we define aliases for some of the new pydantic v2 methods so # that we can just document these methods without having to specify # a specific pydantic version as some users may not know which @@ -363,10 +363,10 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: if value is None: return field_get_default(field) - if PYDANTIC_V2: - type_ = field.annotation - else: + if PYDANTIC_V1: type_ = cast(type, field.outer_type_) # type: ignore + else: + type_ = field.annotation # type: ignore if type_ is None: raise RuntimeError(f"Unexpected field type is None for {key}") @@ -375,7 +375,7 @@ def _construct_field(value: object, field: FieldInfo, key: str) -> object: def _get_extra_fields_type(cls: type[pydantic.BaseModel]) -> type | None: - if not PYDANTIC_V2: + if PYDANTIC_V1: # TODO return None @@ -628,30 +628,30 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, for variant in get_args(union): variant = strip_annotated_type(variant) if is_basemodel_type(variant): - if PYDANTIC_V2: - field = _extract_field_schema_pv2(variant, discriminator_field_name) - if not field: + if PYDANTIC_V1: + field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] + if not field_info: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field.get("serialization_alias") - - field_schema = field["schema"] + discriminator_alias = field_info.alias - if field_schema["type"] == "literal": - for entry in cast("LiteralSchema", field_schema)["expected"]: + if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): + for entry in get_args(annotation): if isinstance(entry, str): mapping[entry] = variant else: - field_info = cast("dict[str, FieldInfo]", variant.__fields__).get(discriminator_field_name) # pyright: ignore[reportDeprecated, reportUnnecessaryCast] - if not field_info: + field = _extract_field_schema_pv2(variant, discriminator_field_name) + if not field: continue # Note: if one variant defines an alias then they all should - discriminator_alias = field_info.alias + discriminator_alias = field.get("serialization_alias") - if (annotation := getattr(field_info, "annotation", None)) and is_literal_type(annotation): - for entry in get_args(annotation): + field_schema = field["schema"] + + if field_schema["type"] == "literal": + for entry in cast("LiteralSchema", field_schema)["expected"]: if isinstance(entry, str): mapping[entry] = variant @@ -714,7 +714,7 @@ class GenericModel(BaseGenericModel, BaseModel): pass -if PYDANTIC_V2: +if not PYDANTIC_V1: from pydantic import TypeAdapter as _TypeAdapter _CachedTypeAdapter = cast("TypeAdapter[object]", lru_cache(maxsize=None)(_TypeAdapter)) @@ -782,12 +782,12 @@ class FinalRequestOptions(pydantic.BaseModel): json_data: Union[Body, None] = None extra_json: Union[AnyMapping, None] = None - if PYDANTIC_V2: - model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) - else: + if PYDANTIC_V1: class Config(pydantic.BaseConfig): # pyright: ignore[reportDeprecated] arbitrary_types_allowed: bool = True + else: + model_config: ClassVar[ConfigDict] = ConfigDict(arbitrary_types_allowed=True) def get_max_retries(self, max_retries: int) -> int: if isinstance(self.max_retries, NotGiven): @@ -820,9 +820,9 @@ def construct( # type: ignore key: strip_not_given(value) for key, value in values.items() } - if PYDANTIC_V2: - return super().model_construct(_fields_set, **kwargs) - return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + if PYDANTIC_V1: + return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs)) # pyright: ignore[reportDeprecated] + return super().model_construct(_fields_set, **kwargs) if not TYPE_CHECKING: # type checkers incorrectly complain about this assignment diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index ca547ce52..dc64e29a1 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -10,7 +10,6 @@ lru_cache as lru_cache, is_mapping as is_mapping, is_tuple_t as is_tuple_t, - parse_date as parse_date, is_iterable as is_iterable, is_sequence as is_sequence, coerce_float as coerce_float, @@ -23,7 +22,6 @@ coerce_boolean as coerce_boolean, coerce_integer as coerce_integer, file_from_path as file_from_path, - parse_datetime as parse_datetime, strip_not_given as strip_not_given, deepcopy_minimal as deepcopy_minimal, get_async_library as get_async_library, @@ -32,6 +30,13 @@ maybe_coerce_boolean as maybe_coerce_boolean, maybe_coerce_integer as maybe_coerce_integer, ) +from ._compat import ( + get_args as get_args, + is_union as is_union, + get_origin as get_origin, + is_typeddict as is_typeddict, + is_literal_type as is_literal_type, +) from ._typing import ( is_list_type as is_list_type, is_union_type as is_union_type, @@ -56,3 +61,4 @@ function_has_argument as function_has_argument, assert_signatures_in_sync as assert_signatures_in_sync, ) +from ._datetime_parse import parse_date as parse_date, parse_datetime as parse_datetime diff --git a/src/increase/_utils/_compat.py b/src/increase/_utils/_compat.py new file mode 100644 index 000000000..dd703233c --- /dev/null +++ b/src/increase/_utils/_compat.py @@ -0,0 +1,45 @@ +from __future__ import annotations + +import sys +import typing_extensions +from typing import Any, Type, Union, Literal, Optional +from datetime import date, datetime +from typing_extensions import get_args as _get_args, get_origin as _get_origin + +from .._types import StrBytesIntFloat +from ._datetime_parse import parse_date as _parse_date, parse_datetime as _parse_datetime + +_LITERAL_TYPES = {Literal, typing_extensions.Literal} + + +def get_args(tp: type[Any]) -> tuple[Any, ...]: + return _get_args(tp) + + +def get_origin(tp: type[Any]) -> type[Any] | None: + return _get_origin(tp) + + +def is_union(tp: Optional[Type[Any]]) -> bool: + if sys.version_info < (3, 10): + return tp is Union # type: ignore[comparison-overlap] + else: + import types + + return tp is Union or tp is types.UnionType + + +def is_typeddict(tp: Type[Any]) -> bool: + return typing_extensions.is_typeddict(tp) + + +def is_literal_type(tp: Type[Any]) -> bool: + return get_origin(tp) in _LITERAL_TYPES + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + return _parse_date(value) + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + return _parse_datetime(value) diff --git a/src/increase/_utils/_datetime_parse.py b/src/increase/_utils/_datetime_parse.py new file mode 100644 index 000000000..7cb9d9e66 --- /dev/null +++ b/src/increase/_utils/_datetime_parse.py @@ -0,0 +1,136 @@ +""" +This file contains code from https://github.com/pydantic/pydantic/blob/main/pydantic/v1/datetime_parse.py +without the Pydantic v1 specific errors. +""" + +from __future__ import annotations + +import re +from typing import Dict, Union, Optional +from datetime import date, datetime, timezone, timedelta + +from .._types import StrBytesIntFloat + +date_expr = r"(?P\d{4})-(?P\d{1,2})-(?P\d{1,2})" +time_expr = ( + r"(?P\d{1,2}):(?P\d{1,2})" + r"(?::(?P\d{1,2})(?:\.(?P\d{1,6})\d{0,6})?)?" + r"(?PZ|[+-]\d{2}(?::?\d{2})?)?$" +) + +date_re = re.compile(f"{date_expr}$") +datetime_re = re.compile(f"{date_expr}[T ]{time_expr}") + + +EPOCH = datetime(1970, 1, 1) +# if greater than this, the number is in ms, if less than or equal it's in seconds +# (in seconds this is 11th October 2603, in ms it's 20th August 1970) +MS_WATERSHED = int(2e10) +# slightly more than datetime.max in ns - (datetime.max - EPOCH).total_seconds() * 1e9 +MAX_NUMBER = int(3e20) + + +def _get_numeric(value: StrBytesIntFloat, native_expected_type: str) -> Union[None, int, float]: + if isinstance(value, (int, float)): + return value + try: + return float(value) + except ValueError: + return None + except TypeError: + raise TypeError(f"invalid type; expected {native_expected_type}, string, bytes, int or float") from None + + +def _from_unix_seconds(seconds: Union[int, float]) -> datetime: + if seconds > MAX_NUMBER: + return datetime.max + elif seconds < -MAX_NUMBER: + return datetime.min + + while abs(seconds) > MS_WATERSHED: + seconds /= 1000 + dt = EPOCH + timedelta(seconds=seconds) + return dt.replace(tzinfo=timezone.utc) + + +def _parse_timezone(value: Optional[str]) -> Union[None, int, timezone]: + if value == "Z": + return timezone.utc + elif value is not None: + offset_mins = int(value[-2:]) if len(value) > 3 else 0 + offset = 60 * int(value[1:3]) + offset_mins + if value[0] == "-": + offset = -offset + return timezone(timedelta(minutes=offset)) + else: + return None + + +def parse_datetime(value: Union[datetime, StrBytesIntFloat]) -> datetime: + """ + Parse a datetime/int/float/string and return a datetime.datetime. + + This function supports time zone offsets. When the input contains one, + the output uses a timezone with a fixed offset from UTC. + + Raise ValueError if the input is well formatted but not a valid datetime. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, datetime): + return value + + number = _get_numeric(value, "datetime") + if number is not None: + return _from_unix_seconds(number) + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + + match = datetime_re.match(value) + if match is None: + raise ValueError("invalid datetime format") + + kw = match.groupdict() + if kw["microsecond"]: + kw["microsecond"] = kw["microsecond"].ljust(6, "0") + + tzinfo = _parse_timezone(kw.pop("tzinfo")) + kw_: Dict[str, Union[None, int, timezone]] = {k: int(v) for k, v in kw.items() if v is not None} + kw_["tzinfo"] = tzinfo + + return datetime(**kw_) # type: ignore + + +def parse_date(value: Union[date, StrBytesIntFloat]) -> date: + """ + Parse a date/int/float/string and return a datetime.date. + + Raise ValueError if the input is well formatted but not a valid date. + Raise ValueError if the input isn't well formatted. + """ + if isinstance(value, date): + if isinstance(value, datetime): + return value.date() + else: + return value + + number = _get_numeric(value, "date") + if number is not None: + return _from_unix_seconds(number).date() + + if isinstance(value, bytes): + value = value.decode() + + assert not isinstance(value, (float, int)) + match = date_re.match(value) + if match is None: + raise ValueError("invalid date format") + + kw = {k: int(v) for k, v in match.groupdict().items()} + + try: + return date(**kw) + except ValueError: + raise ValueError("invalid date format") from None diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index f0bcefd49..c19124f0d 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -19,6 +19,7 @@ is_sequence, ) from .._files import is_base64_file_input +from ._compat import get_origin, is_typeddict from ._typing import ( is_list_type, is_union_type, @@ -29,7 +30,6 @@ is_annotated_type, strip_annotated_type, ) -from .._compat import get_origin, model_dump, is_typeddict _T = TypeVar("_T") @@ -169,6 +169,8 @@ def _transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation @@ -333,6 +335,8 @@ async def _async_transform_recursive( Defaults to the same value as the `annotation` argument. """ + from .._compat import model_dump + if inner_type is None: inner_type = annotation diff --git a/src/increase/_utils/_typing.py b/src/increase/_utils/_typing.py index 845cd6b28..193109f3a 100644 --- a/src/increase/_utils/_typing.py +++ b/src/increase/_utils/_typing.py @@ -15,7 +15,7 @@ from ._utils import lru_cache from .._types import InheritsGeneric -from .._compat import is_union as _is_union +from ._compat import is_union as _is_union def is_annotated_type(typ: type) -> bool: diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index ea3cf3f2c..f0818595d 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -22,7 +22,6 @@ import sniffio from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike -from .._compat import parse_date as parse_date, parse_datetime as parse_datetime _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) diff --git a/tests/test_models.py b/tests/test_models.py index e97a30009..faf9fc1b6 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -8,7 +8,7 @@ from pydantic import Field from increase._utils import PropertyInfo -from increase._compat import PYDANTIC_V2, parse_obj, model_dump, model_json +from increase._compat import PYDANTIC_V1, parse_obj, model_dump, model_json from increase._models import BaseModel, construct_type @@ -294,12 +294,12 @@ class Model(BaseModel): assert cast(bool, m.foo) is True m = Model.construct(foo={"name": 3}) - if PYDANTIC_V2: - assert isinstance(m.foo, Submodel1) - assert m.foo.name == 3 # type: ignore - else: + if PYDANTIC_V1: assert isinstance(m.foo, Submodel2) assert m.foo.name == "3" + else: + assert isinstance(m.foo, Submodel1) + assert m.foo.name == 3 # type: ignore def test_list_of_unions() -> None: @@ -426,10 +426,10 @@ class Model(BaseModel): expected = datetime(2019, 12, 27, 18, 11, 19, 117000, tzinfo=timezone.utc) - if PYDANTIC_V2: - expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' - else: + if PYDANTIC_V1: expected_json = '{"created_at": "2019-12-27T18:11:19.117000+00:00"}' + else: + expected_json = '{"created_at":"2019-12-27T18:11:19.117000Z"}' model = Model.construct(created_at="2019-12-27T18:11:19.117Z") assert model.created_at == expected @@ -531,7 +531,7 @@ class Model2(BaseModel): assert m4.to_dict(mode="python") == {"created_at": datetime.fromisoformat(time_str)} assert m4.to_dict(mode="json") == {"created_at": time_str} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_dict(warnings=False) @@ -556,7 +556,7 @@ class Model(BaseModel): assert m3.model_dump() == {"foo": None} assert m3.model_dump(exclude_none=True) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump(round_trip=True) @@ -580,10 +580,10 @@ class Model(BaseModel): assert json.loads(m.to_json()) == {"FOO": "hello"} assert json.loads(m.to_json(use_api_names=False)) == {"foo": "hello"} - if PYDANTIC_V2: - assert m.to_json(indent=None) == '{"FOO":"hello"}' - else: + if PYDANTIC_V1: assert m.to_json(indent=None) == '{"FOO": "hello"}' + else: + assert m.to_json(indent=None) == '{"FOO":"hello"}' m2 = Model() assert json.loads(m2.to_json()) == {} @@ -595,7 +595,7 @@ class Model(BaseModel): assert json.loads(m3.to_json()) == {"FOO": None} assert json.loads(m3.to_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="warnings is only supported in Pydantic v2"): m.to_json(warnings=False) @@ -622,7 +622,7 @@ class Model(BaseModel): assert json.loads(m3.model_dump_json()) == {"foo": None} assert json.loads(m3.model_dump_json(exclude_none=True)) == {} - if not PYDANTIC_V2: + if PYDANTIC_V1: with pytest.raises(ValueError, match="round_trip is only supported in Pydantic v2"): m.model_dump_json(round_trip=True) @@ -679,12 +679,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_unknown_variant() -> None: @@ -768,12 +768,12 @@ class B(BaseModel): ) assert isinstance(m, A) assert m.foo_type == "a" - if PYDANTIC_V2: - assert m.data == 100 # type: ignore[comparison-overlap] - else: + if PYDANTIC_V1: # pydantic v1 automatically converts inputs to strings # if the expected type is a str assert m.data == "100" + else: + assert m.data == 100 # type: ignore[comparison-overlap] def test_discriminated_unions_overlapping_discriminators_invalid_data() -> None: @@ -833,7 +833,7 @@ class B(BaseModel): assert UnionType.__discriminator__ is discriminator -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_type_alias_type() -> None: Alias = TypeAliasType("Alias", str) # pyright: ignore @@ -849,7 +849,7 @@ class Model(BaseModel): assert m.union == "bar" -@pytest.mark.skipif(not PYDANTIC_V2, reason="TypeAliasType is not supported in Pydantic v1") +@pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") def test_field_named_cls() -> None: class Model(BaseModel): cls: str @@ -936,7 +936,7 @@ class Type2(BaseModel): assert isinstance(model.value, InnerType2) -@pytest.mark.skipif(not PYDANTIC_V2, reason="this is only supported in pydantic v2 for now") +@pytest.mark.skipif(PYDANTIC_V1, reason="this is only supported in pydantic v2 for now") def test_extra_properties() -> None: class Item(BaseModel): prop: int diff --git a/tests/test_transform.py b/tests/test_transform.py index bb72d99a9..7b9ba4c28 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -15,7 +15,7 @@ parse_datetime, async_transform as _async_transform, ) -from increase._compat import PYDANTIC_V2 +from increase._compat import PYDANTIC_V1 from increase._models import BaseModel _T = TypeVar("_T") @@ -189,7 +189,7 @@ class DateModel(BaseModel): @pytest.mark.asyncio async def test_iso8601_format(use_async: bool) -> None: dt = datetime.fromisoformat("2023-02-23T14:16:36.337692+00:00") - tz = "Z" if PYDANTIC_V2 else "+00:00" + tz = "+00:00" if PYDANTIC_V1 else "Z" assert await transform({"foo": dt}, DatetimeDict, use_async) == {"foo": "2023-02-23T14:16:36.337692+00:00"} # type: ignore[comparison-overlap] assert await transform(DatetimeModel(foo=dt), Any, use_async) == {"foo": "2023-02-23T14:16:36.337692" + tz} # type: ignore[comparison-overlap] @@ -297,11 +297,11 @@ async def test_pydantic_unknown_field(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_types(use_async: bool) -> None: model = MyModel.construct(foo=True) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": True} @@ -309,11 +309,11 @@ async def test_pydantic_mismatched_types(use_async: bool) -> None: @pytest.mark.asyncio async def test_pydantic_mismatched_object_type(use_async: bool) -> None: model = MyModel.construct(foo=MyModel.construct(hello="world")) - if PYDANTIC_V2: + if PYDANTIC_V1: + params = await transform(model, Any, use_async) + else: with pytest.warns(UserWarning): params = await transform(model, Any, use_async) - else: - params = await transform(model, Any, use_async) assert cast(Any, params) == {"foo": {"hello": "world"}} diff --git a/tests/test_utils/test_datetime_parse.py b/tests/test_utils/test_datetime_parse.py new file mode 100644 index 000000000..5f4461227 --- /dev/null +++ b/tests/test_utils/test_datetime_parse.py @@ -0,0 +1,110 @@ +""" +Copied from https://github.com/pydantic/pydantic/blob/v1.10.22/tests/test_datetime_parse.py +with modifications so it works without pydantic v1 imports. +""" + +from typing import Type, Union +from datetime import date, datetime, timezone, timedelta + +import pytest + +from increase._utils import parse_date, parse_datetime + + +def create_tz(minutes: int) -> timezone: + return timezone(timedelta(minutes=minutes)) + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + ("1494012444.883309", date(2017, 5, 5)), + (b"1494012444.883309", date(2017, 5, 5)), + (1_494_012_444.883_309, date(2017, 5, 5)), + ("1494012444", date(2017, 5, 5)), + (1_494_012_444, date(2017, 5, 5)), + (0, date(1970, 1, 1)), + ("2012-04-23", date(2012, 4, 23)), + (b"2012-04-23", date(2012, 4, 23)), + ("2012-4-9", date(2012, 4, 9)), + (date(2012, 4, 9), date(2012, 4, 9)), + (datetime(2012, 4, 9, 12, 15), date(2012, 4, 9)), + # Invalid inputs + ("x20120423", ValueError), + ("2012-04-56", ValueError), + (19_999_999_999, date(2603, 10, 11)), # just before watershed + (20_000_000_001, date(1970, 8, 20)), # just after watershed + (1_549_316_052, date(2019, 2, 4)), # nowish in s + (1_549_316_052_104, date(2019, 2, 4)), # nowish in ms + (1_549_316_052_104_324, date(2019, 2, 4)), # nowish in μs + (1_549_316_052_104_324_096, date(2019, 2, 4)), # nowish in ns + ("infinity", date(9999, 12, 31)), + ("inf", date(9999, 12, 31)), + (float("inf"), date(9999, 12, 31)), + ("infinity ", date(9999, 12, 31)), + (int("1" + "0" * 100), date(9999, 12, 31)), + (1e1000, date(9999, 12, 31)), + ("-infinity", date(1, 1, 1)), + ("-inf", date(1, 1, 1)), + ("nan", ValueError), + ], +) +def test_date_parsing(value: Union[str, bytes, int, float], result: Union[date, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_date(value) + else: + assert parse_date(value) == result + + +@pytest.mark.parametrize( + "value,result", + [ + # Valid inputs + # values in seconds + ("1494012444.883309", datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + (1_494_012_444.883_309, datetime(2017, 5, 5, 19, 27, 24, 883_309, tzinfo=timezone.utc)), + ("1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (b"1494012444", datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + (1_494_012_444, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + # values in ms + ("1494012444000.883309", datetime(2017, 5, 5, 19, 27, 24, 883, tzinfo=timezone.utc)), + ("-1494012444000.883309", datetime(1922, 8, 29, 4, 32, 35, 999117, tzinfo=timezone.utc)), + (1_494_012_444_000, datetime(2017, 5, 5, 19, 27, 24, tzinfo=timezone.utc)), + ("2012-04-23T09:15:00", datetime(2012, 4, 23, 9, 15)), + ("2012-4-9 4:8:16", datetime(2012, 4, 9, 4, 8, 16)), + ("2012-04-23T09:15:00Z", datetime(2012, 4, 23, 9, 15, 0, 0, timezone.utc)), + ("2012-4-9 4:8:16-0320", datetime(2012, 4, 9, 4, 8, 16, 0, create_tz(-200))), + ("2012-04-23T10:20:30.400+02:30", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(150))), + ("2012-04-23T10:20:30.400+02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(120))), + ("2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (b"2012-04-23T10:20:30.400-02", datetime(2012, 4, 23, 10, 20, 30, 400_000, create_tz(-120))), + (datetime(2017, 5, 5), datetime(2017, 5, 5)), + (0, datetime(1970, 1, 1, 0, 0, 0, tzinfo=timezone.utc)), + # Invalid inputs + ("x20120423091500", ValueError), + ("2012-04-56T09:15:90", ValueError), + ("2012-04-23T11:05:00-25:00", ValueError), + (19_999_999_999, datetime(2603, 10, 11, 11, 33, 19, tzinfo=timezone.utc)), # just before watershed + (20_000_000_001, datetime(1970, 8, 20, 11, 33, 20, 1000, tzinfo=timezone.utc)), # just after watershed + (1_549_316_052, datetime(2019, 2, 4, 21, 34, 12, 0, tzinfo=timezone.utc)), # nowish in s + (1_549_316_052_104, datetime(2019, 2, 4, 21, 34, 12, 104_000, tzinfo=timezone.utc)), # nowish in ms + (1_549_316_052_104_324, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in μs + (1_549_316_052_104_324_096, datetime(2019, 2, 4, 21, 34, 12, 104_324, tzinfo=timezone.utc)), # nowish in ns + ("infinity", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf", datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("inf ", datetime(9999, 12, 31, 23, 59, 59, 999999)), + (1e50, datetime(9999, 12, 31, 23, 59, 59, 999999)), + (float("inf"), datetime(9999, 12, 31, 23, 59, 59, 999999)), + ("-infinity", datetime(1, 1, 1, 0, 0)), + ("-inf", datetime(1, 1, 1, 0, 0)), + ("nan", ValueError), + ], +) +def test_datetime_parsing(value: Union[str, bytes, int, float], result: Union[datetime, Type[Exception]]) -> None: + if type(result) == type and issubclass(result, Exception): # pyright: ignore[reportUnnecessaryIsInstance] + with pytest.raises(result): + parse_datetime(value) + else: + assert parse_datetime(value) == result diff --git a/tests/utils.py b/tests/utils.py index ed9af8295..6bd357c17 100644 --- a/tests/utils.py +++ b/tests/utils.py @@ -19,7 +19,7 @@ is_annotated_type, is_type_alias_type, ) -from increase._compat import PYDANTIC_V2, field_outer_type, get_model_fields +from increase._compat import PYDANTIC_V1, field_outer_type, get_model_fields from increase._models import BaseModel BaseModelT = TypeVar("BaseModelT", bound=BaseModel) @@ -28,12 +28,12 @@ def assert_matches_model(model: type[BaseModelT], value: BaseModelT, *, path: list[str]) -> bool: for name, field in get_model_fields(model).items(): field_value = getattr(value, name) - if PYDANTIC_V2: - allow_none = False - else: + if PYDANTIC_V1: # in v1 nullability was structured differently # https://docs.pydantic.dev/2.0/migration/#required-optional-and-nullable-fields allow_none = getattr(field, "allow_none", False) + else: + allow_none = False assert_matches_type( field_outer_type(field), From 7a887f9e7fa8f69557bcecc42ade2d5cae0ad59e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 14:45:59 +0000 Subject: [PATCH 0815/1325] chore(internal): move mypy configurations to `pyproject.toml` file --- mypy.ini | 50 ------------------------------------------------ pyproject.toml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+), 50 deletions(-) delete mode 100644 mypy.ini diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 4691e79f1..000000000 --- a/mypy.ini +++ /dev/null @@ -1,50 +0,0 @@ -[mypy] -pretty = True -show_error_codes = True - -# Exclude _files.py because mypy isn't smart enough to apply -# the correct type narrowing and as this is an internal module -# it's fine to just use Pyright. -# -# We also exclude our `tests` as mypy doesn't always infer -# types correctly and Pyright will still catch any type errors. -exclude = ^(src/increase/_files\.py|_dev/.*\.py|tests/.*)$ - -strict_equality = True -implicit_reexport = True -check_untyped_defs = True -no_implicit_optional = True - -warn_return_any = True -warn_unreachable = True -warn_unused_configs = True - -# Turn these options off as it could cause conflicts -# with the Pyright options. -warn_unused_ignores = False -warn_redundant_casts = False - -disallow_any_generics = True -disallow_untyped_defs = True -disallow_untyped_calls = True -disallow_subclassing_any = True -disallow_incomplete_defs = True -disallow_untyped_decorators = True -cache_fine_grained = True - -# By default, mypy reports an error if you assign a value to the result -# of a function call that doesn't return anything. We do this in our test -# cases: -# ``` -# result = ... -# assert result is None -# ``` -# Changing this codegen to make mypy happy would increase complexity -# and would not be worth it. -disable_error_code = func-returns-value,overload-cannot-match - -# https://github.com/python/mypy/issues/12162 -[mypy.overrides] -module = "black.files.*" -ignore_errors = true -ignore_missing_imports = true diff --git a/pyproject.toml b/pyproject.toml index 34a0dc541..125986f04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -157,6 +157,58 @@ reportOverlappingOverload = false reportImportCycles = false reportPrivateUsage = false +[tool.mypy] +pretty = true +show_error_codes = true + +# Exclude _files.py because mypy isn't smart enough to apply +# the correct type narrowing and as this is an internal module +# it's fine to just use Pyright. +# +# We also exclude our `tests` as mypy doesn't always infer +# types correctly and Pyright will still catch any type errors. +exclude = ['src/increase/_files.py', '_dev/.*.py', 'tests/.*'] + +strict_equality = true +implicit_reexport = true +check_untyped_defs = true +no_implicit_optional = true + +warn_return_any = true +warn_unreachable = true +warn_unused_configs = true + +# Turn these options off as it could cause conflicts +# with the Pyright options. +warn_unused_ignores = false +warn_redundant_casts = false + +disallow_any_generics = true +disallow_untyped_defs = true +disallow_untyped_calls = true +disallow_subclassing_any = true +disallow_incomplete_defs = true +disallow_untyped_decorators = true +cache_fine_grained = true + +# By default, mypy reports an error if you assign a value to the result +# of a function call that doesn't return anything. We do this in our test +# cases: +# ``` +# result = ... +# assert result is None +# ``` +# Changing this codegen to make mypy happy would increase complexity +# and would not be worth it. +disable_error_code = "func-returns-value,overload-cannot-match" + +# https://github.com/python/mypy/issues/12162 +[[tool.mypy.overrides]] +module = "black.files.*" +ignore_errors = true +ignore_missing_imports = true + + [tool.ruff] line-length = 120 output-format = "grouped" From 05f9c8ba5ca0b1d4f15fe00338fe1fadec23636a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 18:28:18 +0000 Subject: [PATCH 0816/1325] feat(api): api update --- .stats.yml | 4 ++-- .../resources/physical_card_profiles.py | 20 +++++++++++++++++++ .../physical_card_profile_create_params.py | 12 +++++++++++ .../test_physical_card_profiles.py | 4 ++++ 4 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a123afd0f..4046227bc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4951789bd74367647a7109ac527206883115628aac13b8131b0bc046ead9cc5c.yml -openapi_spec_hash: 924a557a551c40624e4fe4703dec71cc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fbdfb5721d0c46a176ee6d81936d2710556c39cc486c5de246cc17b0503ee408.yml +openapi_spec_hash: 66c900a94b458e5b796ac1d2a5fceb13 config_hash: 632b628b59d8f0b717153b3d8133f6cb diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index e12191d9d..45e1720ae 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -54,6 +54,8 @@ def create( description: str, front_image_file_id: str, program_id: str, + card_stock_reference: str | NotGiven = NOT_GIVEN, + carrier_stock_reference: str | NotGiven = NOT_GIVEN, front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -77,6 +79,12 @@ def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. + Only used if you've ordered card stock separately. + + carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. + Only used if you've ordered carrier stock separately. + front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -99,6 +107,8 @@ def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "card_stock_reference": card_stock_reference, + "carrier_stock_reference": carrier_stock_reference, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, @@ -354,6 +364,8 @@ async def create( description: str, front_image_file_id: str, program_id: str, + card_stock_reference: str | NotGiven = NOT_GIVEN, + carrier_stock_reference: str | NotGiven = NOT_GIVEN, front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -377,6 +389,12 @@ async def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. + Only used if you've ordered card stock separately. + + carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. + Only used if you've ordered carrier stock separately. + front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -399,6 +417,8 @@ async def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "card_stock_reference": card_stock_reference, + "carrier_stock_reference": carrier_stock_reference, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index 6544cf53f..1b854d0b1 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -23,6 +23,18 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): program_id: Required[str] """The identifier for the Program that this Physical Card Profile falls under.""" + card_stock_reference: str + """A reference ID provided by the fulfillment provider for the card stock used. + + Only used if you've ordered card stock separately. + """ + + carrier_stock_reference: str + """A reference ID provided by the fulfillment provider for the carrier stock used. + + Only used if you've ordered carrier stock separately. + """ + front_text: FrontText """Text printed on the front of the card. diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 1e86b92f3..b2b51e9e1 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -39,6 +39,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", + card_stock_reference="x", + carrier_stock_reference="x", front_text={ "line1": "x", "line2": "x", @@ -274,6 +276,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", + card_stock_reference="x", + carrier_stock_reference="x", front_text={ "line1": "x", "line2": "x", From 8f1c836d5b953caa771c07ed6daf4c97543234bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 18:31:06 +0000 Subject: [PATCH 0817/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 269cfb5d4..422745047 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.311.0" + ".": "0.312.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 125986f04..611c10635 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.311.0" +version = "0.312.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7811b46b3..4841587ff 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.311.0" # x-release-please-version +__version__ = "0.312.0" # x-release-please-version From a6bee61602970bac2cbeb2296f929828f25d80d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 19:38:53 +0000 Subject: [PATCH 0818/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/entities.py | 117 +++++++++++++++++++++ src/increase/types/__init__.py | 1 + src/increase/types/entity.py | 23 ++++ src/increase/types/entity_create_params.py | 25 ++++- src/increase/types/entity_update_params.py | 35 ++++++ tests/api_resources/test_entities.py | 106 +++++++++++++++++++ 8 files changed, 311 insertions(+), 5 deletions(-) create mode 100644 src/increase/types/entity_update_params.py diff --git a/.stats.yml b/.stats.yml index 4046227bc..b81bcdb11 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 216 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fbdfb5721d0c46a176ee6d81936d2710556c39cc486c5de246cc17b0503ee408.yml -openapi_spec_hash: 66c900a94b458e5b796ac1d2a5fceb13 -config_hash: 632b628b59d8f0b717153b3d8133f6cb +configured_endpoints: 217 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1eb1b9beeffa6783ab1a53c794e87a6d6d69ef975941d6213ce9e66fcf487a82.yml +openapi_spec_hash: 246b178a64c9ac4a3e9332e406f6a90f +config_hash: 2a4a1945e6eefa24fa5b0590cf580fb4 diff --git a/api.md b/api.md index 37602676f..8904e02e3 100644 --- a/api.md +++ b/api.md @@ -449,6 +449,7 @@ Methods: - client.entities.create(\*\*params) -> Entity - client.entities.retrieve(entity_id) -> Entity +- client.entities.update(entity_id, \*\*params) -> Entity - client.entities.list(\*\*params) -> SyncPage[Entity] - client.entities.archive(entity_id) -> Entity - client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 8f7a39fd5..8c955cafc 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -11,6 +11,7 @@ from ..types import ( entity_list_params, entity_create_params, + entity_update_params, entity_confirm_params, entity_update_address_params, entity_update_industry_code_params, @@ -64,6 +65,7 @@ def create( government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, + risk_rating: entity_create_params.RiskRating | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, @@ -103,6 +105,9 @@ def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + supplemental_documents: Additional documentation associated with the entity. third_party_verification: A reference to data stored in a third-party verification service. Your @@ -131,6 +136,7 @@ def create( "government_authority": government_authority, "joint": joint, "natural_person": natural_person, + "risk_rating": risk_rating, "supplemental_documents": supplemental_documents, "third_party_verification": third_party_verification, "trust": trust, @@ -182,6 +188,53 @@ def retrieve( cast_to=Entity, ) + def update( + self, + entity_id: str, + *, + risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update an Entity + + Args: + entity_id: The entity identifier. + + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return self._patch( + f"/entities/{entity_id}", + body=maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def list( self, *, @@ -622,6 +675,7 @@ async def create( government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, + risk_rating: entity_create_params.RiskRating | NotGiven = NOT_GIVEN, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, @@ -661,6 +715,9 @@ async def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + supplemental_documents: Additional documentation associated with the entity. third_party_verification: A reference to data stored in a third-party verification service. Your @@ -689,6 +746,7 @@ async def create( "government_authority": government_authority, "joint": joint, "natural_person": natural_person, + "risk_rating": risk_rating, "supplemental_documents": supplemental_documents, "third_party_verification": third_party_verification, "trust": trust, @@ -740,6 +798,53 @@ async def retrieve( cast_to=Entity, ) + async def update( + self, + entity_id: str, + *, + risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + idempotency_key: str | None = None, + ) -> Entity: + """ + Update an Entity + + Args: + entity_id: The entity identifier. + + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_id: + raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") + return await self._patch( + f"/entities/{entity_id}", + body=await async_maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Entity, + ) + def list( self, *, @@ -1163,6 +1268,9 @@ def __init__(self, entities: EntitiesResource) -> None: self.retrieve = to_raw_response_wrapper( entities.retrieve, ) + self.update = to_raw_response_wrapper( + entities.update, + ) self.list = to_raw_response_wrapper( entities.list, ) @@ -1199,6 +1307,9 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.retrieve = async_to_raw_response_wrapper( entities.retrieve, ) + self.update = async_to_raw_response_wrapper( + entities.update, + ) self.list = async_to_raw_response_wrapper( entities.list, ) @@ -1235,6 +1346,9 @@ def __init__(self, entities: EntitiesResource) -> None: self.retrieve = to_streamed_response_wrapper( entities.retrieve, ) + self.update = to_streamed_response_wrapper( + entities.update, + ) self.list = to_streamed_response_wrapper( entities.list, ) @@ -1271,6 +1385,9 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.retrieve = async_to_streamed_response_wrapper( entities.retrieve, ) + self.update = async_to_streamed_response_wrapper( + entities.update, + ) self.list = async_to_streamed_response_wrapper( entities.list, ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index d84ce1265..eb6eed1a4 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -59,6 +59,7 @@ from .digital_wallet_token import DigitalWalletToken as DigitalWalletToken from .document_list_params import DocumentListParams as DocumentListParams from .entity_create_params import EntityCreateParams as EntityCreateParams +from .entity_update_params import EntityUpdateParams as EntityUpdateParams from .export_create_params import ExportCreateParams as ExportCreateParams from .inbound_ach_transfer import InboundACHTransfer as InboundACHTransfer from .account_create_params import AccountCreateParams as AccountCreateParams diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 4fdaeebb4..02e494585 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -25,6 +25,7 @@ "NaturalPerson", "NaturalPersonAddress", "NaturalPersonIdentification", + "RiskRating", "ThirdPartyVerification", "Trust", "TrustAddress", @@ -340,6 +341,22 @@ class NaturalPerson(BaseModel): """The person's legal name.""" +class RiskRating(BaseModel): + rated_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk + rating was performed. + """ + + rating: Literal["low", "medium", "high"] + """The rating given to this entity. + + - `low` - Low + - `medium` - Medium + - `high` - High + """ + + class ThirdPartyVerification(BaseModel): reference: str """The reference identifier for the third party verification.""" @@ -581,6 +598,12 @@ class Entity(BaseModel): Will be present if `structure` is equal to `natural_person`. """ + risk_rating: Optional[RiskRating] = None + """ + An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + """ + status: Literal["active", "archived", "disabled"] """The status of the entity. diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 7b43b7df9..6f0b97f7c 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -3,7 +3,7 @@ from __future__ import annotations from typing import List, Union, Iterable -from datetime import date +from datetime import date, datetime from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -35,6 +35,7 @@ "NaturalPersonIdentificationDriversLicense", "NaturalPersonIdentificationOther", "NaturalPersonIdentificationPassport", + "RiskRating", "SupplementalDocument", "ThirdPartyVerification", "Trust", @@ -95,6 +96,12 @@ class EntityCreateParams(TypedDict, total=False): `individual_taxpayer_identification_number` identification methods. """ + risk_rating: RiskRating + """ + An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + """ + supplemental_documents: Iterable[SupplementalDocument] """Additional documentation associated with the entity.""" @@ -683,6 +690,22 @@ class NaturalPerson(TypedDict, total=False): """ +class RiskRating(TypedDict, total=False): + rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk + rating was performed. + """ + + rating: Required[Literal["low", "medium", "high"]] + """The rating given to this entity. + + - `low` - Low + - `medium` - Medium + - `high` - High + """ + + class SupplementalDocument(TypedDict, total=False): file_id: Required[str] """The identifier of the File containing the document.""" diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py new file mode 100644 index 000000000..f0d2fc705 --- /dev/null +++ b/src/increase/types/entity_update_params.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["EntityUpdateParams", "RiskRating"] + + +class EntityUpdateParams(TypedDict, total=False): + risk_rating: RiskRating + """ + An assessment of the entity’s potential risk of involvement in financial crimes, + such as money laundering. + """ + + +class RiskRating(TypedDict, total=False): + rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk + rating was performed. + """ + + rating: Required[Literal["low", "medium", "high"]] + """The rating given to this entity. + + - `low` - Low + - `medium` - Medium + - `high` - High + """ diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index b0b4e8aeb..a52a87728 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -175,6 +175,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "x", "confirmed_no_us_tax_id": True, }, + risk_rating={ + "rated_at": parse_datetime("2019-12-27T18:11:19.117Z"), + "rating": "low", + }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], third_party_verification={ "reference": "x", @@ -332,6 +336,55 @@ def test_path_params_retrieve(self, client: Increase) -> None: "", ) + @parametrize + def test_method_update(self, client: Increase) -> None: + entity = client.entities.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Increase) -> None: + entity = client.entities.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + risk_rating={ + "rated_at": parse_datetime("2020-01-31T23:59:59Z"), + "rating": "low", + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Increase) -> None: + response = client.entities.with_raw_response.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Increase) -> None: + with client.entities.with_streaming_response.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + client.entities.with_raw_response.update( + entity_id="", + ) + @parametrize def test_method_list(self, client: Increase) -> None: entity = client.entities.list() @@ -1003,6 +1056,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "x", "confirmed_no_us_tax_id": True, }, + risk_rating={ + "rated_at": parse_datetime("2019-12-27T18:11:19.117Z"), + "rating": "low", + }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], third_party_verification={ "reference": "x", @@ -1160,6 +1217,55 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: "", ) + @parametrize + async def test_method_update(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: + entity = await async_client.entities.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + risk_rating={ + "rated_at": parse_datetime("2020-01-31T23:59:59Z"), + "rating": "low", + }, + ) + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: + response = await async_client.entities.with_raw_response.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: + async with async_client.entities.with_streaming_response.update( + entity_id="entity_n8y8tnk2p9339ti393yi", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity = await response.parse() + assert_matches_type(Entity, entity, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): + await async_client.entities.with_raw_response.update( + entity_id="", + ) + @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.list() From 366c9ce81987e8ea088dc3da16737b523aa01146 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:00:27 +0000 Subject: [PATCH 0819/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 422745047..d1b100d62 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.312.0" + ".": "0.313.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 611c10635..11206893a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.312.0" +version = "0.313.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4841587ff..6eaef94b3 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.312.0" # x-release-please-version +__version__ = "0.313.0" # x-release-please-version From 01a771ee715757dad7c509bb3f9000205db385f0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:00:56 +0000 Subject: [PATCH 0820/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 24 ++++++++++++++++++++-- src/increase/types/entity_update_params.py | 21 ++++++++++++++++++- tests/api_resources/test_entities.py | 8 ++++++++ 4 files changed, 52 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index b81bcdb11..7002ed35c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1eb1b9beeffa6783ab1a53c794e87a6d6d69ef975941d6213ce9e66fcf487a82.yml -openapi_spec_hash: 246b178a64c9ac4a3e9332e406f6a90f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-166f5a60acb9f1b94415e641215f0988dc14a8bce6a0e1a95e521fdbb0b91243.yml +openapi_spec_hash: adbd71ae90ad4559759517a17c4fec08 config_hash: 2a4a1945e6eefa24fa5b0590cf580fb4 diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 8c955cafc..042ce7d92 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -193,6 +193,7 @@ def update( entity_id: str, *, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, + third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -210,6 +211,9 @@ def update( risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + third_party_verification: A reference to data stored in a third-party verification service. Your + integration may or may not use this field. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -224,7 +228,13 @@ def update( raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._patch( f"/entities/{entity_id}", - body=maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams), + body=maybe_transform( + { + "risk_rating": risk_rating, + "third_party_verification": third_party_verification, + }, + entity_update_params.EntityUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -803,6 +813,7 @@ async def update( entity_id: str, *, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, + third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -820,6 +831,9 @@ async def update( risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + third_party_verification: A reference to data stored in a third-party verification service. Your + integration may or may not use this field. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -834,7 +848,13 @@ async def update( raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._patch( f"/entities/{entity_id}", - body=await async_maybe_transform({"risk_rating": risk_rating}, entity_update_params.EntityUpdateParams), + body=await async_maybe_transform( + { + "risk_rating": risk_rating, + "third_party_verification": third_party_verification, + }, + entity_update_params.EntityUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index f0d2fc705..d1a36e8c3 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -8,7 +8,7 @@ from .._utils import PropertyInfo -__all__ = ["EntityUpdateParams", "RiskRating"] +__all__ = ["EntityUpdateParams", "RiskRating", "ThirdPartyVerification"] class EntityUpdateParams(TypedDict, total=False): @@ -18,6 +18,12 @@ class EntityUpdateParams(TypedDict, total=False): such as money laundering. """ + third_party_verification: ThirdPartyVerification + """A reference to data stored in a third-party verification service. + + Your integration may or may not use this field. + """ + class RiskRating(TypedDict, total=False): rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -33,3 +39,16 @@ class RiskRating(TypedDict, total=False): - `medium` - Medium - `high` - High """ + + +class ThirdPartyVerification(TypedDict, total=False): + reference: Required[str] + """The reference identifier for the third party verification.""" + + vendor: Required[Literal["alloy", "middesk", "oscilar"]] + """The vendor that was used to perform the verification. + + - `alloy` - Alloy. See https://alloy.com for more information. + - `middesk` - Middesk. See https://middesk.com for more information. + - `oscilar` - Oscilar. See https://oscilar.com for more information. + """ diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index a52a87728..99dd4cabd 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -351,6 +351,10 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", }, + third_party_verification={ + "reference": "x", + "vendor": "alloy", + }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1232,6 +1236,10 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", }, + third_party_verification={ + "reference": "x", + "vendor": "alloy", + }, ) assert_matches_type(Entity, entity, path=["response"]) From 705c48e23eb2156543bd0e04140e9cadd810b72f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Sep 2025 22:03:37 +0000 Subject: [PATCH 0821/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d1b100d62..da7827268 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.313.0" + ".": "0.314.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 11206893a..19e2ffa34 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.313.0" +version = "0.314.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6eaef94b3..e3e87f63c 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.313.0" # x-release-please-version +__version__ = "0.314.0" # x-release-please-version From b4ceb3b9e68a1935db16853279b01da6c5bc88c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 01:29:53 +0000 Subject: [PATCH 0822/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/entities.py | 32 +++++++++++++++++ src/increase/types/entity_update_params.py | 42 +++++++++++++++++++++- tests/api_resources/test_entities.py | 8 +++++ 4 files changed, 83 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7002ed35c..602fdb7cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-166f5a60acb9f1b94415e641215f0988dc14a8bce6a0e1a95e521fdbb0b91243.yml -openapi_spec_hash: adbd71ae90ad4559759517a17c4fec08 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d1cfc3f93b6829318d0905c04d24008ab3576d5c00d8eb17c7d55fc34beef9e.yml +openapi_spec_hash: 12f331a1ebc9c7c8465a850736a8d8c6 config_hash: 2a4a1945e6eefa24fa5b0590cf580fb4 diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 042ce7d92..ebb7f995d 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -192,8 +192,12 @@ def update( self, entity_id: str, *, + corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, + government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, + natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, + trust: entity_update_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -208,12 +212,20 @@ def update( Args: entity_id: The entity identifier. + corporation: Details of the corporation entity to update. + + government_authority: Details of the government authority entity to update. + + natural_person: Details of the natural person entity to update. + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. third_party_verification: A reference to data stored in a third-party verification service. Your integration may or may not use this field. + trust: Details of the trust entity to update. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -230,8 +242,12 @@ def update( f"/entities/{entity_id}", body=maybe_transform( { + "corporation": corporation, + "government_authority": government_authority, + "natural_person": natural_person, "risk_rating": risk_rating, "third_party_verification": third_party_verification, + "trust": trust, }, entity_update_params.EntityUpdateParams, ), @@ -812,8 +828,12 @@ async def update( self, entity_id: str, *, + corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, + government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, + natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, + trust: entity_update_params.Trust | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -828,12 +848,20 @@ async def update( Args: entity_id: The entity identifier. + corporation: Details of the corporation entity to update. + + government_authority: Details of the government authority entity to update. + + natural_person: Details of the natural person entity to update. + risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. third_party_verification: A reference to data stored in a third-party verification service. Your integration may or may not use this field. + trust: Details of the trust entity to update. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -850,8 +878,12 @@ async def update( f"/entities/{entity_id}", body=await async_maybe_transform( { + "corporation": corporation, + "government_authority": government_authority, + "natural_person": natural_person, "risk_rating": risk_rating, "third_party_verification": third_party_verification, + "trust": trust, }, entity_update_params.EntityUpdateParams, ), diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index d1a36e8c3..e3d6416b5 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -8,10 +8,27 @@ from .._utils import PropertyInfo -__all__ = ["EntityUpdateParams", "RiskRating", "ThirdPartyVerification"] +__all__ = [ + "EntityUpdateParams", + "Corporation", + "GovernmentAuthority", + "NaturalPerson", + "RiskRating", + "ThirdPartyVerification", + "Trust", +] class EntityUpdateParams(TypedDict, total=False): + corporation: Corporation + """Details of the corporation entity to update.""" + + government_authority: GovernmentAuthority + """Details of the government authority entity to update.""" + + natural_person: NaturalPerson + """Details of the natural person entity to update.""" + risk_rating: RiskRating """ An assessment of the entity’s potential risk of involvement in financial crimes, @@ -24,6 +41,24 @@ class EntityUpdateParams(TypedDict, total=False): Your integration may or may not use this field. """ + trust: Trust + """Details of the trust entity to update.""" + + +class Corporation(TypedDict, total=False): + name: str + """The legal name of the corporation.""" + + +class GovernmentAuthority(TypedDict, total=False): + name: str + """The legal name of the government authority.""" + + +class NaturalPerson(TypedDict, total=False): + name: str + """The legal name of the natural person.""" + class RiskRating(TypedDict, total=False): rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] @@ -52,3 +87,8 @@ class ThirdPartyVerification(TypedDict, total=False): - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. """ + + +class Trust(TypedDict, total=False): + name: str + """The legal name of the trust.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 99dd4cabd..936a045a8 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -347,6 +347,9 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: entity = client.entities.update( entity_id="entity_n8y8tnk2p9339ti393yi", + corporation={"name": "x"}, + government_authority={"name": "x"}, + natural_person={"name": "x"}, risk_rating={ "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", @@ -355,6 +358,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "reference": "x", "vendor": "alloy", }, + trust={"name": "x"}, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1232,6 +1236,9 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update( entity_id="entity_n8y8tnk2p9339ti393yi", + corporation={"name": "x"}, + government_authority={"name": "x"}, + natural_person={"name": "x"}, risk_rating={ "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", @@ -1240,6 +1247,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "reference": "x", "vendor": "alloy", }, + trust={"name": "x"}, ) assert_matches_type(Entity, entity, path=["response"]) From df996befc1f6006aecd3a8a125c5b53ba217f8b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 01:32:53 +0000 Subject: [PATCH 0823/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da7827268..f93c4039e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.314.0" + ".": "0.315.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 19e2ffa34..9a86e5236 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.314.0" +version = "0.315.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e3e87f63c..ea05acb79 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.314.0" # x-release-please-version +__version__ = "0.315.0" # x-release-please-version From 0ce2bd2ee2d6187ee9143229d69c063f028088c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 21:50:45 +0000 Subject: [PATCH 0824/1325] feat(api): api update --- .stats.yml | 6 +-- api.md | 44 ++++++++--------- src/increase/_client.py | 28 +++++------ src/increase/resources/__init__.py | 12 ++--- .../resources/simulations/__init__.py | 12 ++--- .../resources/simulations/simulations.py | 48 +++++++++---------- 6 files changed, 75 insertions(+), 75 deletions(-) diff --git a/.stats.yml b/.stats.yml index 602fdb7cc..11b34180d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d1cfc3f93b6829318d0905c04d24008ab3576d5c00d8eb17c7d55fc34beef9e.yml -openapi_spec_hash: 12f331a1ebc9c7c8465a850736a8d8c6 -config_hash: 2a4a1945e6eefa24fa5b0590cf580fb4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e74540ca75fc4e7a0e28d2c41c53c6131dff74e1e3c1472601db19509bb77451.yml +openapi_spec_hash: 4030ac2965b556670d1b427ffc5c554b +config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/api.md b/api.md index 8904e02e3..808520f29 100644 --- a/api.md +++ b/api.md @@ -30,6 +30,22 @@ Methods: - client.account_numbers.update(account_number_id, \*\*params) -> AccountNumber - client.account_numbers.list(\*\*params) -> SyncPage[AccountNumber] +# AccountTransfers + +Types: + +```python +from increase.types import AccountTransfer +``` + +Methods: + +- client.account_transfers.create(\*\*params) -> AccountTransfer +- client.account_transfers.retrieve(account_transfer_id) -> AccountTransfer +- client.account_transfers.list(\*\*params) -> SyncPage[AccountTransfer] +- client.account_transfers.approve(account_transfer_id) -> AccountTransfer +- client.account_transfers.cancel(account_transfer_id) -> AccountTransfer + # Cards Types: @@ -188,22 +204,6 @@ Methods: - client.declined_transactions.retrieve(declined_transaction_id) -> DeclinedTransaction - client.declined_transactions.list(\*\*params) -> SyncPage[DeclinedTransaction] -# AccountTransfers - -Types: - -```python -from increase.types import AccountTransfer -``` - -Methods: - -- client.account_transfers.create(\*\*params) -> AccountTransfer -- client.account_transfers.retrieve(account_transfer_id) -> AccountTransfer -- client.account_transfers.list(\*\*params) -> SyncPage[AccountTransfer] -- client.account_transfers.approve(account_transfer_id) -> AccountTransfer -- client.account_transfers.cancel(account_transfer_id) -> AccountTransfer - # ACHTransfers Types: @@ -779,6 +779,12 @@ Methods: - client.simulations.interest_payments.create(\*\*params) -> Transaction +## AccountTransfers + +Methods: + +- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer + ## CardAuthorizations Types: @@ -858,12 +864,6 @@ Methods: - client.simulations.pending_transactions.release_inbound_funds_hold(pending_transaction_id) -> PendingTransaction -## AccountTransfers - -Methods: - -- client.simulations.account_transfers.complete(account_transfer_id) -> AccountTransfer - ## ACHTransfers Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index 599831eae..c3d9c903b 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -111,6 +111,7 @@ class Increase(SyncAPIClient): accounts: accounts.AccountsResource account_numbers: account_numbers.AccountNumbersResource + account_transfers: account_transfers.AccountTransfersResource cards: cards.CardsResource card_payments: card_payments.CardPaymentsResource card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource @@ -122,7 +123,6 @@ class Increase(SyncAPIClient): transactions: transactions.TransactionsResource pending_transactions: pending_transactions.PendingTransactionsResource declined_transactions: declined_transactions.DeclinedTransactionsResource - account_transfers: account_transfers.AccountTransfersResource ach_transfers: ach_transfers.ACHTransfersResource ach_prenotifications: ach_prenotifications.ACHPrenotificationsResource inbound_ach_transfers: inbound_ach_transfers.InboundACHTransfersResource @@ -257,6 +257,7 @@ def __init__( self.accounts = accounts.AccountsResource(self) self.account_numbers = account_numbers.AccountNumbersResource(self) + self.account_transfers = account_transfers.AccountTransfersResource(self) self.cards = cards.CardsResource(self) self.card_payments = card_payments.CardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) @@ -268,7 +269,6 @@ def __init__( self.transactions = transactions.TransactionsResource(self) self.pending_transactions = pending_transactions.PendingTransactionsResource(self) self.declined_transactions = declined_transactions.DeclinedTransactionsResource(self) - self.account_transfers = account_transfers.AccountTransfersResource(self) self.ach_transfers = ach_transfers.ACHTransfersResource(self) self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResource(self) self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResource(self) @@ -472,6 +472,7 @@ def _make_status_error( class AsyncIncrease(AsyncAPIClient): accounts: accounts.AsyncAccountsResource account_numbers: account_numbers.AsyncAccountNumbersResource + account_transfers: account_transfers.AsyncAccountTransfersResource cards: cards.AsyncCardsResource card_payments: card_payments.AsyncCardPaymentsResource card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource @@ -483,7 +484,6 @@ class AsyncIncrease(AsyncAPIClient): transactions: transactions.AsyncTransactionsResource pending_transactions: pending_transactions.AsyncPendingTransactionsResource declined_transactions: declined_transactions.AsyncDeclinedTransactionsResource - account_transfers: account_transfers.AsyncAccountTransfersResource ach_transfers: ach_transfers.AsyncACHTransfersResource ach_prenotifications: ach_prenotifications.AsyncACHPrenotificationsResource inbound_ach_transfers: inbound_ach_transfers.AsyncInboundACHTransfersResource @@ -620,6 +620,7 @@ def __init__( self.accounts = accounts.AsyncAccountsResource(self) self.account_numbers = account_numbers.AsyncAccountNumbersResource(self) + self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) self.cards = cards.AsyncCardsResource(self) self.card_payments = card_payments.AsyncCardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) @@ -631,7 +632,6 @@ def __init__( self.transactions = transactions.AsyncTransactionsResource(self) self.pending_transactions = pending_transactions.AsyncPendingTransactionsResource(self) self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResource(self) - self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) self.ach_transfers = ach_transfers.AsyncACHTransfersResource(self) self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResource(self) self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResource(self) @@ -838,6 +838,7 @@ class IncreaseWithRawResponse: def __init__(self, client: Increase) -> None: self.accounts = accounts.AccountsResourceWithRawResponse(client.accounts) self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers) + self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) self.cards = cards.CardsResourceWithRawResponse(client.cards) self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( @@ -861,7 +862,6 @@ def __init__(self, client: Increase) -> None: self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithRawResponse( client.declined_transactions ) - self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) self.ach_transfers = ach_transfers.ACHTransfersResourceWithRawResponse(client.ach_transfers) self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithRawResponse( client.ach_prenotifications @@ -947,6 +947,9 @@ class AsyncIncreaseWithRawResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = accounts.AsyncAccountsResourceWithRawResponse(client.accounts) self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) + self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithRawResponse( + client.account_transfers + ) self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards) self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( @@ -970,9 +973,6 @@ def __init__(self, client: AsyncIncrease) -> None: self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithRawResponse( client.declined_transactions ) - self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithRawResponse( - client.account_transfers - ) self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithRawResponse( client.ach_prenotifications @@ -1072,6 +1072,9 @@ class IncreaseWithStreamedResponse: def __init__(self, client: Increase) -> None: self.accounts = accounts.AccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = account_numbers.AccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.account_transfers = account_transfers.AccountTransfersResourceWithStreamingResponse( + client.account_transfers + ) self.cards = cards.CardsResourceWithStreamingResponse(client.cards) self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( @@ -1095,9 +1098,6 @@ def __init__(self, client: Increase) -> None: self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithStreamingResponse( client.declined_transactions ) - self.account_transfers = account_transfers.AccountTransfersResourceWithStreamingResponse( - client.account_transfers - ) self.ach_transfers = ach_transfers.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithStreamingResponse( client.ach_prenotifications @@ -1197,6 +1197,9 @@ class AsyncIncreaseWithStreamedResponse: def __init__(self, client: AsyncIncrease) -> None: self.accounts = accounts.AsyncAccountsResourceWithStreamingResponse(client.accounts) self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) + self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithStreamingResponse( + client.account_transfers + ) self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards) self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = ( @@ -1222,9 +1225,6 @@ def __init__(self, client: AsyncIncrease) -> None: self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithStreamingResponse( client.declined_transactions ) - self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithStreamingResponse( - client.account_transfers - ) self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithStreamingResponse( client.ach_prenotifications diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index a32da536a..7d0ef2b23 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -454,6 +454,12 @@ "AsyncAccountNumbersResourceWithRawResponse", "AccountNumbersResourceWithStreamingResponse", "AsyncAccountNumbersResourceWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", "CardsResource", "AsyncCardsResource", "CardsResourceWithRawResponse", @@ -520,12 +526,6 @@ "AsyncDeclinedTransactionsResourceWithRawResponse", "DeclinedTransactionsResourceWithStreamingResponse", "AsyncDeclinedTransactionsResourceWithStreamingResponse", - "AccountTransfersResource", - "AsyncAccountTransfersResource", - "AccountTransfersResourceWithRawResponse", - "AsyncAccountTransfersResourceWithRawResponse", - "AccountTransfersResourceWithStreamingResponse", - "AsyncAccountTransfersResourceWithStreamingResponse", "ACHTransfersResource", "AsyncACHTransfersResource", "ACHTransfersResourceWithRawResponse", diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index fddc2a393..c1a47a541 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -248,6 +248,12 @@ "AsyncInterestPaymentsResourceWithRawResponse", "InterestPaymentsResourceWithStreamingResponse", "AsyncInterestPaymentsResourceWithStreamingResponse", + "AccountTransfersResource", + "AsyncAccountTransfersResource", + "AccountTransfersResourceWithRawResponse", + "AsyncAccountTransfersResourceWithRawResponse", + "AccountTransfersResourceWithStreamingResponse", + "AsyncAccountTransfersResourceWithStreamingResponse", "CardAuthorizationsResource", "AsyncCardAuthorizationsResource", "CardAuthorizationsResourceWithRawResponse", @@ -314,12 +320,6 @@ "AsyncPendingTransactionsResourceWithRawResponse", "PendingTransactionsResourceWithStreamingResponse", "AsyncPendingTransactionsResourceWithStreamingResponse", - "AccountTransfersResource", - "AsyncAccountTransfersResource", - "AccountTransfersResourceWithRawResponse", - "AsyncAccountTransfersResourceWithRawResponse", - "AccountTransfersResourceWithStreamingResponse", - "AsyncAccountTransfersResourceWithStreamingResponse", "ACHTransfersResource", "AsyncACHTransfersResource", "ACHTransfersResourceWithRawResponse", diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 977defe5c..4b1ea1a12 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -245,6 +245,10 @@ class SimulationsResource(SyncAPIResource): def interest_payments(self) -> InterestPaymentsResource: return InterestPaymentsResource(self._client) + @cached_property + def account_transfers(self) -> AccountTransfersResource: + return AccountTransfersResource(self._client) + @cached_property def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) @@ -289,10 +293,6 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResource: def pending_transactions(self) -> PendingTransactionsResource: return PendingTransactionsResource(self._client) - @cached_property - def account_transfers(self) -> AccountTransfersResource: - return AccountTransfersResource(self._client) - @cached_property def ach_transfers(self) -> ACHTransfersResource: return ACHTransfersResource(self._client) @@ -382,6 +382,10 @@ class AsyncSimulationsResource(AsyncAPIResource): def interest_payments(self) -> AsyncInterestPaymentsResource: return AsyncInterestPaymentsResource(self._client) + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResource: + return AsyncAccountTransfersResource(self._client) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) @@ -426,10 +430,6 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour def pending_transactions(self) -> AsyncPendingTransactionsResource: return AsyncPendingTransactionsResource(self._client) - @cached_property - def account_transfers(self) -> AsyncAccountTransfersResource: - return AsyncAccountTransfersResource(self._client) - @cached_property def ach_transfers(self) -> AsyncACHTransfersResource: return AsyncACHTransfersResource(self._client) @@ -522,6 +522,10 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithRawResponse: return InterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + @cached_property + def account_transfers(self) -> AccountTransfersResourceWithRawResponse: + return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -566,10 +570,6 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit def pending_transactions(self) -> PendingTransactionsResourceWithRawResponse: return PendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) - @cached_property - def account_transfers(self) -> AccountTransfersResourceWithRawResponse: - return AccountTransfersResourceWithRawResponse(self._simulations.account_transfers) - @cached_property def ach_transfers(self) -> ACHTransfersResourceWithRawResponse: return ACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @@ -645,6 +645,10 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithRawResponse: return AsyncInterestPaymentsResourceWithRawResponse(self._simulations.interest_payments) + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: + return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) @@ -691,10 +695,6 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour def pending_transactions(self) -> AsyncPendingTransactionsResourceWithRawResponse: return AsyncPendingTransactionsResourceWithRawResponse(self._simulations.pending_transactions) - @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: - return AsyncAccountTransfersResourceWithRawResponse(self._simulations.account_transfers) - @cached_property def ach_transfers(self) -> AsyncACHTransfersResourceWithRawResponse: return AsyncACHTransfersResourceWithRawResponse(self._simulations.ach_transfers) @@ -770,6 +770,10 @@ def __init__(self, simulations: SimulationsResource) -> None: def interest_payments(self) -> InterestPaymentsResourceWithStreamingResponse: return InterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + @cached_property + def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: + return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + @cached_property def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -816,10 +820,6 @@ def digital_wallet_token_requests(self) -> DigitalWalletTokenRequestsResourceWit def pending_transactions(self) -> PendingTransactionsResourceWithStreamingResponse: return PendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) - @cached_property - def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: - return AccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) - @cached_property def ach_transfers(self) -> ACHTransfersResourceWithStreamingResponse: return ACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) @@ -897,6 +897,10 @@ def __init__(self, simulations: AsyncSimulationsResource) -> None: def interest_payments(self) -> AsyncInterestPaymentsResourceWithStreamingResponse: return AsyncInterestPaymentsResourceWithStreamingResponse(self._simulations.interest_payments) + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: + return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) + @cached_property def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) @@ -945,10 +949,6 @@ def digital_wallet_token_requests(self) -> AsyncDigitalWalletTokenRequestsResour def pending_transactions(self) -> AsyncPendingTransactionsResourceWithStreamingResponse: return AsyncPendingTransactionsResourceWithStreamingResponse(self._simulations.pending_transactions) - @cached_property - def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingResponse: - return AsyncAccountTransfersResourceWithStreamingResponse(self._simulations.account_transfers) - @cached_property def ach_transfers(self) -> AsyncACHTransfersResourceWithStreamingResponse: return AsyncACHTransfersResourceWithStreamingResponse(self._simulations.ach_transfers) From feb7d1efa34b28ef4a136dde89ec10ded43d6f4a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 21:53:48 +0000 Subject: [PATCH 0825/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f93c4039e..d4bd34171 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.315.0" + ".": "0.316.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9a86e5236..f4fbcd694 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.315.0" +version = "0.316.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ea05acb79..21aa1fec6 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.315.0" # x-release-please-version +__version__ = "0.316.0" # x-release-please-version From 7c21b6c0212a70aae8bd81bebf070150d197f1f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 22:19:43 +0000 Subject: [PATCH 0826/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 24 ++++++++++++++-------- src/increase/types/entity_update_params.py | 24 ++++++++++++++++++---- 3 files changed, 38 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 11b34180d..675fc1658 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e74540ca75fc4e7a0e28d2c41c53c6131dff74e1e3c1472601db19509bb77451.yml -openapi_spec_hash: 4030ac2965b556670d1b427ffc5c554b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a91424eba488276a87e396d4172d7381d22e9ff38639a98aafdbcc2f8b53d000.yml +openapi_spec_hash: 52c779ffbbb1e3a46738d374849ca92b config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index ebb7f995d..43a9af62c 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -212,11 +212,14 @@ def update( Args: entity_id: The entity identifier. - corporation: Details of the corporation entity to update. + corporation: Details of the corporation entity to update. If you specify this parameter and + the entity is not a corporation, the request will fail. - government_authority: Details of the government authority entity to update. + government_authority: Details of the government authority entity to update. If you specify this + parameter and the entity is not a government authority, the request will fail. - natural_person: Details of the natural person entity to update. + natural_person: Details of the natural person entity to update. If you specify this parameter + and the entity is not a natural person, the request will fail. risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. @@ -224,7 +227,8 @@ def update( third_party_verification: A reference to data stored in a third-party verification service. Your integration may or may not use this field. - trust: Details of the trust entity to update. + trust: Details of the trust entity to update. If you specify this parameter and the + entity is not a trust, the request will fail. extra_headers: Send extra headers @@ -848,11 +852,14 @@ async def update( Args: entity_id: The entity identifier. - corporation: Details of the corporation entity to update. + corporation: Details of the corporation entity to update. If you specify this parameter and + the entity is not a corporation, the request will fail. - government_authority: Details of the government authority entity to update. + government_authority: Details of the government authority entity to update. If you specify this + parameter and the entity is not a government authority, the request will fail. - natural_person: Details of the natural person entity to update. + natural_person: Details of the natural person entity to update. If you specify this parameter + and the entity is not a natural person, the request will fail. risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. @@ -860,7 +867,8 @@ async def update( third_party_verification: A reference to data stored in a third-party verification service. Your integration may or may not use this field. - trust: Details of the trust entity to update. + trust: Details of the trust entity to update. If you specify this parameter and the + entity is not a trust, the request will fail. extra_headers: Send extra headers diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index e3d6416b5..ef04ae33a 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -21,13 +21,25 @@ class EntityUpdateParams(TypedDict, total=False): corporation: Corporation - """Details of the corporation entity to update.""" + """Details of the corporation entity to update. + + If you specify this parameter and the entity is not a corporation, the request + will fail. + """ government_authority: GovernmentAuthority - """Details of the government authority entity to update.""" + """Details of the government authority entity to update. + + If you specify this parameter and the entity is not a government authority, the + request will fail. + """ natural_person: NaturalPerson - """Details of the natural person entity to update.""" + """Details of the natural person entity to update. + + If you specify this parameter and the entity is not a natural person, the + request will fail. + """ risk_rating: RiskRating """ @@ -42,7 +54,11 @@ class EntityUpdateParams(TypedDict, total=False): """ trust: Trust - """Details of the trust entity to update.""" + """Details of the trust entity to update. + + If you specify this parameter and the entity is not a trust, the request will + fail. + """ class Corporation(TypedDict, total=False): From 5081692002f63c365211aaa64342ffc12e372ccb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Sep 2025 22:22:29 +0000 Subject: [PATCH 0827/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d4bd34171..34760ea6d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.316.0" + ".": "0.317.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f4fbcd694..44561b6f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.316.0" +version = "0.317.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 21aa1fec6..227708d28 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.316.0" # x-release-please-version +__version__ = "0.317.0" # x-release-please-version From b9c1a8fa1bef7d4d9001f7d0f6082c48c2ed4cfe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 15:13:26 +0000 Subject: [PATCH 0828/1325] feat(api): api update --- .stats.yml | 4 +-- .../resources/physical_card_profiles.py | 30 +++++++++++++++++++ .../physical_card_profile_create_params.py | 16 +++++++++- .../test_physical_card_profiles.py | 4 +++ 4 files changed, 51 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 675fc1658..09d98d352 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a91424eba488276a87e396d4172d7381d22e9ff38639a98aafdbcc2f8b53d000.yml -openapi_spec_hash: 52c779ffbbb1e3a46738d374849ca92b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-98bb100223960756975a05c102fb497e2dba7857b02bec559ebc60d6c38d78e4.yml +openapi_spec_hash: b19fcec9237b7b3394002cfb662b391f config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 45e1720ae..bdb2092ef 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..types import ( @@ -54,8 +56,10 @@ def create( description: str, front_image_file_id: str, program_id: str, + back_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, card_stock_reference: str | NotGiven = NOT_GIVEN, carrier_stock_reference: str | NotGiven = NOT_GIVEN, + front_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -79,12 +83,22 @@ def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + back_color: The color of the text on the back of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. Only used if you've ordered card stock separately. carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. Only used if you've ordered carrier stock separately. + front_color: The color of the design on the front of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -107,8 +121,10 @@ def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "back_color": back_color, "card_stock_reference": card_stock_reference, "carrier_stock_reference": carrier_stock_reference, + "front_color": front_color, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, @@ -364,8 +380,10 @@ async def create( description: str, front_image_file_id: str, program_id: str, + back_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, card_stock_reference: str | NotGiven = NOT_GIVEN, carrier_stock_reference: str | NotGiven = NOT_GIVEN, + front_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -389,12 +407,22 @@ async def create( program_id: The identifier for the Program that this Physical Card Profile falls under. + back_color: The color of the text on the back of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. Only used if you've ordered card stock separately. carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. Only used if you've ordered carrier stock separately. + front_color: The color of the design on the front of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -417,8 +445,10 @@ async def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, + "back_color": back_color, "card_stock_reference": card_stock_reference, "carrier_stock_reference": carrier_stock_reference, + "front_color": front_color, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index 1b854d0b1..96af44dd6 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["PhysicalCardProfileCreateParams", "FrontText"] @@ -23,6 +23,13 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): program_id: Required[str] """The identifier for the Program that this Physical Card Profile falls under.""" + back_color: Literal["black", "white"] + """The color of the text on the back of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + """ + card_stock_reference: str """A reference ID provided by the fulfillment provider for the card stock used. @@ -35,6 +42,13 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): Only used if you've ordered carrier stock separately. """ + front_color: Literal["black", "white"] + """The color of the design on the front of the card. Defaults to "black". + + - `black` - Black personalization color. + - `white` - White personalization color. + """ + front_text: FrontText """Text printed on the front of the card. diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index b2b51e9e1..147fa8509 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -39,8 +39,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", + back_color="black", card_stock_reference="x", carrier_stock_reference="x", + front_color="black", front_text={ "line1": "x", "line2": "x", @@ -276,8 +278,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", + back_color="black", card_stock_reference="x", carrier_stock_reference="x", + front_color="black", front_text={ "line1": "x", "line2": "x", From 1e247d75977d114ad6cf57aaffa120010bb87e09 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 7 Sep 2025 15:16:10 +0000 Subject: [PATCH 0829/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 34760ea6d..bd0a4378e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.317.0" + ".": "0.318.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 44561b6f4..ffcc4e157 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.317.0" +version = "0.318.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 227708d28..a495c89e4 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.317.0" # x-release-please-version +__version__ = "0.318.0" # x-release-please-version From c2144c72de3141ab325330decc9b645210f65ba1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:35:44 +0000 Subject: [PATCH 0830/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/entity_update_params.py | 108 +++++++++++++++++++++ tests/api_resources/test_entities.py | 88 +++++++++++++++-- 3 files changed, 190 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09d98d352..94d9b0a5f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-98bb100223960756975a05c102fb497e2dba7857b02bec559ebc60d6c38d78e4.yml -openapi_spec_hash: b19fcec9237b7b3394002cfb662b391f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-17c08bdd306c9bcf444a3d09db8878f633ec996cd2f091e1173742f6f3ffc5a5.yml +openapi_spec_hash: 70c131085fc22b07df6bac0f70fcf468 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index ef04ae33a..78cb203fc 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -11,11 +11,15 @@ __all__ = [ "EntityUpdateParams", "Corporation", + "CorporationAddress", "GovernmentAuthority", + "GovernmentAuthorityAddress", "NaturalPerson", + "NaturalPersonAddress", "RiskRating", "ThirdPartyVerification", "Trust", + "TrustAddress", ] @@ -61,17 +65,95 @@ class EntityUpdateParams(TypedDict, total=False): """ +class CorporationAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + class Corporation(TypedDict, total=False): + address: CorporationAddress + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + name: str """The legal name of the corporation.""" +class GovernmentAuthorityAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + class GovernmentAuthority(TypedDict, total=False): + address: GovernmentAuthorityAddress + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + name: str """The legal name of the government authority.""" +class NaturalPersonAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + class NaturalPerson(TypedDict, total=False): + address: NaturalPersonAddress + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + name: str """The legal name of the natural person.""" @@ -105,6 +187,32 @@ class ThirdPartyVerification(TypedDict, total=False): """ +class TrustAddress(TypedDict, total=False): + city: Required[str] + """The city of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + state: Required[str] + """ + The two-letter United States Postal Service (USPS) abbreviation for the state of + the address. + """ + + zip: Required[str] + """The ZIP code of the address.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + class Trust(TypedDict, total=False): + address: TrustAddress + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + name: str """The legal name of the trust.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 936a045a8..c304a3670 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -347,9 +347,36 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: entity = client.entities.update( entity_id="entity_n8y8tnk2p9339ti393yi", - corporation={"name": "x"}, - government_authority={"name": "x"}, - natural_person={"name": "x"}, + corporation={ + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + "line2": "Unit 2", + }, + "name": "x", + }, + government_authority={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, + natural_person={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, risk_rating={ "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", @@ -358,7 +385,16 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "reference": "x", "vendor": "alloy", }, - trust={"name": "x"}, + trust={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, ) assert_matches_type(Entity, entity, path=["response"]) @@ -1236,9 +1272,36 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update( entity_id="entity_n8y8tnk2p9339ti393yi", - corporation={"name": "x"}, - government_authority={"name": "x"}, - natural_person={"name": "x"}, + corporation={ + "address": { + "city": "New York", + "line1": "33 Liberty Street", + "state": "NY", + "zip": "10045", + "line2": "Unit 2", + }, + "name": "x", + }, + government_authority={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, + natural_person={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, risk_rating={ "rated_at": parse_datetime("2020-01-31T23:59:59Z"), "rating": "low", @@ -1247,7 +1310,16 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "reference": "x", "vendor": "alloy", }, - trust={"name": "x"}, + trust={ + "address": { + "city": "x", + "line1": "x", + "state": "x", + "zip": "x", + "line2": "x", + }, + "name": "x", + }, ) assert_matches_type(Entity, entity, path=["response"]) From 82edafb177b8363fbfc51029cb1510cc5b9d4cb7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 17:38:53 +0000 Subject: [PATCH 0831/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bd0a4378e..ce7418761 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.318.0" + ".": "0.319.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ffcc4e157..52e59d213 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.318.0" +version = "0.319.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a495c89e4..33d8f0bd6 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.318.0" # x-release-please-version +__version__ = "0.319.0" # x-release-please-version From 1d01acd0284aab57d6cf0fa9d1b26a3c2685cd1a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:39:07 +0000 Subject: [PATCH 0832/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_update_params.py | 8 ++++++++ tests/api_resources/test_entities.py | 2 ++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 94d9b0a5f..8b661a7b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-17c08bdd306c9bcf444a3d09db8878f633ec996cd2f091e1173742f6f3ffc5a5.yml -openapi_spec_hash: 70c131085fc22b07df6bac0f70fcf468 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-438f2a4d4f35670ae5692a6a9a36711af7944ac975bf309a6d50c02a28b13a70.yml +openapi_spec_hash: e4930cc26be238707449872070607e64 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 78cb203fc..184336c8a 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -92,6 +92,14 @@ class Corporation(TypedDict, total=False): Mail receiving locations like PO Boxes and PMB's are disallowed. """ + industry_code: str + """ + The North American Industry Classification System (NAICS) code for the + corporation's primary line of business. This is a number, like `5132` for + `Software Publishers`. A full list of classification codes is available + [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). + """ + name: str """The legal name of the corporation.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index c304a3670..082ee9311 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -355,6 +355,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "zip": "10045", "line2": "Unit 2", }, + "industry_code": "x", "name": "x", }, government_authority={ @@ -1280,6 +1281,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "zip": "10045", "line2": "Unit 2", }, + "industry_code": "x", "name": "x", }, government_authority={ From fd70a5c131ef9fbcd67d54cb81404f878f6584bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:42:07 +0000 Subject: [PATCH 0833/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ce7418761..da9608d70 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.319.0" + ".": "0.320.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 52e59d213..93edf5806 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.319.0" +version = "0.320.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 33d8f0bd6..fd065e106 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.319.0" # x-release-please-version +__version__ = "0.320.0" # x-release-please-version From 635252c5fcf15118a27639578753471f0c3d4363 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 18:57:52 +0000 Subject: [PATCH 0834/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 20 ++++++++++++-------- src/increase/types/entity.py | 13 +++++++------ src/increase/types/entity_create_params.py | 13 +++++++------ src/increase/types/entity_update_params.py | 13 +++++++------ 5 files changed, 35 insertions(+), 28 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8b661a7b8..dc28c5ae5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-438f2a4d4f35670ae5692a6a9a36711af7944ac975bf309a6d50c02a28b13a70.yml -openapi_spec_hash: e4930cc26be238707449872070607e64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5d85239e5d724254ab22d922c6cad05e1c361c791ef4a578e1165158bd967753.yml +openapi_spec_hash: b2c90485c02d643ad09954f4d88dbc25 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 43a9af62c..b3f038161 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -110,8 +110,9 @@ def create( supplemental_documents: Additional documentation associated with the entity. - third_party_verification: A reference to data stored in a third-party verification service. Your - integration may or may not use this field. + third_party_verification: If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. trust: Details of the trust entity to create. Required if `structure` is equal to `trust`. @@ -224,8 +225,9 @@ def update( risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. - third_party_verification: A reference to data stored in a third-party verification service. Your - integration may or may not use this field. + third_party_verification: If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. trust: Details of the trust entity to update. If you specify this parameter and the entity is not a trust, the request will fail. @@ -750,8 +752,9 @@ async def create( supplemental_documents: Additional documentation associated with the entity. - third_party_verification: A reference to data stored in a third-party verification service. Your - integration may or may not use this field. + third_party_verification: If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. trust: Details of the trust entity to create. Required if `structure` is equal to `trust`. @@ -864,8 +867,9 @@ async def update( risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. - third_party_verification: A reference to data stored in a third-party verification service. Your - integration may or may not use this field. + third_party_verification: If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. trust: Details of the trust entity to update. If you specify this parameter and the entity is not a trust, the request will fail. diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 02e494585..2bd94c198 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -351,9 +351,9 @@ class RiskRating(BaseModel): rating: Literal["low", "medium", "high"] """The rating given to this entity. - - `low` - Low - - `medium` - Medium - - `high` - High + - `low` - Minimal risk of involvement in financial crime. + - `medium` - Moderate risk of involvement in financial crime. + - `high` - Elevated risk of involvement in financial crime. """ @@ -633,9 +633,10 @@ class Entity(BaseModel): """ third_party_verification: Optional[ThirdPartyVerification] = None - """A reference to data stored in a third-party verification service. - - Your integration may or may not use this field. + """ + If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. """ trust: Optional[Trust] = None diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 6f0b97f7c..296ac689a 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -106,9 +106,10 @@ class EntityCreateParams(TypedDict, total=False): """Additional documentation associated with the entity.""" third_party_verification: ThirdPartyVerification - """A reference to data stored in a third-party verification service. - - Your integration may or may not use this field. + """ + If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. """ trust: Trust @@ -700,9 +701,9 @@ class RiskRating(TypedDict, total=False): rating: Required[Literal["low", "medium", "high"]] """The rating given to this entity. - - `low` - Low - - `medium` - Medium - - `high` - High + - `low` - Minimal risk of involvement in financial crime. + - `medium` - Moderate risk of involvement in financial crime. + - `high` - Elevated risk of involvement in financial crime. """ diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 184336c8a..532b73717 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -52,9 +52,10 @@ class EntityUpdateParams(TypedDict, total=False): """ third_party_verification: ThirdPartyVerification - """A reference to data stored in a third-party verification service. - - Your integration may or may not use this field. + """ + If you are using a third-party service for identity verification, you can use + this field to associate this Entity with the identifier that represents them in + that service. """ trust: Trust @@ -176,9 +177,9 @@ class RiskRating(TypedDict, total=False): rating: Required[Literal["low", "medium", "high"]] """The rating given to this entity. - - `low` - Low - - `medium` - Medium - - `high` - High + - `low` - Minimal risk of involvement in financial crime. + - `medium` - Moderate risk of involvement in financial crime. + - `high` - Elevated risk of involvement in financial crime. """ From 3a29067282a31dfeefdc1edb633927864410b82a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 19:00:44 +0000 Subject: [PATCH 0835/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index da9608d70..db5791310 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.320.0" + ".": "0.321.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 93edf5806..11d27c3bf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.320.0" +version = "0.321.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fd065e106..79980d54f 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.320.0" # x-release-please-version +__version__ = "0.321.0" # x-release-please-version From 6ffd3d2dc2e1a59c3d75608e3bf32c023e389775 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 19:19:03 +0000 Subject: [PATCH 0836/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 12 ++++++++++++ src/increase/types/entity_update_params.py | 7 +++++++ tests/api_resources/test_entities.py | 2 ++ 4 files changed, 23 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index dc28c5ae5..0ece17005 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5d85239e5d724254ab22d922c6cad05e1c361c791ef4a578e1165158bd967753.yml -openapi_spec_hash: b2c90485c02d643ad09954f4d88dbc25 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-387c9e5ff5305d470ddf290a424b9d0f087fa295b56cf82265f2dfe8355a589a.yml +openapi_spec_hash: 2c624b8535be90329028f6b10281a313 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index b3f038161..a46aad2b0 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -194,6 +194,7 @@ def update( entity_id: str, *, corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, + details_confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, @@ -216,6 +217,10 @@ def update( corporation: Details of the corporation entity to update. If you specify this parameter and the entity is not a corporation, the request will fail. + details_confirmed_at: When your user last confirmed the Entity's details. Depending on your program, + you may be required to affirmatively confirm details with your users on an + annual basis. + government_authority: Details of the government authority entity to update. If you specify this parameter and the entity is not a government authority, the request will fail. @@ -249,6 +254,7 @@ def update( body=maybe_transform( { "corporation": corporation, + "details_confirmed_at": details_confirmed_at, "government_authority": government_authority, "natural_person": natural_person, "risk_rating": risk_rating, @@ -836,6 +842,7 @@ async def update( entity_id: str, *, corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, + details_confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, @@ -858,6 +865,10 @@ async def update( corporation: Details of the corporation entity to update. If you specify this parameter and the entity is not a corporation, the request will fail. + details_confirmed_at: When your user last confirmed the Entity's details. Depending on your program, + you may be required to affirmatively confirm details with your users on an + annual basis. + government_authority: Details of the government authority entity to update. If you specify this parameter and the entity is not a government authority, the request will fail. @@ -891,6 +902,7 @@ async def update( body=await async_maybe_transform( { "corporation": corporation, + "details_confirmed_at": details_confirmed_at, "government_authority": government_authority, "natural_person": natural_person, "risk_rating": risk_rating, diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 532b73717..28b57a7e8 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -31,6 +31,13 @@ class EntityUpdateParams(TypedDict, total=False): will fail. """ + details_confirmed_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """When your user last confirmed the Entity's details. + + Depending on your program, you may be required to affirmatively confirm details + with your users on an annual basis. + """ + government_authority: GovernmentAuthority """Details of the government authority entity to update. diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 082ee9311..192de0078 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -358,6 +358,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "industry_code": "x", "name": "x", }, + details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ "address": { "city": "x", @@ -1284,6 +1285,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "industry_code": "x", "name": "x", }, + details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ "address": { "city": "x", From ad58e18f3f0d8e4af52f0f867fc356a704fa7dc4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Sep 2025 19:21:57 +0000 Subject: [PATCH 0837/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index db5791310..4942d18ad 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.321.0" + ".": "0.322.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 11d27c3bf..d5d79156c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.321.0" +version = "0.322.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 79980d54f..540af3028 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.321.0" # x-release-please-version +__version__ = "0.322.0" # x-release-please-version From a5ac803c959058dc9aefce9233c370fd78180264 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:20:28 +0000 Subject: [PATCH 0838/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 39 ++++---- src/increase/types/declined_transaction.py | 13 +-- src/increase/types/pending_transaction.py | 13 +-- src/increase/types/real_time_decision.py | 25 ++++-- .../types/real_time_decision_action_params.py | 90 +++++++++++++++++++ .../api_resources/test_real_time_decisions.py | 14 +++ 7 files changed, 160 insertions(+), 38 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ece17005..cb9d34e48 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-387c9e5ff5305d470ddf290a424b9d0f087fa295b56cf82265f2dfe8355a589a.yml -openapi_spec_hash: 2c624b8535be90329028f6b10281a313 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10d8a2e25ff71893e14a81477ef7dbbf761af689e6ff074e13da10729a75cc9d.yml +openapi_spec_hash: 77a4f7c4b166e73a84c3b7f4e177631c config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 72e58564f..2ce2d50ad 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -582,23 +582,24 @@ class ElementCardAuthorizationVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ @@ -1149,23 +1150,24 @@ class ElementCardDeclineVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ @@ -3342,23 +3344,24 @@ class ElementCardValidationVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index d95e08302..07d2c2539 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -430,23 +430,24 @@ class SourceCardDeclineVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 1204107e8..4b2bc6a96 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -380,23 +380,24 @@ class SourceCardAuthorizationVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 19b4f1d34..1f73b1556 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -21,6 +21,7 @@ "CardAuthorizationAdditionalAmountsTransit", "CardAuthorizationAdditionalAmountsUnknown", "CardAuthorizationAdditionalAmountsVision", + "CardAuthorizationDecline", "CardAuthorizationNetworkDetails", "CardAuthorizationNetworkDetailsVisa", "CardAuthorizationNetworkIdentifiers", @@ -214,6 +215,11 @@ class CardAuthorizationAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class CardAuthorizationDecline(BaseModel): + reason: str + """The reason the authorization was declined.""" + + class CardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -422,23 +428,24 @@ class CardAuthorizationVerificationCardholderAddress(BaseModel): result: Literal[ "not_checked", - "postal_code_match_address_not_checked", "postal_code_match_address_no_match", "postal_code_no_match_address_match", "match", "no_match", + "postal_code_match_address_not_checked", ] """The address verification result returned to the card network. - - `not_checked` - No address was provided in the authorization request. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. + - `not_checked` - No address information was provided in the authorization + request. - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match. + address does not match or was not provided. - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches. + street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) """ @@ -477,6 +484,12 @@ class CardAuthorization(BaseModel): - `decline` - Decline the authorization. """ + decline: Optional[CardAuthorizationDecline] = None + """Present if and only if `decision` is `decline`. + + Contains information related to the reason the authorization was declined. + """ + digital_wallet_token_id: Optional[str] = None """ If the authorization was made via a Digital Wallet Token (such as an Apple Pay diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 832f8d253..c237c1b8f 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -9,6 +9,9 @@ "CardAuthentication", "CardAuthenticationChallenge", "CardAuthorization", + "CardAuthorizationApproval", + "CardAuthorizationApprovalCardholderAddressVerificationResult", + "CardAuthorizationDecline", "DigitalWalletAuthentication", "DigitalWalletAuthenticationSuccess", "DigitalWalletToken", @@ -73,6 +76,73 @@ class CardAuthenticationChallenge(TypedDict, total=False): """ +class CardAuthorizationApprovalCardholderAddressVerificationResult(TypedDict, total=False): + line1: Required[Literal["match", "no_match"]] + """Your decision on the address line of the provided address. + + - `match` - The cardholder address verification result matches the address + provided by the merchant. + - `no_match` - The cardholder address verification result does not match the + address provided by the merchant. + """ + + postal_code: Required[Literal["match", "no_match"]] + """Your decision on the postal code of the provided address. + + - `match` - The cardholder address verification result matches the address + provided by the merchant. + - `no_match` - The cardholder address verification result does not match the + address provided by the merchant. + """ + + +class CardAuthorizationApproval(TypedDict, total=False): + cardholder_address_verification_result: CardAuthorizationApprovalCardholderAddressVerificationResult + """Your decisions on whether or not each provided address component is a match. + + Your response here is evaluated against the customer's provided `postal_code` + and `line1`, and an appropriate network response is generated. For example, if + you would like to approve all transactions for a given card, you can submit + `match` for both `postal_code` and `line1` and Increase will generate an + approval with an Address Verification System (AVS) code that will match all of + the available address information, or will report that no check was performed if + no address information is available. If you do not provide a response, the + address verification result will be calculated by Increase using the available + address information available on the card. If none is available, Increase will + report that no check was performed. + """ + + +class CardAuthorizationDecline(TypedDict, total=False): + reason: Required[ + Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + ] + """The reason the card authorization was declined. + + This translates to a specific decline code that is sent to the card network. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ + + class CardAuthorization(TypedDict, total=False): decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined. @@ -81,6 +151,20 @@ class CardAuthorization(TypedDict, total=False): - `decline` - Decline the authorization. """ + approval: CardAuthorizationApproval + """ + If your application approves the authorization, this contains metadata about + your decision to approve. Your response here is advisory to the acquiring bank. + The bank may choose to reverse the authorization if you approve the transaction + but indicate the address does not match. + """ + + decline: CardAuthorizationDecline + """ + If your application declines the authorization, this contains details about the + decline. + """ + decline_reason: Literal[ "insufficient_funds", "transaction_never_allowed", @@ -92,6 +176,8 @@ class CardAuthorization(TypedDict, total=False): """The reason the card authorization was declined. This translates to a specific decline code that is sent to the card network. + This field is deprecated, please transition to using the `decline` object as + this field will be removed in a future release. - `insufficient_funds` - The cardholder does not have sufficient funds to cover the transaction. The merchant may attempt to process the transaction again. @@ -130,6 +216,10 @@ class DigitalWalletAuthentication(TypedDict, total=False): """ success: DigitalWalletAuthenticationSuccess + """ + If your application was able to deliver the one-time passcode, this contains + metadata about the delivery. Exactly one of `phone` or `email` must be provided. + """ class DigitalWalletTokenApproval(TypedDict, total=False): diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 1cbb666be..90365816b 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -70,6 +70,13 @@ def test_method_action_with_all_params(self, client: Increase) -> None: card_authentication_challenge={"result": "success"}, card_authorization={ "decision": "approve", + "approval": { + "cardholder_address_verification_result": { + "line1": "match", + "postal_code": "no_match", + } + }, + "decline": {"reason": "insufficient_funds"}, "decline_reason": "insufficient_funds", }, digital_wallet_authentication={ @@ -179,6 +186,13 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) card_authentication_challenge={"result": "success"}, card_authorization={ "decision": "approve", + "approval": { + "cardholder_address_verification_result": { + "line1": "match", + "postal_code": "no_match", + } + }, + "decline": {"reason": "insufficient_funds"}, "decline_reason": "insufficient_funds", }, digital_wallet_authentication={ From d9424ffc91cad4a4331d97457f32f6e148297034 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:24:10 +0000 Subject: [PATCH 0839/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4942d18ad..eb7cbd88c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.322.0" + ".": "0.323.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d5d79156c..2e3370f09 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.322.0" +version = "0.323.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 540af3028..260e926a6 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.322.0" # x-release-please-version +__version__ = "0.323.0" # x-release-please-version From 0789cc4d09d267a5d8256ef1f06ed0a53bfe22b2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:56:37 +0000 Subject: [PATCH 0840/1325] feat(api): api update --- .stats.yml | 4 +-- .../types/real_time_decision_action_params.py | 28 ------------------- .../api_resources/test_real_time_decisions.py | 2 -- 3 files changed, 2 insertions(+), 32 deletions(-) diff --git a/.stats.yml b/.stats.yml index cb9d34e48..7efaaa57e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10d8a2e25ff71893e14a81477ef7dbbf761af689e6ff074e13da10729a75cc9d.yml -openapi_spec_hash: 77a4f7c4b166e73a84c3b7f4e177631c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94d559b14c3611637885b103aa75adb26dff816369b1fdb758440e288d1ea83b.yml +openapi_spec_hash: 4e257b20b410526bc54fd6ced9db3a5d config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index c237c1b8f..a1e1d2887 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -165,34 +165,6 @@ class CardAuthorization(TypedDict, total=False): decline. """ - decline_reason: Literal[ - "insufficient_funds", - "transaction_never_allowed", - "exceeds_approval_limit", - "card_temporarily_disabled", - "suspected_fraud", - "other", - ] - """The reason the card authorization was declined. - - This translates to a specific decline code that is sent to the card network. - This field is deprecated, please transition to using the `decline` object as - this field will be removed in a future release. - - - `insufficient_funds` - The cardholder does not have sufficient funds to cover - the transaction. The merchant may attempt to process the transaction again. - - `transaction_never_allowed` - This type of transaction is not allowed for this - card. This transaction should not be retried. - - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's - approval limit. The merchant may attempt to process the transaction again. - - `card_temporarily_disabled` - The card has been temporarily disabled or not - yet activated. The merchant may attempt to process the transaction again. - - `suspected_fraud` - The transaction is suspected to be fraudulent. The - merchant may attempt to process the transaction again. - - `other` - The transaction was declined for another reason. The merchant may - attempt to process the transaction again. This should be used sparingly. - """ - class DigitalWalletAuthenticationSuccess(TypedDict, total=False): email: str diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 90365816b..eae0309ae 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -77,7 +77,6 @@ def test_method_action_with_all_params(self, client: Increase) -> None: } }, "decline": {"reason": "insufficient_funds"}, - "decline_reason": "insufficient_funds", }, digital_wallet_authentication={ "result": "success", @@ -193,7 +192,6 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) } }, "decline": {"reason": "insufficient_funds"}, - "decline_reason": "insufficient_funds", }, digital_wallet_authentication={ "result": "success", From 63143ccfbb12989538190bbd39d516083788480e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Sep 2025 19:59:42 +0000 Subject: [PATCH 0841/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index eb7cbd88c..1d84b5149 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.323.0" + ".": "0.324.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2e3370f09..cfe0471c2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.323.0" +version = "0.324.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 260e926a6..1c34ccef5 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.323.0" # x-release-please-version +__version__ = "0.324.0" # x-release-please-version From 5270a80ce7ed5c71dc95f91e778c2a5975a046d4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Sep 2025 19:37:02 +0000 Subject: [PATCH 0842/1325] chore(tests): simplify `get_platform` test `nest_asyncio` is archived and broken on some platforms so it's not worth keeping in our test suite. --- pyproject.toml | 1 - requirements-dev.lock | 1 - tests/test_client.py | 53 +++++-------------------------------------- 3 files changed, 6 insertions(+), 49 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index cfe0471c2..d725afae4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -56,7 +56,6 @@ dev-dependencies = [ "dirty-equals>=0.6.0", "importlib-metadata>=6.7.0", "rich>=13.7.1", - "nest_asyncio==1.6.0", "pytest-xdist>=3.6.1", ] diff --git a/requirements-dev.lock b/requirements-dev.lock index ab1226978..8269c8312 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -75,7 +75,6 @@ multidict==6.4.4 mypy==1.14.1 mypy-extensions==1.0.0 # via mypy -nest-asyncio==1.6.0 nodeenv==1.8.0 # via pyright nox==2023.4.22 diff --git a/tests/test_client.py b/tests/test_client.py index a80d5b47b..975d21c7d 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -6,13 +6,10 @@ import os import sys import json -import time import asyncio import inspect -import subprocess import tracemalloc from typing import Any, Union, cast -from textwrap import dedent from unittest import mock from typing_extensions import Literal @@ -23,14 +20,17 @@ from increase import Increase, AsyncIncrease, APIResponseValidationError from increase._types import Omit +from increase._utils import asyncify from increase._models import BaseModel, FinalRequestOptions from increase._exceptions import IncreaseError, APIStatusError, APITimeoutError, APIResponseValidationError from increase._base_client import ( DEFAULT_TIMEOUT, HTTPX_DEFAULT_TIMEOUT, BaseClient, + OtherPlatform, DefaultHttpxClient, DefaultAsyncHttpxClient, + get_platform, make_request_options, ) @@ -1719,50 +1719,9 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: assert response.http_request.headers.get("x-stainless-retry-count") == "42" - def test_get_platform(self) -> None: - # A previous implementation of asyncify could leave threads unterminated when - # used with nest_asyncio. - # - # Since nest_asyncio.apply() is global and cannot be un-applied, this - # test is run in a separate process to avoid affecting other tests. - test_code = dedent(""" - import asyncio - import nest_asyncio - import threading - - from increase._utils import asyncify - from increase._base_client import get_platform - - async def test_main() -> None: - result = await asyncify(get_platform)() - print(result) - for thread in threading.enumerate(): - print(thread.name) - - nest_asyncio.apply() - asyncio.run(test_main()) - """) - with subprocess.Popen( - [sys.executable, "-c", test_code], - text=True, - ) as process: - timeout = 10 # seconds - - start_time = time.monotonic() - while True: - return_code = process.poll() - if return_code is not None: - if return_code != 0: - raise AssertionError("calling get_platform using asyncify resulted in a non-zero exit code") - - # success - break - - if time.monotonic() - start_time > timeout: - process.kill() - raise AssertionError("calling get_platform using asyncify resulted in a hung process") - - time.sleep(0.1) + async def test_get_platform(self) -> None: + platform = await asyncify(get_platform)() + assert isinstance(platform, (str, OtherPlatform)) async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly From 4756676e888932ad9bd2ed9092f53728c581ab16 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:08:27 +0000 Subject: [PATCH 0843/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 16 ++++++++++++++++ .../types/pending_transaction_list_params.py | 1 + src/increase/types/transaction.py | 18 ++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 5 files changed, 38 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7efaaa57e..d9b2e1485 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94d559b14c3611637885b103aa75adb26dff816369b1fdb758440e288d1ea83b.yml -openapi_spec_hash: 4e257b20b410526bc54fd6ced9db3a5d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0099e03e7fa522327e05de8b00e0d0f8873c9267bbb39a29d22b2aa6bb571d16.yml +openapi_spec_hash: 8691ea0b11ed2570986fadb52e6b87db config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 4b2bc6a96..2a1c19772 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -31,6 +31,7 @@ "SourceCardPushTransferInstruction", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", + "SourceFedNowTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", @@ -662,6 +663,11 @@ class SourceCheckTransferInstruction(BaseModel): """The identifier of the Check Transfer that led to this Pending Transaction.""" +class SourceFedNowTransferInstruction(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Pending Transaction.""" + + class SourceInboundFundsHold(BaseModel): amount: int """The held amount in the minor unit of the account's currency. @@ -794,6 +800,7 @@ class Source(BaseModel): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", + "fed_now_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", @@ -818,6 +825,8 @@ class Source(BaseModel): the `check_deposit_instruction` object. - `check_transfer_instruction` - Check Transfer Instruction: details will be under the `check_transfer_instruction` object. + - `fed_now_transfer_instruction` - FedNow Transfer Instruction: details will be + under the `fed_now_transfer_instruction` object. - `inbound_funds_hold` - Inbound Funds Hold: details will be under the `inbound_funds_hold` object. - `user_initiated_hold` - User Initiated Hold: details will be under the @@ -851,6 +860,13 @@ class Source(BaseModel): equal to `check_transfer_instruction`. """ + fed_now_transfer_instruction: Optional[SourceFedNowTransferInstruction] = None + """A FedNow Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `fed_now_transfer_instruction`. + """ + inbound_funds_hold: Optional[SourceInboundFundsHold] = None """An Inbound Funds Hold object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index eba8f0afe..04a2b98aa 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -44,6 +44,7 @@ class PendingTransactionListParams(TypedDict, total=False): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", + "fed_now_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 3439507df..e87bbd7b4 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -46,6 +46,7 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", + "SourceFedNowTransferAcknowledgement", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", @@ -1869,6 +1870,11 @@ class SourceCheckTransferDeposit(BaseModel): """ +class SourceFedNowTransferAcknowledgement(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Transaction.""" + + class SourceFeePayment(BaseModel): amount: int """The amount in the minor unit of the transaction's currency. @@ -2434,6 +2440,7 @@ class Source(BaseModel): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", + "fed_now_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", @@ -2485,6 +2492,8 @@ class Source(BaseModel): the `check_deposit_acceptance` object. - `check_deposit_return` - Check Deposit Return: details will be under the `check_deposit_return` object. + - `fed_now_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details + will be under the `fed_now_transfer_acknowledgement` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. @@ -2558,6 +2567,15 @@ class Source(BaseModel): types of checks are not pre-registered. """ + fed_now_transfer_acknowledgement: Optional[SourceFedNowTransferAcknowledgement] = None + """A FedNow Transfer Acknowledgement object. + + This field will be present in the JSON response if and only if `category` is + equal to `fed_now_transfer_acknowledgement`. A FedNow Transfer Acknowledgement + is created when a FedNow Transfer sent from Increase is acknowledged by the + receiving bank. + """ + fee_payment: Optional[SourceFeePayment] = None """A Fee Payment object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 9ad7e745f..39e3955a0 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,6 +53,7 @@ class TransactionListParams(TypedDict, total=False): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", + "fed_now_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", From 185a12a1047f5c80b9f0b5823b2c1de17ffb8187 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 12 Sep 2025 21:11:12 +0000 Subject: [PATCH 0844/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1d84b5149..3f4f69757 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.324.0" + ".": "0.325.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d725afae4..ed8d575e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.324.0" +version = "0.325.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1c34ccef5..9571db7ec 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.324.0" # x-release-please-version +__version__ = "0.325.0" # x-release-please-version From b24ffc81090aa09130112897abab120afc00e9c6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 21:13:37 +0000 Subject: [PATCH 0845/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 14 +++++++------- .../types/pending_transaction_list_params.py | 2 +- src/increase/types/transaction.py | 16 ++++++++-------- src/increase/types/transaction_list_params.py | 2 +- 5 files changed, 19 insertions(+), 19 deletions(-) diff --git a/.stats.yml b/.stats.yml index d9b2e1485..3b8e65cd7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0099e03e7fa522327e05de8b00e0d0f8873c9267bbb39a29d22b2aa6bb571d16.yml -openapi_spec_hash: 8691ea0b11ed2570986fadb52e6b87db +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-805a499f2eaf8dde9967c23bfceac96d22e583e929be7e62574442f1b2546844.yml +openapi_spec_hash: 362e3065076f1f47f73ed7306236b5f6 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 2a1c19772..42543f655 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -31,7 +31,7 @@ "SourceCardPushTransferInstruction", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", - "SourceFedNowTransferInstruction", + "SourceFednowTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", "SourceRealTimePaymentsTransferInstruction", @@ -663,7 +663,7 @@ class SourceCheckTransferInstruction(BaseModel): """The identifier of the Check Transfer that led to this Pending Transaction.""" -class SourceFedNowTransferInstruction(BaseModel): +class SourceFednowTransferInstruction(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Pending Transaction.""" @@ -800,7 +800,7 @@ class Source(BaseModel): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", - "fed_now_transfer_instruction", + "fednow_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", @@ -825,8 +825,8 @@ class Source(BaseModel): the `check_deposit_instruction` object. - `check_transfer_instruction` - Check Transfer Instruction: details will be under the `check_transfer_instruction` object. - - `fed_now_transfer_instruction` - FedNow Transfer Instruction: details will be - under the `fed_now_transfer_instruction` object. + - `fednow_transfer_instruction` - FedNow Transfer Instruction: details will be + under the `fednow_transfer_instruction` object. - `inbound_funds_hold` - Inbound Funds Hold: details will be under the `inbound_funds_hold` object. - `user_initiated_hold` - User Initiated Hold: details will be under the @@ -860,11 +860,11 @@ class Source(BaseModel): equal to `check_transfer_instruction`. """ - fed_now_transfer_instruction: Optional[SourceFedNowTransferInstruction] = None + fednow_transfer_instruction: Optional[SourceFednowTransferInstruction] = None """A FedNow Transfer Instruction object. This field will be present in the JSON response if and only if `category` is - equal to `fed_now_transfer_instruction`. + equal to `fednow_transfer_instruction`. """ inbound_funds_hold: Optional[SourceInboundFundsHold] = None diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 04a2b98aa..49494bc33 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -44,7 +44,7 @@ class PendingTransactionListParams(TypedDict, total=False): "card_authorization", "check_deposit_instruction", "check_transfer_instruction", - "fed_now_transfer_instruction", + "fednow_transfer_instruction", "inbound_funds_hold", "user_initiated_hold", "real_time_payments_transfer_instruction", diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index e87bbd7b4..a684422d0 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -46,7 +46,7 @@ "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", "SourceCheckTransferDeposit", - "SourceFedNowTransferAcknowledgement", + "SourceFednowTransferAcknowledgement", "SourceFeePayment", "SourceInboundACHTransfer", "SourceInboundACHTransferAddenda", @@ -1870,7 +1870,7 @@ class SourceCheckTransferDeposit(BaseModel): """ -class SourceFedNowTransferAcknowledgement(BaseModel): +class SourceFednowTransferAcknowledgement(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" @@ -2440,7 +2440,7 @@ class Source(BaseModel): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", - "fed_now_transfer_acknowledgement", + "fednow_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", @@ -2492,8 +2492,8 @@ class Source(BaseModel): the `check_deposit_acceptance` object. - `check_deposit_return` - Check Deposit Return: details will be under the `check_deposit_return` object. - - `fed_now_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details - will be under the `fed_now_transfer_acknowledgement` object. + - `fednow_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details + will be under the `fednow_transfer_acknowledgement` object. - `check_transfer_deposit` - Check Transfer Deposit: details will be under the `check_transfer_deposit` object. - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. @@ -2567,12 +2567,12 @@ class Source(BaseModel): types of checks are not pre-registered. """ - fed_now_transfer_acknowledgement: Optional[SourceFedNowTransferAcknowledgement] = None + fednow_transfer_acknowledgement: Optional[SourceFednowTransferAcknowledgement] = None """A FedNow Transfer Acknowledgement object. This field will be present in the JSON response if and only if `category` is - equal to `fed_now_transfer_acknowledgement`. A FedNow Transfer Acknowledgement - is created when a FedNow Transfer sent from Increase is acknowledged by the + equal to `fednow_transfer_acknowledgement`. A FedNow Transfer Acknowledgement is + created when a FedNow Transfer sent from Increase is acknowledged by the receiving bank. """ diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 39e3955a0..bc396b47b 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -53,7 +53,7 @@ class TransactionListParams(TypedDict, total=False): "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", - "fed_now_transfer_acknowledgement", + "fednow_transfer_acknowledgement", "check_transfer_deposit", "fee_payment", "inbound_ach_transfer", From e43de5598562bbf70a092b3211a0c3781b6c7b3d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 21:16:50 +0000 Subject: [PATCH 0846/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3f4f69757..6b2a97d56 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.325.0" + ".": "0.326.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ed8d575e9..f3a416ce8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.325.0" +version = "0.326.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9571db7ec..d92396e6c 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.325.0" # x-release-please-version +__version__ = "0.326.0" # x-release-please-version From a35cc3b82249701695ca81a861c15490884735b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Sep 2025 22:27:30 +0000 Subject: [PATCH 0847/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3b8e65cd7..3ee8a631b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-805a499f2eaf8dde9967c23bfceac96d22e583e929be7e62574442f1b2546844.yml -openapi_spec_hash: 362e3065076f1f47f73ed7306236b5f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-80f2ee3ed51184cb36974bdbeff5dfe4013205621cfbdd1f6a828a198c089e38.yml +openapi_spec_hash: 74143ea3713a05317b2c8b2332045953 config_hash: e1885b38eded054b77308a024c5d80cc From 202bf6d2bebb972bb9032190cfe8c8bd72ba8122 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 13:29:31 +0000 Subject: [PATCH 0848/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 8 ++++++++ src/increase/types/event.py | 4 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 4 ++++ src/increase/types/event_subscription_create_params.py | 4 ++++ 6 files changed, 24 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3ee8a631b..c27c54482 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-80f2ee3ed51184cb36974bdbeff5dfe4013205621cfbdd1f6a828a198c089e38.yml -openapi_spec_hash: 74143ea3713a05317b2c8b2332045953 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e81b9b39563d895c47a1eceb9fd7cac6bc3f8e6f21c57c1d01ae2cdf360b73ce.yml +openapi_spec_hash: 9eee6e29a9d53623d380e8afae9ef482 config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 9ffdd354b..bd5ec71e5 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -90,6 +90,8 @@ def create( "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", @@ -225,6 +227,8 @@ def create( - `export.updated` - Occurs whenever an Export is updated. - `external_account.created` - Occurs whenever an External Account is created. - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - `file.created` - Occurs whenever a File is created. - `group.updated` - Occurs whenever a Group is updated. - `group.heartbeat` - Increase may send webhooks with this category to see if a @@ -575,6 +579,8 @@ async def create( "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", @@ -710,6 +716,8 @@ async def create( - `export.updated` - Occurs whenever an Export is updated. - `external_account.created` - Occurs whenever an External Account is created. - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - `file.created` - Occurs whenever a File is created. - `group.updated` - Occurs whenever a Group is updated. - `group.heartbeat` - Increase may send webhooks with this category to see if a diff --git a/src/increase/types/event.py b/src/increase/types/event.py index b0f8da02c..edd012456 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -59,6 +59,8 @@ class Event(BaseModel): "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", @@ -177,6 +179,8 @@ class Event(BaseModel): - `export.updated` - Occurs whenever an Export is updated. - `external_account.created` - Occurs whenever an External Account is created. - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - `file.created` - Occurs whenever a File is created. - `group.updated` - Occurs whenever a Group is updated. - `group.heartbeat` - Increase may send webhooks with this category to see if a diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index a28518a30..5a967682b 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -74,6 +74,8 @@ class EventListParams(TypedDict, total=False): "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 6ebbe1f19..d2532f8bc 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -72,6 +72,8 @@ class EventSubscription(BaseModel): "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", @@ -190,6 +192,8 @@ class EventSubscription(BaseModel): - `export.updated` - Occurs whenever an Export is updated. - `external_account.created` - Occurs whenever an External Account is created. - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - `file.created` - Occurs whenever a File is created. - `group.updated` - Occurs whenever a Group is updated. - `group.heartbeat` - Increase may send webhooks with this category to see if a diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index eb38e7cbc..fb938f8b4 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -58,6 +58,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "export.updated", "external_account.created", "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", "file.created", "group.updated", "group.heartbeat", @@ -175,6 +177,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): - `export.updated` - Occurs whenever an Export is updated. - `external_account.created` - Occurs whenever an External Account is created. - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - `file.created` - Occurs whenever a File is created. - `group.updated` - Occurs whenever a Group is updated. - `group.heartbeat` - Increase may send webhooks with this category to see if a From 38784ff58515a8f3969f1e0e6e43466d89eef6f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:05:18 +0000 Subject: [PATCH 0849/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6b2a97d56..90be2bf17 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.326.0" + ".": "0.327.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f3a416ce8..995e1ce94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.326.0" +version = "0.327.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d92396e6c..2c43a8818 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.326.0" # x-release-please-version +__version__ = "0.327.0" # x-release-please-version From 6386e6618fb7456f91a336c367f8df66aaa713a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 17:58:37 +0000 Subject: [PATCH 0850/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/wire_transfers.py | 16 ++--- src/increase/types/wire_transfer.py | 67 ++++++++++++++++--- .../types/wire_transfer_create_params.py | 59 ++++++++++++++-- tests/api_resources/test_wire_transfers.py | 28 +++++--- 5 files changed, 142 insertions(+), 32 deletions(-) diff --git a/.stats.yml b/.stats.yml index c27c54482..018fcf798 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e81b9b39563d895c47a1eceb9fd7cac6bc3f8e6f21c57c1d01ae2cdf360b73ce.yml -openapi_spec_hash: 9eee6e29a9d53623d380e8afae9ef482 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d19e08b9b1b9aa23a3a0c86db6eb3500b3a4aaf2d9f549a0177c5bebe67d098.yml +openapi_spec_hash: eec4190f1aca04351de8891c6a9b37da config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 6e961865d..da633ad18 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -48,7 +48,6 @@ def create( account_id: str, amount: int, beneficiary_name: str, - message_to_recipient: str, account_number: str | NotGiven = NOT_GIVEN, beneficiary_address_line1: str | NotGiven = NOT_GIVEN, beneficiary_address_line2: str | NotGiven = NOT_GIVEN, @@ -59,6 +58,7 @@ def create( originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, source_account_number_id: str | NotGiven = NOT_GIVEN, @@ -80,8 +80,6 @@ def create( beneficiary_name: The beneficiary's name. - message_to_recipient: The message that will show on the recipient's bank statement. - account_number: The account number for the destination account. beneficiary_address_line1: The beneficiary's address line 1. @@ -108,6 +106,8 @@ def create( originator_name: The originator's name. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. + remittance: Additional remittance information related to the wire transfer. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -132,7 +132,6 @@ def create( "account_id": account_id, "amount": amount, "beneficiary_name": beneficiary_name, - "message_to_recipient": message_to_recipient, "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, @@ -143,6 +142,7 @@ def create( "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, "originator_name": originator_name, + "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, @@ -370,7 +370,6 @@ async def create( account_id: str, amount: int, beneficiary_name: str, - message_to_recipient: str, account_number: str | NotGiven = NOT_GIVEN, beneficiary_address_line1: str | NotGiven = NOT_GIVEN, beneficiary_address_line2: str | NotGiven = NOT_GIVEN, @@ -381,6 +380,7 @@ async def create( originator_address_line2: str | NotGiven = NOT_GIVEN, originator_address_line3: str | NotGiven = NOT_GIVEN, originator_name: str | NotGiven = NOT_GIVEN, + remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, require_approval: bool | NotGiven = NOT_GIVEN, routing_number: str | NotGiven = NOT_GIVEN, source_account_number_id: str | NotGiven = NOT_GIVEN, @@ -402,8 +402,6 @@ async def create( beneficiary_name: The beneficiary's name. - message_to_recipient: The message that will show on the recipient's bank statement. - account_number: The account number for the destination account. beneficiary_address_line1: The beneficiary's address line 1. @@ -430,6 +428,8 @@ async def create( originator_name: The originator's name. This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. + remittance: Additional remittance information related to the wire transfer. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -454,7 +454,6 @@ async def create( "account_id": account_id, "amount": amount, "beneficiary_name": beneficiary_name, - "message_to_recipient": message_to_recipient, "account_number": account_number, "beneficiary_address_line1": beneficiary_address_line1, "beneficiary_address_line2": beneficiary_address_line2, @@ -465,6 +464,7 @@ async def create( "originator_address_line2": originator_address_line2, "originator_address_line3": originator_address_line3, "originator_name": originator_name, + "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 8b3de1ebf..c1bfb0d6f 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +import datetime from typing import Optional -from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel @@ -14,13 +14,16 @@ "CreatedByAPIKey", "CreatedByOAuthApplication", "CreatedByUser", + "Remittance", + "RemittanceTax", + "RemittanceUnstructured", "Reversal", "Submission", ] class Approval(BaseModel): - approved_at: datetime + approved_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was approved. @@ -34,7 +37,7 @@ class Approval(BaseModel): class Cancellation(BaseModel): - canceled_at: datetime + canceled_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the Transfer was canceled. @@ -83,11 +86,56 @@ class CreatedBy(BaseModel): """If present, details about the User that created the transfer.""" +class RemittanceTax(BaseModel): + date: datetime.date + """The month and year the tax payment is for, in YYYY-MM-DD format. + + The day is ignored. + """ + + identification_number: str + """ + The 9-digit Tax Identification Number (TIN) or Employer Identification Number + (EIN). + """ + + type_code: str + """The 5-character tax type code.""" + + +class RemittanceUnstructured(BaseModel): + message: str + """The message to the beneficiary.""" + + +class Remittance(BaseModel): + category: Literal["unstructured", "tax"] + """The type of remittance information being passed. + + - `unstructured` - The wire transfer contains unstructured remittance + information. + - `tax` - The wire transfer is for tax payment purposes to the Internal Revenue + Service (IRS). + """ + + tax: Optional[RemittanceTax] = None + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + + unstructured: Optional[RemittanceUnstructured] = None + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ + + class Reversal(BaseModel): amount: int """The amount that was reversed in USD cents.""" - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the reversal was created. @@ -101,7 +149,7 @@ class Reversal(BaseModel): The description on the reversal message from Fedwire, set by the reversing bank. """ - input_cycle_date: date + input_cycle_date: datetime.date """The Fedwire cycle date for the wire reversal. The "Fedwire day" begins at 9:00 PM Eastern Time on the evening before the @@ -144,7 +192,7 @@ class Submission(BaseModel): input_message_accountability_data: str """The accountability data for the submission.""" - submitted_at: datetime + submitted_at: datetime.datetime """When this wire transfer was submitted to Fedwire.""" @@ -185,7 +233,7 @@ class WireTransfer(BaseModel): approved, this will contain details of the cancellation. """ - created_at: datetime + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the transfer was created. @@ -224,7 +272,7 @@ class WireTransfer(BaseModel): was sent. """ - message_to_recipient: Optional[str] = None + message_to_recipient: str """The message that will show on the recipient's bank statement.""" network: Literal["wire"] @@ -250,6 +298,9 @@ class WireTransfer(BaseModel): by someone else in your organization. """ + remittance: Optional[Remittance] = None + """Remittance information sent with the wire transfer.""" + reversal: Optional[Reversal] = None """If your transfer is reversed, this will contain details of the reversal.""" diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index 16fb3ca6e..e9361645d 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -2,9 +2,13 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +import datetime +from typing import Union +from typing_extensions import Literal, Required, Annotated, TypedDict -__all__ = ["WireTransferCreateParams"] +from .._utils import PropertyInfo + +__all__ = ["WireTransferCreateParams", "Remittance", "RemittanceTax", "RemittanceUnstructured"] class WireTransferCreateParams(TypedDict, total=False): @@ -17,9 +21,6 @@ class WireTransferCreateParams(TypedDict, total=False): beneficiary_name: Required[str] """The beneficiary's name.""" - message_to_recipient: Required[str] - """The message that will show on the recipient's bank statement.""" - account_number: str """The account number for the destination account.""" @@ -73,6 +74,9 @@ class WireTransferCreateParams(TypedDict, total=False): Otherwise, we'll use the associated entity's details. """ + remittance: Remittance + """Additional remittance information related to the wire transfer.""" + require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" @@ -84,3 +88,48 @@ class WireTransferCreateParams(TypedDict, total=False): source_account_number_id: str """The ID of an Account Number that will be passed to the wire's recipient""" + + +class RemittanceTax(TypedDict, total=False): + date: Required[Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")]] + """The month and year the tax payment is for, in YYYY-MM-DD format. + + The day is ignored. + """ + + identification_number: Required[str] + """ + The 9-digit Tax Identification Number (TIN) or Employer Identification Number + (EIN). + """ + + type_code: Required[str] + """The 5-character tax type code.""" + + +class RemittanceUnstructured(TypedDict, total=False): + message: Required[str] + """The message to the beneficiary.""" + + +class Remittance(TypedDict, total=False): + category: Required[Literal["unstructured", "tax"]] + """The type of remittance information being passed. + + - `unstructured` - The wire transfer contains unstructured remittance + information. + - `tax` - The wire transfer is for tax payment purposes to the Internal Revenue + Service (IRS). + """ + + tax: RemittanceTax + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + + unstructured: RemittanceUnstructured + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 1208531c7..0173a6f36 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -10,7 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import WireTransfer -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -25,7 +25,6 @@ def test_method_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -35,7 +34,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", account_number="987654321", beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", @@ -46,6 +44,15 @@ def test_method_create_with_all_params(self, client: Increase) -> None: originator_address_line2="x", originator_address_line3="x", originator_name="x", + remittance={ + "category": "unstructured", + "tax": { + "date": parse_date("2019-12-27"), + "identification_number": "xxxxxxxxx", + "type_code": "xxxxx", + }, + "unstructured": {"message": "New account transfer"}, + }, require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -58,7 +65,6 @@ def test_raw_response_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert response.is_closed is True @@ -72,7 +78,6 @@ def test_streaming_response_create(self, client: Increase) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -250,7 +255,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -260,7 +264,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", account_number="987654321", beneficiary_address_line1="33 Liberty Street", beneficiary_address_line2="New York", @@ -271,6 +274,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) originator_address_line2="x", originator_address_line3="x", originator_name="x", + remittance={ + "category": "unstructured", + "tax": { + "date": parse_date("2019-12-27"), + "identification_number": "xxxxxxxxx", + "type_code": "xxxxx", + }, + "unstructured": {"message": "New account transfer"}, + }, require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -283,7 +295,6 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) assert response.is_closed is True @@ -297,7 +308,6 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N account_id="account_in71c4amph0vgo2qllky", amount=100, beneficiary_name="Ian Crease", - message_to_recipient="New account transfer", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From a037a6f29c5ddfedefe15c8cf784900a2d930f50 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 18:01:35 +0000 Subject: [PATCH 0851/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 90be2bf17..24f979195 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.327.0" + ".": "0.328.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 995e1ce94..cc4d602a0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.327.0" +version = "0.328.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2c43a8818..1881e0b00 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.327.0" # x-release-please-version +__version__ = "0.328.0" # x-release-please-version From 2f33c21eca5fcf34303b2a43b9d77ce12ca1e03f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Sep 2025 19:11:12 +0000 Subject: [PATCH 0852/1325] chore(internal): update pydantic dependency --- requirements-dev.lock | 7 +++++-- requirements.lock | 7 +++++-- src/increase/_models.py | 14 ++++++++++---- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index 8269c8312..d0fe722c9 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -88,9 +88,9 @@ pluggy==1.5.0 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.10.3 +pydantic==2.11.9 # via increase -pydantic-core==2.27.1 +pydantic-core==2.33.2 # via pydantic pygments==2.18.0 # via rich @@ -126,6 +126,9 @@ typing-extensions==4.12.2 # via pydantic # via pydantic-core # via pyright + # via typing-inspection +typing-inspection==0.4.1 + # via pydantic virtualenv==20.24.5 # via nox yarl==1.20.0 diff --git a/requirements.lock b/requirements.lock index c3a472639..3a21efa98 100644 --- a/requirements.lock +++ b/requirements.lock @@ -55,9 +55,9 @@ multidict==6.4.4 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.10.3 +pydantic==2.11.9 # via increase -pydantic-core==2.27.1 +pydantic-core==2.33.2 # via pydantic sniffio==1.3.0 # via anyio @@ -68,5 +68,8 @@ typing-extensions==4.12.2 # via multidict # via pydantic # via pydantic-core + # via typing-inspection +typing-inspection==0.4.1 + # via pydantic yarl==1.20.0 # via aiohttp diff --git a/src/increase/_models.py b/src/increase/_models.py index 3a6017ef2..6a3cd1d26 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -256,7 +256,7 @@ def model_dump( mode: Literal["json", "python"] | str = "python", include: IncEx | None = None, exclude: IncEx | None = None, - by_alias: bool = False, + by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, @@ -264,6 +264,7 @@ def model_dump( warnings: bool | Literal["none", "warn", "error"] = True, context: dict[str, Any] | None = None, serialize_as_any: bool = False, + fallback: Callable[[Any], Any] | None = None, ) -> dict[str, Any]: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump @@ -295,10 +296,12 @@ def model_dump( raise ValueError("context is only supported in Pydantic v2") if serialize_as_any != False: raise ValueError("serialize_as_any is only supported in Pydantic v2") + if fallback is not None: + raise ValueError("fallback is only supported in Pydantic v2") dumped = super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, - by_alias=by_alias, + by_alias=by_alias if by_alias is not None else False, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, @@ -313,13 +316,14 @@ def model_dump_json( indent: int | None = None, include: IncEx | None = None, exclude: IncEx | None = None, - by_alias: bool = False, + by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, context: dict[str, Any] | None = None, + fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, ) -> str: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump_json @@ -348,11 +352,13 @@ def model_dump_json( raise ValueError("context is only supported in Pydantic v2") if serialize_as_any != False: raise ValueError("serialize_as_any is only supported in Pydantic v2") + if fallback is not None: + raise ValueError("fallback is only supported in Pydantic v2") return super().json( # type: ignore[reportDeprecated] indent=indent, include=include, exclude=exclude, - by_alias=by_alias, + by_alias=by_alias if by_alias is not None else False, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, exclude_none=exclude_none, From 6f00120d899c014e907768abc95215dd8c744e52 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 01:29:39 +0000 Subject: [PATCH 0853/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/event_subscriptions.py | 12 +++++++ src/increase/types/declined_transaction.py | 35 +++++++++++++++++++ .../types/declined_transaction_list_params.py | 1 + src/increase/types/event.py | 6 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 6 ++++ .../types/event_subscription_create_params.py | 6 ++++ src/increase/types/transaction.py | 18 ++++++++++ src/increase/types/transaction_list_params.py | 1 + 10 files changed, 89 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 018fcf798..14e640b1e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d19e08b9b1b9aa23a3a0c86db6eb3500b3a4aaf2d9f549a0177c5bebe67d098.yml -openapi_spec_hash: eec4190f1aca04351de8891c6a9b37da +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-61210b27ac135ed841515ad3c3dfedaf42dc1398b0a3ed63bbd6c154d1b31a6a.yml +openapi_spec_hash: b0d2957f6269776252f0ddaa6489772a config_hash: e1885b38eded054b77308a024c5d80cc diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index bd5ec71e5..662dde6b4 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -101,6 +101,8 @@ def create( "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", @@ -245,6 +247,10 @@ def create( created. - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound @@ -590,6 +596,8 @@ async def create( "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", @@ -734,6 +742,10 @@ async def create( created. - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 07d2c2539..763d18f40 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -29,6 +29,7 @@ "SourceCardDeclineVerificationCardholderAddress", "SourceCheckDecline", "SourceCheckDepositRejection", + "SourceInboundFednowTransferDecline", "SourceInboundRealTimePaymentsTransferDecline", "SourceWireDecline", ] @@ -871,6 +872,30 @@ class SourceCheckDepositRejection(BaseModel): """ +class SourceInboundFednowTransferDecline(BaseModel): + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "fednow_not_enabled", + ] + """Why the transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `fednow_not_enabled` - Your account is not enabled to receive FedNow + transfers. + """ + + transfer_id: str + """The identifier of the FedNow Transfer that led to this declined transaction.""" + + class SourceInboundRealTimePaymentsTransferDecline(BaseModel): amount: int """The declined amount in the minor unit of the destination account currency. @@ -977,6 +1002,7 @@ class Source(BaseModel): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "inbound_fednow_transfer_decline", "wire_decline", "check_deposit_rejection", "other", @@ -994,6 +1020,8 @@ class Source(BaseModel): - `inbound_real_time_payments_transfer_decline` - Inbound Real-Time Payments Transfer Decline: details will be under the `inbound_real_time_payments_transfer_decline` object. + - `inbound_fednow_transfer_decline` - Inbound FedNow Transfer Decline: details + will be under the `inbound_fednow_transfer_decline` object. - `wire_decline` - Wire Decline: details will be under the `wire_decline` object. - `check_deposit_rejection` - Check Deposit Rejection: details will be under the @@ -1016,6 +1044,13 @@ class Source(BaseModel): equal to `check_deposit_rejection`. """ + inbound_fednow_transfer_decline: Optional[SourceInboundFednowTransferDecline] = None + """An Inbound FedNow Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_fednow_transfer_decline`. + """ + inbound_real_time_payments_transfer_decline: Optional[SourceInboundRealTimePaymentsTransferDecline] = None """An Inbound Real-Time Payments Transfer Decline object. diff --git a/src/increase/types/declined_transaction_list_params.py b/src/increase/types/declined_transaction_list_params.py index 0a4ca27b8..49183efb2 100644 --- a/src/increase/types/declined_transaction_list_params.py +++ b/src/increase/types/declined_transaction_list_params.py @@ -41,6 +41,7 @@ class DeclinedTransactionListParams(TypedDict, total=False): "card_decline", "check_decline", "inbound_real_time_payments_transfer_decline", + "inbound_fednow_transfer_decline", "wire_decline", "check_deposit_rejection", "other", diff --git a/src/increase/types/event.py b/src/increase/types/event.py index edd012456..d51f684c0 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -70,6 +70,8 @@ class Event(BaseModel): "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", @@ -197,6 +199,10 @@ class Event(BaseModel): created. - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 5a967682b..a54765ad9 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -85,6 +85,8 @@ class EventListParams(TypedDict, total=False): "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index d2532f8bc..8cd69645f 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -83,6 +83,8 @@ class EventSubscription(BaseModel): "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", @@ -210,6 +212,10 @@ class EventSubscription(BaseModel): created. - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index fb938f8b4..b72f51119 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -69,6 +69,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "inbound_ach_transfer_return.updated", "inbound_check_deposit.created", "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", "inbound_mail_item.created", "inbound_mail_item.updated", "inbound_real_time_payments_transfer.created", @@ -195,6 +197,10 @@ class EventSubscriptionCreateParams(TypedDict, total=False): created. - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index a684422d0..d3f057a40 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -55,6 +55,7 @@ "SourceInboundACHTransferReturnIntention", "SourceInboundCheckAdjustment", "SourceInboundCheckDepositReturnIntention", + "SourceInboundFednowTransferConfirmation", "SourceInboundRealTimePaymentsTransferConfirmation", "SourceInboundWireReversal", "SourceInboundWireTransfer", @@ -2005,6 +2006,11 @@ class SourceInboundCheckDepositReturnIntention(BaseModel): """The identifier of the Check Transfer object that was deposited.""" +class SourceInboundFednowTransferConfirmation(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Transaction.""" + + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int """The amount in the minor unit of the transfer's currency. @@ -2447,6 +2453,7 @@ class Source(BaseModel): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_check_adjustment", + "inbound_fednow_transfer_confirmation", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_reversal", "inbound_wire_transfer", @@ -2507,6 +2514,8 @@ class Source(BaseModel): object. - `inbound_check_adjustment` - Inbound Check Adjustment: details will be under the `inbound_check_adjustment` object. + - `inbound_fednow_transfer_confirmation` - Inbound FedNow Transfer Confirmation: + details will be under the `inbound_fednow_transfer_confirmation` object. - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time Payments Transfer Confirmation: details will be under the `inbound_real_time_payments_transfer_confirmation` object. @@ -2617,6 +2626,15 @@ class Source(BaseModel): requests that it be returned. """ + inbound_fednow_transfer_confirmation: Optional[SourceInboundFednowTransferConfirmation] = None + """An Inbound FedNow Transfer Confirmation object. + + This field will be present in the JSON response if and only if `category` is + equal to `inbound_fednow_transfer_confirmation`. An Inbound FedNow Transfer + Confirmation is created when a FedNow transfer is initiated at another bank and + received by Increase. + """ + inbound_real_time_payments_transfer_confirmation: Optional[SourceInboundRealTimePaymentsTransferConfirmation] = None """An Inbound Real-Time Payments Transfer Confirmation object. diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index bc396b47b..7339df2bc 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -60,6 +60,7 @@ class TransactionListParams(TypedDict, total=False): "inbound_ach_transfer_return_intention", "inbound_check_deposit_return_intention", "inbound_check_adjustment", + "inbound_fednow_transfer_confirmation", "inbound_real_time_payments_transfer_confirmation", "inbound_wire_reversal", "inbound_wire_transfer", From e41927d0ecc9863cf71ffba54714e21dd845ee81 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 01:32:34 +0000 Subject: [PATCH 0854/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 24f979195..09eb6e203 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.328.0" + ".": "0.329.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index cc4d602a0..e838b1016 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.328.0" +version = "0.329.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1881e0b00..92409c5c6 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.328.0" # x-release-please-version +__version__ = "0.329.0" # x-release-please-version From 995a320ba3f80de299c7e313a8633b46a1a889bf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:35:40 +0000 Subject: [PATCH 0855/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 20 - src/increase/_client.py | 9 - src/increase/resources/__init__.py | 14 - src/increase/resources/card_disputes.py | 428 ------------------ .../resources/simulations/__init__.py | 14 - .../resources/simulations/card_disputes.py | 237 ---------- .../resources/simulations/simulations.py | 32 -- src/increase/types/__init__.py | 3 - src/increase/types/card_dispute.py | 144 ------ .../types/card_dispute_create_params.py | 26 -- .../types/card_dispute_list_params.py | 73 --- src/increase/types/simulations/__init__.py | 1 - .../simulations/card_dispute_action_params.py | 26 -- src/increase/types/transaction.py | 9 - .../simulations/test_card_disputes.py | 126 ------ tests/api_resources/test_card_disputes.py | 270 ----------- 17 files changed, 4 insertions(+), 1436 deletions(-) delete mode 100644 src/increase/resources/card_disputes.py delete mode 100644 src/increase/resources/simulations/card_disputes.py delete mode 100644 src/increase/types/card_dispute.py delete mode 100644 src/increase/types/card_dispute_create_params.py delete mode 100644 src/increase/types/card_dispute_list_params.py delete mode 100644 src/increase/types/simulations/card_dispute_action_params.py delete mode 100644 tests/api_resources/simulations/test_card_disputes.py delete mode 100644 tests/api_resources/test_card_disputes.py diff --git a/.stats.yml b/.stats.yml index 14e640b1e..f6bbc76b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 217 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-61210b27ac135ed841515ad3c3dfedaf42dc1398b0a3ed63bbd6c154d1b31a6a.yml -openapi_spec_hash: b0d2957f6269776252f0ddaa6489772a -config_hash: e1885b38eded054b77308a024c5d80cc +configured_endpoints: 213 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fc17d091731928c882b2272ea5de831cafcbf237a7887652a5f133c29cb1bbc4.yml +openapi_spec_hash: aad429d087b7557be4103d1309cd81a0 +config_hash: e1e8bc2138a13f290956ae6687f099cd diff --git a/api.md b/api.md index 808520f29..acce5706e 100644 --- a/api.md +++ b/api.md @@ -89,20 +89,6 @@ Methods: - client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement - client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] -# CardDisputes - -Types: - -```python -from increase.types import CardDispute -``` - -Methods: - -- client.card_disputes.create(\*\*params) -> CardDispute -- client.card_disputes.retrieve(card_dispute_id) -> CardDispute -- client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] - # PhysicalCards Types: @@ -833,12 +819,6 @@ Methods: - client.simulations.card_refunds.create(\*\*params) -> Transaction -## CardDisputes - -Methods: - -- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute - ## PhysicalCards Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index c3d9c903b..65fb9f060 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -41,7 +41,6 @@ oauth_tokens, transactions, ach_transfers, - card_disputes, card_payments, check_deposits, physical_cards, @@ -115,7 +114,6 @@ class Increase(SyncAPIClient): cards: cards.CardsResource card_payments: card_payments.CardPaymentsResource card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource - card_disputes: card_disputes.CardDisputesResource physical_cards: physical_cards.PhysicalCardsResource digital_card_profiles: digital_card_profiles.DigitalCardProfilesResource physical_card_profiles: physical_card_profiles.PhysicalCardProfilesResource @@ -261,7 +259,6 @@ def __init__( self.cards = cards.CardsResource(self) self.card_payments = card_payments.CardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) - self.card_disputes = card_disputes.CardDisputesResource(self) self.physical_cards = physical_cards.PhysicalCardsResource(self) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResource(self) self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResource(self) @@ -476,7 +473,6 @@ class AsyncIncrease(AsyncAPIClient): cards: cards.AsyncCardsResource card_payments: card_payments.AsyncCardPaymentsResource card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource - card_disputes: card_disputes.AsyncCardDisputesResource physical_cards: physical_cards.AsyncPhysicalCardsResource digital_card_profiles: digital_card_profiles.AsyncDigitalCardProfilesResource physical_card_profiles: physical_card_profiles.AsyncPhysicalCardProfilesResource @@ -624,7 +620,6 @@ def __init__( self.cards = cards.AsyncCardsResource(self) self.card_payments = card_payments.AsyncCardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) - self.card_disputes = card_disputes.AsyncCardDisputesResource(self) self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResource(self) self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResource(self) @@ -844,7 +839,6 @@ def __init__(self, client: Increase) -> None: self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) - self.card_disputes = card_disputes.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = physical_cards.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithRawResponse( client.digital_card_profiles @@ -955,7 +949,6 @@ def __init__(self, client: AsyncIncrease) -> None: self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) - self.card_disputes = card_disputes.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse( client.digital_card_profiles @@ -1080,7 +1073,6 @@ def __init__(self, client: Increase) -> None: self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( client.card_purchase_supplements ) - self.card_disputes = card_disputes.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = physical_cards.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles @@ -1207,7 +1199,6 @@ def __init__(self, client: AsyncIncrease) -> None: client.card_purchase_supplements ) ) - self.card_disputes = card_disputes.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 7d0ef2b23..4f8236321 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -128,14 +128,6 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) -from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, -) from .card_payments import ( CardPaymentsResource, AsyncCardPaymentsResource, @@ -478,12 +470,6 @@ "AsyncCardPurchaseSupplementsResourceWithRawResponse", "CardPurchaseSupplementsResourceWithStreamingResponse", "AsyncCardPurchaseSupplementsResourceWithStreamingResponse", - "CardDisputesResource", - "AsyncCardDisputesResource", - "CardDisputesResourceWithRawResponse", - "AsyncCardDisputesResourceWithRawResponse", - "CardDisputesResourceWithStreamingResponse", - "AsyncCardDisputesResourceWithStreamingResponse", "PhysicalCardsResource", "AsyncPhysicalCardsResource", "PhysicalCardsResourceWithRawResponse", diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py deleted file mode 100644 index efc5ab590..000000000 --- a/src/increase/resources/card_disputes.py +++ /dev/null @@ -1,428 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..types import card_dispute_list_params, card_dispute_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from .._utils import maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.card_dispute import CardDispute - -__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] - - -class CardDisputesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardDisputesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return CardDisputesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return CardDisputesResourceWithStreamingResponse(self) - - def create( - self, - *, - disputed_transaction_id: str, - explanation: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardDispute: - """ - Create a Card Dispute - - Args: - disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type` - of `card_settlement`. - - explanation: Why you are disputing this Transaction. - - amount: The monetary amount of the part of the transaction that is being disputed. This - is optional and will default to the full amount of the transaction if not - provided. If provided, the amount must be less than or equal to the amount of - the transaction. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/card_disputes", - body=maybe_transform( - { - "disputed_transaction_id": disputed_transaction_id, - "explanation": explanation, - "amount": amount, - }, - card_dispute_create_params.CardDisputeCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDispute, - ) - - def retrieve( - self, - card_dispute_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CardDispute: - """ - Retrieve a Card Dispute - - Args: - card_dispute_id: The identifier of the Card Dispute. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_dispute_id: - raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") - return self._get( - f"/card_disputes/{card_dispute_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDispute, - ) - - def list( - self, - *, - created_at: card_dispute_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_dispute_list_params.Status | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> SyncPage[CardDispute]: - """ - List Card Disputes - - Args: - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/card_disputes", - page=SyncPage[CardDispute], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - "status": status, - }, - card_dispute_list_params.CardDisputeListParams, - ), - ), - model=CardDispute, - ) - - -class AsyncCardDisputesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncCardDisputesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncCardDisputesResourceWithStreamingResponse(self) - - async def create( - self, - *, - disputed_transaction_id: str, - explanation: str, - amount: int | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardDispute: - """ - Create a Card Dispute - - Args: - disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type` - of `card_settlement`. - - explanation: Why you are disputing this Transaction. - - amount: The monetary amount of the part of the transaction that is being disputed. This - is optional and will default to the full amount of the transaction if not - provided. If provided, the amount must be less than or equal to the amount of - the transaction. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/card_disputes", - body=await async_maybe_transform( - { - "disputed_transaction_id": disputed_transaction_id, - "explanation": explanation, - "amount": amount, - }, - card_dispute_create_params.CardDisputeCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDispute, - ) - - async def retrieve( - self, - card_dispute_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> CardDispute: - """ - Retrieve a Card Dispute - - Args: - card_dispute_id: The identifier of the Card Dispute. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_dispute_id: - raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") - return await self._get( - f"/card_disputes/{card_dispute_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDispute, - ) - - def list( - self, - *, - created_at: card_dispute_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_dispute_list_params.Status | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - ) -> AsyncPaginator[CardDispute, AsyncPage[CardDispute]]: - """ - List Card Disputes - - Args: - cursor: Return the page of entries after this one. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/card_disputes", - page=AsyncPage[CardDispute], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "created_at": created_at, - "cursor": cursor, - "idempotency_key": idempotency_key, - "limit": limit, - "status": status, - }, - card_dispute_list_params.CardDisputeListParams, - ), - ), - model=CardDispute, - ) - - -class CardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.create = to_raw_response_wrapper( - card_disputes.create, - ) - self.retrieve = to_raw_response_wrapper( - card_disputes.retrieve, - ) - self.list = to_raw_response_wrapper( - card_disputes.list, - ) - - -class AsyncCardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.create = async_to_raw_response_wrapper( - card_disputes.create, - ) - self.retrieve = async_to_raw_response_wrapper( - card_disputes.retrieve, - ) - self.list = async_to_raw_response_wrapper( - card_disputes.list, - ) - - -class CardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.create = to_streamed_response_wrapper( - card_disputes.create, - ) - self.retrieve = to_streamed_response_wrapper( - card_disputes.retrieve, - ) - self.list = to_streamed_response_wrapper( - card_disputes.list, - ) - - -class AsyncCardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.create = async_to_streamed_response_wrapper( - card_disputes.create, - ) - self.retrieve = async_to_streamed_response_wrapper( - card_disputes.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - card_disputes.list, - ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index c1a47a541..a9f636a2b 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -48,14 +48,6 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) -from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, -) from .card_reversals import ( CardReversalsResource, AsyncCardReversalsResource, @@ -296,12 +288,6 @@ "AsyncCardRefundsResourceWithRawResponse", "CardRefundsResourceWithStreamingResponse", "AsyncCardRefundsResourceWithStreamingResponse", - "CardDisputesResource", - "AsyncCardDisputesResource", - "CardDisputesResourceWithRawResponse", - "AsyncCardDisputesResourceWithRawResponse", - "CardDisputesResourceWithStreamingResponse", - "AsyncCardDisputesResourceWithStreamingResponse", "PhysicalCardsResource", "AsyncPhysicalCardsResource", "PhysicalCardsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py deleted file mode 100644 index c48a3474a..000000000 --- a/src/increase/resources/simulations/card_disputes.py +++ /dev/null @@ -1,237 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal - -import httpx - -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.simulations import card_dispute_action_params -from ...types.card_dispute import CardDispute - -__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] - - -class CardDisputesResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardDisputesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return CardDisputesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return CardDisputesResourceWithStreamingResponse(self) - - def action( - self, - card_dispute_id: str, - *, - status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"], - explanation: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardDispute: - """ - After a [Card Dispute](#card-disputes) is created in production, the dispute - will be reviewed. Since no review happens in sandbox, this endpoint simulates - moving a Card Dispute into a rejected or accepted state. A Card Dispute can only - be actioned one time and must have a status of `pending_reviewing`. - - Args: - card_dispute_id: The dispute you would like to action. - - status: The status to move the dispute to. - - - `pending_user_information` - Increase has requested more information related - to the Card Dispute from you. - - `accepted` - The Card Dispute has been accepted and your funds have been - returned. The card dispute will eventually transition into `won` or `lost` - depending on the outcome. - - `rejected` - The Card Dispute has been rejected. - - `lost` - The Card Dispute has been lost and funds previously credited from the - acceptance have been debited. - - `won` - The Card Dispute has been won and no further action can be taken. - - explanation: Why the dispute was rejected. Not required for accepting disputes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_dispute_id: - raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") - return self._post( - f"/simulations/card_disputes/{card_dispute_id}/action", - body=maybe_transform( - { - "status": status, - "explanation": explanation, - }, - card_dispute_action_params.CardDisputeActionParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDispute, - ) - - -class AsyncCardDisputesResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncCardDisputesResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncCardDisputesResourceWithStreamingResponse(self) - - async def action( - self, - card_dispute_id: str, - *, - status: Literal["pending_user_information", "accepted", "rejected", "lost", "won"], - explanation: str | NotGiven = NOT_GIVEN, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - idempotency_key: str | None = None, - ) -> CardDispute: - """ - After a [Card Dispute](#card-disputes) is created in production, the dispute - will be reviewed. Since no review happens in sandbox, this endpoint simulates - moving a Card Dispute into a rejected or accepted state. A Card Dispute can only - be actioned one time and must have a status of `pending_reviewing`. - - Args: - card_dispute_id: The dispute you would like to action. - - status: The status to move the dispute to. - - - `pending_user_information` - Increase has requested more information related - to the Card Dispute from you. - - `accepted` - The Card Dispute has been accepted and your funds have been - returned. The card dispute will eventually transition into `won` or `lost` - depending on the outcome. - - `rejected` - The Card Dispute has been rejected. - - `lost` - The Card Dispute has been lost and funds previously credited from the - acceptance have been debited. - - `won` - The Card Dispute has been won and no further action can be taken. - - explanation: Why the dispute was rejected. Not required for accepting disputes. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_dispute_id: - raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") - return await self._post( - f"/simulations/card_disputes/{card_dispute_id}/action", - body=await async_maybe_transform( - { - "status": status, - "explanation": explanation, - }, - card_dispute_action_params.CardDisputeActionParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDispute, - ) - - -class CardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.action = to_raw_response_wrapper( - card_disputes.action, - ) - - -class AsyncCardDisputesResourceWithRawResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.action = async_to_raw_response_wrapper( - card_disputes.action, - ) - - -class CardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: CardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.action = to_streamed_response_wrapper( - card_disputes.action, - ) - - -class AsyncCardDisputesResourceWithStreamingResponse: - def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: - self._card_disputes = card_disputes - - self.action = async_to_streamed_response_wrapper( - card_disputes.action, - ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4b1ea1a12..ebc3636c4 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -44,14 +44,6 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) -from .card_disputes import ( - CardDisputesResource, - AsyncCardDisputesResource, - CardDisputesResourceWithRawResponse, - AsyncCardDisputesResourceWithRawResponse, - CardDisputesResourceWithStreamingResponse, - AsyncCardDisputesResourceWithStreamingResponse, -) from .card_reversals import ( CardReversalsResource, AsyncCardReversalsResource, @@ -277,10 +269,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: def card_refunds(self) -> CardRefundsResource: return CardRefundsResource(self._client) - @cached_property - def card_disputes(self) -> CardDisputesResource: - return CardDisputesResource(self._client) - @cached_property def physical_cards(self) -> PhysicalCardsResource: return PhysicalCardsResource(self._client) @@ -414,10 +402,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: def card_refunds(self) -> AsyncCardRefundsResource: return AsyncCardRefundsResource(self._client) - @cached_property - def card_disputes(self) -> AsyncCardDisputesResource: - return AsyncCardDisputesResource(self._client) - @cached_property def physical_cards(self) -> AsyncPhysicalCardsResource: return AsyncPhysicalCardsResource(self._client) @@ -554,10 +538,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawRespons def card_refunds(self) -> CardRefundsResourceWithRawResponse: return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) - @cached_property - def card_disputes(self) -> CardDisputesResourceWithRawResponse: - return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) - @cached_property def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) @@ -679,10 +659,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawRe def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) - @cached_property - def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: - return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) - @cached_property def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) @@ -804,10 +780,6 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingR def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) - @cached_property - def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: - return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) - @cached_property def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) @@ -931,10 +903,6 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStrea def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) - @cached_property - def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: - return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) - @cached_property def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index eb6eed1a4..eae146400 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -18,7 +18,6 @@ from .transaction import Transaction as Transaction from .ach_transfer import ACHTransfer as ACHTransfer from .card_details import CardDetails as CardDetails -from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard @@ -79,7 +78,6 @@ from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams -from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams @@ -89,7 +87,6 @@ from .account_number_list_params import AccountNumberListParams as AccountNumberListParams from .ach_transfer_create_params import ACHTransferCreateParams as ACHTransferCreateParams from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup -from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py deleted file mode 100644 index 249bb0d83..000000000 --- a/src/increase/types/card_dispute.py +++ /dev/null @@ -1,144 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["CardDispute", "Acceptance", "Loss", "Rejection", "Win"] - - -class Acceptance(BaseModel): - accepted_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was accepted. - """ - - card_dispute_id: str - """The identifier of the Card Dispute that was accepted.""" - - transaction_id: str - """ - The identifier of the Transaction that was created to return the disputed funds - to your account. - """ - - -class Loss(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was lost.""" - - explanation: str - """Why the Card Dispute was lost.""" - - lost_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was lost. - """ - - transaction_id: str - """ - The identifier of the Transaction that was created to debit the disputed funds - from your account. - """ - - -class Rejection(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was rejected.""" - - explanation: str - """Why the Card Dispute was rejected.""" - - rejected_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was rejected. - """ - - -class Win(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was won.""" - - won_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was won. - """ - - -class CardDispute(BaseModel): - id: str - """The Card Dispute identifier.""" - - acceptance: Optional[Acceptance] = None - """ - If the Card Dispute's status is `accepted`, this will contain details of the - successful dispute. - """ - - amount: Optional[int] = None - """The amount of the dispute, if provided, or the transaction amount otherwise.""" - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was created. - """ - - disputed_transaction_id: str - """The identifier of the Transaction that was disputed.""" - - explanation: str - """Why you disputed the Transaction in question.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - loss: Optional[Loss] = None - """ - If the Card Dispute's status is `lost`, this will contain details of the lost - dispute. - """ - - rejection: Optional[Rejection] = None - """ - If the Card Dispute's status is `rejected`, this will contain details of the - unsuccessful dispute. - """ - - status: Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"] - """The results of the Dispute investigation. - - - `pending_reviewing` - The Card Dispute is pending review. - - `pending_user_information` - Increase has requested more information related - to the Card Dispute from you. - - `accepted` - The Card Dispute has been accepted and your funds have been - returned. The card dispute will eventually transition into `won` or `lost` - depending on the outcome. - - `rejected` - The Card Dispute has been rejected. - - `lost` - The Card Dispute has been lost and funds previously credited from the - acceptance have been debited. - - `won` - The Card Dispute has been won and no further action can be taken. - """ - - type: Literal["card_dispute"] - """A constant representing the object's type. - - For this resource it will always be `card_dispute`. - """ - - win: Optional[Win] = None - """ - If the Card Dispute's status is `won`, this will contain details of the won - dispute. - """ diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py deleted file mode 100644 index fd2a7207d..000000000 --- a/src/increase/types/card_dispute_create_params.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["CardDisputeCreateParams"] - - -class CardDisputeCreateParams(TypedDict, total=False): - disputed_transaction_id: Required[str] - """The Transaction you wish to dispute. - - This Transaction must have a `source_type` of `card_settlement`. - """ - - explanation: Required[str] - """Why you are disputing this Transaction.""" - - amount: int - """The monetary amount of the part of the transaction that is being disputed. - - This is optional and will default to the full amount of the transaction if not - provided. If provided, the amount must be less than or equal to the amount of - the transaction. - """ diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py deleted file mode 100644 index 73e384bd2..000000000 --- a/src/increase/types/card_dispute_list_params.py +++ /dev/null @@ -1,73 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Union -from datetime import datetime -from typing_extensions import Literal, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["CardDisputeListParams", "CreatedAt", "Status"] - - -class CardDisputeListParams(TypedDict, total=False): - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - idempotency_key: str - """ - Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - status: Status - - -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - -_StatusReservedKeywords = TypedDict( - "_StatusReservedKeywords", - { - "in": List[Literal["pending_reviewing", "pending_user_information", "accepted", "rejected", "lost", "won"]], - }, - total=False, -) - - -class Status(_StatusReservedKeywords, total=False): - pass diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 8f74919bf..669de5026 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -8,7 +8,6 @@ from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams -from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py deleted file mode 100644 index eaf7cbedc..000000000 --- a/src/increase/types/simulations/card_dispute_action_params.py +++ /dev/null @@ -1,26 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal, Required, TypedDict - -__all__ = ["CardDisputeActionParams"] - - -class CardDisputeActionParams(TypedDict, total=False): - status: Required[Literal["pending_user_information", "accepted", "rejected", "lost", "won"]] - """The status to move the dispute to. - - - `pending_user_information` - Increase has requested more information related - to the Card Dispute from you. - - `accepted` - The Card Dispute has been accepted and your funds have been - returned. The card dispute will eventually transition into `won` or `lost` - depending on the outcome. - - `rejected` - The Card Dispute has been rejected. - - `lost` - The Card Dispute has been lost and funds previously credited from the - acceptance have been debited. - - `won` - The Card Dispute has been won and no further action can be taken. - """ - - explanation: str - """Why the dispute was rejected. Not required for accepting disputes.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d3f057a40..9f95f3335 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -399,9 +399,6 @@ class SourceCardDisputeAcceptance(BaseModel): the Card Dispute was accepted. """ - card_dispute_id: str - """The identifier of the Card Dispute that was accepted.""" - transaction_id: str """ The identifier of the Transaction that was created to return the disputed funds @@ -438,9 +435,6 @@ class SourceCardDisputeFinancial(BaseModel): amount: int """The amount of the financial event.""" - card_dispute_id: str - """The identifier of the Card Dispute the financial event is associated with.""" - network: Literal["visa"] """The network that the Card Dispute is associated with. @@ -462,9 +456,6 @@ class SourceCardDisputeFinancial(BaseModel): class SourceCardDisputeLoss(BaseModel): - card_dispute_id: str - """The identifier of the Card Dispute that was lost.""" - explanation: str """Why the Card Dispute was lost.""" diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py deleted file mode 100644 index aee1aa35b..000000000 --- a/tests/api_resources/simulations/test_card_disputes.py +++ /dev/null @@ -1,126 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardDispute - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardDisputes: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_action(self, client: Increase) -> None: - card_dispute = client.simulations.card_disputes.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_method_action_with_all_params(self, client: Increase) -> None: - card_dispute = client.simulations.card_disputes.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - explanation="This was a valid recurring transaction", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_raw_response_action(self, client: Increase) -> None: - response = client.simulations.card_disputes.with_raw_response.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_streaming_response_action(self, client: Increase) -> None: - with client.simulations.card_disputes.with_streaming_response.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_action(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): - client.simulations.card_disputes.with_raw_response.action( - card_dispute_id="", - status="rejected", - ) - - -class TestAsyncCardDisputes: - 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: - card_dispute = await async_client.simulations.card_disputes.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: - card_dispute = await async_client.simulations.card_disputes.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - explanation="This was a valid recurring transaction", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_disputes.with_raw_response.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_disputes.with_streaming_response.action( - card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", - status="rejected", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_action(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): - await async_client.simulations.card_disputes.with_raw_response.action( - card_dispute_id="", - status="rejected", - ) diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py deleted file mode 100644 index 4d84ea732..000000000 --- a/tests/api_resources/test_card_disputes.py +++ /dev/null @@ -1,270 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import CardDispute -from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardDisputes: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - card_dispute = client.card_disputes.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - card_dispute = client.card_disputes.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - amount=1, - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.card_disputes.with_raw_response.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.card_disputes.with_streaming_response.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - card_dispute = client.card_disputes.retrieve( - "card_dispute_id", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.card_disputes.with_raw_response.retrieve( - "card_dispute_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.card_disputes.with_streaming_response.retrieve( - "card_dispute_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): - client.card_disputes.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - card_dispute = client.card_disputes.list() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - card_dispute = client.card_disputes.list( - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - status={"in": ["pending_reviewing"]}, - ) - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.card_disputes.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = response.parse() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.card_disputes.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = response.parse() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncCardDisputes: - 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: - card_dispute = await async_client.card_disputes.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - card_dispute = await async_client.card_disputes.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - amount=1, - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_disputes.with_raw_response.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.card_disputes.with_streaming_response.create( - disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", - explanation="Unauthorized recurring transaction.", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - card_dispute = await async_client.card_disputes.retrieve( - "card_dispute_id", - ) - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_disputes.with_raw_response.retrieve( - "card_dispute_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.card_disputes.with_streaming_response.retrieve( - "card_dispute_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = await response.parse() - assert_matches_type(CardDispute, card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): - await async_client.card_disputes.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - card_dispute = await async_client.card_disputes.list() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - card_dispute = await async_client.card_disputes.list( - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - idempotency_key="x", - limit=1, - status={"in": ["pending_reviewing"]}, - ) - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_disputes.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_dispute = await response.parse() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.card_disputes.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_dispute = await response.parse() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) - - assert cast(Any, response.is_closed) is True From e2e2d1b5b5bec8b5c3f4b14f8c24f93edee5c532 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Sep 2025 22:38:29 +0000 Subject: [PATCH 0856/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 09eb6e203..7f9560adf 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.329.0" + ".": "0.330.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e838b1016..2ccb42f97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.329.0" +version = "0.330.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 92409c5c6..29af8aeb9 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.329.0" # x-release-please-version +__version__ = "0.330.0" # x-release-please-version From d9bb277648f8c36c6cfda0aefd32eec274dac046 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 02:46:12 +0000 Subject: [PATCH 0857/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/routing_number_list_response.py | 7 +++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f6bbc76b8..5d419a59b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fc17d091731928c882b2272ea5de831cafcbf237a7887652a5f133c29cb1bbc4.yml -openapi_spec_hash: aad429d087b7557be4103d1309cd81a0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-61d42e1f44023df8161e3b35d6154011e638f78b3b232379396ea8980d6257b5.yml +openapi_spec_hash: 8831b733d617f5c7ee39db3cb62da20c config_hash: e1e8bc2138a13f290956ae6687f099cd diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py index 7fbca1e8d..4b7bd3d75 100644 --- a/src/increase/types/routing_number_list_response.py +++ b/src/increase/types/routing_number_list_response.py @@ -15,6 +15,13 @@ class RoutingNumberListResponse(BaseModel): - `not_supported` - The routing number cannot receive this transfer type. """ + fednow_transfers: Literal["supported", "not_supported"] + """This routing number's support for FedNow Transfers. + + - `supported` - The routing number can receive this transfer type. + - `not_supported` - The routing number cannot receive this transfer type. + """ + name: str """The name of the financial institution belonging to a routing number.""" From 1d529b7b6184688b576ac7d6baf3a3a17c5403a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 02:49:01 +0000 Subject: [PATCH 0858/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7f9560adf..fd28aa524 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.330.0" + ".": "0.331.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2ccb42f97..0e7acca04 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.330.0" +version = "0.331.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 29af8aeb9..3536e1ec2 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.330.0" # x-release-please-version +__version__ = "0.331.0" # x-release-please-version From 74cf42e395299d86c4ad8fe97bd08be50221bb89 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Sep 2025 14:57:35 +0000 Subject: [PATCH 0859/1325] chore(types): change optional parameter type from NotGiven to Omit --- src/increase/__init__.py | 4 +- src/increase/_base_client.py | 18 +-- src/increase/_client.py | 24 ++-- src/increase/_qs.py | 14 +- src/increase/_types.py | 29 ++-- src/increase/_utils/_transform.py | 4 +- src/increase/_utils/_utils.py | 8 +- src/increase/resources/account_numbers.py | 70 ++++----- src/increase/resources/account_statements.py | 26 ++-- src/increase/resources/account_transfers.py | 46 +++--- src/increase/resources/accounts.py | 82 +++++------ .../resources/ach_prenotifications.py | 70 ++++----- src/increase/resources/ach_transfers.py | 114 +++++++-------- .../resources/bookkeeping_accounts.py | 46 +++--- src/increase/resources/bookkeeping_entries.py | 22 +-- .../resources/bookkeeping_entry_sets.py | 38 ++--- src/increase/resources/card_payments.py | 30 ++-- .../resources/card_purchase_supplements.py | 26 ++-- src/increase/resources/card_push_transfers.py | 50 +++---- src/increase/resources/card_tokens.py | 26 ++-- src/increase/resources/card_validations.py | 58 ++++---- src/increase/resources/cards.py | 90 ++++++------ src/increase/resources/check_deposits.py | 38 ++--- src/increase/resources/check_transfers.py | 70 ++++----- .../resources/declined_transactions.py | 34 ++--- .../resources/digital_card_profiles.py | 90 ++++++------ .../resources/digital_wallet_tokens.py | 26 ++-- src/increase/resources/documents.py | 46 +++--- src/increase/resources/entities.py | 134 +++++++++--------- src/increase/resources/event_subscriptions.py | 46 +++--- src/increase/resources/events.py | 30 ++-- src/increase/resources/exports.py | 66 ++++----- src/increase/resources/external_accounts.py | 62 ++++---- src/increase/resources/file_links.py | 10 +- src/increase/resources/files.py | 38 ++--- src/increase/resources/groups.py | 6 +- .../resources/inbound_ach_transfers.py | 58 ++++---- .../resources/inbound_check_deposits.py | 38 ++--- src/increase/resources/inbound_mail_items.py | 26 ++-- .../inbound_real_time_payments_transfers.py | 30 ++-- .../inbound_wire_drawdown_requests.py | 18 +-- .../resources/inbound_wire_transfers.py | 42 +++--- .../resources/intrafi_account_enrollments.py | 38 ++--- src/increase/resources/intrafi_balances.py | 6 +- src/increase/resources/intrafi_exclusions.py | 34 ++--- src/increase/resources/lockboxes.py | 58 ++++---- src/increase/resources/oauth_applications.py | 26 ++-- src/increase/resources/oauth_connections.py | 26 ++-- src/increase/resources/oauth_tokens.py | 22 +-- .../resources/pending_transactions.py | 50 +++---- .../resources/physical_card_profiles.py | 82 +++++------ src/increase/resources/physical_cards.py | 42 +++--- src/increase/resources/programs.py | 18 +-- src/increase/resources/real_time_decisions.py | 34 ++--- .../resources/real_time_payments_transfers.py | 78 +++++----- src/increase/resources/routing_numbers.py | 14 +- .../simulations/account_statements.py | 6 +- .../simulations/account_transfers.py | 6 +- .../resources/simulations/ach_transfers.py | 32 ++--- .../card_authorization_expirations.py | 6 +- .../simulations/card_authorizations.py | 70 ++++----- .../simulations/card_fuel_confirmations.py | 6 +- .../resources/simulations/card_increments.py | 10 +- .../resources/simulations/card_refunds.py | 6 +- .../resources/simulations/card_reversals.py | 10 +- .../resources/simulations/card_settlements.py | 10 +- .../resources/simulations/card_tokens.py | 26 ++-- .../resources/simulations/check_deposits.py | 14 +- .../resources/simulations/check_transfers.py | 6 +- .../digital_wallet_token_requests.py | 6 +- .../resources/simulations/documents.py | 6 +- .../simulations/inbound_ach_transfers.py | 46 +++--- .../simulations/inbound_check_deposits.py | 10 +- .../simulations/inbound_mail_items.py | 10 +- .../inbound_real_time_payments_transfers.py | 26 ++-- .../inbound_wire_drawdown_requests.py | 62 ++++---- .../simulations/inbound_wire_transfers.py | 62 ++++---- .../simulations/interest_payments.py | 18 +-- .../simulations/pending_transactions.py | 6 +- .../resources/simulations/physical_cards.py | 26 ++-- .../resources/simulations/programs.py | 14 +- .../real_time_payments_transfers.py | 10 +- .../simulations/wire_drawdown_requests.py | 10 +- .../resources/simulations/wire_transfers.py | 10 +- .../resources/supplemental_documents.py | 22 +-- src/increase/resources/transactions.py | 34 ++--- .../resources/wire_drawdown_requests.py | 42 +++--- src/increase/resources/wire_transfers.py | 102 ++++++------- tests/test_transform.py | 11 +- 89 files changed, 1541 insertions(+), 1531 deletions(-) diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 309d15b77..740cd3665 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -3,7 +3,7 @@ import typing as _t from . import types -from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes +from ._types import NOT_GIVEN, Omit, NoneType, NotGiven, Transport, ProxiesTypes, omit, not_given from ._utils import file_from_path from ._client import ( ENVIRONMENTS, @@ -60,7 +60,9 @@ "ProxiesTypes", "NotGiven", "NOT_GIVEN", + "not_given", "Omit", + "omit", "IncreaseError", "APIError", "APIStatusError", diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 24ccf6744..ef4af0342 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -42,7 +42,6 @@ from ._qs import Querystring from ._files import to_httpx_files, async_to_httpx_files from ._types import ( - NOT_GIVEN, Body, Omit, Query, @@ -57,6 +56,7 @@ RequestOptions, HttpxRequestFiles, ModelBuilderProtocol, + not_given, ) from ._utils import is_dict, is_list, asyncify, is_given, lru_cache, is_mapping from ._compat import PYDANTIC_V1, model_copy, model_dump @@ -145,9 +145,9 @@ def __init__( def __init__( self, *, - url: URL | NotGiven = NOT_GIVEN, - json: Body | NotGiven = NOT_GIVEN, - params: Query | NotGiven = NOT_GIVEN, + url: URL | NotGiven = not_given, + json: Body | NotGiven = not_given, + params: Query | NotGiven = not_given, ) -> None: self.url = url self.json = json @@ -595,7 +595,7 @@ def _maybe_override_cast_to(self, cast_to: type[ResponseT], options: FinalReques # we internally support defining a temporary header to override the # default `cast_to` type for use with `.with_raw_response` and `.with_streaming_response` # see _response.py for implementation details - override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, NOT_GIVEN) + override_cast_to = headers.pop(OVERRIDE_CAST_TO_HEADER, not_given) if is_given(override_cast_to): options.headers = headers return cast(Type[ResponseT], override_cast_to) @@ -825,7 +825,7 @@ def __init__( version: str, base_url: str | URL, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1356,7 +1356,7 @@ def __init__( base_url: str | URL, _strict_response_validation: bool, max_retries: int = DEFAULT_MAX_RETRIES, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, custom_headers: Mapping[str, str] | None = None, custom_query: Mapping[str, object] | None = None, @@ -1818,8 +1818,8 @@ def make_request_options( extra_query: Query | None = None, extra_body: Body | None = None, idempotency_key: str | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, - post_parser: PostParser | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + post_parser: PostParser | NotGiven = not_given, ) -> RequestOptions: """Create a dict of type RequestOptions without keys of NotGiven values.""" options: RequestOptions = {} diff --git a/src/increase/_client.py b/src/increase/_client.py index 65fb9f060..1e1afe163 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Dict, Union, Mapping, cast +from typing import Any, Dict, Mapping, cast from typing_extensions import Self, Literal, override import httpx @@ -11,13 +11,13 @@ from . import _exceptions from ._qs import Querystring from ._types import ( - NOT_GIVEN, Omit, Timeout, NotGiven, Transport, ProxiesTypes, RequestOptions, + not_given, ) from ._utils import ( is_given, @@ -176,9 +176,9 @@ def __init__( *, api_key: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + environment: Literal["production", "sandbox"] | NotGiven = not_given, + base_url: str | httpx.URL | None | NotGiven = not_given, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -339,9 +339,9 @@ def copy( webhook_secret: str | None = None, environment: Literal["production", "sandbox"] | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.Client | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -537,9 +537,9 @@ def __init__( *, api_key: str | None = None, webhook_secret: str | None = None, - environment: Literal["production", "sandbox"] | NotGiven = NOT_GIVEN, - base_url: str | httpx.URL | None | NotGiven = NOT_GIVEN, - timeout: Union[float, Timeout, None, NotGiven] = NOT_GIVEN, + environment: Literal["production", "sandbox"] | NotGiven = not_given, + base_url: str | httpx.URL | None | NotGiven = not_given, + timeout: float | Timeout | None | NotGiven = not_given, max_retries: int = DEFAULT_MAX_RETRIES, default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, @@ -702,9 +702,9 @@ def copy( webhook_secret: str | None = None, environment: Literal["production", "sandbox"] | None = None, base_url: str | httpx.URL | None = None, - timeout: float | Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | Timeout | None | NotGiven = not_given, http_client: httpx.AsyncClient | None = None, - max_retries: int | NotGiven = NOT_GIVEN, + max_retries: int | NotGiven = not_given, default_headers: Mapping[str, str] | None = None, set_default_headers: Mapping[str, str] | None = None, default_query: Mapping[str, object] | None = None, diff --git a/src/increase/_qs.py b/src/increase/_qs.py index 274320ca5..ada6fd3f7 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -4,7 +4,7 @@ from urllib.parse import parse_qs, urlencode from typing_extensions import Literal, get_args -from ._types import NOT_GIVEN, NotGiven, NotGivenOr +from ._types import NotGiven, not_given from ._utils import flatten _T = TypeVar("_T") @@ -41,8 +41,8 @@ def stringify( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> str: return urlencode( self.stringify_items( @@ -56,8 +56,8 @@ def stringify_items( self, params: Params, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> list[tuple[str, str]]: opts = Options( qs=self, @@ -143,8 +143,8 @@ def __init__( self, qs: Querystring = _qs, *, - array_format: NotGivenOr[ArrayFormat] = NOT_GIVEN, - nested_format: NotGivenOr[NestedFormat] = NOT_GIVEN, + array_format: ArrayFormat | NotGiven = not_given, + nested_format: NestedFormat | NotGiven = not_given, ) -> None: self.array_format = qs.array_format if isinstance(array_format, NotGiven) else array_format self.nested_format = qs.nested_format if isinstance(nested_format, NotGiven) else nested_format diff --git a/src/increase/_types.py b/src/increase/_types.py index 5c54a7e80..b81ab29db 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -117,18 +117,21 @@ class RequestOptions(TypedDict, total=False): # Sentinel class used until PEP 0661 is accepted class NotGiven: """ - A sentinel singleton class used to distinguish omitted keyword arguments - from those passed in with the value None (which may have different behavior). + For parameters with a meaningful None value, we need to distinguish between + the user explicitly passing None, and the user not passing the parameter at + all. + + User code shouldn't need to use not_given directly. For example: ```py - def get(timeout: Union[int, NotGiven, None] = NotGiven()) -> Response: ... + def create(timeout: Timeout | None | NotGiven = not_given): ... - get(timeout=1) # 1s timeout - get(timeout=None) # No timeout - get() # Default timeout behavior, which may not be statically known at the method definition. + create(timeout=1) # 1s timeout + create(timeout=None) # No timeout + create() # Default timeout behavior ``` """ @@ -140,13 +143,14 @@ def __repr__(self) -> str: return "NOT_GIVEN" -NotGivenOr = Union[_T, NotGiven] +not_given = NotGiven() +# for backwards compatibility: NOT_GIVEN = NotGiven() class Omit: - """In certain situations you need to be able to represent a case where a default value has - to be explicitly removed and `None` is not an appropriate substitute, for example: + """ + To explicitly omit something from being sent in a request, use `omit`. ```py # as the default `Content-Type` header is `application/json` that will be sent @@ -156,8 +160,8 @@ class Omit: # to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983' client.post(..., headers={"Content-Type": "multipart/form-data"}) - # instead you can remove the default `application/json` header by passing Omit - client.post(..., headers={"Content-Type": Omit()}) + # instead you can remove the default `application/json` header by passing omit + client.post(..., headers={"Content-Type": omit}) ``` """ @@ -165,6 +169,9 @@ def __bool__(self) -> Literal[False]: return False +omit = Omit() + + @runtime_checkable class ModelBuilderProtocol(Protocol): @classmethod diff --git a/src/increase/_utils/_transform.py b/src/increase/_utils/_transform.py index c19124f0d..520754920 100644 --- a/src/increase/_utils/_transform.py +++ b/src/increase/_utils/_transform.py @@ -268,7 +268,7 @@ def _transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue @@ -434,7 +434,7 @@ async def _async_transform_typeddict( annotations = get_type_hints(expected_type, include_extras=True) for key, value in data.items(): if not is_given(value): - # we don't need to include `NotGiven` values here as they'll + # we don't need to include omitted values here as they'll # be stripped out before the request is sent anyway continue diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index f0818595d..50d59269a 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -21,7 +21,7 @@ import sniffio -from .._types import NotGiven, FileTypes, NotGivenOr, HeadersLike +from .._types import Omit, NotGiven, FileTypes, HeadersLike _T = TypeVar("_T") _TupleT = TypeVar("_TupleT", bound=Tuple[object, ...]) @@ -63,7 +63,7 @@ def _extract_items( try: key = path[index] except IndexError: - if isinstance(obj, NotGiven): + if not is_given(obj): # no value was provided - we can safely ignore return [] @@ -126,8 +126,8 @@ def _extract_items( return [] -def is_given(obj: NotGivenOr[_T]) -> TypeGuard[_T]: - return not isinstance(obj, NotGiven) +def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]: + return not isinstance(obj, NotGiven) and not isinstance(obj, Omit) # Type safe methods for narrowing types with TypeVars. diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 14196bdc6..fa2474e34 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -7,7 +7,7 @@ import httpx from ..types import account_number_list_params, account_number_create_params, account_number_update_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,14 +49,14 @@ def create( *, account_id: str, name: str, - inbound_ach: account_number_create_params.InboundACH | NotGiven = NOT_GIVEN, - inbound_checks: account_number_create_params.InboundChecks | NotGiven = NOT_GIVEN, + inbound_ach: account_number_create_params.InboundACH | Omit = omit, + inbound_checks: account_number_create_params.InboundChecks | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountNumber: """ @@ -112,7 +112,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountNumber: """ Retrieve an Account Number @@ -142,16 +142,16 @@ def update( self, account_number_id: str, *, - inbound_ach: account_number_update_params.InboundACH | NotGiven = NOT_GIVEN, - inbound_checks: account_number_update_params.InboundChecks | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + inbound_ach: account_number_update_params.InboundACH | Omit = omit, + inbound_checks: account_number_update_params.InboundChecks | Omit = omit, + name: str | Omit = omit, + status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountNumber: """ @@ -209,19 +209,19 @@ def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, - created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: account_number_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + ach_debit_status: account_number_list_params.ACHDebitStatus | Omit = omit, + created_at: account_number_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: account_number_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[AccountNumber]: """ List Account Numbers @@ -297,14 +297,14 @@ async def create( *, account_id: str, name: str, - inbound_ach: account_number_create_params.InboundACH | NotGiven = NOT_GIVEN, - inbound_checks: account_number_create_params.InboundChecks | NotGiven = NOT_GIVEN, + inbound_ach: account_number_create_params.InboundACH | Omit = omit, + inbound_checks: account_number_create_params.InboundChecks | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountNumber: """ @@ -360,7 +360,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountNumber: """ Retrieve an Account Number @@ -390,16 +390,16 @@ async def update( self, account_number_id: str, *, - inbound_ach: account_number_update_params.InboundACH | NotGiven = NOT_GIVEN, - inbound_checks: account_number_update_params.InboundChecks | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + inbound_ach: account_number_update_params.InboundACH | Omit = omit, + inbound_checks: account_number_update_params.InboundChecks | Omit = omit, + name: str | Omit = omit, + status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountNumber: """ @@ -457,19 +457,19 @@ async def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - ach_debit_status: account_number_list_params.ACHDebitStatus | NotGiven = NOT_GIVEN, - created_at: account_number_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: account_number_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + ach_debit_status: account_number_list_params.ACHDebitStatus | Omit = omit, + created_at: account_number_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: account_number_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[AccountNumber, AsyncPage[AccountNumber]]: """ List Account Numbers diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 72a0bed63..879016421 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -5,7 +5,7 @@ import httpx from ..types import account_statement_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountStatement: """ Retrieve an Account Statement @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - statement_period_start: account_statement_list_params.StatementPeriodStart | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + statement_period_start: account_statement_list_params.StatementPeriodStart | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[AccountStatement]: """ List Account Statements @@ -163,7 +163,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountStatement: """ Retrieve an Account Statement @@ -194,16 +194,16 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - statement_period_start: account_statement_list_params.StatementPeriodStart | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + statement_period_start: account_statement_list_params.StatementPeriodStart | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[AccountStatement, AsyncPage[AccountStatement]]: """ List Account Statements diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 15dc40b47..51ce62716 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -5,7 +5,7 @@ import httpx from ..types import account_transfer_list_params, account_transfer_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,13 +49,13 @@ def create( amount: int, description: str, destination_account_id: str, - require_approval: bool | NotGiven = NOT_GIVEN, + require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -114,7 +114,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountTransfer: """ Retrieve an Account Transfer @@ -145,17 +145,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: account_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: account_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[AccountTransfer]: """ List Account Transfers @@ -212,7 +212,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -256,7 +256,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -319,13 +319,13 @@ async def create( amount: int, description: str, destination_account_id: str, - require_approval: bool | NotGiven = NOT_GIVEN, + require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -384,7 +384,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AccountTransfer: """ Retrieve an Account Transfer @@ -415,17 +415,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: account_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: account_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[AccountTransfer, AsyncPage[AccountTransfer]]: """ List Account Transfers @@ -482,7 +482,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -526,7 +526,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index b3a417e50..18ae97c65 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -8,7 +8,7 @@ import httpx from ..types import account_list_params, account_create_params, account_update_params, account_balance_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,15 +50,15 @@ def create( self, *, name: str, - entity_id: str | NotGiven = NOT_GIVEN, - informational_entity_id: str | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, + entity_id: str | Omit = omit, + informational_entity_id: str | Omit = omit, + program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """ @@ -115,7 +115,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Account: """ Retrieve an Account @@ -145,14 +145,14 @@ def update( self, account_id: str, *, - credit_limit: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + credit_limit: int | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """ @@ -200,20 +200,20 @@ def update( def list( self, *, - created_at: account_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - informational_entity_id: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, - status: account_list_params.Status | NotGiven = NOT_GIVEN, + created_at: account_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + informational_entity_id: str | Omit = omit, + limit: int | Omit = omit, + program_id: str | Omit = omit, + status: account_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Account]: """ List Accounts @@ -272,13 +272,13 @@ def balance( self, account_id: str, *, - at_time: Union[str, datetime] | NotGiven = NOT_GIVEN, + at_time: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BalanceLookup: """ Retrieve the current and available balances for an account in minor units of the @@ -320,7 +320,7 @@ def close( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """Close an Account @@ -379,15 +379,15 @@ async def create( self, *, name: str, - entity_id: str | NotGiven = NOT_GIVEN, - informational_entity_id: str | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, + entity_id: str | Omit = omit, + informational_entity_id: str | Omit = omit, + program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """ @@ -444,7 +444,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Account: """ Retrieve an Account @@ -474,14 +474,14 @@ async def update( self, account_id: str, *, - credit_limit: int | NotGiven = NOT_GIVEN, - name: str | NotGiven = NOT_GIVEN, + credit_limit: int | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """ @@ -529,20 +529,20 @@ async def update( def list( self, *, - created_at: account_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - informational_entity_id: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, - status: account_list_params.Status | NotGiven = NOT_GIVEN, + created_at: account_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + informational_entity_id: str | Omit = omit, + limit: int | Omit = omit, + program_id: str | Omit = omit, + status: account_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Account, AsyncPage[Account]]: """ List Accounts @@ -601,13 +601,13 @@ async def balance( self, account_id: str, *, - at_time: Union[str, datetime] | NotGiven = NOT_GIVEN, + at_time: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BalanceLookup: """ Retrieve the current and available balances for an account in minor units of the @@ -649,7 +649,7 @@ async def close( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Account: """Close an Account diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 393e831fe..7d2af5fe1 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -9,7 +9,7 @@ import httpx from ..types import ach_prenotification_list_params, ach_prenotification_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,28 +52,28 @@ def create( account_id: str, account_number: str, routing_number: str, - addendum: str | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - credit_debit_indicator: Literal["credit", "debit"] | NotGiven = NOT_GIVEN, - effective_date: Union[str, date] | NotGiven = NOT_GIVEN, - individual_id: str | NotGiven = NOT_GIVEN, - individual_name: str | NotGiven = NOT_GIVEN, + addendum: str | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_name: str | Omit = omit, + credit_debit_indicator: Literal["credit", "debit"] | Omit = omit, + effective_date: Union[str, date] | Omit = omit, + individual_id: str | Omit = omit, + individual_name: str | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", "prearranged_payments_and_deposit", "internet_initiated", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHPrenotification: """ @@ -166,7 +166,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ACHPrenotification: """ Retrieve an ACH Prenotification @@ -197,16 +197,16 @@ def retrieve( def list( self, *, - created_at: ach_prenotification_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + created_at: ach_prenotification_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[ACHPrenotification]: """ List ACH Prenotifications @@ -278,28 +278,28 @@ async def create( account_id: str, account_number: str, routing_number: str, - addendum: str | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - credit_debit_indicator: Literal["credit", "debit"] | NotGiven = NOT_GIVEN, - effective_date: Union[str, date] | NotGiven = NOT_GIVEN, - individual_id: str | NotGiven = NOT_GIVEN, - individual_name: str | NotGiven = NOT_GIVEN, + addendum: str | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_name: str | Omit = omit, + credit_debit_indicator: Literal["credit", "debit"] | Omit = omit, + effective_date: Union[str, date] | Omit = omit, + individual_id: str | Omit = omit, + individual_name: str | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", "prearranged_payments_and_deposit", "internet_initiated", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHPrenotification: """ @@ -392,7 +392,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ACHPrenotification: """ Retrieve an ACH Prenotification @@ -423,16 +423,16 @@ async def retrieve( def list( self, *, - created_at: ach_prenotification_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + created_at: ach_prenotification_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[ACHPrenotification, AsyncPage[ACHPrenotification]]: """ List ACH Prenotifications diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index b8ff47baa..d07b5534a 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -7,7 +7,7 @@ import httpx from ..types import ach_transfer_list_params, ach_transfer_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,34 +50,34 @@ def create( account_id: str, amount: int, statement_descriptor: str, - account_number: str | NotGiven = NOT_GIVEN, - addenda: ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger"] | NotGiven = NOT_GIVEN, - individual_id: str | NotGiven = NOT_GIVEN, - individual_name: str | NotGiven = NOT_GIVEN, - preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + addenda: ach_transfer_create_params.Addenda | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_name: str | Omit = omit, + destination_account_holder: Literal["business", "individual", "unknown"] | Omit = omit, + external_account_id: str | Omit = omit, + funding: Literal["checking", "savings", "general_ledger"] | Omit = omit, + individual_id: str | Omit = omit, + individual_name: str | Omit = omit, + preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", "prearranged_payments_and_deposit", "internet_initiated", ] - | NotGiven = NOT_GIVEN, - transaction_timing: Literal["synchronous", "asynchronous"] | NotGiven = NOT_GIVEN, + | Omit = omit, + transaction_timing: Literal["synchronous", "asynchronous"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -213,7 +213,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ACHTransfer: """ Retrieve an ACH Transfer @@ -242,19 +242,19 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: ach_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: ach_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[ACHTransfer]: """ List ACH Transfers @@ -315,7 +315,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -357,7 +357,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -417,34 +417,34 @@ async def create( account_id: str, amount: int, statement_descriptor: str, - account_number: str | NotGiven = NOT_GIVEN, - addenda: ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - destination_account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger"] | NotGiven = NOT_GIVEN, - individual_id: str | NotGiven = NOT_GIVEN, - individual_name: str | NotGiven = NOT_GIVEN, - preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + addenda: ach_transfer_create_params.Addenda | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_name: str | Omit = omit, + destination_account_holder: Literal["business", "individual", "unknown"] | Omit = omit, + external_account_id: str | Omit = omit, + funding: Literal["checking", "savings", "general_ledger"] | Omit = omit, + individual_id: str | Omit = omit, + individual_name: str | Omit = omit, + preferred_effective_date: ach_transfer_create_params.PreferredEffectiveDate | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", "prearranged_payments_and_deposit", "internet_initiated", ] - | NotGiven = NOT_GIVEN, - transaction_timing: Literal["synchronous", "asynchronous"] | NotGiven = NOT_GIVEN, + | Omit = omit, + transaction_timing: Literal["synchronous", "asynchronous"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -580,7 +580,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ACHTransfer: """ Retrieve an ACH Transfer @@ -609,19 +609,19 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: ach_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: ach_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[ACHTransfer, AsyncPage[ACHTransfer]]: """ List ACH Transfers @@ -682,7 +682,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -724,7 +724,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 82c240637..cb7a38ea8 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -14,7 +14,7 @@ bookkeeping_account_update_params, bookkeeping_account_balance_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -56,15 +56,15 @@ def create( self, *, name: str, - account_id: str | NotGiven = NOT_GIVEN, - compliance_category: Literal["commingled_cash", "customer_balance"] | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + compliance_category: Literal["commingled_cash", "customer_balance"] | Omit = omit, + entity_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingAccount: """ @@ -123,7 +123,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingAccount: """ @@ -164,15 +164,15 @@ def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[BookkeepingAccount]: """ List Bookkeeping Accounts @@ -220,13 +220,13 @@ def balance( self, bookkeeping_account_id: str, *, - at_time: Union[str, datetime] | NotGiven = NOT_GIVEN, + at_time: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingBalanceLookup: """ Retrieve a Bookkeeping Account Balance @@ -287,15 +287,15 @@ async def create( self, *, name: str, - account_id: str | NotGiven = NOT_GIVEN, - compliance_category: Literal["commingled_cash", "customer_balance"] | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + compliance_category: Literal["commingled_cash", "customer_balance"] | Omit = omit, + entity_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingAccount: """ @@ -354,7 +354,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingAccount: """ @@ -397,15 +397,15 @@ async def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[BookkeepingAccount, AsyncPage[BookkeepingAccount]]: """ List Bookkeeping Accounts @@ -453,13 +453,13 @@ async def balance( self, bookkeeping_account_id: str, *, - at_time: Union[str, datetime] | NotGiven = NOT_GIVEN, + at_time: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingBalanceLookup: """ Retrieve a Bookkeeping Account Balance diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index 5a8fe0ba9..56be104f3 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -5,7 +5,7 @@ import httpx from ..types import bookkeeping_entry_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingEntry: """ Retrieve a Bookkeeping Entry @@ -82,15 +82,15 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[BookkeepingEntry]: """ List Bookkeeping Entries @@ -161,7 +161,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingEntry: """ Retrieve a Bookkeeping Entry @@ -192,15 +192,15 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[BookkeepingEntry, AsyncPage[BookkeepingEntry]]: """ List Bookkeeping Entries diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index ccace983c..c437c6185 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -8,7 +8,7 @@ import httpx from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,14 +49,14 @@ def create( self, *, entries: Iterable[bookkeeping_entry_set_create_params.Entry], - date: Union[str, datetime] | NotGiven = NOT_GIVEN, - transaction_id: str | NotGiven = NOT_GIVEN, + date: Union[str, datetime] | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingEntrySet: """ @@ -109,7 +109,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingEntrySet: """ Retrieve a Bookkeeping Entry Set @@ -140,16 +140,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - transaction_id: str | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[BookkeepingEntrySet]: """ List Bookkeeping Entry Sets @@ -221,14 +221,14 @@ async def create( self, *, entries: Iterable[bookkeeping_entry_set_create_params.Entry], - date: Union[str, datetime] | NotGiven = NOT_GIVEN, - transaction_id: str | NotGiven = NOT_GIVEN, + date: Union[str, datetime] | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> BookkeepingEntrySet: """ @@ -281,7 +281,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> BookkeepingEntrySet: """ Retrieve a Bookkeeping Entry Set @@ -312,16 +312,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - transaction_id: str | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[BookkeepingEntrySet, AsyncPage[BookkeepingEntrySet]]: """ List Bookkeeping Entry Sets diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 6ba08b132..c314d0e6c 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -5,7 +5,7 @@ import httpx from ..types import card_payment_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPayment: """ Retrieve a Card Payment @@ -80,17 +80,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - card_id: str | NotGiven = NOT_GIVEN, - created_at: card_payment_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + card_id: str | Omit = omit, + created_at: card_payment_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CardPayment]: """ List Card Payments @@ -165,7 +165,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPayment: """ Retrieve a Card Payment @@ -194,17 +194,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - card_id: str | NotGiven = NOT_GIVEN, - created_at: card_payment_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + card_id: str | Omit = omit, + created_at: card_payment_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CardPayment, AsyncPage[CardPayment]]: """ List Card Payments diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 7b926776e..c768f0946 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -5,7 +5,7 @@ import httpx from ..types import card_purchase_supplement_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPurchaseSupplement: """ Retrieve a Card Purchase Supplement @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - card_payment_id: str | NotGiven = NOT_GIVEN, - created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_payment_id: str | Omit = omit, + created_at: card_purchase_supplement_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CardPurchaseSupplement]: """ List Card Purchase Supplements @@ -164,7 +164,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPurchaseSupplement: """ Retrieve a Card Purchase Supplement @@ -195,16 +195,16 @@ async def retrieve( def list( self, *, - card_payment_id: str | NotGiven = NOT_GIVEN, - created_at: card_purchase_supplement_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_payment_id: str | Omit = omit, + created_at: card_purchase_supplement_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CardPurchaseSupplement, AsyncPage[CardPurchaseSupplement]]: """ List Card Purchase Supplements diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index c28035cef..41ebcec9f 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -7,7 +7,7 @@ import httpx from ..types import card_push_transfer_list_params, card_push_transfer_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -78,13 +78,13 @@ def create( sender_address_state: str, sender_name: str, source_account_number_id: str, - require_approval: bool | NotGiven = NOT_GIVEN, + require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """Create a Card Push Transfer @@ -203,7 +203,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPushTransfer: """ Retrieve a Card Push Transfer @@ -234,18 +234,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_push_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_push_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_push_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_push_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CardPushTransfer]: """ List Card Push Transfers @@ -303,7 +303,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """ @@ -347,7 +347,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """ @@ -437,13 +437,13 @@ async def create( sender_address_state: str, sender_name: str, source_account_number_id: str, - require_approval: bool | NotGiven = NOT_GIVEN, + require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """Create a Card Push Transfer @@ -562,7 +562,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardPushTransfer: """ Retrieve a Card Push Transfer @@ -593,18 +593,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_push_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_push_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_push_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_push_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CardPushTransfer, AsyncPage[CardPushTransfer]]: """ List Card Push Transfers @@ -662,7 +662,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """ @@ -706,7 +706,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: """ diff --git a/src/increase/resources/card_tokens.py b/src/increase/resources/card_tokens.py index 37fbd236e..c00023910 100644 --- a/src/increase/resources/card_tokens.py +++ b/src/increase/resources/card_tokens.py @@ -5,7 +5,7 @@ import httpx from ..types import card_token_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardToken: """ Retrieve a Card Token @@ -81,15 +81,15 @@ def retrieve( def list( self, *, - created_at: card_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + created_at: card_token_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CardToken]: """ List Card Tokens @@ -137,7 +137,7 @@ def capabilities( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardTokenCapabilities: """ The capabilities of a Card Token describe whether the card can be used for @@ -195,7 +195,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardToken: """ Retrieve a Card Token @@ -224,15 +224,15 @@ async def retrieve( def list( self, *, - created_at: card_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + created_at: card_token_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CardToken, AsyncPage[CardToken]]: """ List Card Tokens @@ -280,7 +280,7 @@ async def capabilities( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardTokenCapabilities: """ The capabilities of a Card Token describe whether the card can be used for diff --git a/src/increase/resources/card_validations.py b/src/increase/resources/card_validations.py index d1a94f6a6..e24a34ac7 100644 --- a/src/increase/resources/card_validations.py +++ b/src/increase/resources/card_validations.py @@ -5,7 +5,7 @@ import httpx from ..types import card_validation_list_params, card_validation_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,17 +52,17 @@ def create( merchant_name: str, merchant_postal_code: str, merchant_state: str, - cardholder_first_name: str | NotGiven = NOT_GIVEN, - cardholder_last_name: str | NotGiven = NOT_GIVEN, - cardholder_middle_name: str | NotGiven = NOT_GIVEN, - cardholder_postal_code: str | NotGiven = NOT_GIVEN, - cardholder_street_address: str | NotGiven = NOT_GIVEN, + cardholder_first_name: str | Omit = omit, + cardholder_last_name: str | Omit = omit, + cardholder_middle_name: str | Omit = omit, + cardholder_postal_code: str | Omit = omit, + cardholder_street_address: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardValidation: """ @@ -144,7 +144,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardValidation: """ Retrieve a Card Validation @@ -173,18 +173,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_validation_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_validation_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_validation_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_validation_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CardValidation]: """ List Card Validations @@ -264,17 +264,17 @@ async def create( merchant_name: str, merchant_postal_code: str, merchant_state: str, - cardholder_first_name: str | NotGiven = NOT_GIVEN, - cardholder_last_name: str | NotGiven = NOT_GIVEN, - cardholder_middle_name: str | NotGiven = NOT_GIVEN, - cardholder_postal_code: str | NotGiven = NOT_GIVEN, - cardholder_street_address: str | NotGiven = NOT_GIVEN, + cardholder_first_name: str | Omit = omit, + cardholder_last_name: str | Omit = omit, + cardholder_middle_name: str | Omit = omit, + cardholder_postal_code: str | Omit = omit, + cardholder_street_address: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardValidation: """ @@ -356,7 +356,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardValidation: """ Retrieve a Card Validation @@ -385,18 +385,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_validation_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_validation_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_validation_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_validation_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CardValidation, AsyncPage[CardValidation]]: """ List Card Validations diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 5f44c9a85..5256867bb 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -7,7 +7,7 @@ import httpx from ..types import card_list_params, card_create_params, card_update_params, card_create_details_iframe_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,16 +50,16 @@ def create( self, *, account_id: str, - billing_address: card_create_params.BillingAddress | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - digital_wallet: card_create_params.DigitalWallet | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, + billing_address: card_create_params.BillingAddress | Omit = omit, + description: str | Omit = omit, + digital_wallet: card_create_params.DigitalWallet | Omit = omit, + entity_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Card: """ @@ -122,7 +122,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Card: """ Retrieve a Card @@ -152,17 +152,17 @@ def update( self, card_id: str, *, - billing_address: card_update_params.BillingAddress | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - digital_wallet: card_update_params.DigitalWallet | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + billing_address: card_update_params.BillingAddress | Omit = omit, + description: str | Omit = omit, + digital_wallet: card_update_params.DigitalWallet | Omit = omit, + entity_id: str | Omit = omit, + status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Card: """ @@ -225,18 +225,18 @@ def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Card]: """ List Cards @@ -289,13 +289,13 @@ def create_details_iframe( self, card_id: str, *, - physical_card_id: str | NotGiven = NOT_GIVEN, + physical_card_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardIframeURL: """Create an iframe URL for a Card to display the card details. @@ -345,7 +345,7 @@ def details( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardDetails: """ Sensitive details for a Card include the primary account number, expiry, card @@ -397,16 +397,16 @@ async def create( self, *, account_id: str, - billing_address: card_create_params.BillingAddress | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - digital_wallet: card_create_params.DigitalWallet | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, + billing_address: card_create_params.BillingAddress | Omit = omit, + description: str | Omit = omit, + digital_wallet: card_create_params.DigitalWallet | Omit = omit, + entity_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Card: """ @@ -469,7 +469,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Card: """ Retrieve a Card @@ -499,17 +499,17 @@ async def update( self, card_id: str, *, - billing_address: card_update_params.BillingAddress | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - digital_wallet: card_update_params.DigitalWallet | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - status: Literal["active", "disabled", "canceled"] | NotGiven = NOT_GIVEN, + billing_address: card_update_params.BillingAddress | Omit = omit, + description: str | Omit = omit, + digital_wallet: card_update_params.DigitalWallet | Omit = omit, + entity_id: str | Omit = omit, + status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Card: """ @@ -572,18 +572,18 @@ async def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: card_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: card_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: card_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Card, AsyncPage[Card]]: """ List Cards @@ -636,13 +636,13 @@ async def create_details_iframe( self, card_id: str, *, - physical_card_id: str | NotGiven = NOT_GIVEN, + physical_card_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardIframeURL: """Create an iframe URL for a Card to display the card details. @@ -692,7 +692,7 @@ async def details( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CardDetails: """ Sensitive details for a Card include the primary account number, expiry, card diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index d5ab3cbc9..2683f91aa 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -5,7 +5,7 @@ import httpx from ..types import check_deposit_list_params, check_deposit_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,13 +49,13 @@ def create( amount: int, back_image_file_id: str, front_image_file_id: str, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ @@ -113,7 +113,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CheckDeposit: """ Retrieve a Check Deposit @@ -142,17 +142,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: check_deposit_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CheckDeposit]: """ List Check Deposits @@ -228,13 +228,13 @@ async def create( amount: int, back_image_file_id: str, front_image_file_id: str, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ @@ -292,7 +292,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CheckDeposit: """ Retrieve a Check Deposit @@ -321,17 +321,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: check_deposit_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CheckDeposit, AsyncPage[CheckDeposit]]: """ List Check Deposits diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 5b16ab167..3026b2df1 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -7,7 +7,7 @@ import httpx from ..types import check_transfer_list_params, check_transfer_create_params, check_transfer_stop_payment_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,16 +51,16 @@ def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, - check_number: str | NotGiven = NOT_GIVEN, - physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, + check_number: str | Omit = omit, + physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, + require_approval: bool | Omit = omit, + third_party: check_transfer_create_params.ThirdParty | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -139,7 +139,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CheckTransfer: """ Retrieve a Check Transfer @@ -168,18 +168,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: check_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: check_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: check_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[CheckTransfer]: """ List Check Transfers @@ -237,7 +237,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -279,7 +279,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -316,13 +316,13 @@ def stop_payment( self, check_transfer_id: str, *, - reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | NotGiven = NOT_GIVEN, + reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -390,16 +390,16 @@ async def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, - check_number: str | NotGiven = NOT_GIVEN, - physical_check: check_transfer_create_params.PhysicalCheck | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - third_party: check_transfer_create_params.ThirdParty | NotGiven = NOT_GIVEN, + check_number: str | Omit = omit, + physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, + require_approval: bool | Omit = omit, + third_party: check_transfer_create_params.ThirdParty | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -478,7 +478,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> CheckTransfer: """ Retrieve a Check Transfer @@ -507,18 +507,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: check_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: check_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: check_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: check_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[CheckTransfer, AsyncPage[CheckTransfer]]: """ List Check Transfers @@ -576,7 +576,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -618,7 +618,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -655,13 +655,13 @@ async def stop_payment( self, check_transfer_id: str, *, - reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | NotGiven = NOT_GIVEN, + reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 7ef7c640e..17f7eab97 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -5,7 +5,7 @@ import httpx from ..types import declined_transaction_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DeclinedTransaction: """ Retrieve a Declined Transaction @@ -82,18 +82,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: declined_transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: declined_transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: declined_transaction_list_params.Category | Omit = omit, + created_at: declined_transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[DeclinedTransaction]: """ List Declined Transactions @@ -169,7 +169,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DeclinedTransaction: """ Retrieve a Declined Transaction @@ -200,18 +200,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: declined_transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: declined_transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: declined_transaction_list_params.Category | Omit = omit, + created_at: declined_transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[DeclinedTransaction, AsyncPage[DeclinedTransaction]]: """ List Declined Transactions diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 0c1426b54..84cbd1292 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -9,7 +9,7 @@ digital_card_profile_clone_params, digital_card_profile_create_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -54,16 +54,16 @@ def create( card_description: str, description: str, issuer_name: str, - contact_email: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - contact_website: str | NotGiven = NOT_GIVEN, - text_color: digital_card_profile_create_params.TextColor | NotGiven = NOT_GIVEN, + contact_email: str | Omit = omit, + contact_phone: str | Omit = omit, + contact_website: str | Omit = omit, + text_color: digital_card_profile_create_params.TextColor | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ @@ -133,7 +133,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DigitalCardProfile: """ Retrieve a Digital Card Profile @@ -164,16 +164,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: digital_card_profile_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: digital_card_profile_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[DigitalCardProfile]: """ List Card Profiles @@ -227,7 +227,7 @@ def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ @@ -266,21 +266,21 @@ def clone( self, digital_card_profile_id: str, *, - app_icon_file_id: str | NotGiven = NOT_GIVEN, - background_image_file_id: str | NotGiven = NOT_GIVEN, - card_description: str | NotGiven = NOT_GIVEN, - contact_email: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - contact_website: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - issuer_name: str | NotGiven = NOT_GIVEN, - text_color: digital_card_profile_clone_params.TextColor | NotGiven = NOT_GIVEN, + app_icon_file_id: str | Omit = omit, + background_image_file_id: str | Omit = omit, + card_description: str | Omit = omit, + contact_email: str | Omit = omit, + contact_phone: str | Omit = omit, + contact_website: str | Omit = omit, + description: str | Omit = omit, + issuer_name: str | Omit = omit, + text_color: digital_card_profile_clone_params.TextColor | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ @@ -376,16 +376,16 @@ async def create( card_description: str, description: str, issuer_name: str, - contact_email: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - contact_website: str | NotGiven = NOT_GIVEN, - text_color: digital_card_profile_create_params.TextColor | NotGiven = NOT_GIVEN, + contact_email: str | Omit = omit, + contact_phone: str | Omit = omit, + contact_website: str | Omit = omit, + text_color: digital_card_profile_create_params.TextColor | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ @@ -455,7 +455,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DigitalCardProfile: """ Retrieve a Digital Card Profile @@ -486,16 +486,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: digital_card_profile_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: digital_card_profile_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[DigitalCardProfile, AsyncPage[DigitalCardProfile]]: """ List Card Profiles @@ -549,7 +549,7 @@ async def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ @@ -588,21 +588,21 @@ async def clone( self, digital_card_profile_id: str, *, - app_icon_file_id: str | NotGiven = NOT_GIVEN, - background_image_file_id: str | NotGiven = NOT_GIVEN, - card_description: str | NotGiven = NOT_GIVEN, - contact_email: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - contact_website: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - issuer_name: str | NotGiven = NOT_GIVEN, - text_color: digital_card_profile_clone_params.TextColor | NotGiven = NOT_GIVEN, + app_icon_file_id: str | Omit = omit, + background_image_file_id: str | Omit = omit, + card_description: str | Omit = omit, + contact_email: str | Omit = omit, + contact_phone: str | Omit = omit, + contact_website: str | Omit = omit, + description: str | Omit = omit, + issuer_name: str | Omit = omit, + text_color: digital_card_profile_clone_params.TextColor | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalCardProfile: """ diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 37eec5d76..f41d35b7f 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -5,7 +5,7 @@ import httpx from ..types import digital_wallet_token_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DigitalWalletToken: """ Retrieve a Digital Wallet Token @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - card_id: str | NotGiven = NOT_GIVEN, - created_at: digital_wallet_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_id: str | Omit = omit, + created_at: digital_wallet_token_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[DigitalWalletToken]: """ List Digital Wallet Tokens @@ -163,7 +163,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> DigitalWalletToken: """ Retrieve a Digital Wallet Token @@ -194,16 +194,16 @@ async def retrieve( def list( self, *, - card_id: str | NotGiven = NOT_GIVEN, - created_at: digital_wallet_token_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_id: str | Omit = omit, + created_at: digital_wallet_token_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[DigitalWalletToken, AsyncPage[DigitalWalletToken]]: """ List Digital Wallet Tokens diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 772adfe32..90b72744d 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -7,7 +7,7 @@ import httpx from ..types import document_list_params, document_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,14 +48,14 @@ def create( self, *, category: Literal["account_verification_letter", "funding_instructions"], - account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, - funding_instructions: document_create_params.FundingInstructions | NotGiven = NOT_GIVEN, + account_verification_letter: document_create_params.AccountVerificationLetter | Omit = omit, + funding_instructions: document_create_params.FundingInstructions | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Document: """ @@ -112,7 +112,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Document: """ Retrieve a Document @@ -141,18 +141,18 @@ def retrieve( def list( self, *, - category: document_list_params.Category | NotGiven = NOT_GIVEN, - created_at: document_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + category: document_list_params.Category | Omit = omit, + created_at: document_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Document]: """ List Documents @@ -226,14 +226,14 @@ async def create( self, *, category: Literal["account_verification_letter", "funding_instructions"], - account_verification_letter: document_create_params.AccountVerificationLetter | NotGiven = NOT_GIVEN, - funding_instructions: document_create_params.FundingInstructions | NotGiven = NOT_GIVEN, + account_verification_letter: document_create_params.AccountVerificationLetter | Omit = omit, + funding_instructions: document_create_params.FundingInstructions | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Document: """ @@ -290,7 +290,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Document: """ Retrieve a Document @@ -319,18 +319,18 @@ async def retrieve( def list( self, *, - category: document_list_params.Category | NotGiven = NOT_GIVEN, - created_at: document_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + category: document_list_params.Category | Omit = omit, + created_at: document_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Document, AsyncPage[Document]]: """ List Documents diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index a46aad2b0..ddbdf06a9 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -19,7 +19,7 @@ entity_archive_beneficial_owner_params, entity_update_beneficial_owner_address_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -60,21 +60,21 @@ def create( self, *, structure: Literal["corporation", "natural_person", "joint", "trust", "government_authority"], - corporation: entity_create_params.Corporation | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, - joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, - natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, - risk_rating: entity_create_params.RiskRating | NotGiven = NOT_GIVEN, - supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, - third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, - trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, + corporation: entity_create_params.Corporation | Omit = omit, + description: str | Omit = omit, + government_authority: entity_create_params.GovernmentAuthority | Omit = omit, + joint: entity_create_params.Joint | Omit = omit, + natural_person: entity_create_params.NaturalPerson | Omit = omit, + risk_rating: entity_create_params.RiskRating | Omit = omit, + supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | Omit = omit, + third_party_verification: entity_create_params.ThirdPartyVerification | Omit = omit, + trust: entity_create_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -163,7 +163,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Entity: """ Retrieve an Entity @@ -193,19 +193,19 @@ def update( self, entity_id: str, *, - corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, - details_confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, - natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, - risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, - third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, - trust: entity_update_params.Trust | NotGiven = NOT_GIVEN, + corporation: entity_update_params.Corporation | Omit = omit, + details_confirmed_at: Union[str, datetime] | Omit = omit, + government_authority: entity_update_params.GovernmentAuthority | Omit = omit, + natural_person: entity_update_params.NaturalPerson | Omit = omit, + risk_rating: entity_update_params.RiskRating | Omit = omit, + third_party_verification: entity_update_params.ThirdPartyVerification | Omit = omit, + trust: entity_update_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -276,17 +276,17 @@ def update( def list( self, *, - created_at: entity_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: entity_list_params.Status | NotGiven = NOT_GIVEN, + created_at: entity_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: entity_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Entity]: """ List Entities @@ -341,7 +341,7 @@ def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """Archive an Entity @@ -386,7 +386,7 @@ def archive_beneficial_owner( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -431,13 +431,13 @@ def confirm( self, entity_id: str, *, - confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + confirmed_at: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -486,7 +486,7 @@ def create_beneficial_owner( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -536,7 +536,7 @@ def update_address( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -584,7 +584,7 @@ def update_beneficial_owner_address( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -641,7 +641,7 @@ def update_industry_code( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -708,21 +708,21 @@ async def create( self, *, structure: Literal["corporation", "natural_person", "joint", "trust", "government_authority"], - corporation: entity_create_params.Corporation | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - government_authority: entity_create_params.GovernmentAuthority | NotGiven = NOT_GIVEN, - joint: entity_create_params.Joint | NotGiven = NOT_GIVEN, - natural_person: entity_create_params.NaturalPerson | NotGiven = NOT_GIVEN, - risk_rating: entity_create_params.RiskRating | NotGiven = NOT_GIVEN, - supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | NotGiven = NOT_GIVEN, - third_party_verification: entity_create_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, - trust: entity_create_params.Trust | NotGiven = NOT_GIVEN, + corporation: entity_create_params.Corporation | Omit = omit, + description: str | Omit = omit, + government_authority: entity_create_params.GovernmentAuthority | Omit = omit, + joint: entity_create_params.Joint | Omit = omit, + natural_person: entity_create_params.NaturalPerson | Omit = omit, + risk_rating: entity_create_params.RiskRating | Omit = omit, + supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | Omit = omit, + third_party_verification: entity_create_params.ThirdPartyVerification | Omit = omit, + trust: entity_create_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -811,7 +811,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Entity: """ Retrieve an Entity @@ -841,19 +841,19 @@ async def update( self, entity_id: str, *, - corporation: entity_update_params.Corporation | NotGiven = NOT_GIVEN, - details_confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - government_authority: entity_update_params.GovernmentAuthority | NotGiven = NOT_GIVEN, - natural_person: entity_update_params.NaturalPerson | NotGiven = NOT_GIVEN, - risk_rating: entity_update_params.RiskRating | NotGiven = NOT_GIVEN, - third_party_verification: entity_update_params.ThirdPartyVerification | NotGiven = NOT_GIVEN, - trust: entity_update_params.Trust | NotGiven = NOT_GIVEN, + corporation: entity_update_params.Corporation | Omit = omit, + details_confirmed_at: Union[str, datetime] | Omit = omit, + government_authority: entity_update_params.GovernmentAuthority | Omit = omit, + natural_person: entity_update_params.NaturalPerson | Omit = omit, + risk_rating: entity_update_params.RiskRating | Omit = omit, + third_party_verification: entity_update_params.ThirdPartyVerification | Omit = omit, + trust: entity_update_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -924,17 +924,17 @@ async def update( def list( self, *, - created_at: entity_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: entity_list_params.Status | NotGiven = NOT_GIVEN, + created_at: entity_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: entity_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Entity, AsyncPage[Entity]]: """ List Entities @@ -989,7 +989,7 @@ async def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """Archive an Entity @@ -1034,7 +1034,7 @@ async def archive_beneficial_owner( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -1079,13 +1079,13 @@ async def confirm( self, entity_id: str, *, - confirmed_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + confirmed_at: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -1134,7 +1134,7 @@ async def create_beneficial_owner( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -1184,7 +1184,7 @@ async def update_address( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -1234,7 +1234,7 @@ async def update_beneficial_owner_address( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ @@ -1291,7 +1291,7 @@ async def update_industry_code( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Entity: """ diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 662dde6b4..9d59c63cb 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -7,7 +7,7 @@ import httpx from ..types import event_subscription_list_params, event_subscription_create_params, event_subscription_update_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,7 +48,7 @@ def create( self, *, url: str, - oauth_connection_id: str | NotGiven = NOT_GIVEN, + oauth_connection_id: str | Omit = omit, selected_event_category: Literal[ "account.created", "account.updated", @@ -155,14 +155,14 @@ def create( "wire_transfer.created", "wire_transfer.updated", ] - | NotGiven = NOT_GIVEN, - shared_secret: str | NotGiven = NOT_GIVEN, + | Omit = omit, + shared_secret: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -381,7 +381,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EventSubscription: """ Retrieve an Event Subscription @@ -413,13 +413,13 @@ def update( self, event_subscription_id: str, *, - status: Literal["active", "disabled", "deleted"] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "deleted"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -466,15 +466,15 @@ def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[EventSubscription]: """ List Event Subscriptions @@ -543,7 +543,7 @@ async def create( self, *, url: str, - oauth_connection_id: str | NotGiven = NOT_GIVEN, + oauth_connection_id: str | Omit = omit, selected_event_category: Literal[ "account.created", "account.updated", @@ -650,14 +650,14 @@ async def create( "wire_transfer.created", "wire_transfer.updated", ] - | NotGiven = NOT_GIVEN, - shared_secret: str | NotGiven = NOT_GIVEN, + | Omit = omit, + shared_secret: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -876,7 +876,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> EventSubscription: """ Retrieve an Event Subscription @@ -908,13 +908,13 @@ async def update( self, event_subscription_id: str, *, - status: Literal["active", "disabled", "deleted"] | NotGiven = NOT_GIVEN, + status: Literal["active", "disabled", "deleted"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EventSubscription: """ @@ -963,15 +963,15 @@ async def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[EventSubscription, AsyncPage[EventSubscription]]: """ List Event Subscriptions diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 3640ca319..0e6be4fbe 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -5,7 +5,7 @@ import httpx from ..types import event_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Event: """ Retrieve an Event @@ -80,17 +80,17 @@ def retrieve( def list( self, *, - associated_object_id: str | NotGiven = NOT_GIVEN, - category: event_list_params.Category | NotGiven = NOT_GIVEN, - created_at: event_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + associated_object_id: str | Omit = omit, + category: event_list_params.Category | Omit = omit, + created_at: event_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Event]: """ List Events @@ -163,7 +163,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Event: """ Retrieve an Event @@ -192,17 +192,17 @@ async def retrieve( def list( self, *, - associated_object_id: str | NotGiven = NOT_GIVEN, - category: event_list_params.Category | NotGiven = NOT_GIVEN, - created_at: event_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + associated_object_id: str | Omit = omit, + category: event_list_params.Category | Omit = omit, + created_at: event_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Event, AsyncPage[Event]]: """ List Events diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index e81c74caf..6e9911b12 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -7,7 +7,7 @@ import httpx from ..types import export_list_params, export_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -56,19 +56,19 @@ def create( "entity_csv", "vendor_csv", ], - account_statement_bai2: export_create_params.AccountStatementBai2 | NotGiven = NOT_GIVEN, - account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, - balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, - bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, - entity_csv: export_create_params.EntityCsv | NotGiven = NOT_GIVEN, - transaction_csv: export_create_params.TransactionCsv | NotGiven = NOT_GIVEN, - vendor_csv: object | NotGiven = NOT_GIVEN, + account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, + account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, + balance_csv: export_create_params.BalanceCsv | Omit = omit, + bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, + entity_csv: export_create_params.EntityCsv | Omit = omit, + transaction_csv: export_create_params.TransactionCsv | Omit = omit, + vendor_csv: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Export: """ @@ -153,7 +153,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Export: """ Retrieve an Export @@ -182,18 +182,18 @@ def retrieve( def list( self, *, - category: export_list_params.Category | NotGiven = NOT_GIVEN, - created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: export_list_params.Status | NotGiven = NOT_GIVEN, + category: export_list_params.Category | Omit = omit, + created_at: export_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: export_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Export]: """ List Exports @@ -273,19 +273,19 @@ async def create( "entity_csv", "vendor_csv", ], - account_statement_bai2: export_create_params.AccountStatementBai2 | NotGiven = NOT_GIVEN, - account_statement_ofx: export_create_params.AccountStatementOfx | NotGiven = NOT_GIVEN, - balance_csv: export_create_params.BalanceCsv | NotGiven = NOT_GIVEN, - bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | NotGiven = NOT_GIVEN, - entity_csv: export_create_params.EntityCsv | NotGiven = NOT_GIVEN, - transaction_csv: export_create_params.TransactionCsv | NotGiven = NOT_GIVEN, - vendor_csv: object | NotGiven = NOT_GIVEN, + account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, + account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, + balance_csv: export_create_params.BalanceCsv | Omit = omit, + bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, + entity_csv: export_create_params.EntityCsv | Omit = omit, + transaction_csv: export_create_params.TransactionCsv | Omit = omit, + vendor_csv: object | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Export: """ @@ -370,7 +370,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Export: """ Retrieve an Export @@ -399,18 +399,18 @@ async def retrieve( def list( self, *, - category: export_list_params.Category | NotGiven = NOT_GIVEN, - created_at: export_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: export_list_params.Status | NotGiven = NOT_GIVEN, + category: export_list_params.Category | Omit = omit, + created_at: export_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: export_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Export, AsyncPage[Export]]: """ List Exports diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 504541b01..f1ec6f568 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -7,7 +7,7 @@ import httpx from ..types import external_account_list_params, external_account_create_params, external_account_update_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,14 +50,14 @@ def create( account_number: str, description: str, routing_number: str, - account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, + account_holder: Literal["business", "individual", "unknown"] | Omit = omit, + funding: Literal["checking", "savings", "general_ledger", "other"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ExternalAccount: """ @@ -125,7 +125,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ExternalAccount: """ Retrieve an External Account @@ -157,16 +157,16 @@ def update( self, external_account_id: str, *, - account_holder: Literal["business", "individual"] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, - status: Literal["active", "archived"] | NotGiven = NOT_GIVEN, + account_holder: Literal["business", "individual"] | Omit = omit, + description: str | Omit = omit, + funding: Literal["checking", "savings", "general_ledger", "other"] | Omit = omit, + status: Literal["active", "archived"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ExternalAccount: """ @@ -233,17 +233,17 @@ def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, - status: external_account_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + routing_number: str | Omit = omit, + status: external_account_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[ExternalAccount]: """ List External Accounts @@ -318,14 +318,14 @@ async def create( account_number: str, description: str, routing_number: str, - account_holder: Literal["business", "individual", "unknown"] | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, + account_holder: Literal["business", "individual", "unknown"] | Omit = omit, + funding: Literal["checking", "savings", "general_ledger", "other"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ExternalAccount: """ @@ -393,7 +393,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> ExternalAccount: """ Retrieve an External Account @@ -425,16 +425,16 @@ async def update( self, external_account_id: str, *, - account_holder: Literal["business", "individual"] | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - funding: Literal["checking", "savings", "general_ledger", "other"] | NotGiven = NOT_GIVEN, - status: Literal["active", "archived"] | NotGiven = NOT_GIVEN, + account_holder: Literal["business", "individual"] | Omit = omit, + description: str | Omit = omit, + funding: Literal["checking", "savings", "general_ledger", "other"] | Omit = omit, + status: Literal["active", "archived"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ExternalAccount: """ @@ -501,17 +501,17 @@ async def update( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, - status: external_account_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + routing_number: str | Omit = omit, + status: external_account_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[ExternalAccount, AsyncPage[ExternalAccount]]: """ List External Accounts diff --git a/src/increase/resources/file_links.py b/src/increase/resources/file_links.py index c0979d3ca..cb8a8f9e0 100644 --- a/src/increase/resources/file_links.py +++ b/src/increase/resources/file_links.py @@ -8,7 +8,7 @@ import httpx from ..types import file_link_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,13 +48,13 @@ def create( self, *, file_id: str, - expires_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + expires_at: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> FileLink: """ @@ -120,13 +120,13 @@ async def create( self, *, file_id: str, - expires_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + expires_at: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> FileLink: """ diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 28ed80ac5..9cbdf7227 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -8,7 +8,7 @@ import httpx from ..types import file_list_params, file_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven, FileTypes +from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -68,13 +68,13 @@ def create( "unusual_activity_report_attachment", "proof_of_authorization_request_submission", ], - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> File: """ @@ -164,7 +164,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> File: """ Retrieve a File @@ -193,17 +193,17 @@ def retrieve( def list( self, *, - created_at: file_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - purpose: file_list_params.Purpose | NotGiven = NOT_GIVEN, + created_at: file_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + purpose: file_list_params.Purpose | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[File]: """ List Files @@ -293,13 +293,13 @@ async def create( "unusual_activity_report_attachment", "proof_of_authorization_request_submission", ], - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> File: """ @@ -389,7 +389,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> File: """ Retrieve a File @@ -418,17 +418,17 @@ async def retrieve( def list( self, *, - created_at: file_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - purpose: file_list_params.Purpose | NotGiven = NOT_GIVEN, + created_at: file_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + purpose: file_list_params.Purpose | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[File, AsyncPage[File]]: """ List Files diff --git a/src/increase/resources/groups.py b/src/increase/resources/groups.py index 188e92568..9090fde98 100644 --- a/src/increase/resources/groups.py +++ b/src/increase/resources/groups.py @@ -4,7 +4,7 @@ import httpx -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Query, Headers, NotGiven, not_given from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -47,7 +47,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Group: """Returns details for the currently authenticated Group.""" return self._get( @@ -87,7 +87,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Group: """Returns details for the currently authenticated Group.""" return await self._get( diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 3e475ab67..465202ce1 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -12,7 +12,7 @@ inbound_ach_transfer_transfer_return_params, inbound_ach_transfer_create_notification_of_change_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -58,7 +58,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundACHTransfer: """ Retrieve an Inbound ACH Transfer @@ -89,18 +89,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_ach_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: inbound_ach_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundACHTransfer]: """ List Inbound ACH Transfers @@ -150,14 +150,14 @@ def create_notification_of_change( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, + updated_account_number: str | Omit = omit, + updated_routing_number: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ @@ -220,13 +220,13 @@ def decline( "duplicate_entry", "corporate_customer_advised_not_authorized", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ @@ -311,7 +311,7 @@ def transfer_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ @@ -403,7 +403,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundACHTransfer: """ Retrieve an Inbound ACH Transfer @@ -434,18 +434,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_ach_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: inbound_ach_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_ach_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: inbound_ach_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundACHTransfer, AsyncPage[InboundACHTransfer]]: """ List Inbound ACH Transfers @@ -495,14 +495,14 @@ async def create_notification_of_change( self, inbound_ach_transfer_id: str, *, - updated_account_number: str | NotGiven = NOT_GIVEN, - updated_routing_number: str | NotGiven = NOT_GIVEN, + updated_account_number: str | Omit = omit, + updated_routing_number: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ @@ -565,13 +565,13 @@ async def decline( "duplicate_entry", "corporate_customer_advised_not_authorized", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ @@ -656,7 +656,7 @@ async def transfer_return( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """ diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 3cfe75998..4337bcd62 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -7,7 +7,7 @@ import httpx from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -53,7 +53,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundCheckDeposit: """ Retrieve an Inbound Check Deposit @@ -84,17 +84,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - check_transfer_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + check_transfer_id: str | Omit = omit, + created_at: inbound_check_deposit_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundCheckDeposit]: """ List Inbound Check Deposits @@ -149,7 +149,7 @@ def decline( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """ @@ -200,7 +200,7 @@ def return_( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """ @@ -276,7 +276,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundCheckDeposit: """ Retrieve an Inbound Check Deposit @@ -307,17 +307,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - check_transfer_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_check_deposit_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + check_transfer_id: str | Omit = omit, + created_at: inbound_check_deposit_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundCheckDeposit, AsyncPage[InboundCheckDeposit]]: """ List Inbound Check Deposits @@ -372,7 +372,7 @@ async def decline( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """ @@ -423,7 +423,7 @@ async def return_( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """ diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 041ef09f3..b36f5c791 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -5,7 +5,7 @@ import httpx from ..types import inbound_mail_item_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundMailItem: """ Retrieve an Inbound Mail Item @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - created_at: inbound_mail_item_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - lockbox_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_mail_item_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + lockbox_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundMailItem]: """ List Inbound Mail Items @@ -163,7 +163,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundMailItem: """ Retrieve an Inbound Mail Item @@ -194,16 +194,16 @@ async def retrieve( def list( self, *, - created_at: inbound_mail_item_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - lockbox_id: str | NotGiven = NOT_GIVEN, + created_at: inbound_mail_item_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + lockbox_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundMailItem, AsyncPage[InboundMailItem]]: """ List Inbound Mail Items diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index 599bbd639..8bbf1d4f8 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -5,7 +5,7 @@ import httpx from ..types import inbound_real_time_payments_transfer_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundRealTimePaymentsTransfer: """ Retrieve an Inbound Real-Time Payments Transfer @@ -82,17 +82,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundRealTimePaymentsTransfer]: """ List Inbound Real-Time Payments Transfers @@ -169,7 +169,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundRealTimePaymentsTransfer: """ Retrieve an Inbound Real-Time Payments Transfer @@ -200,17 +200,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_real_time_payments_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundRealTimePaymentsTransfer, AsyncPage[InboundRealTimePaymentsTransfer]]: """ List Inbound Real-Time Payments Transfers diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index d510d8da9..b1e02507a 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -5,7 +5,7 @@ import httpx from ..types import inbound_wire_drawdown_request_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundWireDrawdownRequest: """ Retrieve an Inbound Wire Drawdown Request @@ -82,14 +82,14 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundWireDrawdownRequest]: """ List Inbound Wire Drawdown Requests @@ -157,7 +157,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundWireDrawdownRequest: """ Retrieve an Inbound Wire Drawdown Request @@ -188,14 +188,14 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundWireDrawdownRequest, AsyncPage[InboundWireDrawdownRequest]]: """ List Inbound Wire Drawdown Requests diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 1bca46b3e..964804140 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -7,7 +7,7 @@ import httpx from ..types import inbound_wire_transfer_list_params, inbound_wire_transfer_reverse_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -53,7 +53,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundWireTransfer: """ Retrieve an Inbound Wire Transfer @@ -84,19 +84,19 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, - wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_wire_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: inbound_wire_transfer_list_params.Status | Omit = omit, + wire_drawdown_request_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[InboundWireTransfer]: """ List Inbound Wire Transfers @@ -156,7 +156,7 @@ def reverse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireTransfer: """ @@ -230,7 +230,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> InboundWireTransfer: """ Retrieve an Inbound Wire Transfer @@ -261,19 +261,19 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - account_number_id: str | NotGiven = NOT_GIVEN, - created_at: inbound_wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: inbound_wire_transfer_list_params.Status | NotGiven = NOT_GIVEN, - wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_wire_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: inbound_wire_transfer_list_params.Status | Omit = omit, + wire_drawdown_request_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[InboundWireTransfer, AsyncPage[InboundWireTransfer]]: """ List Inbound Wire Transfers @@ -333,7 +333,7 @@ async def reverse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireTransfer: """ diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 9e2a36bc3..0fadbae5e 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -5,7 +5,7 @@ import httpx from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ @@ -101,7 +101,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiAccountEnrollment: """ Get an IntraFi Account Enrollment @@ -132,17 +132,17 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: intrafi_account_enrollment_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[IntrafiAccountEnrollment]: """ List IntraFi Account Enrollments @@ -199,7 +199,7 @@ def unenroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ @@ -265,7 +265,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ @@ -314,7 +314,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiAccountEnrollment: """ Get an IntraFi Account Enrollment @@ -345,17 +345,17 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: intrafi_account_enrollment_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: intrafi_account_enrollment_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[IntrafiAccountEnrollment, AsyncPage[IntrafiAccountEnrollment]]: """ List IntraFi Account Enrollments @@ -412,7 +412,7 @@ async def unenroll( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiAccountEnrollment: """ diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index 8b6ac706e..c911a5756 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -4,7 +4,7 @@ import httpx -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Query, Headers, NotGiven, not_given from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -48,7 +48,7 @@ def intrafi_balance( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiBalance: """Returns the IntraFi balance for the given account. @@ -107,7 +107,7 @@ async def intrafi_balance( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiBalance: """Returns the IntraFi balance for the given account. diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index b0cbe9eee..53e2563c4 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -5,7 +5,7 @@ import httpx from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiExclusion: """ @@ -101,7 +101,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiExclusion: """ Get an IntraFi Exclusion @@ -132,16 +132,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[IntrafiExclusion]: """ List IntraFi Exclusions @@ -197,7 +197,7 @@ def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiExclusion: """ @@ -265,7 +265,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiExclusion: """ @@ -314,7 +314,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> IntrafiExclusion: """ Get an IntraFi Exclusion @@ -345,16 +345,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - entity_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + entity_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[IntrafiExclusion, AsyncPage[IntrafiExclusion]]: """ List IntraFi Exclusions @@ -410,7 +410,7 @@ async def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> IntrafiExclusion: """ diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 41929469c..4d6b565af 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -7,7 +7,7 @@ import httpx from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,14 +48,14 @@ def create( self, *, account_id: str, - description: str | NotGiven = NOT_GIVEN, - recipient_name: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Lockbox: """ @@ -107,7 +107,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Lockbox: """ Retrieve a Lockbox @@ -137,15 +137,15 @@ def update( self, lockbox_id: str, *, - description: str | NotGiven = NOT_GIVEN, - recipient_name: str | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + recipient_name: str | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Lockbox: """ @@ -200,17 +200,17 @@ def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: lockbox_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: lockbox_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Lockbox]: """ List Lockboxes @@ -283,14 +283,14 @@ async def create( self, *, account_id: str, - description: str | NotGiven = NOT_GIVEN, - recipient_name: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Lockbox: """ @@ -342,7 +342,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Lockbox: """ Retrieve a Lockbox @@ -372,15 +372,15 @@ async def update( self, lockbox_id: str, *, - description: str | NotGiven = NOT_GIVEN, - recipient_name: str | NotGiven = NOT_GIVEN, - status: Literal["active", "inactive"] | NotGiven = NOT_GIVEN, + description: str | Omit = omit, + recipient_name: str | Omit = omit, + status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Lockbox: """ @@ -435,17 +435,17 @@ async def update( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: lockbox_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: lockbox_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Lockbox, AsyncPage[Lockbox]]: """ List Lockboxes diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index 264bffaad..d69d83ab3 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -5,7 +5,7 @@ import httpx from ..types import oauth_application_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OAuthApplication: """ Retrieve an OAuth Application @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - created_at: oauth_application_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: oauth_application_list_params.Status | NotGiven = NOT_GIVEN, + created_at: oauth_application_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: oauth_application_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[OAuthApplication]: """ List OAuth Applications @@ -161,7 +161,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OAuthApplication: """ Retrieve an OAuth Application @@ -192,16 +192,16 @@ async def retrieve( def list( self, *, - created_at: oauth_application_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: oauth_application_list_params.Status | NotGiven = NOT_GIVEN, + created_at: oauth_application_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + status: oauth_application_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[OAuthApplication, AsyncPage[OAuthApplication]]: """ List OAuth Applications diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index cd789dd90..aa27390ad 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -5,7 +5,7 @@ import httpx from ..types import oauth_connection_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OAuthConnection: """ Retrieve an OAuth Connection @@ -82,16 +82,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - oauth_application_id: str | NotGiven = NOT_GIVEN, - status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, + oauth_application_id: str | Omit = omit, + status: oauth_connection_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[OAuthConnection]: """ List OAuth Connections @@ -164,7 +164,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> OAuthConnection: """ Retrieve an OAuth Connection @@ -195,16 +195,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - oauth_application_id: str | NotGiven = NOT_GIVEN, - status: oauth_connection_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, + oauth_application_id: str | Omit = omit, + status: oauth_connection_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[OAuthConnection, AsyncPage[OAuthConnection]]: """ List OAuth Connections diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index b50ee71d9..143368459 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -7,7 +7,7 @@ import httpx from ..types import oauth_token_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,16 +47,16 @@ def create( self, *, grant_type: Literal["authorization_code", "production_token"], - client_id: str | NotGiven = NOT_GIVEN, - client_secret: str | NotGiven = NOT_GIVEN, - code: str | NotGiven = NOT_GIVEN, - production_token: str | NotGiven = NOT_GIVEN, + client_id: str | Omit = omit, + client_secret: str | Omit = omit, + code: str | Omit = omit, + production_token: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> OAuthToken: """ @@ -139,16 +139,16 @@ async def create( self, *, grant_type: Literal["authorization_code", "production_token"], - client_id: str | NotGiven = NOT_GIVEN, - client_secret: str | NotGiven = NOT_GIVEN, - code: str | NotGiven = NOT_GIVEN, - production_token: str | NotGiven = NOT_GIVEN, + client_id: str | Omit = omit, + client_secret: str | Omit = omit, + code: str | Omit = omit, + production_token: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> OAuthToken: """ diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index e431de9ce..19747929c 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -5,7 +5,7 @@ import httpx from ..types import pending_transaction_list_params, pending_transaction_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -47,13 +47,13 @@ def create( *, account_id: str, amount: int, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """Creates a pending transaction on an account. @@ -111,7 +111,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PendingTransaction: """ Retrieve a Pending Transaction @@ -142,19 +142,19 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: pending_transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: pending_transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, - status: pending_transaction_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: pending_transaction_list_params.Category | Omit = omit, + created_at: pending_transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, + status: pending_transaction_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[PendingTransaction]: """ List Pending Transactions @@ -210,7 +210,7 @@ def release( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """Release a Pending Transaction you had previously created. @@ -275,13 +275,13 @@ async def create( *, account_id: str, amount: int, - description: str | NotGiven = NOT_GIVEN, + description: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """Creates a pending transaction on an account. @@ -339,7 +339,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PendingTransaction: """ Retrieve a Pending Transaction @@ -370,19 +370,19 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: pending_transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: pending_transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, - status: pending_transaction_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: pending_transaction_list_params.Category | Omit = omit, + created_at: pending_transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, + status: pending_transaction_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[PendingTransaction, AsyncPage[PendingTransaction]]: """ List Pending Transactions @@ -438,7 +438,7 @@ async def release( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """Release a Pending Transaction you had previously created. diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index bdb2092ef..d33b520e9 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -11,7 +11,7 @@ physical_card_profile_clone_params, physical_card_profile_create_params, ) -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -56,17 +56,17 @@ def create( description: str, front_image_file_id: str, program_id: str, - back_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, - card_stock_reference: str | NotGiven = NOT_GIVEN, - carrier_stock_reference: str | NotGiven = NOT_GIVEN, - front_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, - front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, + back_color: Literal["black", "white"] | Omit = omit, + card_stock_reference: str | Omit = omit, + carrier_stock_reference: str | Omit = omit, + front_color: Literal["black", "white"] | Omit = omit, + front_text: physical_card_profile_create_params.FrontText | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ @@ -148,7 +148,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PhysicalCardProfile: """ Retrieve a Card Profile @@ -179,16 +179,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: physical_card_profile_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: physical_card_profile_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[PhysicalCardProfile]: """ List Physical Card Profiles @@ -242,7 +242,7 @@ def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ @@ -281,18 +281,18 @@ def clone( self, physical_card_profile_id: str, *, - carrier_image_file_id: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - front_image_file_id: str | NotGiven = NOT_GIVEN, - front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, + carrier_image_file_id: str | Omit = omit, + contact_phone: str | Omit = omit, + description: str | Omit = omit, + front_image_file_id: str | Omit = omit, + front_text: physical_card_profile_clone_params.FrontText | Omit = omit, + program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ @@ -380,17 +380,17 @@ async def create( description: str, front_image_file_id: str, program_id: str, - back_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, - card_stock_reference: str | NotGiven = NOT_GIVEN, - carrier_stock_reference: str | NotGiven = NOT_GIVEN, - front_color: Literal["black", "white"] | NotGiven = NOT_GIVEN, - front_text: physical_card_profile_create_params.FrontText | NotGiven = NOT_GIVEN, + back_color: Literal["black", "white"] | Omit = omit, + card_stock_reference: str | Omit = omit, + carrier_stock_reference: str | Omit = omit, + front_color: Literal["black", "white"] | Omit = omit, + front_text: physical_card_profile_create_params.FrontText | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ @@ -472,7 +472,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PhysicalCardProfile: """ Retrieve a Card Profile @@ -503,16 +503,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: physical_card_profile_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: physical_card_profile_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[PhysicalCardProfile, AsyncPage[PhysicalCardProfile]]: """ List Physical Card Profiles @@ -566,7 +566,7 @@ async def archive( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ @@ -605,18 +605,18 @@ async def clone( self, physical_card_profile_id: str, *, - carrier_image_file_id: str | NotGiven = NOT_GIVEN, - contact_phone: str | NotGiven = NOT_GIVEN, - description: str | NotGiven = NOT_GIVEN, - front_image_file_id: str | NotGiven = NOT_GIVEN, - front_text: physical_card_profile_clone_params.FrontText | NotGiven = NOT_GIVEN, - program_id: str | NotGiven = NOT_GIVEN, + carrier_image_file_id: str | Omit = omit, + contact_phone: str | Omit = omit, + description: str | Omit = omit, + front_image_file_id: str | Omit = omit, + front_text: physical_card_profile_clone_params.FrontText | Omit = omit, + program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCardProfile: """ diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index c329b4bf4..818ed4baf 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -7,7 +7,7 @@ import httpx from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,13 +50,13 @@ def create( card_id: str, cardholder: physical_card_create_params.Cardholder, shipment: physical_card_create_params.Shipment, - physical_card_profile_id: str | NotGiven = NOT_GIVEN, + physical_card_profile_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -112,7 +112,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PhysicalCard: """ Retrieve a Physical Card @@ -148,7 +148,7 @@ def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -191,17 +191,17 @@ def update( def list( self, *, - card_id: str | NotGiven = NOT_GIVEN, - created_at: physical_card_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_id: str | Omit = omit, + created_at: physical_card_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[PhysicalCard]: """ List Physical Cards @@ -276,13 +276,13 @@ async def create( card_id: str, cardholder: physical_card_create_params.Cardholder, shipment: physical_card_create_params.Shipment, - physical_card_profile_id: str | NotGiven = NOT_GIVEN, + physical_card_profile_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -338,7 +338,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> PhysicalCard: """ Retrieve a Physical Card @@ -374,7 +374,7 @@ async def update( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -417,17 +417,17 @@ async def update( def list( self, *, - card_id: str | NotGiven = NOT_GIVEN, - created_at: physical_card_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + card_id: str | Omit = omit, + created_at: physical_card_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[PhysicalCard, AsyncPage[PhysicalCard]]: """ List Physical Cards diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 96ce2e3b1..9130af3fc 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -5,7 +5,7 @@ import httpx from ..types import program_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Program: """ Retrieve a Program @@ -80,14 +80,14 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Program]: """ List Programs @@ -155,7 +155,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Program: """ Retrieve a Program @@ -184,14 +184,14 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Program, AsyncPage[Program]]: """ List Programs diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index d60d2a577..70ca02c13 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -5,7 +5,7 @@ import httpx from ..types import real_time_decision_action_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RealTimeDecision: """ Retrieve a Real-Time Decision @@ -82,19 +82,17 @@ def action( self, real_time_decision_id: str, *, - card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, - card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge - | NotGiven = NOT_GIVEN, - card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, - digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication - | NotGiven = NOT_GIVEN, - digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | NotGiven = NOT_GIVEN, + card_authentication: real_time_decision_action_params.CardAuthentication | Omit = omit, + card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge | Omit = omit, + card_authorization: real_time_decision_action_params.CardAuthorization | Omit = omit, + digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | Omit = omit, + digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimeDecision: """ @@ -184,7 +182,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RealTimeDecision: """ Retrieve a Real-Time Decision @@ -216,19 +214,17 @@ async def action( self, real_time_decision_id: str, *, - card_authentication: real_time_decision_action_params.CardAuthentication | NotGiven = NOT_GIVEN, - card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge - | NotGiven = NOT_GIVEN, - card_authorization: real_time_decision_action_params.CardAuthorization | NotGiven = NOT_GIVEN, - digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication - | NotGiven = NOT_GIVEN, - digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | NotGiven = NOT_GIVEN, + card_authentication: real_time_decision_action_params.CardAuthentication | Omit = omit, + card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge | Omit = omit, + card_authorization: real_time_decision_action_params.CardAuthorization | Omit = omit, + digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | Omit = omit, + digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimeDecision: """ diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 0a52effd7..40605dc8e 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -5,7 +5,7 @@ import httpx from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -49,19 +49,19 @@ def create( creditor_name: str, remittance_information: str, source_account_number_id: str, - debtor_name: str | NotGiven = NOT_GIVEN, - destination_account_number: str | NotGiven = NOT_GIVEN, - destination_routing_number: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - ultimate_creditor_name: str | NotGiven = NOT_GIVEN, - ultimate_debtor_name: str | NotGiven = NOT_GIVEN, + debtor_name: str | Omit = omit, + destination_account_number: str | Omit = omit, + destination_routing_number: str | Omit = omit, + external_account_id: str | Omit = omit, + require_approval: bool | Omit = omit, + ultimate_creditor_name: str | Omit = omit, + ultimate_debtor_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -144,7 +144,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RealTimePaymentsTransfer: """ Retrieve a Real-Time Payments Transfer @@ -175,19 +175,19 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: real_time_payments_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: real_time_payments_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: real_time_payments_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[RealTimePaymentsTransfer]: """ List Real-Time Payments Transfers @@ -249,7 +249,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -293,7 +293,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -356,19 +356,19 @@ async def create( creditor_name: str, remittance_information: str, source_account_number_id: str, - debtor_name: str | NotGiven = NOT_GIVEN, - destination_account_number: str | NotGiven = NOT_GIVEN, - destination_routing_number: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - ultimate_creditor_name: str | NotGiven = NOT_GIVEN, - ultimate_debtor_name: str | NotGiven = NOT_GIVEN, + debtor_name: str | Omit = omit, + destination_account_number: str | Omit = omit, + destination_routing_number: str | Omit = omit, + external_account_id: str | Omit = omit, + require_approval: bool | Omit = omit, + ultimate_creditor_name: str | Omit = omit, + ultimate_debtor_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -451,7 +451,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> RealTimePaymentsTransfer: """ Retrieve a Real-Time Payments Transfer @@ -482,19 +482,19 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: real_time_payments_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: real_time_payments_transfer_list_params.Status | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: real_time_payments_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: real_time_payments_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[RealTimePaymentsTransfer, AsyncPage[RealTimePaymentsTransfer]]: """ List Real-Time Payments Transfers @@ -556,7 +556,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -600,7 +600,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index a9689c3e0..569b565d2 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -5,7 +5,7 @@ import httpx from ..types import routing_number_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -46,14 +46,14 @@ def list( self, *, routing_number: str, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[RoutingNumberListResponse]: """ You can use this API to confirm if a routing number is valid, such as when a @@ -122,14 +122,14 @@ def list( self, *, routing_number: str, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: """ You can use this API to confirm if a routing number is valid, such as when a diff --git a/src/increase/resources/simulations/account_statements.py b/src/increase/resources/simulations/account_statements.py index b26241422..723749793 100644 --- a/src/increase/resources/simulations/account_statements.py +++ b/src/increase/resources/simulations/account_statements.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountStatement: """ @@ -115,7 +115,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountStatement: """ diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 82bbcf024..14ff9974d 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def complete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ @@ -116,7 +116,7 @@ async def complete( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> AccountTransfer: """ diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 69ba3e5ac..b224645f3 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -56,7 +56,7 @@ def acknowledge( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -125,7 +125,7 @@ def create_notification_of_change( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -282,13 +282,13 @@ def return_( "untimely_dishonored_return", "untimely_return", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -479,14 +479,13 @@ def settle( self, ach_transfer_id: str, *, - inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] - | NotGiven = NOT_GIVEN, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -548,7 +547,7 @@ def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -616,7 +615,7 @@ async def acknowledge( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -685,7 +684,7 @@ async def create_notification_of_change( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -842,13 +841,13 @@ async def return_( "untimely_dishonored_return", "untimely_return", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -1039,14 +1038,13 @@ async def settle( self, ach_transfer_id: str, *, - inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] - | NotGiven = NOT_GIVEN, + inbound_funds_hold_behavior: Literal["release_immediately", "release_on_default_schedule"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ @@ -1108,7 +1106,7 @@ async def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> ACHTransfer: """ diff --git a/src/increase/resources/simulations/card_authorization_expirations.py b/src/increase/resources/simulations/card_authorization_expirations.py index 0b517063f..9442f22bd 100644 --- a/src/increase/resources/simulations/card_authorization_expirations.py +++ b/src/increase/resources/simulations/card_authorization_expirations.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """ @@ -115,7 +115,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """ diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index a15dcf9c1..c570372c4 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -47,8 +47,8 @@ def create( self, *, amount: int, - authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, - card_id: str | NotGiven = NOT_GIVEN, + authenticated_card_payment_id: str | Omit = omit, + card_id: str | Omit = omit, decline_reason: Literal[ "account_closed", "card_not_active", @@ -71,26 +71,26 @@ def create( "suspected_card_testing", "suspected_fraud", ] - | NotGiven = NOT_GIVEN, - digital_wallet_token_id: str | NotGiven = NOT_GIVEN, - event_subscription_id: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, - merchant_category_code: str | NotGiven = NOT_GIVEN, - merchant_city: str | NotGiven = NOT_GIVEN, - merchant_country: str | NotGiven = NOT_GIVEN, - merchant_descriptor: str | NotGiven = NOT_GIVEN, - merchant_state: str | NotGiven = NOT_GIVEN, - network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, - network_risk_score: int | NotGiven = NOT_GIVEN, - physical_card_id: str | NotGiven = NOT_GIVEN, - processing_category: card_authorization_create_params.ProcessingCategory | NotGiven = NOT_GIVEN, - terminal_id: str | NotGiven = NOT_GIVEN, + | Omit = omit, + digital_wallet_token_id: str | Omit = omit, + event_subscription_id: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_city: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_descriptor: str | Omit = omit, + merchant_state: str | Omit = omit, + network_details: card_authorization_create_params.NetworkDetails | Omit = omit, + network_risk_score: int | Omit = omit, + physical_card_id: str | Omit = omit, + processing_category: card_authorization_create_params.ProcessingCategory | Omit = omit, + terminal_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). @@ -247,8 +247,8 @@ async def create( self, *, amount: int, - authenticated_card_payment_id: str | NotGiven = NOT_GIVEN, - card_id: str | NotGiven = NOT_GIVEN, + authenticated_card_payment_id: str | Omit = omit, + card_id: str | Omit = omit, decline_reason: Literal[ "account_closed", "card_not_active", @@ -271,26 +271,26 @@ async def create( "suspected_card_testing", "suspected_fraud", ] - | NotGiven = NOT_GIVEN, - digital_wallet_token_id: str | NotGiven = NOT_GIVEN, - event_subscription_id: str | NotGiven = NOT_GIVEN, - merchant_acceptor_id: str | NotGiven = NOT_GIVEN, - merchant_category_code: str | NotGiven = NOT_GIVEN, - merchant_city: str | NotGiven = NOT_GIVEN, - merchant_country: str | NotGiven = NOT_GIVEN, - merchant_descriptor: str | NotGiven = NOT_GIVEN, - merchant_state: str | NotGiven = NOT_GIVEN, - network_details: card_authorization_create_params.NetworkDetails | NotGiven = NOT_GIVEN, - network_risk_score: int | NotGiven = NOT_GIVEN, - physical_card_id: str | NotGiven = NOT_GIVEN, - processing_category: card_authorization_create_params.ProcessingCategory | NotGiven = NOT_GIVEN, - terminal_id: str | NotGiven = NOT_GIVEN, + | Omit = omit, + digital_wallet_token_id: str | Omit = omit, + event_subscription_id: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_city: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_descriptor: str | Omit = omit, + merchant_state: str | Omit = omit, + network_details: card_authorization_create_params.NetworkDetails | Omit = omit, + network_risk_score: int | Omit = omit, + physical_card_id: str | Omit = omit, + processing_category: card_authorization_create_params.ProcessingCategory | Omit = omit, + terminal_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardAuthorizationCreateResponse: """Simulates a purchase authorization on a [Card](#cards). diff --git a/src/increase/resources/simulations/card_fuel_confirmations.py b/src/increase/resources/simulations/card_fuel_confirmations.py index 487db65ea..6477b2746 100644 --- a/src/increase/resources/simulations/card_fuel_confirmations.py +++ b/src/increase/resources/simulations/card_fuel_confirmations.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the fuel confirmation of an authorization by a card acquirer. @@ -126,7 +126,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the fuel confirmation of an authorization by a card acquirer. diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py index e45309b26..43b0f87b7 100644 --- a/src/increase/resources/simulations/card_increments.py +++ b/src/increase/resources/simulations/card_increments.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,13 +46,13 @@ def create( *, amount: int, card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, + event_subscription_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the increment of an authorization by a card acquirer. @@ -126,13 +126,13 @@ async def create( *, amount: int, card_payment_id: str, - event_subscription_id: str | NotGiven = NOT_GIVEN, + event_subscription_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the increment of an authorization by a card acquirer. diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index e3c26c46b..597d864b5 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates refunding a card transaction. @@ -115,7 +115,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates refunding a card transaction. diff --git a/src/increase/resources/simulations/card_reversals.py b/src/increase/resources/simulations/card_reversals.py index 46470cc48..7224c6c2c 100644 --- a/src/increase/resources/simulations/card_reversals.py +++ b/src/increase/resources/simulations/card_reversals.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -45,13 +45,13 @@ def create( self, *, card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the reversal of an authorization by a card acquirer. @@ -121,13 +121,13 @@ async def create( self, *, card_payment_id: str, - amount: int | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPayment: """Simulates the reversal of an authorization by a card acquirer. diff --git a/src/increase/resources/simulations/card_settlements.py b/src/increase/resources/simulations/card_settlements.py index 20450e8a5..de0c38637 100644 --- a/src/increase/resources/simulations/card_settlements.py +++ b/src/increase/resources/simulations/card_settlements.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,13 +46,13 @@ def create( *, card_id: str, pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates the settlement of an authorization by a card acquirer. @@ -128,13 +128,13 @@ async def create( *, card_id: str, pending_transaction_id: str, - amount: int | NotGiven = NOT_GIVEN, + amount: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates the settlement of an authorization by a card acquirer. diff --git a/src/increase/resources/simulations/card_tokens.py b/src/increase/resources/simulations/card_tokens.py index 950073777..3b1febad3 100644 --- a/src/increase/resources/simulations/card_tokens.py +++ b/src/increase/resources/simulations/card_tokens.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -47,17 +47,17 @@ def with_streaming_response(self) -> CardTokensResourceWithStreamingResponse: def create( self, *, - capabilities: Iterable[card_token_create_params.Capability] | NotGiven = NOT_GIVEN, - expiration: Union[str, date] | NotGiven = NOT_GIVEN, - last4: str | NotGiven = NOT_GIVEN, - prefix: str | NotGiven = NOT_GIVEN, - primary_account_number_length: int | NotGiven = NOT_GIVEN, + capabilities: Iterable[card_token_create_params.Capability] | Omit = omit, + expiration: Union[str, date] | Omit = omit, + last4: str | Omit = omit, + prefix: str | Omit = omit, + primary_account_number_length: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardToken: """ @@ -130,17 +130,17 @@ def with_streaming_response(self) -> AsyncCardTokensResourceWithStreamingRespons async def create( self, *, - capabilities: Iterable[card_token_create_params.Capability] | NotGiven = NOT_GIVEN, - expiration: Union[str, date] | NotGiven = NOT_GIVEN, - last4: str | NotGiven = NOT_GIVEN, - prefix: str | NotGiven = NOT_GIVEN, - primary_account_number_length: int | NotGiven = NOT_GIVEN, + capabilities: Iterable[card_token_create_params.Capability] | Omit = omit, + expiration: Union[str, date] | Omit = omit, + last4: str | Omit = omit, + prefix: str | Omit = omit, + primary_account_number_length: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardToken: """ diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 8b03a9fd7..ba4448fb8 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def reject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ @@ -92,7 +92,7 @@ def return_( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """Simulates the return of a [Check Deposit](#check-deposits). @@ -136,7 +136,7 @@ def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ @@ -200,7 +200,7 @@ async def reject( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ @@ -244,7 +244,7 @@ async def return_( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """Simulates the return of a [Check Deposit](#check-deposits). @@ -288,7 +288,7 @@ async def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckDeposit: """ diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index 8d947b849..a326ff168 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def mail( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ @@ -114,7 +114,7 @@ async def mail( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: """ diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index af31793aa..9b562ebe6 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalWalletTokenRequestCreateResponse: """ @@ -115,7 +115,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> DigitalWalletTokenRequestCreateResponse: """ diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py index 1486bbc53..0f85ae779 100644 --- a/src/increase/resources/simulations/documents.py +++ b/src/increase/resources/simulations/documents.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,7 +50,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Document: """ @@ -112,7 +112,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Document: """ diff --git a/src/increase/resources/simulations/inbound_ach_transfers.py b/src/increase/resources/simulations/inbound_ach_transfers.py index 85a462ba1..2b1997530 100644 --- a/src/increase/resources/simulations/inbound_ach_transfers.py +++ b/src/increase/resources/simulations/inbound_ach_transfers.py @@ -8,7 +8,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,15 +50,15 @@ def create( *, account_number_id: str, amount: int, - addenda: inbound_ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + addenda: inbound_ach_transfer_create_params.Addenda | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_id: str | Omit = omit, + company_name: str | Omit = omit, + receiver_id_number: str | Omit = omit, + receiver_name: str | Omit = omit, + resolve_at: Union[str, datetime] | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", @@ -77,13 +77,13 @@ def create( "destroyed_check", "international_ach_transaction", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """Simulates an inbound ACH transfer to your account. @@ -209,15 +209,15 @@ async def create( *, account_number_id: str, amount: int, - addenda: inbound_ach_transfer_create_params.Addenda | NotGiven = NOT_GIVEN, - company_descriptive_date: str | NotGiven = NOT_GIVEN, - company_discretionary_data: str | NotGiven = NOT_GIVEN, - company_entry_description: str | NotGiven = NOT_GIVEN, - company_id: str | NotGiven = NOT_GIVEN, - company_name: str | NotGiven = NOT_GIVEN, - receiver_id_number: str | NotGiven = NOT_GIVEN, - receiver_name: str | NotGiven = NOT_GIVEN, - resolve_at: Union[str, datetime] | NotGiven = NOT_GIVEN, + addenda: inbound_ach_transfer_create_params.Addenda | Omit = omit, + company_descriptive_date: str | Omit = omit, + company_discretionary_data: str | Omit = omit, + company_entry_description: str | Omit = omit, + company_id: str | Omit = omit, + company_name: str | Omit = omit, + receiver_id_number: str | Omit = omit, + receiver_name: str | Omit = omit, + resolve_at: Union[str, datetime] | Omit = omit, standard_entry_class_code: Literal[ "corporate_credit_or_debit", "corporate_trade_exchange", @@ -236,13 +236,13 @@ async def create( "destroyed_check", "international_ach_transaction", ] - | NotGiven = NOT_GIVEN, + | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundACHTransfer: """Simulates an inbound ACH transfer to your account. diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index f68b011e3..3eb460566 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,13 +49,13 @@ def create( account_number_id: str, amount: int, check_number: str, - payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | NotGiven = NOT_GIVEN, + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """Simulates an Inbound Check Deposit against your account. @@ -142,13 +142,13 @@ async def create( account_number_id: str, amount: int, check_number: str, - payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | NotGiven = NOT_GIVEN, + payee_name_analysis: Literal["name_matches", "does_not_match", "not_evaluated"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundCheckDeposit: """Simulates an Inbound Check Deposit against your account. diff --git a/src/increase/resources/simulations/inbound_mail_items.py b/src/increase/resources/simulations/inbound_mail_items.py index c6a0a683c..3439589af 100755 --- a/src/increase/resources/simulations/inbound_mail_items.py +++ b/src/increase/resources/simulations/inbound_mail_items.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,13 +46,13 @@ def create( *, amount: int, lockbox_id: str, - contents_file_id: str | NotGiven = NOT_GIVEN, + contents_file_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundMailItem: """ @@ -123,13 +123,13 @@ async def create( *, amount: int, lockbox_id: str, - contents_file_id: str | NotGiven = NOT_GIVEN, + contents_file_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundMailItem: """ diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index 147ec04f9..e518e0c78 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,17 +46,17 @@ def create( *, account_number_id: str, amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + remittance_information: str | Omit = omit, + request_for_payment_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundRealTimePaymentsTransfer: """ @@ -140,17 +140,17 @@ async def create( *, account_number_id: str, amount: int, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - remittance_information: str | NotGiven = NOT_GIVEN, - request_for_payment_id: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + remittance_information: str | Omit = omit, + request_for_payment_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundRealTimePaymentsTransfer: """ diff --git a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py index 494eaa8e0..12f0842c7 100644 --- a/src/increase/resources/simulations/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/simulations/inbound_wire_drawdown_requests.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,26 +49,26 @@ def create( creditor_routing_number: str, currency: str, recipient_account_number_id: str, - creditor_address_line1: str | NotGiven = NOT_GIVEN, - creditor_address_line2: str | NotGiven = NOT_GIVEN, - creditor_address_line3: str | NotGiven = NOT_GIVEN, - creditor_name: str | NotGiven = NOT_GIVEN, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_address_line1: str | NotGiven = NOT_GIVEN, - debtor_address_line2: str | NotGiven = NOT_GIVEN, - debtor_address_line3: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - end_to_end_identification: str | NotGiven = NOT_GIVEN, - instruction_identification: str | NotGiven = NOT_GIVEN, - unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, - unstructured_remittance_information: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | Omit = omit, + creditor_address_line2: str | Omit = omit, + creditor_address_line3: str | Omit = omit, + creditor_name: str | Omit = omit, + debtor_account_number: str | Omit = omit, + debtor_address_line1: str | Omit = omit, + debtor_address_line2: str | Omit = omit, + debtor_address_line3: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + end_to_end_identification: str | Omit = omit, + instruction_identification: str | Omit = omit, + unique_end_to_end_transaction_reference: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireDrawdownRequest: """ @@ -198,26 +198,26 @@ async def create( creditor_routing_number: str, currency: str, recipient_account_number_id: str, - creditor_address_line1: str | NotGiven = NOT_GIVEN, - creditor_address_line2: str | NotGiven = NOT_GIVEN, - creditor_address_line3: str | NotGiven = NOT_GIVEN, - creditor_name: str | NotGiven = NOT_GIVEN, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_address_line1: str | NotGiven = NOT_GIVEN, - debtor_address_line2: str | NotGiven = NOT_GIVEN, - debtor_address_line3: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, - end_to_end_identification: str | NotGiven = NOT_GIVEN, - instruction_identification: str | NotGiven = NOT_GIVEN, - unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, - unstructured_remittance_information: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | Omit = omit, + creditor_address_line2: str | Omit = omit, + creditor_address_line3: str | Omit = omit, + creditor_name: str | Omit = omit, + debtor_account_number: str | Omit = omit, + debtor_address_line1: str | Omit = omit, + debtor_address_line2: str | Omit = omit, + debtor_address_line3: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + end_to_end_identification: str | Omit = omit, + instruction_identification: str | Omit = omit, + unique_end_to_end_transaction_reference: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireDrawdownRequest: """ diff --git a/src/increase/resources/simulations/inbound_wire_transfers.py b/src/increase/resources/simulations/inbound_wire_transfers.py index 6815a6006..06c7372b3 100644 --- a/src/increase/resources/simulations/inbound_wire_transfers.py +++ b/src/increase/resources/simulations/inbound_wire_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -46,26 +46,26 @@ def create( *, account_number_id: str, amount: int, - creditor_address_line1: str | NotGiven = NOT_GIVEN, - creditor_address_line2: str | NotGiven = NOT_GIVEN, - creditor_address_line3: str | NotGiven = NOT_GIVEN, - creditor_name: str | NotGiven = NOT_GIVEN, - debtor_address_line1: str | NotGiven = NOT_GIVEN, - debtor_address_line2: str | NotGiven = NOT_GIVEN, - debtor_address_line3: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - end_to_end_identification: str | NotGiven = NOT_GIVEN, - instructing_agent_routing_number: str | NotGiven = NOT_GIVEN, - instruction_identification: str | NotGiven = NOT_GIVEN, - unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, - unstructured_remittance_information: str | NotGiven = NOT_GIVEN, - wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | Omit = omit, + creditor_address_line2: str | Omit = omit, + creditor_address_line3: str | Omit = omit, + creditor_name: str | Omit = omit, + debtor_address_line1: str | Omit = omit, + debtor_address_line2: str | Omit = omit, + debtor_address_line3: str | Omit = omit, + debtor_name: str | Omit = omit, + end_to_end_identification: str | Omit = omit, + instructing_agent_routing_number: str | Omit = omit, + instruction_identification: str | Omit = omit, + unique_end_to_end_transaction_reference: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, + wire_drawdown_request_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireTransfer: """ @@ -187,26 +187,26 @@ async def create( *, account_number_id: str, amount: int, - creditor_address_line1: str | NotGiven = NOT_GIVEN, - creditor_address_line2: str | NotGiven = NOT_GIVEN, - creditor_address_line3: str | NotGiven = NOT_GIVEN, - creditor_name: str | NotGiven = NOT_GIVEN, - debtor_address_line1: str | NotGiven = NOT_GIVEN, - debtor_address_line2: str | NotGiven = NOT_GIVEN, - debtor_address_line3: str | NotGiven = NOT_GIVEN, - debtor_name: str | NotGiven = NOT_GIVEN, - end_to_end_identification: str | NotGiven = NOT_GIVEN, - instructing_agent_routing_number: str | NotGiven = NOT_GIVEN, - instruction_identification: str | NotGiven = NOT_GIVEN, - unique_end_to_end_transaction_reference: str | NotGiven = NOT_GIVEN, - unstructured_remittance_information: str | NotGiven = NOT_GIVEN, - wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, + creditor_address_line1: str | Omit = omit, + creditor_address_line2: str | Omit = omit, + creditor_address_line3: str | Omit = omit, + creditor_name: str | Omit = omit, + debtor_address_line1: str | Omit = omit, + debtor_address_line2: str | Omit = omit, + debtor_address_line3: str | Omit = omit, + debtor_name: str | Omit = omit, + end_to_end_identification: str | Omit = omit, + instructing_agent_routing_number: str | Omit = omit, + instruction_identification: str | Omit = omit, + unique_end_to_end_transaction_reference: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, + wire_drawdown_request_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> InboundWireTransfer: """ diff --git a/src/increase/resources/simulations/interest_payments.py b/src/increase/resources/simulations/interest_payments.py index a853190c5..afa6f2f3b 100644 --- a/src/increase/resources/simulations/interest_payments.py +++ b/src/increase/resources/simulations/interest_payments.py @@ -7,7 +7,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -49,15 +49,15 @@ def create( *, account_id: str, amount: int, - accrued_on_account_id: str | NotGiven = NOT_GIVEN, - period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + accrued_on_account_id: str | Omit = omit, + period_end: Union[str, datetime] | Omit = omit, + period_start: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates an interest payment to your account. @@ -134,15 +134,15 @@ async def create( *, account_id: str, amount: int, - accrued_on_account_id: str | NotGiven = NOT_GIVEN, - period_end: Union[str, datetime] | NotGiven = NOT_GIVEN, - period_start: Union[str, datetime] | NotGiven = NOT_GIVEN, + accrued_on_account_id: str | Omit = omit, + period_end: Union[str, datetime] | Omit = omit, + period_start: Union[str, datetime] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Transaction: """Simulates an interest payment to your account. diff --git a/src/increase/resources/simulations/pending_transactions.py b/src/increase/resources/simulations/pending_transactions.py index 8124c03d8..8d1911943 100644 --- a/src/increase/resources/simulations/pending_transactions.py +++ b/src/increase/resources/simulations/pending_transactions.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def release_inbound_funds_hold( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """ @@ -115,7 +115,7 @@ async def release_inbound_funds_hold( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PendingTransaction: """ diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 6a8cd98cd..740bf9106 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -8,7 +8,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -57,7 +57,7 @@ def advance_shipment( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -117,16 +117,16 @@ def tracking_updates( physical_card_id: str, *, category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], - carrier_estimated_delivery_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - postal_code: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, + carrier_estimated_delivery_at: Union[str, datetime] | Omit = omit, + city: str | Omit = omit, + postal_code: str | Omit = omit, + state: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -220,7 +220,7 @@ async def advance_shipment( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ @@ -280,16 +280,16 @@ async def tracking_updates( physical_card_id: str, *, category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], - carrier_estimated_delivery_at: Union[str, datetime] | NotGiven = NOT_GIVEN, - city: str | NotGiven = NOT_GIVEN, - postal_code: str | NotGiven = NOT_GIVEN, - state: str | NotGiven = NOT_GIVEN, + carrier_estimated_delivery_at: Union[str, datetime] | Omit = omit, + city: str | Omit = omit, + postal_code: str | Omit = omit, + state: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> PhysicalCard: """ diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index c965a47d4..33982aa56 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -6,7 +6,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -50,14 +50,14 @@ def create( bank: Literal[ "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" ] - | NotGiven = NOT_GIVEN, - reserve_account_id: str | NotGiven = NOT_GIVEN, + | Omit = omit, + reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Program: """Simulates a [Program](#programs) being created in your group. @@ -138,14 +138,14 @@ async def create( bank: Literal[ "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" ] - | NotGiven = NOT_GIVEN, - reserve_account_id: str | NotGiven = NOT_GIVEN, + | Omit = omit, + reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Program: """Simulates a [Program](#programs) being created in your group. diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 03e36e904..28faff7a0 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -45,13 +45,13 @@ def complete( self, real_time_payments_transfer_id: str, *, - rejection: real_time_payments_transfer_complete_params.Rejection | NotGiven = NOT_GIVEN, + rejection: real_time_payments_transfer_complete_params.Rejection | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ @@ -120,13 +120,13 @@ async def complete( self, real_time_payments_transfer_id: str, *, - rejection: real_time_payments_transfer_complete_params.Rejection | NotGiven = NOT_GIVEN, + rejection: real_time_payments_transfer_complete_params.Rejection | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> RealTimePaymentsTransfer: """ diff --git a/src/increase/resources/simulations/wire_drawdown_requests.py b/src/increase/resources/simulations/wire_drawdown_requests.py index 1d4f89344..2b56cd0de 100644 --- a/src/increase/resources/simulations/wire_drawdown_requests.py +++ b/src/increase/resources/simulations/wire_drawdown_requests.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def refuse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ @@ -92,7 +92,7 @@ def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ @@ -157,7 +157,7 @@ async def refuse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ @@ -201,7 +201,7 @@ async def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 3bada2696..0be0eeaa4 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -4,7 +4,7 @@ import httpx -from ..._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from ..._types import Body, Query, Headers, NotGiven, not_given from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -48,7 +48,7 @@ def reverse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -93,7 +93,7 @@ def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -158,7 +158,7 @@ async def reverse( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -203,7 +203,7 @@ async def submit( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index 169d3c679..adb9d9645 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -5,7 +5,7 @@ import httpx from ..types import supplemental_document_list_params, supplemental_document_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,7 +52,7 @@ def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EntitySupplementalDocument: """ @@ -96,15 +96,15 @@ def list( self, *, entity_id: str, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[EntitySupplementalDocument]: """ List Entity Supplemental Document Submissions @@ -182,7 +182,7 @@ async def create( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> EntitySupplementalDocument: """ @@ -226,15 +226,15 @@ def list( self, *, entity_id: str, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: """ List Entity Supplemental Document Submissions diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index d9d6a50da..d61dda617 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -5,7 +5,7 @@ import httpx from ..types import transaction_list_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -51,7 +51,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Transaction: """ Retrieve a Transaction @@ -80,18 +80,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: transaction_list_params.Category | Omit = omit, + created_at: transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[Transaction]: """ List Transactions @@ -168,7 +168,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> Transaction: """ Retrieve a Transaction @@ -197,18 +197,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - category: transaction_list_params.Category | NotGiven = NOT_GIVEN, - created_at: transaction_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - route_id: str | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + category: transaction_list_params.Category | Omit = omit, + created_at: transaction_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + route_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[Transaction, AsyncPage[Transaction]]: """ List Transactions diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 8b5e86906..ee73f74d0 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -5,7 +5,7 @@ import httpx from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -52,15 +52,15 @@ def create( debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, unstructured_remittance_information: str, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_external_account_id: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | Omit = omit, + debtor_external_account_id: str | Omit = omit, + debtor_routing_number: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ @@ -134,7 +134,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WireDrawdownRequest: """ Retrieve a Wire Drawdown Request @@ -165,16 +165,16 @@ def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: wire_drawdown_request_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[WireDrawdownRequest]: """ List Wire Drawdown Requests @@ -250,15 +250,15 @@ async def create( debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, unstructured_remittance_information: str, - debtor_account_number: str | NotGiven = NOT_GIVEN, - debtor_external_account_id: str | NotGiven = NOT_GIVEN, - debtor_routing_number: str | NotGiven = NOT_GIVEN, + debtor_account_number: str | Omit = omit, + debtor_external_account_id: str | Omit = omit, + debtor_routing_number: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireDrawdownRequest: """ @@ -332,7 +332,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WireDrawdownRequest: """ Retrieve a Wire Drawdown Request @@ -363,16 +363,16 @@ async def retrieve( def list( self, *, - cursor: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, - status: wire_drawdown_request_list_params.Status | NotGiven = NOT_GIVEN, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: wire_drawdown_request_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[WireDrawdownRequest, AsyncPage[WireDrawdownRequest]]: """ List Wire Drawdown Requests diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index da633ad18..0ee8c5cbd 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -5,7 +5,7 @@ import httpx from ..types import wire_transfer_list_params, wire_transfer_create_params -from .._types import NOT_GIVEN, Body, Query, Headers, NotGiven +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource @@ -48,26 +48,26 @@ def create( account_id: str, amount: int, beneficiary_name: str, - account_number: str | NotGiven = NOT_GIVEN, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - inbound_wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, - source_account_number_id: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + beneficiary_address_line1: str | Omit = omit, + beneficiary_address_line2: str | Omit = omit, + beneficiary_address_line3: str | Omit = omit, + external_account_id: str | Omit = omit, + inbound_wire_drawdown_request_id: str | Omit = omit, + originator_address_line1: str | Omit = omit, + originator_address_line2: str | Omit = omit, + originator_address_line3: str | Omit = omit, + originator_name: str | Omit = omit, + remittance: wire_transfer_create_params.Remittance | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + source_account_number_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -168,7 +168,7 @@ def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WireTransfer: """ Retrieve a Wire Transfer @@ -197,18 +197,18 @@ def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: wire_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> SyncPage[WireTransfer]: """ List Wire Transfers @@ -268,7 +268,7 @@ def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -310,7 +310,7 @@ def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -370,26 +370,26 @@ async def create( account_id: str, amount: int, beneficiary_name: str, - account_number: str | NotGiven = NOT_GIVEN, - beneficiary_address_line1: str | NotGiven = NOT_GIVEN, - beneficiary_address_line2: str | NotGiven = NOT_GIVEN, - beneficiary_address_line3: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - inbound_wire_drawdown_request_id: str | NotGiven = NOT_GIVEN, - originator_address_line1: str | NotGiven = NOT_GIVEN, - originator_address_line2: str | NotGiven = NOT_GIVEN, - originator_address_line3: str | NotGiven = NOT_GIVEN, - originator_name: str | NotGiven = NOT_GIVEN, - remittance: wire_transfer_create_params.Remittance | NotGiven = NOT_GIVEN, - require_approval: bool | NotGiven = NOT_GIVEN, - routing_number: str | NotGiven = NOT_GIVEN, - source_account_number_id: str | NotGiven = NOT_GIVEN, + account_number: str | Omit = omit, + beneficiary_address_line1: str | Omit = omit, + beneficiary_address_line2: str | Omit = omit, + beneficiary_address_line3: str | Omit = omit, + external_account_id: str | Omit = omit, + inbound_wire_drawdown_request_id: str | Omit = omit, + originator_address_line1: str | Omit = omit, + originator_address_line2: str | Omit = omit, + originator_address_line3: str | Omit = omit, + originator_name: str | Omit = omit, + remittance: wire_transfer_create_params.Remittance | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + source_account_number_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -490,7 +490,7 @@ async def retrieve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> WireTransfer: """ Retrieve a Wire Transfer @@ -519,18 +519,18 @@ async def retrieve( def list( self, *, - account_id: str | NotGiven = NOT_GIVEN, - created_at: wire_transfer_list_params.CreatedAt | NotGiven = NOT_GIVEN, - cursor: str | NotGiven = NOT_GIVEN, - external_account_id: str | NotGiven = NOT_GIVEN, - idempotency_key: str | NotGiven = NOT_GIVEN, - limit: int | NotGiven = NOT_GIVEN, + account_id: str | Omit = omit, + created_at: wire_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, ) -> AsyncPaginator[WireTransfer, AsyncPage[WireTransfer]]: """ List Wire Transfers @@ -590,7 +590,7 @@ async def approve( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ @@ -632,7 +632,7 @@ async def cancel( extra_headers: Headers | None = None, extra_query: Query | None = None, extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = NOT_GIVEN, + timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> WireTransfer: """ diff --git a/tests/test_transform.py b/tests/test_transform.py index 7b9ba4c28..0631bbd09 100644 --- a/tests/test_transform.py +++ b/tests/test_transform.py @@ -8,7 +8,7 @@ import pytest -from increase._types import NOT_GIVEN, Base64FileInput +from increase._types import Base64FileInput, omit, not_given from increase._utils import ( PropertyInfo, transform as _transform, @@ -450,4 +450,11 @@ async def test_transform_skipping(use_async: bool) -> None: @pytest.mark.asyncio async def test_strips_notgiven(use_async: bool) -> None: assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} - assert await transform({"foo_bar": NOT_GIVEN}, Foo1, use_async) == {} + assert await transform({"foo_bar": not_given}, Foo1, use_async) == {} + + +@parametrize +@pytest.mark.asyncio +async def test_strips_omit(use_async: bool) -> None: + assert await transform({"foo_bar": "bar"}, Foo1, use_async) == {"fooBar": "bar"} + assert await transform({"foo_bar": omit}, Foo1, use_async) == {} From 4c184e3f71ca1a8b42b34531956e1bf9b98c3d1f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 00:42:50 +0000 Subject: [PATCH 0860/1325] feat(api): api update --- .stats.yml | 4 ++-- .../types/real_time_decision_action_params.py | 13 ++++--------- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d419a59b..d5dac36dd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-61d42e1f44023df8161e3b35d6154011e638f78b3b232379396ea8980d6257b5.yml -openapi_spec_hash: 8831b733d617f5c7ee39db3cb62da20c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8d71e78a4afd7e1ce2436bf2428777d623f468bb3b6c37c36ed8ed3155fe6c77.yml +openapi_spec_hash: 3064d7c7468a53e4797ef16b648fd06d config_hash: e1e8bc2138a13f290956ae6687f099cd diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index a1e1d2887..831c017a8 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -101,15 +101,10 @@ class CardAuthorizationApproval(TypedDict, total=False): """Your decisions on whether or not each provided address component is a match. Your response here is evaluated against the customer's provided `postal_code` - and `line1`, and an appropriate network response is generated. For example, if - you would like to approve all transactions for a given card, you can submit - `match` for both `postal_code` and `line1` and Increase will generate an - approval with an Address Verification System (AVS) code that will match all of - the available address information, or will report that no check was performed if - no address information is available. If you do not provide a response, the - address verification result will be calculated by Increase using the available - address information available on the card. If none is available, Increase will - report that no check was performed. + and `line1`, and an appropriate network response is generated. For more + information, see our + [Address Verification System Codes and Overrides](https://increase.com/documentation/address-verification-system-codes-and-overrides) + guide. """ From 2d7dcda776591ffa34cf99d256c0d1b73019a179 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 00:45:46 +0000 Subject: [PATCH 0861/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fd28aa524..e4f54275b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.331.0" + ".": "0.332.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0e7acca04..e2dc43124 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.331.0" +version = "0.332.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3536e1ec2..2f0ca575f 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.331.0" # x-release-please-version +__version__ = "0.332.0" # x-release-please-version From 853e728c92a66278bc1c5e46585f2b6741162ab8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 17:42:15 +0000 Subject: [PATCH 0862/1325] chore: do not install brew dependencies in ./scripts/bootstrap by default --- scripts/bootstrap | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/scripts/bootstrap b/scripts/bootstrap index e84fe62c3..b430fee36 100755 --- a/scripts/bootstrap +++ b/scripts/bootstrap @@ -4,10 +4,18 @@ set -e cd "$(dirname "$0")/.." -if ! command -v rye >/dev/null 2>&1 && [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ]; then +if [ -f "Brewfile" ] && [ "$(uname -s)" = "Darwin" ] && [ "$SKIP_BREW" != "1" ] && [ -t 0 ]; then brew bundle check >/dev/null 2>&1 || { - echo "==> Installing Homebrew dependencies…" - brew bundle + echo -n "==> Install Homebrew dependencies? (y/N): " + read -r response + case "$response" in + [yY][eE][sS]|[yY]) + brew bundle + ;; + *) + ;; + esac + echo } fi From b301275a8f17b03abdfea38a06efb10ba580cd1f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:17:22 +0000 Subject: [PATCH 0863/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 20 +- src/increase/_client.py | 9 + src/increase/resources/__init__.py | 14 + src/increase/resources/card_details.py | 392 ++++++++++++++++++ src/increase/resources/cards.py | 210 +--------- .../resources/simulations/physical_cards.py | 216 +++++----- src/increase/types/__init__.py | 5 +- ...rd_detail_create_details_iframe_params.py} | 4 +- .../types/card_detail_update_params.py | 12 + src/increase/types/card_update_params.py | 3 + src/increase/types/simulations/__init__.py | 4 +- ...rams.py => physical_card_create_params.py} | 4 +- .../simulations/test_physical_cards.py | 144 +++---- tests/api_resources/test_card_details.py | 279 +++++++++++++ tests/api_resources/test_cards.py | 176 +------- 16 files changed, 930 insertions(+), 570 deletions(-) create mode 100644 src/increase/resources/card_details.py rename src/increase/types/{card_create_details_iframe_params.py => card_detail_create_details_iframe_params.py} (69%) create mode 100644 src/increase/types/card_detail_update_params.py rename src/increase/types/simulations/{physical_card_tracking_updates_params.py => physical_card_create_params.py} (91%) create mode 100644 tests/api_resources/test_card_details.py diff --git a/.stats.yml b/.stats.yml index d5dac36dd..876bf2616 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 213 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8d71e78a4afd7e1ce2436bf2428777d623f468bb3b6c37c36ed8ed3155fe6c77.yml -openapi_spec_hash: 3064d7c7468a53e4797ef16b648fd06d -config_hash: e1e8bc2138a13f290956ae6687f099cd +configured_endpoints: 214 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6241d4f5ad4269845e96fe2c674d19f586894ca27456095fee5a70dede9ea19c.yml +openapi_spec_hash: 81e8f749b8ca89085b599b2c346a773d +config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/api.md b/api.md index acce5706e..dcd9a2b98 100644 --- a/api.md +++ b/api.md @@ -51,7 +51,7 @@ Methods: Types: ```python -from increase.types import Card, CardDetails, CardIframeURL +from increase.types import Card ``` Methods: @@ -60,8 +60,20 @@ Methods: - client.cards.retrieve(card_id) -> Card - client.cards.update(card_id, \*\*params) -> Card - client.cards.list(\*\*params) -> SyncPage[Card] -- client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL -- client.cards.details(card_id) -> CardDetails + +# CardDetails + +Types: + +```python +from increase.types import CardDetails, CardIframeURL +``` + +Methods: + +- client.card_details.update(card_id, \*\*params) -> CardDetails +- client.card_details.create_details_iframe(card_id, \*\*params) -> CardIframeURL +- client.card_details.details(card_id) -> CardDetails # CardPayments @@ -823,8 +835,8 @@ Methods: Methods: +- client.simulations.physical_cards.create(physical_card_id, \*\*params) -> PhysicalCard - client.simulations.physical_cards.advance_shipment(physical_card_id, \*\*params) -> PhysicalCard -- client.simulations.physical_cards.tracking_updates(physical_card_id, \*\*params) -> PhysicalCard ## DigitalWalletTokenRequests diff --git a/src/increase/_client.py b/src/increase/_client.py index 1e1afe163..eef09a1cc 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -38,6 +38,7 @@ lockboxes, file_links, card_tokens, + card_details, oauth_tokens, transactions, ach_transfers, @@ -112,6 +113,7 @@ class Increase(SyncAPIClient): account_numbers: account_numbers.AccountNumbersResource account_transfers: account_transfers.AccountTransfersResource cards: cards.CardsResource + card_details: card_details.CardDetailsResource card_payments: card_payments.CardPaymentsResource card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource physical_cards: physical_cards.PhysicalCardsResource @@ -257,6 +259,7 @@ def __init__( self.account_numbers = account_numbers.AccountNumbersResource(self) self.account_transfers = account_transfers.AccountTransfersResource(self) self.cards = cards.CardsResource(self) + self.card_details = card_details.CardDetailsResource(self) self.card_payments = card_payments.CardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) self.physical_cards = physical_cards.PhysicalCardsResource(self) @@ -471,6 +474,7 @@ class AsyncIncrease(AsyncAPIClient): account_numbers: account_numbers.AsyncAccountNumbersResource account_transfers: account_transfers.AsyncAccountTransfersResource cards: cards.AsyncCardsResource + card_details: card_details.AsyncCardDetailsResource card_payments: card_payments.AsyncCardPaymentsResource card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource physical_cards: physical_cards.AsyncPhysicalCardsResource @@ -618,6 +622,7 @@ def __init__( self.account_numbers = account_numbers.AsyncAccountNumbersResource(self) self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) self.cards = cards.AsyncCardsResource(self) + self.card_details = card_details.AsyncCardDetailsResource(self) self.card_payments = card_payments.AsyncCardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) @@ -835,6 +840,7 @@ def __init__(self, client: Increase) -> None: self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers) self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) self.cards = cards.CardsResourceWithRawResponse(client.cards) + self.card_details = card_details.CardDetailsResourceWithRawResponse(client.card_details) self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements @@ -945,6 +951,7 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_transfers ) self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards) + self.card_details = card_details.AsyncCardDetailsResourceWithRawResponse(client.card_details) self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements @@ -1069,6 +1076,7 @@ def __init__(self, client: Increase) -> None: client.account_transfers ) self.cards = cards.CardsResourceWithStreamingResponse(client.cards) + self.card_details = card_details.CardDetailsResourceWithStreamingResponse(client.card_details) self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( client.card_purchase_supplements @@ -1193,6 +1201,7 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_transfers ) self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards) + self.card_details = card_details.AsyncCardDetailsResourceWithStreamingResponse(client.card_details) self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = ( card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 4f8236321..3f2b30ee3 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -104,6 +104,14 @@ SimulationsResourceWithStreamingResponse, AsyncSimulationsResourceWithStreamingResponse, ) +from .card_details import ( + CardDetailsResource, + AsyncCardDetailsResource, + CardDetailsResourceWithRawResponse, + AsyncCardDetailsResourceWithRawResponse, + CardDetailsResourceWithStreamingResponse, + AsyncCardDetailsResourceWithStreamingResponse, +) from .oauth_tokens import ( OAuthTokensResource, AsyncOAuthTokensResource, @@ -458,6 +466,12 @@ "AsyncCardsResourceWithRawResponse", "CardsResourceWithStreamingResponse", "AsyncCardsResourceWithStreamingResponse", + "CardDetailsResource", + "AsyncCardDetailsResource", + "CardDetailsResourceWithRawResponse", + "AsyncCardDetailsResourceWithRawResponse", + "CardDetailsResourceWithStreamingResponse", + "AsyncCardDetailsResourceWithStreamingResponse", "CardPaymentsResource", "AsyncCardPaymentsResource", "CardPaymentsResourceWithRawResponse", diff --git a/src/increase/resources/card_details.py b/src/increase/resources/card_details.py new file mode 100644 index 000000000..b328b9fab --- /dev/null +++ b/src/increase/resources/card_details.py @@ -0,0 +1,392 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import card_detail_update_params, card_detail_create_details_iframe_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from .._base_client import make_request_options +from ..types.card_details import CardDetails +from ..types.card_iframe_url import CardIframeURL + +__all__ = ["CardDetailsResource", "AsyncCardDetailsResource"] + + +class CardDetailsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardDetailsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardDetailsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardDetailsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardDetailsResourceWithStreamingResponse(self) + + def update( + self, + card_id: str, + *, + pin: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDetails: + """ + Update a Card's Details + + Args: + card_id: The card identifier. + + pin: The 4-digit PIN for the card, for use with ATMs. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._patch( + f"/cards/{card_id}/details", + body=maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDetails, + ) + + def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to retrieve details for. + + physical_card_id: The identifier of the Physical Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._post( + f"/cards/{card_id}/create_details_iframe", + body=maybe_transform( + {"physical_card_id": physical_card_id}, + card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + + def details( + self, + card_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDetails: + """ + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. + + Args: + card_id: The identifier of the Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._get( + f"/cards/{card_id}/details", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDetails, + ) + + +class AsyncCardDetailsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardDetailsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardDetailsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardDetailsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardDetailsResourceWithStreamingResponse(self) + + async def update( + self, + card_id: str, + *, + pin: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDetails: + """ + Update a Card's Details + + Args: + card_id: The card identifier. + + pin: The 4-digit PIN for the card, for use with ATMs. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._patch( + f"/cards/{card_id}/details", + body=await async_maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDetails, + ) + + async def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to retrieve details for. + + physical_card_id: The identifier of the Physical Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._post( + f"/cards/{card_id}/create_details_iframe", + body=await async_maybe_transform( + {"physical_card_id": physical_card_id}, + card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + + async def details( + self, + card_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDetails: + """ + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. + + Args: + card_id: The identifier of the Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._get( + f"/cards/{card_id}/details", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDetails, + ) + + +class CardDetailsResourceWithRawResponse: + def __init__(self, card_details: CardDetailsResource) -> None: + self._card_details = card_details + + self.update = to_raw_response_wrapper( + card_details.update, + ) + self.create_details_iframe = to_raw_response_wrapper( + card_details.create_details_iframe, + ) + self.details = to_raw_response_wrapper( + card_details.details, + ) + + +class AsyncCardDetailsResourceWithRawResponse: + def __init__(self, card_details: AsyncCardDetailsResource) -> None: + self._card_details = card_details + + self.update = async_to_raw_response_wrapper( + card_details.update, + ) + self.create_details_iframe = async_to_raw_response_wrapper( + card_details.create_details_iframe, + ) + self.details = async_to_raw_response_wrapper( + card_details.details, + ) + + +class CardDetailsResourceWithStreamingResponse: + def __init__(self, card_details: CardDetailsResource) -> None: + self._card_details = card_details + + self.update = to_streamed_response_wrapper( + card_details.update, + ) + self.create_details_iframe = to_streamed_response_wrapper( + card_details.create_details_iframe, + ) + self.details = to_streamed_response_wrapper( + card_details.details, + ) + + +class AsyncCardDetailsResourceWithStreamingResponse: + def __init__(self, card_details: AsyncCardDetailsResource) -> None: + self._card_details = card_details + + self.update = async_to_streamed_response_wrapper( + card_details.update, + ) + self.create_details_iframe = async_to_streamed_response_wrapper( + card_details.create_details_iframe, + ) + self.details = async_to_streamed_response_wrapper( + card_details.details, + ) diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 5256867bb..93b4025bc 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,7 +6,7 @@ import httpx -from ..types import card_list_params, card_create_params, card_update_params, card_create_details_iframe_params +from ..types import card_list_params, card_create_params, card_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -20,8 +20,6 @@ from ..pagination import SyncPage, AsyncPage from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options -from ..types.card_details import CardDetails -from ..types.card_iframe_url import CardIframeURL __all__ = ["CardsResource", "AsyncCardsResource"] @@ -156,6 +154,7 @@ def update( description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, entity_id: str | Omit = omit, + pin: str | Omit = omit, status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -182,6 +181,8 @@ def update( entity_id: The Entity the card belongs to. You only need to supply this in rare situations when the card is not for the Account holder. + pin: The 4-digit PIN for the card, for use with ATMs. + status: The status to update the Card with. - `active` - The card is active. @@ -208,6 +209,7 @@ def update( "description": description, "digital_wallet": digital_wallet, "entity_id": entity_id, + "pin": pin, "status": status, }, card_update_params.CardUpdateParams, @@ -285,93 +287,6 @@ def list( model=Card, ) - def create_details_iframe( - self, - card_id: str, - *, - physical_card_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardIframeURL: - """Create an iframe URL for a Card to display the card details. - - More details about - styling and usage can be found in the - [documentation](/documentation/embedded-card-component). - - Args: - card_id: The identifier of the Card to retrieve details for. - - physical_card_id: The identifier of the Physical Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return self._post( - f"/cards/{card_id}/create_details_iframe", - body=maybe_transform( - {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardIframeURL, - ) - - def details( - self, - card_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDetails: - """ - Sensitive details for a Card include the primary account number, expiry, card - verification code, and PIN. - - Args: - card_id: The identifier of the Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return self._get( - f"/cards/{card_id}/details", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDetails, - ) - class AsyncCardsResource(AsyncAPIResource): @cached_property @@ -503,6 +418,7 @@ async def update( description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, entity_id: str | Omit = omit, + pin: str | Omit = omit, status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -529,6 +445,8 @@ async def update( entity_id: The Entity the card belongs to. You only need to supply this in rare situations when the card is not for the Account holder. + pin: The 4-digit PIN for the card, for use with ATMs. + status: The status to update the Card with. - `active` - The card is active. @@ -555,6 +473,7 @@ async def update( "description": description, "digital_wallet": digital_wallet, "entity_id": entity_id, + "pin": pin, "status": status, }, card_update_params.CardUpdateParams, @@ -632,93 +551,6 @@ def list( model=Card, ) - async def create_details_iframe( - self, - card_id: str, - *, - physical_card_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardIframeURL: - """Create an iframe URL for a Card to display the card details. - - More details about - styling and usage can be found in the - [documentation](/documentation/embedded-card-component). - - Args: - card_id: The identifier of the Card to retrieve details for. - - physical_card_id: The identifier of the Physical Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return await self._post( - f"/cards/{card_id}/create_details_iframe", - body=await async_maybe_transform( - {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardIframeURL, - ) - - async def details( - self, - card_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDetails: - """ - Sensitive details for a Card include the primary account number, expiry, card - verification code, and PIN. - - Args: - card_id: The identifier of the Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return await self._get( - f"/cards/{card_id}/details", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDetails, - ) - class CardsResourceWithRawResponse: def __init__(self, cards: CardsResource) -> None: @@ -736,12 +568,6 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_raw_response_wrapper( cards.list, ) - self.create_details_iframe = to_raw_response_wrapper( - cards.create_details_iframe, - ) - self.details = to_raw_response_wrapper( - cards.details, - ) class AsyncCardsResourceWithRawResponse: @@ -760,12 +586,6 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_raw_response_wrapper( cards.list, ) - self.create_details_iframe = async_to_raw_response_wrapper( - cards.create_details_iframe, - ) - self.details = async_to_raw_response_wrapper( - cards.details, - ) class CardsResourceWithStreamingResponse: @@ -784,12 +604,6 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_streamed_response_wrapper( cards.list, ) - self.create_details_iframe = to_streamed_response_wrapper( - cards.create_details_iframe, - ) - self.details = to_streamed_response_wrapper( - cards.details, - ) class AsyncCardsResourceWithStreamingResponse: @@ -808,9 +622,3 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) - self.create_details_iframe = async_to_streamed_response_wrapper( - cards.create_details_iframe, - ) - self.details = async_to_streamed_response_wrapper( - cards.details, - ) diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index 740bf9106..bc2b3413d 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -19,7 +19,7 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import physical_card_advance_shipment_params, physical_card_tracking_updates_params +from ...types.simulations import physical_card_create_params, physical_card_advance_shipment_params from ...types.physical_card import PhysicalCard __all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] @@ -45,74 +45,7 @@ def with_streaming_response(self) -> PhysicalCardsResourceWithStreamingResponse: """ return PhysicalCardsResourceWithStreamingResponse(self) - def advance_shipment( - self, - physical_card_id: str, - *, - shipment_status: Literal[ - "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" - ], - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> PhysicalCard: - """ - This endpoint allows you to simulate advancing the shipment status of a Physical - Card, to simulate e.g., that a physical card was attempted shipped but then - failed delivery. - - Args: - physical_card_id: The Physical Card you would like to action. - - shipment_status: The shipment status to move the Physical Card to. - - - `pending` - The physical card has not yet been shipped. - - `canceled` - The physical card shipment was canceled prior to submission. - - `submitted` - The physical card shipment has been submitted to the card - fulfillment provider. - - `acknowledged` - The physical card shipment has been acknowledged by the card - fulfillment provider and will be processed in their next batch. - - `rejected` - The physical card shipment was rejected by the card printer due - to an error. - - `shipped` - The physical card has been shipped. - - `returned` - The physical card shipment was returned to the sender and - destroyed by the production facility. - - `requires_attention` - The physical card shipment requires attention from - Increase before progressing. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not physical_card_id: - raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") - return self._post( - f"/simulations/physical_cards/{physical_card_id}/advance_shipment", - body=maybe_transform( - {"shipment_status": shipment_status}, - physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=PhysicalCard, - ) - - def tracking_updates( + def create( self, physical_card_id: str, *, @@ -175,7 +108,7 @@ def tracking_updates( "postal_code": postal_code, "state": state, }, - physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams, + physical_card_create_params.PhysicalCardCreateParams, ), options=make_request_options( extra_headers=extra_headers, @@ -187,28 +120,7 @@ def tracking_updates( cast_to=PhysicalCard, ) - -class AsyncPhysicalCardsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncPhysicalCardsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncPhysicalCardsResourceWithStreamingResponse(self) - - async def advance_shipment( + def advance_shipment( self, physical_card_id: str, *, @@ -259,9 +171,9 @@ async def advance_shipment( """ if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") - return await self._post( + return self._post( f"/simulations/physical_cards/{physical_card_id}/advance_shipment", - body=await async_maybe_transform( + body=maybe_transform( {"shipment_status": shipment_status}, physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), @@ -275,7 +187,28 @@ async def advance_shipment( cast_to=PhysicalCard, ) - async def tracking_updates( + +class AsyncPhysicalCardsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncPhysicalCardsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncPhysicalCardsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncPhysicalCardsResourceWithStreamingResponse(self) + + async def create( self, physical_card_id: str, *, @@ -338,7 +271,74 @@ async def tracking_updates( "postal_code": postal_code, "state": state, }, - physical_card_tracking_updates_params.PhysicalCardTrackingUpdatesParams, + physical_card_create_params.PhysicalCardCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=PhysicalCard, + ) + + async def advance_shipment( + self, + physical_card_id: str, + *, + shipment_status: Literal[ + "pending", "canceled", "submitted", "acknowledged", "rejected", "shipped", "returned", "requires_attention" + ], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> PhysicalCard: + """ + This endpoint allows you to simulate advancing the shipment status of a Physical + Card, to simulate e.g., that a physical card was attempted shipped but then + failed delivery. + + Args: + physical_card_id: The Physical Card you would like to action. + + shipment_status: The shipment status to move the Physical Card to. + + - `pending` - The physical card has not yet been shipped. + - `canceled` - The physical card shipment was canceled prior to submission. + - `submitted` - The physical card shipment has been submitted to the card + fulfillment provider. + - `acknowledged` - The physical card shipment has been acknowledged by the card + fulfillment provider and will be processed in their next batch. + - `rejected` - The physical card shipment was rejected by the card printer due + to an error. + - `shipped` - The physical card has been shipped. + - `returned` - The physical card shipment was returned to the sender and + destroyed by the production facility. + - `requires_attention` - The physical card shipment requires attention from + Increase before progressing. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not physical_card_id: + raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") + return await self._post( + f"/simulations/physical_cards/{physical_card_id}/advance_shipment", + body=await async_maybe_transform( + {"shipment_status": shipment_status}, + physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, ), options=make_request_options( extra_headers=extra_headers, @@ -355,45 +355,45 @@ class PhysicalCardsResourceWithRawResponse: def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards + self.create = to_raw_response_wrapper( + physical_cards.create, + ) self.advance_shipment = to_raw_response_wrapper( physical_cards.advance_shipment, ) - self.tracking_updates = to_raw_response_wrapper( - physical_cards.tracking_updates, - ) class AsyncPhysicalCardsResourceWithRawResponse: def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards + self.create = async_to_raw_response_wrapper( + physical_cards.create, + ) self.advance_shipment = async_to_raw_response_wrapper( physical_cards.advance_shipment, ) - self.tracking_updates = async_to_raw_response_wrapper( - physical_cards.tracking_updates, - ) class PhysicalCardsResourceWithStreamingResponse: def __init__(self, physical_cards: PhysicalCardsResource) -> None: self._physical_cards = physical_cards + self.create = to_streamed_response_wrapper( + physical_cards.create, + ) self.advance_shipment = to_streamed_response_wrapper( physical_cards.advance_shipment, ) - self.tracking_updates = to_streamed_response_wrapper( - physical_cards.tracking_updates, - ) class AsyncPhysicalCardsResourceWithStreamingResponse: def __init__(self, physical_cards: AsyncPhysicalCardsResource) -> None: self._physical_cards = physical_cards + self.create = async_to_streamed_response_wrapper( + physical_cards.create, + ) self.advance_shipment = async_to_streamed_response_wrapper( physical_cards.advance_shipment, ) - self.tracking_updates = async_to_streamed_response_wrapper( - physical_cards.tracking_updates, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index eae146400..a9c02408e 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -80,6 +80,7 @@ from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement +from .card_detail_update_params import CardDetailUpdateParams as CardDetailUpdateParams from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams @@ -133,7 +134,6 @@ from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams -from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams @@ -167,6 +167,9 @@ from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) +from .card_detail_create_details_iframe_params import ( + CardDetailCreateDetailsIframeParams as CardDetailCreateDetailsIframeParams, +) from .intrafi_account_enrollment_create_params import ( IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, ) diff --git a/src/increase/types/card_create_details_iframe_params.py b/src/increase/types/card_detail_create_details_iframe_params.py similarity index 69% rename from src/increase/types/card_create_details_iframe_params.py rename to src/increase/types/card_detail_create_details_iframe_params.py index 9af571640..47efe4422 100644 --- a/src/increase/types/card_create_details_iframe_params.py +++ b/src/increase/types/card_detail_create_details_iframe_params.py @@ -4,9 +4,9 @@ from typing_extensions import TypedDict -__all__ = ["CardCreateDetailsIframeParams"] +__all__ = ["CardDetailCreateDetailsIframeParams"] -class CardCreateDetailsIframeParams(TypedDict, total=False): +class CardDetailCreateDetailsIframeParams(TypedDict, total=False): physical_card_id: str """The identifier of the Physical Card to retrieve details for.""" diff --git a/src/increase/types/card_detail_update_params.py b/src/increase/types/card_detail_update_params.py new file mode 100644 index 000000000..dfed669fc --- /dev/null +++ b/src/increase/types/card_detail_update_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["CardDetailUpdateParams"] + + +class CardDetailUpdateParams(TypedDict, total=False): + pin: Required[str] + """The 4-digit PIN for the card, for use with ATMs.""" diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index 85c1842d9..800728156 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -28,6 +28,9 @@ class CardUpdateParams(TypedDict, total=False): Account holder. """ + pin: str + """The 4-digit PIN for the card, for use with ATMs.""" + status: Literal["active", "disabled", "canceled"] """The status to update the Card with. diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 669de5026..7adcf989d 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -9,6 +9,7 @@ from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams +from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams @@ -23,9 +24,6 @@ from .physical_card_advance_shipment_params import ( PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) -from .physical_card_tracking_updates_params import ( - PhysicalCardTrackingUpdatesParams as PhysicalCardTrackingUpdatesParams, -) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) diff --git a/src/increase/types/simulations/physical_card_tracking_updates_params.py b/src/increase/types/simulations/physical_card_create_params.py similarity index 91% rename from src/increase/types/simulations/physical_card_tracking_updates_params.py rename to src/increase/types/simulations/physical_card_create_params.py index fb60b17eb..b51e71093 100644 --- a/src/increase/types/simulations/physical_card_tracking_updates_params.py +++ b/src/increase/types/simulations/physical_card_create_params.py @@ -8,10 +8,10 @@ from ..._utils import PropertyInfo -__all__ = ["PhysicalCardTrackingUpdatesParams"] +__all__ = ["PhysicalCardCreateParams"] -class PhysicalCardTrackingUpdatesParams(TypedDict, total=False): +class PhysicalCardCreateParams(TypedDict, total=False): category: Required[Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"]] """The type of tracking event. diff --git a/tests/api_resources/simulations/test_physical_cards.py b/tests/api_resources/simulations/test_physical_cards.py index 967969afc..735dc8324 100644 --- a/tests/api_resources/simulations/test_physical_cards.py +++ b/tests/api_resources/simulations/test_physical_cards.py @@ -19,18 +19,30 @@ class TestPhysicalCards: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) @parametrize - def test_method_advance_shipment(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.advance_shipment( + def test_method_create(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_raw_response_advance_shipment(self, client: Increase) -> None: - response = client.simulations.physical_cards.with_raw_response.advance_shipment( + def test_method_create_with_all_params(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", + carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), + city="New York", + postal_code="10045", + state="NY", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.create( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", ) assert response.is_closed is True @@ -39,10 +51,10 @@ def test_raw_response_advance_shipment(self, client: Increase) -> None: assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_streaming_response_advance_shipment(self, client: Increase) -> None: - with client.simulations.physical_cards.with_streaming_response.advance_shipment( + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -53,38 +65,26 @@ def test_streaming_response_advance_shipment(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_advance_shipment(self, client: Increase) -> None: + def test_path_params_create(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - client.simulations.physical_cards.with_raw_response.advance_shipment( + client.simulations.physical_cards.with_raw_response.create( physical_card_id="", - shipment_status="shipped", + category="delivered", ) @parametrize - def test_method_tracking_updates(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.tracking_updates( - physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", - ) - assert_matches_type(PhysicalCard, physical_card, path=["response"]) - - @parametrize - def test_method_tracking_updates_with_all_params(self, client: Increase) -> None: - physical_card = client.simulations.physical_cards.tracking_updates( + def test_method_advance_shipment(self, client: Increase) -> None: + physical_card = client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", - carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), - city="New York", - postal_code="10045", - state="NY", + shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_raw_response_tracking_updates(self, client: Increase) -> None: - response = client.simulations.physical_cards.with_raw_response.tracking_updates( + def test_raw_response_advance_shipment(self, client: Increase) -> None: + response = client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", + shipment_status="shipped", ) assert response.is_closed is True @@ -93,10 +93,10 @@ def test_raw_response_tracking_updates(self, client: Increase) -> None: assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - def test_streaming_response_tracking_updates(self, client: Increase) -> None: - with client.simulations.physical_cards.with_streaming_response.tracking_updates( + def test_streaming_response_advance_shipment(self, client: Increase) -> None: + with client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", + shipment_status="shipped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,11 +107,11 @@ def test_streaming_response_tracking_updates(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True @parametrize - def test_path_params_tracking_updates(self, client: Increase) -> None: + def test_path_params_advance_shipment(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - client.simulations.physical_cards.with_raw_response.tracking_updates( + client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - category="delivered", + shipment_status="shipped", ) @@ -121,18 +121,30 @@ class TestAsyncPhysicalCards: ) @parametrize - async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.advance_shipment( + async def test_method_create(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", + carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), + city="New York", + postal_code="10045", + state="NY", + ) + assert_matches_type(PhysicalCard, physical_card, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.create( + physical_card_id="physical_card_ode8duyq5v2ynhjoharl", + category="delivered", ) assert response.is_closed is True @@ -141,10 +153,10 @@ async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.create( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - shipment_status="shipped", + category="delivered", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,38 +167,26 @@ async def test_streaming_response_advance_shipment(self, async_client: AsyncIncr assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None: + async def test_path_params_create(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - await async_client.simulations.physical_cards.with_raw_response.advance_shipment( + await async_client.simulations.physical_cards.with_raw_response.create( physical_card_id="", - shipment_status="shipped", + category="delivered", ) @parametrize - async def test_method_tracking_updates(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.tracking_updates( - physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", - ) - assert_matches_type(PhysicalCard, physical_card, path=["response"]) - - @parametrize - async def test_method_tracking_updates_with_all_params(self, async_client: AsyncIncrease) -> None: - physical_card = await async_client.simulations.physical_cards.tracking_updates( + async def test_method_advance_shipment(self, async_client: AsyncIncrease) -> None: + physical_card = await async_client.simulations.physical_cards.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", - carrier_estimated_delivery_at=parse_datetime("2019-12-27T18:11:19.117Z"), - city="New York", - postal_code="10045", - state="NY", + shipment_status="shipped", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_raw_response_tracking_updates(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.physical_cards.with_raw_response.tracking_updates( + async def test_raw_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", + shipment_status="shipped", ) assert response.is_closed is True @@ -195,10 +195,10 @@ async def test_raw_response_tracking_updates(self, async_client: AsyncIncrease) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize - async def test_streaming_response_tracking_updates(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.physical_cards.with_streaming_response.tracking_updates( + async def test_streaming_response_advance_shipment(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.physical_cards.with_streaming_response.advance_shipment( physical_card_id="physical_card_ode8duyq5v2ynhjoharl", - category="delivered", + shipment_status="shipped", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,9 +209,9 @@ async def test_streaming_response_tracking_updates(self, async_client: AsyncIncr assert cast(Any, response.is_closed) is True @parametrize - async def test_path_params_tracking_updates(self, async_client: AsyncIncrease) -> None: + async def test_path_params_advance_shipment(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `physical_card_id` but received ''"): - await async_client.simulations.physical_cards.with_raw_response.tracking_updates( + await async_client.simulations.physical_cards.with_raw_response.advance_shipment( physical_card_id="", - category="delivered", + shipment_status="shipped", ) diff --git a/tests/api_resources/test_card_details.py b/tests/api_resources/test_card_details.py new file mode 100644 index 000000000..1e8b715ea --- /dev/null +++ b/tests/api_resources/test_card_details.py @@ -0,0 +1,279 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import ( + CardDetails, + CardIframeURL, +) + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardDetails: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_update(self, client: Increase) -> None: + card_detail = client.card_details.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Increase) -> None: + response = client.card_details.with_raw_response.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Increase) -> None: + with client.card_details.with_streaming_response.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.card_details.with_raw_response.update( + card_id="", + pin="1234", + ) + + @parametrize + def test_method_create_details_iframe(self, client: Increase) -> None: + card_detail = client.card_details.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None: + card_detail = client.card_details.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + def test_raw_response_create_details_iframe(self, client: Increase) -> None: + response = client.card_details.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = response.parse() + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + def test_streaming_response_create_details_iframe(self, client: Increase) -> None: + with client.card_details.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = response.parse() + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_details_iframe(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.card_details.with_raw_response.create_details_iframe( + card_id="", + ) + + @parametrize + def test_method_details(self, client: Increase) -> None: + card_detail = client.card_details.details( + "card_id", + ) + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + def test_raw_response_details(self, client: Increase) -> None: + response = client.card_details.with_raw_response.details( + "card_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + def test_streaming_response_details(self, client: Increase) -> None: + with client.card_details.with_streaming_response.details( + "card_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_details(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.card_details.with_raw_response.details( + "", + ) + + +class TestAsyncCardDetails: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_update(self, async_client: AsyncIncrease) -> None: + card_detail = await async_client.card_details.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_details.with_raw_response.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = await response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: + async with async_client.card_details.with_streaming_response.update( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = await response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.card_details.with_raw_response.update( + card_id="", + pin="1234", + ) + + @parametrize + async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None: + card_detail = await async_client.card_details.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None: + card_detail = await async_client.card_details.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_details.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = await response.parse() + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + @parametrize + async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + async with async_client.card_details.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = await response.parse() + assert_matches_type(CardIframeURL, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.card_details.with_raw_response.create_details_iframe( + card_id="", + ) + + @parametrize + async def test_method_details(self, async_client: AsyncIncrease) -> None: + card_detail = await async_client.card_details.details( + "card_id", + ) + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_details.with_raw_response.details( + "card_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_detail = await response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + @parametrize + async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: + async with async_client.card_details.with_streaming_response.details( + "card_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_detail = await response.parse() + assert_matches_type(CardDetails, card_detail, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_details(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.card_details.with_raw_response.details( + "", + ) diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 9be877a70..3f13e4fdd 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -9,11 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - Card, - CardDetails, - CardIframeURL, -) +from increase.types import Card from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage @@ -138,6 +134,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "phone": "x", }, entity_id="entity_id", + pin="xxxx", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -215,90 +212,6 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - @parametrize - def test_method_create_details_iframe(self, client: Increase) -> None: - card = client.cards.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None: - card = client.cards.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - def test_raw_response_create_details_iframe(self, client: Increase) -> None: - response = client.cards.with_raw_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - def test_streaming_response_create_details_iframe(self, client: Increase) -> None: - with client.cards.with_streaming_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(CardIframeURL, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create_details_iframe(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.cards.with_raw_response.create_details_iframe( - card_id="", - ) - - @parametrize - def test_method_details(self, client: Increase) -> None: - card = client.cards.details( - "card_id", - ) - assert_matches_type(CardDetails, card, path=["response"]) - - @parametrize - def test_raw_response_details(self, client: Increase) -> None: - response = client.cards.with_raw_response.details( - "card_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = response.parse() - assert_matches_type(CardDetails, card, path=["response"]) - - @parametrize - def test_streaming_response_details(self, client: Increase) -> None: - with client.cards.with_streaming_response.details( - "card_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = response.parse() - assert_matches_type(CardDetails, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_details(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.cards.with_raw_response.details( - "", - ) - class TestAsyncCards: parametrize = pytest.mark.parametrize( @@ -420,6 +333,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "phone": "x", }, entity_id="entity_id", + pin="xxxx", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -496,87 +410,3 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[Card], card, path=["response"]) assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: - response = await async_client.cards.with_raw_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() - assert_matches_type(CardIframeURL, card, path=["response"]) - - @parametrize - async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: - async with async_client.cards.with_streaming_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(CardIframeURL, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.cards.with_raw_response.create_details_iframe( - card_id="", - ) - - @parametrize - async def test_method_details(self, async_client: AsyncIncrease) -> None: - card = await async_client.cards.details( - "card_id", - ) - assert_matches_type(CardDetails, card, path=["response"]) - - @parametrize - async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.cards.with_raw_response.details( - "card_id", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card = await response.parse() - assert_matches_type(CardDetails, card, path=["response"]) - - @parametrize - async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: - async with async_client.cards.with_streaming_response.details( - "card_id", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card = await response.parse() - assert_matches_type(CardDetails, card, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_details(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.cards.with_raw_response.details( - "", - ) From 268713bfc3c36dedf08037de708acb87fa0169ef Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:20:20 +0000 Subject: [PATCH 0864/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e4f54275b..4e9c70e85 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.332.0" + ".": "0.333.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e2dc43124..10651cc42 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.332.0" +version = "0.333.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2f0ca575f..fa330d6ba 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.332.0" # x-release-please-version +__version__ = "0.333.0" # x-release-please-version From 21f725daf117ac5cdcf781a0055a3bd562e09394 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:27:43 +0000 Subject: [PATCH 0865/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/card_details.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 876bf2616..e5dc4c9fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6241d4f5ad4269845e96fe2c674d19f586894ca27456095fee5a70dede9ea19c.yml -openapi_spec_hash: 81e8f749b8ca89085b599b2c346a773d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d0d6147287983a83fc0ad164f706c3cdc48a13e223fd601aa954bbf0bbc402ed.yml +openapi_spec_hash: a3ccd1aa9bc5d03e6660b535d25401b1 config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/src/increase/resources/card_details.py b/src/increase/resources/card_details.py index b328b9fab..d729ac2a9 100644 --- a/src/increase/resources/card_details.py +++ b/src/increase/resources/card_details.py @@ -56,7 +56,7 @@ def update( idempotency_key: str | None = None, ) -> CardDetails: """ - Update a Card's Details + Update a Card's PIN Args: card_id: The card identifier. @@ -211,7 +211,7 @@ async def update( idempotency_key: str | None = None, ) -> CardDetails: """ - Update a Card's Details + Update a Card's PIN Args: card_id: The card identifier. From 2603db7862dc9c29f7d9970e80723da227a4775e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Sep 2025 20:30:25 +0000 Subject: [PATCH 0866/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4e9c70e85..79bee3809 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.333.0" + ".": "0.334.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 10651cc42..868ecad2c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.333.0" +version = "0.334.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index fa330d6ba..b6b9f8238 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.333.0" # x-release-please-version +__version__ = "0.334.0" # x-release-please-version From f66bcc84084277a1d6718c032398cee1fc2b2f62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 19:27:58 +0000 Subject: [PATCH 0867/1325] chore: improve example values --- .../simulations/test_account_transfers.py | 12 +++---- .../simulations/test_ach_transfers.py | 24 ++++++------- .../simulations/test_check_deposits.py | 36 +++++++++---------- .../simulations/test_check_transfers.py | 12 +++---- .../simulations/test_pending_transactions.py | 12 +++---- .../test_wire_drawdown_requests.py | 24 ++++++------- .../simulations/test_wire_transfers.py | 24 ++++++------- tests/api_resources/test_account_numbers.py | 12 +++---- .../api_resources/test_account_statements.py | 12 +++---- tests/api_resources/test_account_transfers.py | 36 +++++++++---------- tests/api_resources/test_accounts.py | 24 ++++++------- .../test_ach_prenotifications.py | 12 +++---- tests/api_resources/test_ach_transfers.py | 36 +++++++++---------- .../api_resources/test_bookkeeping_entries.py | 12 +++---- .../test_bookkeeping_entry_sets.py | 12 +++---- tests/api_resources/test_card_details.py | 12 +++---- tests/api_resources/test_card_payments.py | 12 +++---- .../test_card_purchase_supplements.py | 12 +++---- .../api_resources/test_card_push_transfers.py | 36 +++++++++---------- tests/api_resources/test_card_tokens.py | 24 ++++++------- tests/api_resources/test_card_validations.py | 12 +++---- tests/api_resources/test_cards.py | 12 +++---- tests/api_resources/test_check_deposits.py | 12 +++---- tests/api_resources/test_check_transfers.py | 36 +++++++++---------- .../test_declined_transactions.py | 12 +++---- .../test_digital_card_profiles.py | 24 ++++++------- .../test_digital_wallet_tokens.py | 12 +++---- tests/api_resources/test_documents.py | 12 +++---- tests/api_resources/test_entities.py | 24 ++++++------- .../api_resources/test_event_subscriptions.py | 12 +++---- tests/api_resources/test_events.py | 12 +++---- tests/api_resources/test_exports.py | 12 +++---- tests/api_resources/test_external_accounts.py | 12 +++---- tests/api_resources/test_files.py | 12 +++---- .../test_inbound_ach_transfers.py | 12 +++---- .../test_inbound_check_deposits.py | 24 ++++++------- .../api_resources/test_inbound_mail_items.py | 12 +++---- ...st_inbound_real_time_payments_transfers.py | 12 +++---- .../test_inbound_wire_drawdown_requests.py | 12 +++---- .../test_inbound_wire_transfers.py | 12 +++---- .../test_intrafi_account_enrollments.py | 24 ++++++------- tests/api_resources/test_intrafi_balances.py | 12 +++---- .../api_resources/test_intrafi_exclusions.py | 24 ++++++------- tests/api_resources/test_lockboxes.py | 12 +++---- .../api_resources/test_oauth_applications.py | 12 +++---- tests/api_resources/test_oauth_connections.py | 12 +++---- .../test_pending_transactions.py | 24 ++++++------- .../test_physical_card_profiles.py | 24 ++++++------- tests/api_resources/test_physical_cards.py | 12 +++---- tests/api_resources/test_programs.py | 12 +++---- .../api_resources/test_real_time_decisions.py | 12 +++---- .../test_real_time_payments_transfers.py | 36 +++++++++---------- tests/api_resources/test_transactions.py | 12 +++---- .../test_wire_drawdown_requests.py | 12 +++---- tests/api_resources/test_wire_transfers.py | 36 +++++++++---------- 55 files changed, 486 insertions(+), 486 deletions(-) diff --git a/tests/api_resources/simulations/test_account_transfers.py b/tests/api_resources/simulations/test_account_transfers.py index 6a2670592..b9ef8d0ed 100644 --- a/tests/api_resources/simulations/test_account_transfers.py +++ b/tests/api_resources/simulations/test_account_transfers.py @@ -20,14 +20,14 @@ class TestAccountTransfers: @parametrize def test_method_complete(self, client: Increase) -> None: account_transfer = client.simulations.account_transfers.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_complete(self, client: Increase) -> None: response = client.simulations.account_transfers.with_raw_response.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_complete(self, client: Increase) -> None: @parametrize def test_streaming_response_complete(self, client: Increase) -> None: with client.simulations.account_transfers.with_streaming_response.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,14 +64,14 @@ class TestAsyncAccountTransfers: @parametrize async def test_method_complete(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.simulations.account_transfers.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.account_transfers.with_raw_response.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -82,7 +82,7 @@ async def test_raw_response_complete(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_complete(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.account_transfers.with_streaming_response.complete( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_ach_transfers.py b/tests/api_resources/simulations/test_ach_transfers.py index 53f6f6d30..9340180f5 100644 --- a/tests/api_resources/simulations/test_ach_transfers.py +++ b/tests/api_resources/simulations/test_ach_transfers.py @@ -20,14 +20,14 @@ class TestACHTransfers: @parametrize def test_method_acknowledge(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_acknowledge(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_acknowledge(self, client: Increase) -> None: @parametrize def test_streaming_response_acknowledge(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -196,14 +196,14 @@ def test_path_params_settle(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: ach_transfer = client.simulations.ach_transfers.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.ach_transfers.with_raw_response.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -214,7 +214,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.ach_transfers.with_streaming_response.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -240,14 +240,14 @@ class TestAsyncACHTransfers: @parametrize async def test_method_acknowledge(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_acknowledge(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -258,7 +258,7 @@ async def test_raw_response_acknowledge(self, async_client: AsyncIncrease) -> No @parametrize async def test_streaming_response_acknowledge(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.acknowledge( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -416,14 +416,14 @@ async def test_path_params_settle(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.simulations.ach_transfers.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.ach_transfers.with_raw_response.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -434,7 +434,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.ach_transfers.with_streaming_response.submit( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index d03ef3ac6..3204a3796 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -20,14 +20,14 @@ class TestCheckDeposits: @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_reject(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_reject(self, client: Increase) -> None: @parametrize def test_streaming_response_reject(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -58,14 +58,14 @@ def test_path_params_reject(self, client: Increase) -> None: @parametrize def test_method_return(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_return(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -76,7 +76,7 @@ def test_raw_response_return(self, client: Increase) -> None: @parametrize def test_streaming_response_return(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -96,14 +96,14 @@ def test_path_params_return(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -114,7 +114,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,14 +140,14 @@ class TestAsyncCheckDeposits: @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -158,7 +158,7 @@ async def test_raw_response_reject(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_reject(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.reject( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -178,14 +178,14 @@ async def test_path_params_reject(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_return(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -196,7 +196,7 @@ async def test_raw_response_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_return(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.return_( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -216,14 +216,14 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -234,7 +234,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_check_transfers.py b/tests/api_resources/simulations/test_check_transfers.py index 2976c2ca0..bdef4bd1c 100644 --- a/tests/api_resources/simulations/test_check_transfers.py +++ b/tests/api_resources/simulations/test_check_transfers.py @@ -20,14 +20,14 @@ class TestCheckTransfers: @parametrize def test_method_mail(self, client: Increase) -> None: check_transfer = client.simulations.check_transfers.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_mail(self, client: Increase) -> None: response = client.simulations.check_transfers.with_raw_response.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_mail(self, client: Increase) -> None: @parametrize def test_streaming_response_mail(self, client: Increase) -> None: with client.simulations.check_transfers.with_streaming_response.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,14 +64,14 @@ class TestAsyncCheckTransfers: @parametrize async def test_method_mail(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.simulations.check_transfers.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_transfers.with_raw_response.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -82,7 +82,7 @@ async def test_raw_response_mail(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_mail(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_transfers.with_streaming_response.mail( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_pending_transactions.py b/tests/api_resources/simulations/test_pending_transactions.py index 21ea3aa43..9b647a211 100644 --- a/tests/api_resources/simulations/test_pending_transactions.py +++ b/tests/api_resources/simulations/test_pending_transactions.py @@ -20,14 +20,14 @@ class TestPendingTransactions: @parametrize def test_method_release_inbound_funds_hold(self, client: Increase) -> None: pending_transaction = client.simulations.pending_transactions.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize def test_raw_response_release_inbound_funds_hold(self, client: Increase) -> None: response = client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_release_inbound_funds_hold(self, client: Increase) -> None @parametrize def test_streaming_response_release_inbound_funds_hold(self, client: Increase) -> None: with client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -66,14 +66,14 @@ class TestAsyncPendingTransactions: @parametrize async def test_method_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.simulations.pending_transactions.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize async def test_raw_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.pending_transactions.with_raw_response.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -84,7 +84,7 @@ async def test_raw_response_release_inbound_funds_hold(self, async_client: Async @parametrize async def test_streaming_response_release_inbound_funds_hold(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.pending_transactions.with_streaming_response.release_inbound_funds_hold( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_wire_drawdown_requests.py b/tests/api_resources/simulations/test_wire_drawdown_requests.py index 2a2c3172b..87a563311 100644 --- a/tests/api_resources/simulations/test_wire_drawdown_requests.py +++ b/tests/api_resources/simulations/test_wire_drawdown_requests.py @@ -20,14 +20,14 @@ class TestWireDrawdownRequests: @parametrize def test_method_refuse(self, client: Increase) -> None: wire_drawdown_request = client.simulations.wire_drawdown_requests.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_refuse(self, client: Increase) -> None: response = client.simulations.wire_drawdown_requests.with_raw_response.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_refuse(self, client: Increase) -> None: @parametrize def test_streaming_response_refuse(self, client: Increase) -> None: with client.simulations.wire_drawdown_requests.with_streaming_response.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -60,14 +60,14 @@ def test_path_params_refuse(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: wire_drawdown_request = client.simulations.wire_drawdown_requests.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.wire_drawdown_requests.with_raw_response.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -78,7 +78,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.wire_drawdown_requests.with_streaming_response.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ class TestAsyncWireDrawdownRequests: @parametrize async def test_method_refuse(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.simulations.wire_drawdown_requests.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_refuse(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.wire_drawdown_requests.with_raw_response.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_refuse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_refuse(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.wire_drawdown_requests.with_streaming_response.refuse( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -146,14 +146,14 @@ async def test_path_params_refuse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.simulations.wire_drawdown_requests.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.wire_drawdown_requests.with_raw_response.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -164,7 +164,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.wire_drawdown_requests.with_streaming_response.submit( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/simulations/test_wire_transfers.py b/tests/api_resources/simulations/test_wire_transfers.py index c6ea7bc8b..183f1342f 100644 --- a/tests/api_resources/simulations/test_wire_transfers.py +++ b/tests/api_resources/simulations/test_wire_transfers.py @@ -20,14 +20,14 @@ class TestWireTransfers: @parametrize def test_method_reverse(self, client: Increase) -> None: wire_transfer = client.simulations.wire_transfers.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_reverse(self, client: Increase) -> None: response = client.simulations.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_reverse(self, client: Increase) -> None: @parametrize def test_streaming_response_reverse(self, client: Increase) -> None: with client.simulations.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -58,14 +58,14 @@ def test_path_params_reverse(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: wire_transfer = client.simulations.wire_transfers.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.wire_transfers.with_raw_response.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -76,7 +76,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -102,14 +102,14 @@ class TestAsyncWireTransfers: @parametrize async def test_method_reverse(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.simulations.wire_transfers.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.wire_transfers.with_raw_response.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -120,7 +120,7 @@ async def test_raw_response_reverse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_reverse(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.wire_transfers.with_streaming_response.reverse( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -140,14 +140,14 @@ async def test_path_params_reverse(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.simulations.wire_transfers.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.wire_transfers.with_raw_response.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -158,7 +158,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.wire_transfers.with_streaming_response.submit( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 5ecc54511..d97124c78 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -68,14 +68,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_number = client.account_numbers.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_numbers.with_raw_response.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) assert response.is_closed is True @@ -86,7 +86,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_numbers.with_streaming_response.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -248,14 +248,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) assert_matches_type(AccountNumber, account_number, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_numbers.with_raw_response.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) assert response.is_closed is True @@ -266,7 +266,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_numbers.with_streaming_response.retrieve( - "account_number_id", + "account_number_v18nkfqm6afpsrvy82b2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index e7eae1b44..0caeb7f48 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -22,14 +22,14 @@ class TestAccountStatements: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_statement = client.account_statements.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_statements.with_raw_response.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_statements.with_streaming_response.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ class TestAsyncAccountStatements: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_statement = await async_client.account_statements.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) assert_matches_type(AccountStatement, account_statement, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_statements.with_raw_response.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_statements.with_streaming_response.retrieve( - "account_statement_id", + "account_statement_lkc03a4skm2k7f38vj15", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 8ec1389db..02f608a43 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -73,14 +73,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account_transfer = client.account_transfers.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -91,7 +91,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -152,14 +152,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: account_transfer = client.account_transfers.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -170,7 +170,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -190,14 +190,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: account_transfer = client.account_transfers.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.account_transfers.with_raw_response.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -208,7 +208,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.account_transfers.with_streaming_response.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -285,14 +285,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -303,7 +303,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.retrieve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -364,14 +364,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -382,7 +382,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.approve( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -402,14 +402,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert_matches_type(AccountTransfer, account_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.account_transfers.with_raw_response.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) assert response.is_closed is True @@ -420,7 +420,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.account_transfers.with_streaming_response.cancel( - "account_transfer_id", + "account_transfer_7k9qe1ysdgqztnt63l7n", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d445753d8..d6edc5ab9 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -66,14 +66,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: account = client.accounts.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.accounts.with_raw_response.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -84,7 +84,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.accounts.with_streaming_response.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -241,14 +241,14 @@ def test_path_params_balance(self, client: Increase) -> None: @parametrize def test_method_close(self, client: Increase) -> None: account = client.accounts.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize def test_raw_response_close(self, client: Increase) -> None: response = client.accounts.with_raw_response.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -259,7 +259,7 @@ def test_raw_response_close(self, client: Increase) -> None: @parametrize def test_streaming_response_close(self, client: Increase) -> None: with client.accounts.with_streaming_response.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -326,14 +326,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -344,7 +344,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.retrieve( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -501,14 +501,14 @@ async def test_path_params_balance(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_close(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(Account, account, path=["response"]) @parametrize async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: response = await async_client.accounts.with_raw_response.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -519,7 +519,7 @@ async def test_raw_response_close(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_close(self, async_client: AsyncIncrease) -> None: async with async_client.accounts.with_streaming_response.close( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index f1440ab9d..c86c20448 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -78,14 +78,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.ach_prenotifications.with_raw_response.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) assert response.is_closed is True @@ -96,7 +96,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.ach_prenotifications.with_streaming_response.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -220,14 +220,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) assert_matches_type(ACHPrenotification, ach_prenotification, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_prenotifications.with_raw_response.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) assert response.is_closed is True @@ -238,7 +238,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_prenotifications.with_streaming_response.retrieve( - "ach_prenotification_id", + "ach_prenotification_ubjf9qqsxl3obbcn1u34", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 8b4a7b1db..103899c14 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -98,14 +98,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: ach_transfer = client.ach_transfers.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -179,14 +179,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: ach_transfer = client.ach_transfers.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -197,7 +197,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -217,14 +217,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: ach_transfer = client.ach_transfers.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.ach_transfers.with_raw_response.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -235,7 +235,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.ach_transfers.with_streaming_response.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -337,14 +337,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -355,7 +355,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.retrieve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -418,14 +418,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -436,7 +436,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.approve( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -456,14 +456,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert_matches_type(ACHTransfer, ach_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.ach_transfers.with_raw_response.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) assert response.is_closed is True @@ -474,7 +474,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.ach_transfers.with_streaming_response.cancel( - "ach_transfer_id", + "ach_transfer_uoxatyh3lt5evrsdvo7q", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 958047447..2e78003b4 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -21,14 +21,14 @@ class TestBookkeepingEntries: @parametrize def test_method_retrieve(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.bookkeeping_entries.with_raw_response.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.bookkeeping_entries.with_streaming_response.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,14 +99,14 @@ class TestAsyncBookkeepingEntries: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) assert_matches_type(BookkeepingEntry, bookkeeping_entry, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_entries.with_raw_response.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) assert response.is_closed is True @@ -117,7 +117,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_entries.with_streaming_response.retrieve( - "bookkeeping_entry_id", + "bookkeeping_entry_ctjpajsj3ks2blx10375", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index 03cb63088..e13a51f2e 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -98,14 +98,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.bookkeeping_entry_sets.with_raw_response.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) assert response.is_closed is True @@ -116,7 +116,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.bookkeeping_entry_sets.with_streaming_response.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -255,14 +255,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: bookkeeping_entry_set = await async_client.bookkeeping_entry_sets.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) assert_matches_type(BookkeepingEntrySet, bookkeeping_entry_set, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.bookkeeping_entry_sets.with_raw_response.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) assert response.is_closed is True @@ -273,7 +273,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.bookkeeping_entry_sets.with_streaming_response.retrieve( - "bookkeeping_entry_set_id", + "bookkeeping_entry_set_n80c6wr2p8gtc6p4ingf", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_details.py b/tests/api_resources/test_card_details.py index 1e8b715ea..598c813b0 100644 --- a/tests/api_resources/test_card_details.py +++ b/tests/api_resources/test_card_details.py @@ -111,14 +111,14 @@ def test_path_params_create_details_iframe(self, client: Increase) -> None: @parametrize def test_method_details(self, client: Increase) -> None: card_detail = client.card_details.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(CardDetails, card_detail, path=["response"]) @parametrize def test_raw_response_details(self, client: Increase) -> None: response = client.card_details.with_raw_response.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -129,7 +129,7 @@ def test_raw_response_details(self, client: Increase) -> None: @parametrize def test_streaming_response_details(self, client: Increase) -> None: with client.card_details.with_streaming_response.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -243,14 +243,14 @@ async def test_path_params_create_details_iframe(self, async_client: AsyncIncrea @parametrize async def test_method_details(self, async_client: AsyncIncrease) -> None: card_detail = await async_client.card_details.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(CardDetails, card_detail, path=["response"]) @parametrize async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: response = await async_client.card_details.with_raw_response.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -261,7 +261,7 @@ async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: async with async_client.card_details.with_streaming_response.details( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 1a7f8c963..aa0b599ff 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -22,14 +22,14 @@ class TestCardPayments: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_payment = client.card_payments.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_payments.with_raw_response.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_payments.with_streaming_response.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,14 +107,14 @@ class TestAsyncCardPayments: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_payment = await async_client.card_payments.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) assert_matches_type(CardPayment, card_payment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_payments.with_raw_response.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) assert response.is_closed is True @@ -125,7 +125,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_payments.with_streaming_response.retrieve( - "card_payment_id", + "card_payment_nd3k2kacrqjli8482ave", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index bd5318f3d..7bbf0fcd1 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -22,14 +22,14 @@ class TestCardPurchaseSupplements: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_purchase_supplement = client.card_purchase_supplements.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_purchase_supplements.with_raw_response.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_purchase_supplements.with_streaming_response.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,14 +108,14 @@ class TestAsyncCardPurchaseSupplements: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_purchase_supplement = await async_client.card_purchase_supplements.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) assert_matches_type(CardPurchaseSupplement, card_purchase_supplement, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_purchase_supplements.with_raw_response.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) assert response.is_closed is True @@ -126,7 +126,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_purchase_supplements.with_streaming_response.retrieve( - "card_purchase_supplement_id", + "card_purchase_supplement_ijuc45iym4jchnh2sfk3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py index aeaff762b..00d3b545e 100644 --- a/tests/api_resources/test_card_push_transfers.py +++ b/tests/api_resources/test_card_push_transfers.py @@ -121,14 +121,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_push_transfers.with_raw_response.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -139,7 +139,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_push_transfers.with_streaming_response.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -201,14 +201,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.card_push_transfers.with_raw_response.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -219,7 +219,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.card_push_transfers.with_streaming_response.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -239,14 +239,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.card_push_transfers.with_raw_response.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -257,7 +257,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.card_push_transfers.with_streaming_response.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -382,14 +382,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_push_transfers.with_raw_response.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -400,7 +400,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_push_transfers.with_streaming_response.retrieve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -462,14 +462,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_push_transfers.with_raw_response.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -480,7 +480,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.card_push_transfers.with_streaming_response.approve( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -500,14 +500,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.card_push_transfers.with_raw_response.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) assert response.is_closed is True @@ -518,7 +518,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.card_push_transfers.with_streaming_response.cancel( - "card_push_transfer_id", + "outbound_card_push_transfer_e0z9rdpamraczh4tvwye", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_tokens.py b/tests/api_resources/test_card_tokens.py index 18d7ad665..f25e35b70 100644 --- a/tests/api_resources/test_card_tokens.py +++ b/tests/api_resources/test_card_tokens.py @@ -22,14 +22,14 @@ class TestCardTokens: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_token = client.card_tokens.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert_matches_type(CardToken, card_token, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_tokens.with_raw_response.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_tokens.with_streaming_response.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -99,14 +99,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_capabilities(self, client: Increase) -> None: card_token = client.card_tokens.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) @parametrize def test_raw_response_capabilities(self, client: Increase) -> None: response = client.card_tokens.with_raw_response.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert response.is_closed is True @@ -117,7 +117,7 @@ def test_raw_response_capabilities(self, client: Increase) -> None: @parametrize def test_streaming_response_capabilities(self, client: Increase) -> None: with client.card_tokens.with_streaming_response.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -143,14 +143,14 @@ class TestAsyncCardTokens: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_token = await async_client.card_tokens.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert_matches_type(CardToken, card_token, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_tokens.with_raw_response.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert response.is_closed is True @@ -161,7 +161,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_tokens.with_streaming_response.retrieve( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -220,14 +220,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_capabilities(self, async_client: AsyncIncrease) -> None: card_token = await async_client.card_tokens.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert_matches_type(CardTokenCapabilities, card_token, path=["response"]) @parametrize async def test_raw_response_capabilities(self, async_client: AsyncIncrease) -> None: response = await async_client.card_tokens.with_raw_response.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) assert response.is_closed is True @@ -238,7 +238,7 @@ async def test_raw_response_capabilities(self, async_client: AsyncIncrease) -> N @parametrize async def test_streaming_response_capabilities(self, async_client: AsyncIncrease) -> None: async with async_client.card_tokens.with_streaming_response.capabilities( - "card_token_id", + "outbound_card_token_zlt0ml6youq3q7vcdlg0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_card_validations.py b/tests/api_resources/test_card_validations.py index bc23df5ad..566aeed1c 100644 --- a/tests/api_resources/test_card_validations.py +++ b/tests/api_resources/test_card_validations.py @@ -89,14 +89,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: card_validation = client.card_validations.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) assert_matches_type(CardValidation, card_validation, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.card_validations.with_raw_response.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) assert response.is_closed is True @@ -107,7 +107,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.card_validations.with_streaming_response.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -242,14 +242,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card_validation = await async_client.card_validations.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) assert_matches_type(CardValidation, card_validation, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.card_validations.with_raw_response.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) assert response.is_closed is True @@ -260,7 +260,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.card_validations.with_streaming_response.retrieve( - "card_validation_id", + "outbound_card_validation_qqlzagpc6v1x2gcdhe24", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 3f13e4fdd..61ef7dcfa 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -74,14 +74,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: card = client.cards.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(Card, card, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.cards.with_raw_response.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -92,7 +92,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.cards.with_streaming_response.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -273,14 +273,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert_matches_type(Card, card, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.cards.with_raw_response.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) assert response.is_closed is True @@ -291,7 +291,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.cards.with_streaming_response.retrieve( - "card_id", + "card_oubs0hwk5rn6knuecxg2", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index c90acadff..9f9a14b84 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -73,14 +73,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: check_deposit = client.check_deposits.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.check_deposits.with_raw_response.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -91,7 +91,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.check_deposits.with_streaming_response.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -209,14 +209,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.check_deposits.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_deposits.with_raw_response.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -227,7 +227,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.check_deposits.with_streaming_response.retrieve( - "check_deposit_id", + "check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index a8fd171f8..b12a06509 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -101,14 +101,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: check_transfer = client.check_transfers.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -119,7 +119,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -181,14 +181,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: check_transfer = client.check_transfers.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -199,7 +199,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -219,14 +219,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: check_transfer = client.check_transfers.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.check_transfers.with_raw_response.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -237,7 +237,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.check_transfers.with_streaming_response.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -386,14 +386,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -404,7 +404,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.retrieve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -466,14 +466,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -484,7 +484,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.approve( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -504,14 +504,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.check_transfers.with_raw_response.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) assert response.is_closed is True @@ -522,7 +522,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.check_transfers.with_streaming_response.cancel( - "check_transfer_id", + "check_transfer_30b43acfu9vw8fyc4f5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 45c805676..dbacde8c0 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -22,14 +22,14 @@ class TestDeclinedTransactions: @parametrize def test_method_retrieve(self, client: Increase) -> None: declined_transaction = client.declined_transactions.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.declined_transactions.with_raw_response.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.declined_transactions.with_streaming_response.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -110,14 +110,14 @@ class TestAsyncDeclinedTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) assert_matches_type(DeclinedTransaction, declined_transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.declined_transactions.with_raw_response.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) assert response.is_closed is True @@ -128,7 +128,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.declined_transactions.with_streaming_response.retrieve( - "declined_transaction_id", + "declined_transaction_17jbn0yyhvkt4v4ooym8", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 20804cae1..f45af205c 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.digital_card_profiles.with_raw_response.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -103,7 +103,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.digital_card_profiles.with_streaming_response.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,14 +160,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.digital_card_profiles.with_raw_response.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.digital_card_profiles.with_streaming_response.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -328,14 +328,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_card_profiles.with_raw_response.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -346,7 +346,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.digital_card_profiles.with_streaming_response.retrieve( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -403,14 +403,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert_matches_type(DigitalCardProfile, digital_card_profile, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_card_profiles.with_raw_response.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) assert response.is_closed is True @@ -421,7 +421,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.digital_card_profiles.with_streaming_response.archive( - "digital_card_profile_id", + "digital_card_profile_s3puplu90f04xhcwkiga", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index abfb9e281..1ce1ba95b 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -22,14 +22,14 @@ class TestDigitalWalletTokens: @parametrize def test_method_retrieve(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.digital_wallet_tokens.with_raw_response.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.digital_wallet_tokens.with_streaming_response.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,14 +108,14 @@ class TestAsyncDigitalWalletTokens: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: digital_wallet_token = await async_client.digital_wallet_tokens.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) assert_matches_type(DigitalWalletToken, digital_wallet_token, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.digital_wallet_tokens.with_raw_response.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) assert response.is_closed is True @@ -126,7 +126,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.digital_wallet_tokens.with_streaming_response.retrieve( - "digital_wallet_token_id", + "digital_wallet_token_izi62go3h51p369jrie0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index acf2b50ec..c0d808c7b 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -65,14 +65,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: document = client.documents.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) assert_matches_type(Document, document, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.documents.with_raw_response.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.documents.with_streaming_response.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -194,14 +194,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) assert_matches_type(Document, document, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.documents.with_raw_response.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) assert response.is_closed is True @@ -212,7 +212,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.documents.with_streaming_response.retrieve( - "document_id", + "document_qjtqc6s4c14ve2q89izm", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 192de0078..ace0390a2 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -301,14 +301,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: entity = client.entities.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.entities.with_raw_response.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -319,7 +319,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.entities.with_streaming_response.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -475,14 +475,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: entity = client.entities.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.entities.with_raw_response.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -493,7 +493,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.entities.with_streaming_response.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1228,14 +1228,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -1246,7 +1246,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.retrieve( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1402,14 +1402,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert_matches_type(Entity, entity, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.entities.with_raw_response.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) assert response.is_closed is True @@ -1420,7 +1420,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.entities.with_streaming_response.archive( - "entity_id", + "entity_n8y8tnk2p9339ti393yi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 3222bae25..34963f3cd 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -64,14 +64,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: event_subscription = client.event_subscriptions.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.event_subscriptions.with_raw_response.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert response.is_closed is True @@ -82,7 +82,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.event_subscriptions.with_streaming_response.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -229,14 +229,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.event_subscriptions.with_raw_response.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) assert response.is_closed is True @@ -247,7 +247,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.event_subscriptions.with_streaming_response.retrieve( - "event_subscription_id", + "event_subscription_001dzz0r20rcdxgb013zqb8m04g", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 16fbf1ebb..101cba4be 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -22,14 +22,14 @@ class TestEvents: @parametrize def test_method_retrieve(self, client: Increase) -> None: event = client.events.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) assert_matches_type(Event, event, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.events.with_raw_response.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.events.with_streaming_response.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -107,14 +107,14 @@ class TestAsyncEvents: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: event = await async_client.events.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) assert_matches_type(Event, event, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.events.with_raw_response.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) assert response.is_closed is True @@ -125,7 +125,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.events.with_streaming_response.retrieve( - "event_id", + "event_001dzz0r20rzr4zrhrr1364hy80", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 33b670625..8159a6bde 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -104,14 +104,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: export = client.exports.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) assert_matches_type(Export, export, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.exports.with_raw_response.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) assert response.is_closed is True @@ -122,7 +122,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.exports.with_streaming_response.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -272,14 +272,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) assert_matches_type(Export, export, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.exports.with_raw_response.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) assert response.is_closed is True @@ -290,7 +290,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.exports.with_streaming_response.retrieve( - "export_id", + "export_8s4m48qz3bclzje0zwh9", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 3700f7ddf..4d639e66e 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -71,14 +71,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: external_account = client.external_accounts.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.external_accounts.with_raw_response.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) assert response.is_closed is True @@ -89,7 +89,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.external_accounts.with_streaming_response.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -248,14 +248,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) assert_matches_type(ExternalAccount, external_account, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.external_accounts.with_raw_response.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) assert response.is_closed is True @@ -266,7 +266,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.external_accounts.with_streaming_response.retrieve( - "external_account_id", + "external_account_ukk55lr923a3ac0pp7iv", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index 1862590f8..e36671d6d 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -65,14 +65,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: file = client.files.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) assert_matches_type(File, file, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.files.with_raw_response.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.files.with_streaming_response.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -193,14 +193,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: file = await async_client.files.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) assert_matches_type(File, file, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.files.with_raw_response.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) assert response.is_closed is True @@ -211,7 +211,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.files.with_streaming_response.retrieve( - "file_id", + "file_makxrc67oh9l6sg7w9yc", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index b25b7ed36..9c73918f4 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -24,14 +24,14 @@ class TestInboundACHTransfers: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_ach_transfers.with_raw_response.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -42,7 +42,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_ach_transfers.with_streaming_response.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -253,14 +253,14 @@ class TestAsyncInboundACHTransfers: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert_matches_type(InboundACHTransfer, inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_ach_transfers.with_raw_response.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) assert response.is_closed is True @@ -271,7 +271,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_ach_transfers.with_streaming_response.retrieve( - "inbound_ach_transfer_id", + "inbound_ach_transfer_tdrwqr3fq9gnnq49odev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index c96738eb0..0b4064f1e 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -22,14 +22,14 @@ class TestInboundCheckDeposits: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_check_deposits.with_raw_response.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_check_deposits.with_streaming_response.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -103,14 +103,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_decline(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_decline(self, client: Increase) -> None: response = client.inbound_check_deposits.with_raw_response.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert response.is_closed is True @@ -121,7 +121,7 @@ def test_raw_response_decline(self, client: Increase) -> None: @parametrize def test_streaming_response_decline(self, client: Increase) -> None: with client.inbound_check_deposits.with_streaming_response.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -193,14 +193,14 @@ class TestAsyncInboundCheckDeposits: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_check_deposits.with_raw_response.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert response.is_closed is True @@ -211,7 +211,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_check_deposits.with_streaming_response.retrieve( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -274,14 +274,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_decline(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_check_deposits.with_raw_response.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) assert response.is_closed is True @@ -292,7 +292,7 @@ async def test_raw_response_decline(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_decline(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_check_deposits.with_streaming_response.decline( - "inbound_check_deposit_id", + "inbound_check_deposit_zoshvqybq0cjjm31mra", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index f7e8a1c60..3cbea56d0 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -22,14 +22,14 @@ class TestInboundMailItems: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_mail_item = client.inbound_mail_items.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_mail_items.with_raw_response.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_mail_items.with_streaming_response.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ class TestAsyncInboundMailItems: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_mail_item = await async_client.inbound_mail_items.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_mail_items.with_raw_response.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_mail_items.with_streaming_response.retrieve( - "inbound_mail_item_id", + "inbound_mail_item_q6rrg7mmqpplx80zceev", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" 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 ea67dc0e0..305dfa6fc 100755 --- a/tests/api_resources/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/test_inbound_real_time_payments_transfers.py @@ -22,14 +22,14 @@ class TestInboundRealTimePaymentsTransfers: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_real_time_payments_transfers.with_raw_response.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_real_time_payments_transfers.with_streaming_response.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -117,14 +117,14 @@ class TestAsyncInboundRealTimePaymentsTransfers: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_real_time_payments_transfers.with_raw_response.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) assert response.is_closed is True @@ -135,7 +135,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_real_time_payments_transfers.with_streaming_response.retrieve( - "inbound_real_time_payments_transfer_id", + "inbound_real_time_payments_transfer_63hlz498vcxg644hcrzr", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index c94b33829..8d0fb6d07 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -21,14 +21,14 @@ class TestInboundWireDrawdownRequests: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_wire_drawdown_request = client.inbound_wire_drawdown_requests.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_wire_drawdown_requests.with_raw_response.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_wire_drawdown_requests.with_streaming_response.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,14 +100,14 @@ class TestAsyncInboundWireDrawdownRequests: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.inbound_wire_drawdown_requests.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) assert_matches_type(InboundWireDrawdownRequest, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_wire_drawdown_requests.with_raw_response.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) assert response.is_closed is True @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_wire_drawdown_requests.with_streaming_response.retrieve( - "inbound_wire_drawdown_request_id", + "inbound_wire_drawdown_request_u5a92ikqhz1ytphn799e", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 984e76ab3..6087c698d 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -22,14 +22,14 @@ class TestInboundWireTransfers: @parametrize def test_method_retrieve(self, client: Increase) -> None: inbound_wire_transfer = client.inbound_wire_transfers.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.inbound_wire_transfers.with_raw_response.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.inbound_wire_transfers.with_streaming_response.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -155,14 +155,14 @@ class TestAsyncInboundWireTransfers: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: inbound_wire_transfer = await async_client.inbound_wire_transfers.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) assert_matches_type(InboundWireTransfer, inbound_wire_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.inbound_wire_transfers.with_raw_response.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) assert response.is_closed is True @@ -173,7 +173,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.inbound_wire_transfers.with_streaming_response.retrieve( - "inbound_wire_transfer_id", + "inbound_wire_transfer_f228m6bmhtcxjco9pwp0", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py index a6fc99827..8ed6b9981 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -57,14 +57,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: intrafi_account_enrollment = client.intrafi_account_enrollments.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.intrafi_account_enrollments.with_raw_response.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert response.is_closed is True @@ -75,7 +75,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.intrafi_account_enrollments.with_streaming_response.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -133,14 +133,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_unenroll(self, client: Increase) -> None: intrafi_account_enrollment = client.intrafi_account_enrollments.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_unenroll(self, client: Increase) -> None: response = client.intrafi_account_enrollments.with_raw_response.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert response.is_closed is True @@ -151,7 +151,7 @@ def test_raw_response_unenroll(self, client: Increase) -> None: @parametrize def test_streaming_response_unenroll(self, client: Increase) -> None: with client.intrafi_account_enrollments.with_streaming_response.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -213,14 +213,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: intrafi_account_enrollment = await async_client.intrafi_account_enrollments.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_account_enrollments.with_raw_response.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert response.is_closed is True @@ -231,7 +231,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_account_enrollments.with_streaming_response.retrieve( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -289,14 +289,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_unenroll(self, async_client: AsyncIncrease) -> None: intrafi_account_enrollment = await async_client.intrafi_account_enrollments.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert_matches_type(IntrafiAccountEnrollment, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_account_enrollments.with_raw_response.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) assert response.is_closed is True @@ -307,7 +307,7 @@ async def test_raw_response_unenroll(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_unenroll(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_account_enrollments.with_streaming_response.unenroll( - "intrafi_account_enrollment_id", + "intrafi_account_enrollment_w8l97znzreopkwf2tg75", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_intrafi_balances.py b/tests/api_resources/test_intrafi_balances.py index c021f05ba..8f1a9953c 100644 --- a/tests/api_resources/test_intrafi_balances.py +++ b/tests/api_resources/test_intrafi_balances.py @@ -20,14 +20,14 @@ class TestIntrafiBalances: @parametrize def test_method_intrafi_balance(self, client: Increase) -> None: intrafi_balance = client.intrafi_balances.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize def test_raw_response_intrafi_balance(self, client: Increase) -> None: response = client.intrafi_balances.with_raw_response.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_intrafi_balance(self, client: Increase) -> None: @parametrize def test_streaming_response_intrafi_balance(self, client: Increase) -> None: with client.intrafi_balances.with_streaming_response.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -64,14 +64,14 @@ class TestAsyncIntrafiBalances: @parametrize async def test_method_intrafi_balance(self, async_client: AsyncIncrease) -> None: intrafi_balance = await async_client.intrafi_balances.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(IntrafiBalance, intrafi_balance, path=["response"]) @parametrize async def test_raw_response_intrafi_balance(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_balances.with_raw_response.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -82,7 +82,7 @@ async def test_raw_response_intrafi_balance(self, async_client: AsyncIncrease) - @parametrize async def test_streaming_response_intrafi_balance(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_balances.with_streaming_response.intrafi_balance( - "account_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py index f7930e990..b3564fc62 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -55,14 +55,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: intrafi_exclusion = client.intrafi_exclusions.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.intrafi_exclusions.with_raw_response.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -73,7 +73,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.intrafi_exclusions.with_streaming_response.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,14 +128,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: intrafi_exclusion = client.intrafi_exclusions.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.intrafi_exclusions.with_raw_response.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) assert response.is_closed is True @@ -146,7 +146,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.intrafi_exclusions.with_streaming_response.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -206,14 +206,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: intrafi_exclusion = await async_client.intrafi_exclusions.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_exclusions.with_raw_response.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) assert response.is_closed is True @@ -224,7 +224,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_exclusions.with_streaming_response.retrieve( - "intrafi_exclusion_id", + "account_in71c4amph0vgo2qllky", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -279,14 +279,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: intrafi_exclusion = await async_client.intrafi_exclusions.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_exclusions.with_raw_response.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) assert response.is_closed is True @@ -297,7 +297,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_exclusions.with_streaming_response.archive( - "intrafi_exclusion_id", + "intrafi_exclusion_ygfqduuzpau3jqof6jyh", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index 29bc2015a..ff9fe0a85 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -62,14 +62,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: lockbox = client.lockboxes.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.lockboxes.with_raw_response.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) assert response.is_closed is True @@ -80,7 +80,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.lockboxes.with_streaming_response.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -235,14 +235,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.lockboxes.with_raw_response.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) assert response.is_closed is True @@ -253,7 +253,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.lockboxes.with_streaming_response.retrieve( - "lockbox_id", + "lockbox_3xt21ok13q19advds4t5", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py index 7fe1db78f..17280bde0 100644 --- a/tests/api_resources/test_oauth_applications.py +++ b/tests/api_resources/test_oauth_applications.py @@ -22,14 +22,14 @@ class TestOAuthApplications: @parametrize def test_method_retrieve(self, client: Increase) -> None: oauth_application = client.oauth_applications.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) assert_matches_type(OAuthApplication, oauth_application, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.oauth_applications.with_raw_response.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.oauth_applications.with_streaming_response.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -106,14 +106,14 @@ class TestAsyncOAuthApplications: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: oauth_application = await async_client.oauth_applications.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) assert_matches_type(OAuthApplication, oauth_application, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.oauth_applications.with_raw_response.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) assert response.is_closed is True @@ -124,7 +124,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.oauth_applications.with_streaming_response.retrieve( - "oauth_application_id", + "application_gj9ufmpgh5i56k4vyriy", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index cab23456d..52eb24ab4 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -21,14 +21,14 @@ class TestOAuthConnections: @parametrize def test_method_retrieve(self, client: Increase) -> None: oauth_connection = client.oauth_connections.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.oauth_connections.with_raw_response.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.oauth_connections.with_streaming_response.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -100,14 +100,14 @@ class TestAsyncOAuthConnections: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) assert_matches_type(OAuthConnection, oauth_connection, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.oauth_connections.with_raw_response.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) assert response.is_closed is True @@ -118,7 +118,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.oauth_connections.with_streaming_response.retrieve( - "x", + "connection_dauknoksyr4wilz4e6my", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 185106386..af444a4d6 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -65,14 +65,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: pending_transaction = client.pending_transactions.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.pending_transactions.with_raw_response.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -83,7 +83,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.pending_transactions.with_streaming_response.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -148,14 +148,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_release(self, client: Increase) -> None: pending_transaction = client.pending_transactions.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize def test_raw_response_release(self, client: Increase) -> None: response = client.pending_transactions.with_raw_response.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -166,7 +166,7 @@ def test_raw_response_release(self, client: Increase) -> None: @parametrize def test_streaming_response_release(self, client: Increase) -> None: with client.pending_transactions.with_streaming_response.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -237,14 +237,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.pending_transactions.with_raw_response.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -255,7 +255,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.pending_transactions.with_streaming_response.retrieve( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -320,14 +320,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_release(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert_matches_type(PendingTransaction, pending_transaction, path=["response"]) @parametrize async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: response = await async_client.pending_transactions.with_raw_response.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) assert response.is_closed is True @@ -338,7 +338,7 @@ async def test_raw_response_release(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_release(self, async_client: AsyncIncrease) -> None: async with async_client.pending_transactions.with_streaming_response.release( - "pending_transaction_id", + "pending_transaction_k1sfetcau2qbvjbzgju4", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 147fa8509..3301adf31 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -85,14 +85,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -103,7 +103,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.physical_card_profiles.with_streaming_response.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -160,14 +160,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.physical_card_profiles.with_raw_response.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -178,7 +178,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.physical_card_profiles.with_streaming_response.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -324,14 +324,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -342,7 +342,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.physical_card_profiles.with_streaming_response.retrieve( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -399,14 +399,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert_matches_type(PhysicalCardProfile, physical_card_profile, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_card_profiles.with_raw_response.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) assert response.is_closed is True @@ -417,7 +417,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.physical_card_profiles.with_streaming_response.archive( - "physical_card_profile_id", + "physical_card_profile_m534d5rn9qyy9ufqxoec", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index ca526387f..42fda8cd1 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -124,14 +124,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: physical_card = client.physical_cards.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.physical_cards.with_raw_response.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) assert response.is_closed is True @@ -142,7 +142,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.physical_cards.with_streaming_response.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -351,14 +351,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) assert_matches_type(PhysicalCard, physical_card, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.physical_cards.with_raw_response.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) assert response.is_closed is True @@ -369,7 +369,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.physical_cards.with_streaming_response.retrieve( - "physical_card_id", + "physical_card_ode8duyq5v2ynhjoharl", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 95d5e7627..1a4df07ac 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -21,14 +21,14 @@ class TestPrograms: @parametrize def test_method_retrieve(self, client: Increase) -> None: program = client.programs.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Program, program, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.programs.with_raw_response.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) assert response.is_closed is True @@ -39,7 +39,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.programs.with_streaming_response.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -98,14 +98,14 @@ class TestAsyncPrograms: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: program = await async_client.programs.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Program, program, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.programs.with_raw_response.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) assert response.is_closed is True @@ -116,7 +116,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.programs.with_streaming_response.retrieve( - "program_id", + "program_i2v2os4mwza1oetokh9i", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index eae0309ae..fcd9a8683 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -20,14 +20,14 @@ class TestRealTimeDecisions: @parametrize def test_method_retrieve(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.real_time_decisions.with_raw_response.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) assert response.is_closed is True @@ -38,7 +38,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.real_time_decisions.with_streaming_response.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -135,14 +135,14 @@ class TestAsyncRealTimeDecisions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: real_time_decision = await async_client.real_time_decisions.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) assert_matches_type(RealTimeDecision, real_time_decision, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_decisions.with_raw_response.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) assert response.is_closed is True @@ -153,7 +153,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_decisions.with_streaming_response.retrieve( - "real_time_decision_id", + "real_time_decision_j76n2e810ezcg3zh5qtn", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 5bddfed46..09e20196c 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -81,14 +81,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.real_time_payments_transfers.with_raw_response.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -99,7 +99,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.real_time_payments_transfers.with_streaming_response.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -164,14 +164,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.real_time_payments_transfers.with_raw_response.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -182,7 +182,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.real_time_payments_transfers.with_streaming_response.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -204,14 +204,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.real_time_payments_transfers.with_raw_response.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -222,7 +222,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.real_time_payments_transfers.with_streaming_response.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -307,14 +307,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_transfers.with_raw_response.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -325,7 +325,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_payments_transfers.with_streaming_response.retrieve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -390,14 +390,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_transfers.with_raw_response.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -408,7 +408,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_payments_transfers.with_streaming_response.approve( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -430,14 +430,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_transfers.with_raw_response.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) assert response.is_closed is True @@ -448,7 +448,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.real_time_payments_transfers.with_streaming_response.cancel( - "real_time_payments_transfer_id", + "real_time_payments_transfer_iyuhl5kdn7ssmup83mvq", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 4d718608a..d5491798f 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -22,14 +22,14 @@ class TestTransactions: @parametrize def test_method_retrieve(self, client: Increase) -> None: transaction = client.transactions.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) assert_matches_type(Transaction, transaction, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.transactions.with_raw_response.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) assert response.is_closed is True @@ -40,7 +40,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.transactions.with_streaming_response.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -108,14 +108,14 @@ class TestAsyncTransactions: @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) assert_matches_type(Transaction, transaction, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.transactions.with_raw_response.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) assert response.is_closed is True @@ -126,7 +126,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.transactions.with_streaming_response.retrieve( - "transaction_id", + "transaction_uyrp7fld2ium70oa7oi", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 8773766f8..dd4783e33 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -124,14 +124,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.wire_drawdown_requests.with_raw_response.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -142,7 +142,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.wire_drawdown_requests.with_streaming_response.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -308,14 +308,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_drawdown_requests.with_raw_response.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) assert response.is_closed is True @@ -326,7 +326,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_drawdown_requests.with_streaming_response.retrieve( - "wire_drawdown_request_id", + "wire_drawdown_request_q6lmocus3glo0lr2bfv3", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 0173a6f36..b2d2884e4 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -90,14 +90,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: wire_transfer = client.wire_transfers.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -108,7 +108,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -170,14 +170,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_approve(self, client: Increase) -> None: wire_transfer = client.wire_transfers.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_approve(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -188,7 +188,7 @@ def test_raw_response_approve(self, client: Increase) -> None: @parametrize def test_streaming_response_approve(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -208,14 +208,14 @@ def test_path_params_approve(self, client: Increase) -> None: @parametrize def test_method_cancel(self, client: Increase) -> None: wire_transfer = client.wire_transfers.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize def test_raw_response_cancel(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -226,7 +226,7 @@ def test_raw_response_cancel(self, client: Increase) -> None: @parametrize def test_streaming_response_cancel(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -320,14 +320,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -338,7 +338,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.retrieve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -400,14 +400,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_approve(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -418,7 +418,7 @@ async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.approve( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -438,14 +438,14 @@ async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_cancel(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @parametrize async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) assert response.is_closed is True @@ -456,7 +456,7 @@ async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: async with async_client.wire_transfers.with_streaming_response.cancel( - "wire_transfer_id", + "wire_transfer_5akynk7dqsq25qwk9q2u", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 153b4e16f657935ea7c25fc999fde0fb894c2b62 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:25:02 +0000 Subject: [PATCH 0868/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 22 ++++++++++++++++++++++ src/increase/types/transaction.py | 22 ++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e5dc4c9fa..86d1fe70d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d0d6147287983a83fc0ad164f706c3cdc48a13e223fd601aa954bbf0bbc402ed.yml -openapi_spec_hash: a3ccd1aa9bc5d03e6660b535d25401b1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-884e347f765b181f0f15f821b0c5786f51d532aae1077294aedf3fff0d6f9b22.yml +openapi_spec_hash: 119e76f07825b0975b385de037fe8d96 config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 2ce2d50ad..95aabbd84 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -85,6 +85,7 @@ "ElementCardSettlementPurchaseDetailsTravelAncillary", "ElementCardSettlementPurchaseDetailsTravelAncillaryService", "ElementCardSettlementPurchaseDetailsTravelTripLeg", + "ElementCardSettlementSurcharge", "ElementCardValidation", "ElementCardValidationAdditionalAmounts", "ElementCardValidationAdditionalAmountsClinic", @@ -2933,6 +2934,19 @@ class ElementCardSettlementPurchaseDetails(BaseModel): """Fields specific to travel.""" +class ElementCardSettlementSurcharge(BaseModel): + amount: int + """ + The surcharge amount in the minor unit of the transaction's settlement currency. + """ + + presentment_amount: int + """ + The surcharge amount in the minor unit of the transaction's presentment + currency. + """ + + class ElementCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -3025,6 +3039,14 @@ class ElementCardSettlement(BaseModel): fields. """ + surcharge: Optional[ElementCardSettlementSurcharge] = None + """Surcharge amount details, if applicable. + + The amounts positive if the surcharge is added to to the overall transaction + amount (surcharge), and negative if the surcharge is deducted from the overall + transaction amount (discount). + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 9f95f3335..d22097616 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -42,6 +42,7 @@ "SourceCardSettlementPurchaseDetailsTravelAncillary", "SourceCardSettlementPurchaseDetailsTravelAncillaryService", "SourceCardSettlementPurchaseDetailsTravelTripLeg", + "SourceCardSettlementSurcharge", "SourceCashbackPayment", "SourceCheckDepositAcceptance", "SourceCheckDepositReturn", @@ -1537,6 +1538,19 @@ class SourceCardSettlementPurchaseDetails(BaseModel): """Fields specific to travel.""" +class SourceCardSettlementSurcharge(BaseModel): + amount: int + """ + The surcharge amount in the minor unit of the transaction's settlement currency. + """ + + presentment_amount: int + """ + The surcharge amount in the minor unit of the transaction's presentment + currency. + """ + + class SourceCardSettlement(BaseModel): id: str """The Card Settlement identifier.""" @@ -1629,6 +1643,14 @@ class SourceCardSettlement(BaseModel): fields. """ + surcharge: Optional[SourceCardSettlementSurcharge] = None + """Surcharge amount details, if applicable. + + The amounts positive if the surcharge is added to to the overall transaction + amount (surcharge), and negative if the surcharge is deducted from the overall + transaction amount (discount). + """ + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" From 8aa983d93f8c493afbd3297a06fcf0b689ccc0d8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 22 Sep 2025 21:28:02 +0000 Subject: [PATCH 0869/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79bee3809..a61c73cba 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.334.0" + ".": "0.335.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 868ecad2c..1d33ab0a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.334.0" +version = "0.335.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b6b9f8238..cc52e8254 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.334.0" # x-release-please-version +__version__ = "0.335.0" # x-release-please-version From 743ec19df80c10d6af08c3e4a445e14060f77110 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:18:04 +0000 Subject: [PATCH 0870/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 2 +- src/increase/types/transaction.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 86d1fe70d..d265c5e45 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-884e347f765b181f0f15f821b0c5786f51d532aae1077294aedf3fff0d6f9b22.yml -openapi_spec_hash: 119e76f07825b0975b385de037fe8d96 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c92eec60054dfe853fc3f3147d60329d0b24e65d6e29a707d17f1e8c1b44bd7b.yml +openapi_spec_hash: cbe8d84401e587a8ebfd5037cf2bf7be config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 95aabbd84..eb82c52b2 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -3042,7 +3042,7 @@ class ElementCardSettlement(BaseModel): surcharge: Optional[ElementCardSettlementSurcharge] = None """Surcharge amount details, if applicable. - The amounts positive if the surcharge is added to to the overall transaction + The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d22097616..b73ff8d1f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1646,7 +1646,7 @@ class SourceCardSettlement(BaseModel): surcharge: Optional[SourceCardSettlementSurcharge] = None """Surcharge amount details, if applicable. - The amounts positive if the surcharge is added to to the overall transaction + The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ From a1ba942d41faf4ff0f05796bcc8d24856cb1b4db Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:20:53 +0000 Subject: [PATCH 0871/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a61c73cba..b054780a6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.335.0" + ".": "0.336.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1d33ab0a3..70e30010e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.335.0" +version = "0.336.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index cc52e8254..66fcbcaba 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.335.0" # x-release-please-version +__version__ = "0.336.0" # x-release-please-version From fcb948b4983a33866373e12a582145c9162c6885 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:23:00 +0000 Subject: [PATCH 0872/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 216 +++++++++++++++++---- src/increase/types/declined_transaction.py | 54 +++++- src/increase/types/pending_transaction.py | 54 +++++- src/increase/types/real_time_decision.py | 54 +++++- 5 files changed, 317 insertions(+), 65 deletions(-) diff --git a/.stats.yml b/.stats.yml index d265c5e45..776d32426 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c92eec60054dfe853fc3f3147d60329d0b24e65d6e29a707d17f1e8c1b44bd7b.yml -openapi_spec_hash: cbe8d84401e587a8ebfd5037cf2bf7be +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-beb9032c2ea0fb6fb46727701c252d27d8f2f77688472dc922fb10afb142dd1c.yml +openapi_spec_hash: dc5aa90744d4e0958a9a2d652adda0ba config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index eb82c52b2..f73f50d33 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -276,7 +276,11 @@ class ElementCardAuthentication(BaseModel): class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -287,7 +291,11 @@ class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -298,7 +306,11 @@ class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -309,7 +321,11 @@ class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): class ElementCardAuthorizationAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -320,7 +336,11 @@ class ElementCardAuthorizationAdditionalAmountsSurcharge(BaseModel): class ElementCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -331,7 +351,11 @@ class ElementCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class ElementCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -342,7 +366,11 @@ class ElementCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardAuthorizationAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -353,7 +381,11 @@ class ElementCardAuthorizationAdditionalAmountsTransit(BaseModel): class ElementCardAuthorizationAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -364,7 +396,11 @@ class ElementCardAuthorizationAdditionalAmountsUnknown(BaseModel): class ElementCardAuthorizationAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -844,7 +880,11 @@ class ElementCardAuthorizationExpiration(BaseModel): class ElementCardDeclineAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -855,7 +895,11 @@ class ElementCardDeclineAdditionalAmountsClinic(BaseModel): class ElementCardDeclineAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -866,7 +910,11 @@ class ElementCardDeclineAdditionalAmountsDental(BaseModel): class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -877,7 +925,11 @@ class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): class ElementCardDeclineAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -888,7 +940,11 @@ class ElementCardDeclineAdditionalAmountsSurcharge(BaseModel): class ElementCardDeclineAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -899,7 +955,11 @@ class ElementCardDeclineAdditionalAmountsTotalCumulative(BaseModel): class ElementCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -910,7 +970,11 @@ class ElementCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardDeclineAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -921,7 +985,11 @@ class ElementCardDeclineAdditionalAmountsTransit(BaseModel): class ElementCardDeclineAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -932,7 +1000,11 @@ class ElementCardDeclineAdditionalAmountsUnknown(BaseModel): class ElementCardDeclineAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1521,7 +1593,11 @@ class ElementCardFuelConfirmation(BaseModel): class ElementCardIncrementAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1532,7 +1608,11 @@ class ElementCardIncrementAdditionalAmountsClinic(BaseModel): class ElementCardIncrementAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1543,7 +1623,11 @@ class ElementCardIncrementAdditionalAmountsDental(BaseModel): class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1554,7 +1638,11 @@ class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): class ElementCardIncrementAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1565,7 +1653,11 @@ class ElementCardIncrementAdditionalAmountsSurcharge(BaseModel): class ElementCardIncrementAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1576,7 +1668,11 @@ class ElementCardIncrementAdditionalAmountsTotalCumulative(BaseModel): class ElementCardIncrementAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1587,7 +1683,11 @@ class ElementCardIncrementAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardIncrementAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1598,7 +1698,11 @@ class ElementCardIncrementAdditionalAmountsTransit(BaseModel): class ElementCardIncrementAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -1609,7 +1713,11 @@ class ElementCardIncrementAdditionalAmountsUnknown(BaseModel): class ElementCardIncrementAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3059,7 +3167,11 @@ class ElementCardSettlement(BaseModel): class ElementCardValidationAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3070,7 +3182,11 @@ class ElementCardValidationAdditionalAmountsClinic(BaseModel): class ElementCardValidationAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3081,7 +3197,11 @@ class ElementCardValidationAdditionalAmountsDental(BaseModel): class ElementCardValidationAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3092,7 +3212,11 @@ class ElementCardValidationAdditionalAmountsPrescription(BaseModel): class ElementCardValidationAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3103,7 +3227,11 @@ class ElementCardValidationAdditionalAmountsSurcharge(BaseModel): class ElementCardValidationAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3114,7 +3242,11 @@ class ElementCardValidationAdditionalAmountsTotalCumulative(BaseModel): class ElementCardValidationAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3125,7 +3257,11 @@ class ElementCardValidationAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardValidationAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3136,7 +3272,11 @@ class ElementCardValidationAdditionalAmountsTransit(BaseModel): class ElementCardValidationAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -3147,7 +3287,11 @@ class ElementCardValidationAdditionalAmountsUnknown(BaseModel): class ElementCardValidationAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 763d18f40..6acd90e51 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -124,7 +124,11 @@ class SourceACHDecline(BaseModel): class SourceCardDeclineAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -135,7 +139,11 @@ class SourceCardDeclineAdditionalAmountsClinic(BaseModel): class SourceCardDeclineAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -146,7 +154,11 @@ class SourceCardDeclineAdditionalAmountsDental(BaseModel): class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -157,7 +169,11 @@ class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): class SourceCardDeclineAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -168,7 +184,11 @@ class SourceCardDeclineAdditionalAmountsSurcharge(BaseModel): class SourceCardDeclineAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -179,7 +199,11 @@ class SourceCardDeclineAdditionalAmountsTotalCumulative(BaseModel): class SourceCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -190,7 +214,11 @@ class SourceCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): class SourceCardDeclineAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -201,7 +229,11 @@ class SourceCardDeclineAdditionalAmountsTransit(BaseModel): class SourceCardDeclineAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -212,7 +244,11 @@ class SourceCardDeclineAdditionalAmountsUnknown(BaseModel): class SourceCardDeclineAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 42543f655..65fd7f687 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -74,7 +74,11 @@ class SourceACHTransferInstruction(BaseModel): class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -85,7 +89,11 @@ class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -96,7 +104,11 @@ class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -107,7 +119,11 @@ class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): class SourceCardAuthorizationAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -118,7 +134,11 @@ class SourceCardAuthorizationAdditionalAmountsSurcharge(BaseModel): class SourceCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -129,7 +149,11 @@ class SourceCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class SourceCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -140,7 +164,11 @@ class SourceCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class SourceCardAuthorizationAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -151,7 +179,11 @@ class SourceCardAuthorizationAdditionalAmountsTransit(BaseModel): class SourceCardAuthorizationAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -162,7 +194,11 @@ class SourceCardAuthorizationAdditionalAmountsUnknown(BaseModel): class SourceCardAuthorizationAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 1f73b1556..4090167e0 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -87,7 +87,11 @@ class CardAuthenticationChallenge(BaseModel): class CardAuthorizationAdditionalAmountsClinic(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -98,7 +102,11 @@ class CardAuthorizationAdditionalAmountsClinic(BaseModel): class CardAuthorizationAdditionalAmountsDental(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -109,7 +117,11 @@ class CardAuthorizationAdditionalAmountsDental(BaseModel): class CardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -120,7 +132,11 @@ class CardAuthorizationAdditionalAmountsPrescription(BaseModel): class CardAuthorizationAdditionalAmountsSurcharge(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -131,7 +147,11 @@ class CardAuthorizationAdditionalAmountsSurcharge(BaseModel): class CardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -142,7 +162,11 @@ class CardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class CardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -153,7 +177,11 @@ class CardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class CardAuthorizationAdditionalAmountsTransit(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -164,7 +192,11 @@ class CardAuthorizationAdditionalAmountsTransit(BaseModel): class CardAuthorizationAdditionalAmountsUnknown(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ @@ -175,7 +207,11 @@ class CardAuthorizationAdditionalAmountsUnknown(BaseModel): class CardAuthorizationAdditionalAmountsVision(BaseModel): amount: int - """The amount in minor units of the `currency` field.""" + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ currency: str """ From 6d00697b88d9d648a0ba7228c6879faa367d0b98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 23 Sep 2025 23:25:44 +0000 Subject: [PATCH 0873/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b054780a6..cf2147414 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.336.0" + ".": "0.337.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 70e30010e..67dcc8a75 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.336.0" +version = "0.337.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 66fcbcaba..9ea9b6303 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.336.0" # x-release-please-version +__version__ = "0.337.0" # x-release-please-version From c68e8f221d406cf179aad52a1819ededdade41de Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 00:20:48 +0000 Subject: [PATCH 0874/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/account_transfers.py | 30 +++++++++------ src/increase/types/account_transfer.py | 38 +++++++++++-------- .../types/account_transfer_create_params.py | 15 ++++++-- 4 files changed, 54 insertions(+), 33 deletions(-) diff --git a/.stats.yml b/.stats.yml index 776d32426..afc57da05 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-beb9032c2ea0fb6fb46727701c252d27d8f2f77688472dc922fb10afb142dd1c.yml -openapi_spec_hash: dc5aa90744d4e0958a9a2d652adda0ba +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4c440e14682c4e4c886da6d05b2f5ff539a3aadc6906bb4069a5df45e0d3cae9.yml +openapi_spec_hash: e400be1da67cec4ce706eda1868dd86b config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 51ce62716..6aa93303e 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -62,16 +62,19 @@ def create( Create an Account Transfer Args: - account_id: The identifier for the account that will send the transfer. + account_id: The identifier for the originating Account that will send the transfer. amount: The transfer amount in the minor unit of the account currency. For dollars, for example, this is cents. - description: The description you choose to give the transfer. + description: An internal-facing description for the transfer for display in the API and + dashboard. This will also show in the description of the created Transactions. - destination_account_id: The identifier for the account that will receive the transfer. + destination_account_id: The identifier for the destination Account that will receive the transfer. - require_approval: Whether the transfer requires explicit approval via the dashboard or API. + require_approval: Whether the transfer should require explicit approval via the dashboard or API. + For more information, see + [Transfer Approvals](/documentation/transfer-approvals). extra_headers: Send extra headers @@ -216,7 +219,7 @@ def approve( idempotency_key: str | None = None, ) -> AccountTransfer: """ - Approve an Account Transfer + Approves an Account Transfer in status `pending_approval`. Args: account_transfer_id: The identifier of the Account Transfer to approve. @@ -260,7 +263,7 @@ def cancel( idempotency_key: str | None = None, ) -> AccountTransfer: """ - Cancel an Account Transfer + Cancels an Account Transfer in status `pending_approval`. Args: account_transfer_id: The identifier of the pending Account Transfer to cancel. @@ -332,16 +335,19 @@ async def create( Create an Account Transfer Args: - account_id: The identifier for the account that will send the transfer. + account_id: The identifier for the originating Account that will send the transfer. amount: The transfer amount in the minor unit of the account currency. For dollars, for example, this is cents. - description: The description you choose to give the transfer. + description: An internal-facing description for the transfer for display in the API and + dashboard. This will also show in the description of the created Transactions. - destination_account_id: The identifier for the account that will receive the transfer. + destination_account_id: The identifier for the destination Account that will receive the transfer. - require_approval: Whether the transfer requires explicit approval via the dashboard or API. + require_approval: Whether the transfer should require explicit approval via the dashboard or API. + For more information, see + [Transfer Approvals](/documentation/transfer-approvals). extra_headers: Send extra headers @@ -486,7 +492,7 @@ async def approve( idempotency_key: str | None = None, ) -> AccountTransfer: """ - Approve an Account Transfer + Approves an Account Transfer in status `pending_approval`. Args: account_transfer_id: The identifier of the Account Transfer to approve. @@ -530,7 +536,7 @@ async def cancel( idempotency_key: str | None = None, ) -> AccountTransfer: """ - Cancel an Account Transfer + Cancels an Account Transfer in status `pending_approval`. Args: account_transfer_id: The identifier of the pending Account Transfer to cancel. diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index e838a26d6..727af025b 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -83,15 +83,16 @@ class CreatedBy(BaseModel): class AccountTransfer(BaseModel): id: str - """The account transfer's identifier.""" + """The Account Transfer's identifier.""" account_id: str - """The Account to which the transfer belongs.""" + """The Account from which the transfer originated.""" amount: int - """The transfer amount in the minor unit of the destination account currency. + """The transfer amount in cents. - For dollars, for example, this is cents. + This will always be positive and indicates the amount of money leaving the + originating account. """ approval: Optional[Approval] = None @@ -117,8 +118,8 @@ class AccountTransfer(BaseModel): currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination - account currency. + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + currency. - `CAD` - Canadian Dollar (CAD) - `CHF` - Swiss Franc (CHF) @@ -129,13 +130,19 @@ class AccountTransfer(BaseModel): """ description: str - """The description that will show on the transactions.""" + """ + An internal-facing description for the transfer for display in the API and + dashboard. This will also show in the description of the created Transactions. + """ destination_account_id: str - """The destination account's identifier.""" + """The destination Account's identifier.""" destination_transaction_id: Optional[str] = None - """The ID for the transaction receiving the transfer.""" + """ + The identifier of the Transaction on the destination Account representing the + received funds. + """ idempotency_key: Optional[str] = None """The idempotency key you chose for this object. @@ -145,9 +152,6 @@ class AccountTransfer(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - network: Literal["account"] - """The transfer's network.""" - pending_transaction_id: Optional[str] = None """The ID for the pending transaction representing the transfer. @@ -159,13 +163,17 @@ class AccountTransfer(BaseModel): status: Literal["pending_approval", "canceled", "complete"] """The lifecycle status of the transfer. - - `pending_approval` - The transfer is pending approval. - - `canceled` - The transfer has been canceled. + - `pending_approval` - The transfer is pending approval from your team. + - `canceled` - The transfer was pending approval from your team and has been + canceled. - `complete` - The transfer has been completed. """ transaction_id: Optional[str] = None - """The ID for the transaction funding the transfer.""" + """ + The identifier of the Transaction on the originating account representing the + transferred funds. + """ type: Literal["account_transfer"] """A constant representing the object's type. diff --git a/src/increase/types/account_transfer_create_params.py b/src/increase/types/account_transfer_create_params.py index 0ec1db929..6a3db1a09 100644 --- a/src/increase/types/account_transfer_create_params.py +++ b/src/increase/types/account_transfer_create_params.py @@ -9,7 +9,7 @@ class AccountTransferCreateParams(TypedDict, total=False): account_id: Required[str] - """The identifier for the account that will send the transfer.""" + """The identifier for the originating Account that will send the transfer.""" amount: Required[int] """The transfer amount in the minor unit of the account currency. @@ -18,10 +18,17 @@ class AccountTransferCreateParams(TypedDict, total=False): """ description: Required[str] - """The description you choose to give the transfer.""" + """ + An internal-facing description for the transfer for display in the API and + dashboard. This will also show in the description of the created Transactions. + """ destination_account_id: Required[str] - """The identifier for the account that will receive the transfer.""" + """The identifier for the destination Account that will receive the transfer.""" require_approval: bool - """Whether the transfer requires explicit approval via the dashboard or API.""" + """Whether the transfer should require explicit approval via the dashboard or API. + + For more information, see + [Transfer Approvals](/documentation/transfer-approvals). + """ From d2bb3f164f5f8984f2d0e5fd68ddf8f0e9f9e134 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 00:23:29 +0000 Subject: [PATCH 0875/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cf2147414..2503a8405 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.337.0" + ".": "0.338.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 67dcc8a75..5cf15d47a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.337.0" +version = "0.338.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9ea9b6303..2e0464044 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.337.0" # x-release-please-version +__version__ = "0.338.0" # x-release-please-version From 30b2344b447cd9c9aec9ad2c208a92912fe6ffb1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 00:54:35 +0000 Subject: [PATCH 0876/1325] feat(api): api update --- .stats.yml | 6 +- api.md | 19 +- src/increase/_client.py | 9 - src/increase/resources/__init__.py | 14 - src/increase/resources/card_details.py | 392 ------------------ src/increase/resources/cards.py | 322 +++++++++++++- src/increase/types/__init__.py | 6 +- .../card_create_details_iframe_params.py | 15 + ...ard_detail_create_details_iframe_params.py | 12 - src/increase/types/card_update_params.py | 3 - ...te_params.py => card_update_pin_params.py} | 4 +- tests/api_resources/test_card_details.py | 279 ------------- tests/api_resources/test_cards.py | 260 +++++++++++- 13 files changed, 596 insertions(+), 745 deletions(-) delete mode 100644 src/increase/resources/card_details.py create mode 100644 src/increase/types/card_create_details_iframe_params.py delete mode 100644 src/increase/types/card_detail_create_details_iframe_params.py rename src/increase/types/{card_detail_update_params.py => card_update_pin_params.py} (73%) delete mode 100644 tests/api_resources/test_card_details.py diff --git a/.stats.yml b/.stats.yml index afc57da05..5a7b82c92 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4c440e14682c4e4c886da6d05b2f5ff539a3aadc6906bb4069a5df45e0d3cae9.yml -openapi_spec_hash: e400be1da67cec4ce706eda1868dd86b -config_hash: 8dadd60eab7ab858cf06c6a8633ed9f3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a19c46b65842ff370613aac24ba8777d7b961bd46a20e936e878386e048852.yml +openapi_spec_hash: 0f635610cedd9a0aacc6d5b347c3cccf +config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/api.md b/api.md index dcd9a2b98..5e0a48bb5 100644 --- a/api.md +++ b/api.md @@ -51,7 +51,7 @@ Methods: Types: ```python -from increase.types import Card +from increase.types import Card, CardDetails, CardIframeURL ``` Methods: @@ -60,20 +60,9 @@ Methods: - client.cards.retrieve(card_id) -> Card - client.cards.update(card_id, \*\*params) -> Card - client.cards.list(\*\*params) -> SyncPage[Card] - -# CardDetails - -Types: - -```python -from increase.types import CardDetails, CardIframeURL -``` - -Methods: - -- client.card_details.update(card_id, \*\*params) -> CardDetails -- client.card_details.create_details_iframe(card_id, \*\*params) -> CardIframeURL -- client.card_details.details(card_id) -> CardDetails +- client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL +- client.cards.details(card_id) -> CardDetails +- client.cards.update_pin(card_id, \*\*params) -> CardDetails # CardPayments diff --git a/src/increase/_client.py b/src/increase/_client.py index eef09a1cc..1e1afe163 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -38,7 +38,6 @@ lockboxes, file_links, card_tokens, - card_details, oauth_tokens, transactions, ach_transfers, @@ -113,7 +112,6 @@ class Increase(SyncAPIClient): account_numbers: account_numbers.AccountNumbersResource account_transfers: account_transfers.AccountTransfersResource cards: cards.CardsResource - card_details: card_details.CardDetailsResource card_payments: card_payments.CardPaymentsResource card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource physical_cards: physical_cards.PhysicalCardsResource @@ -259,7 +257,6 @@ def __init__( self.account_numbers = account_numbers.AccountNumbersResource(self) self.account_transfers = account_transfers.AccountTransfersResource(self) self.cards = cards.CardsResource(self) - self.card_details = card_details.CardDetailsResource(self) self.card_payments = card_payments.CardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) self.physical_cards = physical_cards.PhysicalCardsResource(self) @@ -474,7 +471,6 @@ class AsyncIncrease(AsyncAPIClient): account_numbers: account_numbers.AsyncAccountNumbersResource account_transfers: account_transfers.AsyncAccountTransfersResource cards: cards.AsyncCardsResource - card_details: card_details.AsyncCardDetailsResource card_payments: card_payments.AsyncCardPaymentsResource card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource physical_cards: physical_cards.AsyncPhysicalCardsResource @@ -622,7 +618,6 @@ def __init__( self.account_numbers = account_numbers.AsyncAccountNumbersResource(self) self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) self.cards = cards.AsyncCardsResource(self) - self.card_details = card_details.AsyncCardDetailsResource(self) self.card_payments = card_payments.AsyncCardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) @@ -840,7 +835,6 @@ def __init__(self, client: Increase) -> None: self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers) self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) self.cards = cards.CardsResourceWithRawResponse(client.cards) - self.card_details = card_details.CardDetailsResourceWithRawResponse(client.card_details) self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements @@ -951,7 +945,6 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_transfers ) self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards) - self.card_details = card_details.AsyncCardDetailsResourceWithRawResponse(client.card_details) self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements @@ -1076,7 +1069,6 @@ def __init__(self, client: Increase) -> None: client.account_transfers ) self.cards = cards.CardsResourceWithStreamingResponse(client.cards) - self.card_details = card_details.CardDetailsResourceWithStreamingResponse(client.card_details) self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( client.card_purchase_supplements @@ -1201,7 +1193,6 @@ def __init__(self, client: AsyncIncrease) -> None: client.account_transfers ) self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards) - self.card_details = card_details.AsyncCardDetailsResourceWithStreamingResponse(client.card_details) self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) self.card_purchase_supplements = ( card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 3f2b30ee3..4f8236321 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -104,14 +104,6 @@ SimulationsResourceWithStreamingResponse, AsyncSimulationsResourceWithStreamingResponse, ) -from .card_details import ( - CardDetailsResource, - AsyncCardDetailsResource, - CardDetailsResourceWithRawResponse, - AsyncCardDetailsResourceWithRawResponse, - CardDetailsResourceWithStreamingResponse, - AsyncCardDetailsResourceWithStreamingResponse, -) from .oauth_tokens import ( OAuthTokensResource, AsyncOAuthTokensResource, @@ -466,12 +458,6 @@ "AsyncCardsResourceWithRawResponse", "CardsResourceWithStreamingResponse", "AsyncCardsResourceWithStreamingResponse", - "CardDetailsResource", - "AsyncCardDetailsResource", - "CardDetailsResourceWithRawResponse", - "AsyncCardDetailsResourceWithRawResponse", - "CardDetailsResourceWithStreamingResponse", - "AsyncCardDetailsResourceWithStreamingResponse", "CardPaymentsResource", "AsyncCardPaymentsResource", "CardPaymentsResourceWithRawResponse", diff --git a/src/increase/resources/card_details.py b/src/increase/resources/card_details.py deleted file mode 100644 index d729ac2a9..000000000 --- a/src/increase/resources/card_details.py +++ /dev/null @@ -1,392 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..types import card_detail_update_params, card_detail_create_details_iframe_params -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from .._base_client import make_request_options -from ..types.card_details import CardDetails -from ..types.card_iframe_url import CardIframeURL - -__all__ = ["CardDetailsResource", "AsyncCardDetailsResource"] - - -class CardDetailsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> CardDetailsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return CardDetailsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> CardDetailsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return CardDetailsResourceWithStreamingResponse(self) - - def update( - self, - card_id: str, - *, - pin: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardDetails: - """ - Update a Card's PIN - - Args: - card_id: The card identifier. - - pin: The 4-digit PIN for the card, for use with ATMs. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return self._patch( - f"/cards/{card_id}/details", - body=maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDetails, - ) - - def create_details_iframe( - self, - card_id: str, - *, - physical_card_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardIframeURL: - """Create an iframe URL for a Card to display the card details. - - More details about - styling and usage can be found in the - [documentation](/documentation/embedded-card-component). - - Args: - card_id: The identifier of the Card to retrieve details for. - - physical_card_id: The identifier of the Physical Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return self._post( - f"/cards/{card_id}/create_details_iframe", - body=maybe_transform( - {"physical_card_id": physical_card_id}, - card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardIframeURL, - ) - - def details( - self, - card_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDetails: - """ - Sensitive details for a Card include the primary account number, expiry, card - verification code, and PIN. - - Args: - card_id: The identifier of the Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return self._get( - f"/cards/{card_id}/details", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDetails, - ) - - -class AsyncCardDetailsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncCardDetailsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncCardDetailsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncCardDetailsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncCardDetailsResourceWithStreamingResponse(self) - - async def update( - self, - card_id: str, - *, - pin: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardDetails: - """ - Update a Card's PIN - - Args: - card_id: The card identifier. - - pin: The 4-digit PIN for the card, for use with ATMs. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return await self._patch( - f"/cards/{card_id}/details", - body=await async_maybe_transform({"pin": pin}, card_detail_update_params.CardDetailUpdateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardDetails, - ) - - async def create_details_iframe( - self, - card_id: str, - *, - physical_card_id: str | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> CardIframeURL: - """Create an iframe URL for a Card to display the card details. - - More details about - styling and usage can be found in the - [documentation](/documentation/embedded-card-component). - - Args: - card_id: The identifier of the Card to retrieve details for. - - physical_card_id: The identifier of the Physical Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return await self._post( - f"/cards/{card_id}/create_details_iframe", - body=await async_maybe_transform( - {"physical_card_id": physical_card_id}, - card_detail_create_details_iframe_params.CardDetailCreateDetailsIframeParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=CardIframeURL, - ) - - async def details( - self, - card_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDetails: - """ - Sensitive details for a Card include the primary account number, expiry, card - verification code, and PIN. - - Args: - card_id: The identifier of the Card to retrieve details for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not card_id: - raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") - return await self._get( - f"/cards/{card_id}/details", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=CardDetails, - ) - - -class CardDetailsResourceWithRawResponse: - def __init__(self, card_details: CardDetailsResource) -> None: - self._card_details = card_details - - self.update = to_raw_response_wrapper( - card_details.update, - ) - self.create_details_iframe = to_raw_response_wrapper( - card_details.create_details_iframe, - ) - self.details = to_raw_response_wrapper( - card_details.details, - ) - - -class AsyncCardDetailsResourceWithRawResponse: - def __init__(self, card_details: AsyncCardDetailsResource) -> None: - self._card_details = card_details - - self.update = async_to_raw_response_wrapper( - card_details.update, - ) - self.create_details_iframe = async_to_raw_response_wrapper( - card_details.create_details_iframe, - ) - self.details = async_to_raw_response_wrapper( - card_details.details, - ) - - -class CardDetailsResourceWithStreamingResponse: - def __init__(self, card_details: CardDetailsResource) -> None: - self._card_details = card_details - - self.update = to_streamed_response_wrapper( - card_details.update, - ) - self.create_details_iframe = to_streamed_response_wrapper( - card_details.create_details_iframe, - ) - self.details = to_streamed_response_wrapper( - card_details.details, - ) - - -class AsyncCardDetailsResourceWithStreamingResponse: - def __init__(self, card_details: AsyncCardDetailsResource) -> None: - self._card_details = card_details - - self.update = async_to_streamed_response_wrapper( - card_details.update, - ) - self.create_details_iframe = async_to_streamed_response_wrapper( - card_details.create_details_iframe, - ) - self.details = async_to_streamed_response_wrapper( - card_details.details, - ) diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 93b4025bc..f5dae7300 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -6,7 +6,13 @@ import httpx -from ..types import card_list_params, card_create_params, card_update_params +from ..types import ( + card_list_params, + card_create_params, + card_update_params, + card_update_pin_params, + card_create_details_iframe_params, +) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -20,6 +26,8 @@ from ..pagination import SyncPage, AsyncPage from ..types.card import Card from .._base_client import AsyncPaginator, make_request_options +from ..types.card_details import CardDetails +from ..types.card_iframe_url import CardIframeURL __all__ = ["CardsResource", "AsyncCardsResource"] @@ -154,7 +162,6 @@ def update( description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, entity_id: str | Omit = omit, - pin: str | Omit = omit, status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -181,8 +188,6 @@ def update( entity_id: The Entity the card belongs to. You only need to supply this in rare situations when the card is not for the Account holder. - pin: The 4-digit PIN for the card, for use with ATMs. - status: The status to update the Card with. - `active` - The card is active. @@ -209,7 +214,6 @@ def update( "description": description, "digital_wallet": digital_wallet, "entity_id": entity_id, - "pin": pin, "status": status, }, card_update_params.CardUpdateParams, @@ -287,6 +291,140 @@ def list( model=Card, ) + def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to create an iframe for. + + physical_card_id: The identifier of the Physical Card to create an iframe for. This will inform + the appearance of the card rendered in the iframe. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._post( + f"/cards/{card_id}/create_details_iframe", + body=maybe_transform( + {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + + def details( + self, + card_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDetails: + """ + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. + + Args: + card_id: The identifier of the Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._get( + f"/cards/{card_id}/details", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDetails, + ) + + def update_pin( + self, + card_id: str, + *, + pin: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDetails: + """ + Update a Card's PIN + + Args: + card_id: The identifier of the Card to update the PIN for. + + pin: The 4-digit PIN for the card, for use with ATMs. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return self._post( + f"/cards/{card_id}/update_pin", + body=maybe_transform({"pin": pin}, card_update_pin_params.CardUpdatePinParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDetails, + ) + class AsyncCardsResource(AsyncAPIResource): @cached_property @@ -418,7 +556,6 @@ async def update( description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, entity_id: str | Omit = omit, - pin: str | Omit = omit, status: Literal["active", "disabled", "canceled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -445,8 +582,6 @@ async def update( entity_id: The Entity the card belongs to. You only need to supply this in rare situations when the card is not for the Account holder. - pin: The 4-digit PIN for the card, for use with ATMs. - status: The status to update the Card with. - `active` - The card is active. @@ -473,7 +608,6 @@ async def update( "description": description, "digital_wallet": digital_wallet, "entity_id": entity_id, - "pin": pin, "status": status, }, card_update_params.CardUpdateParams, @@ -551,6 +685,140 @@ def list( model=Card, ) + async def create_details_iframe( + self, + card_id: str, + *, + physical_card_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardIframeURL: + """Create an iframe URL for a Card to display the card details. + + More details about + styling and usage can be found in the + [documentation](/documentation/embedded-card-component). + + Args: + card_id: The identifier of the Card to create an iframe for. + + physical_card_id: The identifier of the Physical Card to create an iframe for. This will inform + the appearance of the card rendered in the iframe. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._post( + f"/cards/{card_id}/create_details_iframe", + body=await async_maybe_transform( + {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardIframeURL, + ) + + async def details( + self, + card_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDetails: + """ + Sensitive details for a Card include the primary account number, expiry, card + verification code, and PIN. + + Args: + card_id: The identifier of the Card to retrieve details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._get( + f"/cards/{card_id}/details", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDetails, + ) + + async def update_pin( + self, + card_id: str, + *, + pin: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDetails: + """ + Update a Card's PIN + + Args: + card_id: The identifier of the Card to update the PIN for. + + pin: The 4-digit PIN for the card, for use with ATMs. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_id: + raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") + return await self._post( + f"/cards/{card_id}/update_pin", + body=await async_maybe_transform({"pin": pin}, card_update_pin_params.CardUpdatePinParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDetails, + ) + class CardsResourceWithRawResponse: def __init__(self, cards: CardsResource) -> None: @@ -568,6 +836,15 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_raw_response_wrapper( cards.list, ) + self.create_details_iframe = to_raw_response_wrapper( + cards.create_details_iframe, + ) + self.details = to_raw_response_wrapper( + cards.details, + ) + self.update_pin = to_raw_response_wrapper( + cards.update_pin, + ) class AsyncCardsResourceWithRawResponse: @@ -586,6 +863,15 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_raw_response_wrapper( cards.list, ) + self.create_details_iframe = async_to_raw_response_wrapper( + cards.create_details_iframe, + ) + self.details = async_to_raw_response_wrapper( + cards.details, + ) + self.update_pin = async_to_raw_response_wrapper( + cards.update_pin, + ) class CardsResourceWithStreamingResponse: @@ -604,6 +890,15 @@ def __init__(self, cards: CardsResource) -> None: self.list = to_streamed_response_wrapper( cards.list, ) + self.create_details_iframe = to_streamed_response_wrapper( + cards.create_details_iframe, + ) + self.details = to_streamed_response_wrapper( + cards.details, + ) + self.update_pin = to_streamed_response_wrapper( + cards.update_pin, + ) class AsyncCardsResourceWithStreamingResponse: @@ -622,3 +917,12 @@ def __init__(self, cards: AsyncCardsResource) -> None: self.list = async_to_streamed_response_wrapper( cards.list, ) + self.create_details_iframe = async_to_streamed_response_wrapper( + cards.create_details_iframe, + ) + self.details = async_to_streamed_response_wrapper( + cards.details, + ) + self.update_pin = async_to_streamed_response_wrapper( + cards.update_pin, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index a9c02408e..73a9288f4 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -73,6 +73,7 @@ from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams from .card_token_list_params import CardTokenListParams as CardTokenListParams +from .card_update_pin_params import CardUpdatePinParams as CardUpdatePinParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams @@ -80,7 +81,6 @@ from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement -from .card_detail_update_params import CardDetailUpdateParams as CardDetailUpdateParams from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams @@ -134,6 +134,7 @@ from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams +from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams from .digital_card_profile_clone_params import DigitalCardProfileCloneParams as DigitalCardProfileCloneParams from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams @@ -167,9 +168,6 @@ from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) -from .card_detail_create_details_iframe_params import ( - CardDetailCreateDetailsIframeParams as CardDetailCreateDetailsIframeParams, -) from .intrafi_account_enrollment_create_params import ( IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, ) diff --git a/src/increase/types/card_create_details_iframe_params.py b/src/increase/types/card_create_details_iframe_params.py new file mode 100644 index 000000000..1aeb3786f --- /dev/null +++ b/src/increase/types/card_create_details_iframe_params.py @@ -0,0 +1,15 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["CardCreateDetailsIframeParams"] + + +class CardCreateDetailsIframeParams(TypedDict, total=False): + physical_card_id: str + """The identifier of the Physical Card to create an iframe for. + + This will inform the appearance of the card rendered in the iframe. + """ diff --git a/src/increase/types/card_detail_create_details_iframe_params.py b/src/increase/types/card_detail_create_details_iframe_params.py deleted file mode 100644 index 47efe4422..000000000 --- a/src/increase/types/card_detail_create_details_iframe_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import TypedDict - -__all__ = ["CardDetailCreateDetailsIframeParams"] - - -class CardDetailCreateDetailsIframeParams(TypedDict, total=False): - physical_card_id: str - """The identifier of the Physical Card to retrieve details for.""" diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index 800728156..85c1842d9 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -28,9 +28,6 @@ class CardUpdateParams(TypedDict, total=False): Account holder. """ - pin: str - """The 4-digit PIN for the card, for use with ATMs.""" - status: Literal["active", "disabled", "canceled"] """The status to update the Card with. diff --git a/src/increase/types/card_detail_update_params.py b/src/increase/types/card_update_pin_params.py similarity index 73% rename from src/increase/types/card_detail_update_params.py rename to src/increase/types/card_update_pin_params.py index dfed669fc..8c4380609 100644 --- a/src/increase/types/card_detail_update_params.py +++ b/src/increase/types/card_update_pin_params.py @@ -4,9 +4,9 @@ from typing_extensions import Required, TypedDict -__all__ = ["CardDetailUpdateParams"] +__all__ = ["CardUpdatePinParams"] -class CardDetailUpdateParams(TypedDict, total=False): +class CardUpdatePinParams(TypedDict, total=False): pin: Required[str] """The 4-digit PIN for the card, for use with ATMs.""" diff --git a/tests/api_resources/test_card_details.py b/tests/api_resources/test_card_details.py deleted file mode 100644 index 598c813b0..000000000 --- a/tests/api_resources/test_card_details.py +++ /dev/null @@ -1,279 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import ( - CardDetails, - CardIframeURL, -) - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestCardDetails: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_update(self, client: Increase) -> None: - card_detail = client.card_details.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - def test_raw_response_update(self, client: Increase) -> None: - response = client.card_details.with_raw_response.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - def test_streaming_response_update(self, client: Increase) -> None: - with client.card_details.with_streaming_response.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.card_details.with_raw_response.update( - card_id="", - pin="1234", - ) - - @parametrize - def test_method_create_details_iframe(self, client: Increase) -> None: - card_detail = client.card_details.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None: - card_detail = client.card_details.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - def test_raw_response_create_details_iframe(self, client: Increase) -> None: - response = client.card_details.with_raw_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = response.parse() - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - def test_streaming_response_create_details_iframe(self, client: Increase) -> None: - with client.card_details.with_streaming_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = response.parse() - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create_details_iframe(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.card_details.with_raw_response.create_details_iframe( - card_id="", - ) - - @parametrize - def test_method_details(self, client: Increase) -> None: - card_detail = client.card_details.details( - "card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - def test_raw_response_details(self, client: Increase) -> None: - response = client.card_details.with_raw_response.details( - "card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - def test_streaming_response_details(self, client: Increase) -> None: - with client.card_details.with_streaming_response.details( - "card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_details(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - client.card_details.with_raw_response.details( - "", - ) - - -class TestAsyncCardDetails: - parametrize = pytest.mark.parametrize( - "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] - ) - - @parametrize - async def test_method_update(self, async_client: AsyncIncrease) -> None: - card_detail = await async_client.card_details.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_details.with_raw_response.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = await response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: - async with async_client.card_details.with_streaming_response.update( - card_id="card_oubs0hwk5rn6knuecxg2", - pin="1234", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = await response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.card_details.with_raw_response.update( - card_id="", - pin="1234", - ) - - @parametrize - async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None: - card_detail = await async_client.card_details.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None: - card_detail = await async_client.card_details.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - physical_card_id="physical_card_id", - ) - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_details.with_raw_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = await response.parse() - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - @parametrize - async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: - async with async_client.card_details.with_streaming_response.create_details_iframe( - card_id="card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = await response.parse() - assert_matches_type(CardIframeURL, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.card_details.with_raw_response.create_details_iframe( - card_id="", - ) - - @parametrize - async def test_method_details(self, async_client: AsyncIncrease) -> None: - card_detail = await async_client.card_details.details( - "card_oubs0hwk5rn6knuecxg2", - ) - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: - response = await async_client.card_details.with_raw_response.details( - "card_oubs0hwk5rn6knuecxg2", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - card_detail = await response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - @parametrize - async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: - async with async_client.card_details.with_streaming_response.details( - "card_oubs0hwk5rn6knuecxg2", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - card_detail = await response.parse() - assert_matches_type(CardDetails, card_detail, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_details(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): - await async_client.card_details.with_raw_response.details( - "", - ) diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 61ef7dcfa..447e714b0 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -9,7 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Card +from increase.types import ( + Card, + CardDetails, + CardIframeURL, +) from increase._utils import parse_datetime from increase.pagination import SyncPage, AsyncPage @@ -134,7 +138,6 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "phone": "x", }, entity_id="entity_id", - pin="xxxx", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -212,6 +215,132 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_create_details_iframe(self, client: Increase) -> None: + card = client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_method_create_details_iframe_with_all_params(self, client: Increase) -> None: + card = client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_raw_response_create_details_iframe(self, client: Increase) -> None: + response = client.cards.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + def test_streaming_response_create_details_iframe(self, client: Increase) -> None: + with client.cards.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_create_details_iframe(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.cards.with_raw_response.create_details_iframe( + card_id="", + ) + + @parametrize + def test_method_details(self, client: Increase) -> None: + card = client.cards.details( + "card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + def test_raw_response_details(self, client: Increase) -> None: + response = client.cards.with_raw_response.details( + "card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + def test_streaming_response_details(self, client: Increase) -> None: + with client.cards.with_streaming_response.details( + "card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_details(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.cards.with_raw_response.details( + "", + ) + + @parametrize + def test_method_update_pin(self, client: Increase) -> None: + card = client.cards.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + def test_raw_response_update_pin(self, client: Increase) -> None: + response = client.cards.with_raw_response.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + def test_streaming_response_update_pin(self, client: Increase) -> None: + with client.cards.with_streaming_response.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update_pin(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + client.cards.with_raw_response.update_pin( + card_id="", + pin="1234", + ) + class TestAsyncCards: parametrize = pytest.mark.parametrize( @@ -333,7 +462,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "phone": "x", }, entity_id="entity_id", - pin="xxxx", status="active", ) assert_matches_type(Card, card, path=["response"]) @@ -410,3 +538,129 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[Card], card, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_create_details_iframe(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_method_create_details_iframe_with_all_params(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + physical_card_id="physical_card_id", + ) + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_raw_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = await response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + @parametrize + async def test_streaming_response_create_details_iframe(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.create_details_iframe( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(CardIframeURL, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_create_details_iframe(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.cards.with_raw_response.create_details_iframe( + card_id="", + ) + + @parametrize + async def test_method_details(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.details( + "card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + async def test_raw_response_details(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.details( + "card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = await response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + async def test_streaming_response_details(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.details( + "card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_details(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.cards.with_raw_response.details( + "", + ) + + @parametrize + async def test_method_update_pin(self, async_client: AsyncIncrease) -> None: + card = await async_client.cards.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + async def test_raw_response_update_pin(self, async_client: AsyncIncrease) -> None: + response = await async_client.cards.with_raw_response.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card = await response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + @parametrize + async def test_streaming_response_update_pin(self, async_client: AsyncIncrease) -> None: + async with async_client.cards.with_streaming_response.update_pin( + card_id="card_oubs0hwk5rn6knuecxg2", + pin="1234", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card = await response.parse() + assert_matches_type(CardDetails, card, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update_pin(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_id` but received ''"): + await async_client.cards.with_raw_response.update_pin( + card_id="", + pin="1234", + ) From f5b5164a21803bf136dc1d2bb05fd77ba9037c8f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 00:57:26 +0000 Subject: [PATCH 0877/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2503a8405..705b0cb27 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.338.0" + ".": "0.339.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5cf15d47a..8db0fb1f8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.338.0" +version = "0.339.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2e0464044..aef62a468 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.338.0" # x-release-please-version +__version__ = "0.339.0" # x-release-please-version From da5eefb415e8a4638c605fe46e1777ed8433ff06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:26:56 +0000 Subject: [PATCH 0878/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 16 ++++++++++++++++ .../types/event_subscription_create_params.py | 8 ++++++++ tests/api_resources/test_event_subscriptions.py | 2 ++ 4 files changed, 28 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a7b82c92..2923d8298 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a19c46b65842ff370613aac24ba8777d7b961bd46a20e936e878386e048852.yml -openapi_spec_hash: 0f635610cedd9a0aacc6d5b347c3cccf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3e092c1a52f33e962b8415bfa24a244fdb66783aa093e027501124cb8658881b.yml +openapi_spec_hash: 677f23c2d65201b72074b3effb7d9ad4 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 9d59c63cb..1678decce 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -157,6 +157,7 @@ def create( ] | Omit = omit, shared_secret: str | Omit = omit, + status: Literal["active", "disabled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -341,6 +342,12 @@ def create( shared_secret: The key that will be used to sign webhooks. If no value is passed, a random string will be used as default. + status: The status of the event subscription. Defaults to `active` if not specified. + + - `active` - The subscription is active and Events will be delivered normally. + - `disabled` - The subscription is temporarily disabled and Events will not be + delivered. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -359,6 +366,7 @@ def create( "oauth_connection_id": oauth_connection_id, "selected_event_category": selected_event_category, "shared_secret": shared_secret, + "status": status, }, event_subscription_create_params.EventSubscriptionCreateParams, ), @@ -652,6 +660,7 @@ async def create( ] | Omit = omit, shared_secret: str | Omit = omit, + status: Literal["active", "disabled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -836,6 +845,12 @@ async def create( shared_secret: The key that will be used to sign webhooks. If no value is passed, a random string will be used as default. + status: The status of the event subscription. Defaults to `active` if not specified. + + - `active` - The subscription is active and Events will be delivered normally. + - `disabled` - The subscription is temporarily disabled and Events will not be + delivered. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -854,6 +869,7 @@ async def create( "oauth_connection_id": oauth_connection_id, "selected_event_category": selected_event_category, "shared_secret": shared_secret, + "status": status, }, event_subscription_create_params.EventSubscriptionCreateParams, ), diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index b72f51119..6eca5b263 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -294,3 +294,11 @@ class EventSubscriptionCreateParams(TypedDict, total=False): If no value is passed, a random string will be used as default. """ + + status: Literal["active", "disabled"] + """The status of the event subscription. Defaults to `active` if not specified. + + - `active` - The subscription is active and Events will be delivered normally. + - `disabled` - The subscription is temporarily disabled and Events will not be + delivered. + """ diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index 34963f3cd..f8577e2cf 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -34,6 +34,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: oauth_connection_id="x", selected_event_category="account.created", shared_secret="x", + status="active", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) @@ -199,6 +200,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) oauth_connection_id="x", selected_event_category="account.created", shared_secret="x", + status="active", ) assert_matches_type(EventSubscription, event_subscription, path=["response"]) From bf4040cdf28dc5bb2805d239ff9db5ff0f7143f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 24 Sep 2025 19:30:12 +0000 Subject: [PATCH 0879/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 705b0cb27..045a06e9d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.339.0" + ".": "0.340.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8db0fb1f8..5073f4777 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.339.0" +version = "0.340.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index aef62a468..29d0ec0b0 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.339.0" # x-release-please-version +__version__ = "0.340.0" # x-release-please-version From 9eabc4837c361c41d49c28c9bdc2083f377bc148 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 04:13:15 +0000 Subject: [PATCH 0880/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/transaction.py | 587 ++++++++++++++++++ src/increase/types/transaction_list_params.py | 1 + 3 files changed, 590 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2923d8298..a9120ac7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3e092c1a52f33e962b8415bfa24a244fdb66783aa093e027501124cb8658881b.yml -openapi_spec_hash: 677f23c2d65201b72074b3effb7d9ad4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-749004bde06df3642fccde727f8e872c02795128db180789d1377c3168bd71ba.yml +openapi_spec_hash: 9058f9b3951c7608de5b67d8d5c87ffd config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index b73ff8d1f..6b461818f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -18,6 +18,23 @@ "SourceCardDisputeFinancial", "SourceCardDisputeFinancialVisa", "SourceCardDisputeLoss", + "SourceCardFinancial", + "SourceCardFinancialAdditionalAmounts", + "SourceCardFinancialAdditionalAmountsClinic", + "SourceCardFinancialAdditionalAmountsDental", + "SourceCardFinancialAdditionalAmountsPrescription", + "SourceCardFinancialAdditionalAmountsSurcharge", + "SourceCardFinancialAdditionalAmountsTotalCumulative", + "SourceCardFinancialAdditionalAmountsTotalHealthcare", + "SourceCardFinancialAdditionalAmountsTransit", + "SourceCardFinancialAdditionalAmountsUnknown", + "SourceCardFinancialAdditionalAmountsVision", + "SourceCardFinancialNetworkDetails", + "SourceCardFinancialNetworkDetailsVisa", + "SourceCardFinancialNetworkIdentifiers", + "SourceCardFinancialVerification", + "SourceCardFinancialVerificationCardVerificationCode", + "SourceCardFinancialVerificationCardholderAddress", "SourceCardPushTransferAcceptance", "SourceCardRefund", "SourceCardRefundCashback", @@ -473,6 +490,565 @@ class SourceCardDisputeLoss(BaseModel): """ +class SourceCardFinancialAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class SourceCardFinancialAdditionalAmounts(BaseModel): + clinic: Optional[SourceCardFinancialAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[SourceCardFinancialAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + prescription: Optional[SourceCardFinancialAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[SourceCardFinancialAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[SourceCardFinancialAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[SourceCardFinancialAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[SourceCardFinancialAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[SourceCardFinancialAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[SourceCardFinancialAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + +class SourceCardFinancialNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however , cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class SourceCardFinancialNetworkDetails(BaseModel): + category: Literal["visa"] + """The payment network used to process this card authorization. + + - `visa` - Visa + """ + + visa: Optional[SourceCardFinancialNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class SourceCardFinancialNetworkIdentifiers(BaseModel): + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class SourceCardFinancialVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class SourceCardFinancialVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class SourceCardFinancialVerification(BaseModel): + card_verification_code: SourceCardFinancialVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: SourceCardFinancialVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class SourceCardFinancial(BaseModel): + id: str + """The Card Financial identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this financial was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + additional_amounts: SourceCardFinancialAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: SourceCardFinancialNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: SourceCardFinancialNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", + "cash_disbursement", + "unknown", + ] + """ + The processing category describes the intent behind the financial, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + transaction_id: str + """The identifier of the Transaction associated with this Transaction.""" + + type: Literal["card_financial"] + """A constant representing the object's type. + + For this resource it will always be `card_financial`. + """ + + verification: SourceCardFinancialVerification + """Fields related to verification of cardholder-provided values.""" + + class SourceCardPushTransferAcceptance(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -2401,6 +2977,14 @@ class Source(BaseModel): equal to `card_dispute_loss`. Contains the details of a lost Card Dispute. """ + card_financial: Optional[SourceCardFinancial] = None + """A Card Financial object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_financial`. Card Financials are temporary holds placed on a + customers funds with the intent to later clear a transaction. + """ + card_push_transfer_acceptance: Optional[SourceCardPushTransferAcceptance] = None """A Card Push Transfer Acceptance object. @@ -2456,6 +3040,7 @@ class Source(BaseModel): "card_dispute_loss", "card_refund", "card_settlement", + "card_financial", "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", @@ -2506,6 +3091,8 @@ class Source(BaseModel): - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_settlement` - Card Settlement: details will be under the `card_settlement` object. + - `card_financial` - Card Financial: details will be under the `card_financial` + object. - `card_revenue_payment` - Card Revenue Payment: details will be under the `card_revenue_payment` object. - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 7339df2bc..4af4a7d26 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -50,6 +50,7 @@ class TransactionListParams(TypedDict, total=False): "card_dispute_loss", "card_refund", "card_settlement", + "card_financial", "card_revenue_payment", "check_deposit_acceptance", "check_deposit_return", From 532d049bd3622c8afae35f71f90de453c9da9b65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 04:17:12 +0000 Subject: [PATCH 0881/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 045a06e9d..7951156ff 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.340.0" + ".": "0.341.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 5073f4777..010887a97 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.340.0" +version = "0.341.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 29d0ec0b0..d5fad0193 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.340.0" # x-release-please-version +__version__ = "0.341.0" # x-release-please-version From f03e3c52b3a867f89d3eee5d1c00b56bae665dca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:02:33 +0000 Subject: [PATCH 0882/1325] feat(api): api update --- .stats.yml | 4 +-- .../resources/simulations/card_refunds.py | 30 +++++++++++++++---- .../simulations/card_refund_create_params.py | 11 +++++-- .../simulations/test_card_refunds.py | 28 +++++++++-------- 4 files changed, 52 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index a9120ac7b..d034046d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-749004bde06df3642fccde727f8e872c02795128db180789d1377c3168bd71ba.yml -openapi_spec_hash: 9058f9b3951c7608de5b67d8d5c87ffd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c51555226fd66ed304eb1e9c759a6485c071eb2cb9ca9ee86f5b5cd88552ee4a.yml +openapi_spec_hash: c5b09ec531c068cb675f8cd3729733c6 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index 597d864b5..a233eed0a 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -4,7 +4,7 @@ import httpx -from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -44,7 +44,8 @@ def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: def create( self, *, - transaction_id: str, + pending_transaction_id: str | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -59,6 +60,10 @@ def create( transaction is refunded. Args: + pending_transaction_id: The identifier of the Pending Transaction for the refund authorization. If this + is provided, `transaction` must not be provided as a refund with a refund + authorized can not be linked to a regular transaction. + transaction_id: The identifier for the Transaction to refund. The Transaction's source must have a category of card_settlement. @@ -74,7 +79,13 @@ def create( """ return self._post( "/simulations/card_refunds", - body=maybe_transform({"transaction_id": transaction_id}, card_refund_create_params.CardRefundCreateParams), + body=maybe_transform( + { + "pending_transaction_id": pending_transaction_id, + "transaction_id": transaction_id, + }, + card_refund_create_params.CardRefundCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -109,7 +120,8 @@ def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingRespon async def create( self, *, - transaction_id: str, + pending_transaction_id: str | Omit = omit, + transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -124,6 +136,10 @@ async def create( transaction is refunded. Args: + pending_transaction_id: The identifier of the Pending Transaction for the refund authorization. If this + is provided, `transaction` must not be provided as a refund with a refund + authorized can not be linked to a regular transaction. + transaction_id: The identifier for the Transaction to refund. The Transaction's source must have a category of card_settlement. @@ -140,7 +156,11 @@ async def create( return await self._post( "/simulations/card_refunds", body=await async_maybe_transform( - {"transaction_id": transaction_id}, card_refund_create_params.CardRefundCreateParams + { + "pending_transaction_id": pending_transaction_id, + "transaction_id": transaction_id, + }, + card_refund_create_params.CardRefundCreateParams, ), options=make_request_options( extra_headers=extra_headers, diff --git a/src/increase/types/simulations/card_refund_create_params.py b/src/increase/types/simulations/card_refund_create_params.py index fb072b9c0..da0c4704a 100644 --- a/src/increase/types/simulations/card_refund_create_params.py +++ b/src/increase/types/simulations/card_refund_create_params.py @@ -2,13 +2,20 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import TypedDict __all__ = ["CardRefundCreateParams"] class CardRefundCreateParams(TypedDict, total=False): - transaction_id: Required[str] + pending_transaction_id: str + """The identifier of the Pending Transaction for the refund authorization. + + If this is provided, `transaction` must not be provided as a refund with a + refund authorized can not be linked to a regular transaction. + """ + + transaction_id: str """The identifier for the Transaction to refund. The Transaction's source must have a category of card_settlement. diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index 07bb1bb8d..36b239d51 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -19,16 +19,20 @@ class TestCardRefunds: @parametrize def test_method_create(self, client: Increase) -> None: + card_refund = client.simulations.card_refunds.create() + assert_matches_type(Transaction, card_refund, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: card_refund = client.simulations.card_refunds.create( + pending_transaction_id="pending_transaction_id", transaction_id="transaction_uyrp7fld2ium70oa7oi", ) assert_matches_type(Transaction, card_refund, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.card_refunds.with_raw_response.create( - transaction_id="transaction_uyrp7fld2ium70oa7oi", - ) + response = client.simulations.card_refunds.with_raw_response.create() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -37,9 +41,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.card_refunds.with_streaming_response.create( - transaction_id="transaction_uyrp7fld2ium70oa7oi", - ) as response: + with client.simulations.card_refunds.with_streaming_response.create() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -56,16 +58,20 @@ class TestAsyncCardRefunds: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: + card_refund = await async_client.simulations.card_refunds.create() + assert_matches_type(Transaction, card_refund, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: card_refund = await async_client.simulations.card_refunds.create( + pending_transaction_id="pending_transaction_id", transaction_id="transaction_uyrp7fld2ium70oa7oi", ) assert_matches_type(Transaction, card_refund, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.card_refunds.with_raw_response.create( - transaction_id="transaction_uyrp7fld2ium70oa7oi", - ) + response = await async_client.simulations.card_refunds.with_raw_response.create() assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -74,9 +80,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.card_refunds.with_streaming_response.create( - transaction_id="transaction_uyrp7fld2ium70oa7oi", - ) as response: + async with async_client.simulations.card_refunds.with_streaming_response.create() as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 6006f3ab297f2b8f50a80e10e72e501484490940 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:05:30 +0000 Subject: [PATCH 0883/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7951156ff..d246629db 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.341.0" + ".": "0.342.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 010887a97..4af5612f7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.341.0" +version = "0.342.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d5fad0193..2c4802851 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.341.0" # x-release-please-version +__version__ = "0.342.0" # x-release-please-version From 5570ac368eb6da34e099b5b9125bd1f6f905b649 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:41:03 +0000 Subject: [PATCH 0884/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index d034046d8..7badc572d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c51555226fd66ed304eb1e9c759a6485c071eb2cb9ca9ee86f5b5cd88552ee4a.yml -openapi_spec_hash: c5b09ec531c068cb675f8cd3729733c6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-911c3719c8d84e1119e71e0cf93ae1f2c52f42529e56671731f07273feb5ac88.yml +openapi_spec_hash: 462c4c10440c2f87e0624d8c25a89b75 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 0f00f8688..8087891e6 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -77,8 +77,8 @@ class ShipmentTrackingUpdate(BaseModel): class ShipmentTracking(BaseModel): - number: str - """The tracking number.""" + number: Optional[str] = None + """The tracking number. Not available for USPS shipments.""" return_number: Optional[str] = None """For returned shipments, the tracking number of the return shipment.""" From b743eb94bf292cdf3ccd7150f582eecdc8e5665d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:44:06 +0000 Subject: [PATCH 0885/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d246629db..5a33988a2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.342.0" + ".": "0.343.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4af5612f7..26c3380ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.342.0" +version = "0.343.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2c4802851..3489c461f 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.342.0" # x-release-please-version +__version__ = "0.343.0" # x-release-please-version From b7f2dbf4fabcc7bec4c32eb79774eae0b741bb1a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:55:22 +0000 Subject: [PATCH 0886/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/physical_card_profiles.py | 50 ------------------- .../physical_card_profile_create_params.py | 28 +---------- .../test_physical_card_profiles.py | 8 --- 4 files changed, 3 insertions(+), 87 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7badc572d..bfdb060b4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-911c3719c8d84e1119e71e0cf93ae1f2c52f42529e56671731f07273feb5ac88.yml -openapi_spec_hash: 462c4c10440c2f87e0624d8c25a89b75 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fed69da53ddecc70b62e9a7331c3b561ef0a14c385d4ac5a03d74177c2ea21cd.yml +openapi_spec_hash: 0a90c512d3fd1348b78af6f98435c31a config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index d33b520e9..67e2b910e 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -2,8 +2,6 @@ from __future__ import annotations -from typing_extensions import Literal - import httpx from ..types import ( @@ -56,10 +54,6 @@ def create( description: str, front_image_file_id: str, program_id: str, - back_color: Literal["black", "white"] | Omit = omit, - card_stock_reference: str | Omit = omit, - carrier_stock_reference: str | Omit = omit, - front_color: Literal["black", "white"] | Omit = omit, front_text: physical_card_profile_create_params.FrontText | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -83,22 +77,6 @@ def create( program_id: The identifier for the Program that this Physical Card Profile falls under. - back_color: The color of the text on the back of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - - card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. - Only used if you've ordered card stock separately. - - carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. - Only used if you've ordered carrier stock separately. - - front_color: The color of the design on the front of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -121,10 +99,6 @@ def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, - "back_color": back_color, - "card_stock_reference": card_stock_reference, - "carrier_stock_reference": carrier_stock_reference, - "front_color": front_color, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, @@ -380,10 +354,6 @@ async def create( description: str, front_image_file_id: str, program_id: str, - back_color: Literal["black", "white"] | Omit = omit, - card_stock_reference: str | Omit = omit, - carrier_stock_reference: str | Omit = omit, - front_color: Literal["black", "white"] | Omit = omit, front_text: physical_card_profile_create_params.FrontText | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -407,22 +377,6 @@ async def create( program_id: The identifier for the Program that this Physical Card Profile falls under. - back_color: The color of the text on the back of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - - card_stock_reference: A reference ID provided by the fulfillment provider for the card stock used. - Only used if you've ordered card stock separately. - - carrier_stock_reference: A reference ID provided by the fulfillment provider for the carrier stock used. - Only used if you've ordered carrier stock separately. - - front_color: The color of the design on the front of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - front_text: Text printed on the front of the card. Reach out to [support@increase.com](mailto:support@increase.com) for more information. @@ -445,10 +399,6 @@ async def create( "description": description, "front_image_file_id": front_image_file_id, "program_id": program_id, - "back_color": back_color, - "card_stock_reference": card_stock_reference, - "carrier_stock_reference": carrier_stock_reference, - "front_color": front_color, "front_text": front_text, }, physical_card_profile_create_params.PhysicalCardProfileCreateParams, diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index 96af44dd6..6544cf53f 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing_extensions import Required, TypedDict __all__ = ["PhysicalCardProfileCreateParams", "FrontText"] @@ -23,32 +23,6 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): program_id: Required[str] """The identifier for the Program that this Physical Card Profile falls under.""" - back_color: Literal["black", "white"] - """The color of the text on the back of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - """ - - card_stock_reference: str - """A reference ID provided by the fulfillment provider for the card stock used. - - Only used if you've ordered card stock separately. - """ - - carrier_stock_reference: str - """A reference ID provided by the fulfillment provider for the carrier stock used. - - Only used if you've ordered carrier stock separately. - """ - - front_color: Literal["black", "white"] - """The color of the design on the front of the card. Defaults to "black". - - - `black` - Black personalization color. - - `white` - White personalization color. - """ - front_text: FrontText """Text printed on the front of the card. diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 3301adf31..012a20306 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -39,10 +39,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", - back_color="black", - card_stock_reference="x", - carrier_stock_reference="x", - front_color="black", front_text={ "line1": "x", "line2": "x", @@ -278,10 +274,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) description="My Card Profile", front_image_file_id="file_o6aex13wm1jcc36sgcj1", program_id="program_i2v2os4mwza1oetokh9i", - back_color="black", - card_stock_reference="x", - carrier_stock_reference="x", - front_color="black", front_text={ "line1": "x", "line2": "x", From 3437ea09ef15d112b882dde2692051b66ad59604 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 20:58:12 +0000 Subject: [PATCH 0887/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5a33988a2..7c7974f09 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.343.0" + ".": "0.344.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 26c3380ec..1f9c186c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.343.0" +version = "0.344.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3489c461f..c5bb412de 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.343.0" # x-release-please-version +__version__ = "0.344.0" # x-release-please-version From 2fdf924fd13d92ade43597810cf9ea4cf25c067a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 23:20:22 +0000 Subject: [PATCH 0888/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 +++--- src/increase/types/declined_transaction.py | 2 +- src/increase/types/pending_transaction.py | 2 +- src/increase/types/real_time_decision.py | 2 +- src/increase/types/transaction.py | 2 +- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index bfdb060b4..6e0dd6f89 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fed69da53ddecc70b62e9a7331c3b561ef0a14c385d4ac5a03d74177c2ea21cd.yml -openapi_spec_hash: 0a90c512d3fd1348b78af6f98435c31a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e80a254e816bc69ee8d058b340f791b9f4229b07ff2b460e6cd0ceb4406a7604.yml +openapi_spec_hash: 81b87e83af702cfd8bce31f2d449ee15 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f73f50d33..b9fb5cd3b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -483,7 +483,7 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. @@ -1087,7 +1087,7 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. @@ -3374,7 +3374,7 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 6acd90e51..9477d8071 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -331,7 +331,7 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 65fd7f687..cf1aa1cea 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -281,7 +281,7 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 4090167e0..8d42faa94 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -299,7 +299,7 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6b461818f..6b98b06c5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -699,7 +699,7 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): 3-D Secure program. - `non_authenticated_security_transaction` - Non-authenticated security transaction: Use to identify an electronic commerce transaction that uses data - encryption for security however , cardholder authentication is not performed + encryption for security however, cardholder authentication is not performed using 3-D Secure. - `non_secure_transaction` - Non-secure transaction: Use to identify an electronic commerce transaction that has no data protection. From 76a1c0f9743809417d2c8941c1e11ba14a5ec653 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Sep 2025 23:23:15 +0000 Subject: [PATCH 0889/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7c7974f09..5cd962378 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.344.0" + ".": "0.345.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1f9c186c5..7a0ca50e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.344.0" +version = "0.345.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c5bb412de..5051c9946 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.344.0" # x-release-please-version +__version__ = "0.345.0" # x-release-please-version From e3b242080d0d73191db22b6eb8b029ce35302acd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:51:34 +0000 Subject: [PATCH 0890/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/oauth_tokens.py | 4 ++-- src/increase/types/oauth_token_create_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6e0dd6f89..5be8c21ef 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e80a254e816bc69ee8d058b340f791b9f4229b07ff2b460e6cd0ceb4406a7604.yml -openapi_spec_hash: 81b87e83af702cfd8bce31f2d449ee15 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-24ddca9eb65b72b527002775880ca10d5f0e13426f076fb983761c44df2429a9.yml +openapi_spec_hash: 32d6ee149133e0cc8026079cc29c0991 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/resources/oauth_tokens.py b/src/increase/resources/oauth_tokens.py index 143368459..cc2efe348 100644 --- a/src/increase/resources/oauth_tokens.py +++ b/src/increase/resources/oauth_tokens.py @@ -71,7 +71,7 @@ def create( client_id: The public identifier for your application. - client_secret: The secret that confirms you own the application. This is redundent given that + client_secret: The secret that confirms you own the application. This is redundant given that the request is made with your API key but it's a required component of OAuth 2.0. @@ -163,7 +163,7 @@ async def create( client_id: The public identifier for your application. - client_secret: The secret that confirms you own the application. This is redundent given that + client_secret: The secret that confirms you own the application. This is redundant given that the request is made with your API key but it's a required component of OAuth 2.0. diff --git a/src/increase/types/oauth_token_create_params.py b/src/increase/types/oauth_token_create_params.py index 86b11b79f..f5264b3fa 100644 --- a/src/increase/types/oauth_token_create_params.py +++ b/src/increase/types/oauth_token_create_params.py @@ -24,7 +24,7 @@ class OAuthTokenCreateParams(TypedDict, total=False): client_secret: str """The secret that confirms you own the application. - This is redundent given that the request is made with your API key but it's a + This is redundant given that the request is made with your API key but it's a required component of OAuth 2.0. """ From 9986700d8daf2ece06cdcdf3202e61d35734af34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 22:54:26 +0000 Subject: [PATCH 0891/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5cd962378..6dc64191e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.345.0" + ".": "0.346.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7a0ca50e6..681fce510 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.345.0" +version = "0.346.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5051c9946..093f91f53 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.345.0" # x-release-please-version +__version__ = "0.346.0" # x-release-please-version From 40bf291dbe9993a8bbc76a420f73e0c89884e862 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 23:05:05 +0000 Subject: [PATCH 0892/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/bookkeeping_accounts.py | 4 ++-- src/increase/types/bookkeeping_account_create_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5be8c21ef..0b87763cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-24ddca9eb65b72b527002775880ca10d5f0e13426f076fb983761c44df2429a9.yml -openapi_spec_hash: 32d6ee149133e0cc8026079cc29c0991 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57a965663739666faa0c7699e48af1185389436a2c4fd774e28d86cb7b1c69ba.yml +openapi_spec_hash: cd4681291bf755562f76ae6a1ead73a3 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index cb7a38ea8..238915094 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -73,7 +73,7 @@ def create( Args: name: The name you choose for the account. - account_id: The entity, if `compliance_category` is `commingled_cash`. + account_id: The account, if `compliance_category` is `commingled_cash`. compliance_category: The account compliance category. @@ -304,7 +304,7 @@ async def create( Args: name: The name you choose for the account. - account_id: The entity, if `compliance_category` is `commingled_cash`. + account_id: The account, if `compliance_category` is `commingled_cash`. compliance_category: The account compliance category. diff --git a/src/increase/types/bookkeeping_account_create_params.py b/src/increase/types/bookkeeping_account_create_params.py index d7b472c0a..5c974fcbb 100644 --- a/src/increase/types/bookkeeping_account_create_params.py +++ b/src/increase/types/bookkeeping_account_create_params.py @@ -12,7 +12,7 @@ class BookkeepingAccountCreateParams(TypedDict, total=False): """The name you choose for the account.""" account_id: str - """The entity, if `compliance_category` is `commingled_cash`.""" + """The account, if `compliance_category` is `commingled_cash`.""" compliance_category: Literal["commingled_cash", "customer_balance"] """The account compliance category. From 09946ad100f940e19f4202e8c4c7817c384b0768 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 29 Sep 2025 23:08:00 +0000 Subject: [PATCH 0893/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6dc64191e..cb4cd84d3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.346.0" + ".": "0.347.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 681fce510..b14deda38 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.346.0" +version = "0.347.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 093f91f53..3e1078812 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.346.0" # x-release-please-version +__version__ = "0.347.0" # x-release-please-version From 0c58bc481a968b31d434733cdc693bef8d058f5b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 30 Sep 2025 00:53:42 +0000 Subject: [PATCH 0894/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0b87763cf..f51f792c9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57a965663739666faa0c7699e48af1185389436a2c4fd774e28d86cb7b1c69ba.yml -openapi_spec_hash: cd4681291bf755562f76ae6a1ead73a3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-878472ce6c3df1541bd6f2924ca987acc43fec7409cb06e6fe129638f9b6fb72.yml +openapi_spec_hash: 69facc862aa08df8ca458569028663e7 config_hash: a143293c5450ae8f52acad08f3102575 From 0fb6e492ec87d384144b56a0782ed42345a7782c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 07:10:52 +0000 Subject: [PATCH 0895/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index f51f792c9..d2b407e60 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-878472ce6c3df1541bd6f2924ca987acc43fec7409cb06e6fe129638f9b6fb72.yml -openapi_spec_hash: 69facc862aa08df8ca458569028663e7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1084eee4a06751b960309c5854bc2af4d20e8022359fda84882ea67495bdce1b.yml +openapi_spec_hash: 90bed8cf565ade10b60b33d5ca70e6d0 config_hash: a143293c5450ae8f52acad08f3102575 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6b98b06c5..c19e0526f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2956,7 +2956,7 @@ class Source(BaseModel): """ card_dispute_acceptance: Optional[SourceCardDisputeAcceptance] = None - """A Card Dispute Acceptance object. + """A Legacy Card Dispute Acceptance object. This field will be present in the JSON response if and only if `category` is equal to `card_dispute_acceptance`. Contains the details of a successful Card @@ -2971,7 +2971,7 @@ class Source(BaseModel): """ card_dispute_loss: Optional[SourceCardDisputeLoss] = None - """A Card Dispute Loss object. + """A Legacy Card Dispute Loss object. This field will be present in the JSON response if and only if `category` is equal to `card_dispute_loss`. Contains the details of a lost Card Dispute. @@ -3082,11 +3082,11 @@ class Source(BaseModel): `ach_transfer_return` object. - `cashback_payment` - Cashback Payment: details will be under the `cashback_payment` object. - - `card_dispute_acceptance` - Card Dispute Acceptance: details will be under the - `card_dispute_acceptance` object. + - `card_dispute_acceptance` - Legacy Card Dispute Acceptance: details will be + under the `card_dispute_acceptance` object. - `card_dispute_financial` - Card Dispute Financial: details will be under the `card_dispute_financial` object. - - `card_dispute_loss` - Card Dispute Loss: details will be under the + - `card_dispute_loss` - Legacy Card Dispute Loss: details will be under the `card_dispute_loss` object. - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_settlement` - Card Settlement: details will be under the From a1ef443f2e1128ee418d83e18a861ac28d29e829 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 07:14:03 +0000 Subject: [PATCH 0896/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cb4cd84d3..1a931c1e0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.347.0" + ".": "0.348.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b14deda38..e99cef4ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.347.0" +version = "0.348.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3e1078812..1d9fc60b2 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.347.0" # x-release-please-version +__version__ = "0.348.0" # x-release-please-version From f3a924dc53d0d0e59e2e52be264f988ebce9ca80 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:18:21 +0000 Subject: [PATCH 0897/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d2b407e60..cffc17a5a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1084eee4a06751b960309c5854bc2af4d20e8022359fda84882ea67495bdce1b.yml -openapi_spec_hash: 90bed8cf565ade10b60b33d5ca70e6d0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2932a989d9e2cf36e16aaea23ed5e0e1788be21d56042097ea6ea02f6cd9dcfe.yml +openapi_spec_hash: 24a293bc92d9ac62345ef24cca251af7 config_hash: a143293c5450ae8f52acad08f3102575 From 9bd2522280780412a8be1b9d6dade84688dd0550 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:52:09 +0000 Subject: [PATCH 0898/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 22 + src/increase/_client.py | 9 + src/increase/resources/__init__.py | 14 + src/increase/resources/card_disputes.py | 703 ++++++ .../resources/simulations/__init__.py | 14 + .../resources/simulations/card_disputes.py | 225 ++ .../resources/simulations/simulations.py | 32 + src/increase/types/__init__.py | 6 + src/increase/types/card_dispute.py | 2220 +++++++++++++++++ .../types/card_dispute_create_params.py | 1314 ++++++++++ .../types/card_dispute_list_params.py | 83 + ...d_dispute_submit_user_submission_params.py | 1415 +++++++++++ src/increase/types/simulations/__init__.py | 1 + .../simulations/card_dispute_action_params.py | 134 + .../simulations/test_card_disputes.py | 150 ++ tests/api_resources/test_card_disputes.py | 1444 +++++++++++ 17 files changed, 7790 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/card_disputes.py create mode 100644 src/increase/resources/simulations/card_disputes.py create mode 100644 src/increase/types/card_dispute.py create mode 100644 src/increase/types/card_dispute_create_params.py create mode 100644 src/increase/types/card_dispute_list_params.py create mode 100644 src/increase/types/card_dispute_submit_user_submission_params.py create mode 100644 src/increase/types/simulations/card_dispute_action_params.py create mode 100644 tests/api_resources/simulations/test_card_disputes.py create mode 100644 tests/api_resources/test_card_disputes.py diff --git a/.stats.yml b/.stats.yml index cffc17a5a..9aa42589f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 214 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2932a989d9e2cf36e16aaea23ed5e0e1788be21d56042097ea6ea02f6cd9dcfe.yml -openapi_spec_hash: 24a293bc92d9ac62345ef24cca251af7 -config_hash: a143293c5450ae8f52acad08f3102575 +configured_endpoints: 220 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dc0a89abaae59dd7fc23cc5463a412d79b5c8c042eb144b05e97823d11a76b2b.yml +openapi_spec_hash: 24ce07f273cf90d08b3fa22958316846 +config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/api.md b/api.md index 5e0a48bb5..65793f1c2 100644 --- a/api.md +++ b/api.md @@ -90,6 +90,22 @@ Methods: - client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement - client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] +# CardDisputes + +Types: + +```python +from increase.types import CardDispute +``` + +Methods: + +- client.card_disputes.create(\*\*params) -> CardDispute +- client.card_disputes.retrieve(card_dispute_id) -> CardDispute +- client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] +- client.card_disputes.submit_user_submission(card_dispute_id, \*\*params) -> CardDispute +- client.card_disputes.withdraw(card_dispute_id) -> CardDispute + # PhysicalCards Types: @@ -820,6 +836,12 @@ Methods: - client.simulations.card_refunds.create(\*\*params) -> Transaction +## CardDisputes + +Methods: + +- client.simulations.card_disputes.action(card_dispute_id, \*\*params) -> CardDispute + ## PhysicalCards Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index 1e1afe163..232c4be3b 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -41,6 +41,7 @@ oauth_tokens, transactions, ach_transfers, + card_disputes, card_payments, check_deposits, physical_cards, @@ -114,6 +115,7 @@ class Increase(SyncAPIClient): cards: cards.CardsResource card_payments: card_payments.CardPaymentsResource card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource + card_disputes: card_disputes.CardDisputesResource physical_cards: physical_cards.PhysicalCardsResource digital_card_profiles: digital_card_profiles.DigitalCardProfilesResource physical_card_profiles: physical_card_profiles.PhysicalCardProfilesResource @@ -259,6 +261,7 @@ def __init__( self.cards = cards.CardsResource(self) self.card_payments = card_payments.CardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) + self.card_disputes = card_disputes.CardDisputesResource(self) self.physical_cards = physical_cards.PhysicalCardsResource(self) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResource(self) self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResource(self) @@ -473,6 +476,7 @@ class AsyncIncrease(AsyncAPIClient): cards: cards.AsyncCardsResource card_payments: card_payments.AsyncCardPaymentsResource card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource + card_disputes: card_disputes.AsyncCardDisputesResource physical_cards: physical_cards.AsyncPhysicalCardsResource digital_card_profiles: digital_card_profiles.AsyncDigitalCardProfilesResource physical_card_profiles: physical_card_profiles.AsyncPhysicalCardProfilesResource @@ -620,6 +624,7 @@ def __init__( self.cards = cards.AsyncCardsResource(self) self.card_payments = card_payments.AsyncCardPaymentsResource(self) self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) + self.card_disputes = card_disputes.AsyncCardDisputesResource(self) self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResource(self) self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResource(self) @@ -839,6 +844,7 @@ def __init__(self, client: Increase) -> None: self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) + self.card_disputes = card_disputes.CardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = physical_cards.PhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithRawResponse( client.digital_card_profiles @@ -949,6 +955,7 @@ def __init__(self, client: AsyncIncrease) -> None: self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( client.card_purchase_supplements ) + self.card_disputes = card_disputes.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse( client.digital_card_profiles @@ -1073,6 +1080,7 @@ def __init__(self, client: Increase) -> None: self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( client.card_purchase_supplements ) + self.card_disputes = card_disputes.CardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = physical_cards.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles @@ -1199,6 +1207,7 @@ def __init__(self, client: AsyncIncrease) -> None: client.card_purchase_supplements ) ) + self.card_disputes = card_disputes.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse( client.digital_card_profiles diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 4f8236321..7d0ef2b23 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -128,6 +128,14 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) +from .card_disputes import ( + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) from .card_payments import ( CardPaymentsResource, AsyncCardPaymentsResource, @@ -470,6 +478,12 @@ "AsyncCardPurchaseSupplementsResourceWithRawResponse", "CardPurchaseSupplementsResourceWithStreamingResponse", "AsyncCardPurchaseSupplementsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", "PhysicalCardsResource", "AsyncPhysicalCardsResource", "PhysicalCardsResourceWithRawResponse", diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py new file mode 100644 index 000000000..2ef4e6958 --- /dev/null +++ b/src/increase/resources/card_disputes.py @@ -0,0 +1,703 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal + +import httpx + +from ..types import card_dispute_list_params, card_dispute_create_params, card_dispute_submit_user_submission_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.card_dispute import CardDispute + +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] + + +class CardDisputesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardDisputesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardDisputesResourceWithStreamingResponse(self) + + def create( + self, + *, + disputed_transaction_id: str, + network: Literal["visa"], + amount: int | Omit = omit, + attachment_files: Iterable[card_dispute_create_params.AttachmentFile] | Omit = omit, + visa: card_dispute_create_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Create a Card Dispute + + Args: + disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type` + of `card_settlement`. + + network: The network of the disputed transaction. Details specific to the network are + required under the sub-object with the same identifier as the network. + + - `visa` - Visa + + amount: The monetary amount of the part of the transaction that is being disputed. This + is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + + attachment_files: The files to be attached to the initial dispute submission. + + visa: The Visa-specific parameters for the dispute. Required if and only if `network` + is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/card_disputes", + body=maybe_transform( + { + "disputed_transaction_id": disputed_transaction_id, + "network": network, + "amount": amount, + "attachment_files": attachment_files, + "visa": visa, + }, + card_dispute_create_params.CardDisputeCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + def retrieve( + self, + card_dispute_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDispute: + """ + Retrieve a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return self._get( + f"/card_disputes/{card_dispute_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDispute, + ) + + def list( + self, + *, + created_at: card_dispute_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_dispute_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[CardDispute]: + """ + List Card Disputes + + Args: + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_disputes", + page=SyncPage[CardDispute], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_dispute_list_params.CardDisputeListParams, + ), + ), + model=CardDispute, + ) + + def submit_user_submission( + self, + card_dispute_id: str, + *, + network: Literal["visa"], + amount: int | Omit = omit, + attachment_files: Iterable[card_dispute_submit_user_submission_params.AttachmentFile] | Omit = omit, + visa: card_dispute_submit_user_submission_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Submit a User Submission for a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute to submit a user submission for. + + network: The network of the Card Dispute. Details specific to the network are required + under the sub-object with the same identifier as the network. + + - `visa` - Visa + + amount: The adjusted monetary amount of the part of the transaction that is being + disputed. This is optional and will default to the most recent amount provided. + If provided, the amount must be less than or equal to the amount of the + transaction. + + attachment_files: The files to be attached to the user submission. + + visa: The Visa-specific parameters for the dispute. Required if and only if `network` + is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return self._post( + f"/card_disputes/{card_dispute_id}/submit_user_submission", + body=maybe_transform( + { + "network": network, + "amount": amount, + "attachment_files": attachment_files, + "visa": visa, + }, + card_dispute_submit_user_submission_params.CardDisputeSubmitUserSubmissionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + def withdraw( + self, + card_dispute_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Withdraw a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute to withdraw. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return self._post( + f"/card_disputes/{card_dispute_id}/withdraw", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + +class AsyncCardDisputesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardDisputesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardDisputesResourceWithStreamingResponse(self) + + async def create( + self, + *, + disputed_transaction_id: str, + network: Literal["visa"], + amount: int | Omit = omit, + attachment_files: Iterable[card_dispute_create_params.AttachmentFile] | Omit = omit, + visa: card_dispute_create_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Create a Card Dispute + + Args: + disputed_transaction_id: The Transaction you wish to dispute. This Transaction must have a `source_type` + of `card_settlement`. + + network: The network of the disputed transaction. Details specific to the network are + required under the sub-object with the same identifier as the network. + + - `visa` - Visa + + amount: The monetary amount of the part of the transaction that is being disputed. This + is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + + attachment_files: The files to be attached to the initial dispute submission. + + visa: The Visa-specific parameters for the dispute. Required if and only if `network` + is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/card_disputes", + body=await async_maybe_transform( + { + "disputed_transaction_id": disputed_transaction_id, + "network": network, + "amount": amount, + "attachment_files": attachment_files, + "visa": visa, + }, + card_dispute_create_params.CardDisputeCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + async def retrieve( + self, + card_dispute_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> CardDispute: + """ + Retrieve a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return await self._get( + f"/card_disputes/{card_dispute_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=CardDispute, + ) + + def list( + self, + *, + created_at: card_dispute_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: card_dispute_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[CardDispute, AsyncPage[CardDispute]]: + """ + List Card Disputes + + Args: + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/card_disputes", + page=AsyncPage[CardDispute], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + card_dispute_list_params.CardDisputeListParams, + ), + ), + model=CardDispute, + ) + + async def submit_user_submission( + self, + card_dispute_id: str, + *, + network: Literal["visa"], + amount: int | Omit = omit, + attachment_files: Iterable[card_dispute_submit_user_submission_params.AttachmentFile] | Omit = omit, + visa: card_dispute_submit_user_submission_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Submit a User Submission for a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute to submit a user submission for. + + network: The network of the Card Dispute. Details specific to the network are required + under the sub-object with the same identifier as the network. + + - `visa` - Visa + + amount: The adjusted monetary amount of the part of the transaction that is being + disputed. This is optional and will default to the most recent amount provided. + If provided, the amount must be less than or equal to the amount of the + transaction. + + attachment_files: The files to be attached to the user submission. + + visa: The Visa-specific parameters for the dispute. Required if and only if `network` + is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return await self._post( + f"/card_disputes/{card_dispute_id}/submit_user_submission", + body=await async_maybe_transform( + { + "network": network, + "amount": amount, + "attachment_files": attachment_files, + "visa": visa, + }, + card_dispute_submit_user_submission_params.CardDisputeSubmitUserSubmissionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + async def withdraw( + self, + card_dispute_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + Withdraw a Card Dispute + + Args: + card_dispute_id: The identifier of the Card Dispute to withdraw. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return await self._post( + f"/card_disputes/{card_dispute_id}/withdraw", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.create = to_raw_response_wrapper( + card_disputes.create, + ) + self.retrieve = to_raw_response_wrapper( + card_disputes.retrieve, + ) + self.list = to_raw_response_wrapper( + card_disputes.list, + ) + self.submit_user_submission = to_raw_response_wrapper( + card_disputes.submit_user_submission, + ) + self.withdraw = to_raw_response_wrapper( + card_disputes.withdraw, + ) + + +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.create = async_to_raw_response_wrapper( + card_disputes.create, + ) + self.retrieve = async_to_raw_response_wrapper( + card_disputes.retrieve, + ) + self.list = async_to_raw_response_wrapper( + card_disputes.list, + ) + self.submit_user_submission = async_to_raw_response_wrapper( + card_disputes.submit_user_submission, + ) + self.withdraw = async_to_raw_response_wrapper( + card_disputes.withdraw, + ) + + +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.create = to_streamed_response_wrapper( + card_disputes.create, + ) + self.retrieve = to_streamed_response_wrapper( + card_disputes.retrieve, + ) + self.list = to_streamed_response_wrapper( + card_disputes.list, + ) + self.submit_user_submission = to_streamed_response_wrapper( + card_disputes.submit_user_submission, + ) + self.withdraw = to_streamed_response_wrapper( + card_disputes.withdraw, + ) + + +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.create = async_to_streamed_response_wrapper( + card_disputes.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + card_disputes.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + card_disputes.list, + ) + self.submit_user_submission = async_to_streamed_response_wrapper( + card_disputes.submit_user_submission, + ) + self.withdraw = async_to_streamed_response_wrapper( + card_disputes.withdraw, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index a9f636a2b..c1a47a541 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -48,6 +48,14 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) +from .card_disputes import ( + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) from .card_reversals import ( CardReversalsResource, AsyncCardReversalsResource, @@ -288,6 +296,12 @@ "AsyncCardRefundsResourceWithRawResponse", "CardRefundsResourceWithStreamingResponse", "AsyncCardRefundsResourceWithStreamingResponse", + "CardDisputesResource", + "AsyncCardDisputesResource", + "CardDisputesResourceWithRawResponse", + "AsyncCardDisputesResourceWithRawResponse", + "CardDisputesResourceWithStreamingResponse", + "AsyncCardDisputesResourceWithStreamingResponse", "PhysicalCardsResource", "AsyncPhysicalCardsResource", "PhysicalCardsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py new file mode 100644 index 000000000..a0fc9cb87 --- /dev/null +++ b/src/increase/resources/simulations/card_disputes.py @@ -0,0 +1,225 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_dispute_action_params +from ...types.card_dispute import CardDispute + +__all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] + + +class CardDisputesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardDisputesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardDisputesResourceWithStreamingResponse(self) + + def action( + self, + card_dispute_id: str, + *, + network: Literal["visa"], + visa: card_dispute_action_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + After a [Card Dispute](#card-disputes) is created in production, the dispute + will initially be in a `pending_user_submission_reviewing` state. Since no + review or further action happens in sandbox, this endpoint simulates moving a + Card Dispute through its various states. + + Args: + card_dispute_id: The dispute you would like to action. + + network: The network of the Card Dispute. Details specific to the network are required + under the sub-object with the same identifier as the network. + + - `visa` - Visa + + visa: The Visa-specific parameters for the taking action on the dispute. Required if + and only if `network` is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return self._post( + f"/simulations/card_disputes/{card_dispute_id}/action", + body=maybe_transform( + { + "network": network, + "visa": visa, + }, + card_dispute_action_params.CardDisputeActionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + +class AsyncCardDisputesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardDisputesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardDisputesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardDisputesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardDisputesResourceWithStreamingResponse(self) + + async def action( + self, + card_dispute_id: str, + *, + network: Literal["visa"], + visa: card_dispute_action_params.Visa | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardDispute: + """ + After a [Card Dispute](#card-disputes) is created in production, the dispute + will initially be in a `pending_user_submission_reviewing` state. Since no + review or further action happens in sandbox, this endpoint simulates moving a + Card Dispute through its various states. + + Args: + card_dispute_id: The dispute you would like to action. + + network: The network of the Card Dispute. Details specific to the network are required + under the sub-object with the same identifier as the network. + + - `visa` - Visa + + visa: The Visa-specific parameters for the taking action on the dispute. Required if + and only if `network` is `visa`. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_dispute_id: + raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") + return await self._post( + f"/simulations/card_disputes/{card_dispute_id}/action", + body=await async_maybe_transform( + { + "network": network, + "visa": visa, + }, + card_dispute_action_params.CardDisputeActionParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardDispute, + ) + + +class CardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.action = to_raw_response_wrapper( + card_disputes.action, + ) + + +class AsyncCardDisputesResourceWithRawResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.action = async_to_raw_response_wrapper( + card_disputes.action, + ) + + +class CardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: CardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.action = to_streamed_response_wrapper( + card_disputes.action, + ) + + +class AsyncCardDisputesResourceWithStreamingResponse: + def __init__(self, card_disputes: AsyncCardDisputesResource) -> None: + self._card_disputes = card_disputes + + self.action = async_to_streamed_response_wrapper( + card_disputes.action, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index ebc3636c4..4b1ea1a12 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -44,6 +44,14 @@ ACHTransfersResourceWithStreamingResponse, AsyncACHTransfersResourceWithStreamingResponse, ) +from .card_disputes import ( + CardDisputesResource, + AsyncCardDisputesResource, + CardDisputesResourceWithRawResponse, + AsyncCardDisputesResourceWithRawResponse, + CardDisputesResourceWithStreamingResponse, + AsyncCardDisputesResourceWithStreamingResponse, +) from .card_reversals import ( CardReversalsResource, AsyncCardReversalsResource, @@ -269,6 +277,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: def card_refunds(self) -> CardRefundsResource: return CardRefundsResource(self._client) + @cached_property + def card_disputes(self) -> CardDisputesResource: + return CardDisputesResource(self._client) + @cached_property def physical_cards(self) -> PhysicalCardsResource: return PhysicalCardsResource(self._client) @@ -402,6 +414,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: def card_refunds(self) -> AsyncCardRefundsResource: return AsyncCardRefundsResource(self._client) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResource: + return AsyncCardDisputesResource(self._client) + @cached_property def physical_cards(self) -> AsyncPhysicalCardsResource: return AsyncPhysicalCardsResource(self._client) @@ -538,6 +554,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawRespons def card_refunds(self) -> CardRefundsResourceWithRawResponse: return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) + @cached_property + def card_disputes(self) -> CardDisputesResourceWithRawResponse: + return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) + @cached_property def physical_cards(self) -> PhysicalCardsResourceWithRawResponse: return PhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) @@ -659,6 +679,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawRe def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: + return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) + @cached_property def physical_cards(self) -> AsyncPhysicalCardsResourceWithRawResponse: return AsyncPhysicalCardsResourceWithRawResponse(self._simulations.physical_cards) @@ -780,6 +804,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingR def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + @cached_property + def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: + return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + @cached_property def physical_cards(self) -> PhysicalCardsResourceWithStreamingResponse: return PhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) @@ -903,6 +931,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStrea def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + @cached_property + def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: + return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) + @cached_property def physical_cards(self) -> AsyncPhysicalCardsResourceWithStreamingResponse: return AsyncPhysicalCardsResourceWithStreamingResponse(self._simulations.physical_cards) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 73a9288f4..7c32ee8e1 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -18,6 +18,7 @@ from .transaction import Transaction as Transaction from .ach_transfer import ACHTransfer as ACHTransfer from .card_details import CardDetails as CardDetails +from .card_dispute import CardDispute as CardDispute from .card_payment import CardPayment as CardPayment from .check_deposit import CheckDeposit as CheckDeposit from .physical_card import PhysicalCard as PhysicalCard @@ -79,6 +80,7 @@ from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams +from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams @@ -88,6 +90,7 @@ from .account_number_list_params import AccountNumberListParams as AccountNumberListParams from .ach_transfer_create_params import ACHTransferCreateParams as ACHTransferCreateParams from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup +from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams @@ -177,6 +180,9 @@ from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) +from .card_dispute_submit_user_submission_params import ( + CardDisputeSubmitUserSubmissionParams as CardDisputeSubmitUserSubmissionParams, +) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py new file mode 100644 index 000000000..2ae7f8075 --- /dev/null +++ b/src/increase/types/card_dispute.py @@ -0,0 +1,2220 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import List, Optional +from datetime import date, datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "CardDispute", + "Loss", + "Visa", + "VisaNetworkEvent", + "VisaNetworkEventAttachmentFile", + "VisaNetworkEventMerchantPrearbitrationReceived", + "VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes", + "VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence", + "VisaNetworkEventMerchantPrearbitrationReceivedCreditOrReversalProcessed", + "VisaNetworkEventMerchantPrearbitrationReceivedDelayedChargeTransaction", + "VisaNetworkEventMerchantPrearbitrationReceivedEvidenceOfImprint", + "VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute", + "VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungibleTokenReceived", + "VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTransactions", + "VisaNetworkEventRepresented", + "VisaNetworkEventRepresentedCardholderNoLongerDisputes", + "VisaNetworkEventRepresentedCreditOrReversalProcessed", + "VisaNetworkEventRepresentedInvalidDispute", + "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", + "VisaNetworkEventRepresentedProofOfCashDisbursement", + "VisaNetworkEventRepresentedReversalIssued", + "VisaUserSubmission", + "VisaUserSubmissionAttachmentFile", + "VisaUserSubmissionChargeback", + "VisaUserSubmissionChargebackAuthorization", + "VisaUserSubmissionChargebackConsumerCanceledMerchandise", + "VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation", + "VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted", + "VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned", + "VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction", + "VisaUserSubmissionChargebackConsumerCanceledRecurringTransactionMerchantContactMethods", + "VisaUserSubmissionChargebackConsumerCanceledServices", + "VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation", + "VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation", + "VisaUserSubmissionChargebackConsumerCounterfeitMerchandise", + "VisaUserSubmissionChargebackConsumerCreditNotProcessed", + "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise", + "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted", + "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned", + "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation", + "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted", + "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned", + "VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed", + "VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturnAttempted", + "VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturned", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceived", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", + "VisaUserSubmissionChargebackConsumerQualityMerchandise", + "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", + "VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted", + "VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned", + "VisaUserSubmissionChargebackConsumerQualityServices", + "VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation", + "VisaUserSubmissionChargebackConsumerQualityServicesOngoingNegotiations", + "VisaUserSubmissionChargebackConsumerServicesMisrepresentation", + "VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCancellation", + "VisaUserSubmissionChargebackConsumerServicesNotAsDescribed", + "VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation", + "VisaUserSubmissionChargebackConsumerServicesNotReceived", + "VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackFraud", + "VisaUserSubmissionChargebackProcessingError", + "VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction", + "VisaUserSubmissionChargebackProcessingErrorIncorrectAmount", + "VisaUserSubmissionChargebackProcessingErrorPaidByOtherMeans", + "VisaUserSubmissionMerchantPrearbitrationDecline", + "VisaUserSubmissionUserPrearbitration", + "VisaUserSubmissionUserPrearbitrationCategoryChange", + "Win", +] + + +class Loss(BaseModel): + lost_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was lost. + """ + + reason: Literal["user_withdrawn", "loss"] + """The reason the Card Dispute was lost. + + - `user_withdrawn` - The user withdrew the Card Dispute. + - `loss` - The Card Dispute was lost according to network rules. + """ + + +class VisaNetworkEventAttachmentFile(BaseModel): + file_id: str + """The ID of the file attached to the Card Dispute.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes(BaseModel): + explanation: Optional[str] = None + """ + Explanation for why the merchant believes the cardholder no longer disputes the + transaction. + """ + + +class VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence(BaseModel): + category: Literal[ + "authorized_signer", + "delivery", + "delivery_at_place_of_employment", + "digital_goods_download", + "dynamic_currency_conversion_actively_chosen", + "flight_manifest_and_purchase_itinerary", + "household_member_signer", + "legitimate_spend_across_payment_types_for_same_merchandise", + "merchandise_use", + "passenger_transport_ticket_use", + "recurring_transaction_with_binding_contract_or_previous_undisputed_transaction", + "signed_delivery_or_pickup_form", + "signed_mail_order_phone_order_form", + "travel_and_expense_loyalty_transaction", + "travel_and_expense_subsequent_purchase", + ] + """The category of compelling evidence provided by the merchant. + + - `authorized_signer` - Authorized signer known by the cardholder. + - `delivery` - Proof of delivery. + - `delivery_at_place_of_employment` - Proof of delivery to cardholder at place + of employment. + - `digital_goods_download` - Proof of digital goods download. + - `dynamic_currency_conversion_actively_chosen` - Dynamic Currency Conversion + actively chosen by cardholder. + - `flight_manifest_and_purchase_itinerary` - Flight manifest with corresponding + purchase itinerary record. + - `household_member_signer` - Signer is member of cardholder's household. + - `legitimate_spend_across_payment_types_for_same_merchandise` - Legitimate + spend across multiple payment types for same merchandise. + - `merchandise_use` - Documentation to prove the cardholder is in possession of + and/or using the merchandise. + - `passenger_transport_ticket_use` - Passenger transport: proof ticket was + received, scanned at gate or other transaction related to original (for + example, frequent flyer miles.) + - `recurring_transaction_with_binding_contract_or_previous_undisputed_transaction` - + Recurring transaction with binding contract or previous undisputed recurring + transactions and proof the cardholder is using the merchandise or service. + - `signed_delivery_or_pickup_form` - Signed delivery form, or copy of/details of + identification from cardholder as proof goods were picked up at merchant + location. + - `signed_mail_order_phone_order_form` - Signed Mail Order/Phone Order form. + - `travel_and_expense_loyalty_transaction` - Travel & Expense: loyalty + transactions related to purchase. + - `travel_and_expense_subsequent_purchase` - Travel & Expense: subsequent + purchases made throughout service period. + """ + + explanation: Optional[str] = None + """Explanation of the compelling evidence provided by the merchant.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedCreditOrReversalProcessed(BaseModel): + amount: int + """The amount of the credit or reversal in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the credit or + reversal's currency. + """ + + explanation: Optional[str] = None + """Explanation for why the merchant believes the credit or reversal was processed.""" + + processed_at: date + """The date the credit or reversal was processed.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedDelayedChargeTransaction(BaseModel): + explanation: Optional[str] = None + """Additional details about the delayed charge transaction.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedEvidenceOfImprint(BaseModel): + explanation: Optional[str] = None + """Explanation of the evidence of imprint.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute(BaseModel): + explanation: Optional[str] = None + """Explanation for why the dispute is considered invalid by the merchant.""" + + reason: Literal["other", "special_authorization_procedures_followed"] + """The reason a merchant considers the dispute invalid. + + - `other` - Other. + - `special_authorization_procedures_followed` - Special authorization procedures + followed. + """ + + +class VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): + blockchain_transaction_hash: str + """Blockchain transaction hash.""" + + destination_wallet_address: str + """Destination wallet address.""" + + prior_approved_transactions: Optional[str] = None + """Prior approved transactions.""" + + +class VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTransactions(BaseModel): + explanation: Optional[str] = None + """ + Explanation of the prior undisputed non-fraud transactions provided by the + merchant. + """ + + +class VisaNetworkEventMerchantPrearbitrationReceived(BaseModel): + cardholder_no_longer_disputes: Optional[ + VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes + ] = None + """Cardholder no longer disputes details. + + Present if and only if `reason` is `cardholder_no_longer_disputes`. + """ + + compelling_evidence: Optional[VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence] = None + """Compelling evidence details. + + Present if and only if `reason` is `compelling_evidence`. + """ + + credit_or_reversal_processed: Optional[VisaNetworkEventMerchantPrearbitrationReceivedCreditOrReversalProcessed] = ( + None + ) + """Credit or reversal processed details. + + Present if and only if `reason` is `credit_or_reversal_processed`. + """ + + delayed_charge_transaction: Optional[VisaNetworkEventMerchantPrearbitrationReceivedDelayedChargeTransaction] = None + """Delayed charge transaction details. + + Present if and only if `reason` is `delayed_charge_transaction`. + """ + + evidence_of_imprint: Optional[VisaNetworkEventMerchantPrearbitrationReceivedEvidenceOfImprint] = None + """Evidence of imprint details. + + Present if and only if `reason` is `evidence_of_imprint`. + """ + + invalid_dispute: Optional[VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute] = None + """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" + + non_fiat_currency_or_non_fungible_token_received: Optional[ + VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungibleTokenReceived + ] = None + """Non-fiat currency or non-fungible token received details. + + Present if and only if `reason` is + `non_fiat_currency_or_non_fungible_token_received`. + """ + + prior_undisputed_non_fraud_transactions: Optional[ + VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTransactions + ] = None + """Prior undisputed non-fraud transactions details. + + Present if and only if `reason` is `prior_undisputed_non_fraud_transactions`. + """ + + reason: Literal[ + "cardholder_no_longer_disputes", + "compelling_evidence", + "credit_or_reversal_processed", + "delayed_charge_transaction", + "evidence_of_imprint", + "invalid_dispute", + "non_fiat_currency_or_non_fungible_token_received", + "prior_undisputed_non_fraud_transactions", + ] + """The reason the merchant re-presented the dispute. + + - `cardholder_no_longer_disputes` - Cardholder no longer disputes the + transaction. + - `compelling_evidence` - Compelling evidence. + - `credit_or_reversal_processed` - Credit or reversal was processed. + - `delayed_charge_transaction` - Delayed charge transaction. + - `evidence_of_imprint` - Evidence of imprint. + - `invalid_dispute` - Invalid dispute. + - `non_fiat_currency_or_non_fungible_token_received` - Non-fiat currency or + non-fungible token was received by the cardholder. + - `prior_undisputed_non_fraud_transactions` - Prior undisputed non-fraud + transactions. + """ + + +class VisaNetworkEventRepresentedCardholderNoLongerDisputes(BaseModel): + explanation: Optional[str] = None + """ + Explanation for why the merchant believes the cardholder no longer disputes the + transaction. + """ + + +class VisaNetworkEventRepresentedCreditOrReversalProcessed(BaseModel): + amount: int + """The amount of the credit or reversal in the minor unit of its currency. + + For dollars, for example, this is cents. + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the credit or + reversal's currency. + """ + + explanation: Optional[str] = None + """Explanation for why the merchant believes the credit or reversal was processed.""" + + processed_at: date + """The date the credit or reversal was processed.""" + + +class VisaNetworkEventRepresentedInvalidDispute(BaseModel): + explanation: Optional[str] = None + """Explanation for why the dispute is considered invalid by the merchant.""" + + reason: Literal[ + "automatic_teller_machine_transaction_proof_provided", + "balance_of_partial_prepayment_not_paid", + "cardholder_canceled_before_expected_merchandise_receipt_date", + "cardholder_canceled_before_expected_services_receipt_date", + "cardholder_canceled_different_date", + "cardholder_did_not_cancel_according_to_policy", + "cardholder_received_merchandise", + "country_code_correct", + "credit_processed_correctly", + "currency_correct", + "dispute_is_for_quality", + "dispute_is_for_visa_cash_back_transaction_portion", + "disputed_amount_is_value_added_tax", + "disputed_amount_is_value_added_tax_no_credit_receipt_provided", + "limited_return_or_cancellation_policy_properly_disclosed", + "merchandise_held_at_cardholder_customs_agency", + "merchandise_matches_description", + "merchandise_not_counterfeit", + "merchandise_not_damaged", + "merchandise_not_defective", + "merchandise_provided_prior_to_cancellation_date", + "merchandise_quality_matches_description", + "merchandise_return_not_attempted", + "merchant_not_notified_of_closed_account", + "name_on_flight_manifest_matches_purchase", + "no_credit_receipt_provided", + "other", + "processing_error_incorrect", + "returned_mechandise_held_at_customs_agency_outside_merchant_country", + "services_match_description", + "services_provided_prior_to_cancellation_date", + "services_used_after_cancellation_date", + "terms_of_service_not_misrepresented", + "transaction_code_correct", + ] + """The reason a merchant considers the dispute invalid. + + - `automatic_teller_machine_transaction_proof_provided` - Automatic Teller + Machine (ATM) transaction proof provided. + - `balance_of_partial_prepayment_not_paid` - Balance of partial prepayment not + paid. + - `cardholder_canceled_before_expected_merchandise_receipt_date` - Cardholder + canceled before expected receipt date of the merchandise. + - `cardholder_canceled_before_expected_services_receipt_date` - Cardholder + canceled before expected receipt date of the services. + - `cardholder_canceled_different_date` - Cardholder canceled on a different date + than claimed. + - `cardholder_did_not_cancel_according_to_policy` - Cardholder received did not + cancel according to policy. + - `cardholder_received_merchandise` - Cardholder received the merchandise. + - `country_code_correct` - Country code is correct. + - `credit_processed_correctly` - Credit was processed correctly. + - `currency_correct` - Currency is correct. + - `dispute_is_for_quality` - Dispute is for quality. + - `dispute_is_for_visa_cash_back_transaction_portion` - Dispute is for Visa Cash + Back transaction portion. + - `disputed_amount_is_value_added_tax` - Disputed amount is Value Added Tax + (VAT). + - `disputed_amount_is_value_added_tax_no_credit_receipt_provided` - Disputed + amount is Value Added Tax (VAT) but no credit receipt was provided by the + cardholder. + - `limited_return_or_cancellation_policy_properly_disclosed` - Limited return or + cancellation policy was properly disclosed. + - `merchandise_held_at_cardholder_customs_agency` - Merchandise held at + cardholder customs agency. + - `merchandise_matches_description` - Merchandise matches the merchant's + description. + - `merchandise_not_counterfeit` - Merchandise is not counterfeit. + - `merchandise_not_damaged` - Merchandise is not damaged. + - `merchandise_not_defective` - Merchandise is not defective. + - `merchandise_provided_prior_to_cancellation_date` - Merchandise was provided + prior to the cancellation date. + - `merchandise_quality_matches_description` - Merchandise quality matches the + merchant's description. + - `merchandise_return_not_attempted` - Merchandise was not attempted returned to + the merchant. + - `merchant_not_notified_of_closed_account` - Merchant was not notified of the + closed account. + - `name_on_flight_manifest_matches_purchase` - Name on manifest of departed + flight matches name on purchased itinerary. + - `no_credit_receipt_provided` - No credit receipt was provided by the + cardholder. + - `other` - Other. + - `processing_error_incorrect` - The claimed processing error did not occur. + - `returned_mechandise_held_at_customs_agency_outside_merchant_country` - + Returned merchandise held at customs agency outside the merchant's country. + - `services_match_description` - Services match the merchant's description. + - `services_provided_prior_to_cancellation_date` - Services were provided prior + to the cancellation date. + - `services_used_after_cancellation_date` - Services were used after the + cancellation date and prior to the dispute submission date. + - `terms_of_service_not_misrepresented` - Terms of service were not + misrepresented. + - `transaction_code_correct` - Transaction code is correct. + """ + + +class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): + blockchain_transaction_hash: str + """Blockchain transaction hash.""" + + destination_wallet_address: str + """Destination wallet address.""" + + prior_approved_transactions: Optional[str] = None + """Prior approved transactions.""" + + +class VisaNetworkEventRepresentedProofOfCashDisbursement(BaseModel): + explanation: Optional[str] = None + """ + Explanation for why the merchant believes the evidence provides proof of cash + disbursement. + """ + + +class VisaNetworkEventRepresentedReversalIssued(BaseModel): + explanation: Optional[str] = None + """Explanation of the reversal issued by the merchant.""" + + +class VisaNetworkEventRepresented(BaseModel): + cardholder_no_longer_disputes: Optional[VisaNetworkEventRepresentedCardholderNoLongerDisputes] = None + """Cardholder no longer disputes details. + + Present if and only if `reason` is `cardholder_no_longer_disputes`. + """ + + credit_or_reversal_processed: Optional[VisaNetworkEventRepresentedCreditOrReversalProcessed] = None + """Credit or reversal processed details. + + Present if and only if `reason` is `credit_or_reversal_processed`. + """ + + invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None + """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" + + non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None + """Non-fiat currency or non-fungible token as described details. + + Present if and only if `reason` is + `non_fiat_currency_or_non_fungible_token_as_described`. + """ + + non_fiat_currency_or_non_fungible_token_received: Optional[ + VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived + ] = None + """Non-fiat currency or non-fungible token received details. + + Present if and only if `reason` is + `non_fiat_currency_or_non_fungible_token_received`. + """ + + proof_of_cash_disbursement: Optional[VisaNetworkEventRepresentedProofOfCashDisbursement] = None + """Proof of cash disbursement details. + + Present if and only if `reason` is `proof_of_cash_disbursement`. + """ + + reason: Literal[ + "cardholder_no_longer_disputes", + "credit_or_reversal_processed", + "invalid_dispute", + "non_fiat_currency_or_non_fungible_token_as_described", + "non_fiat_currency_or_non_fungible_token_received", + "proof_of_cash_disbursement", + "reversal_issued", + ] + """The reason the merchant re-presented the dispute. + + - `cardholder_no_longer_disputes` - Cardholder no longer disputes the + transaction. + - `credit_or_reversal_processed` - Credit or reversal was processed. + - `invalid_dispute` - Invalid dispute. + - `non_fiat_currency_or_non_fungible_token_as_described` - Non-fiat currency or + non-fungible token is as described by the merchant. + - `non_fiat_currency_or_non_fungible_token_received` - Non-fiat currency or + non-fungible token was received by the cardholder. + - `proof_of_cash_disbursement` - Proof of cash disbursement provided. + - `reversal_issued` - Reversal issued by merchant. + """ + + reversal_issued: Optional[VisaNetworkEventRepresentedReversalIssued] = None + """Reversal issued by merchant details. + + Present if and only if `reason` is `reversal_issued`. + """ + + +class VisaNetworkEvent(BaseModel): + attachment_files: List[VisaNetworkEventAttachmentFile] + """The files attached to the Visa Card Dispute User Submission.""" + + category: Literal[ + "chargeback_accepted", + "chargeback_submitted", + "chargeback_timed_out", + "merchant_prearbitration_decline_submitted", + "merchant_prearbitration_received", + "merchant_prearbitration_timed_out", + "represented", + "representment_timed_out", + "user_prearbitration_accepted", + "user_prearbitration_declined", + "user_prearbitration_submitted", + "user_prearbitration_timed_out", + "user_withdrawal_submitted", + ] + """The category of the user submission. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `chargeback_accepted` - Card Dispute Chargeback Accepted Visa Network Event: + details will be under the `chargeback_accepted` object. + - `chargeback_submitted` - Card Dispute Chargeback Submitted Visa Network Event: + details will be under the `chargeback_submitted` object. + - `chargeback_timed_out` - Card Dispute Chargeback Timed Out Visa Network Event: + details will be under the `chargeback_timed_out` object. + - `merchant_prearbitration_decline_submitted` - Card Dispute Merchant + Pre-Arbitration Decline Submitted Visa Network Event: details will be under + the `merchant_prearbitration_decline_submitted` object. + - `merchant_prearbitration_received` - Card Dispute Merchant Pre-Arbitration + Received Visa Network Event: details will be under the + `merchant_prearbitration_received` object. + - `merchant_prearbitration_timed_out` - Card Dispute Merchant Pre-Arbitration + Timed Out Visa Network Event: details will be under the + `merchant_prearbitration_timed_out` object. + - `represented` - Card Dispute Re-presented Visa Network Event: details will be + under the `represented` object. + - `representment_timed_out` - Card Dispute Re-presentment Timed Out Visa Network + Event: details will be under the `representment_timed_out` object. + - `user_prearbitration_accepted` - Card Dispute User Pre-Arbitration Accepted + Visa Network Event: details will be under the `user_prearbitration_accepted` + object. + - `user_prearbitration_declined` - Card Dispute User Pre-Arbitration Declined + Visa Network Event: details will be under the `user_prearbitration_declined` + object. + - `user_prearbitration_submitted` - Card Dispute User Pre-Arbitration Submitted + Visa Network Event: details will be under the `user_prearbitration_submitted` + object. + - `user_prearbitration_timed_out` - Card Dispute User Pre-Arbitration Timed Out + Visa Network Event: details will be under the `user_prearbitration_timed_out` + object. + - `user_withdrawal_submitted` - Card Dispute User Withdrawal Submitted Visa + Network Event: details will be under the `user_withdrawal_submitted` object. + """ + + chargeback_accepted: Optional[object] = None + """A Card Dispute Chargeback Accepted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `chargeback_accepted`. Contains the details specific to a chargeback + accepted Visa Card Dispute Network Event, which represents that a chargeback has + been accepted by the merchant. + """ + + chargeback_submitted: Optional[object] = None + """A Card Dispute Chargeback Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `chargeback_submitted`. Contains the details specific to a chargeback + submitted Visa Card Dispute Network Event, which represents that a chargeback + has been submitted to the network. + """ + + chargeback_timed_out: Optional[object] = None + """A Card Dispute Chargeback Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `chargeback_timed_out`. Contains the details specific to a chargeback + timed out Visa Card Dispute Network Event, which represents that the chargeback + has timed out in the user's favor. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Visa Card Dispute Network Event was created. + """ + + dispute_financial_transaction_id: Optional[str] = None + """The dispute financial transaction that resulted from the network event, if any.""" + + merchant_prearbitration_decline_submitted: Optional[object] = None + """ + A Card Dispute Merchant Pre-Arbitration Decline Submitted Visa Network Event + object. This field will be present in the JSON response if and only if + `category` is equal to `merchant_prearbitration_decline_submitted`. Contains the + details specific to a merchant prearbitration decline submitted Visa Card + Dispute Network Event, which represents that the user has declined the + merchant's request for a prearbitration request decision in their favor. + """ + + merchant_prearbitration_received: Optional[VisaNetworkEventMerchantPrearbitrationReceived] = None + """A Card Dispute Merchant Pre-Arbitration Received Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `merchant_prearbitration_received`. Contains the details specific to a + merchant prearbitration received Visa Card Dispute Network Event, which + represents that the merchant has issued a prearbitration request in the user's + favor. + """ + + merchant_prearbitration_timed_out: Optional[object] = None + """A Card Dispute Merchant Pre-Arbitration Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `merchant_prearbitration_timed_out`. Contains the details specific to a + merchant prearbitration timed out Visa Card Dispute Network Event, which + represents that the user has timed out responding to the merchant's + prearbitration request. + """ + + represented: Optional[VisaNetworkEventRepresented] = None + """A Card Dispute Re-presented Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `represented`. Contains the details specific to a re-presented Visa + Card Dispute Network Event, which represents that the merchant has declined the + user's chargeback and has re-presented the payment. + """ + + representment_timed_out: Optional[object] = None + """A Card Dispute Re-presentment Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `representment_timed_out`. Contains the details specific to a + re-presentment time-out Visa Card Dispute Network Event, which represents that + the user did not respond to the re-presentment by the merchant within the time + limit. + """ + + user_prearbitration_accepted: Optional[object] = None + """A Card Dispute User Pre-Arbitration Accepted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_prearbitration_accepted`. Contains the details specific to a user + prearbitration accepted Visa Card Dispute Network Event, which represents that + the merchant has accepted the user's prearbitration request in the user's favor. + """ + + user_prearbitration_declined: Optional[object] = None + """A Card Dispute User Pre-Arbitration Declined Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_prearbitration_declined`. Contains the details specific to a user + prearbitration declined Visa Card Dispute Network Event, which represents that + the merchant has declined the user's prearbitration request. + """ + + user_prearbitration_submitted: Optional[object] = None + """A Card Dispute User Pre-Arbitration Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_prearbitration_submitted`. Contains the details specific to a + user prearbitration submitted Visa Card Dispute Network Event, which represents + that the user's request for prearbitration has been submitted to the network. + """ + + user_prearbitration_timed_out: Optional[object] = None + """A Card Dispute User Pre-Arbitration Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_prearbitration_timed_out`. Contains the details specific to a + user prearbitration timed out Visa Card Dispute Network Event, which represents + that the merchant has timed out responding to the user's prearbitration request. + """ + + user_withdrawal_submitted: Optional[object] = None + """A Card Dispute User Withdrawal Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_withdrawal_submitted`. Contains the details specific to a user + withdrawal submitted Visa Card Dispute Network Event, which represents that the + user's request to withdraw the dispute has been submitted to the network. + """ + + +class VisaUserSubmissionAttachmentFile(BaseModel): + file_id: str + """The ID of the file attached to the Card Dispute.""" + + +class VisaUserSubmissionChargebackAuthorization(BaseModel): + account_status: Literal["account_closed", "credit_problem", "fraud"] + """Account status. + + - `account_closed` - Account closed. + - `credit_problem` - Credit problem. + - `fraud` - Fraud. + """ + + +class VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation(BaseModel): + canceled_at: date + """Canceled at.""" + + canceled_prior_to_ship_date: Literal["canceled_prior_to_ship_date", "not_canceled_prior_to_ship_date"] + """Canceled prior to ship date. + + - `canceled_prior_to_ship_date` - Canceled prior to ship date. + - `not_canceled_prior_to_ship_date` - Not canceled prior to ship date. + """ + + cancellation_policy_provided: Literal["not_provided", "provided"] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: str + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted(BaseModel): + attempt_explanation: str + """Attempt explanation.""" + + attempt_reason: Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: date + """Attempted at.""" + + merchandise_disposition: str + """Merchandise disposition.""" + + +class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned(BaseModel): + merchant_received_return_at: Optional[date] = None + """Merchant received return at.""" + + other_explanation: Optional[str] = None + """Other explanation. Required if and only if the return method is `other`.""" + + return_method: Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: date + """Returned at.""" + + tracking_number: Optional[str] = None + """Tracking number.""" + + +class VisaUserSubmissionChargebackConsumerCanceledMerchandise(BaseModel): + cardholder_cancellation: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation] = ( + None + ) + """Cardholder cancellation.""" + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + not_returned: Optional[object] = None + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + + purchase_explanation: str + """Purchase explanation.""" + + received_or_expected_at: date + """Received or expected at.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["not_returned", "returned", "return_attempted"] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerCanceledRecurringTransactionMerchantContactMethods(BaseModel): + application_name: Optional[str] = None + """Application name.""" + + call_center_phone_number: Optional[str] = None + """Call center phone number.""" + + email_address: Optional[str] = None + """Email address.""" + + in_person_address: Optional[str] = None + """In person address.""" + + mailing_address: Optional[str] = None + """Mailing address.""" + + text_phone_number: Optional[str] = None + """Text phone number.""" + + +class VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction(BaseModel): + cancellation_target: Literal["account", "transaction"] + """Cancellation target. + + - `account` - Account. + - `transaction` - Transaction. + """ + + merchant_contact_methods: VisaUserSubmissionChargebackConsumerCanceledRecurringTransactionMerchantContactMethods + """Merchant contact methods.""" + + other_form_of_payment_explanation: Optional[str] = None + """Other form of payment explanation.""" + + transaction_or_account_canceled_at: date + """Transaction or account canceled at.""" + + +class VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation(BaseModel): + canceled_at: date + """Canceled at.""" + + cancellation_policy_provided: Literal["not_provided", "provided"] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: str + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation(BaseModel): + explanation: Literal[ + "cardholder_canceled_prior_to_service", + "cardholder_cancellation_attempt_within_24_hours_of_confirmation", + "merchant_billed_no_show", + ] + """Explanation. + + - `cardholder_canceled_prior_to_service` - Cardholder canceled prior to service. + - `cardholder_cancellation_attempt_within_24_hours_of_confirmation` - Cardholder + cancellation attempt within 24 hours of confirmation. + - `merchant_billed_no_show` - Merchant billed for no-show. + """ + + +class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): + cardholder_cancellation: VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation + """Cardholder cancellation.""" + + contracted_at: date + """Contracted at.""" + + guaranteed_reservation: Optional[VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation] = None + """Guaranteed reservation explanation. + + Present if and only if `service_type` is `guaranteed_reservation`. + """ + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + other: Optional[object] = None + """Other service type explanation. + + Present if and only if `service_type` is `other`. + """ + + purchase_explanation: str + """Purchase explanation.""" + + service_type: Literal["guaranteed_reservation", "other", "timeshare"] + """Service type. + + - `guaranteed_reservation` - Guaranteed reservation. + - `other` - Other. + - `timeshare` - Timeshare. + """ + + timeshare: Optional[object] = None + """Timeshare explanation. Present if and only if `service_type` is `timeshare`.""" + + +class VisaUserSubmissionChargebackConsumerCounterfeitMerchandise(BaseModel): + counterfeit_explanation: str + """Counterfeit explanation.""" + + disposition_explanation: str + """Disposition explanation.""" + + order_explanation: str + """Order explanation.""" + + received_at: date + """Received at.""" + + +class VisaUserSubmissionChargebackConsumerCreditNotProcessed(BaseModel): + canceled_or_returned_at: Optional[date] = None + """Canceled or returned at.""" + + credit_expected_at: Optional[date] = None + """Credit expected at.""" + + +class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(BaseModel): + attempt_explanation: str + """Attempt explanation.""" + + attempt_reason: Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: date + """Attempted at.""" + + merchandise_disposition: str + """Merchandise disposition.""" + + +class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned(BaseModel): + merchant_received_return_at: Optional[date] = None + """Merchant received return at.""" + + other_explanation: Optional[str] = None + """Other explanation. Required if and only if the return method is `other`.""" + + return_method: Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: date + """Returned at.""" + + tracking_number: Optional[str] = None + """Tracking number.""" + + +class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise(BaseModel): + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + not_returned: Optional[object] = None + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + + order_and_issue_explanation: str + """Order and issue explanation.""" + + received_at: date + """Received at.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["not_returned", "returned", "return_attempted"] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted(BaseModel): + attempt_explanation: str + """Attempt explanation.""" + + attempt_reason: Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: date + """Attempted at.""" + + merchandise_disposition: str + """Merchandise disposition.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned(BaseModel): + merchant_received_return_at: Optional[date] = None + """Merchant received return at.""" + + other_explanation: Optional[str] = None + """Other explanation. Required if and only if the return method is `other`.""" + + return_method: Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: date + """Returned at.""" + + tracking_number: Optional[str] = None + """Tracking number.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation(BaseModel): + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: str + """Misrepresentation explanation.""" + + not_returned: Optional[object] = None + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + + purchase_explanation: str + """Purchase explanation.""" + + received_at: date + """Received at.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["not_returned", "returned", "return_attempted"] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturnAttempted(BaseModel): + attempt_explanation: str + """Attempt explanation.""" + + attempt_reason: Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: date + """Attempted at.""" + + merchandise_disposition: str + """Merchandise disposition.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturned(BaseModel): + merchant_received_return_at: Optional[date] = None + """Merchant received return at.""" + + other_explanation: Optional[str] = None + """Other explanation. Required if and only if the return method is `other`.""" + + return_method: Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: date + """Returned at.""" + + tracking_number: Optional[str] = None + """Tracking number.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed(BaseModel): + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: date + """Received at.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["returned", "return_attempted"] + """Return outcome. + + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(BaseModel): + canceled_at: date + """Canceled at.""" + + reason: Optional[str] = None + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(BaseModel): + attempted_at: date + """Attempted at.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned(BaseModel): + merchant_received_return_at: date + """Merchant received return at.""" + + returned_at: date + """Returned at.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed(BaseModel): + explanation: str + """Explanation.""" + + not_returned: Optional[object] = None + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["not_returned", "returned", "return_attempted"] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation(BaseModel): + agreed_location: str + """Agreed location.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation(BaseModel): + canceled_at: date + """Canceled at.""" + + +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): + cancellation_outcome: Literal[ + "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + cardholder_cancellation_prior_to_expected_receipt: Optional[ + VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt + ] = None + """Cardholder cancellation prior to expected receipt. + + Present if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + delayed: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed] = None + """Delayed. Present if and only if `delivery_issue` is `delayed`.""" + + delivered_to_wrong_location: Optional[ + VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation + ] = None + """Delivered to wrong location. + + Present if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + + delivery_issue: Literal["delayed", "delivered_to_wrong_location"] + """Delivery issue. + + - `delayed` - Delayed. + - `delivered_to_wrong_location` - Delivered to wrong location. + """ + + last_expected_receipt_at: date + """Last expected receipt at.""" + + merchant_cancellation: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation] = ( + None + ) + """Merchant cancellation. + + Present if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + no_cancellation: Optional[object] = None + """No cancellation. + + Present if and only if `cancellation_outcome` is `no_cancellation`. + """ + + purchase_info_and_explanation: str + """Purchase information and explanation.""" + + +class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): + explanation: str + """Explanation.""" + + reason: Literal["prohibited_by_local_laws_or_regulation", "recipient_refused"] + """Reason. + + - `prohibited_by_local_laws_or_regulation` - Prohibited by local laws or + regulation. + - `recipient_refused` - Recipient refused. + """ + + +class VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations(BaseModel): + explanation: str + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: date + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: date + """Started at.""" + + +class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted(BaseModel): + attempt_explanation: str + """Attempt explanation.""" + + attempt_reason: Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: date + """Attempted at.""" + + merchandise_disposition: str + """Merchandise disposition.""" + + +class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned(BaseModel): + merchant_received_return_at: Optional[date] = None + """Merchant received return at.""" + + other_explanation: Optional[str] = None + """Other explanation. Required if and only if the return method is `other`.""" + + return_method: Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: date + """Returned at.""" + + tracking_number: Optional[str] = None + """Tracking number.""" + + +class VisaUserSubmissionChargebackConsumerQualityMerchandise(BaseModel): + expected_at: date + """Expected at.""" + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + not_returned: Optional[object] = None + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + + ongoing_negotiations: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations] = None + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + purchase_info_and_quality_issue: str + """Purchase information and quality issue.""" + + received_at: date + """Received at.""" + + return_attempted: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted] = None + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + + return_outcome: Literal["not_returned", "returned", "return_attempted"] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + returned: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned] = None + """Returned. Present if and only if `return_outcome` is `returned`.""" + + +class VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation(BaseModel): + accepted_by_merchant: Literal["accepted", "not_accepted"] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: date + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerQualityServicesOngoingNegotiations(BaseModel): + explanation: str + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: date + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: date + """Started at.""" + + +class VisaUserSubmissionChargebackConsumerQualityServices(BaseModel): + cardholder_cancellation: VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation + """Cardholder cancellation.""" + + cardholder_paid_to_have_work_redone: Optional[ + Literal["did_not_pay_to_have_work_redone", "paid_to_have_work_redone"] + ] = None + """Cardholder paid to have work redone. + + - `did_not_pay_to_have_work_redone` - Cardholder did not pay to have work + redone. + - `paid_to_have_work_redone` - Cardholder paid to have work redone. + """ + + non_fiat_currency_or_non_fungible_token_related_and_not_matching_description: Literal["not_related", "related"] + """Non-fiat currency or non-fungible token related and not matching description. + + - `not_related` - Not related. + - `related` - Related. + """ + + ongoing_negotiations: Optional[VisaUserSubmissionChargebackConsumerQualityServicesOngoingNegotiations] = None + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + purchase_info_and_quality_issue: str + """Purchase information and quality issue.""" + + restaurant_food_related: Optional[Literal["not_related", "related"]] = None + """ + Whether the dispute is related to the quality of food from an eating place or + restaurant. Must be provided when Merchant Category Code (MCC) is 5812, 5813 + or 5814. + + - `not_related` - Not related. + - `related` - Related. + """ + + services_received_at: date + """Services received at.""" + + +class VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCancellation(BaseModel): + accepted_by_merchant: Literal["accepted", "not_accepted"] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: date + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerServicesMisrepresentation(BaseModel): + cardholder_cancellation: VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCancellation + """Cardholder cancellation.""" + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: str + """Misrepresentation explanation.""" + + purchase_explanation: str + """Purchase explanation.""" + + received_at: date + """Received at.""" + + +class VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation(BaseModel): + accepted_by_merchant: Literal["accepted", "not_accepted"] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: date + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerServicesNotAsDescribed(BaseModel): + cardholder_cancellation: VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation + """Cardholder cancellation.""" + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: date + """Received at.""" + + +class VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(BaseModel): + canceled_at: date + """Canceled at.""" + + reason: Optional[str] = None + """Reason.""" + + +class VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellation(BaseModel): + canceled_at: date + """Canceled at.""" + + +class VisaUserSubmissionChargebackConsumerServicesNotReceived(BaseModel): + cancellation_outcome: Literal[ + "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + cardholder_cancellation_prior_to_expected_receipt: Optional[ + VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt + ] = None + """Cardholder cancellation prior to expected receipt. + + Present if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + last_expected_receipt_at: date + """Last expected receipt at.""" + + merchant_cancellation: Optional[VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellation] = None + """Merchant cancellation. + + Present if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + no_cancellation: Optional[object] = None + """No cancellation. + + Present if and only if `cancellation_outcome` is `no_cancellation`. + """ + + purchase_info_and_explanation: str + """Purchase information and explanation.""" + + +class VisaUserSubmissionChargebackFraud(BaseModel): + fraud_type: Literal[ + "account_or_credentials_takeover", + "card_not_received_as_issued", + "fraudulent_application", + "fraudulent_use_of_account_number", + "incorrect_processing", + "issuer_reported_counterfeit", + "lost", + "manipulation_of_account_holder", + "merchant_misrepresentation", + "miscellaneous", + "stolen", + ] + """Fraud type. + + - `account_or_credentials_takeover` - Account or credentials takeover. + - `card_not_received_as_issued` - Card not received as issued. + - `fraudulent_application` - Fraudulent application. + - `fraudulent_use_of_account_number` - Fraudulent use of account number. + - `incorrect_processing` - Incorrect processing. + - `issuer_reported_counterfeit` - Issuer reported counterfeit. + - `lost` - Lost. + - `manipulation_of_account_holder` - Manipulation of account holder. + - `merchant_misrepresentation` - Merchant misrepresentation. + - `miscellaneous` - Miscellaneous. + - `stolen` - Stolen. + """ + + +class VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction(BaseModel): + other_transaction_id: str + """Other transaction ID.""" + + +class VisaUserSubmissionChargebackProcessingErrorIncorrectAmount(BaseModel): + expected_amount: int + """Expected amount.""" + + +class VisaUserSubmissionChargebackProcessingErrorPaidByOtherMeans(BaseModel): + other_form_of_payment_evidence: Literal[ + "canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher" + ] + """Other form of payment evidence. + + - `canceled_check` - Canceled check. + - `card_transaction` - Card transaction. + - `cash_receipt` - Cash receipt. + - `other` - Other. + - `statement` - Statement. + - `voucher` - Voucher. + """ + + other_transaction_id: Optional[str] = None + """Other transaction ID.""" + + +class VisaUserSubmissionChargebackProcessingError(BaseModel): + duplicate_transaction: Optional[VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction] = None + """Duplicate transaction. + + Present if and only if `error_reason` is `duplicate_transaction`. + """ + + error_reason: Literal["duplicate_transaction", "incorrect_amount", "paid_by_other_means"] + """Error reason. + + - `duplicate_transaction` - Duplicate transaction. + - `incorrect_amount` - Incorrect amount. + - `paid_by_other_means` - Paid by other means. + """ + + incorrect_amount: Optional[VisaUserSubmissionChargebackProcessingErrorIncorrectAmount] = None + """Incorrect amount. Present if and only if `error_reason` is `incorrect_amount`.""" + + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + paid_by_other_means: Optional[VisaUserSubmissionChargebackProcessingErrorPaidByOtherMeans] = None + """Paid by other means. + + Present if and only if `error_reason` is `paid_by_other_means`. + """ + + +class VisaUserSubmissionChargeback(BaseModel): + authorization: Optional[VisaUserSubmissionChargebackAuthorization] = None + """Authorization. Present if and only if `category` is `authorization`.""" + + category: Literal[ + "authorization", + "consumer_canceled_merchandise", + "consumer_canceled_recurring_transaction", + "consumer_canceled_services", + "consumer_counterfeit_merchandise", + "consumer_credit_not_processed", + "consumer_damaged_or_defective_merchandise", + "consumer_merchandise_misrepresentation", + "consumer_merchandise_not_as_described", + "consumer_merchandise_not_received", + "consumer_non_receipt_of_cash", + "consumer_original_credit_transaction_not_accepted", + "consumer_quality_merchandise", + "consumer_quality_services", + "consumer_services_misrepresentation", + "consumer_services_not_as_described", + "consumer_services_not_received", + "fraud", + "processing_error", + ] + """Category. + + - `authorization` - Authorization. + - `consumer_canceled_merchandise` - Consumer: canceled merchandise. + - `consumer_canceled_recurring_transaction` - Consumer: canceled recurring + transaction. + - `consumer_canceled_services` - Consumer: canceled services. + - `consumer_counterfeit_merchandise` - Consumer: counterfeit merchandise. + - `consumer_credit_not_processed` - Consumer: credit not processed. + - `consumer_damaged_or_defective_merchandise` - Consumer: damaged or defective + merchandise. + - `consumer_merchandise_misrepresentation` - Consumer: merchandise + misrepresentation. + - `consumer_merchandise_not_as_described` - Consumer: merchandise not as + described. + - `consumer_merchandise_not_received` - Consumer: merchandise not received. + - `consumer_non_receipt_of_cash` - Consumer: non-receipt of cash. + - `consumer_original_credit_transaction_not_accepted` - Consumer: Original + Credit Transaction (OCT) not accepted. + - `consumer_quality_merchandise` - Consumer: merchandise quality issue. + - `consumer_quality_services` - Consumer: services quality issue. + - `consumer_services_misrepresentation` - Consumer: services misrepresentation. + - `consumer_services_not_as_described` - Consumer: services not as described. + - `consumer_services_not_received` - Consumer: services not received. + - `fraud` - Fraud. + - `processing_error` - Processing error. + """ + + consumer_canceled_merchandise: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandise] = None + """Canceled merchandise. + + Present if and only if `category` is `consumer_canceled_merchandise`. + """ + + consumer_canceled_recurring_transaction: Optional[ + VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction + ] = None + """Canceled recurring transaction. + + Present if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + + consumer_canceled_services: Optional[VisaUserSubmissionChargebackConsumerCanceledServices] = None + """Canceled services. + + Present if and only if `category` is `consumer_canceled_services`. + """ + + consumer_counterfeit_merchandise: Optional[VisaUserSubmissionChargebackConsumerCounterfeitMerchandise] = None + """Counterfeit merchandise. + + Present if and only if `category` is `consumer_counterfeit_merchandise`. + """ + + consumer_credit_not_processed: Optional[VisaUserSubmissionChargebackConsumerCreditNotProcessed] = None + """Credit not processed. + + Present if and only if `category` is `consumer_credit_not_processed`. + """ + + consumer_damaged_or_defective_merchandise: Optional[ + VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise + ] = None + """Damaged or defective merchandise. + + Present if and only if `category` is + `consumer_damaged_or_defective_merchandise`. + """ + + consumer_merchandise_misrepresentation: Optional[ + VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation + ] = None + """Merchandise misrepresentation. + + Present if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + + consumer_merchandise_not_as_described: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed] = ( + None + ) + """Merchandise not as described. + + Present if and only if `category` is `consumer_merchandise_not_as_described`. + """ + + consumer_merchandise_not_received: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceived] = None + """Merchandise not received. + + Present if and only if `category` is `consumer_merchandise_not_received`. + """ + + consumer_non_receipt_of_cash: Optional[object] = None + """Non-receipt of cash. + + Present if and only if `category` is `consumer_non_receipt_of_cash`. + """ + + consumer_original_credit_transaction_not_accepted: Optional[ + VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted + ] = None + """Original Credit Transaction (OCT) not accepted. + + Present if and only if `category` is + `consumer_original_credit_transaction_not_accepted`. + """ + + consumer_quality_merchandise: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandise] = None + """Merchandise quality issue. + + Present if and only if `category` is `consumer_quality_merchandise`. + """ + + consumer_quality_services: Optional[VisaUserSubmissionChargebackConsumerQualityServices] = None + """Services quality issue. + + Present if and only if `category` is `consumer_quality_services`. + """ + + consumer_services_misrepresentation: Optional[VisaUserSubmissionChargebackConsumerServicesMisrepresentation] = None + """Services misrepresentation. + + Present if and only if `category` is `consumer_services_misrepresentation`. + """ + + consumer_services_not_as_described: Optional[VisaUserSubmissionChargebackConsumerServicesNotAsDescribed] = None + """Services not as described. + + Present if and only if `category` is `consumer_services_not_as_described`. + """ + + consumer_services_not_received: Optional[VisaUserSubmissionChargebackConsumerServicesNotReceived] = None + """Services not received. + + Present if and only if `category` is `consumer_services_not_received`. + """ + + fraud: Optional[VisaUserSubmissionChargebackFraud] = None + """Fraud. Present if and only if `category` is `fraud`.""" + + processing_error: Optional[VisaUserSubmissionChargebackProcessingError] = None + """Processing error. Present if and only if `category` is `processing_error`.""" + + +class VisaUserSubmissionMerchantPrearbitrationDecline(BaseModel): + reason: str + """ + The reason the user declined the merchant's request for pre-arbitration in their + favor. + """ + + +class VisaUserSubmissionUserPrearbitrationCategoryChange(BaseModel): + category: Literal[ + "authorization", + "consumer_canceled_merchandise", + "consumer_canceled_recurring_transaction", + "consumer_canceled_services", + "consumer_counterfeit_merchandise", + "consumer_credit_not_processed", + "consumer_damaged_or_defective_merchandise", + "consumer_merchandise_misrepresentation", + "consumer_merchandise_not_as_described", + "consumer_merchandise_not_received", + "consumer_non_receipt_of_cash", + "consumer_original_credit_transaction_not_accepted", + "consumer_quality_merchandise", + "consumer_quality_services", + "consumer_services_misrepresentation", + "consumer_services_not_as_described", + "consumer_services_not_received", + "fraud", + "processing_error", + ] + """The category the dispute is being changed to. + + - `authorization` - Authorization. + - `consumer_canceled_merchandise` - Consumer: canceled merchandise. + - `consumer_canceled_recurring_transaction` - Consumer: canceled recurring + transaction. + - `consumer_canceled_services` - Consumer: canceled services. + - `consumer_counterfeit_merchandise` - Consumer: counterfeit merchandise. + - `consumer_credit_not_processed` - Consumer: credit not processed. + - `consumer_damaged_or_defective_merchandise` - Consumer: damaged or defective + merchandise. + - `consumer_merchandise_misrepresentation` - Consumer: merchandise + misrepresentation. + - `consumer_merchandise_not_as_described` - Consumer: merchandise not as + described. + - `consumer_merchandise_not_received` - Consumer: merchandise not received. + - `consumer_non_receipt_of_cash` - Consumer: non-receipt of cash. + - `consumer_original_credit_transaction_not_accepted` - Consumer: Original + Credit Transaction (OCT) not accepted. + - `consumer_quality_merchandise` - Consumer: merchandise quality issue. + - `consumer_quality_services` - Consumer: services quality issue. + - `consumer_services_misrepresentation` - Consumer: services misrepresentation. + - `consumer_services_not_as_described` - Consumer: services not as described. + - `consumer_services_not_received` - Consumer: services not received. + - `fraud` - Fraud. + - `processing_error` - Processing error. + """ + + reason: str + """The reason for the pre-arbitration request.""" + + +class VisaUserSubmissionUserPrearbitration(BaseModel): + category_change: Optional[VisaUserSubmissionUserPrearbitrationCategoryChange] = None + """Category change details for the pre-arbitration request, if requested.""" + + reason: str + """The reason for the pre-arbitration request.""" + + +class VisaUserSubmission(BaseModel): + accepted_at: Optional[datetime] = None + """ + The date and time at which the Visa Card Dispute User Submission was reviewed + and accepted. + """ + + amount: Optional[int] = None + """ + The amount of the dispute if it is different from the amount of a prior user + submission or the disputed transaction. + """ + + attachment_files: List[VisaUserSubmissionAttachmentFile] + """The files attached to the Visa Card Dispute User Submission.""" + + category: Literal["chargeback", "merchant_prearbitration_decline", "user_prearbitration"] + """The category of the user submission. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `chargeback` - Visa Card Dispute Chargeback User Submission Chargeback + Details: details will be under the `chargeback` object. + - `merchant_prearbitration_decline` - Visa Card Dispute Merchant Pre-Arbitration + Decline User Submission: details will be under the + `merchant_prearbitration_decline` object. + - `user_prearbitration` - Visa Card Dispute User-Initiated Pre-Arbitration User + Submission: details will be under the `user_prearbitration` object. + """ + + chargeback: Optional[VisaUserSubmissionChargeback] = None + """A Visa Card Dispute Chargeback User Submission Chargeback Details object. + + This field will be present in the JSON response if and only if `category` is + equal to `chargeback`. Contains the details specific to a Visa chargeback User + Submission for a Card Dispute. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Visa Card Dispute User Submission was created. + """ + + further_information_requested_at: Optional[datetime] = None + """ + The date and time at which Increase requested further information from the user + for the Visa Card Dispute. + """ + + further_information_requested_reason: Optional[str] = None + """ + The reason for Increase requesting further information from the user for the + Visa Card Dispute. + """ + + merchant_prearbitration_decline: Optional[VisaUserSubmissionMerchantPrearbitrationDecline] = None + """A Visa Card Dispute Merchant Pre-Arbitration Decline User Submission object. + + This field will be present in the JSON response if and only if `category` is + equal to `merchant_prearbitration_decline`. Contains the details specific to a + merchant prearbitration decline Visa Card Dispute User Submission. + """ + + status: Literal["abandoned", "accepted", "further_information_requested", "pending_reviewing"] + """The status of the Visa Card Dispute User Submission. + + - `abandoned` - The User Submission was abandoned. + - `accepted` - The User Submission was accepted. + - `further_information_requested` - Further information is requested, please + resubmit with the requested information. + - `pending_reviewing` - The User Submission is pending review. + """ + + updated_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Visa Card Dispute User Submission was updated. + """ + + user_prearbitration: Optional[VisaUserSubmissionUserPrearbitration] = None + """A Visa Card Dispute User-Initiated Pre-Arbitration User Submission object. + + This field will be present in the JSON response if and only if `category` is + equal to `user_prearbitration`. Contains the details specific to a + user-initiated pre-arbitration Visa Card Dispute User Submission. + """ + + +class Visa(BaseModel): + network_events: List[VisaNetworkEvent] + """The network events for the Card Dispute.""" + + required_user_submission_category: Optional[ + Literal["chargeback", "merchant_prearbitration_decline", "user_prearbitration"] + ] = None + """ + The category of the currently required user submission if the user wishes to + proceed with the dispute. Present if and only if status is + `user_submission_required`. Otherwise, this will be `nil`. + + - `chargeback` - A Chargeback User Submission is required. + - `merchant_prearbitration_decline` - A Merchant Pre Arbitration Decline User + Submission is required. + - `user_prearbitration` - A User Initiated Pre Arbitration User Submission is + required. + """ + + user_submissions: List[VisaUserSubmission] + """The user submissions for the Card Dispute.""" + + +class Win(BaseModel): + won_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was won. + """ + + +class CardDispute(BaseModel): + id: str + """The Card Dispute identifier.""" + + amount: int + """The amount of the dispute.""" + + card_id: str + """The Card that the Card Dispute is associated with.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Card Dispute was created. + """ + + disputed_transaction_id: str + """The identifier of the Transaction that was disputed.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + loss: Optional[Loss] = None + """ + If the Card Dispute's status is `lost`, this will contain details of the lost + dispute. + """ + + network: Literal["visa"] + """The network that the Card Dispute is associated with. + + - `visa` - Visa: details will be under the `visa` object. + """ + + status: Literal[ + "user_submission_required", + "pending_user_submission_reviewing", + "pending_user_submission_submitting", + "pending_user_withdrawal_submitting", + "pending_response", + "lost", + "won", + ] + """The status of the Card Dispute. + + - `user_submission_required` - A User Submission is required to continue with + the Card Dispute. + - `pending_user_submission_reviewing` - The most recent User Submission is being + reviewed. + - `pending_user_submission_submitting` - The most recent User Submission is + being submitted to the network. + - `pending_user_withdrawal_submitting` - The user's withdrawal of the Card + Dispute is being submitted to the network. + - `pending_response` - The Card Dispute is pending a response from the network. + - `lost` - The Card Dispute has been lost and funds previously credited from the + acceptance have been debited. + - `won` - The Card Dispute has been won and no further action can be taken. + """ + + type: Literal["card_dispute"] + """A constant representing the object's type. + + For this resource it will always be `card_dispute`. + """ + + user_submission_required_by: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the user submission is required by. Present only if status is + `user_submission_required` and a user submission is required by a certain time. + Otherwise, this will be `nil`. + """ + + visa: Optional[Visa] = None + """Card Dispute information for card payments processed over Visa's network. + + This field will be present in the JSON response if and only if `network` is + equal to `visa`. + """ + + win: Optional[Win] = None + """ + If the Card Dispute's status is `won`, this will contain details of the won + dispute. + """ diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py new file mode 100644 index 000000000..1f1cc43f7 --- /dev/null +++ b/src/increase/types/card_dispute_create_params.py @@ -0,0 +1,1314 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union, Iterable +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = [ + "CardDisputeCreateParams", + "AttachmentFile", + "Visa", + "VisaAuthorization", + "VisaConsumerCanceledMerchandise", + "VisaConsumerCanceledMerchandiseCardholderCancellation", + "VisaConsumerCanceledMerchandiseReturnAttempted", + "VisaConsumerCanceledMerchandiseReturned", + "VisaConsumerCanceledRecurringTransaction", + "VisaConsumerCanceledRecurringTransactionMerchantContactMethods", + "VisaConsumerCanceledServices", + "VisaConsumerCanceledServicesCardholderCancellation", + "VisaConsumerCanceledServicesGuaranteedReservation", + "VisaConsumerCounterfeitMerchandise", + "VisaConsumerCreditNotProcessed", + "VisaConsumerDamagedOrDefectiveMerchandise", + "VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted", + "VisaConsumerDamagedOrDefectiveMerchandiseReturned", + "VisaConsumerMerchandiseMisrepresentation", + "VisaConsumerMerchandiseMisrepresentationReturnAttempted", + "VisaConsumerMerchandiseMisrepresentationReturned", + "VisaConsumerMerchandiseNotAsDescribed", + "VisaConsumerMerchandiseNotAsDescribedReturnAttempted", + "VisaConsumerMerchandiseNotAsDescribedReturned", + "VisaConsumerMerchandiseNotReceived", + "VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaConsumerMerchandiseNotReceivedDelayed", + "VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted", + "VisaConsumerMerchandiseNotReceivedDelayedReturned", + "VisaConsumerMerchandiseNotReceivedDeliveredToWrongLocation", + "VisaConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaConsumerOriginalCreditTransactionNotAccepted", + "VisaConsumerQualityMerchandise", + "VisaConsumerQualityMerchandiseOngoingNegotiations", + "VisaConsumerQualityMerchandiseReturnAttempted", + "VisaConsumerQualityMerchandiseReturned", + "VisaConsumerQualityServices", + "VisaConsumerQualityServicesCardholderCancellation", + "VisaConsumerQualityServicesOngoingNegotiations", + "VisaConsumerServicesMisrepresentation", + "VisaConsumerServicesMisrepresentationCardholderCancellation", + "VisaConsumerServicesNotAsDescribed", + "VisaConsumerServicesNotAsDescribedCardholderCancellation", + "VisaConsumerServicesNotReceived", + "VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaConsumerServicesNotReceivedMerchantCancellation", + "VisaFraud", + "VisaProcessingError", + "VisaProcessingErrorDuplicateTransaction", + "VisaProcessingErrorIncorrectAmount", + "VisaProcessingErrorPaidByOtherMeans", +] + + +class CardDisputeCreateParams(TypedDict, total=False): + disputed_transaction_id: Required[str] + """The Transaction you wish to dispute. + + This Transaction must have a `source_type` of `card_settlement`. + """ + + network: Required[Literal["visa"]] + """The network of the disputed transaction. + + Details specific to the network are required under the sub-object with the same + identifier as the network. + + - `visa` - Visa + """ + + amount: int + """The monetary amount of the part of the transaction that is being disputed. + + This is optional and will default to the full amount of the transaction if not + provided. If provided, the amount must be less than or equal to the amount of + the transaction. + """ + + attachment_files: Iterable[AttachmentFile] + """The files to be attached to the initial dispute submission.""" + + visa: Visa + """The Visa-specific parameters for the dispute. + + Required if and only if `network` is `visa`. + """ + + +class AttachmentFile(TypedDict, total=False): + file_id: Required[str] + """The ID of the file to be attached. + + The file must have a `purpose` of `card_dispute_attachment`. + """ + + +class VisaAuthorization(TypedDict, total=False): + account_status: Required[Literal["account_closed", "credit_problem", "fraud"]] + """Account status. + + - `account_closed` - Account closed. + - `credit_problem` - Credit problem. + - `fraud` - Fraud. + """ + + +class VisaConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + canceled_prior_to_ship_date: Required[Literal["canceled_prior_to_ship_date", "not_canceled_prior_to_ship_date"]] + """Canceled prior to ship date. + + - `canceled_prior_to_ship_date` - Canceled prior to ship date. + - `not_canceled_prior_to_ship_date` - Not canceled prior to ship date. + """ + + cancellation_policy_provided: Required[Literal["not_provided", "provided"]] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: Required[str] + """Reason.""" + + +class VisaConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaConsumerCanceledMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaConsumerCanceledMerchandise(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_or_expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received or expected at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + cardholder_cancellation: VisaConsumerCanceledMerchandiseCardholderCancellation + """Cardholder cancellation.""" + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaConsumerCanceledMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerCanceledMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerCanceledRecurringTransactionMerchantContactMethods(TypedDict, total=False): + application_name: str + """Application name.""" + + call_center_phone_number: str + """Call center phone number.""" + + email_address: str + """Email address.""" + + in_person_address: str + """In person address.""" + + mailing_address: str + """Mailing address.""" + + text_phone_number: str + """Text phone number.""" + + +class VisaConsumerCanceledRecurringTransaction(TypedDict, total=False): + cancellation_target: Required[Literal["account", "transaction"]] + """Cancellation target. + + - `account` - Account. + - `transaction` - Transaction. + """ + + merchant_contact_methods: Required[VisaConsumerCanceledRecurringTransactionMerchantContactMethods] + """Merchant contact methods.""" + + transaction_or_account_canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Transaction or account canceled at.""" + + other_form_of_payment_explanation: str + """Other form of payment explanation.""" + + +class VisaConsumerCanceledServicesCardholderCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + cancellation_policy_provided: Required[Literal["not_provided", "provided"]] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: Required[str] + """Reason.""" + + +class VisaConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): + explanation: Required[ + Literal[ + "cardholder_canceled_prior_to_service", + "cardholder_cancellation_attempt_within_24_hours_of_confirmation", + "merchant_billed_no_show", + ] + ] + """Explanation. + + - `cardholder_canceled_prior_to_service` - Cardholder canceled prior to service. + - `cardholder_cancellation_attempt_within_24_hours_of_confirmation` - Cardholder + cancellation attempt within 24 hours of confirmation. + - `merchant_billed_no_show` - Merchant billed for no-show. + """ + + +class VisaConsumerCanceledServices(TypedDict, total=False): + cardholder_cancellation: Required[VisaConsumerCanceledServicesCardholderCancellation] + """Cardholder cancellation.""" + + contracted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Contracted at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_explanation: Required[str] + """Purchase explanation.""" + + service_type: Required[Literal["guaranteed_reservation", "other", "timeshare"]] + """Service type. + + - `guaranteed_reservation` - Guaranteed reservation. + - `other` - Other. + - `timeshare` - Timeshare. + """ + + guaranteed_reservation: VisaConsumerCanceledServicesGuaranteedReservation + """Guaranteed reservation explanation. + + Required if and only if `service_type` is `guaranteed_reservation`. + """ + + other: object + """Other service type explanation. + + Required if and only if `service_type` is `other`. + """ + + timeshare: object + """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" + + +class VisaConsumerCounterfeitMerchandise(TypedDict, total=False): + counterfeit_explanation: Required[str] + """Counterfeit explanation.""" + + disposition_explanation: Required[str] + """Disposition explanation.""" + + order_explanation: Required[str] + """Order explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaConsumerCreditNotProcessed(TypedDict, total=False): + canceled_or_returned_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Canceled or returned at.""" + + credit_expected_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Credit expected at.""" + + +class VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + order_and_issue_explanation: Required[str] + """Order and issue explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerDamagedOrDefectiveMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaConsumerMerchandiseMisrepresentationReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaConsumerMerchandiseMisrepresentation(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: Required[str] + """Misrepresentation explanation.""" + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaConsumerMerchandiseMisrepresentationReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerMerchandiseMisrepresentationReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaConsumerMerchandiseNotAsDescribed(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["returned", "return_attempted"]] + """Return outcome. + + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + return_attempted: VisaConsumerMerchandiseNotAsDescribedReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerMerchandiseNotAsDescribedReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + +class VisaConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, total=False): + merchant_received_return_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Merchant received return at.""" + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + +class VisaConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): + explanation: Required[str] + """Explanation.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerMerchandiseNotReceivedDelayedReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerMerchandiseNotReceivedDeliveredToWrongLocation(TypedDict, total=False): + agreed_location: Required[str] + """Agreed location.""" + + +class VisaConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + +class VisaConsumerMerchandiseNotReceived(TypedDict, total=False): + cancellation_outcome: Required[ + Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + delivery_issue: Required[Literal["delayed", "delivered_to_wrong_location"]] + """Delivery issue. + + - `delayed` - Delayed. + - `delivered_to_wrong_location` - Delivered to wrong location. + """ + + last_expected_receipt_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Last expected receipt at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_explanation: Required[str] + """Purchase information and explanation.""" + + cardholder_cancellation_prior_to_expected_receipt: ( + VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt + ) + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + delayed: VisaConsumerMerchandiseNotReceivedDelayed + """Delayed. Required if and only if `delivery_issue` is `delayed`.""" + + delivered_to_wrong_location: VisaConsumerMerchandiseNotReceivedDeliveredToWrongLocation + """Delivered to wrong location. + + Required if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + + merchant_cancellation: VisaConsumerMerchandiseNotReceivedMerchantCancellation + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + no_cancellation: object + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + + +class VisaConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): + explanation: Required[str] + """Explanation.""" + + reason: Required[Literal["prohibited_by_local_laws_or_regulation", "recipient_refused"]] + """Reason. + + - `prohibited_by_local_laws_or_regulation` - Prohibited by local laws or + regulation. + - `recipient_refused` - Recipient refused. + """ + + +class VisaConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): + explanation: Required[str] + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Started at.""" + + +class VisaConsumerQualityMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaConsumerQualityMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaConsumerQualityMerchandise(TypedDict, total=False): + expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Expected at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_quality_issue: Required[str] + """Purchase information and quality issue.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + ongoing_negotiations: VisaConsumerQualityMerchandiseOngoingNegotiations + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + return_attempted: VisaConsumerQualityMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaConsumerQualityMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaConsumerQualityServicesCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaConsumerQualityServicesOngoingNegotiations(TypedDict, total=False): + explanation: Required[str] + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Started at.""" + + +class VisaConsumerQualityServices(TypedDict, total=False): + cardholder_cancellation: Required[VisaConsumerQualityServicesCardholderCancellation] + """Cardholder cancellation.""" + + non_fiat_currency_or_non_fungible_token_related_and_not_matching_description: Required[ + Literal["not_related", "related"] + ] + """Non-fiat currency or non-fungible token related and not matching description. + + - `not_related` - Not related. + - `related` - Related. + """ + + purchase_info_and_quality_issue: Required[str] + """Purchase information and quality issue.""" + + services_received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Services received at.""" + + cardholder_paid_to_have_work_redone: Literal["did_not_pay_to_have_work_redone", "paid_to_have_work_redone"] + """Cardholder paid to have work redone. + + - `did_not_pay_to_have_work_redone` - Cardholder did not pay to have work + redone. + - `paid_to_have_work_redone` - Cardholder paid to have work redone. + """ + + ongoing_negotiations: VisaConsumerQualityServicesOngoingNegotiations + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + restaurant_food_related: Literal["not_related", "related"] + """ + Whether the dispute is related to the quality of food from an eating place or + restaurant. Must be provided when Merchant Category Code (MCC) is 5812, 5813 + or 5814. + + - `not_related` - Not related. + - `related` - Related. + """ + + +class VisaConsumerServicesMisrepresentationCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaConsumerServicesMisrepresentation(TypedDict, total=False): + cardholder_cancellation: Required[VisaConsumerServicesMisrepresentationCardholderCancellation] + """Cardholder cancellation.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: Required[str] + """Misrepresentation explanation.""" + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaConsumerServicesNotAsDescribedCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaConsumerServicesNotAsDescribed(TypedDict, total=False): + cardholder_cancellation: Required[VisaConsumerServicesNotAsDescribedCardholderCancellation] + """Cardholder cancellation.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaConsumerServicesNotReceivedMerchantCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + +class VisaConsumerServicesNotReceived(TypedDict, total=False): + cancellation_outcome: Required[ + Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + last_expected_receipt_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Last expected receipt at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_explanation: Required[str] + """Purchase information and explanation.""" + + cardholder_cancellation_prior_to_expected_receipt: ( + VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt + ) + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + merchant_cancellation: VisaConsumerServicesNotReceivedMerchantCancellation + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + no_cancellation: object + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + + +class VisaFraud(TypedDict, total=False): + fraud_type: Required[ + Literal[ + "account_or_credentials_takeover", + "card_not_received_as_issued", + "fraudulent_application", + "fraudulent_use_of_account_number", + "incorrect_processing", + "issuer_reported_counterfeit", + "lost", + "manipulation_of_account_holder", + "merchant_misrepresentation", + "miscellaneous", + "stolen", + ] + ] + """Fraud type. + + - `account_or_credentials_takeover` - Account or credentials takeover. + - `card_not_received_as_issued` - Card not received as issued. + - `fraudulent_application` - Fraudulent application. + - `fraudulent_use_of_account_number` - Fraudulent use of account number. + - `incorrect_processing` - Incorrect processing. + - `issuer_reported_counterfeit` - Issuer reported counterfeit. + - `lost` - Lost. + - `manipulation_of_account_holder` - Manipulation of account holder. + - `merchant_misrepresentation` - Merchant misrepresentation. + - `miscellaneous` - Miscellaneous. + - `stolen` - Stolen. + """ + + +class VisaProcessingErrorDuplicateTransaction(TypedDict, total=False): + other_transaction_id: Required[str] + """Other transaction ID.""" + + +class VisaProcessingErrorIncorrectAmount(TypedDict, total=False): + expected_amount: Required[int] + """Expected amount.""" + + +class VisaProcessingErrorPaidByOtherMeans(TypedDict, total=False): + other_form_of_payment_evidence: Required[ + Literal["canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher"] + ] + """Other form of payment evidence. + + - `canceled_check` - Canceled check. + - `card_transaction` - Card transaction. + - `cash_receipt` - Cash receipt. + - `other` - Other. + - `statement` - Statement. + - `voucher` - Voucher. + """ + + other_transaction_id: str + """Other transaction ID.""" + + +class VisaProcessingError(TypedDict, total=False): + error_reason: Required[Literal["duplicate_transaction", "incorrect_amount", "paid_by_other_means"]] + """Error reason. + + - `duplicate_transaction` - Duplicate transaction. + - `incorrect_amount` - Incorrect amount. + - `paid_by_other_means` - Paid by other means. + """ + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + duplicate_transaction: VisaProcessingErrorDuplicateTransaction + """Duplicate transaction. + + Required if and only if `error_reason` is `duplicate_transaction`. + """ + + incorrect_amount: VisaProcessingErrorIncorrectAmount + """Incorrect amount. Required if and only if `error_reason` is `incorrect_amount`.""" + + paid_by_other_means: VisaProcessingErrorPaidByOtherMeans + """Paid by other means. + + Required if and only if `error_reason` is `paid_by_other_means`. + """ + + +class Visa(TypedDict, total=False): + category: Required[ + Literal[ + "authorization", + "consumer_canceled_merchandise", + "consumer_canceled_recurring_transaction", + "consumer_canceled_services", + "consumer_counterfeit_merchandise", + "consumer_credit_not_processed", + "consumer_damaged_or_defective_merchandise", + "consumer_merchandise_misrepresentation", + "consumer_merchandise_not_as_described", + "consumer_merchandise_not_received", + "consumer_non_receipt_of_cash", + "consumer_original_credit_transaction_not_accepted", + "consumer_quality_merchandise", + "consumer_quality_services", + "consumer_services_misrepresentation", + "consumer_services_not_as_described", + "consumer_services_not_received", + "fraud", + "processing_error", + ] + ] + """Category. + + - `authorization` - Authorization. + - `consumer_canceled_merchandise` - Consumer: canceled merchandise. + - `consumer_canceled_recurring_transaction` - Consumer: canceled recurring + transaction. + - `consumer_canceled_services` - Consumer: canceled services. + - `consumer_counterfeit_merchandise` - Consumer: counterfeit merchandise. + - `consumer_credit_not_processed` - Consumer: credit not processed. + - `consumer_damaged_or_defective_merchandise` - Consumer: damaged or defective + merchandise. + - `consumer_merchandise_misrepresentation` - Consumer: merchandise + misrepresentation. + - `consumer_merchandise_not_as_described` - Consumer: merchandise not as + described. + - `consumer_merchandise_not_received` - Consumer: merchandise not received. + - `consumer_non_receipt_of_cash` - Consumer: non-receipt of cash. + - `consumer_original_credit_transaction_not_accepted` - Consumer: Original + Credit Transaction (OCT) not accepted. + - `consumer_quality_merchandise` - Consumer: merchandise quality issue. + - `consumer_quality_services` - Consumer: services quality issue. + - `consumer_services_misrepresentation` - Consumer: services misrepresentation. + - `consumer_services_not_as_described` - Consumer: services not as described. + - `consumer_services_not_received` - Consumer: services not received. + - `fraud` - Fraud. + - `processing_error` - Processing error. + """ + + authorization: VisaAuthorization + """Authorization. Required if and only if `category` is `authorization`.""" + + consumer_canceled_merchandise: VisaConsumerCanceledMerchandise + """Canceled merchandise. + + Required if and only if `category` is `consumer_canceled_merchandise`. + """ + + consumer_canceled_recurring_transaction: VisaConsumerCanceledRecurringTransaction + """Canceled recurring transaction. + + Required if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + + consumer_canceled_services: VisaConsumerCanceledServices + """Canceled services. + + Required if and only if `category` is `consumer_canceled_services`. + """ + + consumer_counterfeit_merchandise: VisaConsumerCounterfeitMerchandise + """Counterfeit merchandise. + + Required if and only if `category` is `consumer_counterfeit_merchandise`. + """ + + consumer_credit_not_processed: VisaConsumerCreditNotProcessed + """Credit not processed. + + Required if and only if `category` is `consumer_credit_not_processed`. + """ + + consumer_damaged_or_defective_merchandise: VisaConsumerDamagedOrDefectiveMerchandise + """Damaged or defective merchandise. + + Required if and only if `category` is + `consumer_damaged_or_defective_merchandise`. + """ + + consumer_merchandise_misrepresentation: VisaConsumerMerchandiseMisrepresentation + """Merchandise misrepresentation. + + Required if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + + consumer_merchandise_not_as_described: VisaConsumerMerchandiseNotAsDescribed + """Merchandise not as described. + + Required if and only if `category` is `consumer_merchandise_not_as_described`. + """ + + consumer_merchandise_not_received: VisaConsumerMerchandiseNotReceived + """Merchandise not received. + + Required if and only if `category` is `consumer_merchandise_not_received`. + """ + + consumer_non_receipt_of_cash: object + """Non-receipt of cash. + + Required if and only if `category` is `consumer_non_receipt_of_cash`. + """ + + consumer_original_credit_transaction_not_accepted: VisaConsumerOriginalCreditTransactionNotAccepted + """Original Credit Transaction (OCT) not accepted. + + Required if and only if `category` is + `consumer_original_credit_transaction_not_accepted`. + """ + + consumer_quality_merchandise: VisaConsumerQualityMerchandise + """Merchandise quality issue. + + Required if and only if `category` is `consumer_quality_merchandise`. + """ + + consumer_quality_services: VisaConsumerQualityServices + """Services quality issue. + + Required if and only if `category` is `consumer_quality_services`. + """ + + consumer_services_misrepresentation: VisaConsumerServicesMisrepresentation + """Services misrepresentation. + + Required if and only if `category` is `consumer_services_misrepresentation`. + """ + + consumer_services_not_as_described: VisaConsumerServicesNotAsDescribed + """Services not as described. + + Required if and only if `category` is `consumer_services_not_as_described`. + """ + + consumer_services_not_received: VisaConsumerServicesNotReceived + """Services not received. + + Required if and only if `category` is `consumer_services_not_received`. + """ + + fraud: VisaFraud + """Fraud. Required if and only if `category` is `fraud`.""" + + processing_error: VisaProcessingError + """Processing error. Required if and only if `category` is `processing_error`.""" diff --git a/src/increase/types/card_dispute_list_params.py b/src/increase/types/card_dispute_list_params.py new file mode 100644 index 000000000..18cf4ff8d --- /dev/null +++ b/src/increase/types/card_dispute_list_params.py @@ -0,0 +1,83 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["CardDisputeListParams", "CreatedAt", "Status"] + + +class CardDisputeListParams(TypedDict, total=False): + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "user_submission_required", + "pending_user_submission_reviewing", + "pending_user_submission_submitting", + "pending_user_withdrawal_submitting", + "pending_response", + "lost", + "won", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/card_dispute_submit_user_submission_params.py b/src/increase/types/card_dispute_submit_user_submission_params.py new file mode 100644 index 000000000..68927cb2f --- /dev/null +++ b/src/increase/types/card_dispute_submit_user_submission_params.py @@ -0,0 +1,1415 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union, Iterable +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = [ + "CardDisputeSubmitUserSubmissionParams", + "AttachmentFile", + "Visa", + "VisaChargeback", + "VisaChargebackAuthorization", + "VisaChargebackConsumerCanceledMerchandise", + "VisaChargebackConsumerCanceledMerchandiseCardholderCancellation", + "VisaChargebackConsumerCanceledMerchandiseReturnAttempted", + "VisaChargebackConsumerCanceledMerchandiseReturned", + "VisaChargebackConsumerCanceledRecurringTransaction", + "VisaChargebackConsumerCanceledRecurringTransactionMerchantContactMethods", + "VisaChargebackConsumerCanceledServices", + "VisaChargebackConsumerCanceledServicesCardholderCancellation", + "VisaChargebackConsumerCanceledServicesGuaranteedReservation", + "VisaChargebackConsumerCounterfeitMerchandise", + "VisaChargebackConsumerCreditNotProcessed", + "VisaChargebackConsumerDamagedOrDefectiveMerchandise", + "VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted", + "VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned", + "VisaChargebackConsumerMerchandiseMisrepresentation", + "VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted", + "VisaChargebackConsumerMerchandiseMisrepresentationReturned", + "VisaChargebackConsumerMerchandiseNotAsDescribed", + "VisaChargebackConsumerMerchandiseNotAsDescribedReturnAttempted", + "VisaChargebackConsumerMerchandiseNotAsDescribedReturned", + "VisaChargebackConsumerMerchandiseNotReceived", + "VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaChargebackConsumerMerchandiseNotReceivedDelayed", + "VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted", + "VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned", + "VisaChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", + "VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaChargebackConsumerOriginalCreditTransactionNotAccepted", + "VisaChargebackConsumerQualityMerchandise", + "VisaChargebackConsumerQualityMerchandiseOngoingNegotiations", + "VisaChargebackConsumerQualityMerchandiseReturnAttempted", + "VisaChargebackConsumerQualityMerchandiseReturned", + "VisaChargebackConsumerQualityServices", + "VisaChargebackConsumerQualityServicesCardholderCancellation", + "VisaChargebackConsumerQualityServicesOngoingNegotiations", + "VisaChargebackConsumerServicesMisrepresentation", + "VisaChargebackConsumerServicesMisrepresentationCardholderCancellation", + "VisaChargebackConsumerServicesNotAsDescribed", + "VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation", + "VisaChargebackConsumerServicesNotReceived", + "VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", + "VisaChargebackConsumerServicesNotReceivedMerchantCancellation", + "VisaChargebackFraud", + "VisaChargebackProcessingError", + "VisaChargebackProcessingErrorDuplicateTransaction", + "VisaChargebackProcessingErrorIncorrectAmount", + "VisaChargebackProcessingErrorPaidByOtherMeans", + "VisaMerchantPrearbitrationDecline", + "VisaUserPrearbitration", + "VisaUserPrearbitrationCategoryChange", +] + + +class CardDisputeSubmitUserSubmissionParams(TypedDict, total=False): + network: Required[Literal["visa"]] + """The network of the Card Dispute. + + Details specific to the network are required under the sub-object with the same + identifier as the network. + + - `visa` - Visa + """ + + amount: int + """ + The adjusted monetary amount of the part of the transaction that is being + disputed. This is optional and will default to the most recent amount provided. + If provided, the amount must be less than or equal to the amount of the + transaction. + """ + + attachment_files: Iterable[AttachmentFile] + """The files to be attached to the user submission.""" + + visa: Visa + """The Visa-specific parameters for the dispute. + + Required if and only if `network` is `visa`. + """ + + +class AttachmentFile(TypedDict, total=False): + file_id: Required[str] + """The ID of the file to be attached. + + The file must have a `purpose` of `card_dispute_attachment`. + """ + + +class VisaChargebackAuthorization(TypedDict, total=False): + account_status: Required[Literal["account_closed", "credit_problem", "fraud"]] + """Account status. + + - `account_closed` - Account closed. + - `credit_problem` - Credit problem. + - `fraud` - Fraud. + """ + + +class VisaChargebackConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + canceled_prior_to_ship_date: Required[Literal["canceled_prior_to_ship_date", "not_canceled_prior_to_ship_date"]] + """Canceled prior to ship date. + + - `canceled_prior_to_ship_date` - Canceled prior to ship date. + - `not_canceled_prior_to_ship_date` - Not canceled prior to ship date. + """ + + cancellation_policy_provided: Required[Literal["not_provided", "provided"]] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: Required[str] + """Reason.""" + + +class VisaChargebackConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaChargebackConsumerCanceledMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaChargebackConsumerCanceledMerchandise(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_or_expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received or expected at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + cardholder_cancellation: VisaChargebackConsumerCanceledMerchandiseCardholderCancellation + """Cardholder cancellation.""" + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaChargebackConsumerCanceledMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerCanceledMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerCanceledRecurringTransactionMerchantContactMethods(TypedDict, total=False): + application_name: str + """Application name.""" + + call_center_phone_number: str + """Call center phone number.""" + + email_address: str + """Email address.""" + + in_person_address: str + """In person address.""" + + mailing_address: str + """Mailing address.""" + + text_phone_number: str + """Text phone number.""" + + +class VisaChargebackConsumerCanceledRecurringTransaction(TypedDict, total=False): + cancellation_target: Required[Literal["account", "transaction"]] + """Cancellation target. + + - `account` - Account. + - `transaction` - Transaction. + """ + + merchant_contact_methods: Required[VisaChargebackConsumerCanceledRecurringTransactionMerchantContactMethods] + """Merchant contact methods.""" + + transaction_or_account_canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Transaction or account canceled at.""" + + other_form_of_payment_explanation: str + """Other form of payment explanation.""" + + +class VisaChargebackConsumerCanceledServicesCardholderCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + cancellation_policy_provided: Required[Literal["not_provided", "provided"]] + """Cancellation policy provided. + + - `not_provided` - Not provided. + - `provided` - Provided. + """ + + reason: Required[str] + """Reason.""" + + +class VisaChargebackConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): + explanation: Required[ + Literal[ + "cardholder_canceled_prior_to_service", + "cardholder_cancellation_attempt_within_24_hours_of_confirmation", + "merchant_billed_no_show", + ] + ] + """Explanation. + + - `cardholder_canceled_prior_to_service` - Cardholder canceled prior to service. + - `cardholder_cancellation_attempt_within_24_hours_of_confirmation` - Cardholder + cancellation attempt within 24 hours of confirmation. + - `merchant_billed_no_show` - Merchant billed for no-show. + """ + + +class VisaChargebackConsumerCanceledServices(TypedDict, total=False): + cardholder_cancellation: Required[VisaChargebackConsumerCanceledServicesCardholderCancellation] + """Cardholder cancellation.""" + + contracted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Contracted at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_explanation: Required[str] + """Purchase explanation.""" + + service_type: Required[Literal["guaranteed_reservation", "other", "timeshare"]] + """Service type. + + - `guaranteed_reservation` - Guaranteed reservation. + - `other` - Other. + - `timeshare` - Timeshare. + """ + + guaranteed_reservation: VisaChargebackConsumerCanceledServicesGuaranteedReservation + """Guaranteed reservation explanation. + + Required if and only if `service_type` is `guaranteed_reservation`. + """ + + other: object + """Other service type explanation. + + Required if and only if `service_type` is `other`. + """ + + timeshare: object + """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" + + +class VisaChargebackConsumerCounterfeitMerchandise(TypedDict, total=False): + counterfeit_explanation: Required[str] + """Counterfeit explanation.""" + + disposition_explanation: Required[str] + """Disposition explanation.""" + + order_explanation: Required[str] + """Order explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaChargebackConsumerCreditNotProcessed(TypedDict, total=False): + canceled_or_returned_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Canceled or returned at.""" + + credit_expected_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Credit expected at.""" + + +class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaChargebackConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + order_and_issue_explanation: Required[str] + """Order and issue explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaChargebackConsumerMerchandiseMisrepresentationReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaChargebackConsumerMerchandiseMisrepresentation(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: Required[str] + """Misrepresentation explanation.""" + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerMerchandiseMisrepresentationReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaChargebackConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaChargebackConsumerMerchandiseNotAsDescribed(TypedDict, total=False): + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["returned", "return_attempted"]] + """Return outcome. + + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + return_attempted: VisaChargebackConsumerMerchandiseNotAsDescribedReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerMerchandiseNotAsDescribedReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, total=False): + merchant_received_return_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Merchant received return at.""" + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): + explanation: Required[str] + """Explanation.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + return_attempted: VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation(TypedDict, total=False): + agreed_location: Required[str] + """Agreed location.""" + + +class VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + +class VisaChargebackConsumerMerchandiseNotReceived(TypedDict, total=False): + cancellation_outcome: Required[ + Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + delivery_issue: Required[Literal["delayed", "delivered_to_wrong_location"]] + """Delivery issue. + + - `delayed` - Delayed. + - `delivered_to_wrong_location` - Delivered to wrong location. + """ + + last_expected_receipt_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Last expected receipt at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_explanation: Required[str] + """Purchase information and explanation.""" + + cardholder_cancellation_prior_to_expected_receipt: ( + VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt + ) + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + delayed: VisaChargebackConsumerMerchandiseNotReceivedDelayed + """Delayed. Required if and only if `delivery_issue` is `delayed`.""" + + delivered_to_wrong_location: VisaChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation + """Delivered to wrong location. + + Required if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + + merchant_cancellation: VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + no_cancellation: object + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + + +class VisaChargebackConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): + explanation: Required[str] + """Explanation.""" + + reason: Required[Literal["prohibited_by_local_laws_or_regulation", "recipient_refused"]] + """Reason. + + - `prohibited_by_local_laws_or_regulation` - Prohibited by local laws or + regulation. + - `recipient_refused` - Recipient refused. + """ + + +class VisaChargebackConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): + explanation: Required[str] + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Started at.""" + + +class VisaChargebackConsumerQualityMerchandiseReturnAttempted(TypedDict, total=False): + attempt_explanation: Required[str] + """Attempt explanation.""" + + attempt_reason: Required[ + Literal[ + "merchant_not_responding", + "no_return_authorization_provided", + "no_return_instructions", + "requested_not_to_return", + "return_not_accepted", + ] + ] + """Attempt reason. + + - `merchant_not_responding` - Merchant not responding. + - `no_return_authorization_provided` - No return authorization provided. + - `no_return_instructions` - No return instructions. + - `requested_not_to_return` - Requested not to return. + - `return_not_accepted` - Return not accepted. + """ + + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Attempted at.""" + + merchandise_disposition: Required[str] + """Merchandise disposition.""" + + +class VisaChargebackConsumerQualityMerchandiseReturned(TypedDict, total=False): + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] + """Return method. + + - `dhl` - DHL. + - `face_to_face` - Face-to-face. + - `fedex` - FedEx. + - `other` - Other. + - `postal_service` - Postal service. + - `ups` - UPS. + """ + + returned_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Returned at.""" + + merchant_received_return_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Merchant received return at.""" + + other_explanation: str + """Other explanation. Required if and only if the return method is `other`.""" + + tracking_number: str + """Tracking number.""" + + +class VisaChargebackConsumerQualityMerchandise(TypedDict, total=False): + expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Expected at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_quality_issue: Required[str] + """Purchase information and quality issue.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + return_outcome: Required[Literal["not_returned", "returned", "return_attempted"]] + """Return outcome. + + - `not_returned` - Not returned. + - `returned` - Returned. + - `return_attempted` - Return attempted. + """ + + not_returned: object + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + + ongoing_negotiations: VisaChargebackConsumerQualityMerchandiseOngoingNegotiations + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + return_attempted: VisaChargebackConsumerQualityMerchandiseReturnAttempted + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + + returned: VisaChargebackConsumerQualityMerchandiseReturned + """Returned. Required if and only if `return_outcome` is `returned`.""" + + +class VisaChargebackConsumerQualityServicesCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaChargebackConsumerQualityServicesOngoingNegotiations(TypedDict, total=False): + explanation: Required[str] + """ + Explanation of the previous ongoing negotiations between the cardholder and + merchant. + """ + + issuer_first_notified_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Date the cardholder first notified the issuer of the dispute.""" + + started_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Started at.""" + + +class VisaChargebackConsumerQualityServices(TypedDict, total=False): + cardholder_cancellation: Required[VisaChargebackConsumerQualityServicesCardholderCancellation] + """Cardholder cancellation.""" + + non_fiat_currency_or_non_fungible_token_related_and_not_matching_description: Required[ + Literal["not_related", "related"] + ] + """Non-fiat currency or non-fungible token related and not matching description. + + - `not_related` - Not related. + - `related` - Related. + """ + + purchase_info_and_quality_issue: Required[str] + """Purchase information and quality issue.""" + + services_received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Services received at.""" + + cardholder_paid_to_have_work_redone: Literal["did_not_pay_to_have_work_redone", "paid_to_have_work_redone"] + """Cardholder paid to have work redone. + + - `did_not_pay_to_have_work_redone` - Cardholder did not pay to have work + redone. + - `paid_to_have_work_redone` - Cardholder paid to have work redone. + """ + + ongoing_negotiations: VisaChargebackConsumerQualityServicesOngoingNegotiations + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + + restaurant_food_related: Literal["not_related", "related"] + """ + Whether the dispute is related to the quality of food from an eating place or + restaurant. Must be provided when Merchant Category Code (MCC) is 5812, 5813 + or 5814. + + - `not_related` - Not related. + - `related` - Related. + """ + + +class VisaChargebackConsumerServicesMisrepresentationCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaChargebackConsumerServicesMisrepresentation(TypedDict, total=False): + cardholder_cancellation: Required[VisaChargebackConsumerServicesMisrepresentationCardholderCancellation] + """Cardholder cancellation.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + misrepresentation_explanation: Required[str] + """Misrepresentation explanation.""" + + purchase_explanation: Required[str] + """Purchase explanation.""" + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation(TypedDict, total=False): + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] + """Accepted by merchant. + + - `accepted` - Accepted. + - `not_accepted` - Not accepted. + """ + + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: Required[str] + """Reason.""" + + +class VisaChargebackConsumerServicesNotAsDescribed(TypedDict, total=False): + cardholder_cancellation: Required[VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation] + """Cardholder cancellation.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + received_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Received at.""" + + +class VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + reason: str + """Reason.""" + + +class VisaChargebackConsumerServicesNotReceivedMerchantCancellation(TypedDict, total=False): + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Canceled at.""" + + +class VisaChargebackConsumerServicesNotReceived(TypedDict, total=False): + cancellation_outcome: Required[ + Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] + ] + """Cancellation outcome. + + - `cardholder_cancellation_prior_to_expected_receipt` - Cardholder cancellation + prior to expected receipt. + - `merchant_cancellation` - Merchant cancellation. + - `no_cancellation` - No cancellation. + """ + + last_expected_receipt_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """Last expected receipt at.""" + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + purchase_info_and_explanation: Required[str] + """Purchase information and explanation.""" + + cardholder_cancellation_prior_to_expected_receipt: ( + VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt + ) + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is + `cardholder_cancellation_prior_to_expected_receipt`. + """ + + merchant_cancellation: VisaChargebackConsumerServicesNotReceivedMerchantCancellation + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + + no_cancellation: object + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + + +class VisaChargebackFraud(TypedDict, total=False): + fraud_type: Required[ + Literal[ + "account_or_credentials_takeover", + "card_not_received_as_issued", + "fraudulent_application", + "fraudulent_use_of_account_number", + "incorrect_processing", + "issuer_reported_counterfeit", + "lost", + "manipulation_of_account_holder", + "merchant_misrepresentation", + "miscellaneous", + "stolen", + ] + ] + """Fraud type. + + - `account_or_credentials_takeover` - Account or credentials takeover. + - `card_not_received_as_issued` - Card not received as issued. + - `fraudulent_application` - Fraudulent application. + - `fraudulent_use_of_account_number` - Fraudulent use of account number. + - `incorrect_processing` - Incorrect processing. + - `issuer_reported_counterfeit` - Issuer reported counterfeit. + - `lost` - Lost. + - `manipulation_of_account_holder` - Manipulation of account holder. + - `merchant_misrepresentation` - Merchant misrepresentation. + - `miscellaneous` - Miscellaneous. + - `stolen` - Stolen. + """ + + +class VisaChargebackProcessingErrorDuplicateTransaction(TypedDict, total=False): + other_transaction_id: Required[str] + """Other transaction ID.""" + + +class VisaChargebackProcessingErrorIncorrectAmount(TypedDict, total=False): + expected_amount: Required[int] + """Expected amount.""" + + +class VisaChargebackProcessingErrorPaidByOtherMeans(TypedDict, total=False): + other_form_of_payment_evidence: Required[ + Literal["canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher"] + ] + """Other form of payment evidence. + + - `canceled_check` - Canceled check. + - `card_transaction` - Card transaction. + - `cash_receipt` - Cash receipt. + - `other` - Other. + - `statement` - Statement. + - `voucher` - Voucher. + """ + + other_transaction_id: str + """Other transaction ID.""" + + +class VisaChargebackProcessingError(TypedDict, total=False): + error_reason: Required[Literal["duplicate_transaction", "incorrect_amount", "paid_by_other_means"]] + """Error reason. + + - `duplicate_transaction` - Duplicate transaction. + - `incorrect_amount` - Incorrect amount. + - `paid_by_other_means` - Paid by other means. + """ + + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] + """Merchant resolution attempted. + + - `attempted` - Attempted. + - `prohibited_by_local_law` - Prohibited by local law. + """ + + duplicate_transaction: VisaChargebackProcessingErrorDuplicateTransaction + """Duplicate transaction. + + Required if and only if `error_reason` is `duplicate_transaction`. + """ + + incorrect_amount: VisaChargebackProcessingErrorIncorrectAmount + """Incorrect amount. Required if and only if `error_reason` is `incorrect_amount`.""" + + paid_by_other_means: VisaChargebackProcessingErrorPaidByOtherMeans + """Paid by other means. + + Required if and only if `error_reason` is `paid_by_other_means`. + """ + + +class VisaChargeback(TypedDict, total=False): + category: Required[ + Literal[ + "authorization", + "consumer_canceled_merchandise", + "consumer_canceled_recurring_transaction", + "consumer_canceled_services", + "consumer_counterfeit_merchandise", + "consumer_credit_not_processed", + "consumer_damaged_or_defective_merchandise", + "consumer_merchandise_misrepresentation", + "consumer_merchandise_not_as_described", + "consumer_merchandise_not_received", + "consumer_non_receipt_of_cash", + "consumer_original_credit_transaction_not_accepted", + "consumer_quality_merchandise", + "consumer_quality_services", + "consumer_services_misrepresentation", + "consumer_services_not_as_described", + "consumer_services_not_received", + "fraud", + "processing_error", + ] + ] + """Category. + + - `authorization` - Authorization. + - `consumer_canceled_merchandise` - Consumer: canceled merchandise. + - `consumer_canceled_recurring_transaction` - Consumer: canceled recurring + transaction. + - `consumer_canceled_services` - Consumer: canceled services. + - `consumer_counterfeit_merchandise` - Consumer: counterfeit merchandise. + - `consumer_credit_not_processed` - Consumer: credit not processed. + - `consumer_damaged_or_defective_merchandise` - Consumer: damaged or defective + merchandise. + - `consumer_merchandise_misrepresentation` - Consumer: merchandise + misrepresentation. + - `consumer_merchandise_not_as_described` - Consumer: merchandise not as + described. + - `consumer_merchandise_not_received` - Consumer: merchandise not received. + - `consumer_non_receipt_of_cash` - Consumer: non-receipt of cash. + - `consumer_original_credit_transaction_not_accepted` - Consumer: Original + Credit Transaction (OCT) not accepted. + - `consumer_quality_merchandise` - Consumer: merchandise quality issue. + - `consumer_quality_services` - Consumer: services quality issue. + - `consumer_services_misrepresentation` - Consumer: services misrepresentation. + - `consumer_services_not_as_described` - Consumer: services not as described. + - `consumer_services_not_received` - Consumer: services not received. + - `fraud` - Fraud. + - `processing_error` - Processing error. + """ + + authorization: VisaChargebackAuthorization + """Authorization. Required if and only if `category` is `authorization`.""" + + consumer_canceled_merchandise: VisaChargebackConsumerCanceledMerchandise + """Canceled merchandise. + + Required if and only if `category` is `consumer_canceled_merchandise`. + """ + + consumer_canceled_recurring_transaction: VisaChargebackConsumerCanceledRecurringTransaction + """Canceled recurring transaction. + + Required if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + + consumer_canceled_services: VisaChargebackConsumerCanceledServices + """Canceled services. + + Required if and only if `category` is `consumer_canceled_services`. + """ + + consumer_counterfeit_merchandise: VisaChargebackConsumerCounterfeitMerchandise + """Counterfeit merchandise. + + Required if and only if `category` is `consumer_counterfeit_merchandise`. + """ + + consumer_credit_not_processed: VisaChargebackConsumerCreditNotProcessed + """Credit not processed. + + Required if and only if `category` is `consumer_credit_not_processed`. + """ + + consumer_damaged_or_defective_merchandise: VisaChargebackConsumerDamagedOrDefectiveMerchandise + """Damaged or defective merchandise. + + Required if and only if `category` is + `consumer_damaged_or_defective_merchandise`. + """ + + consumer_merchandise_misrepresentation: VisaChargebackConsumerMerchandiseMisrepresentation + """Merchandise misrepresentation. + + Required if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + + consumer_merchandise_not_as_described: VisaChargebackConsumerMerchandiseNotAsDescribed + """Merchandise not as described. + + Required if and only if `category` is `consumer_merchandise_not_as_described`. + """ + + consumer_merchandise_not_received: VisaChargebackConsumerMerchandiseNotReceived + """Merchandise not received. + + Required if and only if `category` is `consumer_merchandise_not_received`. + """ + + consumer_non_receipt_of_cash: object + """Non-receipt of cash. + + Required if and only if `category` is `consumer_non_receipt_of_cash`. + """ + + consumer_original_credit_transaction_not_accepted: VisaChargebackConsumerOriginalCreditTransactionNotAccepted + """Original Credit Transaction (OCT) not accepted. + + Required if and only if `category` is + `consumer_original_credit_transaction_not_accepted`. + """ + + consumer_quality_merchandise: VisaChargebackConsumerQualityMerchandise + """Merchandise quality issue. + + Required if and only if `category` is `consumer_quality_merchandise`. + """ + + consumer_quality_services: VisaChargebackConsumerQualityServices + """Services quality issue. + + Required if and only if `category` is `consumer_quality_services`. + """ + + consumer_services_misrepresentation: VisaChargebackConsumerServicesMisrepresentation + """Services misrepresentation. + + Required if and only if `category` is `consumer_services_misrepresentation`. + """ + + consumer_services_not_as_described: VisaChargebackConsumerServicesNotAsDescribed + """Services not as described. + + Required if and only if `category` is `consumer_services_not_as_described`. + """ + + consumer_services_not_received: VisaChargebackConsumerServicesNotReceived + """Services not received. + + Required if and only if `category` is `consumer_services_not_received`. + """ + + fraud: VisaChargebackFraud + """Fraud. Required if and only if `category` is `fraud`.""" + + processing_error: VisaChargebackProcessingError + """Processing error. Required if and only if `category` is `processing_error`.""" + + +class VisaMerchantPrearbitrationDecline(TypedDict, total=False): + reason: Required[str] + """The reason for declining the merchant's pre-arbitration request.""" + + +class VisaUserPrearbitrationCategoryChange(TypedDict, total=False): + category: Required[ + Literal[ + "authorization", + "consumer_canceled_merchandise", + "consumer_canceled_recurring_transaction", + "consumer_canceled_services", + "consumer_counterfeit_merchandise", + "consumer_credit_not_processed", + "consumer_damaged_or_defective_merchandise", + "consumer_merchandise_misrepresentation", + "consumer_merchandise_not_as_described", + "consumer_merchandise_not_received", + "consumer_non_receipt_of_cash", + "consumer_original_credit_transaction_not_accepted", + "consumer_quality_merchandise", + "consumer_quality_services", + "consumer_services_misrepresentation", + "consumer_services_not_as_described", + "consumer_services_not_received", + "fraud", + "processing_error", + ] + ] + """ + - `authorization` - Authorization. + - `consumer_canceled_merchandise` - Consumer: canceled merchandise. + - `consumer_canceled_recurring_transaction` - Consumer: canceled recurring + transaction. + - `consumer_canceled_services` - Consumer: canceled services. + - `consumer_counterfeit_merchandise` - Consumer: counterfeit merchandise. + - `consumer_credit_not_processed` - Consumer: credit not processed. + - `consumer_damaged_or_defective_merchandise` - Consumer: damaged or defective + merchandise. + - `consumer_merchandise_misrepresentation` - Consumer: merchandise + misrepresentation. + - `consumer_merchandise_not_as_described` - Consumer: merchandise not as + described. + - `consumer_merchandise_not_received` - Consumer: merchandise not received. + - `consumer_non_receipt_of_cash` - Consumer: non-receipt of cash. + - `consumer_original_credit_transaction_not_accepted` - Consumer: Original + Credit Transaction (OCT) not accepted. + - `consumer_quality_merchandise` - Consumer: merchandise quality issue. + - `consumer_quality_services` - Consumer: services quality issue. + - `consumer_services_misrepresentation` - Consumer: services misrepresentation. + - `consumer_services_not_as_described` - Consumer: services not as described. + - `consumer_services_not_received` - Consumer: services not received. + - `fraud` - Fraud. + - `processing_error` - Processing error. + """ + + reason: Required[str] + """The reason for the category change.""" + + +class VisaUserPrearbitration(TypedDict, total=False): + reason: Required[str] + """The reason for the pre-arbitration request.""" + + category_change: VisaUserPrearbitrationCategoryChange + """Category change details for the pre-arbitration request. + + Should only be populated if the category of the dispute is being changed as part + of the pre-arbitration request. + """ + + +class Visa(TypedDict, total=False): + category: Required[Literal["chargeback", "merchant_prearbitration_decline", "user_prearbitration"]] + """The category of the user submission. + + Details specific to the category are required under the sub-object with the same + identifier as the category. + + - `chargeback` - Chargeback. + - `merchant_prearbitration_decline` - Merchant pre-arbitration decline. + - `user_prearbitration` - User pre-arbitration. + """ + + chargeback: VisaChargeback + """The chargeback details for the user submission. + + Required if and only if `category` is `chargeback`. + """ + + merchant_prearbitration_decline: VisaMerchantPrearbitrationDecline + """The merchant pre-arbitration decline details for the user submission. + + Required if and only if `category` is `merchant_prearbitration_decline`. + """ + + user_prearbitration: VisaUserPrearbitration + """The user pre-arbitration details for the user submission. + + Required if and only if `category` is `user_prearbitration`. + """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 7adcf989d..083108fa5 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -8,6 +8,7 @@ from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams +from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py new file mode 100644 index 000000000..558f23aaa --- /dev/null +++ b/src/increase/types/simulations/card_dispute_action_params.py @@ -0,0 +1,134 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["CardDisputeActionParams", "Visa", "VisaRequestFurtherInformation"] + + +class CardDisputeActionParams(TypedDict, total=False): + network: Required[Literal["visa"]] + """The network of the Card Dispute. + + Details specific to the network are required under the sub-object with the same + identifier as the network. + + - `visa` - Visa + """ + + visa: Visa + """The Visa-specific parameters for the taking action on the dispute. + + Required if and only if `network` is `visa`. + """ + + +class VisaRequestFurtherInformation(TypedDict, total=False): + reason: Required[str] + """The reason for requesting further information from the user.""" + + +class Visa(TypedDict, total=False): + action: Required[ + Literal[ + "accept_chargeback", + "accept_user_submission", + "decline_user_prearbitration", + "receive_merchant_prearbitration", + "represent", + "request_further_information", + "time_out_chargeback", + "time_out_merchant_prearbitration", + "time_out_representment", + "time_out_user_prearbitration", + ] + ] + """The action to take. + + Details specific to the action are required under the sub-object with the same + identifier as the action. + + - `accept_chargeback` - Simulate the merchant accepting the chargeback. This + will move the dispute to a `won` state. + - `accept_user_submission` - Accept the user's submission and transmit it to the + network. This will move the dispute to a `pending_response` state. + - `decline_user_prearbitration` - Simulate the merchant declining the user's + pre-arbitration. This will move the dispute to a `lost` state. + - `receive_merchant_prearbitration` - Simulate the merchant issuing + pre-arbitration. This will move the dispute to a `user_submission_required` + state. + - `represent` - Simulate the merchant re-presenting the dispute. This will move + the dispute to a `user_submission_required` state. + - `request_further_information` - Simulate further information being requested + from the user. This will move the dispute to a `user_submission_required` + state. + - `time_out_chargeback` - Simulate the merchant timing out responding to the + chargeback. This will move the dispute to a `won` state. + - `time_out_merchant_prearbitration` - Simulate the user timing out responding + to a merchant pre-arbitration. This will move the dispute to a `lost` state. + - `time_out_representment` - Simulate the user timing out responding to a + merchant re-presentment. This will move the dispute to a `lost` state. + - `time_out_user_prearbitration` - Simulate the merchant timing out responding + to a user pre-arbitration. This will move the dispute to a `win` state. + """ + + accept_chargeback: object + """The parameters for accepting the chargeback. + + Required if and only if `action` is `accept_chargeback`. + """ + + accept_user_submission: object + """The parameters for accepting the user submission. + + Required if and only if `action` is `accept_user_submission`. + """ + + decline_user_prearbitration: object + """The parameters for declining the prearbitration. + + Required if and only if `action` is `decline_user_prearbitration`. + """ + + receive_merchant_prearbitration: object + """The parameters for receiving the prearbitration. + + Required if and only if `action` is `receive_merchant_prearbitration`. + """ + + represent: object + """The parameters for re-presenting the dispute. + + Required if and only if `action` is `represent`. + """ + + request_further_information: VisaRequestFurtherInformation + """The parameters for requesting further information from the user. + + Required if and only if `action` is `request_further_information`. + """ + + time_out_chargeback: object + """The parameters for timing out the chargeback. + + Required if and only if `action` is `time_out_chargeback`. + """ + + time_out_merchant_prearbitration: object + """The parameters for timing out the merchant prearbitration. + + Required if and only if `action` is `time_out_merchant_prearbitration`. + """ + + time_out_representment: object + """The parameters for timing out the re-presentment. + + Required if and only if `action` is `time_out_representment`. + """ + + time_out_user_prearbitration: object + """The parameters for timing out the user prearbitration. + + Required if and only if `action` is `time_out_user_prearbitration`. + """ diff --git a/tests/api_resources/simulations/test_card_disputes.py b/tests/api_resources/simulations/test_card_disputes.py new file mode 100644 index 000000000..a3ec76146 --- /dev/null +++ b/tests/api_resources/simulations/test_card_disputes.py @@ -0,0 +1,150 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardDispute + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardDisputes: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_action(self, client: Increase) -> None: + card_dispute = client.simulations.card_disputes.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_method_action_with_all_params(self, client: Increase) -> None: + card_dispute = client.simulations.card_disputes.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + visa={ + "action": "accept_user_submission", + "accept_chargeback": {}, + "accept_user_submission": {}, + "decline_user_prearbitration": {}, + "receive_merchant_prearbitration": {}, + "represent": {}, + "request_further_information": {"reason": "x"}, + "time_out_chargeback": {}, + "time_out_merchant_prearbitration": {}, + "time_out_representment": {}, + "time_out_user_prearbitration": {}, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_raw_response_action(self, client: Increase) -> None: + response = client.simulations.card_disputes.with_raw_response.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_action(self, client: Increase) -> None: + with client.simulations.card_disputes.with_streaming_response.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_action(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + client.simulations.card_disputes.with_raw_response.action( + card_dispute_id="", + network="visa", + ) + + +class TestAsyncCardDisputes: + 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: + card_dispute = await async_client.simulations.card_disputes.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_method_action_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.simulations.card_disputes.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + visa={ + "action": "accept_user_submission", + "accept_chargeback": {}, + "accept_user_submission": {}, + "decline_user_prearbitration": {}, + "receive_merchant_prearbitration": {}, + "represent": {}, + "request_further_information": {"reason": "x"}, + "time_out_chargeback": {}, + "time_out_merchant_prearbitration": {}, + "time_out_representment": {}, + "time_out_user_prearbitration": {}, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_disputes.with_raw_response.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_disputes.with_streaming_response.action( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_action(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + await async_client.simulations.card_disputes.with_raw_response.action( + card_dispute_id="", + network="visa", + ) diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py new file mode 100644 index 000000000..ac4e72977 --- /dev/null +++ b/tests/api_resources/test_card_disputes.py @@ -0,0 +1,1444 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import ( + CardDispute, +) +from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardDisputes: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_dispute = client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_dispute = client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + amount=100, + attachment_files=[{"file_id": "file_id"}], + visa={ + "category": "fraud", + "authorization": {"account_status": "account_closed"}, + "consumer_canceled_merchandise": { + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "received_or_expected_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "canceled_prior_to_ship_date": "canceled_prior_to_ship_date", + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_canceled_recurring_transaction": { + "cancellation_target": "account", + "merchant_contact_methods": { + "application_name": "x", + "call_center_phone_number": "x", + "email_address": "x", + "in_person_address": "x", + "mailing_address": "x", + "text_phone_number": "x", + }, + "transaction_or_account_canceled_at": parse_date("2019-12-27"), + "other_form_of_payment_explanation": "x", + }, + "consumer_canceled_services": { + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "contracted_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "service_type": "guaranteed_reservation", + "guaranteed_reservation": {"explanation": "cardholder_canceled_prior_to_service"}, + "other": {}, + "timeshare": {}, + }, + "consumer_counterfeit_merchandise": { + "counterfeit_explanation": "x", + "disposition_explanation": "x", + "order_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_credit_not_processed": { + "canceled_or_returned_at": parse_date("2019-12-27"), + "credit_expected_at": parse_date("2019-12-27"), + }, + "consumer_damaged_or_defective_merchandise": { + "merchant_resolution_attempted": "attempted", + "order_and_issue_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_misrepresentation": { + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_as_described": { + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + "return_outcome": "returned", + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "delivery_issue": "delayed", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "delayed": { + "explanation": "x", + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": {"attempted_at": parse_date("2019-12-27")}, + "returned": { + "merchant_received_return_at": parse_date("2019-12-27"), + "returned_at": parse_date("2019-12-27"), + }, + }, + "delivered_to_wrong_location": {"agreed_location": "x"}, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "consumer_non_receipt_of_cash": {}, + "consumer_original_credit_transaction_not_accepted": { + "explanation": "x", + "reason": "prohibited_by_local_laws_or_regulation", + }, + "consumer_quality_merchandise": { + "expected_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_quality_issue": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_quality_services": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "non_fiat_currency_or_non_fungible_token_related_and_not_matching_description": "not_related", + "purchase_info_and_quality_issue": "x", + "services_received_at": parse_date("2019-12-27"), + "cardholder_paid_to_have_work_redone": "did_not_pay_to_have_work_redone", + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "restaurant_food_related": "not_related", + }, + "consumer_services_misrepresentation": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_as_described": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "fraud": {"fraud_type": "account_or_credentials_takeover"}, + "processing_error": { + "error_reason": "duplicate_transaction", + "merchant_resolution_attempted": "attempted", + "duplicate_transaction": {"other_transaction_id": "x"}, + "incorrect_amount": {"expected_amount": 0}, + "paid_by_other_means": { + "other_form_of_payment_evidence": "canceled_check", + "other_transaction_id": "x", + }, + }, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.card_disputes.with_raw_response.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.card_disputes.with_streaming_response.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + card_dispute = client.card_disputes.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.card_disputes.with_raw_response.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.card_disputes.with_streaming_response.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + client.card_disputes.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + card_dispute = client.card_disputes.list() + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + card_dispute = client.card_disputes.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["user_submission_required"]}, + ) + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.card_disputes.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.card_disputes.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_submit_user_submission(self, client: Increase) -> None: + card_dispute = client.card_disputes.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_method_submit_user_submission_with_all_params(self, client: Increase) -> None: + card_dispute = client.card_disputes.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + amount=1, + attachment_files=[{"file_id": "file_id"}], + visa={ + "category": "merchant_prearbitration_decline", + "chargeback": { + "category": "authorization", + "authorization": {"account_status": "account_closed"}, + "consumer_canceled_merchandise": { + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "received_or_expected_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "canceled_prior_to_ship_date": "canceled_prior_to_ship_date", + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_canceled_recurring_transaction": { + "cancellation_target": "account", + "merchant_contact_methods": { + "application_name": "x", + "call_center_phone_number": "x", + "email_address": "x", + "in_person_address": "x", + "mailing_address": "x", + "text_phone_number": "x", + }, + "transaction_or_account_canceled_at": parse_date("2019-12-27"), + "other_form_of_payment_explanation": "x", + }, + "consumer_canceled_services": { + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "contracted_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "service_type": "guaranteed_reservation", + "guaranteed_reservation": {"explanation": "cardholder_canceled_prior_to_service"}, + "other": {}, + "timeshare": {}, + }, + "consumer_counterfeit_merchandise": { + "counterfeit_explanation": "x", + "disposition_explanation": "x", + "order_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_credit_not_processed": { + "canceled_or_returned_at": parse_date("2019-12-27"), + "credit_expected_at": parse_date("2019-12-27"), + }, + "consumer_damaged_or_defective_merchandise": { + "merchant_resolution_attempted": "attempted", + "order_and_issue_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_misrepresentation": { + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_as_described": { + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + "return_outcome": "returned", + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "delivery_issue": "delayed", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "delayed": { + "explanation": "x", + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": {"attempted_at": parse_date("2019-12-27")}, + "returned": { + "merchant_received_return_at": parse_date("2019-12-27"), + "returned_at": parse_date("2019-12-27"), + }, + }, + "delivered_to_wrong_location": {"agreed_location": "x"}, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "consumer_non_receipt_of_cash": {}, + "consumer_original_credit_transaction_not_accepted": { + "explanation": "x", + "reason": "prohibited_by_local_laws_or_regulation", + }, + "consumer_quality_merchandise": { + "expected_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_quality_issue": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_quality_services": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "non_fiat_currency_or_non_fungible_token_related_and_not_matching_description": "not_related", + "purchase_info_and_quality_issue": "x", + "services_received_at": parse_date("2019-12-27"), + "cardholder_paid_to_have_work_redone": "did_not_pay_to_have_work_redone", + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "restaurant_food_related": "not_related", + }, + "consumer_services_misrepresentation": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_as_described": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "fraud": {"fraud_type": "account_or_credentials_takeover"}, + "processing_error": { + "error_reason": "duplicate_transaction", + "merchant_resolution_attempted": "attempted", + "duplicate_transaction": {"other_transaction_id": "x"}, + "incorrect_amount": {"expected_amount": 0}, + "paid_by_other_means": { + "other_form_of_payment_evidence": "canceled_check", + "other_transaction_id": "x", + }, + }, + }, + "merchant_prearbitration_decline": { + "reason": "The pre-arbitration received from the merchantdoes not explain how they obtained permission to charge the card." + }, + "user_prearbitration": { + "reason": "x", + "category_change": { + "category": "authorization", + "reason": "x", + }, + }, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_raw_response_submit_user_submission(self, client: Increase) -> None: + response = client.card_disputes.with_raw_response.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_submit_user_submission(self, client: Increase) -> None: + with client.card_disputes.with_streaming_response.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_submit_user_submission(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + client.card_disputes.with_raw_response.submit_user_submission( + card_dispute_id="", + network="visa", + ) + + @parametrize + def test_method_withdraw(self, client: Increase) -> None: + card_dispute = client.card_disputes.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_raw_response_withdraw(self, client: Increase) -> None: + response = client.card_disputes.with_raw_response.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_streaming_response_withdraw(self, client: Increase) -> None: + with client.card_disputes.with_streaming_response.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_withdraw(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + client.card_disputes.with_raw_response.withdraw( + "", + ) + + +class TestAsyncCardDisputes: + 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: + card_dispute = await async_client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + amount=100, + attachment_files=[{"file_id": "file_id"}], + visa={ + "category": "fraud", + "authorization": {"account_status": "account_closed"}, + "consumer_canceled_merchandise": { + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "received_or_expected_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "canceled_prior_to_ship_date": "canceled_prior_to_ship_date", + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_canceled_recurring_transaction": { + "cancellation_target": "account", + "merchant_contact_methods": { + "application_name": "x", + "call_center_phone_number": "x", + "email_address": "x", + "in_person_address": "x", + "mailing_address": "x", + "text_phone_number": "x", + }, + "transaction_or_account_canceled_at": parse_date("2019-12-27"), + "other_form_of_payment_explanation": "x", + }, + "consumer_canceled_services": { + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "contracted_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "service_type": "guaranteed_reservation", + "guaranteed_reservation": {"explanation": "cardholder_canceled_prior_to_service"}, + "other": {}, + "timeshare": {}, + }, + "consumer_counterfeit_merchandise": { + "counterfeit_explanation": "x", + "disposition_explanation": "x", + "order_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_credit_not_processed": { + "canceled_or_returned_at": parse_date("2019-12-27"), + "credit_expected_at": parse_date("2019-12-27"), + }, + "consumer_damaged_or_defective_merchandise": { + "merchant_resolution_attempted": "attempted", + "order_and_issue_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_misrepresentation": { + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_as_described": { + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + "return_outcome": "returned", + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "delivery_issue": "delayed", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "delayed": { + "explanation": "x", + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": {"attempted_at": parse_date("2019-12-27")}, + "returned": { + "merchant_received_return_at": parse_date("2019-12-27"), + "returned_at": parse_date("2019-12-27"), + }, + }, + "delivered_to_wrong_location": {"agreed_location": "x"}, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "consumer_non_receipt_of_cash": {}, + "consumer_original_credit_transaction_not_accepted": { + "explanation": "x", + "reason": "prohibited_by_local_laws_or_regulation", + }, + "consumer_quality_merchandise": { + "expected_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_quality_issue": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_quality_services": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "non_fiat_currency_or_non_fungible_token_related_and_not_matching_description": "not_related", + "purchase_info_and_quality_issue": "x", + "services_received_at": parse_date("2019-12-27"), + "cardholder_paid_to_have_work_redone": "did_not_pay_to_have_work_redone", + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "restaurant_food_related": "not_related", + }, + "consumer_services_misrepresentation": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_as_described": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "fraud": {"fraud_type": "account_or_credentials_takeover"}, + "processing_error": { + "error_reason": "duplicate_transaction", + "merchant_resolution_attempted": "attempted", + "duplicate_transaction": {"other_transaction_id": "x"}, + "incorrect_amount": {"expected_amount": 0}, + "paid_by_other_means": { + "other_form_of_payment_evidence": "canceled_check", + "other_transaction_id": "x", + }, + }, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_disputes.with_raw_response.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.card_disputes.with_streaming_response.create( + disputed_transaction_id="transaction_uyrp7fld2ium70oa7oi", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_disputes.with_raw_response.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.card_disputes.with_streaming_response.retrieve( + "card_dispute_h9sc95nbl1cgltpp7men", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + await async_client.card_disputes.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.list() + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.list( + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["user_submission_required"]}, + ) + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_disputes.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.card_disputes.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_submit_user_submission(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_method_submit_user_submission_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + amount=1, + attachment_files=[{"file_id": "file_id"}], + visa={ + "category": "merchant_prearbitration_decline", + "chargeback": { + "category": "authorization", + "authorization": {"account_status": "account_closed"}, + "consumer_canceled_merchandise": { + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "received_or_expected_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "canceled_prior_to_ship_date": "canceled_prior_to_ship_date", + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_canceled_recurring_transaction": { + "cancellation_target": "account", + "merchant_contact_methods": { + "application_name": "x", + "call_center_phone_number": "x", + "email_address": "x", + "in_person_address": "x", + "mailing_address": "x", + "text_phone_number": "x", + }, + "transaction_or_account_canceled_at": parse_date("2019-12-27"), + "other_form_of_payment_explanation": "x", + }, + "consumer_canceled_services": { + "cardholder_cancellation": { + "canceled_at": parse_date("2019-12-27"), + "cancellation_policy_provided": "not_provided", + "reason": "x", + }, + "contracted_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_explanation": "x", + "service_type": "guaranteed_reservation", + "guaranteed_reservation": {"explanation": "cardholder_canceled_prior_to_service"}, + "other": {}, + "timeshare": {}, + }, + "consumer_counterfeit_merchandise": { + "counterfeit_explanation": "x", + "disposition_explanation": "x", + "order_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_credit_not_processed": { + "canceled_or_returned_at": parse_date("2019-12-27"), + "credit_expected_at": parse_date("2019-12-27"), + }, + "consumer_damaged_or_defective_merchandise": { + "merchant_resolution_attempted": "attempted", + "order_and_issue_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_misrepresentation": { + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_as_described": { + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + "return_outcome": "returned", + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_merchandise_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "delivery_issue": "delayed", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "delayed": { + "explanation": "x", + "return_outcome": "not_returned", + "not_returned": {}, + "return_attempted": {"attempted_at": parse_date("2019-12-27")}, + "returned": { + "merchant_received_return_at": parse_date("2019-12-27"), + "returned_at": parse_date("2019-12-27"), + }, + }, + "delivered_to_wrong_location": {"agreed_location": "x"}, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "consumer_non_receipt_of_cash": {}, + "consumer_original_credit_transaction_not_accepted": { + "explanation": "x", + "reason": "prohibited_by_local_laws_or_regulation", + }, + "consumer_quality_merchandise": { + "expected_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_quality_issue": "x", + "received_at": parse_date("2019-12-27"), + "return_outcome": "not_returned", + "not_returned": {}, + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "return_attempted": { + "attempt_explanation": "x", + "attempt_reason": "merchant_not_responding", + "attempted_at": parse_date("2019-12-27"), + "merchandise_disposition": "x", + }, + "returned": { + "return_method": "dhl", + "returned_at": parse_date("2019-12-27"), + "merchant_received_return_at": parse_date("2019-12-27"), + "other_explanation": "x", + "tracking_number": "x", + }, + }, + "consumer_quality_services": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "non_fiat_currency_or_non_fungible_token_related_and_not_matching_description": "not_related", + "purchase_info_and_quality_issue": "x", + "services_received_at": parse_date("2019-12-27"), + "cardholder_paid_to_have_work_redone": "did_not_pay_to_have_work_redone", + "ongoing_negotiations": { + "explanation": "x", + "issuer_first_notified_at": parse_date("2019-12-27"), + "started_at": parse_date("2019-12-27"), + }, + "restaurant_food_related": "not_related", + }, + "consumer_services_misrepresentation": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "misrepresentation_explanation": "x", + "purchase_explanation": "x", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_as_described": { + "cardholder_cancellation": { + "accepted_by_merchant": "accepted", + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_resolution_attempted": "attempted", + "received_at": parse_date("2019-12-27"), + }, + "consumer_services_not_received": { + "cancellation_outcome": "cardholder_cancellation_prior_to_expected_receipt", + "last_expected_receipt_at": parse_date("2019-12-27"), + "merchant_resolution_attempted": "attempted", + "purchase_info_and_explanation": "x", + "cardholder_cancellation_prior_to_expected_receipt": { + "canceled_at": parse_date("2019-12-27"), + "reason": "x", + }, + "merchant_cancellation": {"canceled_at": parse_date("2019-12-27")}, + "no_cancellation": {}, + }, + "fraud": {"fraud_type": "account_or_credentials_takeover"}, + "processing_error": { + "error_reason": "duplicate_transaction", + "merchant_resolution_attempted": "attempted", + "duplicate_transaction": {"other_transaction_id": "x"}, + "incorrect_amount": {"expected_amount": 0}, + "paid_by_other_means": { + "other_form_of_payment_evidence": "canceled_check", + "other_transaction_id": "x", + }, + }, + }, + "merchant_prearbitration_decline": { + "reason": "The pre-arbitration received from the merchantdoes not explain how they obtained permission to charge the card." + }, + "user_prearbitration": { + "reason": "x", + "category_change": { + "category": "authorization", + "reason": "x", + }, + }, + }, + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_submit_user_submission(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_disputes.with_raw_response.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_submit_user_submission(self, async_client: AsyncIncrease) -> None: + async with async_client.card_disputes.with_streaming_response.submit_user_submission( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + network="visa", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_submit_user_submission(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + await async_client.card_disputes.with_raw_response.submit_user_submission( + card_dispute_id="", + network="visa", + ) + + @parametrize + async def test_method_withdraw(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_raw_response_withdraw(self, async_client: AsyncIncrease) -> None: + response = await async_client.card_disputes.with_raw_response.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_streaming_response_withdraw(self, async_client: AsyncIncrease) -> None: + async with async_client.card_disputes.with_streaming_response.withdraw( + "card_dispute_h9sc95nbl1cgltpp7men", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_dispute = await response.parse() + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_withdraw(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): + await async_client.card_disputes.with_raw_response.withdraw( + "", + ) From e0774db0f2d4ded9d5068c4419cd65298c4c461b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 19:54:57 +0000 Subject: [PATCH 0899/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1a931c1e0..18dbf0405 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.348.0" + ".": "0.349.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e99cef4ec..131460488 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.348.0" +version = "0.349.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1d9fc60b2..2d0bac4cf 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.348.0" # x-release-please-version +__version__ = "0.349.0" # x-release-please-version From 25b464dcfa977bd0607e9c9717e191a56a48d717 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 1 Oct 2025 20:19:53 +0000 Subject: [PATCH 0900/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9aa42589f..d7372b091 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dc0a89abaae59dd7fc23cc5463a412d79b5c8c042eb144b05e97823d11a76b2b.yml -openapi_spec_hash: 24ce07f273cf90d08b3fa22958316846 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-98f523253259ea28925f73c666fb578f233689655d6154790eba581eafed00c6.yml +openapi_spec_hash: 3e360f4ec207a4bceae1816dff0d768a config_hash: f0b80170c2ea09811aeae3f1e94bc422 From 9266d314110090bc28109e7314617ea42770e906 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 20:41:32 +0000 Subject: [PATCH 0901/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 12 +++++++++--- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index d7372b091..6d6e5b784 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-98f523253259ea28925f73c666fb578f233689655d6154790eba581eafed00c6.yml -openapi_spec_hash: 3e360f4ec207a4bceae1816dff0d768a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcc4e952b005ab1fd26ae67fe0cac46a57699299c92e00680d4d0f6be51d7936.yml +openapi_spec_hash: f1a7326721f814625c7d5484956afded config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index b9fb5cd3b..e7cfb1f58 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -3816,6 +3816,12 @@ class State(BaseModel): transaction's currency. For dollars, for example, this is cents. """ + refunded_amount: int + """The total refunded amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + reversed_amount: int """The total reversed amount in the minor unit of the transaction's currency. @@ -3823,9 +3829,9 @@ class State(BaseModel): """ settled_amount: int - """ - The total settled or refunded amount in the minor unit of the transaction's - currency. For dollars, for example, this is cents. + """The total settled amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. """ From d85ba1feed6468774ca6b2e6491d44c42b548b15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Oct 2025 20:44:38 +0000 Subject: [PATCH 0902/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 18dbf0405..b0ef7708e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.349.0" + ".": "0.350.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 131460488..3d855ac3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.349.0" +version = "0.350.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2d0bac4cf..7336ec627 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.349.0" # x-release-please-version +__version__ = "0.350.0" # x-release-please-version From b8dd4c98c52f25c6d433997de219d10f4fbbcb4e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 15:14:05 +0000 Subject: [PATCH 0903/1325] fix(client): handle some Dispute objects as empty rather than unknown --- .stats.yml | 4 ++-- src/increase/types/card_dispute.py | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d6e5b784..238098d13 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcc4e952b005ab1fd26ae67fe0cac46a57699299c92e00680d4d0f6be51d7936.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9e8783129ea725992844a51e7d6f6a639cae93753228cef7262eccb2e4bae58d.yml openapi_spec_hash: f1a7326721f814625c7d5484956afded -config_hash: f0b80170c2ea09811aeae3f1e94bc422 +config_hash: 4489d6e123ed885f5cb74fe619668e4b diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 2ae7f8075..77b2aef7c 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -25,6 +25,7 @@ "VisaNetworkEventRepresentedCardholderNoLongerDisputes", "VisaNetworkEventRepresentedCreditOrReversalProcessed", "VisaNetworkEventRepresentedInvalidDispute", + "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed", "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventRepresentedProofOfCashDisbursement", "VisaNetworkEventRepresentedReversalIssued", @@ -59,6 +60,7 @@ "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackConsumerNonReceiptOfCash", "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaUserSubmissionChargebackConsumerQualityMerchandise", "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", @@ -441,6 +443,10 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): """ +class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): + pass + + class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -481,7 +487,9 @@ class VisaNetworkEventRepresented(BaseModel): invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" - non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None + non_fiat_currency_or_non_fungible_token_as_described: Optional[ + VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed + ] = None """Non-fiat currency or non-fungible token as described details. Present if and only if `reason` is @@ -1363,6 +1371,10 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): """Purchase information and explanation.""" +class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): explanation: str """Explanation.""" @@ -1885,7 +1897,7 @@ class VisaUserSubmissionChargeback(BaseModel): Present if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: Optional[object] = None + consumer_non_receipt_of_cash: Optional[VisaUserSubmissionChargebackConsumerNonReceiptOfCash] = None """Non-receipt of cash. Present if and only if `category` is `consumer_non_receipt_of_cash`. From 3315bff786ea951f3a40079fd5812a8b400cc153 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 15:17:16 +0000 Subject: [PATCH 0904/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b0ef7708e..290c612a3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.350.0" + ".": "0.350.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3d855ac3a..43b87ff76 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.350.0" +version = "0.350.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7336ec627..bb38096b7 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.350.0" # x-release-please-version +__version__ = "0.350.1" # x-release-please-version From e62bbfa09499a206fef539e5b907ef982caf43be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:54:32 +0000 Subject: [PATCH 0905/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_dispute.py | 16 ++-------------- 2 files changed, 4 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 238098d13..6d6e5b784 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9e8783129ea725992844a51e7d6f6a639cae93753228cef7262eccb2e4bae58d.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcc4e952b005ab1fd26ae67fe0cac46a57699299c92e00680d4d0f6be51d7936.yml openapi_spec_hash: f1a7326721f814625c7d5484956afded -config_hash: 4489d6e123ed885f5cb74fe619668e4b +config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 77b2aef7c..2ae7f8075 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -25,7 +25,6 @@ "VisaNetworkEventRepresentedCardholderNoLongerDisputes", "VisaNetworkEventRepresentedCreditOrReversalProcessed", "VisaNetworkEventRepresentedInvalidDispute", - "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed", "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventRepresentedProofOfCashDisbursement", "VisaNetworkEventRepresentedReversalIssued", @@ -60,7 +59,6 @@ "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", - "VisaUserSubmissionChargebackConsumerNonReceiptOfCash", "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaUserSubmissionChargebackConsumerQualityMerchandise", "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", @@ -443,10 +441,6 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): """ -class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): - pass - - class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -487,9 +481,7 @@ class VisaNetworkEventRepresented(BaseModel): invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" - non_fiat_currency_or_non_fungible_token_as_described: Optional[ - VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed - ] = None + non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None """Non-fiat currency or non-fungible token as described details. Present if and only if `reason` is @@ -1371,10 +1363,6 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): """Purchase information and explanation.""" -class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): - pass - - class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): explanation: str """Explanation.""" @@ -1897,7 +1885,7 @@ class VisaUserSubmissionChargeback(BaseModel): Present if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: Optional[VisaUserSubmissionChargebackConsumerNonReceiptOfCash] = None + consumer_non_receipt_of_cash: Optional[object] = None """Non-receipt of cash. Present if and only if `category` is `consumer_non_receipt_of_cash`. From 9a23f3eb5f0ac45056447a80ebb83c1c9e44654a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 16:57:38 +0000 Subject: [PATCH 0906/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 290c612a3..6db6d4bca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.350.1" + ".": "0.351.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 43b87ff76..551bd05c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.350.1" +version = "0.351.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index bb38096b7..f5da4a01b 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.350.1" # x-release-please-version +__version__ = "0.351.0" # x-release-please-version From 8bcfe7c8956087d0621759d536b85452e96f2ce3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:15:29 +0000 Subject: [PATCH 0907/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_deposit.py | 12 +++++++++--- src/increase/types/transaction.py | 10 ++++++++-- 3 files changed, 19 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6d6e5b784..0ff8edbc9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcc4e952b005ab1fd26ae67fe0cac46a57699299c92e00680d4d0f6be51d7936.yml -openapi_spec_hash: f1a7326721f814625c7d5484956afded +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2b82894385cf8290541770072636402861719818ea52315b785c281d8cc128eb.yml +openapi_spec_hash: 2493d025c6ea2a47445a32a22d54d711 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index bbb0e0744..9d2afbee7 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -18,7 +18,10 @@ class DepositAcceptance(BaseModel): account_number: str - """The account number printed on the check.""" + """The account number printed on the check. + + This is an account at the bank that issued the check. + """ amount: int """The amount to be deposited in the minor unit of the transaction's currency. @@ -49,7 +52,10 @@ class DepositAcceptance(BaseModel): """ routing_number: str - """The routing number printed on the check.""" + """The routing number printed on the check. + + This is a routing number for the bank that issued the check. + """ serial_number: Optional[str] = None """The check serial number, if present, for consumer checks. @@ -328,7 +334,7 @@ class CheckDeposit(BaseModel): deposit_acceptance: Optional[DepositAcceptance] = None """ - If your deposit is successfully parsed and accepted by Increase, this will + Once your deposit is successfully parsed and accepted by Increase, this will contain details of the parsed check. """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index c19e0526f..95832172c 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2269,7 +2269,10 @@ class SourceCashbackPayment(BaseModel): class SourceCheckDepositAcceptance(BaseModel): account_number: str - """The account number printed on the check.""" + """The account number printed on the check. + + This is an account at the bank that issued the check. + """ amount: int """The amount to be deposited in the minor unit of the transaction's currency. @@ -2300,7 +2303,10 @@ class SourceCheckDepositAcceptance(BaseModel): """ routing_number: str - """The routing number printed on the check.""" + """The routing number printed on the check. + + This is a routing number for the bank that issued the check. + """ serial_number: Optional[str] = None """The check serial number, if present, for consumer checks. From 0a2e132d4f382eebf662dbfe0243dbb6b459d377 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Oct 2025 18:18:30 +0000 Subject: [PATCH 0908/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6db6d4bca..2ba9753d1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.351.0" + ".": "0.352.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 551bd05c7..b79c6cd7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.351.0" +version = "0.352.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f5da4a01b..efca13d00 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.351.0" # x-release-please-version +__version__ = "0.352.0" # x-release-please-version From b274061c0827f67b58b9ffac6418825c695ef315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 22:09:36 +0000 Subject: [PATCH 0909/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/oauth_token.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0ff8edbc9..6612d81f1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2b82894385cf8290541770072636402861719818ea52315b785c281d8cc128eb.yml -openapi_spec_hash: 2493d025c6ea2a47445a32a22d54d711 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2f24b343a9f099286b8e3dbd0e38f2bd237a7b174a275ea81cd9173bea33c601.yml +openapi_spec_hash: fd71bd10930be2849fdb5614c1878866 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/oauth_token.py b/src/increase/types/oauth_token.py index 0b7af4b96..48cb1b819 100644 --- a/src/increase/types/oauth_token.py +++ b/src/increase/types/oauth_token.py @@ -14,6 +14,9 @@ class OAuthToken(BaseModel): behalf. """ + group_id: str + """The Group's identifier. A Group is the top-level organization in Increase.""" + token_type: Literal["bearer"] """The type of OAuth token.""" From a54bf6ee65638d993caaf28387cb53b5cbdc9aea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Oct 2025 22:12:36 +0000 Subject: [PATCH 0910/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2ba9753d1..9a634053c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.352.0" + ".": "0.353.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b79c6cd7e..d489a0834 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.352.0" +version = "0.353.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index efca13d00..b91aa6d26 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.352.0" # x-release-please-version +__version__ = "0.353.0" # x-release-please-version From 13e2937ba4e0d09e40cacd1945fe51d081d93522 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 16:03:56 +0000 Subject: [PATCH 0911/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6612d81f1..8490456b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2f24b343a9f099286b8e3dbd0e38f2bd237a7b174a275ea81cd9173bea33c601.yml -openapi_spec_hash: fd71bd10930be2849fdb5614c1878866 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d0b54206ef7c159e14154c892fe3146fa1ed1108a06cf53731ba27ac27b962a.yml +openapi_spec_hash: 7a575e29fc5e9fd1e74e9de7ddb8ba67 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 95832172c..fef8583ca 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2826,12 +2826,14 @@ class SourceInternalSource(BaseModel): reason: Literal[ "account_closure", + "account_revenue_payment_distribution", "bank_drawn_check", "bank_drawn_check_credit", "bank_migration", "check_adjustment", "collection_payment", "collection_receivable", + "dishonored_ach_return", "empyreal_adjustment", "error", "error_correction", @@ -2840,19 +2842,20 @@ class SourceInternalSource(BaseModel): "negative_balance_forgiveness", "sample_funds", "sample_funds_return", - "account_revenue_payment_distribution", ] """An Internal Source is a transaction between you and Increase. This describes the reason for the transaction. - `account_closure` - Account closure + - `account_revenue_payment_distribution` - Account revenue payment distribution - `bank_drawn_check` - Bank-drawn check - `bank_drawn_check_credit` - Bank-drawn check credit - `bank_migration` - Bank migration - `check_adjustment` - Check adjustment - `collection_payment` - Collection payment - `collection_receivable` - Collection receivable + - `dishonored_ach_return` - Dishonored ACH return - `empyreal_adjustment` - Empyreal adjustment - `error` - Error - `error_correction` - Error correction @@ -2861,7 +2864,6 @@ class SourceInternalSource(BaseModel): - `negative_balance_forgiveness` - Negative balance forgiveness - `sample_funds` - Sample funds - `sample_funds_return` - Sample funds return - - `account_revenue_payment_distribution` - Account revenue payment distribution """ From 48448c00ecd6b2a1948a0aaa61f2bc34bca7f6b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 8 Oct 2025 16:06:48 +0000 Subject: [PATCH 0912/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9a634053c..9e26915df 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.353.0" + ".": "0.354.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d489a0834..b1b41a7a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.353.0" +version = "0.354.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b91aa6d26..9e2841be9 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.353.0" # x-release-please-version +__version__ = "0.354.0" # x-release-please-version From 89f11f2c202e818aee7dc8e1a313952991db85e1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 08:51:31 +0000 Subject: [PATCH 0913/1325] chore(internal): detect missing future annotations with ruff --- pyproject.toml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index b1b41a7a2..354431c1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -224,6 +224,8 @@ select = [ "B", # remove unused imports "F401", + # check for missing future annotations + "FA102", # bare except statements "E722", # unused arguments @@ -246,6 +248,8 @@ unfixable = [ "T203", ] +extend-safe-fixes = ["FA102"] + [tool.ruff.lint.flake8-tidy-imports.banned-api] "functools.lru_cache".msg = "This function does not retain type information for the wrapped function's arguments; The `lru_cache` function from `_utils` should be used instead" From 14353afc2ecf72e3c271a4742bcf85f9c7a8e490 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:28:18 +0000 Subject: [PATCH 0914/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/ach_transfer.py | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8490456b1..cf55854c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d0b54206ef7c159e14154c892fe3146fa1ed1108a06cf53731ba27ac27b962a.yml -openapi_spec_hash: 7a575e29fc5e9fd1e74e9de7ddb8ba67 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5e8c32ee2dc3b3f70e43e439b18ad51e73cb830c01f7bb53290a340be7937ea.yml +openapi_spec_hash: dcf97003cd0f0b49bfc2b1213ef83ed9 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index a0cbd820b..a417578a1 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -567,6 +567,17 @@ class Settlement(BaseModel): class Submission(BaseModel): + administrative_returns_expected_by: Optional[datetime.datetime] = None + """The timestamp by which any administrative returns are expected to be received + by. + + This follows the NACHA guidelines for return windows, which are: "In general, + return entries must be received by the RDFI’s ACH Operator by its deposit + deadline for the return entry to be made available to the ODFI no later than the + opening of business on the second banking day following the Settlement Date of + the original entry.". + """ + effective_date: datetime.date """The ACH transfer's effective date as sent to the Federal Reserve. From 81e7b85f4eab2c1558f78647a06f4d054aa8f052 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:31:10 +0000 Subject: [PATCH 0915/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9e26915df..8eb45f64c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.354.0" + ".": "0.355.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 354431c1e..ff79f16f6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.354.0" +version = "0.355.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9e2841be9..4c5523479 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.354.0" # x-release-please-version +__version__ = "0.355.0" # x-release-please-version From dcec579c2880ea7c07ca57b253f98cda692c0e79 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:46:24 +0000 Subject: [PATCH 0916/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/ach_transfer.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index cf55854c7..a4cac0a4b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5e8c32ee2dc3b3f70e43e439b18ad51e73cb830c01f7bb53290a340be7937ea.yml -openapi_spec_hash: dcf97003cd0f0b49bfc2b1213ef83ed9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-071556e7dfc2b2d72c1f9fee711211e0272dab780651b1a49d3e302d3a9f59be.yml +openapi_spec_hash: 01d445dc17f564c99f440a768f170b0d config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index a417578a1..f2305dbf6 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -567,7 +567,7 @@ class Settlement(BaseModel): class Submission(BaseModel): - administrative_returns_expected_by: Optional[datetime.datetime] = None + administrative_returns_expected_by: datetime.datetime """The timestamp by which any administrative returns are expected to be received by. From 87b4c3310cbc0859f4ea3dee385de694299762c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 15:49:54 +0000 Subject: [PATCH 0917/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8eb45f64c..d4af9aa61 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.355.0" + ".": "0.356.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ff79f16f6..2cef96eb1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.355.0" +version = "0.356.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4c5523479..ef958dd0e 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.355.0" # x-release-please-version +__version__ = "0.356.0" # x-release-please-version From 50de36a5b80232908b9eafb73ad3caece19490c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Oct 2025 19:07:59 +0000 Subject: [PATCH 0918/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/programs.py | 16 ++++++++++++++-- .../types/simulations/program_create_params.py | 10 +++++++++- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index a4cac0a4b..cc5e6cfd0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-071556e7dfc2b2d72c1f9fee711211e0272dab780651b1a49d3e302d3a9f59be.yml -openapi_spec_hash: 01d445dc17f564c99f440a768f170b0d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20e8d84deba6f3f35ffb7e8ad746f470aa7acbfa55d98bc7dcb931a768193243.yml +openapi_spec_hash: 7a807bc7bc882d53dc1df541c1ee0495 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 33982aa56..23c617954 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -48,7 +48,12 @@ def create( *, name: str, bank: Literal[ - "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" + "blue_ridge_bank", + "core_bank", + "first_internet_bank", + "global_innovations_bank", + "grasshopper_bank", + "twin_city_bank", ] | Omit = omit, reserve_account_id: str | Omit = omit, @@ -77,6 +82,7 @@ def create( - `first_internet_bank` - First Internet Bank of Indiana - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank + - `twin_city_bank` - Twin City Bank reserve_account_id: The identifier of the Account the Program should be added to is for. @@ -136,7 +142,12 @@ async def create( *, name: str, bank: Literal[ - "blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank" + "blue_ridge_bank", + "core_bank", + "first_internet_bank", + "global_innovations_bank", + "grasshopper_bank", + "twin_city_bank", ] | Omit = omit, reserve_account_id: str | Omit = omit, @@ -165,6 +176,7 @@ async def create( - `first_internet_bank` - First Internet Bank of Indiana - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank + - `twin_city_bank` - Twin City Bank reserve_account_id: The identifier of the Account the Program should be added to is for. diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py index d8718d60d..7153e2292 100644 --- a/src/increase/types/simulations/program_create_params.py +++ b/src/increase/types/simulations/program_create_params.py @@ -11,7 +11,14 @@ class ProgramCreateParams(TypedDict, total=False): name: Required[str] """The name of the program being added.""" - bank: Literal["blue_ridge_bank", "core_bank", "first_internet_bank", "global_innovations_bank", "grasshopper_bank"] + bank: Literal[ + "blue_ridge_bank", + "core_bank", + "first_internet_bank", + "global_innovations_bank", + "grasshopper_bank", + "twin_city_bank", + ] """The bank for the program's accounts, defaults to First Internet Bank. - `blue_ridge_bank` - Blue Ridge Bank, N.A. @@ -19,6 +26,7 @@ class ProgramCreateParams(TypedDict, total=False): - `first_internet_bank` - First Internet Bank of Indiana - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank + - `twin_city_bank` - Twin City Bank """ reserve_account_id: str From 2994a87dbb9bf769cc3de725429dd41bda308861 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Oct 2025 19:10:51 +0000 Subject: [PATCH 0919/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d4af9aa61..b65ebe518 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.356.0" + ".": "0.357.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2cef96eb1..842d9db0c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.356.0" +version = "0.357.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ef958dd0e..1b296863d 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.356.0" # x-release-please-version +__version__ = "0.357.0" # x-release-please-version From c59af88972a0667a71234b433edfcec24935c25b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 21:31:06 +0000 Subject: [PATCH 0920/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/card_dispute.py | 3 +- src/increase/types/card_payment.py | 33 ++++++++++++++++------ src/increase/types/declined_transaction.py | 6 +++- src/increase/types/pending_transaction.py | 6 +++- src/increase/types/real_time_decision.py | 6 +++- src/increase/types/transaction.py | 12 ++++++-- 7 files changed, 53 insertions(+), 17 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc5e6cfd0..cce29e424 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20e8d84deba6f3f35ffb7e8ad746f470aa7acbfa55d98bc7dcb931a768193243.yml -openapi_spec_hash: 7a807bc7bc882d53dc1df541c1ee0495 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-35cc701c6ebaf8655f27698ffe4994ae7fa9dd843a66ea241f5d16e6c821dd66.yml +openapi_spec_hash: 456373dd9bda8b3aee816045915f22a0 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 2ae7f8075..eced5df31 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -2161,10 +2161,11 @@ class CardDispute(BaseModel): dispute. """ - network: Literal["visa"] + network: Literal["visa", "pulse"] """The network that the Card Dispute is associated with. - `visa` - Visa: details will be under the `visa` object. + - `pulse` - Pulse: details will be under the `pulse` object. """ status: Literal[ diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index e7cfb1f58..1c37c9b1e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -559,12 +559,16 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): class ElementCardAuthorizationNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[ElementCardAuthorizationNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" @@ -865,10 +869,11 @@ class ElementCardAuthorizationExpiration(BaseModel): transaction's currency. For dollars, for example, this is cents. """ - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ type: Literal["card_authorization_expiration"] @@ -1163,12 +1168,16 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): class ElementCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[ElementCardDeclineNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" @@ -1563,10 +1572,11 @@ class ElementCardFuelConfirmation(BaseModel): - `USD` - US Dollar (USD) """ - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ network_identifiers: ElementCardFuelConfirmationNetworkIdentifiers @@ -1822,10 +1832,11 @@ class ElementCardIncrement(BaseModel): - `USD` - US Dollar (USD) """ - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ network_identifiers: ElementCardIncrementNetworkIdentifiers @@ -2501,10 +2512,11 @@ class ElementCardReversal(BaseModel): merchant_state: Optional[str] = None """The state the merchant resides in.""" - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ network_identifiers: ElementCardReversalNetworkIdentifiers @@ -3120,10 +3132,11 @@ class ElementCardSettlement(BaseModel): merchant_state: Optional[str] = None """The state the merchant resides in.""" - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network on which this transaction was processed. - `visa` - Visa + - `pulse` - Pulse """ network_identifiers: ElementCardSettlementNetworkIdentifiers @@ -3450,12 +3463,16 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): class ElementCardValidationNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[ElementCardValidationNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9477d8071..e7597b082 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -407,12 +407,16 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): class SourceCardDeclineNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[SourceCardDeclineNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index cf1aa1cea..c6c4d6448 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -357,12 +357,16 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): class SourceCardAuthorizationNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[SourceCardAuthorizationNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 8d42faa94..a142aeae5 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -375,12 +375,16 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): class CardAuthorizationNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[CardAuthorizationNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index fef8583ca..82085b668 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -453,10 +453,11 @@ class SourceCardDisputeFinancial(BaseModel): amount: int """The amount of the financial event.""" - network: Literal["visa"] + network: Literal["visa", "pulse"] """The network that the Card Dispute is associated with. - `visa` - Visa: details will be under the `visa` object. + - `pulse` - Pulse: details will be under the `pulse` object. """ transaction_id: str @@ -775,12 +776,16 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): class SourceCardFinancialNetworkDetails(BaseModel): - category: Literal["visa"] + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. - `visa` - Visa + - `pulse` - Pulse """ + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + visa: Optional[SourceCardFinancialNetworkDetailsVisa] = None """Fields specific to the `visa` network.""" @@ -2192,10 +2197,11 @@ class SourceCardSettlement(BaseModel): merchant_state: Optional[str] = None """The state the merchant resides in.""" - network: Literal["visa"] + network: Literal["visa", "pulse"] """The card network on which this transaction was processed. - `visa` - Visa + - `pulse` - Pulse """ network_identifiers: SourceCardSettlementNetworkIdentifiers From 05ffb4cdbeaeee4aef9d7ec9b937ead01b66f304 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 21:33:57 +0000 Subject: [PATCH 0921/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b65ebe518..f124d47b5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.357.0" + ".": "0.358.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 842d9db0c..a39586fbf 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.357.0" +version = "0.358.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1b296863d..49e3dbf36 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.357.0" # x-release-please-version +__version__ = "0.358.0" # x-release-please-version From 120f75a4be1bef33e806b5f767631896ad422960 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 22:24:28 +0000 Subject: [PATCH 0922/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 48 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 6 +++ src/increase/types/pending_transaction.py | 6 +++ src/increase/types/real_time_decision.py | 6 +++ src/increase/types/transaction.py | 18 ++++++++ 6 files changed, 86 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cce29e424..7201a22ab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-35cc701c6ebaf8655f27698ffe4994ae7fa9dd843a66ea241f5d16e6c821dd66.yml -openapi_spec_hash: 456373dd9bda8b3aee816045915f22a0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33f2c95401f5925e452440863f26a701b345a2da75b2b3f9b3eb33936adef476.yml +openapi_spec_hash: 3a0f2ac488d1d8e875bd118940c81152 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 1c37c9b1e..e06677fed 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -574,6 +574,12 @@ class ElementCardAuthorizationNetworkDetails(BaseModel): class ElementCardAuthorizationNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1183,6 +1189,12 @@ class ElementCardDeclineNetworkDetails(BaseModel): class ElementCardDeclineNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1532,6 +1544,12 @@ class ElementCardDecline(BaseModel): class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1768,6 +1786,12 @@ class ElementCardIncrementAdditionalAmounts(BaseModel): class ElementCardIncrementNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1939,6 +1963,12 @@ class ElementCardRefundNetworkIdentifiers(BaseModel): acquirer_reference_number: str """A globally unique identifier for this settlement.""" + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + transaction_id: Optional[str] = None """ A globally unique transaction identifier provided by the card network, used @@ -2441,6 +2471,12 @@ class ElementCardRefund(BaseModel): class ElementCardReversalNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -2640,6 +2676,12 @@ class ElementCardSettlementNetworkIdentifiers(BaseModel): acquirer_reference_number: str """A globally unique identifier for this settlement.""" + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + transaction_id: Optional[str] = None """ A globally unique transaction identifier provided by the card network, used @@ -3478,6 +3520,12 @@ class ElementCardValidationNetworkDetails(BaseModel): class ElementCardValidationNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index e7597b082..dfebaa434 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -422,6 +422,12 @@ class SourceCardDeclineNetworkDetails(BaseModel): class SourceCardDeclineNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index c6c4d6448..f0d364331 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -372,6 +372,12 @@ class SourceCardAuthorizationNetworkDetails(BaseModel): class SourceCardAuthorizationNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index a142aeae5..c05fcd483 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -390,6 +390,12 @@ class CardAuthorizationNetworkDetails(BaseModel): class CardAuthorizationNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 82085b668..202fbd341 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -791,6 +791,12 @@ class SourceCardFinancialNetworkDetails(BaseModel): class SourceCardFinancialNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + retrieval_reference_number: Optional[str] = None """A life-cycle identifier used across e.g., an authorization and a reversal. @@ -1118,6 +1124,12 @@ class SourceCardRefundNetworkIdentifiers(BaseModel): acquirer_reference_number: str """A globally unique identifier for this settlement.""" + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + transaction_id: Optional[str] = None """ A globally unique transaction identifier provided by the card network, used @@ -1705,6 +1717,12 @@ class SourceCardSettlementNetworkIdentifiers(BaseModel): acquirer_reference_number: str """A globally unique identifier for this settlement.""" + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + transaction_id: Optional[str] = None """ A globally unique transaction identifier provided by the card network, used From d62060973e3f1c8831719ac74f558527f9523538 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 14 Oct 2025 22:27:22 +0000 Subject: [PATCH 0923/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f124d47b5..e9f340470 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.358.0" + ".": "0.359.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a39586fbf..d5e0c7426 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.358.0" +version = "0.359.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 49e3dbf36..e79acdccf 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.358.0" # x-release-please-version +__version__ = "0.359.0" # x-release-please-version From 5dfcb9a6d2912ed37d432a311b93d76d1b867adb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:24:46 +0000 Subject: [PATCH 0924/1325] feat(api): api update --- .stats.yml | 4 ++-- tests/api_resources/test_cards.py | 8 ++++---- tests/api_resources/test_digital_card_profiles.py | 4 ++-- tests/api_resources/test_real_time_decisions.py | 8 ++++---- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7201a22ab..7d2d5b8d9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-33f2c95401f5925e452440863f26a701b345a2da75b2b3f9b3eb33936adef476.yml -openapi_spec_hash: 3a0f2ac488d1d8e875bd118940c81152 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bee1322960faf189518a3ac4b28f52fab559d991b86edfebe33795ed60f4af0f.yml +openapi_spec_hash: c3f12839150ef30de08776d0ea693f59 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 447e714b0..ac1a9a3a4 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -44,7 +44,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: description="Card for Ian Crease", digital_wallet={ "digital_card_profile_id": "digital_card_profile_id", - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, entity_id="entity_id", @@ -134,7 +134,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: description="New description", digital_wallet={ "digital_card_profile_id": "digital_card_profile_id", - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, entity_id="entity_id", @@ -368,7 +368,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) description="Card for Ian Crease", digital_wallet={ "digital_card_profile_id": "digital_card_profile_id", - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, entity_id="entity_id", @@ -458,7 +458,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) description="New description", digital_wallet={ "digital_card_profile_id": "digital_card_profile_id", - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, entity_id="entity_id", diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index f45af205c..38bbafeea 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -211,7 +211,7 @@ def test_method_clone_with_all_params(self, client: Increase) -> None: app_icon_file_id="app_icon_file_id", background_image_file_id="file_1ai913suu1zfn1pdetru", card_description="x", - contact_email="x", + contact_email="dev@stainless.com", contact_phone="x", contact_website="contact_website", description="x", @@ -454,7 +454,7 @@ async def test_method_clone_with_all_params(self, async_client: AsyncIncrease) - app_icon_file_id="app_icon_file_id", background_image_file_id="file_1ai913suu1zfn1pdetru", card_description="x", - contact_email="x", + contact_email="dev@stainless.com", contact_phone="x", contact_website="contact_website", description="x", diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index fcd9a8683..3cc0575b9 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -81,13 +81,13 @@ def test_method_action_with_all_params(self, client: Increase) -> None: digital_wallet_authentication={ "result": "success", "success": { - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, }, digital_wallet_token={ "approval": { - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, "decline": {"reason": "x"}, @@ -196,13 +196,13 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) digital_wallet_authentication={ "result": "success", "success": { - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, }, digital_wallet_token={ "approval": { - "email": "x", + "email": "dev@stainless.com", "phone": "x", }, "decline": {"reason": "x"}, From 35d719fdc065f7b35ec0144a889e59676666c47d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 16:27:33 +0000 Subject: [PATCH 0925/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e9f340470..62c73da10 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.359.0" + ".": "0.360.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d5e0c7426..b67bc6a7d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.359.0" +version = "0.360.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e79acdccf..6c7724f47 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.359.0" # x-release-please-version +__version__ = "0.360.0" # x-release-please-version From 41ca1f521e1f95ccd30ee6fd7528b99007a22b98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 21:07:32 +0000 Subject: [PATCH 0926/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/real_time_decision.py | 7 ------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d2d5b8d9..ffbf262f2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bee1322960faf189518a3ac4b28f52fab559d991b86edfebe33795ed60f4af0f.yml -openapi_spec_hash: c3f12839150ef30de08776d0ea693f59 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d7cf5ee0996fbe47611e26c72b8bd36151ce065c410488583977102f1812b84d.yml +openapi_spec_hash: 8c0f2a172afc0eb0f9fae50250c89216 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index c05fcd483..6b9aa8478 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -732,13 +732,6 @@ class DigitalWalletToken(BaseModel): card_id: str """The identifier of the Card that is being tokenized.""" - card_profile_id: Optional[str] = None - """The identifier of the Card Profile that was set via the real time decision. - - This will be null until the real time decision is responded to or if the real - time decision did not set a card profile. - """ - decision: Optional[Literal["approve", "decline"]] = None """Whether or not the provisioning request was approved. From 71e76e500ff20480728e197eca3832874d8c13d9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 16 Oct 2025 21:10:36 +0000 Subject: [PATCH 0927/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 62c73da10..b1b5a42f0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.360.0" + ".": "0.361.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b67bc6a7d..7d272052c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.360.0" +version = "0.361.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6c7724f47..19371429c 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.360.0" # x-release-please-version +__version__ = "0.361.0" # x-release-please-version From 5b3fc929546b8f7c30da36df3536f737efc93d65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 17 Oct 2025 10:23:11 +0000 Subject: [PATCH 0928/1325] chore: bump `httpx-aiohttp` version to 0.1.9 --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- requirements.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7d272052c..8f8c1fd94 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -39,7 +39,7 @@ Homepage = "https://github.com/Increase/increase-python" Repository = "https://github.com/Increase/increase-python" [project.optional-dependencies] -aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.8"] +aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index d0fe722c9..18804abe3 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -56,7 +56,7 @@ httpx==0.28.1 # via httpx-aiohttp # via increase # via respx -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via increase idna==3.4 # via anyio diff --git a/requirements.lock b/requirements.lock index 3a21efa98..ac22be93c 100644 --- a/requirements.lock +++ b/requirements.lock @@ -43,7 +43,7 @@ httpcore==1.0.9 httpx==0.28.1 # via httpx-aiohttp # via increase -httpx-aiohttp==0.1.8 +httpx-aiohttp==0.1.9 # via increase idna==3.4 # via anyio From 5d356829f63baa89009f5b917414b70adc58da98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:07:13 +0000 Subject: [PATCH 0929/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ffbf262f2..f6d731d7e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d7cf5ee0996fbe47611e26c72b8bd36151ce065c410488583977102f1812b84d.yml -openapi_spec_hash: 8c0f2a172afc0eb0f9fae50250c89216 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b4cda5505a0662dcbad16dabc86715b5353a90685fa9047384e60156f898f3b8.yml +openapi_spec_hash: 0c831296b6f59e535c73162e0e18c175 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index e06677fed..5af5c428f 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -3881,6 +3881,12 @@ class State(BaseModel): transaction's currency. For dollars, for example, this is cents. """ + refund_authorized_amount: int + """ + The total refund authorized amount in the minor unit of the transaction's + currency. For dollars, for example, this is cents. + """ + refunded_amount: int """The total refunded amount in the minor unit of the transaction's currency. From 143aab93ec50543a1a3b1f74dee7b1b293591b26 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 00:10:23 +0000 Subject: [PATCH 0930/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b1b5a42f0..dea90ccf5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.361.0" + ".": "0.362.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8f8c1fd94..4c0ff9619 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.361.0" +version = "0.362.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 19371429c..e96a622ad 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.361.0" # x-release-please-version +__version__ = "0.362.0" # x-release-please-version From 9152322f74a73568bec3139bfe70759c1c495123 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 18:23:27 +0000 Subject: [PATCH 0931/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 9 ++++++--- src/increase/types/declined_transaction.py | 3 ++- src/increase/types/pending_transaction.py | 3 ++- src/increase/types/real_time_decision.py | 3 ++- src/increase/types/transaction.py | 3 ++- 6 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index f6d731d7e..c0b1861c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b4cda5505a0662dcbad16dabc86715b5353a90685fa9047384e60156f898f3b8.yml -openapi_spec_hash: 0c831296b6f59e535c73162e0e18c175 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77bf980f154392e3f2070aa38e38d8927ba8cff23d81bb6e5733fdd52a4e67b5.yml +openapi_spec_hash: 18a92821c3e77f158295ca50b4aa33b0 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 5af5c428f..93b1c3a4d 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -772,7 +772,8 @@ class ElementCardAuthorization(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ pending_transaction_id: Optional[str] = None @@ -1390,7 +1391,8 @@ class ElementCardDecline(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ physical_card_id: Optional[str] = None @@ -3695,7 +3697,8 @@ class ElementCardValidation(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ physical_card_id: Optional[str] = None diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index dfebaa434..9abffa208 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -623,7 +623,8 @@ class SourceCardDecline(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ physical_card_id: Optional[str] = None diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index f0d364331..9e3d2aac5 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -570,7 +570,8 @@ class SourceCardAuthorization(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ pending_transaction_id: Optional[str] = None diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 6b9aa8478..372b89d1d 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -594,7 +594,8 @@ class CardAuthorization(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ physical_card_id: Optional[str] = None diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 202fbd341..13295e053 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -983,7 +983,8 @@ class SourceCardFinancial(BaseModel): """The risk score generated by the card network. For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. """ physical_card_id: Optional[str] = None From 12f23400ffeeee5c33f982e60cb2a8ffa9271799 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 22 Oct 2025 18:26:29 +0000 Subject: [PATCH 0932/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index dea90ccf5..fb22e464d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.362.0" + ".": "0.363.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4c0ff9619..7602ea7ef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.362.0" +version = "0.363.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e96a622ad..32bd81220 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.362.0" # x-release-please-version +__version__ = "0.363.0" # x-release-please-version From 3c38f6d2344899624a2b8ca9d8c5a69be2c9dc90 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:24:45 +0000 Subject: [PATCH 0933/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c0b1861c7..381812862 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-77bf980f154392e3f2070aa38e38d8927ba8cff23d81bb6e5733fdd52a4e67b5.yml -openapi_spec_hash: 18a92821c3e77f158295ca50b4aa33b0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-569770c31254c7f2a732392f0a960ab529ea93d792991d0ad4b77ddb03cef90b.yml +openapi_spec_hash: ad8426915b3eb92c26351e2d87a6d891 config_hash: f0b80170c2ea09811aeae3f1e94bc422 diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 8baa04e9a..d955b0a3d 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -321,8 +321,9 @@ class CheckTransfer(BaseModel): - `full` - The available balance of the account must be at least the amount of the check, and a Pending Transaction will be created for the full amount. - - `none` - No balance check will performed; a zero-dollar Pending Transaction - will be created. + - `none` - No balance check will performed when the check transfer is initiated. + A zero-dollar Pending Transaction will be created. The balance will still be + checked when the Inbound Check Deposit is created. """ cancellation: Optional[Cancellation] = None From 7e64cb91fbabf2cff6f8b1d0d88c5a4cf3028f9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:28:04 +0000 Subject: [PATCH 0934/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fb22e464d..1f7dbf48e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.363.0" + ".": "0.364.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7602ea7ef..b024c6735 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.363.0" +version = "0.364.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 32bd81220..7e9f5de9b 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.363.0" # x-release-please-version +__version__ = "0.364.0" # x-release-please-version From d50a6d8b99cf28333c4dc7b56eb5c3c472a3d026 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 18:44:38 +0000 Subject: [PATCH 0935/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 381812862..0cfe0b4d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-569770c31254c7f2a732392f0a960ab529ea93d792991d0ad4b77ddb03cef90b.yml -openapi_spec_hash: ad8426915b3eb92c26351e2d87a6d891 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0373fbc3f512db9d7119c8fbda09e7b37b8937d8152a621ccac4a61cb26e645.yml +openapi_spec_hash: 775cf47e50fc4ca4afcb125134c393f9 config_hash: f0b80170c2ea09811aeae3f1e94bc422 From a0a5f678bd3d5204357f14137c9ac6b8604a9a4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 23 Oct 2025 22:55:23 +0000 Subject: [PATCH 0936/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0cfe0b4d6..7ca00a23c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f0373fbc3f512db9d7119c8fbda09e7b37b8937d8152a621ccac4a61cb26e645.yml -openapi_spec_hash: 775cf47e50fc4ca4afcb125134c393f9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c13eb8e2ccdb5028451b2a92338fccda6d83d1f3397c9f8f13afc276f61abbe2.yml +openapi_spec_hash: dcd90f19e2ac1931b2fa6c402a7a0082 config_hash: f0b80170c2ea09811aeae3f1e94bc422 From 91ba70eb2026742080aefc686b24ce181454cac6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:06:31 +0000 Subject: [PATCH 0937/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 35 + src/increase/_client.py | 30 + src/increase/resources/__init__.py | 28 + src/increase/resources/fednow_transfers.py | 702 ++++++++++++++++++ .../resources/inbound_fednow_transfers.py | 304 ++++++++ .../resources/simulations/__init__.py | 14 + .../simulations/inbound_fednow_transfers.py | 233 ++++++ .../resources/simulations/simulations.py | 32 + src/increase/types/__init__.py | 5 + src/increase/types/fednow_transfer.py | 267 +++++++ .../types/fednow_transfer_create_params.py | 77 ++ .../types/fednow_transfer_list_params.py | 91 +++ src/increase/types/inbound_fednow_transfer.py | 115 +++ .../inbound_fednow_transfer_list_params.py | 59 ++ src/increase/types/simulations/__init__.py | 3 + .../inbound_fednow_transfer_create_params.py | 27 + .../test_inbound_fednow_transfers.py | 116 +++ tests/api_resources/test_fednow_transfers.py | 488 ++++++++++++ .../test_inbound_fednow_transfers.py | 188 +++++ 20 files changed, 2818 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/fednow_transfers.py create mode 100644 src/increase/resources/inbound_fednow_transfers.py create mode 100644 src/increase/resources/simulations/inbound_fednow_transfers.py create mode 100644 src/increase/types/fednow_transfer.py create mode 100644 src/increase/types/fednow_transfer_create_params.py create mode 100644 src/increase/types/fednow_transfer_list_params.py create mode 100644 src/increase/types/inbound_fednow_transfer.py create mode 100644 src/increase/types/inbound_fednow_transfer_list_params.py create mode 100644 src/increase/types/simulations/inbound_fednow_transfer_create_params.py create mode 100644 tests/api_resources/simulations/test_inbound_fednow_transfers.py create mode 100644 tests/api_resources/test_fednow_transfers.py create mode 100644 tests/api_resources/test_inbound_fednow_transfers.py diff --git a/.stats.yml b/.stats.yml index 7ca00a23c..2363e1cfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 220 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c13eb8e2ccdb5028451b2a92338fccda6d83d1f3397c9f8f13afc276f61abbe2.yml -openapi_spec_hash: dcd90f19e2ac1931b2fa6c402a7a0082 -config_hash: f0b80170c2ea09811aeae3f1e94bc422 +configured_endpoints: 228 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e809e9e4e5bc9c602a2ecebfbdb4a77d6c88c6f70f0b47a7a4d1dd1df4aaa66d.yml +openapi_spec_hash: cb6cb9fa09a8e52f6eb89271b559823d +config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/api.md b/api.md index 65793f1c2..e96f9618c 100644 --- a/api.md +++ b/api.md @@ -371,6 +371,35 @@ Methods: - client.inbound_real_time_payments_transfers.retrieve(inbound_real_time_payments_transfer_id) -> InboundRealTimePaymentsTransfer - client.inbound_real_time_payments_transfers.list(\*\*params) -> SyncPage[InboundRealTimePaymentsTransfer] +# FednowTransfers + +Types: + +```python +from increase.types import FednowTransfer +``` + +Methods: + +- client.fednow_transfers.create(\*\*params) -> FednowTransfer +- client.fednow_transfers.retrieve(fednow_transfer_id) -> FednowTransfer +- client.fednow_transfers.list(\*\*params) -> SyncPage[FednowTransfer] +- client.fednow_transfers.approve(fednow_transfer_id) -> FednowTransfer +- client.fednow_transfers.cancel(fednow_transfer_id) -> FednowTransfer + +# InboundFednowTransfers + +Types: + +```python +from increase.types import InboundFednowTransfer +``` + +Methods: + +- client.inbound_fednow_transfers.retrieve(inbound_fednow_transfer_id) -> InboundFednowTransfer +- client.inbound_fednow_transfers.list(\*\*params) -> SyncPage[InboundFednowTransfer] + # CheckDeposits Types: @@ -933,6 +962,12 @@ Methods: - client.simulations.inbound_real_time_payments_transfers.create(\*\*params) -> InboundRealTimePaymentsTransfer +## InboundFednowTransfers + +Methods: + +- client.simulations.inbound_fednow_transfers.create(\*\*params) -> InboundFednowTransfer + ## CheckDeposits Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index 232c4be3b..aa3fdba86 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -50,6 +50,7 @@ check_transfers, routing_numbers, card_validations, + fednow_transfers, intrafi_balances, account_transfers, external_accounts, @@ -75,6 +76,7 @@ physical_card_profiles, supplemental_documents, wire_drawdown_requests, + inbound_fednow_transfers, card_purchase_supplements, intrafi_account_enrollments, real_time_payments_transfers, @@ -134,6 +136,8 @@ class Increase(SyncAPIClient): inbound_check_deposits: inbound_check_deposits.InboundCheckDepositsResource real_time_payments_transfers: real_time_payments_transfers.RealTimePaymentsTransfersResource inbound_real_time_payments_transfers: inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource + fednow_transfers: fednow_transfers.FednowTransfersResource + inbound_fednow_transfers: inbound_fednow_transfers.InboundFednowTransfersResource check_deposits: check_deposits.CheckDepositsResource lockboxes: lockboxes.LockboxesResource inbound_mail_items: inbound_mail_items.InboundMailItemsResource @@ -282,6 +286,8 @@ def __init__( self.inbound_real_time_payments_transfers = ( inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource(self) ) + self.fednow_transfers = fednow_transfers.FednowTransfersResource(self) + self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResource(self) self.check_deposits = check_deposits.CheckDepositsResource(self) self.lockboxes = lockboxes.LockboxesResource(self) self.inbound_mail_items = inbound_mail_items.InboundMailItemsResource(self) @@ -497,6 +503,8 @@ class AsyncIncrease(AsyncAPIClient): inbound_real_time_payments_transfers: ( inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource ) + fednow_transfers: fednow_transfers.AsyncFednowTransfersResource + inbound_fednow_transfers: inbound_fednow_transfers.AsyncInboundFednowTransfersResource check_deposits: check_deposits.AsyncCheckDepositsResource lockboxes: lockboxes.AsyncLockboxesResource inbound_mail_items: inbound_mail_items.AsyncInboundMailItemsResource @@ -647,6 +655,8 @@ def __init__( self.inbound_real_time_payments_transfers = ( inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource(self) ) + self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResource(self) + self.inbound_fednow_transfers = inbound_fednow_transfers.AsyncInboundFednowTransfersResource(self) self.check_deposits = check_deposits.AsyncCheckDepositsResource(self) self.lockboxes = lockboxes.AsyncLockboxesResource(self) self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResource(self) @@ -895,6 +905,10 @@ def __init__(self, client: Increase) -> None: client.inbound_real_time_payments_transfers ) ) + self.fednow_transfers = fednow_transfers.FednowTransfersResourceWithRawResponse(client.fednow_transfers) + self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResourceWithRawResponse( + client.inbound_fednow_transfers + ) self.check_deposits = check_deposits.CheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = lockboxes.LockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) @@ -1006,6 +1020,10 @@ def __init__(self, client: AsyncIncrease) -> None: client.inbound_real_time_payments_transfers ) ) + self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResourceWithRawResponse(client.fednow_transfers) + self.inbound_fednow_transfers = inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithRawResponse( + client.inbound_fednow_transfers + ) self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) self.lockboxes = lockboxes.AsyncLockboxesResourceWithRawResponse(client.lockboxes) self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithRawResponse( @@ -1131,6 +1149,10 @@ def __init__(self, client: Increase) -> None: client.inbound_real_time_payments_transfers ) ) + self.fednow_transfers = fednow_transfers.FednowTransfersResourceWithStreamingResponse(client.fednow_transfers) + self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResourceWithStreamingResponse( + client.inbound_fednow_transfers + ) self.check_deposits = check_deposits.CheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = lockboxes.LockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithStreamingResponse( @@ -1258,6 +1280,14 @@ def __init__(self, client: AsyncIncrease) -> None: client.inbound_real_time_payments_transfers ) ) + self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResourceWithStreamingResponse( + client.fednow_transfers + ) + self.inbound_fednow_transfers = ( + inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithStreamingResponse( + client.inbound_fednow_transfers + ) + ) self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) self.lockboxes = lockboxes.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithStreamingResponse( diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 7d0ef2b23..bcdcfd1d4 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -200,6 +200,14 @@ CardValidationsResourceWithStreamingResponse, AsyncCardValidationsResourceWithStreamingResponse, ) +from .fednow_transfers import ( + FednowTransfersResource, + AsyncFednowTransfersResource, + FednowTransfersResourceWithRawResponse, + AsyncFednowTransfersResourceWithRawResponse, + FednowTransfersResourceWithStreamingResponse, + AsyncFednowTransfersResourceWithStreamingResponse, +) from .intrafi_balances import ( IntrafiBalancesResource, AsyncIntrafiBalancesResource, @@ -400,6 +408,14 @@ WireDrawdownRequestsResourceWithStreamingResponse, AsyncWireDrawdownRequestsResourceWithStreamingResponse, ) +from .inbound_fednow_transfers import ( + InboundFednowTransfersResource, + AsyncInboundFednowTransfersResource, + InboundFednowTransfersResourceWithRawResponse, + AsyncInboundFednowTransfersResourceWithRawResponse, + InboundFednowTransfersResourceWithStreamingResponse, + AsyncInboundFednowTransfersResourceWithStreamingResponse, +) from .card_purchase_supplements import ( CardPurchaseSupplementsResource, AsyncCardPurchaseSupplementsResource, @@ -592,6 +608,18 @@ "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "FednowTransfersResource", + "AsyncFednowTransfersResource", + "FednowTransfersResourceWithRawResponse", + "AsyncFednowTransfersResourceWithRawResponse", + "FednowTransfersResourceWithStreamingResponse", + "AsyncFednowTransfersResourceWithStreamingResponse", + "InboundFednowTransfersResource", + "AsyncInboundFednowTransfersResource", + "InboundFednowTransfersResourceWithRawResponse", + "AsyncInboundFednowTransfersResourceWithRawResponse", + "InboundFednowTransfersResourceWithStreamingResponse", + "AsyncInboundFednowTransfersResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", diff --git a/src/increase/resources/fednow_transfers.py b/src/increase/resources/fednow_transfers.py new file mode 100644 index 000000000..1ae25dc75 --- /dev/null +++ b/src/increase/resources/fednow_transfers.py @@ -0,0 +1,702 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import fednow_transfer_list_params, fednow_transfer_create_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.fednow_transfer import FednowTransfer + +__all__ = ["FednowTransfersResource", "AsyncFednowTransfersResource"] + + +class FednowTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> FednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return FednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> FednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return FednowTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + amount: int, + creditor_name: str, + debtor_name: str, + source_account_number_id: str, + unstructured_remittance_information: str, + account_number: str | Omit = omit, + creditor_address: fednow_transfer_create_params.CreditorAddress | Omit = omit, + debtor_address: fednow_transfer_create_params.DebtorAddress | Omit = omit, + external_account_id: str | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Create a FedNow Transfer + + Args: + account_id: The identifier for the account that will send the transfer. + + amount: The amount, in minor units, to send to the creditor. + + creditor_name: The creditor's name. + + debtor_name: The debtor's name. + + source_account_number_id: The Account Number to include in the transfer as the debtor's account number. + + unstructured_remittance_information: Unstructured remittance information to include in the transfer. + + account_number: The creditor's account number. + + creditor_address: The creditor's address. + + debtor_address: The debtor's address. + + external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is + provided, `account_number` and `routing_number` must be absent. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + routing_number: The creditor's bank account routing number. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/fednow_transfers", + body=maybe_transform( + { + "account_id": account_id, + "amount": amount, + "creditor_name": creditor_name, + "debtor_name": debtor_name, + "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "account_number": account_number, + "creditor_address": creditor_address, + "debtor_address": debtor_address, + "external_account_id": external_account_id, + "require_approval": require_approval, + "routing_number": routing_number, + }, + fednow_transfer_create_params.FednowTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + def retrieve( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FednowTransfer: + """ + Retrieve a FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the FedNow Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return self._get( + f"/fednow_transfers/{fednow_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FednowTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + created_at: fednow_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: fednow_transfer_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[FednowTransfer]: + """ + List FedNow Transfers + + Args: + account_id: Filter FedNow Transfers to those that originated from the specified Account. + + cursor: Return the page of entries after this one. + + external_account_id: Filter FedNow Transfers to those made to the specified External Account. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/fednow_transfers", + page=SyncPage[FednowTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + fednow_transfer_list_params.FednowTransferListParams, + ), + ), + model=FednowTransfer, + ) + + def approve( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Approve a FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the FedNow Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return self._post( + f"/fednow_transfers/{fednow_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + def cancel( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Cancel a pending FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the pending FedNow Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return self._post( + f"/fednow_transfers/{fednow_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + +class AsyncFednowTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncFednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncFednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncFednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncFednowTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + amount: int, + creditor_name: str, + debtor_name: str, + source_account_number_id: str, + unstructured_remittance_information: str, + account_number: str | Omit = omit, + creditor_address: fednow_transfer_create_params.CreditorAddress | Omit = omit, + debtor_address: fednow_transfer_create_params.DebtorAddress | Omit = omit, + external_account_id: str | Omit = omit, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Create a FedNow Transfer + + Args: + account_id: The identifier for the account that will send the transfer. + + amount: The amount, in minor units, to send to the creditor. + + creditor_name: The creditor's name. + + debtor_name: The debtor's name. + + source_account_number_id: The Account Number to include in the transfer as the debtor's account number. + + unstructured_remittance_information: Unstructured remittance information to include in the transfer. + + account_number: The creditor's account number. + + creditor_address: The creditor's address. + + debtor_address: The debtor's address. + + external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is + provided, `account_number` and `routing_number` must be absent. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + routing_number: The creditor's bank account routing number. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/fednow_transfers", + body=await async_maybe_transform( + { + "account_id": account_id, + "amount": amount, + "creditor_name": creditor_name, + "debtor_name": debtor_name, + "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "account_number": account_number, + "creditor_address": creditor_address, + "debtor_address": debtor_address, + "external_account_id": external_account_id, + "require_approval": require_approval, + "routing_number": routing_number, + }, + fednow_transfer_create_params.FednowTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + async def retrieve( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> FednowTransfer: + """ + Retrieve a FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the FedNow Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return await self._get( + f"/fednow_transfers/{fednow_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=FednowTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + created_at: fednow_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + external_account_id: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: fednow_transfer_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[FednowTransfer, AsyncPage[FednowTransfer]]: + """ + List FedNow Transfers + + Args: + account_id: Filter FedNow Transfers to those that originated from the specified Account. + + cursor: Return the page of entries after this one. + + external_account_id: Filter FedNow Transfers to those made to the specified External Account. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/fednow_transfers", + page=AsyncPage[FednowTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "external_account_id": external_account_id, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + fednow_transfer_list_params.FednowTransferListParams, + ), + ), + model=FednowTransfer, + ) + + async def approve( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Approve a FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the FedNow Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return await self._post( + f"/fednow_transfers/{fednow_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + async def cancel( + self, + fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> FednowTransfer: + """ + Cancel a pending FedNow Transfer + + Args: + fednow_transfer_id: The identifier of the pending FedNow Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not fednow_transfer_id: + raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") + return await self._post( + f"/fednow_transfers/{fednow_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=FednowTransfer, + ) + + +class FednowTransfersResourceWithRawResponse: + def __init__(self, fednow_transfers: FednowTransfersResource) -> None: + self._fednow_transfers = fednow_transfers + + self.create = to_raw_response_wrapper( + fednow_transfers.create, + ) + self.retrieve = to_raw_response_wrapper( + fednow_transfers.retrieve, + ) + self.list = to_raw_response_wrapper( + fednow_transfers.list, + ) + self.approve = to_raw_response_wrapper( + fednow_transfers.approve, + ) + self.cancel = to_raw_response_wrapper( + fednow_transfers.cancel, + ) + + +class AsyncFednowTransfersResourceWithRawResponse: + def __init__(self, fednow_transfers: AsyncFednowTransfersResource) -> None: + self._fednow_transfers = fednow_transfers + + self.create = async_to_raw_response_wrapper( + fednow_transfers.create, + ) + self.retrieve = async_to_raw_response_wrapper( + fednow_transfers.retrieve, + ) + self.list = async_to_raw_response_wrapper( + fednow_transfers.list, + ) + self.approve = async_to_raw_response_wrapper( + fednow_transfers.approve, + ) + self.cancel = async_to_raw_response_wrapper( + fednow_transfers.cancel, + ) + + +class FednowTransfersResourceWithStreamingResponse: + def __init__(self, fednow_transfers: FednowTransfersResource) -> None: + self._fednow_transfers = fednow_transfers + + self.create = to_streamed_response_wrapper( + fednow_transfers.create, + ) + self.retrieve = to_streamed_response_wrapper( + fednow_transfers.retrieve, + ) + self.list = to_streamed_response_wrapper( + fednow_transfers.list, + ) + self.approve = to_streamed_response_wrapper( + fednow_transfers.approve, + ) + self.cancel = to_streamed_response_wrapper( + fednow_transfers.cancel, + ) + + +class AsyncFednowTransfersResourceWithStreamingResponse: + def __init__(self, fednow_transfers: AsyncFednowTransfersResource) -> None: + self._fednow_transfers = fednow_transfers + + self.create = async_to_streamed_response_wrapper( + fednow_transfers.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + fednow_transfers.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + fednow_transfers.list, + ) + self.approve = async_to_streamed_response_wrapper( + fednow_transfers.approve, + ) + self.cancel = async_to_streamed_response_wrapper( + fednow_transfers.cancel, + ) diff --git a/src/increase/resources/inbound_fednow_transfers.py b/src/increase/resources/inbound_fednow_transfers.py new file mode 100644 index 000000000..9a314e19f --- /dev/null +++ b/src/increase/resources/inbound_fednow_transfers.py @@ -0,0 +1,304 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import inbound_fednow_transfer_list_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.inbound_fednow_transfer import InboundFednowTransfer + +__all__ = ["InboundFednowTransfersResource", "AsyncInboundFednowTransfersResource"] + + +class InboundFednowTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundFednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return InboundFednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundFednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return InboundFednowTransfersResourceWithStreamingResponse(self) + + def retrieve( + self, + inbound_fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> InboundFednowTransfer: + """ + Retrieve an Inbound FedNow Transfer + + Args: + inbound_fednow_transfer_id: The identifier of the Inbound FedNow Transfer to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_fednow_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_fednow_transfer_id` but received {inbound_fednow_transfer_id!r}" + ) + return self._get( + f"/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundFednowTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_fednow_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[InboundFednowTransfer]: + """ + List Inbound FedNow Transfers + + Args: + account_id: Filter Inbound FedNow Transfers to those belonging to the specified Account. + + account_number_id: Filter Inbound FedNow Transfers to ones belonging to the specified Account + Number. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_fednow_transfers", + page=SyncPage[InboundFednowTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "account_number_id": account_number_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_fednow_transfer_list_params.InboundFednowTransferListParams, + ), + ), + model=InboundFednowTransfer, + ) + + +class AsyncInboundFednowTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundFednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncInboundFednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundFednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncInboundFednowTransfersResourceWithStreamingResponse(self) + + async def retrieve( + self, + inbound_fednow_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> InboundFednowTransfer: + """ + Retrieve an Inbound FedNow Transfer + + Args: + inbound_fednow_transfer_id: The identifier of the Inbound FedNow Transfer to get details for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not inbound_fednow_transfer_id: + raise ValueError( + f"Expected a non-empty value for `inbound_fednow_transfer_id` but received {inbound_fednow_transfer_id!r}" + ) + return await self._get( + f"/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=InboundFednowTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + account_number_id: str | Omit = omit, + created_at: inbound_fednow_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + limit: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[InboundFednowTransfer, AsyncPage[InboundFednowTransfer]]: + """ + List Inbound FedNow Transfers + + Args: + account_id: Filter Inbound FedNow Transfers to those belonging to the specified Account. + + account_number_id: Filter Inbound FedNow Transfers to ones belonging to the specified Account + Number. + + cursor: Return the page of entries after this one. + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/inbound_fednow_transfers", + page=AsyncPage[InboundFednowTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "account_number_id": account_number_id, + "created_at": created_at, + "cursor": cursor, + "limit": limit, + }, + inbound_fednow_transfer_list_params.InboundFednowTransferListParams, + ), + ), + model=InboundFednowTransfer, + ) + + +class InboundFednowTransfersResourceWithRawResponse: + def __init__(self, inbound_fednow_transfers: InboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.retrieve = to_raw_response_wrapper( + inbound_fednow_transfers.retrieve, + ) + self.list = to_raw_response_wrapper( + inbound_fednow_transfers.list, + ) + + +class AsyncInboundFednowTransfersResourceWithRawResponse: + def __init__(self, inbound_fednow_transfers: AsyncInboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.retrieve = async_to_raw_response_wrapper( + inbound_fednow_transfers.retrieve, + ) + self.list = async_to_raw_response_wrapper( + inbound_fednow_transfers.list, + ) + + +class InboundFednowTransfersResourceWithStreamingResponse: + def __init__(self, inbound_fednow_transfers: InboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.retrieve = to_streamed_response_wrapper( + inbound_fednow_transfers.retrieve, + ) + self.list = to_streamed_response_wrapper( + inbound_fednow_transfers.list, + ) + + +class AsyncInboundFednowTransfersResourceWithStreamingResponse: + def __init__(self, inbound_fednow_transfers: AsyncInboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.retrieve = async_to_streamed_response_wrapper( + inbound_fednow_transfers.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + inbound_fednow_transfers.list, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index c1a47a541..27f9585d1 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -200,6 +200,14 @@ CardFuelConfirmationsResourceWithStreamingResponse, AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) +from .inbound_fednow_transfers import ( + InboundFednowTransfersResource, + AsyncInboundFednowTransfersResource, + InboundFednowTransfersResourceWithRawResponse, + AsyncInboundFednowTransfersResourceWithRawResponse, + InboundFednowTransfersResourceWithStreamingResponse, + AsyncInboundFednowTransfersResourceWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfersResource, AsyncRealTimePaymentsTransfersResource, @@ -380,6 +388,12 @@ "AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse", "InboundRealTimePaymentsTransfersResourceWithStreamingResponse", "AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse", + "InboundFednowTransfersResource", + "AsyncInboundFednowTransfersResource", + "InboundFednowTransfersResourceWithRawResponse", + "AsyncInboundFednowTransfersResourceWithRawResponse", + "InboundFednowTransfersResourceWithStreamingResponse", + "AsyncInboundFednowTransfersResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/inbound_fednow_transfers.py b/src/increase/resources/simulations/inbound_fednow_transfers.py new file mode 100644 index 000000000..013c5e352 --- /dev/null +++ b/src/increase/resources/simulations/inbound_fednow_transfers.py @@ -0,0 +1,233 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import inbound_fednow_transfer_create_params +from ...types.inbound_fednow_transfer import InboundFednowTransfer + +__all__ = ["InboundFednowTransfersResource", "AsyncInboundFednowTransfersResource"] + + +class InboundFednowTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> InboundFednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return InboundFednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> InboundFednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return InboundFednowTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundFednowTransfer: + """ + Simulates an [Inbound FedNow Transfer](#inbound-fednow-transfers) to your + account. + + Args: + account_number_id: The identifier of the Account Number the inbound FedNow Transfer is for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + unstructured_remittance_information: Additional information included with the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/inbound_fednow_transfers", + body=maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "unstructured_remittance_information": unstructured_remittance_information, + }, + inbound_fednow_transfer_create_params.InboundFednowTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundFednowTransfer, + ) + + +class AsyncInboundFednowTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncInboundFednowTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncInboundFednowTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncInboundFednowTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncInboundFednowTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_number_id: str, + amount: int, + debtor_account_number: str | Omit = omit, + debtor_name: str | Omit = omit, + debtor_routing_number: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundFednowTransfer: + """ + Simulates an [Inbound FedNow Transfer](#inbound-fednow-transfers) to your + account. + + Args: + account_number_id: The identifier of the Account Number the inbound FedNow Transfer is for. + + amount: The transfer amount in USD cents. Must be positive. + + debtor_account_number: The account number of the account that sent the transfer. + + debtor_name: The name provided by the sender of the transfer. + + debtor_routing_number: The routing number of the account that sent the transfer. + + unstructured_remittance_information: Additional information included with the transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/inbound_fednow_transfers", + body=await async_maybe_transform( + { + "account_number_id": account_number_id, + "amount": amount, + "debtor_account_number": debtor_account_number, + "debtor_name": debtor_name, + "debtor_routing_number": debtor_routing_number, + "unstructured_remittance_information": unstructured_remittance_information, + }, + inbound_fednow_transfer_create_params.InboundFednowTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundFednowTransfer, + ) + + +class InboundFednowTransfersResourceWithRawResponse: + def __init__(self, inbound_fednow_transfers: InboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.create = to_raw_response_wrapper( + inbound_fednow_transfers.create, + ) + + +class AsyncInboundFednowTransfersResourceWithRawResponse: + def __init__(self, inbound_fednow_transfers: AsyncInboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.create = async_to_raw_response_wrapper( + inbound_fednow_transfers.create, + ) + + +class InboundFednowTransfersResourceWithStreamingResponse: + def __init__(self, inbound_fednow_transfers: InboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.create = to_streamed_response_wrapper( + inbound_fednow_transfers.create, + ) + + +class AsyncInboundFednowTransfersResourceWithStreamingResponse: + def __init__(self, inbound_fednow_transfers: AsyncInboundFednowTransfersResource) -> None: + self._inbound_fednow_transfers = inbound_fednow_transfers + + self.create = async_to_streamed_response_wrapper( + inbound_fednow_transfers.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4b1ea1a12..4dda2f035 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -196,6 +196,14 @@ CardFuelConfirmationsResourceWithStreamingResponse, AsyncCardFuelConfirmationsResourceWithStreamingResponse, ) +from .inbound_fednow_transfers import ( + InboundFednowTransfersResource, + AsyncInboundFednowTransfersResource, + InboundFednowTransfersResourceWithRawResponse, + AsyncInboundFednowTransfersResourceWithRawResponse, + InboundFednowTransfersResourceWithStreamingResponse, + AsyncInboundFednowTransfersResourceWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfersResource, AsyncRealTimePaymentsTransfersResource, @@ -333,6 +341,10 @@ def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: return InboundRealTimePaymentsTransfersResource(self._client) + @cached_property + def inbound_fednow_transfers(self) -> InboundFednowTransfersResource: + return InboundFednowTransfersResource(self._client) + @cached_property def check_deposits(self) -> CheckDepositsResource: return CheckDepositsResource(self._client) @@ -470,6 +482,10 @@ def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: return AsyncInboundRealTimePaymentsTransfersResource(self._client) + @cached_property + def inbound_fednow_transfers(self) -> AsyncInboundFednowTransfersResource: + return AsyncInboundFednowTransfersResource(self._client) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResource: return AsyncCheckDepositsResource(self._client) @@ -612,6 +628,10 @@ def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfe self._simulations.inbound_real_time_payments_transfers ) + @cached_property + def inbound_fednow_transfers(self) -> InboundFednowTransfersResourceWithRawResponse: + return InboundFednowTransfersResourceWithRawResponse(self._simulations.inbound_fednow_transfers) + @cached_property def check_deposits(self) -> CheckDepositsResourceWithRawResponse: return CheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -737,6 +757,10 @@ def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTr self._simulations.inbound_real_time_payments_transfers ) + @cached_property + def inbound_fednow_transfers(self) -> AsyncInboundFednowTransfersResourceWithRawResponse: + return AsyncInboundFednowTransfersResourceWithRawResponse(self._simulations.inbound_fednow_transfers) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: return AsyncCheckDepositsResourceWithRawResponse(self._simulations.check_deposits) @@ -864,6 +888,10 @@ def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfe self._simulations.inbound_real_time_payments_transfers ) + @cached_property + def inbound_fednow_transfers(self) -> InboundFednowTransfersResourceWithStreamingResponse: + return InboundFednowTransfersResourceWithStreamingResponse(self._simulations.inbound_fednow_transfers) + @cached_property def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: return CheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) @@ -997,6 +1025,10 @@ def inbound_real_time_payments_transfers( self._simulations.inbound_real_time_payments_transfers ) + @cached_property + def inbound_fednow_transfers(self) -> AsyncInboundFednowTransfersResourceWithStreamingResponse: + return AsyncInboundFednowTransfersResourceWithStreamingResponse(self._simulations.inbound_fednow_transfers) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: return AsyncCheckDepositsResourceWithStreamingResponse(self._simulations.check_deposits) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 7c32ee8e1..c9662e0a1 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -28,6 +28,7 @@ from .check_transfer import CheckTransfer as CheckTransfer from .card_iframe_url import CardIframeURL as CardIframeURL from .card_validation import CardValidation as CardValidation +from .fednow_transfer import FednowTransfer as FednowTransfer from .intrafi_balance import IntrafiBalance as IntrafiBalance from .account_transfer import AccountTransfer as AccountTransfer from .card_list_params import CardListParams as CardListParams @@ -78,6 +79,7 @@ from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams +from .inbound_fednow_transfer import InboundFednowTransfer as InboundFednowTransfer from .transaction_list_params import TransactionListParams as TransactionListParams from .ach_transfer_list_params import ACHTransferListParams as ACHTransferListParams from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams @@ -96,6 +98,7 @@ from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .card_validation_list_params import CardValidationListParams as CardValidationListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams +from .fednow_transfer_list_params import FednowTransferListParams as FednowTransferListParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams from .physical_card_update_params import PhysicalCardUpdateParams as PhysicalCardUpdateParams from .real_time_payments_transfer import RealTimePaymentsTransfer as RealTimePaymentsTransfer @@ -112,6 +115,7 @@ from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .card_validation_create_params import CardValidationCreateParams as CardValidationCreateParams +from .fednow_transfer_create_params import FednowTransferCreateParams as FednowTransferCreateParams from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams @@ -153,6 +157,7 @@ from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams from .inbound_ach_transfer_decline_params import InboundACHTransferDeclineParams as InboundACHTransferDeclineParams from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams +from .inbound_fednow_transfer_list_params import InboundFednowTransferListParams as InboundFednowTransferListParams from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer as InboundRealTimePaymentsTransfer from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams diff --git a/src/increase/types/fednow_transfer.py b/src/increase/types/fednow_transfer.py new file mode 100644 index 000000000..2336f52bf --- /dev/null +++ b/src/increase/types/fednow_transfer.py @@ -0,0 +1,267 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "FednowTransfer", + "Acknowledgement", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "Rejection", + "Submission", +] + + +class Acknowledgement(BaseModel): + acknowledged_at: datetime + """When the transfer was acknowledged.""" + + +class CreatedByAPIKey(BaseModel): + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + +class Rejection(BaseModel): + reject_reason_additional_information: Optional[str] = None + """Additional information about the rejection provided by the recipient bank.""" + + reject_reason_code: Literal[ + "account_closed", + "account_blocked", + "invalid_creditor_account_type", + "invalid_creditor_account_number", + "invalid_creditor_financial_institution_identifier", + "end_customer_deceased", + "narrative", + "transaction_forbidden", + "transaction_type_not_supported", + "amount_exceeds_bank_limits", + "invalid_creditor_address", + "invalid_debtor_address", + "timeout", + "processing_error", + "other", + ] + """ + The reason the transfer was rejected as provided by the recipient bank or the + FedNow network. + + - `account_closed` - The destination account is closed. Corresponds to the + FedNow reason code `AC04`. + - `account_blocked` - The destination account is currently blocked from + receiving transactions. Corresponds to the FedNow reason code `AC06`. + - `invalid_creditor_account_type` - The destination account is ineligible to + receive FedNow transfers. Corresponds to the FedNow reason code `AC14`. + - `invalid_creditor_account_number` - The destination account does not exist. + Corresponds to the FedNow reason code `AC03`. + - `invalid_creditor_financial_institution_identifier` - The destination routing + number is invalid. Corresponds to the FedNow reason code `RC04`. + - `end_customer_deceased` - The destination account holder is deceased. + Corresponds to the FedNow reason code `MD07`. + - `narrative` - The reason is provided as narrative information in the + additional information field. Corresponds to the FedNow reason code `NARR`. + - `transaction_forbidden` - FedNow transfers are not allowed to the destination + account. Corresponds to the FedNow reason code `AG01`. + - `transaction_type_not_supported` - FedNow transfers are not enabled for the + destination account. Corresponds to the FedNow reason code `AG03`. + - `amount_exceeds_bank_limits` - The amount is higher than the recipient is + authorized to send or receive. Corresponds to the FedNow reason code `E990`. + - `invalid_creditor_address` - The creditor's address is required, but missing + or invalid. Corresponds to the FedNow reason code `BE04`. + - `invalid_debtor_address` - The debtor's address is required, but missing or + invalid. Corresponds to the FedNow reason code `BE07`. + - `timeout` - There was a timeout processing the transfer. Corresponds to the + FedNow reason code `E997`. + - `processing_error` - The transfer was rejected due to an internal Increase + issue. We have been notified. + - `other` - Some other error or issue has occurred. + """ + + rejected_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was rejected. + """ + + +class Submission(BaseModel): + message_identification: str + """The FedNow network identification of the message submitted.""" + + submitted_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was submitted to FedNow. + """ + + +class FednowTransfer(BaseModel): + id: str + """The FedNow Transfer's identifier.""" + + account_id: str + """The Account from which the transfer was sent.""" + + account_number: str + """The destination account number.""" + + acknowledgement: Optional[Acknowledgement] = None + """ + If the transfer is acknowledged by the recipient bank, this will contain + supplemental details. + """ + + amount: int + """The transfer amount in USD cents.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + created_by: Optional[CreatedBy] = None + """What object created the transfer, either via the API or the dashboard.""" + + creditor_name: str + """The name of the transfer's recipient. + + This is set by the sender when creating the transfer. + """ + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's + currency. For FedNow transfers this is always equal to `USD`. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_name: str + """The name of the transfer's sender. + + If not provided, defaults to the name of the account's entity. + """ + + external_account_id: Optional[str] = None + """The identifier of the External Account the transfer was made to, if any.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + pending_transaction_id: Optional[str] = None + """The ID for the pending transaction representing the transfer.""" + + rejection: Optional[Rejection] = None + """ + If the transfer is rejected by FedNow or the destination financial institution, + this will contain supplemental details. + """ + + routing_number: str + """ + The destination American Bankers' Association (ABA) Routing Transit Number + (RTN). + """ + + source_account_number_id: str + """The Account Number the recipient will see as having sent the transfer.""" + + status: Literal[ + "pending_reviewing", + "canceled", + "reviewing_rejected", + "requires_attention", + "pending_approval", + "pending_submitting", + "pending_response", + "complete", + "rejected", + ] + """The lifecycle status of the transfer. + + - `pending_reviewing` - The transfer is pending review by Increase. + - `canceled` - The transfer has been canceled. + - `reviewing_rejected` - The transfer has been rejected by Increase. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `pending_approval` - The transfer is pending approval. + - `pending_submitting` - The transfer is queued to be submitted to FedNow. + - `pending_response` - The transfer has been submitted and is pending a response + from FedNow. + - `complete` - The transfer has been sent successfully and is complete. + - `rejected` - The transfer was rejected by the network or the recipient's bank. + """ + + submission: Optional[Submission] = None + """ + After the transfer is submitted to FedNow, this will contain supplemental + details. + """ + + transaction_id: Optional[str] = None + """The Transaction funding the transfer once it is complete.""" + + type: Literal["fednow_transfer"] + """A constant representing the object's type. + + For this resource it will always be `fednow_transfer`. + """ + + unique_end_to_end_transaction_reference: str + """ + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + of the transfer. + """ + + unstructured_remittance_information: str + """Unstructured information that will show on the recipient's bank statement.""" diff --git a/src/increase/types/fednow_transfer_create_params.py b/src/increase/types/fednow_transfer_create_params.py new file mode 100644 index 000000000..082a0c9d2 --- /dev/null +++ b/src/increase/types/fednow_transfer_create_params.py @@ -0,0 +1,77 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["FednowTransferCreateParams", "CreditorAddress", "DebtorAddress"] + + +class FednowTransferCreateParams(TypedDict, total=False): + account_id: Required[str] + """The identifier for the account that will send the transfer.""" + + amount: Required[int] + """The amount, in minor units, to send to the creditor.""" + + creditor_name: Required[str] + """The creditor's name.""" + + debtor_name: Required[str] + """The debtor's name.""" + + source_account_number_id: Required[str] + """The Account Number to include in the transfer as the debtor's account number.""" + + unstructured_remittance_information: Required[str] + """Unstructured remittance information to include in the transfer.""" + + account_number: str + """The creditor's account number.""" + + creditor_address: CreditorAddress + """The creditor's address.""" + + debtor_address: DebtorAddress + """The debtor's address.""" + + external_account_id: str + """The ID of an External Account to initiate a transfer to. + + If this parameter is provided, `account_number` and `routing_number` must be + absent. + """ + + require_approval: bool + """Whether the transfer requires explicit approval via the dashboard or API.""" + + routing_number: str + """The creditor's bank account routing number.""" + + +class CreditorAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + + postal_code: Required[str] + """The postal code component of the address.""" + + state: Required[str] + """The US state component of the address.""" + + line1: str + """The first line of the address. This is usually the street number and street.""" + + +class DebtorAddress(TypedDict, total=False): + city: Required[str] + """The city, district, town, or village of the address.""" + + postal_code: Required[str] + """The postal code component of the address.""" + + state: Required[str] + """The US state component of the address.""" + + line1: str + """The first line of the address. This is usually the street number and street.""" diff --git a/src/increase/types/fednow_transfer_list_params.py b/src/increase/types/fednow_transfer_list_params.py new file mode 100644 index 000000000..d3cd2ae3a --- /dev/null +++ b/src/increase/types/fednow_transfer_list_params.py @@ -0,0 +1,91 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["FednowTransferListParams", "CreatedAt", "Status"] + + +class FednowTransferListParams(TypedDict, total=False): + account_id: str + """Filter FedNow Transfers to those that originated from the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + external_account_id: str + """Filter FedNow Transfers to those made to the specified External Account.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_reviewing", + "canceled", + "reviewing_rejected", + "requires_attention", + "pending_approval", + "pending_submitting", + "pending_response", + "complete", + "rejected", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/src/increase/types/inbound_fednow_transfer.py b/src/increase/types/inbound_fednow_transfer.py new file mode 100644 index 000000000..78c915104 --- /dev/null +++ b/src/increase/types/inbound_fednow_transfer.py @@ -0,0 +1,115 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["InboundFednowTransfer", "Confirmation", "Decline"] + + +class Confirmation(BaseModel): + transfer_id: str + """The identifier of the FedNow Transfer that led to this Transaction.""" + + +class Decline(BaseModel): + reason: Literal[ + "account_number_canceled", + "account_number_disabled", + "account_restricted", + "group_locked", + "entity_not_active", + "fednow_not_enabled", + ] + """Why the transfer was declined. + + - `account_number_canceled` - The account number is canceled. + - `account_number_disabled` - The account number is disabled. + - `account_restricted` - Your account is restricted. + - `group_locked` - Your account is inactive. + - `entity_not_active` - The account's entity is not active. + - `fednow_not_enabled` - Your account is not enabled to receive FedNow + transfers. + """ + + transfer_id: str + """The identifier of the FedNow Transfer that led to this declined transaction.""" + + +class InboundFednowTransfer(BaseModel): + id: str + """The inbound FedNow transfer's identifier.""" + + account_id: str + """The Account to which the transfer was sent.""" + + account_number_id: str + """The identifier of the Account Number to which this transfer was sent.""" + + amount: int + """The amount in USD cents.""" + + confirmation: Optional[Confirmation] = None + """If your transfer is confirmed, this will contain details of the confirmation.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + creditor_name: str + """The name the sender of the transfer specified as the recipient of the transfer.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's + currency. This will always be "USD" for a FedNow transfer. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + decline: Optional[Decline] = None + """If your transfer is declined, this will contain details of the decline.""" + + status: Literal["pending_confirming", "timed_out", "confirmed", "declined", "requires_attention"] + """The lifecycle status of the transfer. + + - `pending_confirming` - The transfer is pending confirmation. + - `timed_out` - The transfer was not responded to in time. + - `confirmed` - The transfer has been received successfully and is confirmed. + - `declined` - The transfer has been declined. + - `requires_attention` - The transfer requires attention from an Increase + operator. + """ + + transaction_id: Optional[str] = None + """ + The identifier of the Transaction object created when the transfer was + confirmed. + """ + + type: Literal["inbound_fednow_transfer"] + """A constant representing the object's type. + + For this resource it will always be `inbound_fednow_transfer`. + """ + + unstructured_remittance_information: Optional[str] = None + """Additional information included with the transfer.""" diff --git a/src/increase/types/inbound_fednow_transfer_list_params.py b/src/increase/types/inbound_fednow_transfer_list_params.py new file mode 100644 index 000000000..130016d11 --- /dev/null +++ b/src/increase/types/inbound_fednow_transfer_list_params.py @@ -0,0 +1,59 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Union +from datetime import datetime +from typing_extensions import Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["InboundFednowTransferListParams", "CreatedAt"] + + +class InboundFednowTransferListParams(TypedDict, total=False): + account_id: str + """Filter Inbound FedNow Transfers to those belonging to the specified Account.""" + + account_number_id: str + """ + Filter Inbound FedNow Transfers to ones belonging to the specified Account + Number. + """ + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 083108fa5..1b04cffc6 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -22,6 +22,9 @@ from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams from .card_fuel_confirmation_create_params import CardFuelConfirmationCreateParams as CardFuelConfirmationCreateParams +from .inbound_fednow_transfer_create_params import ( + InboundFednowTransferCreateParams as InboundFednowTransferCreateParams, +) from .physical_card_advance_shipment_params import ( PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) diff --git a/src/increase/types/simulations/inbound_fednow_transfer_create_params.py b/src/increase/types/simulations/inbound_fednow_transfer_create_params.py new file mode 100644 index 000000000..19bd4878d --- /dev/null +++ b/src/increase/types/simulations/inbound_fednow_transfer_create_params.py @@ -0,0 +1,27 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["InboundFednowTransferCreateParams"] + + +class InboundFednowTransferCreateParams(TypedDict, total=False): + account_number_id: Required[str] + """The identifier of the Account Number the inbound FedNow Transfer is for.""" + + amount: Required[int] + """The transfer amount in USD cents. Must be positive.""" + + debtor_account_number: str + """The account number of the account that sent the transfer.""" + + debtor_name: str + """The name provided by the sender of the transfer.""" + + debtor_routing_number: str + """The routing number of the account that sent the transfer.""" + + unstructured_remittance_information: str + """Additional information included with the transfer.""" diff --git a/tests/api_resources/simulations/test_inbound_fednow_transfers.py b/tests/api_resources/simulations/test_inbound_fednow_transfers.py new file mode 100644 index 000000000..9de1d1f0b --- /dev/null +++ b/tests/api_resources/simulations/test_inbound_fednow_transfers.py @@ -0,0 +1,116 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundFednowTransfer + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundFednowTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + inbound_fednow_transfer = client.simulations.inbound_fednow_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + inbound_fednow_transfer = client.simulations.inbound_fednow_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + unstructured_remittance_information="x", + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.inbound_fednow_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.inbound_fednow_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundFednowTransfers: + 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: + inbound_fednow_transfer = await async_client.simulations.inbound_fednow_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_fednow_transfer = await async_client.simulations.inbound_fednow_transfers.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + debtor_account_number="x", + debtor_name="x", + debtor_routing_number="xxxxxxxxx", + unstructured_remittance_information="x", + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_fednow_transfers.with_raw_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = await response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_fednow_transfers.with_streaming_response.create( + account_number_id="account_number_v18nkfqm6afpsrvy82b2", + amount=1000, + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = await response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_fednow_transfers.py b/tests/api_resources/test_fednow_transfers.py new file mode 100644 index 000000000..c13a3ee40 --- /dev/null +++ b/tests/api_resources/test_fednow_transfers.py @@ -0,0 +1,488 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import FednowTransfer +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestFednowTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + account_number="987654321", + creditor_address={ + "city": "New York", + "postal_code": "10045", + "state": "NY", + "line1": "33 Liberty Street", + }, + debtor_address={ + "city": "x", + "postal_code": "x", + "state": "x", + "line1": "x", + }, + external_account_id="external_account_id", + require_approval=True, + routing_number="101050001", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.fednow_transfers.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.fednow_transfers.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.fednow_transfers.with_raw_response.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.fednow_transfers.with_streaming_response.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + client.fednow_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.list() + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + external_account_id="external_account_id", + idempotency_key="x", + limit=1, + status={"in": ["pending_reviewing"]}, + ) + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.fednow_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = response.parse() + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.fednow_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = response.parse() + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_approve(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_approve(self, client: Increase) -> None: + response = client.fednow_transfers.with_raw_response.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_approve(self, client: Increase) -> None: + with client.fednow_transfers.with_streaming_response.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_approve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + client.fednow_transfers.with_raw_response.approve( + "", + ) + + @parametrize + def test_method_cancel(self, client: Increase) -> None: + fednow_transfer = client.fednow_transfers.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_cancel(self, client: Increase) -> None: + response = client.fednow_transfers.with_raw_response.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_cancel(self, client: Increase) -> None: + with client.fednow_transfers.with_streaming_response.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_cancel(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + client.fednow_transfers.with_raw_response.cancel( + "", + ) + + +class TestAsyncFednowTransfers: + 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: + fednow_transfer = await async_client.fednow_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + account_number="987654321", + creditor_address={ + "city": "New York", + "postal_code": "10045", + "state": "NY", + "line1": "33 Liberty Street", + }, + debtor_address={ + "city": "x", + "postal_code": "x", + "state": "x", + "line1": "x", + }, + external_account_id="external_account_id", + require_approval=True, + routing_number="101050001", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.fednow_transfers.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.fednow_transfers.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + amount=100, + creditor_name="Ian Crease", + debtor_name="National Phonograph Company", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.fednow_transfers.with_raw_response.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.fednow_transfers.with_streaming_response.retrieve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + await async_client.fednow_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.list() + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + external_account_id="external_account_id", + idempotency_key="x", + limit=1, + status={"in": ["pending_reviewing"]}, + ) + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.fednow_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = await response.parse() + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.fednow_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = await response.parse() + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_approve(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: + response = await async_client.fednow_transfers.with_raw_response.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: + async with async_client.fednow_transfers.with_streaming_response.approve( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + await async_client.fednow_transfers.with_raw_response.approve( + "", + ) + + @parametrize + async def test_method_cancel(self, async_client: AsyncIncrease) -> None: + fednow_transfer = await async_client.fednow_transfers.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: + response = await async_client.fednow_transfers.with_raw_response.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: + async with async_client.fednow_transfers.with_streaming_response.cancel( + "fednow_transfer_4i0mptrdu1mueg1196bg", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + fednow_transfer = await response.parse() + assert_matches_type(FednowTransfer, fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `fednow_transfer_id` but received ''"): + await async_client.fednow_transfers.with_raw_response.cancel( + "", + ) diff --git a/tests/api_resources/test_inbound_fednow_transfers.py b/tests/api_resources/test_inbound_fednow_transfers.py new file mode 100644 index 000000000..7ea08107c --- /dev/null +++ b/tests/api_resources/test_inbound_fednow_transfers.py @@ -0,0 +1,188 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import InboundFednowTransfer +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestInboundFednowTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + inbound_fednow_transfer = client.inbound_fednow_transfers.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.inbound_fednow_transfers.with_raw_response.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.inbound_fednow_transfers.with_streaming_response.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_fednow_transfer_id` but received ''" + ): + client.inbound_fednow_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + inbound_fednow_transfer = client.inbound_fednow_transfers.list() + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + inbound_fednow_transfer = client.inbound_fednow_transfers.list( + account_id="account_id", + account_number_id="account_number_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.inbound_fednow_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = response.parse() + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.inbound_fednow_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = response.parse() + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncInboundFednowTransfers: + 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: + inbound_fednow_transfer = await async_client.inbound_fednow_transfers.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_fednow_transfers.with_raw_response.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = await response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_fednow_transfers.with_streaming_response.retrieve( + "inbound_fednow_transfer_ctxxbc07oh5ke5w1hk20", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = await response.parse() + assert_matches_type(InboundFednowTransfer, inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_fednow_transfer_id` but received ''" + ): + await async_client.inbound_fednow_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + inbound_fednow_transfer = await async_client.inbound_fednow_transfers.list() + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_fednow_transfer = await async_client.inbound_fednow_transfers.list( + account_id="account_id", + account_number_id="account_number_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + limit=1, + ) + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_fednow_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_fednow_transfer = await response.parse() + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_fednow_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_fednow_transfer = await response.parse() + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True From f9551a00dec37e70f8a6999963d50c9bd57736f9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 24 Oct 2025 22:09:27 +0000 Subject: [PATCH 0938/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1f7dbf48e..33b7181e0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.364.0" + ".": "0.365.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b024c6735..e24cc72af 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.364.0" +version = "0.365.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7e9f5de9b..5a2cbdc4b 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.364.0" # x-release-please-version +__version__ = "0.365.0" # x-release-please-version From df86e5112833ad9bfcb916e3c05b87c4c91aba4f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Oct 2025 13:50:22 +0000 Subject: [PATCH 0939/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 76 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 19 ++++++ src/increase/types/pending_transaction.py | 19 ++++++ src/increase/types/real_time_decision.py | 19 ++++++ src/increase/types/transaction.py | 19 ++++++ 6 files changed, 154 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2363e1cfc..23a163cf1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e809e9e4e5bc9c602a2ecebfbdb4a77d6c88c6f70f0b47a7a4d1dd1df4aaa66d.yml -openapi_spec_hash: cb6cb9fa09a8e52f6eb89271b559823d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9848b3b7725425c712a5fba932c836f3210adf21b9b7a232370f13960790158c.yml +openapi_spec_hash: 49090a79a8225d8ad36fe249aac2a12a config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 93b1c3a4d..a87566aa6 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -16,6 +16,7 @@ "ElementCardAuthorizationAdditionalAmounts", "ElementCardAuthorizationAdditionalAmountsClinic", "ElementCardAuthorizationAdditionalAmountsDental", + "ElementCardAuthorizationAdditionalAmountsOriginal", "ElementCardAuthorizationAdditionalAmountsPrescription", "ElementCardAuthorizationAdditionalAmountsSurcharge", "ElementCardAuthorizationAdditionalAmountsTotalCumulative", @@ -34,6 +35,7 @@ "ElementCardDeclineAdditionalAmounts", "ElementCardDeclineAdditionalAmountsClinic", "ElementCardDeclineAdditionalAmountsDental", + "ElementCardDeclineAdditionalAmountsOriginal", "ElementCardDeclineAdditionalAmountsPrescription", "ElementCardDeclineAdditionalAmountsSurcharge", "ElementCardDeclineAdditionalAmountsTotalCumulative", @@ -53,6 +55,7 @@ "ElementCardIncrementAdditionalAmounts", "ElementCardIncrementAdditionalAmountsClinic", "ElementCardIncrementAdditionalAmountsDental", + "ElementCardIncrementAdditionalAmountsOriginal", "ElementCardIncrementAdditionalAmountsPrescription", "ElementCardIncrementAdditionalAmountsSurcharge", "ElementCardIncrementAdditionalAmountsTotalCumulative", @@ -90,6 +93,7 @@ "ElementCardValidationAdditionalAmounts", "ElementCardValidationAdditionalAmountsClinic", "ElementCardValidationAdditionalAmountsDental", + "ElementCardValidationAdditionalAmountsOriginal", "ElementCardValidationAdditionalAmountsPrescription", "ElementCardValidationAdditionalAmountsSurcharge", "ElementCardValidationAdditionalAmountsTotalCumulative", @@ -304,6 +308,21 @@ class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): """ +class ElementCardAuthorizationAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -416,6 +435,9 @@ class ElementCardAuthorizationAdditionalAmounts(BaseModel): dental: Optional[ElementCardAuthorizationAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[ElementCardAuthorizationAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[ElementCardAuthorizationAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" @@ -920,6 +942,21 @@ class ElementCardDeclineAdditionalAmountsDental(BaseModel): """ +class ElementCardDeclineAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -1032,6 +1069,9 @@ class ElementCardDeclineAdditionalAmounts(BaseModel): dental: Optional[ElementCardDeclineAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[ElementCardDeclineAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[ElementCardDeclineAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" @@ -1651,6 +1691,21 @@ class ElementCardIncrementAdditionalAmountsDental(BaseModel): """ +class ElementCardIncrementAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -1763,6 +1818,9 @@ class ElementCardIncrementAdditionalAmounts(BaseModel): dental: Optional[ElementCardIncrementAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[ElementCardIncrementAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[ElementCardIncrementAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" @@ -3252,6 +3310,21 @@ class ElementCardValidationAdditionalAmountsDental(BaseModel): """ +class ElementCardValidationAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class ElementCardValidationAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -3364,6 +3437,9 @@ class ElementCardValidationAdditionalAmounts(BaseModel): dental: Optional[ElementCardValidationAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[ElementCardValidationAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[ElementCardValidationAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9abffa208..63e486271 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -14,6 +14,7 @@ "SourceCardDeclineAdditionalAmounts", "SourceCardDeclineAdditionalAmountsClinic", "SourceCardDeclineAdditionalAmountsDental", + "SourceCardDeclineAdditionalAmountsOriginal", "SourceCardDeclineAdditionalAmountsPrescription", "SourceCardDeclineAdditionalAmountsSurcharge", "SourceCardDeclineAdditionalAmountsTotalCumulative", @@ -152,6 +153,21 @@ class SourceCardDeclineAdditionalAmountsDental(BaseModel): """ +class SourceCardDeclineAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -264,6 +280,9 @@ class SourceCardDeclineAdditionalAmounts(BaseModel): dental: Optional[SourceCardDeclineAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[SourceCardDeclineAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[SourceCardDeclineAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 9e3d2aac5..e4d75174a 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -15,6 +15,7 @@ "SourceCardAuthorizationAdditionalAmounts", "SourceCardAuthorizationAdditionalAmountsClinic", "SourceCardAuthorizationAdditionalAmountsDental", + "SourceCardAuthorizationAdditionalAmountsOriginal", "SourceCardAuthorizationAdditionalAmountsPrescription", "SourceCardAuthorizationAdditionalAmountsSurcharge", "SourceCardAuthorizationAdditionalAmountsTotalCumulative", @@ -102,6 +103,21 @@ class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): """ +class SourceCardAuthorizationAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -214,6 +230,9 @@ class SourceCardAuthorizationAdditionalAmounts(BaseModel): dental: Optional[SourceCardAuthorizationAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[SourceCardAuthorizationAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[SourceCardAuthorizationAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 372b89d1d..5489e91c5 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -14,6 +14,7 @@ "CardAuthorizationAdditionalAmounts", "CardAuthorizationAdditionalAmountsClinic", "CardAuthorizationAdditionalAmountsDental", + "CardAuthorizationAdditionalAmountsOriginal", "CardAuthorizationAdditionalAmountsPrescription", "CardAuthorizationAdditionalAmountsSurcharge", "CardAuthorizationAdditionalAmountsTotalCumulative", @@ -115,6 +116,21 @@ class CardAuthorizationAdditionalAmountsDental(BaseModel): """ +class CardAuthorizationAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class CardAuthorizationAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -227,6 +243,9 @@ class CardAuthorizationAdditionalAmounts(BaseModel): dental: Optional[CardAuthorizationAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[CardAuthorizationAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[CardAuthorizationAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 13295e053..d84a4d124 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -22,6 +22,7 @@ "SourceCardFinancialAdditionalAmounts", "SourceCardFinancialAdditionalAmountsClinic", "SourceCardFinancialAdditionalAmountsDental", + "SourceCardFinancialAdditionalAmountsOriginal", "SourceCardFinancialAdditionalAmountsPrescription", "SourceCardFinancialAdditionalAmountsSurcharge", "SourceCardFinancialAdditionalAmountsTotalCumulative", @@ -521,6 +522,21 @@ class SourceCardFinancialAdditionalAmountsDental(BaseModel): """ +class SourceCardFinancialAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + class SourceCardFinancialAdditionalAmountsPrescription(BaseModel): amount: int """The amount in minor units of the `currency` field. @@ -633,6 +649,9 @@ class SourceCardFinancialAdditionalAmounts(BaseModel): dental: Optional[SourceCardFinancialAdditionalAmountsDental] = None """The part of this transaction amount that was for dental-related services.""" + original: Optional[SourceCardFinancialAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + prescription: Optional[SourceCardFinancialAdditionalAmountsPrescription] = None """The part of this transaction amount that was for healthcare prescriptions.""" From bdce1b0e10856d5f0c5e64007267284a12567dbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 26 Oct 2025 13:53:19 +0000 Subject: [PATCH 0940/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 33b7181e0..1edf3a94d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.365.0" + ".": "0.366.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e24cc72af..2e51273c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.365.0" +version = "0.366.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5a2cbdc4b..9aef908be 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.365.0" # x-release-please-version +__version__ = "0.366.0" # x-release-please-version From e3ac124c95f87e817e2e9e9b0e869a15f63937c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:39:54 +0000 Subject: [PATCH 0941/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/card_refunds.py | 10 ++++++++++ .../types/simulations/card_refund_create_params.py | 6 ++++++ tests/api_resources/simulations/test_card_refunds.py | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 23a163cf1..3af61a35c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9848b3b7725425c712a5fba932c836f3210adf21b9b7a232370f13960790158c.yml -openapi_spec_hash: 49090a79a8225d8ad36fe249aac2a12a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6fc6504fd01ec9082a1f98aedf474846382b0196143751c1cae21fb7651c7fd1.yml +openapi_spec_hash: 7b2f1e569444dec8f4e02a26adf6eae0 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/simulations/card_refunds.py b/src/increase/resources/simulations/card_refunds.py index a233eed0a..cf9fa8569 100644 --- a/src/increase/resources/simulations/card_refunds.py +++ b/src/increase/resources/simulations/card_refunds.py @@ -44,6 +44,7 @@ def with_streaming_response(self) -> CardRefundsResourceWithStreamingResponse: def create( self, *, + amount: int | Omit = omit, pending_transaction_id: str | Omit = omit, transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -60,6 +61,9 @@ def create( transaction is refunded. Args: + amount: The refund amount in cents. Pulled off the `pending_transaction` or the + `transaction` if not provided. + pending_transaction_id: The identifier of the Pending Transaction for the refund authorization. If this is provided, `transaction` must not be provided as a refund with a refund authorized can not be linked to a regular transaction. @@ -81,6 +85,7 @@ def create( "/simulations/card_refunds", body=maybe_transform( { + "amount": amount, "pending_transaction_id": pending_transaction_id, "transaction_id": transaction_id, }, @@ -120,6 +125,7 @@ def with_streaming_response(self) -> AsyncCardRefundsResourceWithStreamingRespon async def create( self, *, + amount: int | Omit = omit, pending_transaction_id: str | Omit = omit, transaction_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -136,6 +142,9 @@ async def create( transaction is refunded. Args: + amount: The refund amount in cents. Pulled off the `pending_transaction` or the + `transaction` if not provided. + pending_transaction_id: The identifier of the Pending Transaction for the refund authorization. If this is provided, `transaction` must not be provided as a refund with a refund authorized can not be linked to a regular transaction. @@ -157,6 +166,7 @@ async def create( "/simulations/card_refunds", body=await async_maybe_transform( { + "amount": amount, "pending_transaction_id": pending_transaction_id, "transaction_id": transaction_id, }, diff --git a/src/increase/types/simulations/card_refund_create_params.py b/src/increase/types/simulations/card_refund_create_params.py index da0c4704a..c7fcd9878 100644 --- a/src/increase/types/simulations/card_refund_create_params.py +++ b/src/increase/types/simulations/card_refund_create_params.py @@ -8,6 +8,12 @@ class CardRefundCreateParams(TypedDict, total=False): + amount: int + """The refund amount in cents. + + Pulled off the `pending_transaction` or the `transaction` if not provided. + """ + pending_transaction_id: str """The identifier of the Pending Transaction for the refund authorization. diff --git a/tests/api_resources/simulations/test_card_refunds.py b/tests/api_resources/simulations/test_card_refunds.py index 36b239d51..f75e12c4c 100644 --- a/tests/api_resources/simulations/test_card_refunds.py +++ b/tests/api_resources/simulations/test_card_refunds.py @@ -25,6 +25,7 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: card_refund = client.simulations.card_refunds.create( + amount=1, pending_transaction_id="pending_transaction_id", transaction_id="transaction_uyrp7fld2ium70oa7oi", ) @@ -64,6 +65,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: card_refund = await async_client.simulations.card_refunds.create( + amount=1, pending_transaction_id="pending_transaction_id", transaction_id="transaction_uyrp7fld2ium70oa7oi", ) From 7fba9443bf80350c1c394fcca45be9a22a9439f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:42:58 +0000 Subject: [PATCH 0942/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1edf3a94d..171e59a68 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.366.0" + ".": "0.367.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2e51273c8..b25636b6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.366.0" +version = "0.367.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9aef908be..b72e4f696 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.366.0" # x-release-please-version +__version__ = "0.367.0" # x-release-please-version From 18132f38f24753d583ef4702b8ce6e35f1864c8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:44:03 +0000 Subject: [PATCH 0943/1325] feat(api): api update --- .stats.yml | 4 ++-- .../card_authorization_create_params.py | 16 +++++++++++++++- .../simulations/test_card_authorizations.py | 10 ++++++++-- 3 files changed, 25 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3af61a35c..09fe707d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6fc6504fd01ec9082a1f98aedf474846382b0196143751c1cae21fb7651c7fd1.yml -openapi_spec_hash: 7b2f1e569444dec8f4e02a26adf6eae0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4ecdf6d7ab918ac6bedd10130962aa92a2b10e59ca7a98849bcbb72878bffc92.yml +openapi_spec_hash: cefa36c80b576364e72406d7da8c4610 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 98cfa68fe..6907569dd 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -4,7 +4,13 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardAuthorizationCreateParams", "NetworkDetails", "NetworkDetailsVisa", "ProcessingCategory"] +__all__ = [ + "CardAuthorizationCreateParams", + "NetworkDetails", + "NetworkDetailsVisa", + "ProcessingCategory", + "ProcessingCategoryRefund", +] class CardAuthorizationCreateParams(TypedDict, total=False): @@ -175,6 +181,11 @@ class NetworkDetails(TypedDict, total=False): """Fields specific to the Visa network.""" +class ProcessingCategoryRefund(TypedDict, total=False): + original_card_payment_id: str + """The card payment to link this refund to.""" + + class ProcessingCategory(TypedDict, total=False): category: Required[ Literal[ @@ -209,3 +220,6 @@ class ProcessingCategory(TypedDict, total=False): - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. """ + + refund: ProcessingCategoryRefund + """Details related to refund authorizations.""" diff --git a/tests/api_resources/simulations/test_card_authorizations.py b/tests/api_resources/simulations/test_card_authorizations.py index e75da86aa..4dd066d31 100644 --- a/tests/api_resources/simulations/test_card_authorizations.py +++ b/tests/api_resources/simulations/test_card_authorizations.py @@ -42,7 +42,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, network_risk_score=0, physical_card_id="physical_card_id", - processing_category={"category": "account_funding"}, + processing_category={ + "category": "account_funding", + "refund": {"original_card_payment_id": "original_card_payment_id"}, + }, terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) @@ -102,7 +105,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, network_risk_score=0, physical_card_id="physical_card_id", - processing_category={"category": "account_funding"}, + processing_category={ + "category": "account_funding", + "refund": {"original_card_payment_id": "original_card_payment_id"}, + }, terminal_id="x", ) assert_matches_type(CardAuthorizationCreateResponse, card_authorization, path=["response"]) From 8aa3bd87145d36c6aeb372ab7d87c9e600da7f97 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 27 Oct 2025 17:47:02 +0000 Subject: [PATCH 0944/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 171e59a68..741f062e3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.367.0" + ".": "0.368.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b25636b6f..709246b5f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.367.0" +version = "0.368.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b72e4f696..a035b4468 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.367.0" # x-release-please-version +__version__ = "0.368.0" # x-release-please-version From ec7b0a0941576f549022c278bec81f8928ce6178 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:43:27 +0000 Subject: [PATCH 0945/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 617 +++++++++++++++++++++++++++++ 2 files changed, 619 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 09fe707d7..b52e298fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4ecdf6d7ab918ac6bedd10130962aa92a2b10e59ca7a98849bcbb72878bffc92.yml -openapi_spec_hash: cefa36c80b576364e72406d7da8c4610 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4aa2f4a453e4fc5f0876f09919d76289bc530dcdd693e6d69db07980803aab6d.yml +openapi_spec_hash: 32bfd518611484cb0777810dd934f1fa config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a87566aa6..f649681fa 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -49,6 +49,24 @@ "ElementCardDeclineVerification", "ElementCardDeclineVerificationCardVerificationCode", "ElementCardDeclineVerificationCardholderAddress", + "ElementCardFinancial", + "ElementCardFinancialAdditionalAmounts", + "ElementCardFinancialAdditionalAmountsClinic", + "ElementCardFinancialAdditionalAmountsDental", + "ElementCardFinancialAdditionalAmountsOriginal", + "ElementCardFinancialAdditionalAmountsPrescription", + "ElementCardFinancialAdditionalAmountsSurcharge", + "ElementCardFinancialAdditionalAmountsTotalCumulative", + "ElementCardFinancialAdditionalAmountsTotalHealthcare", + "ElementCardFinancialAdditionalAmountsTransit", + "ElementCardFinancialAdditionalAmountsUnknown", + "ElementCardFinancialAdditionalAmountsVision", + "ElementCardFinancialNetworkDetails", + "ElementCardFinancialNetworkDetailsVisa", + "ElementCardFinancialNetworkIdentifiers", + "ElementCardFinancialVerification", + "ElementCardFinancialVerificationCardVerificationCode", + "ElementCardFinancialVerificationCardholderAddress", "ElementCardFuelConfirmation", "ElementCardFuelConfirmationNetworkIdentifiers", "ElementCardIncrement", @@ -1585,6 +1603,594 @@ class ElementCardDecline(BaseModel): """Fields related to verification of cardholder-provided values.""" +class ElementCardFinancialAdditionalAmountsClinic(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsDental(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsOriginal(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsPrescription(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsSurcharge(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTotalCumulative(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsTransit(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsUnknown(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmountsVision(BaseModel): + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardFinancialAdditionalAmounts(BaseModel): + clinic: Optional[ElementCardFinancialAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardFinancialAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + original: Optional[ElementCardFinancialAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + + prescription: Optional[ElementCardFinancialAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardFinancialAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardFinancialAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardFinancialAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardFinancialAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardFinancialAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardFinancialAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + +class ElementCardFinancialNetworkDetailsVisa(BaseModel): + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however, cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class ElementCardFinancialNetworkDetails(BaseModel): + category: Literal["visa", "pulse"] + """The payment network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + pulse: Optional[object] = None + """Fields specific to the `pulse` network.""" + + visa: Optional[ElementCardFinancialNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class ElementCardFinancialNetworkIdentifiers(BaseModel): + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class ElementCardFinancialVerificationCardVerificationCode(BaseModel): + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardFinancialVerificationCardholderAddress(BaseModel): + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class ElementCardFinancialVerification(BaseModel): + card_verification_code: ElementCardFinancialVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: ElementCardFinancialVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class ElementCardFinancial(BaseModel): + id: str + """The Card Financial identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this financial was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + additional_amounts: ElementCardFinancialAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + amount: int + """The pending amount in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's currency. + + - `CAD` - Canadian Dollar (CAD) + - `CHF` - Swiss Franc (CHF) + - `EUR` - Euro (EUR) + - `GBP` - British Pound (GBP) + - `JPY` - Japanese Yen (JPY) + - `USD` - US Dollar (USD) + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + direction: Literal["settlement", "refund"] + """ + The direction describes the direction the funds will move, either from the + cardholder to the merchant or from the merchant to the cardholder. + + - `settlement` - A regular card authorization where funds are debited from the + cardholder. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: ElementCardFinancialNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: ElementCardFinancialNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + presentment_amount: int + """The pending amount in the minor unit of the transaction's presentment currency.""" + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. + """ + + processing_category: Literal[ + "account_funding", + "automatic_fuel_dispenser", + "bill_payment", + "original_credit", + "purchase", + "quasi_cash", + "refund", + "cash_disbursement", + "unknown", + ] + """ + The processing category describes the intent behind the financial, such as + whether it was used for bill payments or an automatic fuel dispenser. + + - `account_funding` - Account funding transactions are transactions used to + e.g., fund an account or transfer funds between accounts. + - `automatic_fuel_dispenser` - Automatic fuel dispenser authorizations occur + when a card is used at a gas pump, prior to the actual transaction amount + being known. They are followed by an advice message that updates the amount of + the pending transaction. + - `bill_payment` - A transaction used to pay a bill. + - `original_credit` - Original credit transactions are used to send money to a + cardholder. + - `purchase` - A regular purchase. + - `quasi_cash` - Quasi-cash transactions represent purchases of items which may + be convertible to cash. + - `refund` - A refund card authorization, sometimes referred to as a credit + voucher authorization, where funds are credited to the cardholder. + - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash + from an ATM or a point of sale. + - `unknown` - The processing category is unknown. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + transaction_id: str + """The identifier of the Transaction associated with this Transaction.""" + + type: Literal["card_financial"] + """A constant representing the object's type. + + For this resource it will always be `card_financial`. + """ + + verification: ElementCardFinancialVerification + """Fields related to verification of cardholder-provided values.""" + + class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): authorization_identification_response: Optional[str] = None """ @@ -3837,6 +4443,14 @@ class Element(BaseModel): equal to `card_decline`. """ + card_financial: Optional[ElementCardFinancial] = None + """A Card Financial object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_financial`. Card Financials are temporary holds placed on a + customers funds with the intent to later clear a transaction. + """ + card_fuel_confirmation: Optional[ElementCardFuelConfirmation] = None """A Card Fuel Confirmation object. @@ -3899,6 +4513,7 @@ class Element(BaseModel): "card_settlement", "card_refund", "card_fuel_confirmation", + "card_financial", "other", ] """The type of the resource. @@ -3925,6 +4540,8 @@ class Element(BaseModel): - `card_refund` - Card Refund: details will be under the `card_refund` object. - `card_fuel_confirmation` - Card Fuel Confirmation: details will be under the `card_fuel_confirmation` object. + - `card_financial` - Card Financial: details will be under the `card_financial` + object. - `other` - Unknown card payment element. """ From 09e5731480c048e849daefc2405c4246985431c5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 17:46:23 +0000 Subject: [PATCH 0946/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 741f062e3..ec847edc6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.368.0" + ".": "0.369.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 709246b5f..14146b21d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.368.0" +version = "0.369.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a035b4468..d3fb4df20 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.368.0" # x-release-please-version +__version__ = "0.369.0" # x-release-please-version From 7d32c8f41d6861a5ee1eb2926b0be146d874555c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:31:21 +0000 Subject: [PATCH 0947/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 24 ------------------- src/increase/types/event.py | 12 ---------- src/increase/types/event_list_params.py | 4 ---- src/increase/types/event_subscription.py | 12 ---------- .../types/event_subscription_create_params.py | 12 ---------- 6 files changed, 2 insertions(+), 66 deletions(-) diff --git a/.stats.yml b/.stats.yml index b52e298fa..cdd898dd6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4aa2f4a453e4fc5f0876f09919d76289bc530dcdd693e6d69db07980803aab6d.yml -openapi_spec_hash: 32bfd518611484cb0777810dd934f1fa +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b91d72f65357f42c5529b6b86bf04409c243e4bf98dd441a64792b86698da51e.yml +openapi_spec_hash: 7b35443ba7263403ac7b0c67bc8826b4 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 1678decce..faa477930 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -120,10 +120,6 @@ def create( "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", @@ -279,14 +275,6 @@ 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 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 @@ -623,10 +611,6 @@ async def create( "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", @@ -782,14 +766,6 @@ 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 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 diff --git a/src/increase/types/event.py b/src/increase/types/event.py index d51f684c0..a0593a368 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -89,10 +89,6 @@ class Event(BaseModel): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", @@ -230,14 +226,6 @@ 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 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 diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index a54765ad9..e2bbb4c45 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -104,10 +104,6 @@ class EventListParams(TypedDict, total=False): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 8cd69645f..522784bc1 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -102,10 +102,6 @@ class EventSubscription(BaseModel): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", @@ -243,14 +239,6 @@ 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 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 diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 6eca5b263..68346473f 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -88,10 +88,6 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "lockbox.updated", "oauth_connection.created", "oauth_connection.deactivated", - "outbound_card_push_transfer.created", - "outbound_card_push_transfer.updated", - "outbound_card_validation.created", - "outbound_card_validation.updated", "card_push_transfer.created", "card_push_transfer.updated", "card_validation.created", @@ -228,14 +224,6 @@ 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 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 From 6cbfd0be98fea41dfb3973474f880e2ea964d56d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 28 Oct 2025 23:34:21 +0000 Subject: [PATCH 0948/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ec847edc6..16b219fd3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.369.0" + ".": "0.370.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 14146b21d..c71e819b2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.369.0" +version = "0.370.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d3fb4df20..d06b6b461 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.369.0" # x-release-please-version +__version__ = "0.370.0" # x-release-please-version From 81d22c47a7de749ba5cb5099fdfa156d3d9c524e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 01:08:47 +0000 Subject: [PATCH 0949/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/accounts.py | 4 ++-- src/increase/types/account_create_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index cdd898dd6..174c00620 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b91d72f65357f42c5529b6b86bf04409c243e4bf98dd441a64792b86698da51e.yml -openapi_spec_hash: 7b35443ba7263403ac7b0c67bc8826b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5e23344ee5f70c17195f26e0af9e85bed0a92f4e8597db349d0038c316be4ff2.yml +openapi_spec_hash: 02057c342dd5b1c72f2006dd28234429 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 18ae97c65..080ab2bf6 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -70,7 +70,7 @@ def create( entity_id: The identifier for the Entity that will own the Account. informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated - with its activity. Its relationship to your group must be `informational`. + with its activity. This is generally the beneficiary of the funds. program_id: The identifier for the Program that this Account falls under. Required if you operate more than one Program. @@ -399,7 +399,7 @@ async def create( entity_id: The identifier for the Entity that will own the Account. informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated - with its activity. Its relationship to your group must be `informational`. + with its activity. This is generally the beneficiary of the funds. program_id: The identifier for the Program that this Account falls under. Required if you operate more than one Program. diff --git a/src/increase/types/account_create_params.py b/src/increase/types/account_create_params.py index 3ce6ad3ba..068dc2b51 100644 --- a/src/increase/types/account_create_params.py +++ b/src/increase/types/account_create_params.py @@ -17,7 +17,7 @@ class AccountCreateParams(TypedDict, total=False): informational_entity_id: str """ The identifier of an Entity that, while not owning the Account, is associated - with its activity. Its relationship to your group must be `informational`. + with its activity. This is generally the beneficiary of the funds. """ program_id: str From 5fd8b9099b366d6fbde43df5941db178ff827a45 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 01:11:36 +0000 Subject: [PATCH 0950/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 16b219fd3..21b7bff9c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.370.0" + ".": "0.371.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c71e819b2..14145483e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.370.0" +version = "0.371.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d06b6b461..62a913d77 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.370.0" # x-release-please-version +__version__ = "0.371.0" # x-release-please-version From 0b73b1bd59599cb54a38f86d58eec75210ffa709 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:45:50 +0000 Subject: [PATCH 0951/1325] fix(client): close streams without requiring full consumption --- src/increase/_streaming.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 7b5fc6503..31a769686 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -57,9 +57,8 @@ def __stream__(self) -> Iterator[_T]: for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + response.close() def __enter__(self) -> Self: return self @@ -121,9 +120,8 @@ async def __stream__(self) -> AsyncIterator[_T]: async for sse in iterator: yield process_data(data=sse.json(), cast_to=cast_to, response=response) - # Ensure the entire stream is consumed - async for _sse in iterator: - ... + # As we might not fully consume the response stream, we need to close it explicitly + await response.aclose() async def __aenter__(self) -> Self: return self From 3e5fa25510cab00665f7b7613d4391da2d74320e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 10:48:48 +0000 Subject: [PATCH 0952/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 21b7bff9c..b9143c29a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.371.0" + ".": "0.371.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 14145483e..f7096c6b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.371.0" +version = "0.371.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 62a913d77..55163a7a8 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.371.0" # x-release-please-version +__version__ = "0.371.1" # x-release-please-version From f3c05ca80274cfe623b1e7d8a969a6f524ccd541 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 21:15:23 +0000 Subject: [PATCH 0953/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_dispute.py | 16 ++++++++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 174c00620..4cb0dd946 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5e23344ee5f70c17195f26e0af9e85bed0a92f4e8597db349d0038c316be4ff2.yml +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1c544c0cd5413b2f03b701aba1a0868838270dbe44ebf79d4b4820704e90594b.yml openapi_spec_hash: 02057c342dd5b1c72f2006dd28234429 -config_hash: eb2035151c7b49c2f12caf55469b8f9a +config_hash: fc8a0ae068f2feeac76f728ac6838543 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index eced5df31..fc04b7a5e 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -25,6 +25,7 @@ "VisaNetworkEventRepresentedCardholderNoLongerDisputes", "VisaNetworkEventRepresentedCreditOrReversalProcessed", "VisaNetworkEventRepresentedInvalidDispute", + "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed", "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventRepresentedProofOfCashDisbursement", "VisaNetworkEventRepresentedReversalIssued", @@ -59,6 +60,7 @@ "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackConsumerNonReceiptOfCash", "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaUserSubmissionChargebackConsumerQualityMerchandise", "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", @@ -441,6 +443,10 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): """ +class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): + pass + + class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -481,7 +487,9 @@ class VisaNetworkEventRepresented(BaseModel): invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" - non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None + non_fiat_currency_or_non_fungible_token_as_described: Optional[ + VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed + ] = None """Non-fiat currency or non-fungible token as described details. Present if and only if `reason` is @@ -1363,6 +1371,10 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): """Purchase information and explanation.""" +class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): explanation: str """Explanation.""" @@ -1885,7 +1897,7 @@ class VisaUserSubmissionChargeback(BaseModel): Present if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: Optional[object] = None + consumer_non_receipt_of_cash: Optional[VisaUserSubmissionChargebackConsumerNonReceiptOfCash] = None """Non-receipt of cash. Present if and only if `category` is `consumer_non_receipt_of_cash`. From ebfa223b72eab1c7a429e4518458f18ab6fd9a5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 21:18:59 +0000 Subject: [PATCH 0954/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b9143c29a..9a91926af 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.371.1" + ".": "0.372.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f7096c6b0..b971bae61 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.371.1" +version = "0.372.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 55163a7a8..a598b7ffd 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.371.1" # x-release-please-version +__version__ = "0.372.0" # x-release-please-version From 479917c26c6c0b6b09372ec1aee0aa36b20563e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:15:39 +0000 Subject: [PATCH 0955/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_create_params.py | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4cb0dd946..6a120e927 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1c544c0cd5413b2f03b701aba1a0868838270dbe44ebf79d4b4820704e90594b.yml -openapi_spec_hash: 02057c342dd5b1c72f2006dd28234429 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2453598e129a8305006487bc7616f3ee69eb4355a6d3f185dd51404fa8142246.yml +openapi_spec_hash: e0b54d0015d39f9434659d8899bb2706 config_hash: fc8a0ae068f2feeac76f728ac6838543 diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 296ac689a..431adf3f4 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -319,7 +319,7 @@ class Corporation(TypedDict, total=False): """The Employer Identification Number (EIN) for the corporation.""" beneficial_ownership_exemption_reason: Literal[ - "regulated_financial_institution", "publicly_traded_company", "public_entity" + "regulated_financial_institution", "publicly_traded_company", "public_entity", "other" ] """ If the entity is exempt from the requirement to submit beneficial owners, @@ -330,6 +330,9 @@ class Corporation(TypedDict, total=False): - `publicly_traded_company` - A publicly traded company. - `public_entity` - A public entity acting on behalf of the federal or a state government. + - `other` - Any other reason why this entity is exempt from the requirement to + submit beneficial owners. You can only use this exemption after approval from + your bank partner. """ incorporation_state: str From 7314ec8c14194a05e4498fdb8e9277129a16c67c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 29 Oct 2025 22:18:29 +0000 Subject: [PATCH 0956/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9a91926af..211b9f1a0 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.372.0" + ".": "0.373.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b971bae61..7e8390cb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.372.0" +version = "0.373.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a598b7ffd..84b24d068 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.372.0" # x-release-please-version +__version__ = "0.373.0" # x-release-please-version From 202c6083b8f5f0639029550c9584b06f02a39f94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 11:05:42 +0000 Subject: [PATCH 0957/1325] chore(internal/tests): avoid race condition with implicit client cleanup --- tests/test_client.py | 386 ++++++++++++++++++++++++------------------- 1 file changed, 212 insertions(+), 174 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 975d21c7d..300ce881e 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -59,51 +59,49 @@ def _get_open_connections(client: Increase | AsyncIncrease) -> int: class TestIncrease: - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) - @pytest.mark.respx(base_url=base_url) - def test_raw_response(self, respx_mock: MockRouter) -> None: + def test_raw_response(self, respx_mock: MockRouter, client: Increase) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.post("/foo", cast_to=httpx.Response) + response = client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} @pytest.mark.respx(base_url=base_url) - def test_raw_response_for_binary(self, respx_mock: MockRouter) -> None: + def test_raw_response_for_binary(self, respx_mock: MockRouter, client: Increase) -> None: respx_mock.post("/foo").mock( return_value=httpx.Response(200, headers={"Content-Type": "application/binary"}, content='{"foo": "bar"}') ) - response = self.client.post("/foo", cast_to=httpx.Response) + response = client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} - def test_copy(self) -> None: - copied = self.client.copy() - assert id(copied) != id(self.client) + def test_copy(self, client: Increase) -> None: + copied = client.copy() + assert id(copied) != id(client) - copied = self.client.copy(api_key="another My API Key") + copied = client.copy(api_key="another My API Key") assert copied.api_key == "another My API Key" - assert self.client.api_key == "My API Key" + assert client.api_key == "My API Key" - def test_copy_default_options(self) -> None: + def test_copy_default_options(self, client: Increase) -> None: # options that have a default are overridden correctly - copied = self.client.copy(max_retries=7) + copied = client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 2 + assert client.max_retries == 2 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6 assert copied.max_retries == 7 # timeout - assert isinstance(self.client.timeout, httpx.Timeout) - copied = self.client.copy(timeout=None) + assert isinstance(client.timeout, httpx.Timeout) + copied = client.copy(timeout=None) assert copied.timeout is None - assert isinstance(self.client.timeout, httpx.Timeout) + assert isinstance(client.timeout, httpx.Timeout) def test_copy_default_headers(self) -> None: client = Increase( @@ -138,6 +136,7 @@ def test_copy_default_headers(self) -> None: match="`default_headers` and `set_default_headers` arguments are mutually exclusive", ): client.copy(set_default_headers={}, default_headers={"X-Foo": "Bar"}) + client.close() def test_copy_default_query(self) -> None: client = Increase( @@ -175,13 +174,15 @@ def test_copy_default_query(self) -> None: ): client.copy(set_default_query={}, default_query={"foo": "Bar"}) - def test_copy_signature(self) -> None: + client.close() + + def test_copy_signature(self, client: Increase) -> None: # ensure the same parameters that can be passed to the client are defined in the `.copy()` method init_signature = inspect.signature( # mypy doesn't like that we access the `__init__` property. - self.client.__init__, # type: ignore[misc] + client.__init__, # type: ignore[misc] ) - copy_signature = inspect.signature(self.client.copy) + copy_signature = inspect.signature(client.copy) exclude_params = {"transport", "proxies", "_strict_response_validation"} for name in init_signature.parameters.keys(): @@ -192,12 +193,12 @@ def test_copy_signature(self) -> None: 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: + def test_copy_build_request(self, client: Increase) -> None: options = FinalRequestOptions(method="get", url="/foo") def build_request(options: FinalRequestOptions) -> None: - client = self.client.copy() - client._build_request(options) + client_copy = client.copy() + client_copy._build_request(options) # ensure that the machinery is warmed up before tracing starts. build_request(options) @@ -254,14 +255,12 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic print(frame) raise AssertionError() - def test_request_timeout(self) -> None: - request = self.client._build_request(FinalRequestOptions(method="get", url="/foo")) + def test_request_timeout(self, client: Increase) -> None: + request = client._build_request(FinalRequestOptions(method="get", url="/foo")) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT - request = self.client._build_request( - FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0)) - ) + request = client._build_request(FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0))) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(100.0) @@ -274,6 +273,8 @@ def test_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(0) + client.close() + def test_http_client_timeout_option(self) -> None: # custom timeout given to the httpx client should be used with httpx.Client(timeout=None) as http_client: @@ -285,6 +286,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(None) + client.close() + # no timeout given to the httpx client should not use the httpx default with httpx.Client() as http_client: client = Increase( @@ -295,6 +298,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT + client.close() + # explicitly passing the default timeout currently results in it being ignored with httpx.Client(timeout=HTTPX_DEFAULT_TIMEOUT) as http_client: client = Increase( @@ -305,6 +310,8 @@ def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT # our default + client.close() + async def test_invalid_http_client(self) -> None: with pytest.raises(TypeError, match="Invalid `http_client` arg"): async with httpx.AsyncClient() as http_client: @@ -316,14 +323,14 @@ async def test_invalid_http_client(self) -> None: ) def test_default_headers_option(self) -> None: - client = Increase( + test_client = Increase( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) - request = client._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "bar" assert request.headers.get("x-stainless-lang") == "python" - client2 = Increase( + test_client2 = Increase( base_url=base_url, api_key=api_key, _strict_response_validation=True, @@ -332,10 +339,13 @@ def test_default_headers_option(self) -> None: "X-Stainless-Lang": "my-overriding-header", }, ) - request = client2._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client2._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "stainless" assert request.headers.get("x-stainless-lang") == "my-overriding-header" + test_client.close() + test_client2.close() + def test_validate_headers(self) -> None: client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) request = client._build_request(FinalRequestOptions(method="get", url="/foo")) @@ -364,8 +374,10 @@ def test_default_query_option(self) -> None: url = httpx.URL(request.url) assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} - def test_request_extra_json(self) -> None: - request = self.client._build_request( + client.close() + + def test_request_extra_json(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -376,7 +388,7 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": False} - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -387,7 +399,7 @@ def test_request_extra_json(self) -> None: assert data == {"baz": False} # `extra_json` takes priority over `json_data` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -398,8 +410,8 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": None} - def test_request_extra_headers(self) -> None: - request = self.client._build_request( + def test_request_extra_headers(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -409,7 +421,7 @@ def test_request_extra_headers(self) -> None: assert request.headers.get("X-Foo") == "Foo" # `extra_headers` takes priority over `default_headers` when keys clash - request = self.client.with_options(default_headers={"X-Bar": "true"})._build_request( + request = client.with_options(default_headers={"X-Bar": "true"})._build_request( FinalRequestOptions( method="post", url="/foo", @@ -420,8 +432,8 @@ def test_request_extra_headers(self) -> None: ) assert request.headers.get("X-Bar") == "false" - def test_request_extra_query(self) -> None: - request = self.client._build_request( + def test_request_extra_query(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -434,7 +446,7 @@ def test_request_extra_query(self) -> None: assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -448,7 +460,7 @@ def test_request_extra_query(self) -> None: assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -491,7 +503,7 @@ def test_multipart_repeating_array(self, client: Increase) -> None: ] @pytest.mark.respx(base_url=base_url) - def test_basic_union_response(self, respx_mock: MockRouter) -> None: + def test_basic_union_response(self, respx_mock: MockRouter, client: Increase) -> None: class Model1(BaseModel): name: str @@ -500,12 +512,12 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" @pytest.mark.respx(base_url=base_url) - def test_union_response_different_types(self, respx_mock: MockRouter) -> None: + def test_union_response_different_types(self, respx_mock: MockRouter, client: Increase) -> None: """Union of objects with the same field name using a different type""" class Model1(BaseModel): @@ -516,18 +528,18 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": 1})) - response = self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model1) assert response.foo == 1 @pytest.mark.respx(base_url=base_url) - def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter) -> None: + def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter, client: Increase) -> None: """ Response that sets Content-Type to something other than application/json but returns json data """ @@ -543,29 +555,29 @@ class Model(BaseModel): ) ) - response = self.client.get("/foo", cast_to=Model) + response = client.get("/foo", cast_to=Model) assert isinstance(response, Model) assert response.foo == 2 @pytest.mark.respx(base_url=base_url) - def test_idempotency_header_options(self, respx_mock: MockRouter) -> None: + def test_idempotency_header_options(self, respx_mock: MockRouter, client: Increase) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={})) - response = self.client.post("/foo", cast_to=httpx.Response) + response = client.post("/foo", cast_to=httpx.Response) header = response.request.headers.get("Idempotency-Key") assert header is not None assert header.startswith("stainless-python-retry") # explicit header - response = self.client.post( + response = client.post( "/foo", cast_to=httpx.Response, options=make_request_options(extra_headers={"Idempotency-Key": "custom-key"}), ) assert response.request.headers.get("Idempotency-Key") == "custom-key" - response = self.client.post( + response = client.post( "/foo", cast_to=httpx.Response, options=make_request_options(extra_headers={"idempotency-key": "custom-key"}), @@ -573,7 +585,7 @@ def test_idempotency_header_options(self, respx_mock: MockRouter) -> None: assert response.request.headers.get("Idempotency-Key") == "custom-key" # custom argument - response = self.client.post( + response = client.post( "/foo", cast_to=httpx.Response, options=make_request_options(idempotency_key="custom-key") ) assert response.request.headers.get("Idempotency-Key") == "custom-key" @@ -586,6 +598,8 @@ def test_base_url_setter(self) -> None: assert client.base_url == "https://example.com/from_setter/" + client.close() + def test_base_url_env(self) -> None: with update_env(INCREASE_BASE_URL="http://localhost:5000/from/env"): client = Increase(api_key=api_key, _strict_response_validation=True) @@ -601,6 +615,8 @@ def test_base_url_env(self) -> None: ) assert str(client.base_url).startswith("https://api.increase.com") + client.close() + @pytest.mark.parametrize( "client", [ @@ -623,6 +639,7 @@ def test_base_url_trailing_slash(self, client: Increase) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + client.close() @pytest.mark.parametrize( "client", @@ -646,6 +663,7 @@ def test_base_url_no_trailing_slash(self, client: Increase) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + client.close() @pytest.mark.parametrize( "client", @@ -669,35 +687,36 @@ def test_absolute_request_url(self, client: Increase) -> None: ), ) assert request.url == "https://myapi.com/foo" + client.close() def test_copied_client_does_not_close_http(self) -> None: - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) - assert not client.is_closed() + test_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) + assert not test_client.is_closed() - copied = client.copy() - assert copied is not client + copied = test_client.copy() + assert copied is not test_client del copied - assert not client.is_closed() + assert not test_client.is_closed() def test_client_context_manager(self) -> None: - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) - with client as c2: - assert c2 is client + test_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) + with test_client as c2: + assert c2 is test_client assert not c2.is_closed() - assert not client.is_closed() - assert client.is_closed() + assert not test_client.is_closed() + assert test_client.is_closed() @pytest.mark.respx(base_url=base_url) - def test_client_response_validation_error(self, respx_mock: MockRouter) -> None: + def test_client_response_validation_error(self, respx_mock: MockRouter, client: Increase) -> None: class Model(BaseModel): foo: str respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": {"invalid": True}})) with pytest.raises(APIResponseValidationError) as exc: - self.client.get("/foo", cast_to=Model) + client.get("/foo", cast_to=Model) assert isinstance(exc.value.__cause__, ValidationError) @@ -717,11 +736,14 @@ class Model(BaseModel): with pytest.raises(APIResponseValidationError): strict_client.get("/foo", cast_to=Model) - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=False) + non_strict_client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=False) - response = client.get("/foo", cast_to=Model) + response = non_strict_client.get("/foo", cast_to=Model) assert isinstance(response, str) # type: ignore[unreachable] + strict_client.close() + non_strict_client.close() + @pytest.mark.parametrize( "remaining_retries,retry_after,timeout", [ @@ -744,9 +766,9 @@ class Model(BaseModel): ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) - def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str, timeout: float) -> None: - client = Increase(base_url=base_url, api_key=api_key, _strict_response_validation=True) - + def test_parse_retry_after_header( + self, remaining_retries: int, retry_after: str, timeout: float, client: Increase + ) -> None: headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) calculated = client._calculate_retry_timeout(remaining_retries, options, headers) @@ -760,7 +782,7 @@ def test_retrying_timeout_errors_doesnt_leak(self, respx_mock: MockRouter, clien with pytest.raises(APITimeoutError): client.accounts.with_streaming_response.create(name="New Account!").__enter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(client) == 0 @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @@ -769,7 +791,7 @@ def test_retrying_status_errors_doesnt_leak(self, respx_mock: MockRouter, client with pytest.raises(APIStatusError): client.accounts.with_streaming_response.create(name="New Account!").__enter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @@ -875,83 +897,77 @@ def test_default_client_creation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - def test_follow_redirects(self, respx_mock: MockRouter) -> None: + def test_follow_redirects(self, respx_mock: MockRouter, client: Increase) -> None: # Test that the default follow_redirects=True allows following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) - response = self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + response = client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) assert response.status_code == 200 assert response.json() == {"status": "ok"} @pytest.mark.respx(base_url=base_url) - def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + def test_follow_redirects_disabled(self, respx_mock: MockRouter, client: Increase) -> None: # Test that follow_redirects=False prevents following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) with pytest.raises(APIStatusError) as exc_info: - self.client.post( - "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response - ) + client.post("/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response) assert exc_info.value.response.status_code == 302 assert exc_info.value.response.headers["Location"] == f"{base_url}/redirected" class TestAsyncIncrease: - client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) - @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_raw_response(self, respx_mock: MockRouter) -> None: + async def test_raw_response(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.post("/foo", cast_to=httpx.Response) + response = await async_client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_raw_response_for_binary(self, respx_mock: MockRouter) -> None: + async def test_raw_response_for_binary(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: respx_mock.post("/foo").mock( return_value=httpx.Response(200, headers={"Content-Type": "application/binary"}, content='{"foo": "bar"}') ) - response = await self.client.post("/foo", cast_to=httpx.Response) + response = await async_client.post("/foo", cast_to=httpx.Response) assert response.status_code == 200 assert isinstance(response, httpx.Response) assert response.json() == {"foo": "bar"} - def test_copy(self) -> None: - copied = self.client.copy() - assert id(copied) != id(self.client) + def test_copy(self, async_client: AsyncIncrease) -> None: + copied = async_client.copy() + assert id(copied) != id(async_client) - copied = self.client.copy(api_key="another My API Key") + copied = async_client.copy(api_key="another My API Key") assert copied.api_key == "another My API Key" - assert self.client.api_key == "My API Key" + assert async_client.api_key == "My API Key" - def test_copy_default_options(self) -> None: + def test_copy_default_options(self, async_client: AsyncIncrease) -> None: # options that have a default are overridden correctly - copied = self.client.copy(max_retries=7) + copied = async_client.copy(max_retries=7) assert copied.max_retries == 7 - assert self.client.max_retries == 2 + assert async_client.max_retries == 2 copied2 = copied.copy(max_retries=6) assert copied2.max_retries == 6 assert copied.max_retries == 7 # timeout - assert isinstance(self.client.timeout, httpx.Timeout) - copied = self.client.copy(timeout=None) + assert isinstance(async_client.timeout, httpx.Timeout) + copied = async_client.copy(timeout=None) assert copied.timeout is None - assert isinstance(self.client.timeout, httpx.Timeout) + assert isinstance(async_client.timeout, httpx.Timeout) - def test_copy_default_headers(self) -> None: + async def test_copy_default_headers(self) -> None: client = AsyncIncrease( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) @@ -984,8 +1000,9 @@ def test_copy_default_headers(self) -> None: match="`default_headers` and `set_default_headers` arguments are mutually exclusive", ): client.copy(set_default_headers={}, default_headers={"X-Foo": "Bar"}) + await client.close() - def test_copy_default_query(self) -> None: + async def test_copy_default_query(self) -> None: client = AsyncIncrease( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"foo": "bar"} ) @@ -1021,13 +1038,15 @@ def test_copy_default_query(self) -> None: ): client.copy(set_default_query={}, default_query={"foo": "Bar"}) - def test_copy_signature(self) -> None: + await client.close() + + def test_copy_signature(self, async_client: AsyncIncrease) -> None: # ensure the same parameters that can be passed to the client are defined in the `.copy()` method init_signature = inspect.signature( # mypy doesn't like that we access the `__init__` property. - self.client.__init__, # type: ignore[misc] + async_client.__init__, # type: ignore[misc] ) - copy_signature = inspect.signature(self.client.copy) + copy_signature = inspect.signature(async_client.copy) exclude_params = {"transport", "proxies", "_strict_response_validation"} for name in init_signature.parameters.keys(): @@ -1038,12 +1057,12 @@ def test_copy_signature(self) -> None: 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: + def test_copy_build_request(self, async_client: AsyncIncrease) -> None: options = FinalRequestOptions(method="get", url="/foo") def build_request(options: FinalRequestOptions) -> None: - client = self.client.copy() - client._build_request(options) + client_copy = async_client.copy() + client_copy._build_request(options) # ensure that the machinery is warmed up before tracing starts. build_request(options) @@ -1100,12 +1119,12 @@ def add_leak(leaks: list[tracemalloc.StatisticDiff], diff: tracemalloc.Statistic print(frame) raise AssertionError() - async def test_request_timeout(self) -> None: - request = self.client._build_request(FinalRequestOptions(method="get", url="/foo")) + async def test_request_timeout(self, async_client: AsyncIncrease) -> None: + request = async_client._build_request(FinalRequestOptions(method="get", url="/foo")) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT - request = self.client._build_request( + request = async_client._build_request( FinalRequestOptions(method="get", url="/foo", timeout=httpx.Timeout(100.0)) ) timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore @@ -1120,6 +1139,8 @@ async def test_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(0) + await client.close() + async def test_http_client_timeout_option(self) -> None: # custom timeout given to the httpx client should be used async with httpx.AsyncClient(timeout=None) as http_client: @@ -1131,6 +1152,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == httpx.Timeout(None) + await client.close() + # no timeout given to the httpx client should not use the httpx default async with httpx.AsyncClient() as http_client: client = AsyncIncrease( @@ -1141,6 +1164,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT + await client.close() + # explicitly passing the default timeout currently results in it being ignored async with httpx.AsyncClient(timeout=HTTPX_DEFAULT_TIMEOUT) as http_client: client = AsyncIncrease( @@ -1151,6 +1176,8 @@ async def test_http_client_timeout_option(self) -> None: timeout = httpx.Timeout(**request.extensions["timeout"]) # type: ignore assert timeout == DEFAULT_TIMEOUT # our default + await client.close() + def test_invalid_http_client(self) -> None: with pytest.raises(TypeError, match="Invalid `http_client` arg"): with httpx.Client() as http_client: @@ -1161,15 +1188,15 @@ def test_invalid_http_client(self) -> None: http_client=cast(Any, http_client), ) - def test_default_headers_option(self) -> None: - client = AsyncIncrease( + async def test_default_headers_option(self) -> None: + test_client = AsyncIncrease( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_headers={"X-Foo": "bar"} ) - request = client._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "bar" assert request.headers.get("x-stainless-lang") == "python" - client2 = AsyncIncrease( + test_client2 = AsyncIncrease( base_url=base_url, api_key=api_key, _strict_response_validation=True, @@ -1178,10 +1205,13 @@ def test_default_headers_option(self) -> None: "X-Stainless-Lang": "my-overriding-header", }, ) - request = client2._build_request(FinalRequestOptions(method="get", url="/foo")) + request = test_client2._build_request(FinalRequestOptions(method="get", url="/foo")) assert request.headers.get("x-foo") == "stainless" assert request.headers.get("x-stainless-lang") == "my-overriding-header" + await test_client.close() + await test_client2.close() + def test_validate_headers(self) -> None: client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) request = client._build_request(FinalRequestOptions(method="get", url="/foo")) @@ -1192,7 +1222,7 @@ def test_validate_headers(self) -> None: client2 = AsyncIncrease(base_url=base_url, api_key=None, _strict_response_validation=True) _ = client2 - def test_default_query_option(self) -> None: + async def test_default_query_option(self) -> None: client = AsyncIncrease( base_url=base_url, api_key=api_key, _strict_response_validation=True, default_query={"query_param": "bar"} ) @@ -1210,8 +1240,10 @@ def test_default_query_option(self) -> None: url = httpx.URL(request.url) assert dict(url.params) == {"foo": "baz", "query_param": "overridden"} - def test_request_extra_json(self) -> None: - request = self.client._build_request( + await client.close() + + def test_request_extra_json(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1222,7 +1254,7 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": False} - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1233,7 +1265,7 @@ def test_request_extra_json(self) -> None: assert data == {"baz": False} # `extra_json` takes priority over `json_data` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1244,8 +1276,8 @@ def test_request_extra_json(self) -> None: data = json.loads(request.content.decode("utf-8")) assert data == {"foo": "bar", "baz": None} - def test_request_extra_headers(self) -> None: - request = self.client._build_request( + def test_request_extra_headers(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1255,7 +1287,7 @@ def test_request_extra_headers(self) -> None: assert request.headers.get("X-Foo") == "Foo" # `extra_headers` takes priority over `default_headers` when keys clash - request = self.client.with_options(default_headers={"X-Bar": "true"})._build_request( + request = client.with_options(default_headers={"X-Bar": "true"})._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1266,8 +1298,8 @@ def test_request_extra_headers(self) -> None: ) assert request.headers.get("X-Bar") == "false" - def test_request_extra_query(self) -> None: - request = self.client._build_request( + def test_request_extra_query(self, client: Increase) -> None: + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1280,7 +1312,7 @@ def test_request_extra_query(self) -> None: assert params == {"my_query_param": "Foo"} # if both `query` and `extra_query` are given, they are merged - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1294,7 +1326,7 @@ def test_request_extra_query(self) -> None: assert params == {"bar": "1", "foo": "2"} # `extra_query` takes priority over `query` when keys clash - request = self.client._build_request( + request = client._build_request( FinalRequestOptions( method="post", url="/foo", @@ -1337,7 +1369,7 @@ def test_multipart_repeating_array(self, async_client: AsyncIncrease) -> None: ] @pytest.mark.respx(base_url=base_url) - async def test_basic_union_response(self, respx_mock: MockRouter) -> None: + async def test_basic_union_response(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: class Model1(BaseModel): name: str @@ -1346,12 +1378,12 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" @pytest.mark.respx(base_url=base_url) - async def test_union_response_different_types(self, respx_mock: MockRouter) -> None: + async def test_union_response_different_types(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: """Union of objects with the same field name using a different type""" class Model1(BaseModel): @@ -1362,18 +1394,20 @@ class Model2(BaseModel): respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": "bar"})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model2) assert response.foo == "bar" respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": 1})) - response = await self.client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) + response = await async_client.get("/foo", cast_to=cast(Any, Union[Model1, Model2])) assert isinstance(response, Model1) assert response.foo == 1 @pytest.mark.respx(base_url=base_url) - async def test_non_application_json_content_type_for_json_data(self, respx_mock: MockRouter) -> None: + async def test_non_application_json_content_type_for_json_data( + self, respx_mock: MockRouter, async_client: AsyncIncrease + ) -> None: """ Response that sets Content-Type to something other than application/json but returns json data """ @@ -1389,29 +1423,29 @@ class Model(BaseModel): ) ) - response = await self.client.get("/foo", cast_to=Model) + response = await async_client.get("/foo", cast_to=Model) assert isinstance(response, Model) assert response.foo == 2 @pytest.mark.respx(base_url=base_url) - async def test_idempotency_header_options(self, respx_mock: MockRouter) -> None: + async def test_idempotency_header_options(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: respx_mock.post("/foo").mock(return_value=httpx.Response(200, json={})) - response = await self.client.post("/foo", cast_to=httpx.Response) + response = await async_client.post("/foo", cast_to=httpx.Response) header = response.request.headers.get("Idempotency-Key") assert header is not None assert header.startswith("stainless-python-retry") # explicit header - response = await self.client.post( + response = await async_client.post( "/foo", cast_to=httpx.Response, options=make_request_options(extra_headers={"Idempotency-Key": "custom-key"}), ) assert response.request.headers.get("Idempotency-Key") == "custom-key" - response = await self.client.post( + response = await async_client.post( "/foo", cast_to=httpx.Response, options=make_request_options(extra_headers={"idempotency-key": "custom-key"}), @@ -1419,12 +1453,12 @@ async def test_idempotency_header_options(self, respx_mock: MockRouter) -> None: assert response.request.headers.get("Idempotency-Key") == "custom-key" # custom argument - response = await self.client.post( + response = await async_client.post( "/foo", cast_to=httpx.Response, options=make_request_options(idempotency_key="custom-key") ) assert response.request.headers.get("Idempotency-Key") == "custom-key" - def test_base_url_setter(self) -> None: + async def test_base_url_setter(self) -> None: client = AsyncIncrease( base_url="https://example.com/from_init", api_key=api_key, _strict_response_validation=True ) @@ -1434,7 +1468,9 @@ def test_base_url_setter(self) -> None: assert client.base_url == "https://example.com/from_setter/" - def test_base_url_env(self) -> None: + await client.close() + + async def test_base_url_env(self) -> None: with update_env(INCREASE_BASE_URL="http://localhost:5000/from/env"): client = AsyncIncrease(api_key=api_key, _strict_response_validation=True) assert client.base_url == "http://localhost:5000/from/env/" @@ -1449,6 +1485,8 @@ def test_base_url_env(self) -> None: ) assert str(client.base_url).startswith("https://api.increase.com") + await client.close() + @pytest.mark.parametrize( "client", [ @@ -1464,7 +1502,7 @@ def test_base_url_env(self) -> None: ], ids=["standard", "custom http client"], ) - def test_base_url_trailing_slash(self, client: AsyncIncrease) -> None: + async def test_base_url_trailing_slash(self, client: AsyncIncrease) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1473,6 +1511,7 @@ def test_base_url_trailing_slash(self, client: AsyncIncrease) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + await client.close() @pytest.mark.parametrize( "client", @@ -1489,7 +1528,7 @@ def test_base_url_trailing_slash(self, client: AsyncIncrease) -> None: ], ids=["standard", "custom http client"], ) - def test_base_url_no_trailing_slash(self, client: AsyncIncrease) -> None: + async def test_base_url_no_trailing_slash(self, client: AsyncIncrease) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1498,6 +1537,7 @@ def test_base_url_no_trailing_slash(self, client: AsyncIncrease) -> None: ), ) assert request.url == "http://localhost:5000/custom/path/foo" + await client.close() @pytest.mark.parametrize( "client", @@ -1514,7 +1554,7 @@ def test_base_url_no_trailing_slash(self, client: AsyncIncrease) -> None: ], ids=["standard", "custom http client"], ) - def test_absolute_request_url(self, client: AsyncIncrease) -> None: + async def test_absolute_request_url(self, client: AsyncIncrease) -> None: request = client._build_request( FinalRequestOptions( method="post", @@ -1523,37 +1563,37 @@ def test_absolute_request_url(self, client: AsyncIncrease) -> None: ), ) assert request.url == "https://myapi.com/foo" + await client.close() async def test_copied_client_does_not_close_http(self) -> None: - client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) - assert not client.is_closed() + test_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) + assert not test_client.is_closed() - copied = client.copy() - assert copied is not client + copied = test_client.copy() + assert copied is not test_client del copied await asyncio.sleep(0.2) - assert not client.is_closed() + assert not test_client.is_closed() async def test_client_context_manager(self) -> None: - client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) - async with client as c2: - assert c2 is client + test_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) + async with test_client as c2: + assert c2 is test_client assert not c2.is_closed() - assert not client.is_closed() - assert client.is_closed() + assert not test_client.is_closed() + assert test_client.is_closed() @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio - async def test_client_response_validation_error(self, respx_mock: MockRouter) -> None: + async def test_client_response_validation_error(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: class Model(BaseModel): foo: str respx_mock.get("/foo").mock(return_value=httpx.Response(200, json={"foo": {"invalid": True}})) with pytest.raises(APIResponseValidationError) as exc: - await self.client.get("/foo", cast_to=Model) + await async_client.get("/foo", cast_to=Model) assert isinstance(exc.value.__cause__, ValidationError) @@ -1564,7 +1604,6 @@ async def test_client_max_retries_validation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_received_text_for_expected_json(self, respx_mock: MockRouter) -> None: class Model(BaseModel): name: str @@ -1576,11 +1615,14 @@ class Model(BaseModel): with pytest.raises(APIResponseValidationError): await strict_client.get("/foo", cast_to=Model) - client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=False) + non_strict_client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=False) - response = await client.get("/foo", cast_to=Model) + response = await non_strict_client.get("/foo", cast_to=Model) assert isinstance(response, str) # type: ignore[unreachable] + await strict_client.close() + await non_strict_client.close() + @pytest.mark.parametrize( "remaining_retries,retry_after,timeout", [ @@ -1603,13 +1645,12 @@ class Model(BaseModel): ], ) @mock.patch("time.time", mock.MagicMock(return_value=1696004797)) - @pytest.mark.asyncio - async def test_parse_retry_after_header(self, remaining_retries: int, retry_after: str, timeout: float) -> None: - client = AsyncIncrease(base_url=base_url, api_key=api_key, _strict_response_validation=True) - + async def test_parse_retry_after_header( + self, remaining_retries: int, retry_after: str, timeout: float, async_client: AsyncIncrease + ) -> None: headers = httpx.Headers({"retry-after": retry_after}) options = FinalRequestOptions(method="get", url="/foo", max_retries=3) - calculated = client._calculate_retry_timeout(remaining_retries, options, headers) + calculated = async_client._calculate_retry_timeout(remaining_retries, options, headers) assert calculated == pytest.approx(timeout, 0.5 * 0.875) # pyright: ignore[reportUnknownMemberType] @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @@ -1622,7 +1663,7 @@ async def test_retrying_timeout_errors_doesnt_leak( with pytest.raises(APITimeoutError): await async_client.accounts.with_streaming_response.create(name="New Account!").__aenter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(async_client) == 0 @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) @@ -1633,12 +1674,11 @@ async def test_retrying_status_errors_doesnt_leak( with pytest.raises(APIStatusError): await async_client.accounts.with_streaming_response.create(name="New Account!").__aenter__() - assert _get_open_connections(self.client) == 0 + assert _get_open_connections(async_client) == 0 @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio @pytest.mark.parametrize("failure_mode", ["status", "exception"]) async def test_retries_taken( self, @@ -1670,7 +1710,6 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_omit_retry_count_header( self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter ) -> None: @@ -1696,7 +1735,6 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: @pytest.mark.parametrize("failures_before_success", [0, 2, 4]) @mock.patch("increase._base_client.BaseClient._calculate_retry_timeout", _low_retry_timeout) @pytest.mark.respx(base_url=base_url) - @pytest.mark.asyncio async def test_overwrite_retry_count_header( self, async_client: AsyncIncrease, failures_before_success: int, respx_mock: MockRouter ) -> None: @@ -1746,26 +1784,26 @@ async def test_default_client_creation(self) -> None: ) @pytest.mark.respx(base_url=base_url) - async def test_follow_redirects(self, respx_mock: MockRouter) -> None: + async def test_follow_redirects(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: # Test that the default follow_redirects=True allows following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) respx_mock.get("/redirected").mock(return_value=httpx.Response(200, json={"status": "ok"})) - response = await self.client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) + response = await async_client.post("/redirect", body={"key": "value"}, cast_to=httpx.Response) assert response.status_code == 200 assert response.json() == {"status": "ok"} @pytest.mark.respx(base_url=base_url) - async def test_follow_redirects_disabled(self, respx_mock: MockRouter) -> None: + async def test_follow_redirects_disabled(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: # Test that follow_redirects=False prevents following redirects respx_mock.post("/redirect").mock( return_value=httpx.Response(302, headers={"Location": f"{base_url}/redirected"}) ) with pytest.raises(APIStatusError) as exc_info: - await self.client.post( + await async_client.post( "/redirect", body={"key": "value"}, options={"follow_redirects": False}, cast_to=httpx.Response ) From 660973027acd2a243a2250f1cee4de9078dcf0a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 14:07:02 +0000 Subject: [PATCH 0958/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/wire_transfers.py | 100 ++++------------ src/increase/types/wire_transfer.py | 87 +++++++++----- .../types/wire_transfer_create_params.py | 111 +++++++++++------- tests/api_resources/test_wire_transfers.py | 86 +++++++++----- 5 files changed, 214 insertions(+), 174 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6a120e927..9256ec13b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2453598e129a8305006487bc7616f3ee69eb4355a6d3f185dd51404fa8142246.yml -openapi_spec_hash: e0b54d0015d39f9434659d8899bb2706 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7689739a12916f3e4cc15be2e057e78b4ede38202bf4cf5f9358ef10374db9b3.yml +openapi_spec_hash: 39b4a0d5d1441d03ed9de368335d78ec config_hash: fc8a0ae068f2feeac76f728ac6838543 diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 0ee8c5cbd..080468288 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -47,18 +47,12 @@ def create( *, account_id: str, amount: int, - beneficiary_name: str, + creditor: wire_transfer_create_params.Creditor, + remittance: wire_transfer_create_params.Remittance, account_number: str | Omit = omit, - beneficiary_address_line1: str | Omit = omit, - beneficiary_address_line2: str | Omit = omit, - beneficiary_address_line3: str | Omit = omit, + debtor: wire_transfer_create_params.Debtor | Omit = omit, external_account_id: str | Omit = omit, inbound_wire_drawdown_request_id: str | Omit = omit, - originator_address_line1: str | Omit = omit, - originator_address_line2: str | Omit = omit, - originator_address_line3: str | Omit = omit, - originator_name: str | Omit = omit, - remittance: wire_transfer_create_params.Remittance | Omit = omit, require_approval: bool | Omit = omit, routing_number: str | Omit = omit, source_account_number_id: str | Omit = omit, @@ -78,15 +72,15 @@ def create( amount: The transfer amount in USD cents. - beneficiary_name: The beneficiary's name. + creditor: The person or business that is receiving the funds from the transfer. - account_number: The account number for the destination account. - - beneficiary_address_line1: The beneficiary's address line 1. + remittance: Additional remittance information related to the wire transfer. - beneficiary_address_line2: The beneficiary's address line 2. + account_number: The account number for the destination account. - beneficiary_address_line3: The beneficiary's address line 3. + debtor: The person or business whose funds are being transferred. This is only necessary + if you're transferring from a commingled account. Otherwise, we'll use the + associated entity's details. external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent. @@ -94,20 +88,6 @@ def create( inbound_wire_drawdown_request_id: The ID of an Inbound Wire Drawdown Request in response to which this transfer is being sent. - originator_address_line1: The originator's address line 1. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_address_line2: The originator's address line 2. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_address_line3: The originator's address line 3. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_name: The originator's name. This is only necessary if you're transferring from a - commingled account. Otherwise, we'll use the associated entity's details. - - remittance: Additional remittance information related to the wire transfer. - require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -131,18 +111,12 @@ def create( { "account_id": account_id, "amount": amount, - "beneficiary_name": beneficiary_name, + "creditor": creditor, + "remittance": remittance, "account_number": account_number, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, + "debtor": debtor, "external_account_id": external_account_id, "inbound_wire_drawdown_request_id": inbound_wire_drawdown_request_id, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, @@ -369,18 +343,12 @@ async def create( *, account_id: str, amount: int, - beneficiary_name: str, + creditor: wire_transfer_create_params.Creditor, + remittance: wire_transfer_create_params.Remittance, account_number: str | Omit = omit, - beneficiary_address_line1: str | Omit = omit, - beneficiary_address_line2: str | Omit = omit, - beneficiary_address_line3: str | Omit = omit, + debtor: wire_transfer_create_params.Debtor | Omit = omit, external_account_id: str | Omit = omit, inbound_wire_drawdown_request_id: str | Omit = omit, - originator_address_line1: str | Omit = omit, - originator_address_line2: str | Omit = omit, - originator_address_line3: str | Omit = omit, - originator_name: str | Omit = omit, - remittance: wire_transfer_create_params.Remittance | Omit = omit, require_approval: bool | Omit = omit, routing_number: str | Omit = omit, source_account_number_id: str | Omit = omit, @@ -400,15 +368,15 @@ async def create( amount: The transfer amount in USD cents. - beneficiary_name: The beneficiary's name. + creditor: The person or business that is receiving the funds from the transfer. - account_number: The account number for the destination account. - - beneficiary_address_line1: The beneficiary's address line 1. + remittance: Additional remittance information related to the wire transfer. - beneficiary_address_line2: The beneficiary's address line 2. + account_number: The account number for the destination account. - beneficiary_address_line3: The beneficiary's address line 3. + debtor: The person or business whose funds are being transferred. This is only necessary + if you're transferring from a commingled account. Otherwise, we'll use the + associated entity's details. external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is provided, `account_number` and `routing_number` must be absent. @@ -416,20 +384,6 @@ async def create( inbound_wire_drawdown_request_id: The ID of an Inbound Wire Drawdown Request in response to which this transfer is being sent. - originator_address_line1: The originator's address line 1. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_address_line2: The originator's address line 2. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_address_line3: The originator's address line 3. This is only necessary if you're transferring - from a commingled account. Otherwise, we'll use the associated entity's details. - - originator_name: The originator's name. This is only necessary if you're transferring from a - commingled account. Otherwise, we'll use the associated entity's details. - - remittance: Additional remittance information related to the wire transfer. - require_approval: Whether the transfer requires explicit approval via the dashboard or API. routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the @@ -453,18 +407,12 @@ async def create( { "account_id": account_id, "amount": amount, - "beneficiary_name": beneficiary_name, + "creditor": creditor, + "remittance": remittance, "account_number": account_number, - "beneficiary_address_line1": beneficiary_address_line1, - "beneficiary_address_line2": beneficiary_address_line2, - "beneficiary_address_line3": beneficiary_address_line3, + "debtor": debtor, "external_account_id": external_account_id, "inbound_wire_drawdown_request_id": inbound_wire_drawdown_request_id, - "originator_address_line1": originator_address_line1, - "originator_address_line2": originator_address_line2, - "originator_address_line3": originator_address_line3, - "originator_name": originator_name, - "remittance": remittance, "require_approval": require_approval, "routing_number": routing_number, "source_account_number_id": source_account_number_id, diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index c1bfb0d6f..f0132b3f4 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -14,6 +14,12 @@ "CreatedByAPIKey", "CreatedByOAuthApplication", "CreatedByUser", + "Creditor", + "CreditorAddress", + "CreditorAddressUnstructured", + "Debtor", + "DebtorAddress", + "DebtorAddressUnstructured", "Remittance", "RemittanceTax", "RemittanceUnstructured", @@ -86,6 +92,54 @@ class CreatedBy(BaseModel): """If present, details about the User that created the transfer.""" +class CreditorAddressUnstructured(BaseModel): + line1: Optional[str] = None + """The first line.""" + + line2: Optional[str] = None + """The second line.""" + + line3: Optional[str] = None + """The third line.""" + + +class CreditorAddress(BaseModel): + unstructured: Optional[CreditorAddressUnstructured] = None + """Unstructured address lines.""" + + +class Creditor(BaseModel): + address: Optional[CreditorAddress] = None + """The person or business's address.""" + + name: Optional[str] = None + """The person or business's name.""" + + +class DebtorAddressUnstructured(BaseModel): + line1: Optional[str] = None + """The first line.""" + + line2: Optional[str] = None + """The second line.""" + + line3: Optional[str] = None + """The third line.""" + + +class DebtorAddress(BaseModel): + unstructured: Optional[DebtorAddressUnstructured] = None + """Unstructured address lines.""" + + +class Debtor(BaseModel): + address: Optional[DebtorAddress] = None + """The person or business's address.""" + + name: Optional[str] = None + """The person or business's name.""" + + class RemittanceTax(BaseModel): date: datetime.date """The month and year the tax payment is for, in YYYY-MM-DD format. @@ -215,18 +269,6 @@ class WireTransfer(BaseModel): this will contain details of the approval. """ - beneficiary_address_line1: Optional[str] = None - """The beneficiary's address line 1.""" - - beneficiary_address_line2: Optional[str] = None - """The beneficiary's address line 2.""" - - beneficiary_address_line3: Optional[str] = None - """The beneficiary's address line 3.""" - - beneficiary_name: Optional[str] = None - """The beneficiary's name.""" - cancellation: Optional[Cancellation] = None """ If your account requires approvals for transfers and the transfer was not @@ -242,6 +284,9 @@ class WireTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" + creditor: Optional[Creditor] = None + """The person or business that is receiving the funds from the transfer.""" + currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's @@ -255,6 +300,9 @@ class WireTransfer(BaseModel): - `USD` - US Dollar (USD) """ + debtor: Optional[Debtor] = None + """The person or business whose funds are being transferred.""" + external_account_id: Optional[str] = None """The identifier of the External Account the transfer was made to, if any.""" @@ -272,24 +320,9 @@ class WireTransfer(BaseModel): was sent. """ - message_to_recipient: str - """The message that will show on the recipient's bank statement.""" - network: Literal["wire"] """The transfer's network.""" - originator_address_line1: Optional[str] = None - """The originator's address line 1.""" - - originator_address_line2: Optional[str] = None - """The originator's address line 2.""" - - originator_address_line3: Optional[str] = None - """The originator's address line 3.""" - - originator_name: Optional[str] = None - """The originator's name.""" - pending_transaction_id: Optional[str] = None """The ID for the pending transaction representing the transfer. diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index e9361645d..6786b5629 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -8,7 +8,18 @@ from .._utils import PropertyInfo -__all__ = ["WireTransferCreateParams", "Remittance", "RemittanceTax", "RemittanceUnstructured"] +__all__ = [ + "WireTransferCreateParams", + "Creditor", + "CreditorAddress", + "CreditorAddressUnstructured", + "Remittance", + "RemittanceTax", + "RemittanceUnstructured", + "Debtor", + "DebtorAddress", + "DebtorAddressUnstructured", +] class WireTransferCreateParams(TypedDict, total=False): @@ -18,20 +29,21 @@ class WireTransferCreateParams(TypedDict, total=False): amount: Required[int] """The transfer amount in USD cents.""" - beneficiary_name: Required[str] - """The beneficiary's name.""" + creditor: Required[Creditor] + """The person or business that is receiving the funds from the transfer.""" + + remittance: Required[Remittance] + """Additional remittance information related to the wire transfer.""" account_number: str """The account number for the destination account.""" - beneficiary_address_line1: str - """The beneficiary's address line 1.""" - - beneficiary_address_line2: str - """The beneficiary's address line 2.""" + debtor: Debtor + """The person or business whose funds are being transferred. - beneficiary_address_line3: str - """The beneficiary's address line 3.""" + This is only necessary if you're transferring from a commingled account. + Otherwise, we'll use the associated entity's details. + """ external_account_id: str """The ID of an External Account to initiate a transfer to. @@ -46,48 +58,41 @@ class WireTransferCreateParams(TypedDict, total=False): being sent. """ - originator_address_line1: str - """The originator's address line 1. + require_approval: bool + """Whether the transfer requires explicit approval via the dashboard or API.""" - This is only necessary if you're transferring from a commingled account. - Otherwise, we'll use the associated entity's details. + routing_number: str + """ + The American Bankers' Association (ABA) Routing Transit Number (RTN) for the + destination account. """ - originator_address_line2: str - """The originator's address line 2. + source_account_number_id: str + """The ID of an Account Number that will be passed to the wire's recipient""" - This is only necessary if you're transferring from a commingled account. - Otherwise, we'll use the associated entity's details. - """ - originator_address_line3: str - """The originator's address line 3. +class CreditorAddressUnstructured(TypedDict, total=False): + line1: Required[str] + """The address line 1.""" - This is only necessary if you're transferring from a commingled account. - Otherwise, we'll use the associated entity's details. - """ + line2: str + """The address line 2.""" - originator_name: str - """The originator's name. + line3: str + """The address line 3.""" - This is only necessary if you're transferring from a commingled account. - Otherwise, we'll use the associated entity's details. - """ - remittance: Remittance - """Additional remittance information related to the wire transfer.""" +class CreditorAddress(TypedDict, total=False): + unstructured: Required[CreditorAddressUnstructured] + """Unstructured address lines.""" - require_approval: bool - """Whether the transfer requires explicit approval via the dashboard or API.""" - routing_number: str - """ - The American Bankers' Association (ABA) Routing Transit Number (RTN) for the - destination account. - """ +class Creditor(TypedDict, total=False): + name: Required[str] + """The person or business's name.""" - source_account_number_id: str - """The ID of an Account Number that will be passed to the wire's recipient""" + address: CreditorAddress + """The person or business's address.""" class RemittanceTax(TypedDict, total=False): @@ -109,7 +114,7 @@ class RemittanceTax(TypedDict, total=False): class RemittanceUnstructured(TypedDict, total=False): message: Required[str] - """The message to the beneficiary.""" + """The information.""" class Remittance(TypedDict, total=False): @@ -133,3 +138,27 @@ class Remittance(TypedDict, total=False): Required if `category` is equal to `unstructured`. """ + + +class DebtorAddressUnstructured(TypedDict, total=False): + line1: Required[str] + """The address line 1.""" + + line2: str + """The address line 2.""" + + line3: str + """The address line 3.""" + + +class DebtorAddress(TypedDict, total=False): + unstructured: Required[DebtorAddressUnstructured] + """Unstructured address lines.""" + + +class Debtor(TypedDict, total=False): + name: Required[str] + """The person or business's name.""" + + address: DebtorAddress + """The person or business's address.""" diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index b2d2884e4..e68b36452 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -24,7 +24,8 @@ def test_method_create(self, client: Increase) -> None: wire_transfer = client.wire_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -33,17 +34,16 @@ def test_method_create_with_all_params(self, client: Increase) -> None: wire_transfer = client.wire_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", - account_number="987654321", - beneficiary_address_line1="33 Liberty Street", - beneficiary_address_line2="New York", - beneficiary_address_line3="NY 10045", - external_account_id="external_account_id", - inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", + creditor={ + "name": "Ian Crease", + "address": { + "unstructured": { + "line1": "33 Liberty Street", + "line2": "New York", + "line3": "NY 10045", + } + }, + }, remittance={ "category": "unstructured", "tax": { @@ -53,6 +53,19 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, "unstructured": {"message": "New account transfer"}, }, + account_number="987654321", + debtor={ + "name": "x", + "address": { + "unstructured": { + "line1": "x", + "line2": "x", + "line3": "x", + } + }, + }, + external_account_id="external_account_id", + inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -64,7 +77,8 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.wire_transfers.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) assert response.is_closed is True @@ -77,7 +91,8 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.wire_transfers.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -254,7 +269,8 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) assert_matches_type(WireTransfer, wire_transfer, path=["response"]) @@ -263,17 +279,16 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) wire_transfer = await async_client.wire_transfers.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", - account_number="987654321", - beneficiary_address_line1="33 Liberty Street", - beneficiary_address_line2="New York", - beneficiary_address_line3="NY 10045", - external_account_id="external_account_id", - inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", - originator_address_line1="x", - originator_address_line2="x", - originator_address_line3="x", - originator_name="x", + creditor={ + "name": "Ian Crease", + "address": { + "unstructured": { + "line1": "33 Liberty Street", + "line2": "New York", + "line3": "NY 10045", + } + }, + }, remittance={ "category": "unstructured", "tax": { @@ -283,6 +298,19 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, "unstructured": {"message": "New account transfer"}, }, + account_number="987654321", + debtor={ + "name": "x", + "address": { + "unstructured": { + "line1": "x", + "line2": "x", + "line3": "x", + } + }, + }, + external_account_id="external_account_id", + inbound_wire_drawdown_request_id="inbound_wire_drawdown_request_id", require_approval=True, routing_number="101050001", source_account_number_id="source_account_number_id", @@ -294,7 +322,8 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.wire_transfers.with_raw_response.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) assert response.is_closed is True @@ -307,7 +336,8 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.wire_transfers.with_streaming_response.create( account_id="account_in71c4amph0vgo2qllky", amount=100, - beneficiary_name="Ian Crease", + creditor={"name": "Ian Crease"}, + remittance={"category": "unstructured"}, ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 513dc6d1c7cd7556dd415024c0d83a1f45355207 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 18:05:06 +0000 Subject: [PATCH 0959/1325] feat(api): api update --- .stats.yml | 6 +- src/increase/_exceptions.py | 6 +- src/increase/types/account.py | 16 +- src/increase/types/account_number.py | 16 +- src/increase/types/account_transfer.py | 16 +- src/increase/types/ach_transfer.py | 38 +- src/increase/types/card.py | 16 +- src/increase/types/card_dispute.py | 16 +- src/increase/types/card_payment.py | 136 +++++- .../types/card_purchase_supplement.py | 16 +- src/increase/types/card_push_transfer.py | 16 +- src/increase/types/card_validation.py | 16 +- src/increase/types/check_deposit.py | 64 ++- src/increase/types/check_transfer.py | 64 ++- src/increase/types/declined_transaction.py | 100 +++- src/increase/types/entity.py | 64 ++- src/increase/types/external_account.py | 16 +- src/increase/types/file.py | 16 +- src/increase/types/inbound_fednow_transfer.py | 28 +- src/increase/types/inbound_mail_item.py | 16 +- .../types/inbound_wire_drawdown_request.py | 16 +- src/increase/types/inbound_wire_transfer.py | 16 +- src/increase/types/pending_transaction.py | 150 +++++- src/increase/types/physical_card_profile.py | 16 +- src/increase/types/real_time_decision.py | 16 +- .../types/real_time_payments_transfer.py | 16 +- src/increase/types/transaction.py | 448 +++++++++++++++++- src/increase/types/wire_transfer.py | 28 +- 28 files changed, 1342 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9256ec13b..7f33565d1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7689739a12916f3e4cc15be2e057e78b4ede38202bf4cf5f9358ef10374db9b3.yml -openapi_spec_hash: 39b4a0d5d1441d03ed9de368335d78ec -config_hash: fc8a0ae068f2feeac76f728ac6838543 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fd1e9a0d66098ce0c20cb6c15bbb8c26a8662d52730907deb4a179aebd6b89d6.yml +openapi_spec_hash: 2139b75a9f653c413775fb96f70ba794 +config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index aa472b775..40ea13832 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Any, List, Mapping, Optional, cast +from typing import Any, Dict, List, Mapping, Optional, cast from typing_extensions import Literal import httpx @@ -122,7 +122,7 @@ class RateLimitError(APIStatusError): class InvalidParametersError(BadRequestError): detail: Optional[str] = None - errors: List[object] + errors: List[Dict[str, object]] """All errors related to parsing the request parameters.""" status: Literal[400] @@ -138,7 +138,7 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N self.title = title self.detail = cast(Any, construct_type(type_=Optional[str], value=data.get("detail"))) - self.errors = cast(Any, construct_type(type_=List[object], value=data.get("errors"))) + self.errors = cast(Any, construct_type(type_=List[Dict[str, object]], value=data.get("errors"))) self.status = cast(Any, construct_type(type_=Literal[400], value=data.get("status"))) self.type = cast(Any, construct_type(type_=Literal["invalid_parameters_error"], value=data.get("type"))) diff --git a/src/increase/types/account.py b/src/increase/types/account.py index a10f4b4ee..468c92274 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["Account"] @@ -111,3 +113,15 @@ class Account(BaseModel): For this resource it will always be `account`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_number.py b/src/increase/types/account_number.py index 5c5921561..5d0cade9a 100644 --- a/src/increase/types/account_number.py +++ b/src/increase/types/account_number.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["AccountNumber", "InboundACH", "InboundChecks"] @@ -84,3 +86,15 @@ class AccountNumber(BaseModel): For this resource it will always be `account_number`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index 727af025b..a2b627c00 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -180,3 +182,15 @@ class AccountTransfer(BaseModel): For this resource it will always be `account_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index f2305dbf6..b405e01b6 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import datetime -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -209,6 +209,18 @@ class InboundFundsHold(BaseModel): For this resource it will always be `inbound_funds_hold`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class NotificationsOfChange(BaseModel): change_code: Literal[ @@ -557,6 +569,18 @@ class Return(BaseModel): transfer_id: str """The identifier of the ACH Transfer associated with this return.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Settlement(BaseModel): settled_at: datetime.datetime @@ -836,3 +860,15 @@ class ACHTransfer(BaseModel): For this resource it will always be `ach_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card.py b/src/increase/types/card.py index 6e96d690b..46025eb85 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["Card", "BillingAddress", "DigitalWallet"] @@ -105,3 +107,15 @@ class Card(BaseModel): For this resource it will always be `card`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index fc04b7a5e..eced5df31 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -25,7 +25,6 @@ "VisaNetworkEventRepresentedCardholderNoLongerDisputes", "VisaNetworkEventRepresentedCreditOrReversalProcessed", "VisaNetworkEventRepresentedInvalidDispute", - "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed", "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventRepresentedProofOfCashDisbursement", "VisaNetworkEventRepresentedReversalIssued", @@ -60,7 +59,6 @@ "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", - "VisaUserSubmissionChargebackConsumerNonReceiptOfCash", "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaUserSubmissionChargebackConsumerQualityMerchandise", "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", @@ -443,10 +441,6 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): """ -class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): - pass - - class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -487,9 +481,7 @@ class VisaNetworkEventRepresented(BaseModel): invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" - non_fiat_currency_or_non_fungible_token_as_described: Optional[ - VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed - ] = None + non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None """Non-fiat currency or non-fungible token as described details. Present if and only if `reason` is @@ -1371,10 +1363,6 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): """Purchase information and explanation.""" -class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): - pass - - class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): explanation: str """Explanation.""" @@ -1897,7 +1885,7 @@ class VisaUserSubmissionChargeback(BaseModel): Present if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: Optional[VisaUserSubmissionChargebackConsumerNonReceiptOfCash] = None + consumer_non_receipt_of_cash: Optional[object] = None """Non-receipt of cash. Present if and only if `category` is `consumer_non_receipt_of_cash`. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f649681fa..6bcb0e4e1 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -295,6 +297,18 @@ class ElementCardAuthentication(BaseModel): For this resource it will always be `card_authentication`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): amount: int @@ -889,6 +903,18 @@ class ElementCardAuthorization(BaseModel): verification: ElementCardAuthorizationVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardAuthorizationExpiration(BaseModel): id: str @@ -929,6 +955,18 @@ class ElementCardAuthorizationExpiration(BaseModel): For this resource it will always be `card_authorization_expiration`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardDeclineAdditionalAmountsClinic(BaseModel): amount: int @@ -1602,6 +1640,18 @@ class ElementCardDecline(BaseModel): verification: ElementCardDeclineVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardFinancialAdditionalAmountsClinic(BaseModel): amount: int @@ -2190,6 +2240,18 @@ class ElementCardFinancial(BaseModel): verification: ElementCardFinancialVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): authorization_identification_response: Optional[str] = None @@ -2266,6 +2328,18 @@ class ElementCardFuelConfirmation(BaseModel): of the transaction's currency. For dollars, for example, this is cents. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardIncrementAdditionalAmountsClinic(BaseModel): amount: int @@ -2572,6 +2646,18 @@ class ElementCardIncrement(BaseModel): transaction's currency. For dollars, for example, this is cents. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardRefundCashback(BaseModel): amount: str @@ -3135,6 +3221,18 @@ class ElementCardRefund(BaseModel): For this resource it will always be `card_refund`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardReversalNetworkIdentifiers(BaseModel): authorization_identification_response: Optional[str] = None @@ -3285,6 +3383,18 @@ class ElementCardReversal(BaseModel): transaction's presentment currency. For dollars, for example, this is cents. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardSettlementCashback(BaseModel): amount: str @@ -3885,6 +3995,18 @@ class ElementCardSettlement(BaseModel): For this resource it will always be `card_settlement`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ElementCardValidationAdditionalAmountsClinic(BaseModel): amount: int @@ -4410,6 +4532,18 @@ class ElementCardValidation(BaseModel): verification: ElementCardValidationVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Element(BaseModel): card_authentication: Optional[ElementCardAuthentication] = None diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py index 85d9f60ed..6b063db88 100644 --- a/src/increase/types/card_purchase_supplement.py +++ b/src/increase/types/card_purchase_supplement.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["CardPurchaseSupplement", "Invoice", "LineItem"] @@ -191,3 +193,15 @@ class CardPurchaseSupplement(BaseModel): For this resource it will always be `card_purchase_supplement`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index d659da368..516072251 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -449,3 +451,15 @@ class CardPushTransfer(BaseModel): For this resource it will always be `card_push_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 1fe048745..3ce823044 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -380,3 +382,15 @@ class CardValidation(BaseModel): For this resource it will always be `card_validation`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 9d2afbee7..4f6cd1a2d 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -64,6 +66,18 @@ class DepositAcceptance(BaseModel): field. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class DepositRejection(BaseModel): amount: int @@ -128,6 +142,18 @@ class DepositRejection(BaseModel): the check deposit was rejected. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class DepositReturn(BaseModel): amount: int @@ -236,6 +262,18 @@ class DepositReturn(BaseModel): transaction. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class DepositSubmission(BaseModel): back_file_id: str @@ -312,6 +350,18 @@ class InboundFundsHold(BaseModel): For this resource it will always be `inbound_funds_hold`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class CheckDeposit(BaseModel): id: str @@ -406,3 +456,15 @@ class CheckDeposit(BaseModel): For this resource it will always be `check_deposit`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index d955b0a3d..e42b1e670 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -215,6 +217,18 @@ class PhysicalCheck(BaseModel): tracking_updates: List[PhysicalCheckTrackingUpdate] """Tracking updates relating to the physical check's delivery.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class StopPaymentRequest(BaseModel): reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] @@ -239,6 +253,18 @@ class StopPaymentRequest(BaseModel): For this resource it will always be `check_transfer_stop_payment_request`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SubmissionSubmittedAddress(BaseModel): city: str @@ -285,11 +311,35 @@ class Submission(BaseModel): submitted_at: datetime """When this check transfer was submitted to our check printer.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class ThirdParty(BaseModel): recipient_name: Optional[str] = None """The name that you will print on the check.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class CheckTransfer(BaseModel): id: str @@ -451,3 +501,15 @@ class CheckTransfer(BaseModel): For this resource it will always be `check_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 63e486271..c6fdabf0b 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -122,6 +124,18 @@ class SourceACHDecline(BaseModel): For this resource it will always be `ach_decline`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardDeclineAdditionalAmountsClinic(BaseModel): amount: int @@ -795,6 +809,18 @@ class SourceCardDecline(BaseModel): verification: SourceCardDeclineVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckDecline(BaseModel): amount: int @@ -873,6 +899,18 @@ class SourceCheckDecline(BaseModel): - `user_initiated` - Your integration declined this check via the API. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckDepositRejection(BaseModel): amount: int @@ -937,6 +975,18 @@ class SourceCheckDepositRejection(BaseModel): the check deposit was rejected. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundFednowTransferDecline(BaseModel): reason: Literal[ @@ -961,6 +1011,18 @@ class SourceInboundFednowTransferDecline(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this declined transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundRealTimePaymentsTransferDecline(BaseModel): amount: int @@ -1047,6 +1109,18 @@ class SourceWireDecline(BaseModel): terms. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Source(BaseModel): ach_decline: Optional[SourceACHDecline] = None @@ -1137,6 +1211,18 @@ class Source(BaseModel): equal to `wire_decline`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class DeclinedTransaction(BaseModel): id: str @@ -1202,3 +1288,15 @@ class DeclinedTransaction(BaseModel): For this resource it will always be `declined_transaction`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 2bd94c198..3415982ef 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel from .entity_supplemental_document import EntitySupplementalDocument @@ -102,6 +104,18 @@ class CorporationBeneficialOwnerIndividualIdentification(BaseModel): individual's identity. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class CorporationBeneficialOwnerIndividual(BaseModel): address: CorporationBeneficialOwnerIndividualAddress @@ -263,6 +277,18 @@ class JointIndividualIdentification(BaseModel): individual's identity. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class JointIndividual(BaseModel): address: JointIndividualAddress @@ -326,6 +352,18 @@ class NaturalPersonIdentification(BaseModel): individual's identity. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class NaturalPerson(BaseModel): address: NaturalPersonAddress @@ -430,6 +468,18 @@ class TrustGrantorIdentification(BaseModel): individual's identity. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class TrustGrantor(BaseModel): address: TrustGrantorAddress @@ -485,6 +535,18 @@ class TrustTrusteeIndividualIdentification(BaseModel): individual's identity. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class TrustTrusteeIndividual(BaseModel): address: TrustTrusteeIndividualAddress diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py index 42c40dcf9..c0cfac121 100644 --- a/src/increase/types/external_account.py +++ b/src/increase/types/external_account.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["ExternalAccount"] @@ -66,3 +68,15 @@ class ExternalAccount(BaseModel): For this resource it will always be `external_account`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 73af3da80..1675fba58 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["File"] @@ -125,3 +127,15 @@ class File(BaseModel): For this resource it will always be `file`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_fednow_transfer.py b/src/increase/types/inbound_fednow_transfer.py index 78c915104..6dc720184 100644 --- a/src/increase/types/inbound_fednow_transfer.py +++ b/src/increase/types/inbound_fednow_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["InboundFednowTransfer", "Confirmation", "Decline"] @@ -13,6 +15,18 @@ class Confirmation(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Decline(BaseModel): reason: Literal[ @@ -37,6 +51,18 @@ class Decline(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this declined transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class InboundFednowTransfer(BaseModel): id: str diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index 3e1660b2d..5386061b7 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["InboundMailItem", "Check"] @@ -67,3 +69,15 @@ class InboundMailItem(BaseModel): For this resource it will always be `inbound_mail_item`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index 3810c3424..eba97035f 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["InboundWireDrawdownRequest"] @@ -95,3 +97,15 @@ class InboundWireDrawdownRequest(BaseModel): unstructured_remittance_information: Optional[str] = None """A free-form message set by the sender.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 07c638079..0eab26d60 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["InboundWireTransfer", "Reversal"] @@ -124,3 +126,15 @@ class InboundWireTransfer(BaseModel): wire_drawdown_request_id: Optional[str] = None """The wire drawdown request the inbound wire transfer is fulfilling.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index e4d75174a..bebe00811 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -64,6 +66,18 @@ class SourceAccountTransferInstruction(BaseModel): transfer_id: str """The identifier of the Account Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceACHTransferInstruction(BaseModel): amount: int @@ -72,6 +86,18 @@ class SourceACHTransferInstruction(BaseModel): transfer_id: str """The identifier of the ACH Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): amount: int @@ -666,6 +692,18 @@ class SourceCardAuthorization(BaseModel): verification: SourceCardAuthorizationVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardPushTransferInstruction(BaseModel): amount: int @@ -707,6 +745,18 @@ class SourceCheckDepositInstruction(BaseModel): was deposited. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckTransferInstruction(BaseModel): amount: int @@ -728,11 +778,35 @@ class SourceCheckTransferInstruction(BaseModel): transfer_id: str """The identifier of the Check Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceFednowTransferInstruction(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundFundsHold(BaseModel): amount: int @@ -788,11 +862,35 @@ class SourceInboundFundsHold(BaseModel): For this resource it will always be `inbound_funds_hold`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundWireTransferReversal(BaseModel): inbound_wire_transfer_id: str """The ID of the Inbound Wire Transfer that is being reversed.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int @@ -809,6 +907,18 @@ class SourceSwiftTransferInstruction(BaseModel): transfer_id: str """The identifier of the Swift Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceWireTransferInstruction(BaseModel): account_number: str @@ -829,6 +939,18 @@ class SourceWireTransferInstruction(BaseModel): transfer_id: str """The identifier of the Wire Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Source(BaseModel): account_transfer_instruction: Optional[SourceAccountTransferInstruction] = None @@ -971,7 +1093,7 @@ class Source(BaseModel): equal to `swift_transfer_instruction`. """ - user_initiated_hold: Optional[object] = None + user_initiated_hold: Optional[Dict[str, object]] = None """An User Initiated Hold object. This field will be present in the JSON response if and only if `category` is @@ -986,6 +1108,18 @@ class Source(BaseModel): equal to `wire_transfer_instruction`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class PendingTransaction(BaseModel): id: str @@ -1081,3 +1215,15 @@ class PendingTransaction(BaseModel): For this resource it will always be `pending_transaction`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py index 77eb2ac30..dac8be685 100644 --- a/src/increase/types/physical_card_profile.py +++ b/src/increase/types/physical_card_profile.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["PhysicalCardProfile"] @@ -77,3 +79,15 @@ class PhysicalCardProfile(BaseModel): For this resource it will always be `physical_card_profile`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 5489e91c5..3e3c971c6 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -700,6 +702,18 @@ class CardAuthorization(BaseModel): verification: CardAuthorizationVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class DigitalWalletAuthentication(BaseModel): card_id: str diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index eec89c8f8..07b182dd7 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -346,3 +348,15 @@ class RealTimePaymentsTransfer(BaseModel): Set this if the funds are being sent on behalf of someone who is not the account holder at Increase. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d84a4d124..3512af64e 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -99,6 +101,18 @@ class SourceAccountRevenuePayment(BaseModel): period_start: datetime """The start of the period for which this transaction paid account revenue.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceAccountTransferIntention(BaseModel): amount: int @@ -132,6 +146,18 @@ class SourceAccountTransferIntention(BaseModel): transfer_id: str """The identifier of the Account Transfer that led to this Pending Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceACHTransferIntention(BaseModel): account_number: str @@ -155,11 +181,35 @@ class SourceACHTransferIntention(BaseModel): transfer_id: str """The identifier of the ACH Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceACHTransferRejection(BaseModel): transfer_id: str """The identifier of the ACH Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceACHTransferReturn(BaseModel): created_at: datetime @@ -410,6 +460,18 @@ class SourceACHTransferReturn(BaseModel): transfer_id: str """The identifier of the ACH Transfer associated with this return.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardDisputeAcceptance(BaseModel): accepted_at: datetime @@ -424,6 +486,18 @@ class SourceCardDisputeAcceptance(BaseModel): to your account. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardDisputeFinancialVisa(BaseModel): event_type: Literal[ @@ -474,6 +548,18 @@ class SourceCardDisputeFinancial(BaseModel): `network` is equal to `visa`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardDisputeLoss(BaseModel): explanation: str @@ -491,6 +577,18 @@ class SourceCardDisputeLoss(BaseModel): from your account. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardFinancialAdditionalAmountsClinic(BaseModel): amount: int @@ -1079,6 +1177,18 @@ class SourceCardFinancial(BaseModel): verification: SourceCardFinancialVerification """Fields related to verification of cardholder-provided values.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardPushTransferAcceptance(BaseModel): amount: int @@ -1087,6 +1197,18 @@ class SourceCardPushTransferAcceptance(BaseModel): transfer_id: str """The identifier of the Card Push Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardRefundCashback(BaseModel): amount: str @@ -1650,6 +1772,18 @@ class SourceCardRefund(BaseModel): For this resource it will always be `card_refund`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardRevenuePayment(BaseModel): amount: int @@ -1680,6 +1814,18 @@ class SourceCardRevenuePayment(BaseModel): transacted_on_account_id: Optional[str] = None """The account the card belonged to.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCardSettlementCashback(BaseModel): amount: str @@ -2280,6 +2426,18 @@ class SourceCardSettlement(BaseModel): For this resource it will always be `card_settlement`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCashbackPayment(BaseModel): accrued_on_card_id: Optional[str] = None @@ -2310,6 +2468,18 @@ class SourceCashbackPayment(BaseModel): period_start: datetime """The start of the period for which this transaction paid cashback.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckDepositAcceptance(BaseModel): account_number: str @@ -2359,6 +2529,18 @@ class SourceCheckDepositAcceptance(BaseModel): field. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckDepositReturn(BaseModel): amount: int @@ -2467,6 +2649,18 @@ class SourceCheckDepositReturn(BaseModel): transaction. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceCheckTransferDeposit(BaseModel): back_image_file_id: Optional[str] = None @@ -2509,11 +2703,35 @@ class SourceCheckTransferDeposit(BaseModel): For this resource it will always be `check_transfer_deposit`. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceFednowTransferAcknowledgement(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceFeePayment(BaseModel): amount: int @@ -2541,6 +2759,18 @@ class SourceFeePayment(BaseModel): program_id: Optional[str] = None """The Program for which this fee was incurred.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundACHTransferAddendaFreeformEntry(BaseModel): payment_related_information: str @@ -2610,11 +2840,35 @@ class SourceInboundACHTransfer(BaseModel): transfer_id: str """The Inbound ACH Transfer's identifier.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundACHTransferReturnIntention(BaseModel): inbound_ach_transfer_id: str """The ID of the Inbound ACH Transfer that is being returned.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundCheckAdjustment(BaseModel): adjusted_transaction_id: str @@ -2636,6 +2890,18 @@ class SourceInboundCheckAdjustment(BaseModel): usually happens for e.g., low quality images. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundCheckDepositReturnIntention(BaseModel): inbound_check_deposit_id: str @@ -2644,11 +2910,35 @@ class SourceInboundCheckDepositReturnIntention(BaseModel): transfer_id: Optional[str] = None """The identifier of the Check Transfer object that was deposited.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundFednowTransferConfirmation(BaseModel): transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): amount: int @@ -2691,6 +2981,18 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): transfer_id: str """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundWireReversal(BaseModel): amount: int @@ -2748,6 +3050,18 @@ class SourceInboundWireReversal(BaseModel): wire_transfer_id: str """The ID for the Wire Transfer that is being reversed.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundWireTransfer(BaseModel): amount: int @@ -2812,11 +3126,35 @@ class SourceInboundWireTransfer(BaseModel): unstructured_remittance_information: Optional[str] = None """A free-form message set by the sender.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInboundWireTransferReversal(BaseModel): inbound_wire_transfer_id: str """The ID of the Inbound Wire Transfer that is being reversed.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInterestPayment(BaseModel): accrued_on_account_id: str @@ -2847,6 +3185,18 @@ class SourceInterestPayment(BaseModel): period_start: datetime """The start of the period for which this transaction paid interest.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceInternalSource(BaseModel): amount: int @@ -2910,6 +3260,18 @@ class SourceInternalSource(BaseModel): - `sample_funds_return` - Sample funds return """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): amount: int @@ -2927,21 +3289,69 @@ class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): transfer_id: str """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceSampleFunds(BaseModel): originator: str """Where the sample funds came from.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceSwiftTransferIntention(BaseModel): transfer_id: str """The identifier of the Swift Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceSwiftTransferReturn(BaseModel): transfer_id: str """The identifier of the Swift Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceWireTransferIntention(BaseModel): account_number: str @@ -2959,6 +3369,18 @@ class SourceWireTransferIntention(BaseModel): transfer_id: str """The identifier of the Wire Transfer that led to this Transaction.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Source(BaseModel): account_revenue_payment: Optional[SourceAccountRevenuePayment] = None @@ -3384,6 +3806,18 @@ class Source(BaseModel): sent to a different bank. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Transaction(BaseModel): id: str @@ -3452,3 +3886,15 @@ class Transaction(BaseModel): For this resource it will always be `transaction`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index f0132b3f4..d14ac9c66 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. import datetime -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -241,6 +243,18 @@ class Reversal(BaseModel): wire_transfer_id: str """The ID for the Wire Transfer that is being reversed.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class Submission(BaseModel): input_message_accountability_data: str @@ -383,3 +397,15 @@ class WireTransfer(BaseModel): For this resource it will always be `wire_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From cd9d1e08854b96d494a65e689a394697ba8cf57b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 18:08:01 +0000 Subject: [PATCH 0960/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 211b9f1a0..f83bd1f73 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.373.0" + ".": "0.374.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7e8390cb4..e97ac3959 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.373.0" +version = "0.374.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 84b24d068..d0f423244 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.373.0" # x-release-please-version +__version__ = "0.374.0" # x-release-please-version From 6106f7ddb2ea0691e4ed87a645598132b42ed38f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 30 Oct 2025 20:09:07 +0000 Subject: [PATCH 0961/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 22 +++++++++++++++++++ .../types/check_transfer_create_params.py | 13 +++++++++++ tests/api_resources/test_check_transfers.py | 2 ++ 4 files changed, 39 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7f33565d1..1c0a751d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fd1e9a0d66098ce0c20cb6c15bbb8c26a8662d52730907deb4a179aebd6b89d6.yml -openapi_spec_hash: 2139b75a9f653c413775fb96f70ba794 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-29da995f8b04baed0eb2b6b038bc14f3165a3e1eae15b7a1136cce323d132bfd.yml +openapi_spec_hash: ff369b84b7477f46c3f3e3edeecaf176 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 3026b2df1..9817c471b 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -51,6 +51,7 @@ def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, + balance_check: Literal["full", "none"] | Omit = omit, check_number: str | Omit = omit, physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, @@ -81,6 +82,15 @@ def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. + balance_check: How the account's available balance should be checked. Please contact + [support@increase.com](mailto:support@increase.com) to enable this parameter. + + - `full` - The available balance of the account must be at least the amount of + the check, and a Pending Transaction will be created for the full amount. + - `none` - No balance check will performed when the check transfer is initiated. + A zero-dollar Pending Transaction will be created. The balance will still be + checked when the Inbound Check Deposit is created. + check_number: The check number Increase should use for the check. This should not contain leading zeroes and must be unique across the `source_account_number`. If this is omitted, Increase will generate a check number for you. @@ -113,6 +123,7 @@ def create( "amount": amount, "fulfillment_method": fulfillment_method, "source_account_number_id": source_account_number_id, + "balance_check": balance_check, "check_number": check_number, "physical_check": physical_check, "require_approval": require_approval, @@ -390,6 +401,7 @@ async def create( amount: int, fulfillment_method: Literal["physical_check", "third_party"], source_account_number_id: str, + balance_check: Literal["full", "none"] | Omit = omit, check_number: str | Omit = omit, physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, @@ -420,6 +432,15 @@ async def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. + balance_check: How the account's available balance should be checked. Please contact + [support@increase.com](mailto:support@increase.com) to enable this parameter. + + - `full` - The available balance of the account must be at least the amount of + the check, and a Pending Transaction will be created for the full amount. + - `none` - No balance check will performed when the check transfer is initiated. + A zero-dollar Pending Transaction will be created. The balance will still be + checked when the Inbound Check Deposit is created. + check_number: The check number Increase should use for the check. This should not contain leading zeroes and must be unique across the `source_account_number`. If this is omitted, Increase will generate a check number for you. @@ -452,6 +473,7 @@ async def create( "amount": amount, "fulfillment_method": fulfillment_method, "source_account_number_id": source_account_number_id, + "balance_check": balance_check, "check_number": check_number, "physical_check": physical_check, "require_approval": require_approval, diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 4c66f65b6..185167d52 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -37,6 +37,19 @@ class CheckTransferCreateParams(TypedDict, total=False): on the check. """ + balance_check: Literal["full", "none"] + """How the account's available balance should be checked. + + Please contact [support@increase.com](mailto:support@increase.com) to enable + this parameter. + + - `full` - The available balance of the account must be at least the amount of + the check, and a Pending Transaction will be created for the full amount. + - `none` - No balance check will performed when the check transfer is initiated. + A zero-dollar Pending Transaction will be created. The balance will still be + checked when the Inbound Check Deposit is created. + """ + check_number: str """The check number Increase should use for the check. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index b12a06509..2717e1355 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -38,6 +38,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: amount=1000, fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + balance_check="full", check_number="x", physical_check={ "mailing_address": { @@ -323,6 +324,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) amount=1000, fulfillment_method="physical_check", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + balance_check="full", check_number="x", physical_check={ "mailing_address": { From 3e0db580a450ca313ac90acae178ce1c1482dcae Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 03:54:33 +0000 Subject: [PATCH 0962/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f83bd1f73..93ed6faef 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.374.0" + ".": "0.375.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e97ac3959..af15c12b5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.374.0" +version = "0.375.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d0f423244..0f09e5589 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.374.0" # x-release-please-version +__version__ = "0.375.0" # x-release-please-version From 42ce47efc57f5c534c10415080a42b4e3a61f7e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 04:50:40 +0000 Subject: [PATCH 0963/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 14 ++++++++------ src/increase/types/check_transfer.py | 3 ++- src/increase/types/check_transfer_create_params.py | 6 +++--- 4 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c0a751d8..8014bc2c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-29da995f8b04baed0eb2b6b038bc14f3165a3e1eae15b7a1136cce323d132bfd.yml -openapi_spec_hash: ff369b84b7477f46c3f3e3edeecaf176 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3d5a35f67916cc1c9e9e4df38edbf72b926effa0faf60ea5cb7047a4a2d7f3c7.yml +openapi_spec_hash: 33c55e463f9bf747f502bdb38d5e2622 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 9817c471b..dfc142b52 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -82,11 +82,12 @@ def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. - balance_check: How the account's available balance should be checked. Please contact - [support@increase.com](mailto:support@increase.com) to enable this parameter. + balance_check: How the account's available balance should be checked. If omitted, the default + behavior is `balance_check: full`. - `full` - The available balance of the account must be at least the amount of - the check, and a Pending Transaction will be created for the full amount. + the check, and a Pending Transaction will be created for the full amount. This + is the default behavior if `balance_check` is omitted. - `none` - No balance check will performed when the check transfer is initiated. A zero-dollar Pending Transaction will be created. The balance will still be checked when the Inbound Check Deposit is created. @@ -432,11 +433,12 @@ async def create( source_account_number_id: The identifier of the Account Number from which to send the transfer and print on the check. - balance_check: How the account's available balance should be checked. Please contact - [support@increase.com](mailto:support@increase.com) to enable this parameter. + balance_check: How the account's available balance should be checked. If omitted, the default + behavior is `balance_check: full`. - `full` - The available balance of the account must be at least the amount of - the check, and a Pending Transaction will be created for the full amount. + the check, and a Pending Transaction will be created for the full amount. This + is the default behavior if `balance_check` is omitted. - `none` - No balance check will performed when the check transfer is initiated. A zero-dollar Pending Transaction will be created. The balance will still be checked when the Inbound Check Deposit is created. diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index e42b1e670..2c3866bde 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -370,7 +370,8 @@ class CheckTransfer(BaseModel): """How the account's available balance should be checked. - `full` - The available balance of the account must be at least the amount of - the check, and a Pending Transaction will be created for the full amount. + the check, and a Pending Transaction will be created for the full amount. This + is the default behavior if `balance_check` is omitted. - `none` - No balance check will performed when the check transfer is initiated. A zero-dollar Pending Transaction will be created. The balance will still be checked when the Inbound Check Deposit is created. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 185167d52..6c33ecd97 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -40,11 +40,11 @@ class CheckTransferCreateParams(TypedDict, total=False): balance_check: Literal["full", "none"] """How the account's available balance should be checked. - Please contact [support@increase.com](mailto:support@increase.com) to enable - this parameter. + If omitted, the default behavior is `balance_check: full`. - `full` - The available balance of the account must be at least the amount of - the check, and a Pending Transaction will be created for the full amount. + the check, and a Pending Transaction will be created for the full amount. This + is the default behavior if `balance_check` is omitted. - `none` - No balance check will performed when the check transfer is initiated. A zero-dollar Pending Transaction will be created. The balance will still be checked when the Inbound Check Deposit is created. From 7e5626e6e0fedd47bea46b7a8bee4d4d3eec7df9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 04:57:19 +0000 Subject: [PATCH 0964/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 93ed6faef..c1ebe3f9a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.375.0" + ".": "0.376.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index af15c12b5..66ebb63a4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.375.0" +version = "0.376.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0f09e5589..0a5e98835 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.375.0" # x-release-please-version +__version__ = "0.376.0" # x-release-please-version From 663644a1596b7341194fedb422784138b4b90df3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:11:05 +0000 Subject: [PATCH 0965/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export_create_params.py | 6 ++++++ tests/api_resources/test_exports.py | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8014bc2c8..7ca08cf6a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3d5a35f67916cc1c9e9e4df38edbf72b926effa0faf60ea5cb7047a4a2d7f3c7.yml -openapi_spec_hash: 33c55e463f9bf747f502bdb38d5e2622 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-44b5f1aa7877231cd00051536df52b79d7cdc9cdd18194e9d58416a23c0e3080.yml +openapi_spec_hash: 60f0bd1ca37c9a57996238e105cca091 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 175d3a4fa..2c9adf7b2 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -110,6 +110,12 @@ class AccountStatementBai2(TypedDict, total=False): will include end-of-day balances for the provided date. """ + program_id: str + """The Program to create a BAI2 report for. + + If not provided, all open accounts will be included. + """ + class AccountStatementOfxCreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 8159a6bde..496ac45e1 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -33,6 +33,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account_statement_bai2={ "account_id": "account_id", "effective_date": parse_date("2019-12-27"), + "program_id": "program_id", }, account_statement_ofx={ "account_id": "account_id", @@ -201,6 +202,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account_statement_bai2={ "account_id": "account_id", "effective_date": parse_date("2019-12-27"), + "program_id": "program_id", }, account_statement_ofx={ "account_id": "account_id", From 8ffc09a8503abbfdae0b4002551e00c4e15cc8af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:14:15 +0000 Subject: [PATCH 0966/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c1ebe3f9a..0243314d8 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.376.0" + ".": "0.377.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 66ebb63a4..697980b57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.376.0" +version = "0.377.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0a5e98835..315be3eec 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.376.0" # x-release-please-version +__version__ = "0.377.0" # x-release-please-version From 1ec3655f39e88dc8dedfd3c560ef56c3834faa1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:50:08 +0000 Subject: [PATCH 0967/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/pending_transaction.py | 18 +++++++----------- 2 files changed, 9 insertions(+), 13 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ca08cf6a..78b249d42 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-44b5f1aa7877231cd00051536df52b79d7cdc9cdd18194e9d58416a23c0e3080.yml -openapi_spec_hash: 60f0bd1ca37c9a57996238e105cca091 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f07048979577d746042198f73c1bac07529dd48f26402f60def922a12b6e01e0.yml +openapi_spec_hash: 6d1ca8aa0b64f414db957540bbeab5ee config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index bebe00811..db5c6145a 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -1134,17 +1134,6 @@ class PendingTransaction(BaseModel): For dollars, for example, this is cents. """ - balance_impact: Literal["affects_available_balance", "none"] - """ - How the Pending Transaction affects the balance of its Account while its status - is `pending`. - - - `affects_available_balance` - This Pending Transaction will decrement the - available balance on the Account while its status is `pending`. - - `none` - This Pending Transaction does not affect the available balance on the - Account. - """ - completed_at: Optional[datetime] = None """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which the Pending @@ -1178,6 +1167,13 @@ class PendingTransaction(BaseModel): the vendor provides. """ + held_amount: int + """ + The amount that this Pending Transaction decrements the available balance of its + Account. This is usually the same as `amount`, but will differ if the amount is + positive. + """ + route_id: Optional[str] = None """The identifier for the route this Pending Transaction came through. From 5d045e181159aeab72c6bd1616ff58c3fccb54e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 15:53:17 +0000 Subject: [PATCH 0968/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0243314d8..786891957 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.377.0" + ".": "0.378.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 697980b57..e8c1617a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.377.0" +version = "0.378.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 315be3eec..209179b28 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.377.0" # x-release-please-version +__version__ = "0.378.0" # x-release-please-version From 41902dc3fb32f2e9b33a1b8193a6e8c84f446a2e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:10:05 +0000 Subject: [PATCH 0969/1325] feat(api): api update --- .stats.yml | 4 +- README.md | 15 ++ src/increase/resources/exports.py | 4 +- src/increase/types/card_dispute.py | 156 +++++++++++++++--- .../types/card_dispute_create_params.py | 70 ++++++-- ...d_dispute_submit_user_submission_params.py | 70 ++++++-- src/increase/types/card_payment.py | 35 +++- .../types/check_transfer_create_params.py | 14 +- src/increase/types/declined_transaction.py | 14 +- .../entity_create_beneficial_owner_params.py | 16 +- src/increase/types/entity_create_params.py | 36 +++- src/increase/types/export_create_params.py | 7 +- src/increase/types/pending_transaction.py | 14 +- src/increase/types/real_time_decision.py | 14 +- .../types/real_time_decision_action_params.py | 8 +- .../simulations/card_dispute_action_params.py | 69 ++++++-- src/increase/types/transaction.py | 14 +- 17 files changed, 472 insertions(+), 88 deletions(-) diff --git a/.stats.yml b/.stats.yml index 78b249d42..fff512bc2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f07048979577d746042198f73c1bac07529dd48f26402f60def922a12b6e01e0.yml -openapi_spec_hash: 6d1ca8aa0b64f414db957540bbeab5ee +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e9e51b3c9b5c8d9e6e0267b62a12a00fedbce419b765192aa4e2470984192e1f.yml +openapi_spec_hash: 84bc91dd8b8a80edf447dddad15c23fc config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/README.md b/README.md index 0bac60aee..2e321ade2 100644 --- a/README.md +++ b/README.md @@ -182,6 +182,21 @@ for account in first_page.data: # Remove `await` for non-async usage. ``` +## Nested params + +Nested parameters are dictionaries, typed using `TypedDict`, for example: + +```python +from increase import Increase + +client = Increase() + +account = client.accounts.create( + name="New Account!", +) +print(account.id) +``` + ## File uploads Request parameters that correspond to file uploads can be passed as `bytes`, or a [`PathLike`](https://docs.python.org/3/library/os.html#os.PathLike) instance or a tuple of `(filename, contents, media type)`. diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 6e9911b12..754a1a9dd 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -62,7 +62,7 @@ def create( bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, - vendor_csv: object | Omit = omit, + vendor_csv: export_create_params.VendorCsv | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -279,7 +279,7 @@ async def create( bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, - vendor_csv: object | Omit = omit, + vendor_csv: export_create_params.VendorCsv | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index eced5df31..375569bea 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -12,6 +12,10 @@ "Visa", "VisaNetworkEvent", "VisaNetworkEventAttachmentFile", + "VisaNetworkEventChargebackAccepted", + "VisaNetworkEventChargebackSubmitted", + "VisaNetworkEventChargebackTimedOut", + "VisaNetworkEventMerchantPrearbitrationDeclineSubmitted", "VisaNetworkEventMerchantPrearbitrationReceived", "VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes", "VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence", @@ -21,19 +25,28 @@ "VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute", "VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTransactions", + "VisaNetworkEventMerchantPrearbitrationTimedOut", "VisaNetworkEventRepresented", "VisaNetworkEventRepresentedCardholderNoLongerDisputes", "VisaNetworkEventRepresentedCreditOrReversalProcessed", "VisaNetworkEventRepresentedInvalidDispute", + "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed", "VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived", "VisaNetworkEventRepresentedProofOfCashDisbursement", "VisaNetworkEventRepresentedReversalIssued", + "VisaNetworkEventRepresentmentTimedOut", + "VisaNetworkEventUserPrearbitrationAccepted", + "VisaNetworkEventUserPrearbitrationDeclined", + "VisaNetworkEventUserPrearbitrationSubmitted", + "VisaNetworkEventUserPrearbitrationTimedOut", + "VisaNetworkEventUserWithdrawalSubmitted", "VisaUserSubmission", "VisaUserSubmissionAttachmentFile", "VisaUserSubmissionChargeback", "VisaUserSubmissionChargebackAuthorization", "VisaUserSubmissionChargebackConsumerCanceledMerchandise", "VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation", + "VisaUserSubmissionChargebackConsumerCanceledMerchandiseNotReturned", "VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted", "VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned", "VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction", @@ -41,12 +54,16 @@ "VisaUserSubmissionChargebackConsumerCanceledServices", "VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation", "VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation", + "VisaUserSubmissionChargebackConsumerCanceledServicesOther", + "VisaUserSubmissionChargebackConsumerCanceledServicesTimeshare", "VisaUserSubmissionChargebackConsumerCounterfeitMerchandise", "VisaUserSubmissionChargebackConsumerCreditNotProcessed", "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise", + "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned", "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted", "VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned", "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation", + "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationNotReturned", "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted", "VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed", @@ -55,12 +72,16 @@ "VisaUserSubmissionChargebackConsumerMerchandiseNotReceived", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedNotReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedNoCancellation", + "VisaUserSubmissionChargebackConsumerNonReceiptOfCash", "VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaUserSubmissionChargebackConsumerQualityMerchandise", + "VisaUserSubmissionChargebackConsumerQualityMerchandiseNotReturned", "VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations", "VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted", "VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned", @@ -74,6 +95,7 @@ "VisaUserSubmissionChargebackConsumerServicesNotReceived", "VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellation", + "VisaUserSubmissionChargebackConsumerServicesNotReceivedNoCancellation", "VisaUserSubmissionChargebackFraud", "VisaUserSubmissionChargebackProcessingError", "VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction", @@ -106,6 +128,22 @@ class VisaNetworkEventAttachmentFile(BaseModel): """The ID of the file attached to the Card Dispute.""" +class VisaNetworkEventChargebackAccepted(BaseModel): + pass + + +class VisaNetworkEventChargebackSubmitted(BaseModel): + pass + + +class VisaNetworkEventChargebackTimedOut(BaseModel): + pass + + +class VisaNetworkEventMerchantPrearbitrationDeclineSubmitted(BaseModel): + pass + + class VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes(BaseModel): explanation: Optional[str] = None """ @@ -311,6 +349,10 @@ class VisaNetworkEventMerchantPrearbitrationReceived(BaseModel): """ +class VisaNetworkEventMerchantPrearbitrationTimedOut(BaseModel): + pass + + class VisaNetworkEventRepresentedCardholderNoLongerDisputes(BaseModel): explanation: Optional[str] = None """ @@ -441,6 +483,10 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): """ +class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): + pass + + class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -481,7 +527,9 @@ class VisaNetworkEventRepresented(BaseModel): invalid_dispute: Optional[VisaNetworkEventRepresentedInvalidDispute] = None """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" - non_fiat_currency_or_non_fungible_token_as_described: Optional[object] = None + non_fiat_currency_or_non_fungible_token_as_described: Optional[ + VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed + ] = None """Non-fiat currency or non-fungible token as described details. Present if and only if `reason` is @@ -533,6 +581,30 @@ class VisaNetworkEventRepresented(BaseModel): """ +class VisaNetworkEventRepresentmentTimedOut(BaseModel): + pass + + +class VisaNetworkEventUserPrearbitrationAccepted(BaseModel): + pass + + +class VisaNetworkEventUserPrearbitrationDeclined(BaseModel): + pass + + +class VisaNetworkEventUserPrearbitrationSubmitted(BaseModel): + pass + + +class VisaNetworkEventUserPrearbitrationTimedOut(BaseModel): + pass + + +class VisaNetworkEventUserWithdrawalSubmitted(BaseModel): + pass + + class VisaNetworkEvent(BaseModel): attachment_files: List[VisaNetworkEventAttachmentFile] """The files attached to the Visa Card Dispute User Submission.""" @@ -592,7 +664,7 @@ class VisaNetworkEvent(BaseModel): Network Event: details will be under the `user_withdrawal_submitted` object. """ - chargeback_accepted: Optional[object] = None + chargeback_accepted: Optional[VisaNetworkEventChargebackAccepted] = None """A Card Dispute Chargeback Accepted Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -601,7 +673,7 @@ class VisaNetworkEvent(BaseModel): been accepted by the merchant. """ - chargeback_submitted: Optional[object] = None + chargeback_submitted: Optional[VisaNetworkEventChargebackSubmitted] = None """A Card Dispute Chargeback Submitted Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -610,7 +682,7 @@ class VisaNetworkEvent(BaseModel): has been submitted to the network. """ - chargeback_timed_out: Optional[object] = None + chargeback_timed_out: Optional[VisaNetworkEventChargebackTimedOut] = None """A Card Dispute Chargeback Timed Out Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -628,7 +700,7 @@ class VisaNetworkEvent(BaseModel): dispute_financial_transaction_id: Optional[str] = None """The dispute financial transaction that resulted from the network event, if any.""" - merchant_prearbitration_decline_submitted: Optional[object] = None + merchant_prearbitration_decline_submitted: Optional[VisaNetworkEventMerchantPrearbitrationDeclineSubmitted] = None """ A Card Dispute Merchant Pre-Arbitration Decline Submitted Visa Network Event object. This field will be present in the JSON response if and only if @@ -648,7 +720,7 @@ class VisaNetworkEvent(BaseModel): favor. """ - merchant_prearbitration_timed_out: Optional[object] = None + merchant_prearbitration_timed_out: Optional[VisaNetworkEventMerchantPrearbitrationTimedOut] = None """A Card Dispute Merchant Pre-Arbitration Timed Out Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -667,7 +739,7 @@ class VisaNetworkEvent(BaseModel): user's chargeback and has re-presented the payment. """ - representment_timed_out: Optional[object] = None + representment_timed_out: Optional[VisaNetworkEventRepresentmentTimedOut] = None """A Card Dispute Re-presentment Timed Out Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -677,7 +749,7 @@ class VisaNetworkEvent(BaseModel): limit. """ - user_prearbitration_accepted: Optional[object] = None + user_prearbitration_accepted: Optional[VisaNetworkEventUserPrearbitrationAccepted] = None """A Card Dispute User Pre-Arbitration Accepted Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -686,7 +758,7 @@ class VisaNetworkEvent(BaseModel): the merchant has accepted the user's prearbitration request in the user's favor. """ - user_prearbitration_declined: Optional[object] = None + user_prearbitration_declined: Optional[VisaNetworkEventUserPrearbitrationDeclined] = None """A Card Dispute User Pre-Arbitration Declined Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -695,7 +767,7 @@ class VisaNetworkEvent(BaseModel): the merchant has declined the user's prearbitration request. """ - user_prearbitration_submitted: Optional[object] = None + user_prearbitration_submitted: Optional[VisaNetworkEventUserPrearbitrationSubmitted] = None """A Card Dispute User Pre-Arbitration Submitted Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -704,7 +776,7 @@ class VisaNetworkEvent(BaseModel): that the user's request for prearbitration has been submitted to the network. """ - user_prearbitration_timed_out: Optional[object] = None + user_prearbitration_timed_out: Optional[VisaNetworkEventUserPrearbitrationTimedOut] = None """A Card Dispute User Pre-Arbitration Timed Out Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -713,7 +785,7 @@ class VisaNetworkEvent(BaseModel): that the merchant has timed out responding to the user's prearbitration request. """ - user_withdrawal_submitted: Optional[object] = None + user_withdrawal_submitted: Optional[VisaNetworkEventUserWithdrawalSubmitted] = None """A Card Dispute User Withdrawal Submitted Visa Network Event object. This field will be present in the JSON response if and only if `category` is @@ -760,6 +832,10 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellat """Reason.""" +class VisaUserSubmissionChargebackConsumerCanceledMerchandiseNotReturned(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted(BaseModel): attempt_explanation: str """Attempt explanation.""" @@ -825,7 +901,7 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandise(BaseModel): - `prohibited_by_local_law` - Prohibited by local law. """ - not_returned: Optional[object] = None + not_returned: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandiseNotReturned] = None """Not returned. Present if and only if `return_outcome` is `not_returned`.""" purchase_explanation: str @@ -920,6 +996,14 @@ class VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation( """ +class VisaUserSubmissionChargebackConsumerCanceledServicesOther(BaseModel): + pass + + +class VisaUserSubmissionChargebackConsumerCanceledServicesTimeshare(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): cardholder_cancellation: VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation """Cardholder cancellation.""" @@ -940,7 +1024,7 @@ class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): - `prohibited_by_local_law` - Prohibited by local law. """ - other: Optional[object] = None + other: Optional[VisaUserSubmissionChargebackConsumerCanceledServicesOther] = None """Other service type explanation. Present if and only if `service_type` is `other`. @@ -957,7 +1041,7 @@ class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): - `timeshare` - Timeshare. """ - timeshare: Optional[object] = None + timeshare: Optional[VisaUserSubmissionChargebackConsumerCanceledServicesTimeshare] = None """Timeshare explanation. Present if and only if `service_type` is `timeshare`.""" @@ -983,6 +1067,10 @@ class VisaUserSubmissionChargebackConsumerCreditNotProcessed(BaseModel): """Credit expected at.""" +class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(BaseModel): attempt_explanation: str """Attempt explanation.""" @@ -1043,7 +1131,7 @@ class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise(BaseMode - `prohibited_by_local_law` - Prohibited by local law. """ - not_returned: Optional[object] = None + not_returned: Optional[VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned] = None """Not returned. Present if and only if `return_outcome` is `not_returned`.""" order_and_issue_explanation: str @@ -1070,6 +1158,10 @@ class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise(BaseMode """Returned. Present if and only if `return_outcome` is `returned`.""" +class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationNotReturned(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted(BaseModel): attempt_explanation: str """Attempt explanation.""" @@ -1133,7 +1225,7 @@ class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation(BaseModel misrepresentation_explanation: str """Misrepresentation explanation.""" - not_returned: Optional[object] = None + not_returned: Optional[VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationNotReturned] = None """Not returned. Present if and only if `return_outcome` is `not_returned`.""" purchase_explanation: str @@ -1248,6 +1340,10 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancel """Reason.""" +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedNotReturned(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(BaseModel): attempted_at: date """Attempted at.""" @@ -1265,7 +1361,7 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed(BaseMode explanation: str """Explanation.""" - not_returned: Optional[object] = None + not_returned: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedNotReturned] = None """Not returned. Present if and only if `return_outcome` is `not_returned`.""" return_attempted: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted] = None @@ -1296,6 +1392,10 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancella """Canceled at.""" +class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedNoCancellation(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): cancellation_outcome: Literal[ "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" @@ -1353,7 +1453,7 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): - `prohibited_by_local_law` - Prohibited by local law. """ - no_cancellation: Optional[object] = None + no_cancellation: Optional[VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedNoCancellation] = None """No cancellation. Present if and only if `cancellation_outcome` is `no_cancellation`. @@ -1363,6 +1463,10 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): """Purchase information and explanation.""" +class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): explanation: str """Explanation.""" @@ -1376,6 +1480,10 @@ class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(B """ +class VisaUserSubmissionChargebackConsumerQualityMerchandiseNotReturned(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations(BaseModel): explanation: str """ @@ -1453,7 +1561,7 @@ class VisaUserSubmissionChargebackConsumerQualityMerchandise(BaseModel): - `prohibited_by_local_law` - Prohibited by local law. """ - not_returned: Optional[object] = None + not_returned: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandiseNotReturned] = None """Not returned. Present if and only if `return_outcome` is `not_returned`.""" ongoing_negotiations: Optional[VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations] = None @@ -1632,6 +1740,10 @@ class VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellatio """Canceled at.""" +class VisaUserSubmissionChargebackConsumerServicesNotReceivedNoCancellation(BaseModel): + pass + + class VisaUserSubmissionChargebackConsumerServicesNotReceived(BaseModel): cancellation_outcome: Literal[ "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" @@ -1669,7 +1781,7 @@ class VisaUserSubmissionChargebackConsumerServicesNotReceived(BaseModel): - `prohibited_by_local_law` - Prohibited by local law. """ - no_cancellation: Optional[object] = None + no_cancellation: Optional[VisaUserSubmissionChargebackConsumerServicesNotReceivedNoCancellation] = None """No cancellation. Present if and only if `cancellation_outcome` is `no_cancellation`. @@ -1885,7 +1997,7 @@ class VisaUserSubmissionChargeback(BaseModel): Present if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: Optional[object] = None + consumer_non_receipt_of_cash: Optional[VisaUserSubmissionChargebackConsumerNonReceiptOfCash] = None """Non-receipt of cash. Present if and only if `category` is `consumer_non_receipt_of_cash`. diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py index 1f1cc43f7..089cf7add 100644 --- a/src/increase/types/card_dispute_create_params.py +++ b/src/increase/types/card_dispute_create_params.py @@ -15,6 +15,7 @@ "VisaAuthorization", "VisaConsumerCanceledMerchandise", "VisaConsumerCanceledMerchandiseCardholderCancellation", + "VisaConsumerCanceledMerchandiseNotReturned", "VisaConsumerCanceledMerchandiseReturnAttempted", "VisaConsumerCanceledMerchandiseReturned", "VisaConsumerCanceledRecurringTransaction", @@ -22,12 +23,16 @@ "VisaConsumerCanceledServices", "VisaConsumerCanceledServicesCardholderCancellation", "VisaConsumerCanceledServicesGuaranteedReservation", + "VisaConsumerCanceledServicesOther", + "VisaConsumerCanceledServicesTimeshare", "VisaConsumerCounterfeitMerchandise", "VisaConsumerCreditNotProcessed", "VisaConsumerDamagedOrDefectiveMerchandise", + "VisaConsumerDamagedOrDefectiveMerchandiseNotReturned", "VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted", "VisaConsumerDamagedOrDefectiveMerchandiseReturned", "VisaConsumerMerchandiseMisrepresentation", + "VisaConsumerMerchandiseMisrepresentationNotReturned", "VisaConsumerMerchandiseMisrepresentationReturnAttempted", "VisaConsumerMerchandiseMisrepresentationReturned", "VisaConsumerMerchandiseNotAsDescribed", @@ -36,12 +41,16 @@ "VisaConsumerMerchandiseNotReceived", "VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaConsumerMerchandiseNotReceivedDelayed", + "VisaConsumerMerchandiseNotReceivedDelayedNotReturned", "VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted", "VisaConsumerMerchandiseNotReceivedDelayedReturned", "VisaConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaConsumerMerchandiseNotReceivedNoCancellation", + "VisaConsumerNonReceiptOfCash", "VisaConsumerOriginalCreditTransactionNotAccepted", "VisaConsumerQualityMerchandise", + "VisaConsumerQualityMerchandiseNotReturned", "VisaConsumerQualityMerchandiseOngoingNegotiations", "VisaConsumerQualityMerchandiseReturnAttempted", "VisaConsumerQualityMerchandiseReturned", @@ -55,6 +64,7 @@ "VisaConsumerServicesNotReceived", "VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaConsumerServicesNotReceivedMerchantCancellation", + "VisaConsumerServicesNotReceivedNoCancellation", "VisaFraud", "VisaProcessingError", "VisaProcessingErrorDuplicateTransaction", @@ -137,6 +147,10 @@ class VisaConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=Fal """Reason.""" +class VisaConsumerCanceledMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -216,7 +230,7 @@ class VisaConsumerCanceledMerchandise(TypedDict, total=False): cardholder_cancellation: VisaConsumerCanceledMerchandiseCardholderCancellation """Cardholder cancellation.""" - not_returned: object + not_returned: VisaConsumerCanceledMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaConsumerCanceledMerchandiseReturnAttempted @@ -299,6 +313,14 @@ class VisaConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): """ +class VisaConsumerCanceledServicesOther(TypedDict, total=False): + pass + + +class VisaConsumerCanceledServicesTimeshare(TypedDict, total=False): + pass + + class VisaConsumerCanceledServices(TypedDict, total=False): cardholder_cancellation: Required[VisaConsumerCanceledServicesCardholderCancellation] """Cardholder cancellation.""" @@ -330,13 +352,13 @@ class VisaConsumerCanceledServices(TypedDict, total=False): Required if and only if `service_type` is `guaranteed_reservation`. """ - other: object + other: VisaConsumerCanceledServicesOther """Other service type explanation. Required if and only if `service_type` is `other`. """ - timeshare: object + timeshare: VisaConsumerCanceledServicesTimeshare """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" @@ -362,6 +384,10 @@ class VisaConsumerCreditNotProcessed(TypedDict, total=False): """Credit expected at.""" +class VisaConsumerDamagedOrDefectiveMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -438,7 +464,7 @@ class VisaConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaConsumerDamagedOrDefectiveMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted @@ -451,6 +477,10 @@ class VisaConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): """Returned. Required if and only if `return_outcome` is `returned`.""" +class VisaConsumerMerchandiseMisrepresentationNotReturned(TypedDict, total=False): + pass + + class VisaConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -530,7 +560,7 @@ class VisaConsumerMerchandiseMisrepresentation(TypedDict, total=False): - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaConsumerMerchandiseMisrepresentationNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaConsumerMerchandiseMisrepresentationReturnAttempted @@ -633,6 +663,10 @@ class VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedRec """Reason.""" +class VisaConsumerMerchandiseNotReceivedDelayedNotReturned(TypedDict, total=False): + pass + + class VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Attempted at.""" @@ -658,7 +692,7 @@ class VisaConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaConsumerMerchandiseNotReceivedDelayedNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted @@ -681,6 +715,10 @@ class VisaConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict, total=Fa """Canceled at.""" +class VisaConsumerMerchandiseNotReceivedNoCancellation(TypedDict, total=False): + pass + + class VisaConsumerMerchandiseNotReceived(TypedDict, total=False): cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] @@ -737,13 +775,17 @@ class VisaConsumerMerchandiseNotReceived(TypedDict, total=False): Required if and only if `cancellation_outcome` is `merchant_cancellation`. """ - no_cancellation: object + no_cancellation: VisaConsumerMerchandiseNotReceivedNoCancellation """No cancellation. Required if and only if `cancellation_outcome` is `no_cancellation`. """ +class VisaConsumerNonReceiptOfCash(TypedDict, total=False): + pass + + class VisaConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): explanation: Required[str] """Explanation.""" @@ -757,6 +799,10 @@ class VisaConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): """ +class VisaConsumerQualityMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): explanation: Required[str] """ @@ -850,7 +896,7 @@ class VisaConsumerQualityMerchandise(TypedDict, total=False): - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaConsumerQualityMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" ongoing_negotiations: VisaConsumerQualityMerchandiseOngoingNegotiations @@ -1015,6 +1061,10 @@ class VisaConsumerServicesNotReceivedMerchantCancellation(TypedDict, total=False """Canceled at.""" +class VisaConsumerServicesNotReceivedNoCancellation(TypedDict, total=False): + pass + + class VisaConsumerServicesNotReceived(TypedDict, total=False): cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] @@ -1055,7 +1105,7 @@ class VisaConsumerServicesNotReceived(TypedDict, total=False): Required if and only if `cancellation_outcome` is `merchant_cancellation`. """ - no_cancellation: object + no_cancellation: VisaConsumerServicesNotReceivedNoCancellation """No cancellation. Required if and only if `cancellation_outcome` is `no_cancellation`. @@ -1264,7 +1314,7 @@ class Visa(TypedDict, total=False): Required if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: object + consumer_non_receipt_of_cash: VisaConsumerNonReceiptOfCash """Non-receipt of cash. Required if and only if `category` is `consumer_non_receipt_of_cash`. diff --git a/src/increase/types/card_dispute_submit_user_submission_params.py b/src/increase/types/card_dispute_submit_user_submission_params.py index 68927cb2f..3384f3968 100644 --- a/src/increase/types/card_dispute_submit_user_submission_params.py +++ b/src/increase/types/card_dispute_submit_user_submission_params.py @@ -16,6 +16,7 @@ "VisaChargebackAuthorization", "VisaChargebackConsumerCanceledMerchandise", "VisaChargebackConsumerCanceledMerchandiseCardholderCancellation", + "VisaChargebackConsumerCanceledMerchandiseNotReturned", "VisaChargebackConsumerCanceledMerchandiseReturnAttempted", "VisaChargebackConsumerCanceledMerchandiseReturned", "VisaChargebackConsumerCanceledRecurringTransaction", @@ -23,12 +24,16 @@ "VisaChargebackConsumerCanceledServices", "VisaChargebackConsumerCanceledServicesCardholderCancellation", "VisaChargebackConsumerCanceledServicesGuaranteedReservation", + "VisaChargebackConsumerCanceledServicesOther", + "VisaChargebackConsumerCanceledServicesTimeshare", "VisaChargebackConsumerCounterfeitMerchandise", "VisaChargebackConsumerCreditNotProcessed", "VisaChargebackConsumerDamagedOrDefectiveMerchandise", + "VisaChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned", "VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted", "VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned", "VisaChargebackConsumerMerchandiseMisrepresentation", + "VisaChargebackConsumerMerchandiseMisrepresentationNotReturned", "VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted", "VisaChargebackConsumerMerchandiseMisrepresentationReturned", "VisaChargebackConsumerMerchandiseNotAsDescribed", @@ -37,12 +42,16 @@ "VisaChargebackConsumerMerchandiseNotReceived", "VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaChargebackConsumerMerchandiseNotReceivedDelayed", + "VisaChargebackConsumerMerchandiseNotReceivedDelayedNotReturned", "VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted", "VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned", "VisaChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation", "VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation", + "VisaChargebackConsumerMerchandiseNotReceivedNoCancellation", + "VisaChargebackConsumerNonReceiptOfCash", "VisaChargebackConsumerOriginalCreditTransactionNotAccepted", "VisaChargebackConsumerQualityMerchandise", + "VisaChargebackConsumerQualityMerchandiseNotReturned", "VisaChargebackConsumerQualityMerchandiseOngoingNegotiations", "VisaChargebackConsumerQualityMerchandiseReturnAttempted", "VisaChargebackConsumerQualityMerchandiseReturned", @@ -56,6 +65,7 @@ "VisaChargebackConsumerServicesNotReceived", "VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt", "VisaChargebackConsumerServicesNotReceivedMerchantCancellation", + "VisaChargebackConsumerServicesNotReceivedNoCancellation", "VisaChargebackFraud", "VisaChargebackProcessingError", "VisaChargebackProcessingErrorDuplicateTransaction", @@ -135,6 +145,10 @@ class VisaChargebackConsumerCanceledMerchandiseCardholderCancellation(TypedDict, """Reason.""" +class VisaChargebackConsumerCanceledMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaChargebackConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -214,7 +228,7 @@ class VisaChargebackConsumerCanceledMerchandise(TypedDict, total=False): cardholder_cancellation: VisaChargebackConsumerCanceledMerchandiseCardholderCancellation """Cardholder cancellation.""" - not_returned: object + not_returned: VisaChargebackConsumerCanceledMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaChargebackConsumerCanceledMerchandiseReturnAttempted @@ -297,6 +311,14 @@ class VisaChargebackConsumerCanceledServicesGuaranteedReservation(TypedDict, tot """ +class VisaChargebackConsumerCanceledServicesOther(TypedDict, total=False): + pass + + +class VisaChargebackConsumerCanceledServicesTimeshare(TypedDict, total=False): + pass + + class VisaChargebackConsumerCanceledServices(TypedDict, total=False): cardholder_cancellation: Required[VisaChargebackConsumerCanceledServicesCardholderCancellation] """Cardholder cancellation.""" @@ -328,13 +350,13 @@ class VisaChargebackConsumerCanceledServices(TypedDict, total=False): Required if and only if `service_type` is `guaranteed_reservation`. """ - other: object + other: VisaChargebackConsumerCanceledServicesOther """Other service type explanation. Required if and only if `service_type` is `other`. """ - timeshare: object + timeshare: VisaChargebackConsumerCanceledServicesTimeshare """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" @@ -360,6 +382,10 @@ class VisaChargebackConsumerCreditNotProcessed(TypedDict, total=False): """Credit expected at.""" +class VisaChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -436,7 +462,7 @@ class VisaChargebackConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted @@ -449,6 +475,10 @@ class VisaChargebackConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False """Returned. Required if and only if `return_outcome` is `returned`.""" +class VisaChargebackConsumerMerchandiseMisrepresentationNotReturned(TypedDict, total=False): + pass + + class VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): attempt_explanation: Required[str] """Attempt explanation.""" @@ -528,7 +558,7 @@ class VisaChargebackConsumerMerchandiseMisrepresentation(TypedDict, total=False) - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaChargebackConsumerMerchandiseMisrepresentationNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted @@ -631,6 +661,10 @@ class VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToE """Reason.""" +class VisaChargebackConsumerMerchandiseNotReceivedDelayedNotReturned(TypedDict, total=False): + pass + + class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Attempted at.""" @@ -656,7 +690,7 @@ class VisaChargebackConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaChargebackConsumerMerchandiseNotReceivedDelayedNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" return_attempted: VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted @@ -679,6 +713,10 @@ class VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict """Canceled at.""" +class VisaChargebackConsumerMerchandiseNotReceivedNoCancellation(TypedDict, total=False): + pass + + class VisaChargebackConsumerMerchandiseNotReceived(TypedDict, total=False): cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] @@ -735,13 +773,17 @@ class VisaChargebackConsumerMerchandiseNotReceived(TypedDict, total=False): Required if and only if `cancellation_outcome` is `merchant_cancellation`. """ - no_cancellation: object + no_cancellation: VisaChargebackConsumerMerchandiseNotReceivedNoCancellation """No cancellation. Required if and only if `cancellation_outcome` is `no_cancellation`. """ +class VisaChargebackConsumerNonReceiptOfCash(TypedDict, total=False): + pass + + class VisaChargebackConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): explanation: Required[str] """Explanation.""" @@ -755,6 +797,10 @@ class VisaChargebackConsumerOriginalCreditTransactionNotAccepted(TypedDict, tota """ +class VisaChargebackConsumerQualityMerchandiseNotReturned(TypedDict, total=False): + pass + + class VisaChargebackConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): explanation: Required[str] """ @@ -848,7 +894,7 @@ class VisaChargebackConsumerQualityMerchandise(TypedDict, total=False): - `return_attempted` - Return attempted. """ - not_returned: object + not_returned: VisaChargebackConsumerQualityMerchandiseNotReturned """Not returned. Required if and only if `return_outcome` is `not_returned`.""" ongoing_negotiations: VisaChargebackConsumerQualityMerchandiseOngoingNegotiations @@ -1013,6 +1059,10 @@ class VisaChargebackConsumerServicesNotReceivedMerchantCancellation(TypedDict, t """Canceled at.""" +class VisaChargebackConsumerServicesNotReceivedNoCancellation(TypedDict, total=False): + pass + + class VisaChargebackConsumerServicesNotReceived(TypedDict, total=False): cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] @@ -1053,7 +1103,7 @@ class VisaChargebackConsumerServicesNotReceived(TypedDict, total=False): Required if and only if `cancellation_outcome` is `merchant_cancellation`. """ - no_cancellation: object + no_cancellation: VisaChargebackConsumerServicesNotReceivedNoCancellation """No cancellation. Required if and only if `cancellation_outcome` is `no_cancellation`. @@ -1262,7 +1312,7 @@ class VisaChargeback(TypedDict, total=False): Required if and only if `category` is `consumer_merchandise_not_received`. """ - consumer_non_receipt_of_cash: object + consumer_non_receipt_of_cash: VisaChargebackConsumerNonReceiptOfCash """Non-receipt of cash. Required if and only if `category` is `consumer_non_receipt_of_cash`. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 6bcb0e4e1..4def0c304 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -27,6 +27,7 @@ "ElementCardAuthorizationAdditionalAmountsUnknown", "ElementCardAuthorizationAdditionalAmountsVision", "ElementCardAuthorizationNetworkDetails", + "ElementCardAuthorizationNetworkDetailsPulse", "ElementCardAuthorizationNetworkDetailsVisa", "ElementCardAuthorizationNetworkIdentifiers", "ElementCardAuthorizationVerification", @@ -46,6 +47,7 @@ "ElementCardDeclineAdditionalAmountsUnknown", "ElementCardDeclineAdditionalAmountsVision", "ElementCardDeclineNetworkDetails", + "ElementCardDeclineNetworkDetailsPulse", "ElementCardDeclineNetworkDetailsVisa", "ElementCardDeclineNetworkIdentifiers", "ElementCardDeclineVerification", @@ -64,6 +66,7 @@ "ElementCardFinancialAdditionalAmountsUnknown", "ElementCardFinancialAdditionalAmountsVision", "ElementCardFinancialNetworkDetails", + "ElementCardFinancialNetworkDetailsPulse", "ElementCardFinancialNetworkDetailsVisa", "ElementCardFinancialNetworkIdentifiers", "ElementCardFinancialVerification", @@ -122,11 +125,13 @@ "ElementCardValidationAdditionalAmountsUnknown", "ElementCardValidationAdditionalAmountsVision", "ElementCardValidationNetworkDetails", + "ElementCardValidationNetworkDetailsPulse", "ElementCardValidationNetworkDetailsVisa", "ElementCardValidationNetworkIdentifiers", "ElementCardValidationVerification", "ElementCardValidationVerificationCardVerificationCode", "ElementCardValidationVerificationCardholderAddress", + "ElementOther", "State", ] @@ -494,6 +499,10 @@ class ElementCardAuthorizationAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class ElementCardAuthorizationNetworkDetailsPulse(BaseModel): + pass + + class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -620,7 +629,7 @@ class ElementCardAuthorizationNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[ElementCardAuthorizationNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[ElementCardAuthorizationNetworkDetailsVisa] = None @@ -1152,6 +1161,10 @@ class ElementCardDeclineAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class ElementCardDeclineNetworkDetailsPulse(BaseModel): + pass + + class ElementCardDeclineNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -1278,7 +1291,7 @@ class ElementCardDeclineNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[ElementCardDeclineNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[ElementCardDeclineNetworkDetailsVisa] = None @@ -1837,6 +1850,10 @@ class ElementCardFinancialAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class ElementCardFinancialNetworkDetailsPulse(BaseModel): + pass + + class ElementCardFinancialNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -1963,7 +1980,7 @@ class ElementCardFinancialNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[ElementCardFinancialNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[ElementCardFinancialNetworkDetailsVisa] = None @@ -4192,6 +4209,10 @@ class ElementCardValidationAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class ElementCardValidationNetworkDetailsPulse(BaseModel): + pass + + class ElementCardValidationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -4318,7 +4339,7 @@ class ElementCardValidationNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[ElementCardValidationNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[ElementCardValidationNetworkDetailsVisa] = None @@ -4545,6 +4566,10 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class ElementOther(BaseModel): + pass + + class Element(BaseModel): card_authentication: Optional[ElementCardAuthentication] = None """A Card Authentication object. @@ -4685,7 +4710,7 @@ class Element(BaseModel): the card payment element was created. """ - other: Optional[object] = None + other: Optional[ElementOther] = None """ If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 6c33ecd97..4b7a873f7 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -2,8 +2,8 @@ from __future__ import annotations -from typing import Iterable -from typing_extensions import Literal, Required, TypedDict +from typing import Dict, Union, Iterable +from typing_extensions import Literal, Required, TypeAlias, TypedDict __all__ = [ "CheckTransferCreateParams", @@ -118,7 +118,7 @@ class PhysicalCheckReturnAddress(TypedDict, total=False): """The second line of the return address.""" -class PhysicalCheck(TypedDict, total=False): +class PhysicalCheckTyped(TypedDict, total=False): mailing_address: Required[PhysicalCheckMailingAddress] """Details for where Increase will mail the check.""" @@ -171,7 +171,10 @@ class PhysicalCheck(TypedDict, total=False): """ -class ThirdParty(TypedDict, total=False): +PhysicalCheck: TypeAlias = Union[PhysicalCheckTyped, Dict[str, object]] + + +class ThirdPartyTyped(TypedDict, total=False): recipient_name: str """The pay-to name you will print on the check. @@ -179,3 +182,6 @@ class ThirdParty(TypedDict, total=False): this is omitted, Increase will be unable to validate the payer name when the check is deposited. """ + + +ThirdParty: TypeAlias = Union[ThirdPartyTyped, Dict[str, object]] diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index c6fdabf0b..b09705907 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -25,6 +25,7 @@ "SourceCardDeclineAdditionalAmountsUnknown", "SourceCardDeclineAdditionalAmountsVision", "SourceCardDeclineNetworkDetails", + "SourceCardDeclineNetworkDetailsPulse", "SourceCardDeclineNetworkDetailsVisa", "SourceCardDeclineNetworkIdentifiers", "SourceCardDeclineVerification", @@ -34,6 +35,7 @@ "SourceCheckDepositRejection", "SourceInboundFednowTransferDecline", "SourceInboundRealTimePaymentsTransferDecline", + "SourceOther", "SourceWireDecline", ] @@ -321,6 +323,10 @@ class SourceCardDeclineAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class SourceCardDeclineNetworkDetailsPulse(BaseModel): + pass + + class SourceCardDeclineNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -447,7 +453,7 @@ class SourceCardDeclineNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[SourceCardDeclineNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[SourceCardDeclineNetworkDetailsVisa] = None @@ -1086,6 +1092,10 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" +class SourceOther(BaseModel): + pass + + class SourceWireDecline(BaseModel): inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -1198,7 +1208,7 @@ class Source(BaseModel): equal to `inbound_real_time_payments_transfer_decline`. """ - other: Optional[object] = None + other: Optional[SourceOther] = None """ If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index 9876edb42..88feb4d64 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List, Union +from typing import Dict, List, Union from datetime import date -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo @@ -102,7 +102,7 @@ class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class BeneficialOwnerIndividualIdentification(TypedDict, total=False): +class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -147,6 +147,11 @@ class BeneficialOwnerIndividualIdentification(TypedDict, total=False): """ +BeneficialOwnerIndividualIdentification: TypeAlias = Union[ + BeneficialOwnerIndividualIdentificationTyped, Dict[str, object] +] + + class BeneficialOwnerIndividual(TypedDict, total=False): address: Required[BeneficialOwnerIndividualAddress] """The individual's physical address. @@ -172,7 +177,7 @@ class BeneficialOwnerIndividual(TypedDict, total=False): """ -class BeneficialOwner(TypedDict, total=False): +class BeneficialOwnerTyped(TypedDict, total=False): individual: Required[BeneficialOwnerIndividual] """Personal details for the beneficial owner.""" @@ -185,3 +190,6 @@ class BeneficialOwner(TypedDict, total=False): company_title: str """This person's role or title within the entity.""" + + +BeneficialOwner: TypeAlias = Union[BeneficialOwnerTyped, Dict[str, object]] diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 431adf3f4..9e05147e4 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import List, Union, Iterable +from typing import Dict, List, Union, Iterable from datetime import date, datetime -from typing_extensions import Literal, Required, Annotated, TypedDict +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict from .._utils import PropertyInfo @@ -213,7 +213,7 @@ class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, tota """The identifier of the File containing the passport.""" -class CorporationBeneficialOwnerIndividualIdentification(TypedDict, total=False): +class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -258,6 +258,11 @@ class CorporationBeneficialOwnerIndividualIdentification(TypedDict, total=False) """ +CorporationBeneficialOwnerIndividualIdentification: TypeAlias = Union[ + CorporationBeneficialOwnerIndividualIdentificationTyped, Dict[str, object] +] + + class CorporationBeneficialOwnerIndividual(TypedDict, total=False): address: Required[CorporationBeneficialOwnerIndividualAddress] """The individual's physical address. @@ -283,7 +288,7 @@ class CorporationBeneficialOwnerIndividual(TypedDict, total=False): """ -class CorporationBeneficialOwner(TypedDict, total=False): +class CorporationBeneficialOwnerTyped(TypedDict, total=False): individual: Required[CorporationBeneficialOwnerIndividual] """Personal details for the beneficial owner.""" @@ -298,6 +303,9 @@ class CorporationBeneficialOwner(TypedDict, total=False): """This person's role or title within the entity.""" +CorporationBeneficialOwner: TypeAlias = Union[CorporationBeneficialOwnerTyped, Dict[str, object]] + + class Corporation(TypedDict, total=False): address: Required[CorporationAddress] """The entity's physical address. @@ -478,7 +486,7 @@ class JointIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class JointIndividualIdentification(TypedDict, total=False): +class JointIndividualIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -523,6 +531,9 @@ class JointIndividualIdentification(TypedDict, total=False): """ +JointIndividualIdentification: TypeAlias = Union[JointIndividualIdentificationTyped, Dict[str, object]] + + class JointIndividual(TypedDict, total=False): address: Required[JointIndividualAddress] """The individual's physical address. @@ -624,7 +635,7 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class NaturalPersonIdentification(TypedDict, total=False): +class NaturalPersonIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -669,6 +680,9 @@ class NaturalPersonIdentification(TypedDict, total=False): """ +NaturalPersonIdentification: TypeAlias = Union[NaturalPersonIdentificationTyped, Dict[str, object]] + + class NaturalPerson(TypedDict, total=False): address: Required[NaturalPersonAddress] """The individual's physical address. @@ -819,7 +833,7 @@ class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class TrustTrusteeIndividualIdentification(TypedDict, total=False): +class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -864,6 +878,9 @@ class TrustTrusteeIndividualIdentification(TypedDict, total=False): """ +TrustTrusteeIndividualIdentification: TypeAlias = Union[TrustTrusteeIndividualIdentificationTyped, Dict[str, object]] + + class TrustTrusteeIndividual(TypedDict, total=False): address: Required[TrustTrusteeIndividualAddress] """The individual's physical address. @@ -975,7 +992,7 @@ class TrustGrantorIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class TrustGrantorIdentification(TypedDict, total=False): +class TrustGrantorIdentificationTyped(TypedDict, total=False): method: Required[ Literal[ "social_security_number", @@ -1020,6 +1037,9 @@ class TrustGrantorIdentification(TypedDict, total=False): """ +TrustGrantorIdentification: TypeAlias = Union[TrustGrantorIdentificationTyped, Dict[str, object]] + + class TrustGrantor(TypedDict, total=False): address: Required[TrustGrantorAddress] """The individual's physical address. diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 2c9adf7b2..b9733fd56 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -21,6 +21,7 @@ "EntityCsvStatus", "TransactionCsv", "TransactionCsvCreatedAt", + "VendorCsv", ] @@ -88,7 +89,7 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `transaction_csv`. """ - vendor_csv: object + vendor_csv: VendorCsv """Options for the created export. Required if `category` is equal to `vendor_csv`. @@ -275,3 +276,7 @@ class TransactionCsv(TypedDict, total=False): program_id: str """Filter exported Transactions to the specified Program.""" + + +class VendorCsv(TypedDict, total=False): + pass diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index db5c6145a..33666c110 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -26,6 +26,7 @@ "SourceCardAuthorizationAdditionalAmountsUnknown", "SourceCardAuthorizationAdditionalAmountsVision", "SourceCardAuthorizationNetworkDetails", + "SourceCardAuthorizationNetworkDetailsPulse", "SourceCardAuthorizationNetworkDetailsVisa", "SourceCardAuthorizationNetworkIdentifiers", "SourceCardAuthorizationVerification", @@ -37,6 +38,7 @@ "SourceFednowTransferInstruction", "SourceInboundFundsHold", "SourceInboundWireTransferReversal", + "SourceOther", "SourceRealTimePaymentsTransferInstruction", "SourceSwiftTransferInstruction", "SourceWireTransferInstruction", @@ -283,6 +285,10 @@ class SourceCardAuthorizationAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class SourceCardAuthorizationNetworkDetailsPulse(BaseModel): + pass + + class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -409,7 +415,7 @@ class SourceCardAuthorizationNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[SourceCardAuthorizationNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[SourceCardAuthorizationNetworkDetailsVisa] = None @@ -892,6 +898,10 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class SourceOther(BaseModel): + pass + + class SourceRealTimePaymentsTransferInstruction(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -1073,7 +1083,7 @@ class Source(BaseModel): reversed. """ - other: Optional[object] = None + other: Optional[SourceOther] = None """ If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 3e3c971c6..ff3897655 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -26,10 +26,12 @@ "CardAuthorizationAdditionalAmountsVision", "CardAuthorizationDecline", "CardAuthorizationNetworkDetails", + "CardAuthorizationNetworkDetailsPulse", "CardAuthorizationNetworkDetailsVisa", "CardAuthorizationNetworkIdentifiers", "CardAuthorizationRequestDetails", "CardAuthorizationRequestDetailsIncrementalAuthorization", + "CardAuthorizationRequestDetailsInitialAuthorization", "CardAuthorizationVerification", "CardAuthorizationVerificationCardVerificationCode", "CardAuthorizationVerificationCardholderAddress", @@ -277,6 +279,10 @@ class CardAuthorizationDecline(BaseModel): """The reason the authorization was declined.""" +class CardAuthorizationNetworkDetailsPulse(BaseModel): + pass + + class CardAuthorizationNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -403,7 +409,7 @@ class CardAuthorizationNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[CardAuthorizationNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[CardAuthorizationNetworkDetailsVisa] = None @@ -448,6 +454,10 @@ class CardAuthorizationRequestDetailsIncrementalAuthorization(BaseModel): """ +class CardAuthorizationRequestDetailsInitialAuthorization(BaseModel): + pass + + class CardAuthorizationRequestDetails(BaseModel): category: Literal["initial_authorization", "incremental_authorization"] """ @@ -462,7 +472,7 @@ class CardAuthorizationRequestDetails(BaseModel): incremental_authorization: Optional[CardAuthorizationRequestDetailsIncrementalAuthorization] = None """Fields specific to the category `incremental_authorization`.""" - initial_authorization: Optional[object] = None + initial_authorization: Optional[CardAuthorizationRequestDetailsInitialAuthorization] = None """Fields specific to the category `initial_authorization`.""" diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 831c017a8..b4a73334b 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -2,7 +2,8 @@ from __future__ import annotations -from typing_extensions import Literal, Required, TypedDict +from typing import Dict, Union +from typing_extensions import Literal, Required, TypeAlias, TypedDict __all__ = [ "RealTimeDecisionActionParams", @@ -138,7 +139,7 @@ class CardAuthorizationDecline(TypedDict, total=False): """ -class CardAuthorization(TypedDict, total=False): +class CardAuthorizationTyped(TypedDict, total=False): decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined. @@ -161,6 +162,9 @@ class CardAuthorization(TypedDict, total=False): """ +CardAuthorization: TypeAlias = Union[CardAuthorizationTyped, Dict[str, object]] + + class DigitalWalletAuthenticationSuccess(TypedDict, total=False): email: str """The email address that was used to verify the cardholder via one-time passcode.""" diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py index 558f23aaa..d712dbb42 100644 --- a/src/increase/types/simulations/card_dispute_action_params.py +++ b/src/increase/types/simulations/card_dispute_action_params.py @@ -4,7 +4,20 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardDisputeActionParams", "Visa", "VisaRequestFurtherInformation"] +__all__ = [ + "CardDisputeActionParams", + "Visa", + "VisaAcceptChargeback", + "VisaAcceptUserSubmission", + "VisaDeclineUserPrearbitration", + "VisaReceiveMerchantPrearbitration", + "VisaRepresent", + "VisaRequestFurtherInformation", + "VisaTimeOutChargeback", + "VisaTimeOutMerchantPrearbitration", + "VisaTimeOutRepresentment", + "VisaTimeOutUserPrearbitration", +] class CardDisputeActionParams(TypedDict, total=False): @@ -24,11 +37,47 @@ class CardDisputeActionParams(TypedDict, total=False): """ +class VisaAcceptChargeback(TypedDict, total=False): + pass + + +class VisaAcceptUserSubmission(TypedDict, total=False): + pass + + +class VisaDeclineUserPrearbitration(TypedDict, total=False): + pass + + +class VisaReceiveMerchantPrearbitration(TypedDict, total=False): + pass + + +class VisaRepresent(TypedDict, total=False): + pass + + class VisaRequestFurtherInformation(TypedDict, total=False): reason: Required[str] """The reason for requesting further information from the user.""" +class VisaTimeOutChargeback(TypedDict, total=False): + pass + + +class VisaTimeOutMerchantPrearbitration(TypedDict, total=False): + pass + + +class VisaTimeOutRepresentment(TypedDict, total=False): + pass + + +class VisaTimeOutUserPrearbitration(TypedDict, total=False): + pass + + class Visa(TypedDict, total=False): action: Required[ Literal[ @@ -73,31 +122,31 @@ class Visa(TypedDict, total=False): to a user pre-arbitration. This will move the dispute to a `win` state. """ - accept_chargeback: object + accept_chargeback: VisaAcceptChargeback """The parameters for accepting the chargeback. Required if and only if `action` is `accept_chargeback`. """ - accept_user_submission: object + accept_user_submission: VisaAcceptUserSubmission """The parameters for accepting the user submission. Required if and only if `action` is `accept_user_submission`. """ - decline_user_prearbitration: object + decline_user_prearbitration: VisaDeclineUserPrearbitration """The parameters for declining the prearbitration. Required if and only if `action` is `decline_user_prearbitration`. """ - receive_merchant_prearbitration: object + receive_merchant_prearbitration: VisaReceiveMerchantPrearbitration """The parameters for receiving the prearbitration. Required if and only if `action` is `receive_merchant_prearbitration`. """ - represent: object + represent: VisaRepresent """The parameters for re-presenting the dispute. Required if and only if `action` is `represent`. @@ -109,25 +158,25 @@ class Visa(TypedDict, total=False): Required if and only if `action` is `request_further_information`. """ - time_out_chargeback: object + time_out_chargeback: VisaTimeOutChargeback """The parameters for timing out the chargeback. Required if and only if `action` is `time_out_chargeback`. """ - time_out_merchant_prearbitration: object + time_out_merchant_prearbitration: VisaTimeOutMerchantPrearbitration """The parameters for timing out the merchant prearbitration. Required if and only if `action` is `time_out_merchant_prearbitration`. """ - time_out_representment: object + time_out_representment: VisaTimeOutRepresentment """The parameters for timing out the re-presentment. Required if and only if `action` is `time_out_representment`. """ - time_out_user_prearbitration: object + time_out_user_prearbitration: VisaTimeOutUserPrearbitration """The parameters for timing out the user prearbitration. Required if and only if `action` is `time_out_user_prearbitration`. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 3512af64e..2b4499a50 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -33,6 +33,7 @@ "SourceCardFinancialAdditionalAmountsUnknown", "SourceCardFinancialAdditionalAmountsVision", "SourceCardFinancialNetworkDetails", + "SourceCardFinancialNetworkDetailsPulse", "SourceCardFinancialNetworkDetailsVisa", "SourceCardFinancialNetworkIdentifiers", "SourceCardFinancialVerification", @@ -83,6 +84,7 @@ "SourceInboundWireTransferReversal", "SourceInterestPayment", "SourceInternalSource", + "SourceOther", "SourceRealTimePaymentsTransferAcknowledgement", "SourceSampleFunds", "SourceSwiftTransferIntention", @@ -774,6 +776,10 @@ class SourceCardFinancialAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class SourceCardFinancialNetworkDetailsPulse(BaseModel): + pass + + class SourceCardFinancialNetworkDetailsVisa(BaseModel): electronic_commerce_indicator: Optional[ Literal[ @@ -900,7 +906,7 @@ class SourceCardFinancialNetworkDetails(BaseModel): - `pulse` - Pulse """ - pulse: Optional[object] = None + pulse: Optional[SourceCardFinancialNetworkDetailsPulse] = None """Fields specific to the `pulse` network.""" visa: Optional[SourceCardFinancialNetworkDetailsVisa] = None @@ -3273,6 +3279,10 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class SourceOther(BaseModel): + pass + + class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): amount: int """The transfer amount in USD cents.""" @@ -3761,7 +3771,7 @@ class Source(BaseModel): `reason` attribute for more information. """ - other: Optional[object] = None + other: Optional[SourceOther] = None """ If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. From 64d6d4b7dbfd2ccb4716422c41b8663ab96d71e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 31 Oct 2025 17:13:05 +0000 Subject: [PATCH 0970/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 786891957..c3ae3e4ab 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.378.0" + ".": "0.379.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e8c1617a3..3f9d704ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.378.0" +version = "0.379.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 209179b28..e6308ca0f 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.378.0" # x-release-please-version +__version__ = "0.379.0" # x-release-please-version From 1b6c86b6ba1242708d1b326e3e28239fcfee5387 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 16:12:20 +0000 Subject: [PATCH 0971/1325] chore(internal): grammar fix (it's -> its) --- src/increase/_utils/_utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index 50d59269a..eec7f4a1f 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -133,7 +133,7 @@ def is_given(obj: _T | NotGiven | Omit) -> TypeGuard[_T]: # Type safe methods for narrowing types with TypeVars. # The default narrowing for isinstance(obj, dict) is dict[unknown, unknown], # however this cause Pyright to rightfully report errors. As we know we don't -# care about the contained types we can safely use `object` in it's place. +# care about the contained types we can safely use `object` in its place. # # There are two separate functions defined, `is_*` and `is_*_t` for different use cases. # `is_*` is for when you're dealing with an unknown input From 1a7690dda7418b914f4daee09a3e16996795b8e0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:38:18 +0000 Subject: [PATCH 0972/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/wire_drawdown_request.py | 4 ++-- src/increase/types/wire_drawdown_request_list_params.py | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index fff512bc2..d73422845 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e9e51b3c9b5c8d9e6e0267b62a12a00fedbce419b765192aa4e2470984192e1f.yml -openapi_spec_hash: 84bc91dd8b8a80edf447dddad15c23fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-776b1bee3036836b954fa0db1e6d0349a04f76799402089994a9147a05967c0e.yml +openapi_spec_hash: 185a637305e75b302860dce8d352f54f config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index a10180ae3..c6114d64d 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -125,14 +125,14 @@ class WireDrawdownRequest(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - status: Literal["pending_submission", "pending_response", "fulfilled", "refused"] + status: Literal["pending_submission", "fulfilled", "pending_response", "refused"] """The lifecycle status of the drawdown request. - `pending_submission` - The drawdown request is queued to be submitted to Fedwire. + - `fulfilled` - The drawdown request has been fulfilled by the recipient. - `pending_response` - The drawdown request has been sent and the recipient should respond in some way. - - `fulfilled` - The drawdown request has been fulfilled by the recipient. - `refused` - The drawdown request has been refused by the recipient. """ diff --git a/src/increase/types/wire_drawdown_request_list_params.py b/src/increase/types/wire_drawdown_request_list_params.py index f462884c4..e14c2cf79 100644 --- a/src/increase/types/wire_drawdown_request_list_params.py +++ b/src/increase/types/wire_drawdown_request_list_params.py @@ -32,7 +32,7 @@ class WireDrawdownRequestListParams(TypedDict, total=False): _StatusReservedKeywords = TypedDict( "_StatusReservedKeywords", { - "in": List[Literal["pending_submission", "pending_response", "fulfilled", "refused"]], + "in": List[Literal["pending_submission", "fulfilled", "pending_response", "refused"]], }, total=False, ) From 9a7168fab121c053d4cee8cbf771a701ffeb266f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 15:41:37 +0000 Subject: [PATCH 0973/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3ae3e4ab..18952c86a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.379.0" + ".": "0.380.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3f9d704ea..bde28dba4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.379.0" +version = "0.380.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e6308ca0f..8d1196430 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.379.0" # x-release-please-version +__version__ = "0.380.0" # x-release-please-version From 14a9e06edc6f97a1ae2e57388323e19789efb86d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 21:27:58 +0000 Subject: [PATCH 0974/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/lockboxes.py | 32 +++++++++------------ src/increase/types/lockbox.py | 16 +++++------ src/increase/types/lockbox_update_params.py | 16 +++++------ tests/api_resources/test_lockboxes.py | 4 +-- 5 files changed, 32 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index d73422845..6ba32829f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-776b1bee3036836b954fa0db1e6d0349a04f76799402089994a9147a05967c0e.yml -openapi_spec_hash: 185a637305e75b302860dce8d352f54f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-04156469b84df056ff40f1cd402b851af019c7433591a072e02f90f3bd5e5d62.yml +openapi_spec_hash: c3ff2c35ac0bdadd4290ad7f063deb5e config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 4d6b565af..c9e161a30 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -137,9 +137,9 @@ def update( self, lockbox_id: str, *, + check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, - status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -154,16 +154,14 @@ def update( Args: lockbox_id: The identifier of the Lockbox. - description: The description you choose for the Lockbox. + check_deposit_behavior: This indicates if checks mailed to this lockbox will be deposited. - recipient_name: The recipient name you choose for the Lockbox. + - `enabled` - Checks mailed to this Lockbox will be deposited. + - `disabled` - Checks mailed to this Lockbox will not be deposited. - status: This indicates if checks can be sent to the Lockbox. + description: The description you choose for the Lockbox. - - `active` - This Lockbox is active. Checks mailed to it will be deposited - automatically. - - `inactive` - This Lockbox is inactive. Checks mailed to it will not be - deposited. + recipient_name: The recipient name you choose for the Lockbox. extra_headers: Send extra headers @@ -181,9 +179,9 @@ def update( f"/lockboxes/{lockbox_id}", body=maybe_transform( { + "check_deposit_behavior": check_deposit_behavior, "description": description, "recipient_name": recipient_name, - "status": status, }, lockbox_update_params.LockboxUpdateParams, ), @@ -372,9 +370,9 @@ async def update( self, lockbox_id: str, *, + check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, - status: Literal["active", "inactive"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -389,16 +387,14 @@ async def update( Args: lockbox_id: The identifier of the Lockbox. - description: The description you choose for the Lockbox. + check_deposit_behavior: This indicates if checks mailed to this lockbox will be deposited. - recipient_name: The recipient name you choose for the Lockbox. + - `enabled` - Checks mailed to this Lockbox will be deposited. + - `disabled` - Checks mailed to this Lockbox will not be deposited. - status: This indicates if checks can be sent to the Lockbox. + description: The description you choose for the Lockbox. - - `active` - This Lockbox is active. Checks mailed to it will be deposited - automatically. - - `inactive` - This Lockbox is inactive. Checks mailed to it will not be - deposited. + recipient_name: The recipient name you choose for the Lockbox. extra_headers: Send extra headers @@ -416,9 +412,9 @@ async def update( f"/lockboxes/{lockbox_id}", body=await async_maybe_transform( { + "check_deposit_behavior": check_deposit_behavior, "description": description, "recipient_name": recipient_name, - "status": status, }, lockbox_update_params.LockboxUpdateParams, ), diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index 2ff781270..1051f852e 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -50,6 +50,13 @@ class Lockbox(BaseModel): address: Address """The mailing address for the Lockbox.""" + check_deposit_behavior: Literal["enabled", "disabled"] + """Indicates if checks mailed to this lockbox will be deposited. + + - `enabled` - Checks mailed to this Lockbox will be deposited. + - `disabled` - Checks mailed to this Lockbox will not be deposited. + """ + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Lockbox @@ -70,15 +77,6 @@ class Lockbox(BaseModel): recipient_name: Optional[str] = None """The recipient name you choose for the Lockbox.""" - status: Literal["active", "inactive"] - """This indicates if mail can be sent to this address. - - - `active` - This Lockbox is active. Checks mailed to it will be deposited - automatically. - - `inactive` - This Lockbox is inactive. Checks mailed to it will not be - deposited. - """ - type: Literal["lockbox"] """A constant representing the object's type. diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py index 175f9c0e6..fe3fc5a58 100644 --- a/src/increase/types/lockbox_update_params.py +++ b/src/increase/types/lockbox_update_params.py @@ -8,17 +8,15 @@ class LockboxUpdateParams(TypedDict, total=False): + check_deposit_behavior: Literal["enabled", "disabled"] + """This indicates if checks mailed to this lockbox will be deposited. + + - `enabled` - Checks mailed to this Lockbox will be deposited. + - `disabled` - Checks mailed to this Lockbox will not be deposited. + """ + description: str """The description you choose for the Lockbox.""" recipient_name: str """The recipient name you choose for the Lockbox.""" - - status: Literal["active", "inactive"] - """This indicates if checks can be sent to the Lockbox. - - - `active` - This Lockbox is active. Checks mailed to it will be deposited - automatically. - - `inactive` - This Lockbox is inactive. Checks mailed to it will not be - deposited. - """ diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index ff9fe0a85..b8e2b12b9 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -108,9 +108,9 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: lockbox = client.lockboxes.update( lockbox_id="lockbox_3xt21ok13q19advds4t5", + check_deposit_behavior="disabled", description="x", recipient_name="x", - status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) @@ -281,9 +281,9 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.update( lockbox_id="lockbox_3xt21ok13q19advds4t5", + check_deposit_behavior="disabled", description="x", recipient_name="x", - status="inactive", ) assert_matches_type(Lockbox, lockbox, path=["response"]) From 29428b0f88f48aa400ebb057c98899555ed28937 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 21:30:57 +0000 Subject: [PATCH 0975/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 18952c86a..9318fbe87 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.380.0" + ".": "0.381.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bde28dba4..d8dde1a58 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.380.0" +version = "0.381.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8d1196430..cd13059c3 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.380.0" # x-release-please-version +__version__ = "0.381.0" # x-release-please-version From 840037f2ecfe0b8d5a5fd8a83387632ad516c7f1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 22:37:17 +0000 Subject: [PATCH 0976/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/account.py | 7 +- src/increase/types/account_transfer.py | 7 +- src/increase/types/ach_transfer.py | 14 +-- src/increase/types/card_payment.py | 98 +++------------ src/increase/types/card_push_transfer.py | 7 +- src/increase/types/check_deposit.py | 28 +---- src/increase/types/check_transfer.py | 7 +- src/increase/types/declined_transaction.py | 28 +---- src/increase/types/fednow_transfer.py | 7 +- src/increase/types/inbound_check_deposit.py | 7 +- src/increase/types/inbound_fednow_transfer.py | 7 +- .../inbound_real_time_payments_transfer.py | 7 +- src/increase/types/intrafi_balance.py | 7 +- src/increase/types/pending_transaction.py | 42 +------ .../types/real_time_payments_transfer.py | 7 +- src/increase/types/transaction.py | 119 +++--------------- src/increase/types/wire_transfer.py | 7 +- 18 files changed, 60 insertions(+), 350 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6ba32829f..748c5a918 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-04156469b84df056ff40f1cd402b851af019c7433591a072e02f90f3bd5e5d62.yml -openapi_spec_hash: c3ff2c35ac0bdadd4290ad7f063deb5e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f55c7bc0881d1c7bcc906156155a0e43c6b8866050f778db3befebe14d42208f.yml +openapi_spec_hash: 78c5274b08b5e7ae5e16da80d733bc10 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 468c92274..afc80739b 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -43,16 +43,11 @@ class Account(BaseModel): was created. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index a2b627c00..d0fcf9ab5 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -118,16 +118,11 @@ class AccountTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index b405e01b6..d9a0af757 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -174,16 +174,11 @@ class InboundFundsHold(BaseModel): was created. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -705,16 +700,11 @@ class ACHTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. For ACH transfers this is always equal to `usd`. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 4def0c304..c243faf76 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -758,16 +758,11 @@ class ElementCardAuthorization(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -932,16 +927,11 @@ class ElementCardAuthorizationExpiration(BaseModel): card_authorization_id: str """The identifier for the Card Authorization this reverses.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1420,16 +1410,11 @@ class ElementCardDecline(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2109,16 +2094,11 @@ class ElementCardFinancial(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2304,16 +2284,11 @@ class ElementCardFuelConfirmation(BaseModel): card_authorization_id: str """The identifier for the Card Authorization this updates.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2600,16 +2575,11 @@ class ElementCardIncrement(BaseModel): card_authorization_id: str """The identifier for the Card Authorization this increments.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2684,14 +2654,9 @@ class ElementCardRefundCashback(BaseModel): settlements) and a negative number if it will be debited (e.g., refunds). """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2708,16 +2673,11 @@ class ElementCardRefundInterchange(BaseModel): code: Optional[str] = None """The card network specific interchange code.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange reimbursement. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3171,16 +3131,11 @@ class ElementCardRefund(BaseModel): Cashback is paid out in aggregate, monthly. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's settlement currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3285,16 +3240,11 @@ class ElementCardReversal(BaseModel): card_authorization_id: str """The identifier for the Card Authorization this reverses.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the reversal's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3421,14 +3371,9 @@ class ElementCardSettlementCashback(BaseModel): settlements) and a negative number if it will be debited (e.g., refunds). """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3445,16 +3390,11 @@ class ElementCardSettlementInterchange(BaseModel): code: Optional[str] = None """The card network specific interchange code.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange reimbursement. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3927,16 +3867,11 @@ class ElementCardSettlement(BaseModel): Cashback is paid out in aggregate, monthly. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's settlement currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -4462,16 +4397,11 @@ class ElementCardValidation(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 516072251..0ec3dadf8 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -337,16 +337,11 @@ class CardPushTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 4f6cd1a2d..dbbc7091a 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -40,16 +40,11 @@ class DepositAcceptance(BaseModel): check_deposit_id: str """The ID of the Check Deposit that was accepted.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -89,16 +84,11 @@ class DepositRejection(BaseModel): check_deposit_id: str """The identifier of the Check Deposit that was rejected.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -162,16 +152,11 @@ class DepositReturn(BaseModel): check_deposit_id: str """The identifier of the Check Deposit that was returned.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -315,16 +300,11 @@ class InboundFundsHold(BaseModel): was created. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 2c3866bde..51c8a57b4 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -395,16 +395,11 @@ class CheckTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index b09705907..f15808ce7 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -582,16 +582,11 @@ class SourceCardDecline(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -928,16 +923,11 @@ class SourceCheckDepositRejection(BaseModel): check_deposit_id: str """The identifier of the Check Deposit that was rejected.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1040,17 +1030,12 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): creditor_name: str """The name the sender of the transfer specified as the recipient of the transfer.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the declined transfer's currency. This will always be "USD" for a Real-Time Payments transfer. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1253,17 +1238,12 @@ class DeclinedTransaction(BaseModel): Transaction occurred. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Declined Transaction's currency. This will match the currency on the Declined Transaction's Account. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/fednow_transfer.py b/src/increase/types/fednow_transfer.py index 2336f52bf..5de9bf2e9 100644 --- a/src/increase/types/fednow_transfer.py +++ b/src/increase/types/fednow_transfer.py @@ -167,16 +167,11 @@ class FednowTransfer(BaseModel): This is set by the sender when creating the transfer. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. For FedNow transfers this is always equal to `USD`. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 84e949c0c..7a21b8368 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -108,14 +108,9 @@ class InboundCheckDeposit(BaseModel): the deposit was attempted. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the deposit. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/inbound_fednow_transfer.py b/src/increase/types/inbound_fednow_transfer.py index 6dc720184..6dcfe37b2 100644 --- a/src/increase/types/inbound_fednow_transfer.py +++ b/src/increase/types/inbound_fednow_transfer.py @@ -89,16 +89,11 @@ class InboundFednowTransfer(BaseModel): creditor_name: str """The name the sender of the transfer specified as the recipient of the transfer.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's currency. This will always be "USD" for a FedNow transfer. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index f116452c3..39888f6c6 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -69,16 +69,11 @@ class InboundRealTimePaymentsTransfer(BaseModel): creditor_name: str """The name the sender of the transfer specified as the recipient of the transfer.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's currency. This will always be "USD" for a Real-Time Payments transfer. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi_balance.py index 7c79445d6..6c929d872 100644 --- a/src/increase/types/intrafi_balance.py +++ b/src/increase/types/intrafi_balance.py @@ -49,16 +49,11 @@ class IntrafiBalance(BaseModel): network. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 33666c110..9858faeb8 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -52,16 +52,11 @@ class SourceAccountTransferInstruction(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -544,16 +539,11 @@ class SourceCardAuthorization(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -732,16 +722,11 @@ class SourceCheckDepositInstruction(BaseModel): check_deposit_id: Optional[str] = None """The identifier of the Check Deposit.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -768,16 +753,11 @@ class SourceCheckTransferInstruction(BaseModel): amount: int """The transfer amount in USD cents.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the check's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -833,16 +813,11 @@ class SourceInboundFundsHold(BaseModel): was created. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the hold's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1156,17 +1131,12 @@ class PendingTransaction(BaseModel): Transaction occurred. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Pending Transaction's currency. This will match the currency on the Pending Transaction's Account. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 07b182dd7..8934f40aa 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -236,16 +236,11 @@ class RealTimePaymentsTransfer(BaseModel): This is set by the sender when creating the transfer. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. For real-time payments transfers this is always equal to `USD`. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 2b4499a50..59a589414 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -123,16 +123,11 @@ class SourceAccountTransferIntention(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the destination account currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1035,16 +1030,11 @@ class SourceCardFinancial(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1224,14 +1214,9 @@ class SourceCardRefundCashback(BaseModel): settlements) and a negative number if it will be debited (e.g., refunds). """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1248,16 +1233,11 @@ class SourceCardRefundInterchange(BaseModel): code: Optional[str] = None """The card network specific interchange code.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange reimbursement. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1711,16 +1691,11 @@ class SourceCardRefund(BaseModel): Cashback is paid out in aggregate, monthly. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's settlement currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1798,16 +1773,11 @@ class SourceCardRevenuePayment(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1841,14 +1811,9 @@ class SourceCardSettlementCashback(BaseModel): settlements) and a negative number if it will be debited (e.g., refunds). """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the cashback. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -1865,16 +1830,11 @@ class SourceCardSettlementInterchange(BaseModel): code: Optional[str] = None """The card network specific interchange code.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the interchange reimbursement. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2347,16 +2307,11 @@ class SourceCardSettlement(BaseModel): Cashback is paid out in aggregate, monthly. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's settlement currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2455,16 +2410,11 @@ class SourceCashbackPayment(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2509,16 +2459,11 @@ class SourceCheckDepositAcceptance(BaseModel): check_deposit_id: str """The ID of the Check Deposit that was accepted.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2555,16 +2500,11 @@ class SourceCheckDepositReturn(BaseModel): check_deposit_id: str """The identifier of the Check Deposit that was returned.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction's currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2746,16 +2686,11 @@ class SourceFeePayment(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -2956,16 +2891,11 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): creditor_name: str """The name the sender of the transfer specified as the recipient of the transfer.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code of the transfer's currency. This will always be "USD" for a Real-Time Payments transfer. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3172,16 +3102,11 @@ class SourceInterestPayment(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3211,16 +3136,11 @@ class SourceInternalSource(BaseModel): For dollars, for example, this is cents. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transaction currency. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ @@ -3848,17 +3768,12 @@ class Transaction(BaseModel): Transaction occurred. """ - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the Transaction's currency. This will match the currency on the Transaction's Account. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index d14ac9c66..218fa97c9 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -301,16 +301,11 @@ class WireTransfer(BaseModel): creditor: Optional[Creditor] = None """The person or business that is receiving the funds from the transfer.""" - currency: Literal["CAD", "CHF", "EUR", "GBP", "JPY", "USD"] + currency: Literal["USD"] """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's currency. For wire transfers this is always equal to `usd`. - - `CAD` - Canadian Dollar (CAD) - - `CHF` - Swiss Franc (CHF) - - `EUR` - Euro (EUR) - - `GBP` - British Pound (GBP) - - `JPY` - Japanese Yen (JPY) - `USD` - US Dollar (USD) """ From f74c32e3d03ca144e0998bfa3b6702f7f2ac139b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 5 Nov 2025 22:40:10 +0000 Subject: [PATCH 0977/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9318fbe87..3c0bbe3e9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.381.0" + ".": "0.382.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d8dde1a58..e886b5017 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.381.0" +version = "0.382.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index cd13059c3..d50ea171d 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.381.0" # x-release-please-version +__version__ = "0.382.0" # x-release-please-version From 00b8077f2fbdd0cb8baa9e7d9eed372bbde6b8d1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 01:43:02 +0000 Subject: [PATCH 0978/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 14 ++++++++++++++ src/increase/types/check_transfer.py | 10 +++++++++- src/increase/types/check_transfer_create_params.py | 13 ++++++++++++- tests/api_resources/test_check_transfers.py | 4 +++- 5 files changed, 40 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 748c5a918..ac4f56fb9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f55c7bc0881d1c7bcc906156155a0e43c6b8866050f778db3befebe14d42208f.yml -openapi_spec_hash: 78c5274b08b5e7ae5e16da80d733bc10 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-39280e79454a4e6c0e7161b5d92520a3edfc335cce9b198565e57c94daa31b04.yml +openapi_spec_hash: f992030218a4415fcec934bf482cb7ae config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index dfc142b52..90d5be4fe 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing import Union +from datetime import date from typing_extensions import Literal import httpx @@ -56,6 +58,7 @@ def create( physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, third_party: check_transfer_create_params.ThirdParty | Omit = omit, + valid_until_date: Union[str, date] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -106,6 +109,10 @@ def create( `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. + valid_until_date: If provided, the check will be valid on or before this date. After this date, + the check transfer will be stopped and deposits will not be accepted. For checks + printed by Increase, this date is included on the check as its expiry. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -129,6 +136,7 @@ def create( "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, + "valid_until_date": valid_until_date, }, check_transfer_create_params.CheckTransferCreateParams, ), @@ -407,6 +415,7 @@ async def create( physical_check: check_transfer_create_params.PhysicalCheck | Omit = omit, require_approval: bool | Omit = omit, third_party: check_transfer_create_params.ThirdParty | Omit = omit, + valid_until_date: Union[str, date] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -457,6 +466,10 @@ async def create( `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. + valid_until_date: If provided, the check will be valid on or before this date. After this date, + the check transfer will be stopped and deposits will not be accepted. For checks + printed by Increase, this date is included on the check as its expiry. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -480,6 +493,7 @@ async def create( "physical_check": physical_check, "require_approval": require_approval, "third_party": third_party, + "valid_until_date": valid_until_date, }, check_transfer_create_params.CheckTransferCreateParams, ), diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 51c8a57b4..a0591e0fa 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -1,7 +1,7 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import TYPE_CHECKING, Dict, List, Optional -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal from pydantic import Field as FieldInfo @@ -498,6 +498,14 @@ class CheckTransfer(BaseModel): For this resource it will always be `check_transfer`. """ + valid_until_date: Optional[date] = None + """If set, the check will be valid on or before this date. + + After this date, the check transfer will be stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. + """ + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 4b7a873f7..2693fb44f 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -3,7 +3,10 @@ from __future__ import annotations from typing import Dict, Union, Iterable -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict + +from .._utils import PropertyInfo __all__ = [ "CheckTransferCreateParams", @@ -75,6 +78,14 @@ class CheckTransferCreateParams(TypedDict, total=False): be included if any other `fulfillment_method` is provided. """ + valid_until_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """If provided, the check will be valid on or before this date. + + After this date, the check transfer will be stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. + """ + class PhysicalCheckMailingAddress(TypedDict, total=False): city: Required[str] diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 2717e1355..c14a11768 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -12,7 +12,7 @@ from increase.types import ( CheckTransfer, ) -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, require_approval=True, third_party={"recipient_name": "x"}, + valid_until_date=parse_date("2019-12-27"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -352,6 +353,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, require_approval=True, third_party={"recipient_name": "x"}, + valid_until_date=parse_date("2019-12-27"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) From 926ed2c6b13650eacd71810bc560b93e1fb9b8cd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 01:45:55 +0000 Subject: [PATCH 0979/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c0bbe3e9..7fdabc0be 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.382.0" + ".": "0.383.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e886b5017..1b0b57972 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.382.0" +version = "0.383.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d50ea171d..f1ed19a16 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.382.0" # x-release-please-version +__version__ = "0.383.0" # x-release-please-version From 672735dcef97c16498c38fe13b03c5c512ee75f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 21:58:27 +0000 Subject: [PATCH 0980/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_mail_item.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ac4f56fb9..cb2575744 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-39280e79454a4e6c0e7161b5d92520a3edfc335cce9b198565e57c94daa31b04.yml -openapi_spec_hash: f992030218a4415fcec934bf482cb7ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c2b4fec66de664ded8acd9cbdd69566f17ca1d519136989a15bb67dcf039e793.yml +openapi_spec_hash: 4673ce2f217cc5598a122ad2d9404080 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index 5386061b7..fadbbc42b 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -18,6 +18,9 @@ class Check(BaseModel): back_file_id: Optional[str] = None """The identifier for the File containing the back of the check.""" + check_deposit_id: Optional[str] = None + """The identifier of the Check Deposit if this check was deposited.""" + front_file_id: Optional[str] = None """The identifier for the File containing the front of the check.""" From aee4f0417cc40949d94a4cc7bb7bdf7dab0f29fe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:01:45 +0000 Subject: [PATCH 0981/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7fdabc0be..5ece733ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.383.0" + ".": "0.384.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1b0b57972..0efa94886 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.383.0" +version = "0.384.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f1ed19a16..66363d01b 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.383.0" # x-release-please-version +__version__ = "0.384.0" # x-release-please-version From 71df7dd67e73b8d5d605180885f3463803c46fe7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 00:18:13 +0000 Subject: [PATCH 0982/1325] feat(api): api update --- .stats.yml | 4 ++-- tests/api_resources/test_check_transfers.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index cb2575744..d4beceef3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c2b4fec66de664ded8acd9cbdd69566f17ca1d519136989a15bb67dcf039e793.yml -openapi_spec_hash: 4673ce2f217cc5598a122ad2d9404080 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3c8035f19693dda684506d2e1ea8e9ce7db5e7400923872518c3ac9cb19b7a2a.yml +openapi_spec_hash: a41137b030f9e14858f05263731b8f4d config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index c14a11768..d91986089 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -66,7 +66,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, require_approval=True, third_party={"recipient_name": "x"}, - valid_until_date=parse_date("2019-12-27"), + valid_until_date=parse_date("2025-12-31"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) @@ -353,7 +353,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, require_approval=True, third_party={"recipient_name": "x"}, - valid_until_date=parse_date("2019-12-27"), + valid_until_date=parse_date("2025-12-31"), ) assert_matches_type(CheckTransfer, check_transfer, path=["response"]) From 2ec722df44a6f3a32433b2f3a921d60d10ecd418 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 00:21:16 +0000 Subject: [PATCH 0983/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 5ece733ca..f8336dd24 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.384.0" + ".": "0.385.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0efa94886..c57ac5226 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.384.0" +version = "0.385.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 66363d01b..c7f89aa1b 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.384.0" # x-release-please-version +__version__ = "0.385.0" # x-release-please-version From b8b0c6f0199ecc8896c0c6bad46f84d6fa3d3e1b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:35:37 +0000 Subject: [PATCH 0984/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 6 ++++++ src/increase/types/file.py | 3 +++ src/increase/types/file_create_params.py | 3 +++ src/increase/types/file_list_params.py | 1 + 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4beceef3..f961ed3c7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3c8035f19693dda684506d2e1ea8e9ce7db5e7400923872518c3ac9cb19b7a2a.yml -openapi_spec_hash: a41137b030f9e14858f05263731b8f4d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-029ea9e6c4067d483991aa9c3f62773ffaf56ac0b765749983afc182074e834d.yml +openapi_spec_hash: 4b3f58b1324441e24b4c2b4dfa391d74 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 9cbdf7227..ab8db43de 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -57,6 +57,7 @@ def create( "check_attachment", "form_ss_4", "identity_document", + "loan_application_supplemental_document", "other", "trust_formation_document", "digital_wallet_artwork", @@ -98,6 +99,8 @@ def create( with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. + - `loan_application_supplemental_document` - A supplemental document for a Loan + Application. - `other` - A file purpose not covered by any of the other cases. - `trust_formation_document` - A legal document forming a trust. - `digital_wallet_artwork` - A card image to be rendered inside digital wallet @@ -282,6 +285,7 @@ async def create( "check_attachment", "form_ss_4", "identity_document", + "loan_application_supplemental_document", "other", "trust_formation_document", "digital_wallet_artwork", @@ -323,6 +327,8 @@ async def create( with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. + - `loan_application_supplemental_document` - A supplemental document for a Loan + Application. - `other` - A file purpose not covered by any of the other cases. - `trust_formation_document` - A legal document forming a trust. - `digital_wallet_artwork` - A card image to be rendered inside digital wallet diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 1675fba58..15ef9f972 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -56,6 +56,7 @@ class File(BaseModel): "form_ss_4", "identity_document", "increase_statement", + "loan_application_supplemental_document", "other", "trust_formation_document", "digital_wallet_artwork", @@ -95,6 +96,8 @@ class File(BaseModel): - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `increase_statement` - A statement generated by Increase. + - `loan_application_supplemental_document` - A supplemental document for a Loan + Application. - `other` - A file purpose not covered by any of the other cases. - `trust_formation_document` - A legal document forming a trust. - `digital_wallet_artwork` - A card image to be rendered inside digital wallet diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index e55d115a2..790327157 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -27,6 +27,7 @@ class FileCreateParams(TypedDict, total=False): "check_attachment", "form_ss_4", "identity_document", + "loan_application_supplemental_document", "other", "trust_formation_document", "digital_wallet_artwork", @@ -50,6 +51,8 @@ class FileCreateParams(TypedDict, total=False): with a check that you've requested Increase print. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. + - `loan_application_supplemental_document` - A supplemental document for a Loan + Application. - `other` - A file purpose not covered by any of the other cases. - `trust_formation_document` - A legal document forming a trust. - `digital_wallet_artwork` - A card image to be rendered inside digital wallet diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index c6b9a4def..eb333197f 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -78,6 +78,7 @@ class CreatedAt(TypedDict, total=False): "form_ss_4", "identity_document", "increase_statement", + "loan_application_supplemental_document", "other", "trust_formation_document", "digital_wallet_artwork", From 6e94dd89914a73aef3557c6b9f3ce3cf59f1c29d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 14:38:33 +0000 Subject: [PATCH 0985/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f8336dd24..78058d763 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.385.0" + ".": "0.386.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c57ac5226..7ce395f4a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.385.0" +version = "0.386.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c7f89aa1b..ef328b9c2 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.385.0" # x-release-please-version +__version__ = "0.386.0" # x-release-please-version From 222cf63c5500d904b3af57095c2a71ddb961e3ee Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 15:57:28 +0000 Subject: [PATCH 0986/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_mail_item.py | 8 ++++++++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f961ed3c7..4b31e9820 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-029ea9e6c4067d483991aa9c3f62773ffaf56ac0b765749983afc182074e834d.yml -openapi_spec_hash: 4b3f58b1324441e24b4c2b4dfa391d74 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0cbadaf8bea9237be21194a1039047af135bbcec657db6fc9d6b6697a17c2e37.yml +openapi_spec_hash: dbffc2b4874015f957526d1086861435 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index fadbbc42b..eb281f025 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -24,6 +24,14 @@ class Check(BaseModel): front_file_id: Optional[str] = None """The identifier for the File containing the front of the check.""" + status: Optional[Literal["pending", "deposited", "ignored"]] = None + """The status of the Inbound Mail Item Check. + + - `pending` - The check is pending processing. + - `deposited` - The check has been deposited. + - `ignored` - The check has been ignored. + """ + class InboundMailItem(BaseModel): id: str From 9ecec51f9f5c20cdd0b259b56c4d68c75924f82b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 16:00:30 +0000 Subject: [PATCH 0987/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78058d763..727bf2d62 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.386.0" + ".": "0.387.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7ce395f4a..80e32a80c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.386.0" +version = "0.387.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ef328b9c2..9f69b138b 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.386.0" # x-release-please-version +__version__ = "0.387.0" # x-release-please-version From 8b1667e25499351bc439308e60e734b089805ca9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:39:00 +0000 Subject: [PATCH 0988/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4b31e9820..ccc315b6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0cbadaf8bea9237be21194a1039047af135bbcec657db6fc9d6b6697a17c2e37.yml -openapi_spec_hash: dbffc2b4874015f957526d1086861435 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-519aac324dc804424cc26e20603010104b9ada1dd7cf2fc3fe18f12ae8feabdf.yml +openapi_spec_hash: c1d8289e3421c14340d395e621c190eb config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 90d5be4fe..3ae24ea95 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -302,8 +302,10 @@ def cancel( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: - """ - Cancel a pending Check Transfer + """Cancel a Check Transfer with the `pending_approval` status. + + See + [Transfer Approvals](/documentation/transfer-approvals) for more information. Args: check_transfer_id: The identifier of the pending Check Transfer to cancel. @@ -659,8 +661,10 @@ async def cancel( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CheckTransfer: - """ - Cancel a pending Check Transfer + """Cancel a Check Transfer with the `pending_approval` status. + + See + [Transfer Approvals](/documentation/transfer-approvals) for more information. Args: check_transfer_id: The identifier of the pending Check Transfer to cancel. From bcd3c64d6779e62f1da51e88191f65b61867a5eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 20:42:00 +0000 Subject: [PATCH 0989/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 727bf2d62..f655add5c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.387.0" + ".": "0.388.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 80e32a80c..0b47315cb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.387.0" +version = "0.388.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9f69b138b..c68c5d4d4 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.387.0" # x-release-please-version +__version__ = "0.388.0" # x-release-please-version From 56932963df64c74a1fca46494e67c922b8f34854 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:09:40 +0000 Subject: [PATCH 0990/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 6 ++++-- src/increase/types/check_transfer_list_params.py | 3 ++- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index ccc315b6f..7a7a9db64 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-519aac324dc804424cc26e20603010104b9ada1dd7cf2fc3fe18f12ae8feabdf.yml -openapi_spec_hash: c1d8289e3421c14340d395e621c190eb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20e1561a0d8d3d75c643376822d6e039bcc63f27fd1feff20b8b1e6aced1decd.yml +openapi_spec_hash: 225581a20e328afe5ebba8ee801e002b config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index a0591e0fa..d79e40600 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -453,9 +453,10 @@ class CheckTransfer(BaseModel): status: Literal[ "pending_approval", "canceled", - "pending_submission", + "pending_reviewing", "requires_attention", "rejected", + "pending_submission", "pending_mailing", "mailed", "deposited", @@ -466,10 +467,11 @@ class CheckTransfer(BaseModel): - `pending_approval` - The transfer is awaiting approval. - `canceled` - The transfer has been canceled. - - `pending_submission` - The transfer is pending submission. + - `pending_reviewing` - The transfer is pending review. - `requires_attention` - The transfer requires attention from an Increase operator. - `rejected` - The transfer has been rejected. + - `pending_submission` - The transfer is pending submission. - `pending_mailing` - The check is queued for mailing. - `mailed` - The check has been mailed. - `deposited` - The check has been deposited. diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py index 2f8ccf2c3..adb23d5ca 100644 --- a/src/increase/types/check_transfer_list_params.py +++ b/src/increase/types/check_transfer_list_params.py @@ -70,9 +70,10 @@ class CreatedAt(TypedDict, total=False): Literal[ "pending_approval", "canceled", - "pending_submission", + "pending_reviewing", "requires_attention", "rejected", + "pending_submission", "pending_mailing", "mailed", "deposited", From f68f524dd7cf70e7ad34d3688b4d1a6c3efb5a60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 21:12:35 +0000 Subject: [PATCH 0991/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f655add5c..f7582d696 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.388.0" + ".": "0.389.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0b47315cb..fcc5adbfd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.388.0" +version = "0.389.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c68c5d4d4..ed5ac8c19 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.388.0" # x-release-please-version +__version__ = "0.389.0" # x-release-please-version From 197c305747fb35b3f9fc06bfa511fae22cdab2ab Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 22:56:15 +0000 Subject: [PATCH 0992/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/check_transfers.py | 18 ++++++++++++------ src/increase/types/check_transfer.py | 12 ++++++++---- .../types/check_transfer_create_params.py | 6 +++--- .../check_transfer_stop_payment_params.py | 4 +++- 5 files changed, 28 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7a7a9db64..7ba77f512 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-20e1561a0d8d3d75c643376822d6e039bcc63f27fd1feff20b8b1e6aced1decd.yml -openapi_spec_hash: 225581a20e328afe5ebba8ee801e002b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8c1e7b6c76b828e1835e628850b33c7468a0db61db1df8e5b781868445ecf25c.yml +openapi_spec_hash: eff2b69771bdda576c42980ca05fdc79 config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 3ae24ea95..d7773c3c6 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -110,8 +110,9 @@ def create( other `fulfillment_method` is provided. valid_until_date: If provided, the check will be valid on or before this date. After this date, - the check transfer will be stopped and deposits will not be accepted. For checks - printed by Increase, this date is included on the check as its expiry. + the check transfer will be automatically stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. extra_headers: Send extra headers @@ -338,7 +339,7 @@ def stop_payment( self, check_transfer_id: str, *, - reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | Omit = omit, + reason: Literal["mail_delivery_failed", "not_authorized", "valid_until_date_passed", "unknown"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -357,6 +358,8 @@ def stop_payment( - `mail_delivery_failed` - The check could not be delivered. - `not_authorized` - The check was not authorized. + - `valid_until_date_passed` - The check was stopped for `valid_until_date` being + in the past. - `unknown` - The check was stopped for another reason. extra_headers: Send extra headers @@ -469,8 +472,9 @@ async def create( other `fulfillment_method` is provided. valid_until_date: If provided, the check will be valid on or before this date. After this date, - the check transfer will be stopped and deposits will not be accepted. For checks - printed by Increase, this date is included on the check as its expiry. + the check transfer will be automatically stopped and deposits will not be + accepted. For checks printed by Increase, this date is included on the check as + its expiry. extra_headers: Send extra headers @@ -697,7 +701,7 @@ async def stop_payment( self, check_transfer_id: str, *, - reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] | Omit = omit, + reason: Literal["mail_delivery_failed", "not_authorized", "valid_until_date_passed", "unknown"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -716,6 +720,8 @@ async def stop_payment( - `mail_delivery_failed` - The check could not be delivered. - `not_authorized` - The check was not authorized. + - `valid_until_date_passed` - The check was stopped for `valid_until_date` being + in the past. - `unknown` - The check was stopped for another reason. extra_headers: Send extra headers diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index d79e40600..3b37bbc90 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -231,13 +231,17 @@ def __getattr__(self, attr: str) -> object: ... class StopPaymentRequest(BaseModel): - reason: Literal["mail_delivery_failed", "rejected_by_increase", "not_authorized", "unknown"] + reason: Literal[ + "mail_delivery_failed", "rejected_by_increase", "not_authorized", "valid_until_date_passed", "unknown" + ] """The reason why this transfer was stopped. - `mail_delivery_failed` - The check could not be delivered. - `rejected_by_increase` - The check was canceled by an Increase operator who will provide details out-of-band. - `not_authorized` - The check was not authorized. + - `valid_until_date_passed` - The check was stopped for `valid_until_date` being + in the past. - `unknown` - The check was stopped for another reason. """ @@ -503,9 +507,9 @@ class CheckTransfer(BaseModel): valid_until_date: Optional[date] = None """If set, the check will be valid on or before this date. - After this date, the check transfer will be stopped and deposits will not be - accepted. For checks printed by Increase, this date is included on the check as - its expiry. + After this date, the check transfer will be automatically stopped and deposits + will not be accepted. For checks printed by Increase, this date is included on + the check as its expiry. """ if TYPE_CHECKING: diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 2693fb44f..8a720d2b9 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -81,9 +81,9 @@ class CheckTransferCreateParams(TypedDict, total=False): valid_until_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] """If provided, the check will be valid on or before this date. - After this date, the check transfer will be stopped and deposits will not be - accepted. For checks printed by Increase, this date is included on the check as - its expiry. + After this date, the check transfer will be automatically stopped and deposits + will not be accepted. For checks printed by Increase, this date is included on + the check as its expiry. """ diff --git a/src/increase/types/check_transfer_stop_payment_params.py b/src/increase/types/check_transfer_stop_payment_params.py index ca1c86ece..50ac231ec 100644 --- a/src/increase/types/check_transfer_stop_payment_params.py +++ b/src/increase/types/check_transfer_stop_payment_params.py @@ -8,10 +8,12 @@ class CheckTransferStopPaymentParams(TypedDict, total=False): - reason: Literal["mail_delivery_failed", "not_authorized", "unknown"] + reason: Literal["mail_delivery_failed", "not_authorized", "valid_until_date_passed", "unknown"] """The reason why this transfer should be stopped. - `mail_delivery_failed` - The check could not be delivered. - `not_authorized` - The check was not authorized. + - `valid_until_date_passed` - The check was stopped for `valid_until_date` being + in the past. - `unknown` - The check was stopped for another reason. """ From 6128a34983105317ca68f2003325ae2e75edaedd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 7 Nov 2025 22:59:00 +0000 Subject: [PATCH 0993/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7582d696..4a8316f57 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.389.0" + ".": "0.390.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fcc5adbfd..01dd310c8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.389.0" +version = "0.390.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ed5ac8c19..a0e0a7163 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.389.0" # x-release-please-version +__version__ = "0.390.0" # x-release-please-version From e58d9e703531e83706d66d44a4b66d00e8263ee8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 11:33:25 +0000 Subject: [PATCH 0994/1325] chore(package): drop Python 3.8 support --- README.md | 4 ++-- pyproject.toml | 5 ++--- src/increase/_utils/_sync.py | 34 +++------------------------------- 3 files changed, 7 insertions(+), 36 deletions(-) diff --git a/README.md b/README.md index 2e321ade2..6eb749f5f 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ [![PyPI version](https://img.shields.io/pypi/v/increase.svg?label=pypi%20(stable))](https://pypi.org/project/increase/) -The Increase Python library provides convenient access to the Increase REST API from any Python 3.8+ +The Increase Python library provides convenient access to the Increase REST API from any Python 3.9+ application. The library includes type definitions for all request params and response fields, and offers both synchronous and asynchronous clients powered by [httpx](https://github.com/encode/httpx). @@ -484,7 +484,7 @@ print(increase.__version__) ## Requirements -Python 3.8 or higher. +Python 3.9 or higher. ## Contributing diff --git a/pyproject.toml b/pyproject.toml index 01dd310c8..ac9884f1f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,11 +15,10 @@ dependencies = [ "distro>=1.7.0, <2", "sniffio", ] -requires-python = ">= 3.8" +requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", "Intended Audience :: Developers", - "Programming Language :: Python :: 3.8", "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", @@ -141,7 +140,7 @@ filterwarnings = [ # there are a couple of flags that are still disabled by # default in strict mode as they are experimental and niche. typeCheckingMode = "strict" -pythonVersion = "3.8" +pythonVersion = "3.9" exclude = [ "_dev", diff --git a/src/increase/_utils/_sync.py b/src/increase/_utils/_sync.py index ad7ec71b7..f6027c183 100644 --- a/src/increase/_utils/_sync.py +++ b/src/increase/_utils/_sync.py @@ -1,10 +1,8 @@ from __future__ import annotations -import sys import asyncio import functools -import contextvars -from typing import Any, TypeVar, Callable, Awaitable +from typing import TypeVar, Callable, Awaitable from typing_extensions import ParamSpec import anyio @@ -15,34 +13,11 @@ T_ParamSpec = ParamSpec("T_ParamSpec") -if sys.version_info >= (3, 9): - _asyncio_to_thread = asyncio.to_thread -else: - # backport of https://docs.python.org/3/library/asyncio-task.html#asyncio.to_thread - # for Python 3.8 support - async def _asyncio_to_thread( - func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs - ) -> Any: - """Asynchronously run function *func* in a separate thread. - - Any *args and **kwargs supplied for this function are directly passed - to *func*. Also, the current :class:`contextvars.Context` is propagated, - allowing context variables from the main thread to be accessed in the - separate thread. - - Returns a coroutine that can be awaited to get the eventual result of *func*. - """ - loop = asyncio.events.get_running_loop() - ctx = contextvars.copy_context() - func_call = functools.partial(ctx.run, func, *args, **kwargs) - return await loop.run_in_executor(None, func_call) - - async def to_thread( func: Callable[T_ParamSpec, T_Retval], /, *args: T_ParamSpec.args, **kwargs: T_ParamSpec.kwargs ) -> T_Retval: if sniffio.current_async_library() == "asyncio": - return await _asyncio_to_thread(func, *args, **kwargs) + return await asyncio.to_thread(func, *args, **kwargs) return await anyio.to_thread.run_sync( functools.partial(func, *args, **kwargs), @@ -53,10 +28,7 @@ async def to_thread( def asyncify(function: Callable[T_ParamSpec, T_Retval]) -> Callable[T_ParamSpec, Awaitable[T_Retval]]: """ Take a blocking function and create an async one that receives the same - positional and keyword arguments. For python version 3.9 and above, it uses - asyncio.to_thread to run the function in a separate thread. For python version - 3.8, it uses locally defined copy of the asyncio.to_thread function which was - introduced in python 3.9. + positional and keyword arguments. Usage: From a9c94d3e9955404f857f7c45ee0d9c0a515575be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:41:07 +0000 Subject: [PATCH 0995/1325] fix: compat with Python 3.14 --- src/increase/_models.py | 11 ++++++++--- tests/test_models.py | 8 ++++---- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index 6a3cd1d26..fcec2cf90 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -2,6 +2,7 @@ import os import inspect +import weakref from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast from datetime import date, datetime from typing_extensions import ( @@ -573,6 +574,9 @@ class CachedDiscriminatorType(Protocol): __discriminator__: DiscriminatorDetails +DISCRIMINATOR_CACHE: weakref.WeakKeyDictionary[type, DiscriminatorDetails] = weakref.WeakKeyDictionary() + + class DiscriminatorDetails: field_name: str """The name of the discriminator field in the variant class, e.g. @@ -615,8 +619,9 @@ def __init__( def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, ...]) -> DiscriminatorDetails | None: - if isinstance(union, CachedDiscriminatorType): - return union.__discriminator__ + cached = DISCRIMINATOR_CACHE.get(union) + if cached is not None: + return cached discriminator_field_name: str | None = None @@ -669,7 +674,7 @@ def _build_discriminated_union_meta(*, union: type, meta_annotations: tuple[Any, discriminator_field=discriminator_field_name, discriminator_alias=discriminator_alias, ) - cast(CachedDiscriminatorType, union).__discriminator__ = details + DISCRIMINATOR_CACHE.setdefault(union, details) return details diff --git a/tests/test_models.py b/tests/test_models.py index faf9fc1b6..7cc1f2b9f 100644 --- a/tests/test_models.py +++ b/tests/test_models.py @@ -9,7 +9,7 @@ from increase._utils import PropertyInfo from increase._compat import PYDANTIC_V1, parse_obj, model_dump, model_json -from increase._models import BaseModel, construct_type +from increase._models import DISCRIMINATOR_CACHE, BaseModel, construct_type class BasicModel(BaseModel): @@ -809,7 +809,7 @@ class B(BaseModel): UnionType = cast(Any, Union[A, B]) - assert not hasattr(UnionType, "__discriminator__") + assert not DISCRIMINATOR_CACHE.get(UnionType) m = construct_type( value={"type": "b", "data": "foo"}, type_=cast(Any, Annotated[UnionType, PropertyInfo(discriminator="type")]) @@ -818,7 +818,7 @@ class B(BaseModel): assert m.type == "b" assert m.data == "foo" # type: ignore[comparison-overlap] - discriminator = UnionType.__discriminator__ + discriminator = DISCRIMINATOR_CACHE.get(UnionType) assert discriminator is not None m = construct_type( @@ -830,7 +830,7 @@ class B(BaseModel): # if the discriminator details object stays the same between invocations then # we hit the cache - assert UnionType.__discriminator__ is discriminator + assert DISCRIMINATOR_CACHE.get(UnionType) is discriminator @pytest.mark.skipif(PYDANTIC_V1, reason="TypeAliasType is not supported in Pydantic v1") From ddacbf988a1cf72f717f86a58ba5d04967298b60 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 13:44:04 +0000 Subject: [PATCH 0996/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4a8316f57..78f60e7ca 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.390.0" + ".": "0.390.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ac9884f1f..257e7105c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.390.0" +version = "0.390.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a0e0a7163..2bc30c686 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.390.0" # x-release-please-version +__version__ = "0.390.1" # x-release-please-version From 29122956fd4c3f192313645268886558cef2927d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:44:09 +0000 Subject: [PATCH 0997/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 6 ++---- src/increase/types/check_transfer_list_params.py | 3 +-- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7ba77f512..e94fde2d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8c1e7b6c76b828e1835e628850b33c7468a0db61db1df8e5b781868445ecf25c.yml -openapi_spec_hash: eff2b69771bdda576c42980ca05fdc79 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6b193549e9c795e807b299e7161628dc1e504d43d6be27113b1f3a1e491914f.yml +openapi_spec_hash: 9d0ff6cc1ec60a6772598cff20f8db1d config_hash: eb2035151c7b49c2f12caf55469b8f9a diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 3b37bbc90..343f316ca 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -457,10 +457,9 @@ class CheckTransfer(BaseModel): status: Literal[ "pending_approval", "canceled", - "pending_reviewing", + "pending_submission", "requires_attention", "rejected", - "pending_submission", "pending_mailing", "mailed", "deposited", @@ -471,11 +470,10 @@ class CheckTransfer(BaseModel): - `pending_approval` - The transfer is awaiting approval. - `canceled` - The transfer has been canceled. - - `pending_reviewing` - The transfer is pending review. + - `pending_submission` - The transfer is pending submission. - `requires_attention` - The transfer requires attention from an Increase operator. - `rejected` - The transfer has been rejected. - - `pending_submission` - The transfer is pending submission. - `pending_mailing` - The check is queued for mailing. - `mailed` - The check has been mailed. - `deposited` - The check has been deposited. diff --git a/src/increase/types/check_transfer_list_params.py b/src/increase/types/check_transfer_list_params.py index adb23d5ca..2f8ccf2c3 100644 --- a/src/increase/types/check_transfer_list_params.py +++ b/src/increase/types/check_transfer_list_params.py @@ -70,10 +70,9 @@ class CreatedAt(TypedDict, total=False): Literal[ "pending_approval", "canceled", - "pending_reviewing", + "pending_submission", "requires_attention", "rejected", - "pending_submission", "pending_mailing", "mailed", "deposited", From 435c6c08bbdbbd5ff6b8f708de06359e237567b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 10 Nov 2025 19:47:02 +0000 Subject: [PATCH 0998/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 78f60e7ca..8b43e3288 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.390.1" + ".": "0.391.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 257e7105c..8dcedda54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.390.1" +version = "0.391.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2bc30c686..6ecf86fb3 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.390.1" # x-release-please-version +__version__ = "0.391.0" # x-release-please-version From c5a92998180f012830251ee9cb9144e942226771 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 14:41:15 +0000 Subject: [PATCH 0999/1325] fix(compat): update signatures of `model_dump` and `model_dump_json` for Pydantic v1 --- src/increase/_models.py | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/src/increase/_models.py b/src/increase/_models.py index fcec2cf90..ca9500b2a 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -257,15 +257,16 @@ def model_dump( mode: Literal["json", "python"] | str = "python", include: IncEx | None = None, exclude: IncEx | None = None, + context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, + exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, - context: dict[str, Any] | None = None, - serialize_as_any: bool = False, fallback: Callable[[Any], Any] | None = None, + serialize_as_any: bool = False, ) -> dict[str, Any]: """Usage docs: https://docs.pydantic.dev/2.4/concepts/serialization/#modelmodel_dump @@ -273,16 +274,24 @@ def model_dump( Args: mode: The mode in which `to_python` should run. - If mode is 'json', the dictionary will only contain JSON serializable types. - If mode is 'python', the dictionary may contain any Python objects. - include: A list of fields to include in the output. - exclude: A list of fields to exclude from the output. + If mode is 'json', the output will only contain JSON serializable types. + If mode is 'python', the output may contain non-JSON-serializable Python objects. + include: A set of fields to include in the output. + exclude: A set of fields to exclude from the output. + context: Additional context to pass to the serializer. by_alias: Whether to use the field's alias in the dictionary key if defined. - exclude_unset: Whether to exclude fields that are unset or None from the output. - exclude_defaults: Whether to exclude fields that are set to their default value from the output. - exclude_none: Whether to exclude fields that have a value of `None` from the output. - round_trip: Whether to enable serialization and deserialization round-trip support. - warnings: Whether to log warnings when invalid fields are encountered. + exclude_unset: Whether to exclude fields that have not been explicitly set. + exclude_defaults: Whether to exclude fields that are set to their default value. + exclude_none: Whether to exclude fields that have a value of `None`. + exclude_computed_fields: Whether to exclude computed fields. + While this can be useful for round-tripping, it is usually recommended to use the dedicated + `round_trip` parameter instead. + round_trip: If True, dumped values should be valid as input for non-idempotent types such as Json[T]. + warnings: How to handle serialization errors. False/"none" ignores them, True/"warn" logs errors, + "error" raises a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError]. + fallback: A function to call when an unknown value is encountered. If not provided, + a [`PydanticSerializationError`][pydantic_core.PydanticSerializationError] error is raised. + serialize_as_any: Whether to serialize fields with duck-typing serialization behavior. Returns: A dictionary representation of the model. @@ -299,6 +308,8 @@ def model_dump( raise ValueError("serialize_as_any is only supported in Pydantic v2") if fallback is not None: raise ValueError("fallback is only supported in Pydantic v2") + if exclude_computed_fields != False: + raise ValueError("exclude_computed_fields is only supported in Pydantic v2") dumped = super().dict( # pyright: ignore[reportDeprecated] include=include, exclude=exclude, @@ -315,15 +326,17 @@ def model_dump_json( self, *, indent: int | None = None, + ensure_ascii: bool = False, include: IncEx | None = None, exclude: IncEx | None = None, + context: Any | None = None, by_alias: bool | None = None, exclude_unset: bool = False, exclude_defaults: bool = False, exclude_none: bool = False, + exclude_computed_fields: bool = False, round_trip: bool = False, warnings: bool | Literal["none", "warn", "error"] = True, - context: dict[str, Any] | None = None, fallback: Callable[[Any], Any] | None = None, serialize_as_any: bool = False, ) -> str: @@ -355,6 +368,10 @@ def model_dump_json( raise ValueError("serialize_as_any is only supported in Pydantic v2") if fallback is not None: raise ValueError("fallback is only supported in Pydantic v2") + if ensure_ascii != False: + raise ValueError("ensure_ascii is only supported in Pydantic v2") + if exclude_computed_fields != False: + raise ValueError("exclude_computed_fields is only supported in Pydantic v2") return super().json( # type: ignore[reportDeprecated] indent=indent, include=include, From 6895ed1091513ba6d0e450ae1e76a94dcda8f85d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 11 Nov 2025 14:44:19 +0000 Subject: [PATCH 1000/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8b43e3288..bc0366083 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.391.0" + ".": "0.391.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8dcedda54..fc40a7e91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.391.0" +version = "0.391.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6ecf86fb3..4fdfd98d9 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.391.0" # x-release-please-version +__version__ = "0.391.1" # x-release-please-version From 0ce348c3978bfd723b724496b60fada1e1452faa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 16:52:15 +0000 Subject: [PATCH 1001/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/inbound_mail_items.py | 116 +++++++++++++++++- src/increase/resources/lockboxes.py | 8 +- src/increase/types/__init__.py | 1 + .../types/inbound_mail_item_action_params.py | 29 +++++ src/increase/types/lockbox.py | 4 +- src/increase/types/lockbox_update_params.py | 4 +- .../api_resources/test_inbound_mail_items.py | 84 +++++++++++++ 9 files changed, 245 insertions(+), 10 deletions(-) create mode 100644 src/increase/types/inbound_mail_item_action_params.py diff --git a/.stats.yml b/.stats.yml index e94fde2d8..2cc58976a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 228 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b6b193549e9c795e807b299e7161628dc1e504d43d6be27113b1f3a1e491914f.yml -openapi_spec_hash: 9d0ff6cc1ec60a6772598cff20f8db1d -config_hash: eb2035151c7b49c2f12caf55469b8f9a +configured_endpoints: 229 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a0eb4b9ef698e80be2fc9e995d6096b96de35e4985c8586e0773fa55a6b50943.yml +openapi_spec_hash: a36c0bee01bf3af40ebcd7075308f170 +config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/api.md b/api.md index e96f9618c..6ef71b9b2 100644 --- a/api.md +++ b/api.md @@ -441,6 +441,7 @@ Methods: - client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem - client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] +- client.inbound_mail_items.action(inbound_mail_item_id, \*\*params) -> InboundMailItem # RoutingNumbers diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index b36f5c791..7e04c7944 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -2,11 +2,13 @@ from __future__ import annotations +from typing import Iterable + import httpx -from ..types import inbound_mail_item_list_params +from ..types import inbound_mail_item_list_params, inbound_mail_item_action_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -133,6 +135,54 @@ def list( model=InboundMailItem, ) + def action( + self, + inbound_mail_item_id: str, + *, + checks: Iterable[inbound_mail_item_action_params.Check], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundMailItem: + """ + Action a Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to action. + + checks: The actions to perform on the Inbound Mail Item. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return self._post( + f"/inbound_mail_items/{inbound_mail_item_id}/action", + body=maybe_transform({"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + class AsyncInboundMailItemsResource(AsyncAPIResource): @cached_property @@ -245,6 +295,56 @@ def list( model=InboundMailItem, ) + async def action( + self, + inbound_mail_item_id: str, + *, + checks: Iterable[inbound_mail_item_action_params.Check], + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundMailItem: + """ + Action a Inbound Mail Item + + Args: + inbound_mail_item_id: The identifier of the Inbound Mail Item to action. + + checks: The actions to perform on the Inbound Mail Item. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_mail_item_id: + raise ValueError( + f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" + ) + return await self._post( + f"/inbound_mail_items/{inbound_mail_item_id}/action", + body=await async_maybe_transform( + {"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundMailItem, + ) + class InboundMailItemsResourceWithRawResponse: def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: @@ -256,6 +356,9 @@ def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self.list = to_raw_response_wrapper( inbound_mail_items.list, ) + self.action = to_raw_response_wrapper( + inbound_mail_items.action, + ) class AsyncInboundMailItemsResourceWithRawResponse: @@ -268,6 +371,9 @@ def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self.list = async_to_raw_response_wrapper( inbound_mail_items.list, ) + self.action = async_to_raw_response_wrapper( + inbound_mail_items.action, + ) class InboundMailItemsResourceWithStreamingResponse: @@ -280,6 +386,9 @@ def __init__(self, inbound_mail_items: InboundMailItemsResource) -> None: self.list = to_streamed_response_wrapper( inbound_mail_items.list, ) + self.action = to_streamed_response_wrapper( + inbound_mail_items.action, + ) class AsyncInboundMailItemsResourceWithStreamingResponse: @@ -292,3 +401,6 @@ def __init__(self, inbound_mail_items: AsyncInboundMailItemsResource) -> None: self.list = async_to_streamed_response_wrapper( inbound_mail_items.list, ) + self.action = async_to_streamed_response_wrapper( + inbound_mail_items.action, + ) diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index c9e161a30..276fe76b0 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -137,7 +137,7 @@ def update( self, lockbox_id: str, *, - check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -158,6 +158,8 @@ def update( - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. description: The description you choose for the Lockbox. @@ -370,7 +372,7 @@ async def update( self, lockbox_id: str, *, - check_deposit_behavior: Literal["enabled", "disabled"] | Omit = omit, + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] | Omit = omit, description: str | Omit = omit, recipient_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -391,6 +393,8 @@ async def update( - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. description: The description you choose for the Lockbox. diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c9662e0a1..6eaf9bf97 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -127,6 +127,7 @@ from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams +from .inbound_mail_item_action_params import InboundMailItemActionParams as InboundMailItemActionParams from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .card_push_transfer_create_params import CardPushTransferCreateParams as CardPushTransferCreateParams diff --git a/src/increase/types/inbound_mail_item_action_params.py b/src/increase/types/inbound_mail_item_action_params.py new file mode 100644 index 000000000..ceae076a0 --- /dev/null +++ b/src/increase/types/inbound_mail_item_action_params.py @@ -0,0 +1,29 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["InboundMailItemActionParams", "Check"] + + +class InboundMailItemActionParams(TypedDict, total=False): + checks: Required[Iterable[Check]] + """The actions to perform on the Inbound Mail Item.""" + + +class Check(TypedDict, total=False): + action: Required[Literal["deposit", "ignore"]] + """The action to perform on the Inbound Mail Item. + + - `deposit` - The check will be deposited. + - `ignore` - The check will be ignored. + """ + + account: str + """The identifier of the Account to deposit the check into. + + If not provided, the check will be deposited into the Account associated with + the Lockbox. + """ diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index 1051f852e..0350841c7 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -50,11 +50,13 @@ class Lockbox(BaseModel): address: Address """The mailing address for the Lockbox.""" - check_deposit_behavior: Literal["enabled", "disabled"] + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] """Indicates if checks mailed to this lockbox will be deposited. - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. """ created_at: datetime diff --git a/src/increase/types/lockbox_update_params.py b/src/increase/types/lockbox_update_params.py index fe3fc5a58..ce7a4e72e 100644 --- a/src/increase/types/lockbox_update_params.py +++ b/src/increase/types/lockbox_update_params.py @@ -8,11 +8,13 @@ class LockboxUpdateParams(TypedDict, total=False): - check_deposit_behavior: Literal["enabled", "disabled"] + check_deposit_behavior: Literal["enabled", "disabled", "pend_for_processing"] """This indicates if checks mailed to this lockbox will be deposited. - `enabled` - Checks mailed to this Lockbox will be deposited. - `disabled` - Checks mailed to this Lockbox will not be deposited. + - `pend_for_processing` - Checks mailed to this Lockbox will be pending until + actioned. """ description: str diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 3cbea56d0..8f4229b5e 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -97,6 +97,48 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_action(self, client: Increase) -> None: + inbound_mail_item = client.inbound_mail_items.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_raw_response_action(self, client: Increase) -> None: + response = client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + def test_streaming_response_action(self, client: Increase) -> None: + with client.inbound_mail_items.with_streaming_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_action(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + class TestAsyncInboundMailItems: parametrize = pytest.mark.parametrize( @@ -180,3 +222,45 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_action(self, async_client: AsyncIncrease) -> None: + inbound_mail_item = await async_client.inbound_mail_items.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_raw_response_action(self, async_client: AsyncIncrease) -> None: + response = await async_client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + @parametrize + async def test_streaming_response_action(self, async_client: AsyncIncrease) -> None: + async with async_client.inbound_mail_items.with_streaming_response.action( + inbound_mail_item_id="inbound_mail_item_q6rrg7mmqpplx80zceev", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_mail_item = await response.parse() + assert_matches_type(InboundMailItem, inbound_mail_item, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_action(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `inbound_mail_item_id` but received ''"): + await async_client.inbound_mail_items.with_raw_response.action( + inbound_mail_item_id="", + checks=[{"action": "deposit"}, {"action": "ignore"}], + ) From 726f228e217c8e05ae2b67a69e1d8c1d9262f20f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 12 Nov 2025 16:55:11 +0000 Subject: [PATCH 1002/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc0366083..e25de8c46 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.391.1" + ".": "0.392.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index fc40a7e91..645de36b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.391.1" +version = "0.392.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4fdfd98d9..cc7899381 100644 --- a/src/increase/_version.py +++ b/src/increase/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "increase" -__version__ = "0.391.1" # x-release-please-version +__version__ = "0.392.0" # x-release-please-version From 084185d5faa9b4ac20d1f89c6b3e2077e65b5f48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 19:47:29 +0000 Subject: [PATCH 1003/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_check_deposit.py | 4 +++- src/increase/types/transaction.py | 4 +++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2cc58976a..1e5f14c3a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a0eb4b9ef698e80be2fc9e995d6096b96de35e4985c8586e0773fa55a6b50943.yml -openapi_spec_hash: a36c0bee01bf3af40ebcd7075308f170 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-af1c3f6f39bad6db3878ece15395915f818d9310c5535947520e935e82e8bac3.yml +openapi_spec_hash: 3291dcc6833f09527c442c898c8d11f0 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 7a21b8368..f34e043ba 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,7 +16,7 @@ class Adjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item"] + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving @@ -27,6 +27,8 @@ class Adjustment(BaseModel): was written on the check. - `non_conforming_item` - The recipient was not able to process the check. This usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. """ transaction_id: str diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 59a589414..27672f96f 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -2818,7 +2818,7 @@ class SourceInboundCheckAdjustment(BaseModel): amount: int """The amount of the check adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item"] + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving @@ -2829,6 +2829,8 @@ class SourceInboundCheckAdjustment(BaseModel): was written on the check. - `non_conforming_item` - The recipient was not able to process the check. This usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. """ if TYPE_CHECKING: From 4a0657cb7bd3422a55656669433e7fefe5d5713d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 13 Nov 2025 19:50:27 +0000 Subject: [PATCH 1004/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e25de8c46..cd675b327 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.392.0" + ".": "0.393.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 645de36b6..d7e5811e8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.392.0" +version = "0.393.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index cc7899381..d34866b3d 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.392.0" # x-release-please-version +__version__ = "0.393.0" # x-release-please-version From c36f9ef976b9fa7de50bde7b47e1efba745a0ef6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:42:29 +0000 Subject: [PATCH 1005/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/physical_card_profile.py | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1e5f14c3a..a3b26b560 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-af1c3f6f39bad6db3878ece15395915f818d9310c5535947520e935e82e8bac3.yml -openapi_spec_hash: 3291dcc6833f09527c442c898c8d11f0 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4ebad4aaba1af68442e3650238657c7f7600714bbf7a26d01e01e69e467ee4b.yml +openapi_spec_hash: 0b7280b86b511746a24a4abef602990a config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py index dac8be685..175ff6c07 100644 --- a/src/increase/types/physical_card_profile.py +++ b/src/increase/types/physical_card_profile.py @@ -16,10 +16,16 @@ class PhysicalCardProfile(BaseModel): """The Card Profile identifier.""" back_image_file_id: Optional[str] = None - """The identifier of the File containing the physical card's back image.""" + """The identifier of the File containing the physical card's back image. + + This will be missing until the image has been post-processed. + """ carrier_image_file_id: Optional[str] = None - """The identifier of the File containing the physical card's carrier image.""" + """The identifier of the File containing the physical card's carrier image. + + This will be missing until the image has been post-processed. + """ contact_phone: Optional[str] = None """A phone number the user can contact to receive support for their card.""" @@ -41,7 +47,10 @@ class PhysicalCardProfile(BaseModel): """A description you can use to identify the Physical Card Profile.""" front_image_file_id: Optional[str] = None - """The identifier of the File containing the physical card's front image.""" + """The identifier of the File containing the physical card's front image. + + This will be missing until the image has been post-processed. + """ idempotency_key: Optional[str] = None """The idempotency key you chose for this object. From ce024efddb43e4f61cc71cc2c853d520a49f8b52 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:45:36 +0000 Subject: [PATCH 1006/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index cd675b327..1bb2c3312 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.393.0" + ".": "0.394.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d7e5811e8..86ce69c14 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.393.0" +version = "0.394.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d34866b3d..3728f5ee6 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.393.0" # x-release-please-version +__version__ = "0.394.0" # x-release-please-version From 2131cba62399bea9f55b8d2b2842de6c24b4a0bd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:46:19 +0000 Subject: [PATCH 1007/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 4 ++-- src/increase/types/file.py | 2 +- src/increase/types/file_create_params.py | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index a3b26b560..9a6f8ba02 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4ebad4aaba1af68442e3650238657c7f7600714bbf7a26d01e01e69e467ee4b.yml -openapi_spec_hash: 0b7280b86b511746a24a4abef602990a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a6340375b0e06648ff3e7e4b8aa1527b71df0c7a3d793738ba6fe20eef6f624.yml +openapi_spec_hash: 3cb2076c8a4870d3b17d02780a295172 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index ab8db43de..4c71d0894 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -108,7 +108,7 @@ def create( - `digital_wallet_app_icon` - An icon for you app to be rendered inside digital wallet apps. This must be a 100x100 pixel PNG. - `physical_card_front` - A card image to be printed on the front of a physical - card. This must be a 2100x1340 pixel PNG with no other color but black. + card. This must be a 2100x1344 pixel PNG with no other color but black. - `physical_card_carrier` - An image representing the entirety of the carrier used for a physical card. This must be a 2550x3300 pixel PNG with no other color but black. @@ -336,7 +336,7 @@ async def create( - `digital_wallet_app_icon` - An icon for you app to be rendered inside digital wallet apps. This must be a 100x100 pixel PNG. - `physical_card_front` - A card image to be printed on the front of a physical - card. This must be a 2100x1340 pixel PNG with no other color but black. + card. This must be a 2100x1344 pixel PNG with no other color but black. - `physical_card_carrier` - An image representing the entirety of the carrier used for a physical card. This must be a 2550x3300 pixel PNG with no other color but black. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 15ef9f972..8dc3e8fb1 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -105,7 +105,7 @@ class File(BaseModel): - `digital_wallet_app_icon` - An icon for you app to be rendered inside digital wallet apps. This must be a 100x100 pixel PNG. - `physical_card_front` - A card image to be printed on the front of a physical - card. This must be a 2100x1340 pixel PNG with no other color but black. + card. This must be a 2100x1344 pixel PNG with no other color but black. - `physical_card_back` - The image to be printed on the back of a physical card. - `physical_card_carrier` - An image representing the entirety of the carrier used for a physical card. This must be a 2550x3300 pixel PNG with no other diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index 790327157..ba802de04 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -60,7 +60,7 @@ class FileCreateParams(TypedDict, total=False): - `digital_wallet_app_icon` - An icon for you app to be rendered inside digital wallet apps. This must be a 100x100 pixel PNG. - `physical_card_front` - A card image to be printed on the front of a physical - card. This must be a 2100x1340 pixel PNG with no other color but black. + card. This must be a 2100x1344 pixel PNG with no other color but black. - `physical_card_carrier` - An image representing the entirety of the carrier used for a physical card. This must be a 2550x3300 pixel PNG with no other color but black. From d79af5f70ce3a6d54bc404102ecdff0bf0e69411 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 14 Nov 2025 01:49:10 +0000 Subject: [PATCH 1008/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1bb2c3312..02bfb399e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.394.0" + ".": "0.395.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 86ce69c14..bc24d4e8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.394.0" +version = "0.395.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3728f5ee6..ceca6b6b4 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.394.0" # x-release-please-version +__version__ = "0.395.0" # x-release-please-version From c04044648b6787a57550a957bc21d22ca6c91742 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 22:27:07 +0000 Subject: [PATCH 1009/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/card_push_transfers.py | 30 +- src/increase/types/card_push_transfer.py | 357 +++++++++++++++++- .../types/card_push_transfer_create_params.py | 352 ++++++++++++++++- src/increase/types/transaction.py | 2 +- .../api_resources/test_card_push_transfers.py | 40 +- 6 files changed, 745 insertions(+), 40 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9a6f8ba02..973bfab07 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a6340375b0e06648ff3e7e4b8aa1527b71df0c7a3d793738ba6fe20eef6f624.yml -openapi_spec_hash: 3cb2076c8a4870d3b17d02780a295172 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fadbd087449a336a91be2645c64e2fe1e81e0f52d9810ab5f830af7e1c727138.yml +openapi_spec_hash: 7e44d91e713fb44925a3565b882248d7 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index 41ebcec9f..b72363fce 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -47,7 +47,6 @@ def with_streaming_response(self) -> CardPushTransfersResourceWithStreamingRespo def create( self, *, - amount: int, business_application_identifier: Literal[ "account_to_account", "business_to_business", @@ -71,6 +70,7 @@ def create( merchant_name_prefix: str, merchant_postal_code: str, merchant_state: str, + presentment_amount: card_push_transfer_create_params.PresentmentAmount, recipient_name: str, sender_address_city: str, sender_address_line1: str, @@ -87,13 +87,10 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: - """Create a Card Push Transfer + """ + Create a Card Push Transfer Args: - amount: The transfer amount in USD cents. - - For Card Push transfers, must be positive. - business_application_identifier: The Business Application Identifier describes the type of transaction being performed. Your program must be approved for the specified Business Application Identifier in order to use it. @@ -134,6 +131,10 @@ def create( merchant_state: The state of the merchant (generally your business) sending the transfer. + presentment_amount: The amount to transfer. The receiving bank will convert this to the cardholder's + currency. The amount that is applied to your Increase account matches the + currency of your account. + recipient_name: The name of the funds recipient. sender_address_city: The city of the sender. @@ -164,7 +165,6 @@ def create( "/card_push_transfers", body=maybe_transform( { - "amount": amount, "business_application_identifier": business_application_identifier, "card_token_id": card_token_id, "merchant_category_code": merchant_category_code, @@ -173,6 +173,7 @@ def create( "merchant_name_prefix": merchant_name_prefix, "merchant_postal_code": merchant_postal_code, "merchant_state": merchant_state, + "presentment_amount": presentment_amount, "recipient_name": recipient_name, "sender_address_city": sender_address_city, "sender_address_line1": sender_address_line1, @@ -406,7 +407,6 @@ def with_streaming_response(self) -> AsyncCardPushTransfersResourceWithStreaming async def create( self, *, - amount: int, business_application_identifier: Literal[ "account_to_account", "business_to_business", @@ -430,6 +430,7 @@ async def create( merchant_name_prefix: str, merchant_postal_code: str, merchant_state: str, + presentment_amount: card_push_transfer_create_params.PresentmentAmount, recipient_name: str, sender_address_city: str, sender_address_line1: str, @@ -446,13 +447,10 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> CardPushTransfer: - """Create a Card Push Transfer + """ + Create a Card Push Transfer Args: - amount: The transfer amount in USD cents. - - For Card Push transfers, must be positive. - business_application_identifier: The Business Application Identifier describes the type of transaction being performed. Your program must be approved for the specified Business Application Identifier in order to use it. @@ -493,6 +491,10 @@ async def create( merchant_state: The state of the merchant (generally your business) sending the transfer. + presentment_amount: The amount to transfer. The receiving bank will convert this to the cardholder's + currency. The amount that is applied to your Increase account matches the + currency of your account. + recipient_name: The name of the funds recipient. sender_address_city: The city of the sender. @@ -523,7 +525,6 @@ async def create( "/card_push_transfers", body=await async_maybe_transform( { - "amount": amount, "business_application_identifier": business_application_identifier, "card_token_id": card_token_id, "merchant_category_code": merchant_category_code, @@ -532,6 +533,7 @@ async def create( "merchant_name_prefix": merchant_name_prefix, "merchant_postal_code": merchant_postal_code, "merchant_state": merchant_state, + "presentment_amount": presentment_amount, "recipient_name": recipient_name, "sender_address_city": sender_address_city, "sender_address_line1": sender_address_line1, diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 0ec3dadf8..7718cb64e 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -18,6 +18,7 @@ "CreatedByOAuthApplication", "CreatedByUser", "Decline", + "PresentmentAmount", "Submission", ] @@ -43,6 +44,9 @@ class Acceptance(BaseModel): network_transaction_identifier: Optional[str] = None """A unique identifier for the transaction on the card network.""" + settlement_amount: int + """The transfer amount in USD cents.""" + class Approval(BaseModel): approved_at: datetime @@ -240,6 +244,340 @@ class Decline(BaseModel): """ +class PresentmentAmount(BaseModel): + currency: Literal[ + "AFN", + "EUR", + "ALL", + "DZD", + "USD", + "AOA", + "ARS", + "AMD", + "AWG", + "AUD", + "AZN", + "BSD", + "BHD", + "BDT", + "BBD", + "BYN", + "BZD", + "BMD", + "INR", + "BTN", + "BOB", + "BOV", + "BAM", + "BWP", + "NOK", + "BRL", + "BND", + "BGN", + "BIF", + "CVE", + "KHR", + "CAD", + "KYD", + "CLP", + "CLF", + "CNY", + "COP", + "COU", + "KMF", + "CDF", + "NZD", + "CRC", + "CUP", + "CZK", + "DKK", + "DJF", + "DOP", + "EGP", + "SVC", + "ERN", + "SZL", + "ETB", + "FKP", + "FJD", + "GMD", + "GEL", + "GHS", + "GIP", + "GTQ", + "GBP", + "GNF", + "GYD", + "HTG", + "HNL", + "HKD", + "HUF", + "ISK", + "IDR", + "IRR", + "IQD", + "ILS", + "JMD", + "JPY", + "JOD", + "KZT", + "KES", + "KPW", + "KRW", + "KWD", + "KGS", + "LAK", + "LBP", + "LSL", + "ZAR", + "LRD", + "LYD", + "CHF", + "MOP", + "MKD", + "MGA", + "MWK", + "MYR", + "MVR", + "MRU", + "MUR", + "MXN", + "MXV", + "MDL", + "MNT", + "MAD", + "MZN", + "MMK", + "NAD", + "NPR", + "NIO", + "NGN", + "OMR", + "PKR", + "PAB", + "PGK", + "PYG", + "PEN", + "PHP", + "PLN", + "QAR", + "RON", + "RUB", + "RWF", + "SHP", + "WST", + "STN", + "SAR", + "RSD", + "SCR", + "SLE", + "SGD", + "SBD", + "SOS", + "SSP", + "LKR", + "SDG", + "SRD", + "SEK", + "CHE", + "CHW", + "SYP", + "TWD", + "TJS", + "TZS", + "THB", + "TOP", + "TTD", + "TND", + "TRY", + "TMT", + "UGX", + "UAH", + "AED", + "USN", + "UYU", + "UYI", + "UYW", + "UZS", + "VUV", + "VES", + "VED", + "VND", + "YER", + "ZMW", + "ZWG", + ] + """The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code. + + - `AFN` - AFN + - `EUR` - EUR + - `ALL` - ALL + - `DZD` - DZD + - `USD` - USD + - `AOA` - AOA + - `ARS` - ARS + - `AMD` - AMD + - `AWG` - AWG + - `AUD` - AUD + - `AZN` - AZN + - `BSD` - BSD + - `BHD` - BHD + - `BDT` - BDT + - `BBD` - BBD + - `BYN` - BYN + - `BZD` - BZD + - `BMD` - BMD + - `INR` - INR + - `BTN` - BTN + - `BOB` - BOB + - `BOV` - BOV + - `BAM` - BAM + - `BWP` - BWP + - `NOK` - NOK + - `BRL` - BRL + - `BND` - BND + - `BGN` - BGN + - `BIF` - BIF + - `CVE` - CVE + - `KHR` - KHR + - `CAD` - CAD + - `KYD` - KYD + - `CLP` - CLP + - `CLF` - CLF + - `CNY` - CNY + - `COP` - COP + - `COU` - COU + - `KMF` - KMF + - `CDF` - CDF + - `NZD` - NZD + - `CRC` - CRC + - `CUP` - CUP + - `CZK` - CZK + - `DKK` - DKK + - `DJF` - DJF + - `DOP` - DOP + - `EGP` - EGP + - `SVC` - SVC + - `ERN` - ERN + - `SZL` - SZL + - `ETB` - ETB + - `FKP` - FKP + - `FJD` - FJD + - `GMD` - GMD + - `GEL` - GEL + - `GHS` - GHS + - `GIP` - GIP + - `GTQ` - GTQ + - `GBP` - GBP + - `GNF` - GNF + - `GYD` - GYD + - `HTG` - HTG + - `HNL` - HNL + - `HKD` - HKD + - `HUF` - HUF + - `ISK` - ISK + - `IDR` - IDR + - `IRR` - IRR + - `IQD` - IQD + - `ILS` - ILS + - `JMD` - JMD + - `JPY` - JPY + - `JOD` - JOD + - `KZT` - KZT + - `KES` - KES + - `KPW` - KPW + - `KRW` - KRW + - `KWD` - KWD + - `KGS` - KGS + - `LAK` - LAK + - `LBP` - LBP + - `LSL` - LSL + - `ZAR` - ZAR + - `LRD` - LRD + - `LYD` - LYD + - `CHF` - CHF + - `MOP` - MOP + - `MKD` - MKD + - `MGA` - MGA + - `MWK` - MWK + - `MYR` - MYR + - `MVR` - MVR + - `MRU` - MRU + - `MUR` - MUR + - `MXN` - MXN + - `MXV` - MXV + - `MDL` - MDL + - `MNT` - MNT + - `MAD` - MAD + - `MZN` - MZN + - `MMK` - MMK + - `NAD` - NAD + - `NPR` - NPR + - `NIO` - NIO + - `NGN` - NGN + - `OMR` - OMR + - `PKR` - PKR + - `PAB` - PAB + - `PGK` - PGK + - `PYG` - PYG + - `PEN` - PEN + - `PHP` - PHP + - `PLN` - PLN + - `QAR` - QAR + - `RON` - RON + - `RUB` - RUB + - `RWF` - RWF + - `SHP` - SHP + - `WST` - WST + - `STN` - STN + - `SAR` - SAR + - `RSD` - RSD + - `SCR` - SCR + - `SLE` - SLE + - `SGD` - SGD + - `SBD` - SBD + - `SOS` - SOS + - `SSP` - SSP + - `LKR` - LKR + - `SDG` - SDG + - `SRD` - SRD + - `SEK` - SEK + - `CHE` - CHE + - `CHW` - CHW + - `SYP` - SYP + - `TWD` - TWD + - `TJS` - TJS + - `TZS` - TZS + - `THB` - THB + - `TOP` - TOP + - `TTD` - TTD + - `TND` - TND + - `TRY` - TRY + - `TMT` - TMT + - `UGX` - UGX + - `UAH` - UAH + - `AED` - AED + - `USN` - USN + - `UYU` - UYU + - `UYI` - UYI + - `UYW` - UYW + - `UZS` - UZS + - `VUV` - VUV + - `VES` - VES + - `VED` - VED + - `VND` - VND + - `YER` - YER + - `ZMW` - ZMW + - `ZWG` - ZWG + """ + + value: str + """ + The amount value represented as a string containing a decimal number in major + units (so e.g., "12.34" for $12.34). + """ + + class Submission(BaseModel): retrieval_reference_number: str """A 12-digit retrieval reference number that identifies the transfer. @@ -276,9 +614,6 @@ class CardPushTransfer(BaseModel): account_id: str """The Account from which the transfer was sent.""" - amount: int - """The transfer amount in USD cents.""" - approval: Optional[Approval] = None """ If your account requires approvals for transfers and the transfer was approved, @@ -337,14 +672,6 @@ class CardPushTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" - currency: Literal["USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the transfer's - currency. - - - `USD` - US Dollar (USD) - """ - decline: Optional[Decline] = None """ If the transfer is rejected by the card network or the destination financial @@ -389,6 +716,14 @@ class CardPushTransfer(BaseModel): merchant_state: str """The state of the merchant (generally your business) sending the transfer.""" + presentment_amount: PresentmentAmount + """The amount that was transferred. + + The receiving bank will have converted this to the cardholder's currency. The + amount that is applied to your Increase account matches the currency of your + account. + """ + recipient_name: str """The name of the funds recipient.""" diff --git a/src/increase/types/card_push_transfer_create_params.py b/src/increase/types/card_push_transfer_create_params.py index 9fae1c4e9..d3b9d7f34 100644 --- a/src/increase/types/card_push_transfer_create_params.py +++ b/src/increase/types/card_push_transfer_create_params.py @@ -4,13 +4,10 @@ from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardPushTransferCreateParams"] +__all__ = ["CardPushTransferCreateParams", "PresentmentAmount"] class CardPushTransferCreateParams(TypedDict, total=False): - amount: Required[int] - """The transfer amount in USD cents. For Card Push transfers, must be positive.""" - business_application_identifier: Required[ Literal[ "account_to_account", @@ -86,6 +83,13 @@ class CardPushTransferCreateParams(TypedDict, total=False): merchant_state: Required[str] """The state of the merchant (generally your business) sending the transfer.""" + presentment_amount: Required[PresentmentAmount] + """The amount to transfer. + + The receiving bank will convert this to the cardholder's currency. The amount + that is applied to your Increase account matches the currency of your account. + """ + recipient_name: Required[str] """The name of the funds recipient.""" @@ -109,3 +113,343 @@ class CardPushTransferCreateParams(TypedDict, total=False): require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" + + +class PresentmentAmount(TypedDict, total=False): + currency: Required[ + Literal[ + "AFN", + "EUR", + "ALL", + "DZD", + "USD", + "AOA", + "ARS", + "AMD", + "AWG", + "AUD", + "AZN", + "BSD", + "BHD", + "BDT", + "BBD", + "BYN", + "BZD", + "BMD", + "INR", + "BTN", + "BOB", + "BOV", + "BAM", + "BWP", + "NOK", + "BRL", + "BND", + "BGN", + "BIF", + "CVE", + "KHR", + "CAD", + "KYD", + "CLP", + "CLF", + "CNY", + "COP", + "COU", + "KMF", + "CDF", + "NZD", + "CRC", + "CUP", + "CZK", + "DKK", + "DJF", + "DOP", + "EGP", + "SVC", + "ERN", + "SZL", + "ETB", + "FKP", + "FJD", + "GMD", + "GEL", + "GHS", + "GIP", + "GTQ", + "GBP", + "GNF", + "GYD", + "HTG", + "HNL", + "HKD", + "HUF", + "ISK", + "IDR", + "IRR", + "IQD", + "ILS", + "JMD", + "JPY", + "JOD", + "KZT", + "KES", + "KPW", + "KRW", + "KWD", + "KGS", + "LAK", + "LBP", + "LSL", + "ZAR", + "LRD", + "LYD", + "CHF", + "MOP", + "MKD", + "MGA", + "MWK", + "MYR", + "MVR", + "MRU", + "MUR", + "MXN", + "MXV", + "MDL", + "MNT", + "MAD", + "MZN", + "MMK", + "NAD", + "NPR", + "NIO", + "NGN", + "OMR", + "PKR", + "PAB", + "PGK", + "PYG", + "PEN", + "PHP", + "PLN", + "QAR", + "RON", + "RUB", + "RWF", + "SHP", + "WST", + "STN", + "SAR", + "RSD", + "SCR", + "SLE", + "SGD", + "SBD", + "SOS", + "SSP", + "LKR", + "SDG", + "SRD", + "SEK", + "CHE", + "CHW", + "SYP", + "TWD", + "TJS", + "TZS", + "THB", + "TOP", + "TTD", + "TND", + "TRY", + "TMT", + "UGX", + "UAH", + "AED", + "USN", + "UYU", + "UYI", + "UYW", + "UZS", + "VUV", + "VES", + "VED", + "VND", + "YER", + "ZMW", + "ZWG", + ] + ] + """The ISO 4217 currency code representing the currency of the amount. + + - `AFN` - AFN + - `EUR` - EUR + - `ALL` - ALL + - `DZD` - DZD + - `USD` - USD + - `AOA` - AOA + - `ARS` - ARS + - `AMD` - AMD + - `AWG` - AWG + - `AUD` - AUD + - `AZN` - AZN + - `BSD` - BSD + - `BHD` - BHD + - `BDT` - BDT + - `BBD` - BBD + - `BYN` - BYN + - `BZD` - BZD + - `BMD` - BMD + - `INR` - INR + - `BTN` - BTN + - `BOB` - BOB + - `BOV` - BOV + - `BAM` - BAM + - `BWP` - BWP + - `NOK` - NOK + - `BRL` - BRL + - `BND` - BND + - `BGN` - BGN + - `BIF` - BIF + - `CVE` - CVE + - `KHR` - KHR + - `CAD` - CAD + - `KYD` - KYD + - `CLP` - CLP + - `CLF` - CLF + - `CNY` - CNY + - `COP` - COP + - `COU` - COU + - `KMF` - KMF + - `CDF` - CDF + - `NZD` - NZD + - `CRC` - CRC + - `CUP` - CUP + - `CZK` - CZK + - `DKK` - DKK + - `DJF` - DJF + - `DOP` - DOP + - `EGP` - EGP + - `SVC` - SVC + - `ERN` - ERN + - `SZL` - SZL + - `ETB` - ETB + - `FKP` - FKP + - `FJD` - FJD + - `GMD` - GMD + - `GEL` - GEL + - `GHS` - GHS + - `GIP` - GIP + - `GTQ` - GTQ + - `GBP` - GBP + - `GNF` - GNF + - `GYD` - GYD + - `HTG` - HTG + - `HNL` - HNL + - `HKD` - HKD + - `HUF` - HUF + - `ISK` - ISK + - `IDR` - IDR + - `IRR` - IRR + - `IQD` - IQD + - `ILS` - ILS + - `JMD` - JMD + - `JPY` - JPY + - `JOD` - JOD + - `KZT` - KZT + - `KES` - KES + - `KPW` - KPW + - `KRW` - KRW + - `KWD` - KWD + - `KGS` - KGS + - `LAK` - LAK + - `LBP` - LBP + - `LSL` - LSL + - `ZAR` - ZAR + - `LRD` - LRD + - `LYD` - LYD + - `CHF` - CHF + - `MOP` - MOP + - `MKD` - MKD + - `MGA` - MGA + - `MWK` - MWK + - `MYR` - MYR + - `MVR` - MVR + - `MRU` - MRU + - `MUR` - MUR + - `MXN` - MXN + - `MXV` - MXV + - `MDL` - MDL + - `MNT` - MNT + - `MAD` - MAD + - `MZN` - MZN + - `MMK` - MMK + - `NAD` - NAD + - `NPR` - NPR + - `NIO` - NIO + - `NGN` - NGN + - `OMR` - OMR + - `PKR` - PKR + - `PAB` - PAB + - `PGK` - PGK + - `PYG` - PYG + - `PEN` - PEN + - `PHP` - PHP + - `PLN` - PLN + - `QAR` - QAR + - `RON` - RON + - `RUB` - RUB + - `RWF` - RWF + - `SHP` - SHP + - `WST` - WST + - `STN` - STN + - `SAR` - SAR + - `RSD` - RSD + - `SCR` - SCR + - `SLE` - SLE + - `SGD` - SGD + - `SBD` - SBD + - `SOS` - SOS + - `SSP` - SSP + - `LKR` - LKR + - `SDG` - SDG + - `SRD` - SRD + - `SEK` - SEK + - `CHE` - CHE + - `CHW` - CHW + - `SYP` - SYP + - `TWD` - TWD + - `TJS` - TJS + - `TZS` - TZS + - `THB` - THB + - `TOP` - TOP + - `TTD` - TTD + - `TND` - TND + - `TRY` - TRY + - `TMT` - TMT + - `UGX` - UGX + - `UAH` - UAH + - `AED` - AED + - `USN` - USN + - `UYU` - UYU + - `UYI` - UYI + - `UYW` - UYW + - `UZS` - UZS + - `VUV` - VUV + - `VES` - VES + - `VED` - VED + - `VND` - VND + - `YER` - YER + - `ZMW` - ZMW + - `ZWG` - ZWG + """ + + value: Required[str] + """The amount value as a decimal string in the currency's major unit. + + For example, for USD, '1234.56' represents 1234 dollars and 56 cents. For JPY, + '1234' represents 1234 yen. A currency with minor units requires at least one + decimal place and supports up to the number of decimal places defined by the + currency's minor units. A currency without minor units does not support any + decimal places. + """ diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 27672f96f..d3a0b993e 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1187,7 +1187,7 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardPushTransferAcceptance(BaseModel): - amount: int + settlement_amount: int """The transfer amount in USD cents.""" transfer_id: str diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py index 00d3b545e..c12a8d0d5 100644 --- a/tests/api_resources/test_card_push_transfers.py +++ b/tests/api_resources/test_card_push_transfers.py @@ -22,7 +22,6 @@ class TestCardPushTransfers: @parametrize def test_method_create(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -31,6 +30,10 @@ def test_method_create(self, client: Increase) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -44,7 +47,6 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -53,6 +55,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -67,7 +73,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.card_push_transfers.with_raw_response.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -76,6 +81,10 @@ def test_raw_response_create(self, client: Increase) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -93,7 +102,6 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.card_push_transfers.with_streaming_response.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -102,6 +110,10 @@ def test_streaming_response_create(self, client: Increase) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -283,7 +295,6 @@ class TestAsyncCardPushTransfers: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -292,6 +303,10 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -305,7 +320,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -314,6 +328,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -328,7 +346,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.card_push_transfers.with_raw_response.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -337,6 +354,10 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", @@ -354,7 +375,6 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.card_push_transfers.with_streaming_response.create( - amount=100, business_application_identifier="funds_disbursement", card_token_id="outbound_card_token_zlt0ml6youq3q7vcdlg0", merchant_category_code="1234", @@ -363,6 +383,10 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N merchant_name_prefix="Acme", merchant_postal_code="10045", merchant_state="NY", + presentment_amount={ + "currency": "USD", + "value": "1234.56", + }, recipient_name="Ian Crease", sender_address_city="New York", sender_address_line1="33 Liberty Street", From cb7bc479b045909880b69765b65fd7945918f120 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 18 Nov 2025 22:30:31 +0000 Subject: [PATCH 1010/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 02bfb399e..842d1edb2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.395.0" + ".": "0.396.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bc24d4e8a..90459df1b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.395.0" +version = "0.396.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ceca6b6b4..857ee8cbe 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.395.0" # x-release-please-version +__version__ = "0.396.0" # x-release-please-version From 57e017f76910e834cc60715c8c10cf95aaa7cac8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 19 Nov 2025 01:43:34 +0000 Subject: [PATCH 1011/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 973bfab07..bc38a1bc0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fadbd087449a336a91be2645c64e2fe1e81e0f52d9810ab5f830af7e1c727138.yml -openapi_spec_hash: 7e44d91e713fb44925a3565b882248d7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fa7f1c130db072a3fd9444e369ddd66b343a2eea05410569cd703e59cf510ecc.yml +openapi_spec_hash: ae67858752ea4652bc009a4b617c5dcd config_hash: ca1425272e17fa23d4466d33492334fa From fe6a0b7784a0e58fb00900e79c7355c8b52a3163 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:18:04 +0000 Subject: [PATCH 1012/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer_create_params.py | 6 ++++++ tests/api_resources/test_check_transfers.py | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bc38a1bc0..d979adc25 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fa7f1c130db072a3fd9444e369ddd66b343a2eea05410569cd703e59cf510ecc.yml -openapi_spec_hash: ae67858752ea4652bc009a4b617c5dcd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3ef3456ba39c18b7b1228fd167c74b4d344057e133ef4abd3e130471b9e19ed3.yml +openapi_spec_hash: a55adf2eae6cbe811937dd7b0691939e config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 8a720d2b9..a5c16e971 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -103,6 +103,12 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): line2: str """The second line of the address component of the check's destination address.""" + name: str + """The name component of the check's destination address. + + Defaults to the provided `recipient_name` parameter if `name` is not provided. + """ + class PhysicalCheckPayer(TypedDict, total=False): contents: Required[str] diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index d91986089..d697cc169 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -47,6 +47,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "postal_code": "10045", "state": "NY", "line2": "x", + "name": "Ian Crease", }, "memo": "Check payment", "recipient_name": "Ian Crease", @@ -334,6 +335,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "postal_code": "10045", "state": "NY", "line2": "x", + "name": "Ian Crease", }, "memo": "Check payment", "recipient_name": "Ian Crease", From 1362cc0dd425776ecd2964d1bf162c4a2f138701 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 20 Nov 2025 23:20:58 +0000 Subject: [PATCH 1013/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 842d1edb2..2f62033bd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.396.0" + ".": "0.397.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 90459df1b..2f210b00f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.396.0" +version = "0.397.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 857ee8cbe..6ebab217e 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.396.0" # x-release-please-version +__version__ = "0.397.0" # x-release-please-version From 883f7f17f805ebf50d85b779d947a8560d06e0c9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 06:13:05 +0000 Subject: [PATCH 1014/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 6 ++++++ src/increase/types/check_transfer_create_params.py | 7 +++++++ tests/api_resources/test_check_transfers.py | 2 ++ 4 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d979adc25..75b8da62e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3ef3456ba39c18b7b1228fd167c74b4d344057e133ef4abd3e130471b9e19ed3.yml -openapi_spec_hash: a55adf2eae6cbe811937dd7b0691939e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cea252dc0453b92916edc9d8fc79e120d049068b86fb4a554e91709483a5f97f.yml +openapi_spec_hash: 7d34811e865a82a1ce2117d75a04d3ac config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 343f316ca..d1ff468da 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -123,6 +123,12 @@ class PhysicalCheckMailingAddress(BaseModel): name: Optional[str] = None """The name component of the check's mailing address.""" + phone: Optional[str] = None + """ + The phone number to be used in case of delivery issues at the check's mailing + address. Only used for FedEx overnight shipping. + """ + postal_code: Optional[str] = None """The postal code of the check's destination.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index a5c16e971..3d391b4c7 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -109,6 +109,13 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): Defaults to the provided `recipient_name` parameter if `name` is not provided. """ + phone: str + """The phone number to associate with the check's destination address. + + Will be supplied to FedEx as the contact phone number for the recipient to be + used in case of delivery issues. + """ + class PhysicalCheckPayer(TypedDict, total=False): contents: Required[str] diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index d697cc169..cf5d328ef 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -48,6 +48,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "state": "NY", "line2": "x", "name": "Ian Crease", + "phone": "+16505046304", }, "memo": "Check payment", "recipient_name": "Ian Crease", @@ -336,6 +337,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "state": "NY", "line2": "x", "name": "Ian Crease", + "phone": "+16505046304", }, "memo": "Check payment", "recipient_name": "Ian Crease", From 801c0244f6375c88700f8a835cdb2cef4b958a92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 06:15:59 +0000 Subject: [PATCH 1015/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2f62033bd..f7ef15b5d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.397.0" + ".": "0.398.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2f210b00f..691fcde53 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.397.0" +version = "0.398.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6ebab217e..37c8e725b 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.397.0" # x-release-please-version +__version__ = "0.398.0" # x-release-please-version From 867d6edef52faa7e1d00fdb9ddd8565afdaad772 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 07:21:52 +0000 Subject: [PATCH 1016/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer_create_params.py | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 75b8da62e..ea9c085bf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cea252dc0453b92916edc9d8fc79e120d049068b86fb4a554e91709483a5f97f.yml -openapi_spec_hash: 7d34811e865a82a1ce2117d75a04d3ac +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfdb6b2516039e7537ec6edb67df5581e3f08396a9f92579dd42c565015583e6.yml +openapi_spec_hash: c41230e467198f4240e80c77ef8c5c7c config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 3d391b4c7..009a5ee4b 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -112,8 +112,9 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): phone: str """The phone number to associate with the check's destination address. - Will be supplied to FedEx as the contact phone number for the recipient to be - used in case of delivery issues. + Only used if shipping method is `fedex_overnight`. Will be supplied to FedEx as + the contact phone number for the recipient to be used in case of delivery + issues. """ From c303f4e86b43f6fc57378efa2802251c3fad0277 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 07:24:38 +0000 Subject: [PATCH 1017/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f7ef15b5d..a13afdac9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.398.0" + ".": "0.399.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 691fcde53..c031900f5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.398.0" +version = "0.399.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 37c8e725b..f2b74cd4c 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.398.0" # x-release-please-version +__version__ = "0.399.0" # x-release-please-version From 7731130e3fe0a05c34da9f8ae28558d8e4cffb5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 21 Nov 2025 16:54:59 +0000 Subject: [PATCH 1018/1325] chore: add Python 3.14 classifier and testing --- pyproject.toml | 1 + 1 file changed, 1 insertion(+) diff --git a/pyproject.toml b/pyproject.toml index c031900f5..9dbe43465 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -24,6 +24,7 @@ classifiers = [ "Programming Language :: Python :: 3.11", "Programming Language :: Python :: 3.12", "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Operating System :: OS Independent", "Operating System :: POSIX", "Operating System :: MacOS", From b8f83070254666853b7673947b4a898dd9b27318 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 20:47:42 +0000 Subject: [PATCH 1019/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/real_time_decision.py | 25 ++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index ea9c085bf..94f44024d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfdb6b2516039e7537ec6edb67df5581e3f08396a9f92579dd42c565015583e6.yml -openapi_spec_hash: c41230e467198f4240e80c77ef8c5c7c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a66f039751a4ffdebbbf533f24f55cd2c42708b9cf105512849849fddaafb5e8.yml +openapi_spec_hash: c265609bceb053f898ea14b1191fe927 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index ff3897655..3de77429d 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -275,8 +275,29 @@ class CardAuthorizationAdditionalAmounts(BaseModel): class CardAuthorizationDecline(BaseModel): - reason: str - """The reason the authorization was declined.""" + reason: Literal[ + "insufficient_funds", + "transaction_never_allowed", + "exceeds_approval_limit", + "card_temporarily_disabled", + "suspected_fraud", + "other", + ] + """The reason the authorization was declined. + + - `insufficient_funds` - The cardholder does not have sufficient funds to cover + the transaction. The merchant may attempt to process the transaction again. + - `transaction_never_allowed` - This type of transaction is not allowed for this + card. This transaction should not be retried. + - `exceeds_approval_limit` - The transaction amount exceeds the cardholder's + approval limit. The merchant may attempt to process the transaction again. + - `card_temporarily_disabled` - The card has been temporarily disabled or not + yet activated. The merchant may attempt to process the transaction again. + - `suspected_fraud` - The transaction is suspected to be fraudulent. The + merchant may attempt to process the transaction again. + - `other` - The transaction was declined for another reason. The merchant may + attempt to process the transaction again. This should be used sparingly. + """ class CardAuthorizationNetworkDetailsPulse(BaseModel): From 5c89a707ae6bcae1bd3442fe604659e5fc6f80fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 20:50:38 +0000 Subject: [PATCH 1020/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a13afdac9..88948f352 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.399.0" + ".": "0.400.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 9dbe43465..b0a15666b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.399.0" +version = "0.400.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f2b74cd4c..91aeef797 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.399.0" # x-release-please-version +__version__ = "0.400.0" # x-release-please-version From c26ea95bc487b924c3a4ead165c6848c4c902597 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 22:21:39 +0000 Subject: [PATCH 1021/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 8 ++++++++ src/increase/types/check_transfer.py | 3 +++ src/increase/types/check_transfer_create_params.py | 8 ++++++++ src/increase/types/file.py | 4 ++++ src/increase/types/file_create_params.py | 4 ++++ src/increase/types/file_list_params.py | 1 + tests/api_resources/test_check_transfers.py | 2 ++ 8 files changed, 32 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 94f44024d..b52e8c7d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a66f039751a4ffdebbbf533f24f55cd2c42708b9cf105512849849fddaafb5e8.yml -openapi_spec_hash: c265609bceb053f898ea14b1191fe927 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml +openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 4c71d0894..8e0880de1 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -55,6 +55,7 @@ def create( "check_image_back", "mailed_check_image", "check_attachment", + "check_voucher_image", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -97,6 +98,9 @@ def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_voucher_image` - An image to be used as the check voucher image, which + is printed in the middle of the trifold area of a check. This must be a + 2550x1100 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan @@ -283,6 +287,7 @@ async def create( "check_image_back", "mailed_check_image", "check_attachment", + "check_voucher_image", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -325,6 +330,9 @@ async def create( - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_voucher_image` - An image to be used as the check voucher image, which + is printed in the middle of the trifold area of a check. This must be a + 2550x1100 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index d1ff468da..a9dfb1c5d 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -185,6 +185,9 @@ class PhysicalCheck(BaseModel): attachment_file_id: Optional[str] = None """The ID of the file for the check attachment.""" + check_voucher_image_file_id: Optional[str] = None + """The ID of the file for the check voucher image.""" + mailing_address: PhysicalCheckMailingAddress """Details for where Increase will mail the check.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 009a5ee4b..c55b483c9 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -161,6 +161,14 @@ class PhysicalCheckTyped(TypedDict, total=False): https://increase.com/documentation/originating-checks#printing-checks . """ + check_voucher_image_file_id: str + """The ID of a File to be used as the check voucher image. + + This must have `purpose: check_voucher_image`. For details on pricing and + restrictions, see + https://increase.com/documentation/originating-checks#printing-checks . + """ + note: str """The descriptor that will be printed on the letter included with the check.""" diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 8dc3e8fb1..c50998f1d 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -50,6 +50,7 @@ class File(BaseModel): "processed_check_image_back", "mailed_check_image", "check_attachment", + "check_voucher_image", "inbound_mail_item", "form_1099_int", "form_1099_misc", @@ -90,6 +91,9 @@ class File(BaseModel): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_voucher_image` - An image to be used as the check voucher image, which + is printed in the middle of the trifold area of a check. This must be a + 2550x1100 pixel PNG. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_1099_misc` - IRS Form 1099-MISC. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index ba802de04..8677b27fc 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -25,6 +25,7 @@ class FileCreateParams(TypedDict, total=False): "check_image_back", "mailed_check_image", "check_attachment", + "check_voucher_image", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -49,6 +50,9 @@ class FileCreateParams(TypedDict, total=False): - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed with a check that you've requested Increase print. + - `check_voucher_image` - An image to be used as the check voucher image, which + is printed in the middle of the trifold area of a check. This must be a + 2550x1100 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index eb333197f..b87680357 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -72,6 +72,7 @@ class CreatedAt(TypedDict, total=False): "processed_check_image_back", "mailed_check_image", "check_attachment", + "check_voucher_image", "inbound_mail_item", "form_1099_int", "form_1099_misc", diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index cf5d328ef..43df830d1 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -53,6 +53,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "memo": "Check payment", "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", + "check_voucher_image_file_id": "check_voucher_image_file_id", "note": "x", "payer": [{"contents": "x"}], "return_address": { @@ -342,6 +343,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "memo": "Check payment", "recipient_name": "Ian Crease", "attachment_file_id": "attachment_file_id", + "check_voucher_image_file_id": "check_voucher_image_file_id", "note": "x", "payer": [{"contents": "x"}], "return_address": { From 64a05a59468ac1561d5e271ab357a08c55d293c2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 24 Nov 2025 22:24:37 +0000 Subject: [PATCH 1022/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 88948f352..f4b8c8ab5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.400.0" + ".": "0.401.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b0a15666b..19cc2e34d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.400.0" +version = "0.401.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 91aeef797..5db0e202d 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.400.0" # x-release-please-version +__version__ = "0.401.0" # x-release-please-version From d82c09477f57a72801c58ff5b488c40366f82188 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 17:58:41 +0000 Subject: [PATCH 1023/1325] feat(api): api update --- .stats.yml | 2 +- README.md | 77 ------- api.md | 209 +++++++++--------- src/increase/pagination.py | 20 +- src/increase/resources/account_numbers.py | 22 +- src/increase/resources/account_statements.py | 24 +- src/increase/resources/account_transfers.py | 22 +- src/increase/resources/accounts.py | 22 +- .../resources/ach_prenotifications.py | 22 +- src/increase/resources/ach_transfers.py | 22 +- .../resources/bookkeeping_accounts.py | 22 +- src/increase/resources/bookkeeping_entries.py | 24 +- .../resources/bookkeeping_entry_sets.py | 22 +- src/increase/resources/card_disputes.py | 22 +- src/increase/resources/card_payments.py | 24 +- .../resources/card_purchase_supplements.py | 24 +- src/increase/resources/card_push_transfers.py | 22 +- src/increase/resources/card_tokens.py | 24 +- src/increase/resources/card_validations.py | 22 +- src/increase/resources/cards.py | 22 +- src/increase/resources/check_deposits.py | 22 +- src/increase/resources/check_transfers.py | 22 +- .../resources/declined_transactions.py | 24 +- .../resources/digital_card_profiles.py | 22 +- .../resources/digital_wallet_tokens.py | 24 +- src/increase/resources/documents.py | 22 +- src/increase/resources/entities.py | 22 +- src/increase/resources/event_subscriptions.py | 22 +- src/increase/resources/events.py | 24 +- src/increase/resources/exports.py | 22 +- src/increase/resources/external_accounts.py | 22 +- src/increase/resources/fednow_transfers.py | 22 +- src/increase/resources/files.py | 22 +- .../resources/inbound_ach_transfers.py | 22 +- .../resources/inbound_check_deposits.py | 22 +- .../resources/inbound_fednow_transfers.py | 24 +- src/increase/resources/inbound_mail_items.py | 22 +- .../inbound_real_time_payments_transfers.py | 24 +- .../inbound_wire_drawdown_requests.py | 24 +- .../resources/inbound_wire_transfers.py | 22 +- .../resources/intrafi_account_enrollments.py | 22 +- src/increase/resources/intrafi_exclusions.py | 22 +- src/increase/resources/lockboxes.py | 22 +- src/increase/resources/oauth_applications.py | 24 +- src/increase/resources/oauth_connections.py | 24 +- .../resources/pending_transactions.py | 22 +- .../resources/physical_card_profiles.py | 22 +- src/increase/resources/physical_cards.py | 22 +- src/increase/resources/programs.py | 24 +- .../resources/real_time_payments_transfers.py | 22 +- src/increase/resources/routing_numbers.py | 23 +- .../resources/supplemental_documents.py | 22 +- src/increase/resources/transactions.py | 24 +- .../resources/wire_drawdown_requests.py | 22 +- src/increase/resources/wire_transfers.py | 22 +- src/increase/types/__init__.py | 62 ++++++ src/increase/types/account_list_response.py | 30 +++ .../types/account_number_list_response.py | 30 +++ .../types/account_statement_list_response.py | 30 +++ .../types/account_transfer_list_response.py | 30 +++ .../ach_prenotification_list_response.py | 30 +++ .../types/ach_transfer_list_response.py | 30 +++ .../bookkeeping_account_list_response.py | 30 +++ .../types/bookkeeping_entry_list_response.py | 30 +++ .../bookkeeping_entry_set_list_response.py | 30 +++ .../types/card_dispute_list_response.py | 30 +++ src/increase/types/card_list_response.py | 30 +++ .../types/card_payment_list_response.py | 30 +++ .../card_purchase_supplement_list_response.py | 30 +++ .../types/card_push_transfer_list_response.py | 30 +++ .../types/card_token_list_response.py | 30 +++ .../types/card_validation_list_response.py | 30 +++ .../types/check_deposit_list_response.py | 30 +++ .../types/check_transfer_list_response.py | 30 +++ .../declined_transaction_list_response.py | 30 +++ .../digital_card_profile_list_response.py | 30 +++ .../digital_wallet_token_list_response.py | 30 +++ src/increase/types/document_list_response.py | 30 +++ src/increase/types/entity_list_response.py | 30 +++ src/increase/types/event_list_response.py | 30 +++ .../types/event_subscription_list_response.py | 30 +++ src/increase/types/export_list_response.py | 30 +++ .../types/external_account_list_response.py | 30 +++ .../types/fednow_transfer_list_response.py | 30 +++ src/increase/types/file_list_response.py | 30 +++ .../inbound_ach_transfer_list_response.py | 30 +++ .../inbound_check_deposit_list_response.py | 30 +++ .../inbound_fednow_transfer_list_response.py | 30 +++ .../types/inbound_mail_item_list_response.py | 30 +++ ...al_time_payments_transfer_list_response.py | 30 +++ ...und_wire_drawdown_request_list_response.py | 30 +++ .../inbound_wire_transfer_list_response.py | 30 +++ ...ntrafi_account_enrollment_list_response.py | 30 +++ .../types/intrafi_exclusion_list_response.py | 30 +++ src/increase/types/lockbox_list_response.py | 30 +++ .../types/oauth_application_list_response.py | 30 +++ .../types/oauth_connection_list_response.py | 30 +++ .../pending_transaction_list_response.py | 30 +++ .../types/physical_card_list_response.py | 30 +++ .../physical_card_profile_list_response.py | 30 +++ src/increase/types/program_list_response.py | 30 +++ ...al_time_payments_transfer_list_response.py | 30 +++ .../types/routing_number_list_response.py | 27 ++- .../supplemental_document_list_response.py | 30 +++ .../types/transaction_list_response.py | 30 +++ .../wire_drawdown_request_list_response.py | 30 +++ .../types/wire_transfer_list_response.py | 30 +++ tests/api_resources/test_account_numbers.py | 18 +- .../api_resources/test_account_statements.py | 19 +- tests/api_resources/test_account_transfers.py | 22 +- tests/api_resources/test_accounts.py | 18 +- .../test_ach_prenotifications.py | 22 +- tests/api_resources/test_ach_transfers.py | 19 +- .../test_bookkeeping_accounts.py | 18 +- .../api_resources/test_bookkeeping_entries.py | 19 +- .../test_bookkeeping_entry_sets.py | 22 +- tests/api_resources/test_card_disputes.py | 18 +- tests/api_resources/test_card_payments.py | 19 +- .../test_card_purchase_supplements.py | 22 +- .../api_resources/test_card_push_transfers.py | 22 +- tests/api_resources/test_card_tokens.py | 19 +- tests/api_resources/test_card_validations.py | 22 +- tests/api_resources/test_cards.py | 18 +- tests/api_resources/test_check_deposits.py | 22 +- tests/api_resources/test_check_transfers.py | 18 +- .../test_declined_transactions.py | 19 +- .../test_digital_card_profiles.py | 18 +- .../test_digital_wallet_tokens.py | 19 +- tests/api_resources/test_documents.py | 19 +- tests/api_resources/test_entities.py | 18 +- .../api_resources/test_event_subscriptions.py | 18 +- tests/api_resources/test_events.py | 19 +- tests/api_resources/test_exports.py | 19 +- tests/api_resources/test_external_accounts.py | 18 +- tests/api_resources/test_fednow_transfers.py | 22 +- tests/api_resources/test_files.py | 19 +- .../test_inbound_ach_transfers.py | 18 +- .../test_inbound_check_deposits.py | 22 +- .../test_inbound_fednow_transfers.py | 19 +- .../api_resources/test_inbound_mail_items.py | 22 +- ...st_inbound_real_time_payments_transfers.py | 22 +- .../test_inbound_wire_drawdown_requests.py | 26 ++- .../test_inbound_wire_transfers.py | 22 +- .../test_intrafi_account_enrollments.py | 18 +- .../api_resources/test_intrafi_exclusions.py | 22 +- tests/api_resources/test_lockboxes.py | 22 +- .../api_resources/test_oauth_applications.py | 19 +- tests/api_resources/test_oauth_connections.py | 19 +- .../test_pending_transactions.py | 22 +- .../test_physical_card_profiles.py | 18 +- tests/api_resources/test_physical_cards.py | 18 +- tests/api_resources/test_programs.py | 19 +- .../test_real_time_payments_transfers.py | 18 +- tests/api_resources/test_routing_numbers.py | 17 +- .../test_supplemental_documents.py | 18 +- tests/api_resources/test_transactions.py | 19 +- .../test_wire_drawdown_requests.py | 22 +- tests/api_resources/test_wire_transfers.py | 22 +- 158 files changed, 2745 insertions(+), 1314 deletions(-) create mode 100644 src/increase/types/account_list_response.py create mode 100644 src/increase/types/account_number_list_response.py create mode 100644 src/increase/types/account_statement_list_response.py create mode 100644 src/increase/types/account_transfer_list_response.py create mode 100644 src/increase/types/ach_prenotification_list_response.py create mode 100644 src/increase/types/ach_transfer_list_response.py create mode 100644 src/increase/types/bookkeeping_account_list_response.py create mode 100644 src/increase/types/bookkeeping_entry_list_response.py create mode 100644 src/increase/types/bookkeeping_entry_set_list_response.py create mode 100644 src/increase/types/card_dispute_list_response.py create mode 100644 src/increase/types/card_list_response.py create mode 100644 src/increase/types/card_payment_list_response.py create mode 100644 src/increase/types/card_purchase_supplement_list_response.py create mode 100644 src/increase/types/card_push_transfer_list_response.py create mode 100644 src/increase/types/card_token_list_response.py create mode 100644 src/increase/types/card_validation_list_response.py create mode 100644 src/increase/types/check_deposit_list_response.py create mode 100644 src/increase/types/check_transfer_list_response.py create mode 100644 src/increase/types/declined_transaction_list_response.py create mode 100644 src/increase/types/digital_card_profile_list_response.py create mode 100644 src/increase/types/digital_wallet_token_list_response.py create mode 100644 src/increase/types/document_list_response.py create mode 100644 src/increase/types/entity_list_response.py create mode 100644 src/increase/types/event_list_response.py create mode 100644 src/increase/types/event_subscription_list_response.py create mode 100644 src/increase/types/export_list_response.py create mode 100644 src/increase/types/external_account_list_response.py create mode 100644 src/increase/types/fednow_transfer_list_response.py create mode 100644 src/increase/types/file_list_response.py create mode 100644 src/increase/types/inbound_ach_transfer_list_response.py create mode 100644 src/increase/types/inbound_check_deposit_list_response.py create mode 100644 src/increase/types/inbound_fednow_transfer_list_response.py create mode 100644 src/increase/types/inbound_mail_item_list_response.py create mode 100644 src/increase/types/inbound_real_time_payments_transfer_list_response.py create mode 100644 src/increase/types/inbound_wire_drawdown_request_list_response.py create mode 100644 src/increase/types/inbound_wire_transfer_list_response.py create mode 100644 src/increase/types/intrafi_account_enrollment_list_response.py create mode 100644 src/increase/types/intrafi_exclusion_list_response.py create mode 100644 src/increase/types/lockbox_list_response.py create mode 100644 src/increase/types/oauth_application_list_response.py create mode 100644 src/increase/types/oauth_connection_list_response.py create mode 100644 src/increase/types/pending_transaction_list_response.py create mode 100644 src/increase/types/physical_card_list_response.py create mode 100644 src/increase/types/physical_card_profile_list_response.py create mode 100644 src/increase/types/program_list_response.py create mode 100644 src/increase/types/real_time_payments_transfer_list_response.py create mode 100644 src/increase/types/supplemental_document_list_response.py create mode 100644 src/increase/types/transaction_list_response.py create mode 100644 src/increase/types/wire_drawdown_request_list_response.py create mode 100644 src/increase/types/wire_transfer_list_response.py diff --git a/.stats.yml b/.stats.yml index b52e8c7d7..fa77aa9b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5 -config_hash: ca1425272e17fa23d4466d33492334fa +config_hash: eecc5886c26d07c167f37f30ae505a2c diff --git a/README.md b/README.md index 6eb749f5f..d3a91b9c1 100644 --- a/README.md +++ b/README.md @@ -34,8 +34,6 @@ client = Increase( account = client.accounts.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) ``` @@ -64,8 +62,6 @@ client = AsyncIncrease( async def main() -> None: account = await client.accounts.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) @@ -101,8 +97,6 @@ async def main() -> None: ) as client: account = await client.accounts.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) @@ -119,69 +113,6 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. -## Pagination - -List methods in the Increase API are paginated. - -This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: - -```python -from increase import Increase - -client = Increase() - -all_accounts = [] -# Automatically fetches more pages as needed. -for account in client.accounts.list(): - # Do something with account here - all_accounts.append(account) -print(all_accounts) -``` - -Or, asynchronously: - -```python -import asyncio -from increase import AsyncIncrease - -client = AsyncIncrease() - - -async def main() -> None: - all_accounts = [] - # Iterate through items across all pages, issuing requests as needed. - async for account in client.accounts.list(): - all_accounts.append(account) - print(all_accounts) - - -asyncio.run(main()) -``` - -Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: - -```python -first_page = await client.accounts.list() -if first_page.has_next_page(): - print(f"will fetch next page using these details: {first_page.next_page_info()}") - next_page = await first_page.get_next_page() - print(f"number of items we just fetched: {len(next_page.data)}") - -# Remove `await` for non-async usage. -``` - -Or just work directly with the returned data: - -```python -first_page = await client.accounts.list() - -print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." -for account in first_page.data: - print(account.id) - -# Remove `await` for non-async usage. -``` - ## Nested params Nested parameters are dictionaries, typed using `TypedDict`, for example: @@ -278,8 +209,6 @@ client = Increase( # Or, configure per-request: client.with_options(max_retries=5).accounts.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -305,8 +234,6 @@ client = Increase( # Override per-request: client.with_options(timeout=5.0).accounts.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -350,8 +277,6 @@ from increase import Increase client = Increase() response = client.accounts.with_raw_response.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) print(response.headers.get('X-My-Header')) @@ -372,8 +297,6 @@ To stream the response body, use `.with_streaming_response` instead, which requi ```python with client.accounts.with_streaming_response.create( name="New Account!", - entity_id="entity_n8y8tnk2p9339ti393yi", - program_id="program_i2v2os4mwza1oetokh9i", ) as response: print(response.headers.get("X-My-Header")) diff --git a/api.md b/api.md index 6ef71b9b2..602ba91c9 100644 --- a/api.md +++ b/api.md @@ -3,7 +3,7 @@ Types: ```python -from increase.types import Account, BalanceLookup +from increase.types import Account, BalanceLookup, AccountListResponse ``` Methods: @@ -11,7 +11,7 @@ Methods: - client.accounts.create(\*\*params) -> Account - client.accounts.retrieve(account_id) -> Account - client.accounts.update(account_id, \*\*params) -> Account -- client.accounts.list(\*\*params) -> SyncPage[Account] +- client.accounts.list(\*\*params) -> AccountListResponse - client.accounts.balance(account_id, \*\*params) -> BalanceLookup - client.accounts.close(account_id) -> Account @@ -20,7 +20,7 @@ Methods: Types: ```python -from increase.types import AccountNumber +from increase.types import AccountNumber, AccountNumberListResponse ``` Methods: @@ -28,21 +28,21 @@ Methods: - client.account_numbers.create(\*\*params) -> AccountNumber - client.account_numbers.retrieve(account_number_id) -> AccountNumber - client.account_numbers.update(account_number_id, \*\*params) -> AccountNumber -- client.account_numbers.list(\*\*params) -> SyncPage[AccountNumber] +- client.account_numbers.list(\*\*params) -> AccountNumberListResponse # AccountTransfers Types: ```python -from increase.types import AccountTransfer +from increase.types import AccountTransfer, AccountTransferListResponse ``` Methods: - client.account_transfers.create(\*\*params) -> AccountTransfer - client.account_transfers.retrieve(account_transfer_id) -> AccountTransfer -- client.account_transfers.list(\*\*params) -> SyncPage[AccountTransfer] +- client.account_transfers.list(\*\*params) -> AccountTransferListResponse - client.account_transfers.approve(account_transfer_id) -> AccountTransfer - client.account_transfers.cancel(account_transfer_id) -> AccountTransfer @@ -51,7 +51,7 @@ Methods: Types: ```python -from increase.types import Card, CardDetails, CardIframeURL +from increase.types import Card, CardDetails, CardIframeURL, CardListResponse ``` Methods: @@ -59,7 +59,7 @@ Methods: - client.cards.create(\*\*params) -> Card - client.cards.retrieve(card_id) -> Card - client.cards.update(card_id, \*\*params) -> Card -- client.cards.list(\*\*params) -> SyncPage[Card] +- client.cards.list(\*\*params) -> CardListResponse - client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL - client.cards.details(card_id) -> CardDetails - client.cards.update_pin(card_id, \*\*params) -> CardDetails @@ -69,40 +69,40 @@ Methods: Types: ```python -from increase.types import CardPayment +from increase.types import CardPayment, CardPaymentListResponse ``` Methods: - client.card_payments.retrieve(card_payment_id) -> CardPayment -- client.card_payments.list(\*\*params) -> SyncPage[CardPayment] +- client.card_payments.list(\*\*params) -> CardPaymentListResponse # CardPurchaseSupplements Types: ```python -from increase.types import CardPurchaseSupplement +from increase.types import CardPurchaseSupplement, CardPurchaseSupplementListResponse ``` Methods: - client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement -- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] +- client.card_purchase_supplements.list(\*\*params) -> CardPurchaseSupplementListResponse # CardDisputes Types: ```python -from increase.types import CardDispute +from increase.types import CardDispute, CardDisputeListResponse ``` Methods: - client.card_disputes.create(\*\*params) -> CardDispute - client.card_disputes.retrieve(card_dispute_id) -> CardDispute -- client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] +- client.card_disputes.list(\*\*params) -> CardDisputeListResponse - client.card_disputes.submit_user_submission(card_dispute_id, \*\*params) -> CardDispute - client.card_disputes.withdraw(card_dispute_id) -> CardDispute @@ -111,7 +111,7 @@ Methods: Types: ```python -from increase.types import PhysicalCard +from increase.types import PhysicalCard, PhysicalCardListResponse ``` Methods: @@ -119,21 +119,21 @@ Methods: - client.physical_cards.create(\*\*params) -> PhysicalCard - client.physical_cards.retrieve(physical_card_id) -> PhysicalCard - client.physical_cards.update(physical_card_id, \*\*params) -> PhysicalCard -- client.physical_cards.list(\*\*params) -> SyncPage[PhysicalCard] +- client.physical_cards.list(\*\*params) -> PhysicalCardListResponse # DigitalCardProfiles Types: ```python -from increase.types import DigitalCardProfile +from increase.types import DigitalCardProfile, DigitalCardProfileListResponse ``` Methods: - client.digital_card_profiles.create(\*\*params) -> DigitalCardProfile - client.digital_card_profiles.retrieve(digital_card_profile_id) -> DigitalCardProfile -- client.digital_card_profiles.list(\*\*params) -> SyncPage[DigitalCardProfile] +- client.digital_card_profiles.list(\*\*params) -> DigitalCardProfileListResponse - client.digital_card_profiles.archive(digital_card_profile_id) -> DigitalCardProfile - client.digital_card_profiles.clone(digital_card_profile_id, \*\*params) -> DigitalCardProfile @@ -142,14 +142,14 @@ Methods: Types: ```python -from increase.types import PhysicalCardProfile +from increase.types import PhysicalCardProfile, PhysicalCardProfileListResponse ``` Methods: - client.physical_card_profiles.create(\*\*params) -> PhysicalCardProfile - client.physical_card_profiles.retrieve(physical_card_profile_id) -> PhysicalCardProfile -- client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] +- client.physical_card_profiles.list(\*\*params) -> PhysicalCardProfileListResponse - client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile - client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile @@ -158,40 +158,40 @@ Methods: Types: ```python -from increase.types import DigitalWalletToken +from increase.types import DigitalWalletToken, DigitalWalletTokenListResponse ``` Methods: - client.digital_wallet_tokens.retrieve(digital_wallet_token_id) -> DigitalWalletToken -- client.digital_wallet_tokens.list(\*\*params) -> SyncPage[DigitalWalletToken] +- client.digital_wallet_tokens.list(\*\*params) -> DigitalWalletTokenListResponse # Transactions Types: ```python -from increase.types import Transaction +from increase.types import Transaction, TransactionListResponse ``` Methods: - client.transactions.retrieve(transaction_id) -> Transaction -- client.transactions.list(\*\*params) -> SyncPage[Transaction] +- client.transactions.list(\*\*params) -> TransactionListResponse # PendingTransactions Types: ```python -from increase.types import PendingTransaction +from increase.types import PendingTransaction, PendingTransactionListResponse ``` Methods: - client.pending_transactions.create(\*\*params) -> PendingTransaction - client.pending_transactions.retrieve(pending_transaction_id) -> PendingTransaction -- client.pending_transactions.list(\*\*params) -> SyncPage[PendingTransaction] +- client.pending_transactions.list(\*\*params) -> PendingTransactionListResponse - client.pending_transactions.release(pending_transaction_id) -> PendingTransaction # DeclinedTransactions @@ -199,27 +199,27 @@ Methods: Types: ```python -from increase.types import DeclinedTransaction +from increase.types import DeclinedTransaction, DeclinedTransactionListResponse ``` Methods: - client.declined_transactions.retrieve(declined_transaction_id) -> DeclinedTransaction -- client.declined_transactions.list(\*\*params) -> SyncPage[DeclinedTransaction] +- client.declined_transactions.list(\*\*params) -> DeclinedTransactionListResponse # ACHTransfers Types: ```python -from increase.types import ACHTransfer +from increase.types import ACHTransfer, ACHTransferListResponse ``` Methods: - client.ach_transfers.create(\*\*params) -> ACHTransfer - client.ach_transfers.retrieve(ach_transfer_id) -> ACHTransfer -- client.ach_transfers.list(\*\*params) -> SyncPage[ACHTransfer] +- client.ach_transfers.list(\*\*params) -> ACHTransferListResponse - client.ach_transfers.approve(ach_transfer_id) -> ACHTransfer - client.ach_transfers.cancel(ach_transfer_id) -> ACHTransfer @@ -228,27 +228,27 @@ Methods: Types: ```python -from increase.types import ACHPrenotification +from increase.types import ACHPrenotification, ACHPrenotificationListResponse ``` Methods: - client.ach_prenotifications.create(\*\*params) -> ACHPrenotification - client.ach_prenotifications.retrieve(ach_prenotification_id) -> ACHPrenotification -- client.ach_prenotifications.list(\*\*params) -> SyncPage[ACHPrenotification] +- client.ach_prenotifications.list(\*\*params) -> ACHPrenotificationListResponse # InboundACHTransfers Types: ```python -from increase.types import InboundACHTransfer +from increase.types import InboundACHTransfer, InboundACHTransferListResponse ``` Methods: - client.inbound_ach_transfers.retrieve(inbound_ach_transfer_id) -> InboundACHTransfer -- client.inbound_ach_transfers.list(\*\*params) -> SyncPage[InboundACHTransfer] +- client.inbound_ach_transfers.list(\*\*params) -> InboundACHTransferListResponse - client.inbound_ach_transfers.create_notification_of_change(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer - client.inbound_ach_transfers.decline(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer - client.inbound_ach_transfers.transfer_return(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer @@ -258,14 +258,14 @@ Methods: Types: ```python -from increase.types import WireTransfer +from increase.types import WireTransfer, WireTransferListResponse ``` Methods: - client.wire_transfers.create(\*\*params) -> WireTransfer - client.wire_transfers.retrieve(wire_transfer_id) -> WireTransfer -- client.wire_transfers.list(\*\*params) -> SyncPage[WireTransfer] +- client.wire_transfers.list(\*\*params) -> WireTransferListResponse - client.wire_transfers.approve(wire_transfer_id) -> WireTransfer - client.wire_transfers.cancel(wire_transfer_id) -> WireTransfer @@ -274,13 +274,13 @@ Methods: Types: ```python -from increase.types import InboundWireTransfer +from increase.types import InboundWireTransfer, InboundWireTransferListResponse ``` Methods: - client.inbound_wire_transfers.retrieve(inbound_wire_transfer_id) -> InboundWireTransfer -- client.inbound_wire_transfers.list(\*\*params) -> SyncPage[InboundWireTransfer] +- client.inbound_wire_transfers.list(\*\*params) -> InboundWireTransferListResponse - client.inbound_wire_transfers.reverse(inbound_wire_transfer_id, \*\*params) -> InboundWireTransfer # WireDrawdownRequests @@ -288,41 +288,41 @@ Methods: Types: ```python -from increase.types import WireDrawdownRequest +from increase.types import WireDrawdownRequest, WireDrawdownRequestListResponse ``` Methods: - client.wire_drawdown_requests.create(\*\*params) -> WireDrawdownRequest - client.wire_drawdown_requests.retrieve(wire_drawdown_request_id) -> WireDrawdownRequest -- client.wire_drawdown_requests.list(\*\*params) -> SyncPage[WireDrawdownRequest] +- client.wire_drawdown_requests.list(\*\*params) -> WireDrawdownRequestListResponse # InboundWireDrawdownRequests Types: ```python -from increase.types import InboundWireDrawdownRequest +from increase.types import InboundWireDrawdownRequest, InboundWireDrawdownRequestListResponse ``` Methods: - client.inbound_wire_drawdown_requests.retrieve(inbound_wire_drawdown_request_id) -> InboundWireDrawdownRequest -- client.inbound_wire_drawdown_requests.list(\*\*params) -> SyncPage[InboundWireDrawdownRequest] +- client.inbound_wire_drawdown_requests.list(\*\*params) -> InboundWireDrawdownRequestListResponse # CheckTransfers Types: ```python -from increase.types import CheckTransfer +from increase.types import CheckTransfer, CheckTransferListResponse ``` Methods: - client.check_transfers.create(\*\*params) -> CheckTransfer - client.check_transfers.retrieve(check_transfer_id) -> CheckTransfer -- client.check_transfers.list(\*\*params) -> SyncPage[CheckTransfer] +- client.check_transfers.list(\*\*params) -> CheckTransferListResponse - client.check_transfers.approve(check_transfer_id) -> CheckTransfer - client.check_transfers.cancel(check_transfer_id) -> CheckTransfer - client.check_transfers.stop_payment(check_transfer_id, \*\*params) -> CheckTransfer @@ -332,13 +332,13 @@ Methods: Types: ```python -from increase.types import InboundCheckDeposit +from increase.types import InboundCheckDeposit, InboundCheckDepositListResponse ``` Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit -- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] +- client.inbound_check_deposits.list(\*\*params) -> InboundCheckDepositListResponse - client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound*check_deposits.return*(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit @@ -347,14 +347,14 @@ Methods: Types: ```python -from increase.types import RealTimePaymentsTransfer +from increase.types import RealTimePaymentsTransfer, RealTimePaymentsTransferListResponse ``` Methods: - client.real_time_payments_transfers.create(\*\*params) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer -- client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] +- client.real_time_payments_transfers.list(\*\*params) -> RealTimePaymentsTransferListResponse - client.real_time_payments_transfers.approve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.cancel(real_time_payments_transfer_id) -> RealTimePaymentsTransfer @@ -363,27 +363,30 @@ Methods: Types: ```python -from increase.types import InboundRealTimePaymentsTransfer +from increase.types import ( + InboundRealTimePaymentsTransfer, + InboundRealTimePaymentsTransferListResponse, +) ``` Methods: - client.inbound_real_time_payments_transfers.retrieve(inbound_real_time_payments_transfer_id) -> InboundRealTimePaymentsTransfer -- client.inbound_real_time_payments_transfers.list(\*\*params) -> SyncPage[InboundRealTimePaymentsTransfer] +- client.inbound_real_time_payments_transfers.list(\*\*params) -> InboundRealTimePaymentsTransferListResponse # FednowTransfers Types: ```python -from increase.types import FednowTransfer +from increase.types import FednowTransfer, FednowTransferListResponse ``` Methods: - client.fednow_transfers.create(\*\*params) -> FednowTransfer - client.fednow_transfers.retrieve(fednow_transfer_id) -> FednowTransfer -- client.fednow_transfers.list(\*\*params) -> SyncPage[FednowTransfer] +- client.fednow_transfers.list(\*\*params) -> FednowTransferListResponse - client.fednow_transfers.approve(fednow_transfer_id) -> FednowTransfer - client.fednow_transfers.cancel(fednow_transfer_id) -> FednowTransfer @@ -392,34 +395,34 @@ Methods: Types: ```python -from increase.types import InboundFednowTransfer +from increase.types import InboundFednowTransfer, InboundFednowTransferListResponse ``` Methods: - client.inbound_fednow_transfers.retrieve(inbound_fednow_transfer_id) -> InboundFednowTransfer -- client.inbound_fednow_transfers.list(\*\*params) -> SyncPage[InboundFednowTransfer] +- client.inbound_fednow_transfers.list(\*\*params) -> InboundFednowTransferListResponse # CheckDeposits Types: ```python -from increase.types import CheckDeposit +from increase.types import CheckDeposit, CheckDepositListResponse ``` Methods: - client.check_deposits.create(\*\*params) -> CheckDeposit - client.check_deposits.retrieve(check_deposit_id) -> CheckDeposit -- client.check_deposits.list(\*\*params) -> SyncPage[CheckDeposit] +- client.check_deposits.list(\*\*params) -> CheckDepositListResponse # Lockboxes Types: ```python -from increase.types import Lockbox +from increase.types import Lockbox, LockboxListResponse ``` Methods: @@ -427,20 +430,20 @@ Methods: - client.lockboxes.create(\*\*params) -> Lockbox - client.lockboxes.retrieve(lockbox_id) -> Lockbox - client.lockboxes.update(lockbox_id, \*\*params) -> Lockbox -- client.lockboxes.list(\*\*params) -> SyncPage[Lockbox] +- client.lockboxes.list(\*\*params) -> LockboxListResponse # InboundMailItems Types: ```python -from increase.types import InboundMailItem +from increase.types import InboundMailItem, InboundMailItemListResponse ``` Methods: - client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem -- client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] +- client.inbound_mail_items.list(\*\*params) -> InboundMailItemListResponse - client.inbound_mail_items.action(inbound_mail_item_id, \*\*params) -> InboundMailItem # RoutingNumbers @@ -453,14 +456,14 @@ from increase.types import RoutingNumberListResponse Methods: -- client.routing_numbers.list(\*\*params) -> SyncPage[RoutingNumberListResponse] +- client.routing_numbers.list(\*\*params) -> RoutingNumberListResponse # ExternalAccounts Types: ```python -from increase.types import ExternalAccount +from increase.types import ExternalAccount, ExternalAccountListResponse ``` Methods: @@ -468,14 +471,14 @@ Methods: - client.external_accounts.create(\*\*params) -> ExternalAccount - client.external_accounts.retrieve(external_account_id) -> ExternalAccount - client.external_accounts.update(external_account_id, \*\*params) -> ExternalAccount -- client.external_accounts.list(\*\*params) -> SyncPage[ExternalAccount] +- client.external_accounts.list(\*\*params) -> ExternalAccountListResponse # Entities Types: ```python -from increase.types import Entity +from increase.types import Entity, EntityListResponse ``` Methods: @@ -483,7 +486,7 @@ Methods: - client.entities.create(\*\*params) -> Entity - client.entities.retrieve(entity_id) -> Entity - client.entities.update(entity_id, \*\*params) -> Entity -- client.entities.list(\*\*params) -> SyncPage[Entity] +- client.entities.list(\*\*params) -> EntityListResponse - client.entities.archive(entity_id) -> Entity - client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity - client.entities.confirm(entity_id, \*\*params) -> Entity @@ -497,53 +500,53 @@ Methods: Types: ```python -from increase.types import EntitySupplementalDocument +from increase.types import EntitySupplementalDocument, SupplementalDocumentListResponse ``` Methods: - client.supplemental_documents.create(\*\*params) -> EntitySupplementalDocument -- client.supplemental_documents.list(\*\*params) -> SyncPage[EntitySupplementalDocument] +- client.supplemental_documents.list(\*\*params) -> SupplementalDocumentListResponse # Programs Types: ```python -from increase.types import Program +from increase.types import Program, ProgramListResponse ``` Methods: - client.programs.retrieve(program_id) -> Program -- client.programs.list(\*\*params) -> SyncPage[Program] +- client.programs.list(\*\*params) -> ProgramListResponse # AccountStatements Types: ```python -from increase.types import AccountStatement +from increase.types import AccountStatement, AccountStatementListResponse ``` Methods: - client.account_statements.retrieve(account_statement_id) -> AccountStatement -- client.account_statements.list(\*\*params) -> SyncPage[AccountStatement] +- client.account_statements.list(\*\*params) -> AccountStatementListResponse # Files Types: ```python -from increase.types import File +from increase.types import File, FileListResponse ``` Methods: - client.files.create(\*\*params) -> File - client.files.retrieve(file_id) -> File -- client.files.list(\*\*params) -> SyncPage[File] +- client.files.list(\*\*params) -> FileListResponse # FileLinks @@ -562,48 +565,48 @@ Methods: Types: ```python -from increase.types import Document +from increase.types import Document, DocumentListResponse ``` Methods: - client.documents.create(\*\*params) -> Document - client.documents.retrieve(document_id) -> Document -- client.documents.list(\*\*params) -> SyncPage[Document] +- client.documents.list(\*\*params) -> DocumentListResponse # Exports Types: ```python -from increase.types import Export +from increase.types import Export, ExportListResponse ``` Methods: - client.exports.create(\*\*params) -> Export - client.exports.retrieve(export_id) -> Export -- client.exports.list(\*\*params) -> SyncPage[Export] +- client.exports.list(\*\*params) -> ExportListResponse # Events Types: ```python -from increase.types import Event +from increase.types import Event, EventListResponse ``` Methods: - client.events.retrieve(event_id) -> Event -- client.events.list(\*\*params) -> SyncPage[Event] +- client.events.list(\*\*params) -> EventListResponse # EventSubscriptions Types: ```python -from increase.types import EventSubscription +from increase.types import EventSubscription, EventSubscriptionListResponse ``` Methods: @@ -611,7 +614,7 @@ Methods: - client.event_subscriptions.create(\*\*params) -> EventSubscription - client.event_subscriptions.retrieve(event_subscription_id) -> EventSubscription - client.event_subscriptions.update(event_subscription_id, \*\*params) -> EventSubscription -- client.event_subscriptions.list(\*\*params) -> SyncPage[EventSubscription] +- client.event_subscriptions.list(\*\*params) -> EventSubscriptionListResponse # RealTimeDecisions @@ -631,14 +634,18 @@ Methods: Types: ```python -from increase.types import BookkeepingAccount, BookkeepingBalanceLookup +from increase.types import ( + BookkeepingAccount, + BookkeepingBalanceLookup, + BookkeepingAccountListResponse, +) ``` Methods: - client.bookkeeping_accounts.create(\*\*params) -> BookkeepingAccount - client.bookkeeping_accounts.update(bookkeeping_account_id, \*\*params) -> BookkeepingAccount -- client.bookkeeping_accounts.list(\*\*params) -> SyncPage[BookkeepingAccount] +- client.bookkeeping_accounts.list(\*\*params) -> BookkeepingAccountListResponse - client.bookkeeping_accounts.balance(bookkeeping_account_id, \*\*params) -> BookkeepingBalanceLookup # BookkeepingEntrySets @@ -646,27 +653,27 @@ Methods: Types: ```python -from increase.types import BookkeepingEntrySet +from increase.types import BookkeepingEntrySet, BookkeepingEntrySetListResponse ``` Methods: - client.bookkeeping_entry_sets.create(\*\*params) -> BookkeepingEntrySet - client.bookkeeping_entry_sets.retrieve(bookkeeping_entry_set_id) -> BookkeepingEntrySet -- client.bookkeeping_entry_sets.list(\*\*params) -> SyncPage[BookkeepingEntrySet] +- client.bookkeeping_entry_sets.list(\*\*params) -> BookkeepingEntrySetListResponse # BookkeepingEntries Types: ```python -from increase.types import BookkeepingEntry +from increase.types import BookkeepingEntry, BookkeepingEntryListResponse ``` Methods: - client.bookkeeping_entries.retrieve(bookkeeping_entry_id) -> BookkeepingEntry -- client.bookkeeping_entries.list(\*\*params) -> SyncPage[BookkeepingEntry] +- client.bookkeeping_entries.list(\*\*params) -> BookkeepingEntryListResponse # Groups @@ -685,26 +692,26 @@ Methods: Types: ```python -from increase.types import OAuthApplication +from increase.types import OAuthApplication, OAuthApplicationListResponse ``` Methods: - client.oauth_applications.retrieve(oauth_application_id) -> OAuthApplication -- client.oauth_applications.list(\*\*params) -> SyncPage[OAuthApplication] +- client.oauth_applications.list(\*\*params) -> OAuthApplicationListResponse # OAuthConnections Types: ```python -from increase.types import OAuthConnection +from increase.types import OAuthConnection, OAuthConnectionListResponse ``` Methods: - client.oauth_connections.retrieve(oauth_connection_id) -> OAuthConnection -- client.oauth_connections.list(\*\*params) -> SyncPage[OAuthConnection] +- client.oauth_connections.list(\*\*params) -> OAuthConnectionListResponse # OAuthTokens @@ -723,14 +730,14 @@ Methods: Types: ```python -from increase.types import IntrafiAccountEnrollment +from increase.types import IntrafiAccountEnrollment, IntrafiAccountEnrollmentListResponse ``` Methods: - client.intrafi_account_enrollments.create(\*\*params) -> IntrafiAccountEnrollment - client.intrafi_account_enrollments.retrieve(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment -- client.intrafi_account_enrollments.list(\*\*params) -> SyncPage[IntrafiAccountEnrollment] +- client.intrafi_account_enrollments.list(\*\*params) -> IntrafiAccountEnrollmentListResponse - client.intrafi_account_enrollments.unenroll(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment # IntrafiBalances @@ -750,14 +757,14 @@ Methods: Types: ```python -from increase.types import IntrafiExclusion +from increase.types import IntrafiExclusion, IntrafiExclusionListResponse ``` Methods: - client.intrafi_exclusions.create(\*\*params) -> IntrafiExclusion - client.intrafi_exclusions.retrieve(intrafi_exclusion_id) -> IntrafiExclusion -- client.intrafi_exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] +- client.intrafi_exclusions.list(\*\*params) -> IntrafiExclusionListResponse - client.intrafi_exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion # CardTokens @@ -765,13 +772,13 @@ Methods: Types: ```python -from increase.types import CardToken, CardTokenCapabilities +from increase.types import CardToken, CardTokenCapabilities, CardTokenListResponse ``` Methods: - client.card_tokens.retrieve(card_token_id) -> CardToken -- client.card_tokens.list(\*\*params) -> SyncPage[CardToken] +- client.card_tokens.list(\*\*params) -> CardTokenListResponse - client.card_tokens.capabilities(card_token_id) -> CardTokenCapabilities # CardPushTransfers @@ -779,14 +786,14 @@ Methods: Types: ```python -from increase.types import CardPushTransfer +from increase.types import CardPushTransfer, CardPushTransferListResponse ``` Methods: - client.card_push_transfers.create(\*\*params) -> CardPushTransfer - client.card_push_transfers.retrieve(card_push_transfer_id) -> CardPushTransfer -- client.card_push_transfers.list(\*\*params) -> SyncPage[CardPushTransfer] +- client.card_push_transfers.list(\*\*params) -> CardPushTransferListResponse - client.card_push_transfers.approve(card_push_transfer_id) -> CardPushTransfer - client.card_push_transfers.cancel(card_push_transfer_id) -> CardPushTransfer @@ -795,14 +802,14 @@ Methods: Types: ```python -from increase.types import CardValidation +from increase.types import CardValidation, CardValidationListResponse ``` Methods: - client.card_validations.create(\*\*params) -> CardValidation - client.card_validations.retrieve(card_validation_id) -> CardValidation -- client.card_validations.list(\*\*params) -> SyncPage[CardValidation] +- client.card_validations.list(\*\*params) -> CardValidationListResponse # Simulations diff --git a/src/increase/pagination.py b/src/increase/pagination.py index 9f14e71ae..d229f5d71 100644 --- a/src/increase/pagination.py +++ b/src/increase/pagination.py @@ -3,6 +3,8 @@ from typing import List, Generic, TypeVar, Optional from typing_extensions import override +from pydantic import Field as FieldInfo + from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage __all__ = ["SyncPage", "AsyncPage"] @@ -11,15 +13,12 @@ class SyncPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): - data: List[_T] - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" + data: Optional[object] = FieldInfo(alias=":data", default=None) + next_cursor: Optional[object] = FieldInfo(alias=":next_cursor", default=None) @override def _get_page_items(self) -> List[_T]: data = self.data - if not data: - return [] return data @override @@ -28,19 +27,16 @@ def next_page_info(self) -> Optional[PageInfo]: if not next_cursor: return None - return PageInfo(params={"cursor": next_cursor}) + return PageInfo(params={":cursor": next_cursor}) class AsyncPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): - data: List[_T] - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" + data: Optional[object] = FieldInfo(alias=":data", default=None) + next_cursor: Optional[object] = FieldInfo(alias=":next_cursor", default=None) @override def _get_page_items(self) -> List[_T]: data = self.data - if not data: - return [] return data @override @@ -49,4 +45,4 @@ def next_page_info(self) -> Optional[PageInfo]: if not next_cursor: return None - return PageInfo(params={"cursor": next_cursor}) + return PageInfo(params={":cursor": next_cursor}) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index fa2474e34..78a8d1f07 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.account_number import AccountNumber +from ..types.account_number_list_response import AccountNumberListResponse __all__ = ["AccountNumbersResource", "AsyncAccountNumbersResource"] @@ -222,7 +222,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[AccountNumber]: + ) -> AccountNumberListResponse: """ List Account Numbers @@ -247,9 +247,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/account_numbers", - page=SyncPage[AccountNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -268,7 +267,7 @@ def list( account_number_list_params.AccountNumberListParams, ), ), - model=AccountNumber, + cast_to=AccountNumberListResponse, ) @@ -454,7 +453,7 @@ async def update( cast_to=AccountNumber, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -470,7 +469,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[AccountNumber, AsyncPage[AccountNumber]]: + ) -> AccountNumberListResponse: """ List Account Numbers @@ -495,15 +494,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/account_numbers", - page=AsyncPage[AccountNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "ach_debit_status": ach_debit_status, @@ -516,7 +514,7 @@ def list( account_number_list_params.AccountNumberListParams, ), ), - model=AccountNumber, + cast_to=AccountNumberListResponse, ) diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 879016421..9ddf09349 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -6,7 +6,7 @@ from ..types import account_statement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.account_statement import AccountStatement +from ..types.account_statement_list_response import AccountStatementListResponse __all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[AccountStatement]: + ) -> AccountStatementListResponse: """ List Account Statements @@ -112,9 +112,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/account_statements", - page=SyncPage[AccountStatement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +129,7 @@ def list( account_statement_list_params.AccountStatementListParams, ), ), - model=AccountStatement, + cast_to=AccountStatementListResponse, ) @@ -191,7 +190,7 @@ async def retrieve( cast_to=AccountStatement, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -204,7 +203,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[AccountStatement, AsyncPage[AccountStatement]]: + ) -> AccountStatementListResponse: """ List Account Statements @@ -224,15 +223,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/account_statements", - page=AsyncPage[AccountStatement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -242,7 +240,7 @@ def list( account_statement_list_params.AccountStatementListParams, ), ), - model=AccountStatement, + cast_to=AccountStatementListResponse, ) diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 6aa93303e..6e5784955 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.account_transfer import AccountTransfer +from ..types.account_transfer_list_response import AccountTransferListResponse __all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] @@ -159,7 +159,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[AccountTransfer]: + ) -> AccountTransferListResponse: """ List Account Transfers @@ -184,9 +184,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/account_transfers", - page=SyncPage[AccountTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -203,7 +202,7 @@ def list( account_transfer_list_params.AccountTransferListParams, ), ), - model=AccountTransfer, + cast_to=AccountTransferListResponse, ) def approve( @@ -418,7 +417,7 @@ async def retrieve( cast_to=AccountTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -432,7 +431,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[AccountTransfer, AsyncPage[AccountTransfer]]: + ) -> AccountTransferListResponse: """ List Account Transfers @@ -457,15 +456,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/account_transfers", - page=AsyncPage[AccountTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -476,7 +474,7 @@ def list( account_transfer_list_params.AccountTransferListParams, ), ), - model=AccountTransfer, + cast_to=AccountTransferListResponse, ) async def approve( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 080ab2bf6..9d1fe7f2e 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -18,10 +18,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup +from ..types.account_list_response import AccountListResponse __all__ = ["AccountsResource", "AsyncAccountsResource"] @@ -214,7 +214,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Account]: + ) -> AccountListResponse: """ List Accounts @@ -243,9 +243,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/accounts", - page=SyncPage[Account], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -265,7 +264,7 @@ def list( account_list_params.AccountListParams, ), ), - model=Account, + cast_to=AccountListResponse, ) def balance( @@ -526,7 +525,7 @@ async def update( cast_to=Account, ) - def list( + async def list( self, *, created_at: account_list_params.CreatedAt | Omit = omit, @@ -543,7 +542,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Account, AsyncPage[Account]]: + ) -> AccountListResponse: """ List Accounts @@ -572,15 +571,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/accounts", - page=AsyncPage[Account], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -594,7 +592,7 @@ def list( account_list_params.AccountListParams, ), ), - model=Account, + cast_to=AccountListResponse, ) async def balance( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 7d2af5fe1..d5af0d51e 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.ach_prenotification import ACHPrenotification +from ..types.ach_prenotification_list_response import ACHPrenotificationListResponse __all__ = ["ACHPrenotificationsResource", "AsyncACHPrenotificationsResource"] @@ -207,7 +207,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[ACHPrenotification]: + ) -> ACHPrenotificationListResponse: """ List ACH Prenotifications @@ -230,9 +230,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/ach_prenotifications", - page=SyncPage[ACHPrenotification], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -248,7 +247,7 @@ def list( ach_prenotification_list_params.ACHPrenotificationListParams, ), ), - model=ACHPrenotification, + cast_to=ACHPrenotificationListResponse, ) @@ -420,7 +419,7 @@ async def retrieve( cast_to=ACHPrenotification, ) - def list( + async def list( self, *, created_at: ach_prenotification_list_params.CreatedAt | Omit = omit, @@ -433,7 +432,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[ACHPrenotification, AsyncPage[ACHPrenotification]]: + ) -> ACHPrenotificationListResponse: """ List ACH Prenotifications @@ -456,15 +455,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/ach_prenotifications", - page=AsyncPage[ACHPrenotification], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -474,7 +472,7 @@ def list( ach_prenotification_list_params.ACHPrenotificationListParams, ), ), - model=ACHPrenotification, + cast_to=ACHPrenotificationListResponse, ) diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index d07b5534a..09fdf9a73 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.ach_transfer import ACHTransfer +from ..types.ach_transfer_list_response import ACHTransferListResponse __all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] @@ -255,7 +255,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[ACHTransfer]: + ) -> ACHTransferListResponse: """ List ACH Transfers @@ -282,9 +282,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/ach_transfers", - page=SyncPage[ACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -303,7 +302,7 @@ def list( ach_transfer_list_params.ACHTransferListParams, ), ), - model=ACHTransfer, + cast_to=ACHTransferListResponse, ) def approve( @@ -606,7 +605,7 @@ async def retrieve( cast_to=ACHTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -622,7 +621,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[ACHTransfer, AsyncPage[ACHTransfer]]: + ) -> ACHTransferListResponse: """ List ACH Transfers @@ -649,15 +648,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/ach_transfers", - page=AsyncPage[ACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -670,7 +668,7 @@ def list( ach_transfer_list_params.ACHTransferListParams, ), ), - model=ACHTransfer, + cast_to=ACHTransferListResponse, ) async def approve( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 238915094..95d52f96a 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -24,10 +24,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup +from ..types.bookkeeping_account_list_response import BookkeepingAccountListResponse __all__ = ["BookkeepingAccountsResource", "AsyncBookkeepingAccountsResource"] @@ -173,7 +173,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[BookkeepingAccount]: + ) -> BookkeepingAccountListResponse: """ List Bookkeeping Accounts @@ -196,9 +196,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/bookkeeping_accounts", - page=SyncPage[BookkeepingAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -213,7 +212,7 @@ def list( bookkeeping_account_list_params.BookkeepingAccountListParams, ), ), - model=BookkeepingAccount, + cast_to=BookkeepingAccountListResponse, ) def balance( @@ -394,7 +393,7 @@ async def update( cast_to=BookkeepingAccount, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -406,7 +405,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[BookkeepingAccount, AsyncPage[BookkeepingAccount]]: + ) -> BookkeepingAccountListResponse: """ List Bookkeeping Accounts @@ -429,15 +428,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/bookkeeping_accounts", - page=AsyncPage[BookkeepingAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -446,7 +444,7 @@ def list( bookkeeping_account_list_params.BookkeepingAccountListParams, ), ), - model=BookkeepingAccount, + cast_to=BookkeepingAccountListResponse, ) async def balance( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index 56be104f3..0c56bc393 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -6,7 +6,7 @@ from ..types import bookkeeping_entry_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.bookkeeping_entry import BookkeepingEntry +from ..types.bookkeeping_entry_list_response import BookkeepingEntryListResponse __all__ = ["BookkeepingEntriesResource", "AsyncBookkeepingEntriesResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[BookkeepingEntry]: + ) -> BookkeepingEntryListResponse: """ List Bookkeeping Entries @@ -111,9 +111,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/bookkeeping_entries", - page=SyncPage[BookkeepingEntry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -128,7 +127,7 @@ def list( bookkeeping_entry_list_params.BookkeepingEntryListParams, ), ), - model=BookkeepingEntry, + cast_to=BookkeepingEntryListResponse, ) @@ -189,7 +188,7 @@ async def retrieve( cast_to=BookkeepingEntry, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -201,7 +200,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[BookkeepingEntry, AsyncPage[BookkeepingEntry]]: + ) -> BookkeepingEntryListResponse: """ List Bookkeeping Entries @@ -221,15 +220,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/bookkeeping_entries", - page=AsyncPage[BookkeepingEntry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -238,7 +236,7 @@ def list( bookkeeping_entry_list_params.BookkeepingEntryListParams, ), ), - model=BookkeepingEntry, + cast_to=BookkeepingEntryListResponse, ) diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index c437c6185..2d952c4d6 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet +from ..types.bookkeeping_entry_set_list_response import BookkeepingEntrySetListResponse __all__ = ["BookkeepingEntrySetsResource", "AsyncBookkeepingEntrySetsResource"] @@ -150,7 +150,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[BookkeepingEntrySet]: + ) -> BookkeepingEntrySetListResponse: """ List Bookkeeping Entry Sets @@ -175,9 +175,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/bookkeeping_entry_sets", - page=SyncPage[BookkeepingEntrySet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -193,7 +192,7 @@ def list( bookkeeping_entry_set_list_params.BookkeepingEntrySetListParams, ), ), - model=BookkeepingEntrySet, + cast_to=BookkeepingEntrySetListResponse, ) @@ -309,7 +308,7 @@ async def retrieve( cast_to=BookkeepingEntrySet, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -322,7 +321,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[BookkeepingEntrySet, AsyncPage[BookkeepingEntrySet]]: + ) -> BookkeepingEntrySetListResponse: """ List Bookkeeping Entry Sets @@ -347,15 +346,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/bookkeeping_entry_sets", - page=AsyncPage[BookkeepingEntrySet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -365,7 +363,7 @@ def list( bookkeeping_entry_set_list_params.BookkeepingEntrySetListParams, ), ), - model=BookkeepingEntrySet, + cast_to=BookkeepingEntrySetListResponse, ) diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 2ef4e6958..f8f290615 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_dispute import CardDispute +from ..types.card_dispute_list_response import CardDisputeListResponse __all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] @@ -164,7 +164,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardDispute]: + ) -> CardDisputeListResponse: """ List Card Disputes @@ -187,9 +187,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_disputes", - page=SyncPage[CardDispute], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -206,7 +205,7 @@ def list( card_dispute_list_params.CardDisputeListParams, ), ), - model=CardDispute, + cast_to=CardDisputeListResponse, ) def submit_user_submission( @@ -447,7 +446,7 @@ async def retrieve( cast_to=CardDispute, ) - def list( + async def list( self, *, created_at: card_dispute_list_params.CreatedAt | Omit = omit, @@ -461,7 +460,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardDispute, AsyncPage[CardDispute]]: + ) -> CardDisputeListResponse: """ List Card Disputes @@ -484,15 +483,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_disputes", - page=AsyncPage[CardDispute], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -503,7 +501,7 @@ def list( card_dispute_list_params.CardDisputeListParams, ), ), - model=CardDispute, + cast_to=CardDisputeListResponse, ) async def submit_user_submission( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index c314d0e6c..06cc1adb4 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -6,7 +6,7 @@ from ..types import card_payment_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_payment import CardPayment +from ..types.card_payment_list_response import CardPaymentListResponse __all__ = ["CardPaymentsResource", "AsyncCardPaymentsResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardPayment]: + ) -> CardPaymentListResponse: """ List Card Payments @@ -113,9 +113,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_payments", - page=SyncPage[CardPayment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -132,7 +131,7 @@ def list( card_payment_list_params.CardPaymentListParams, ), ), - model=CardPayment, + cast_to=CardPaymentListResponse, ) @@ -191,7 +190,7 @@ async def retrieve( cast_to=CardPayment, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -205,7 +204,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardPayment, AsyncPage[CardPayment]]: + ) -> CardPaymentListResponse: """ List Card Payments @@ -227,15 +226,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_payments", - page=AsyncPage[CardPayment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "card_id": card_id, @@ -246,7 +244,7 @@ def list( card_payment_list_params.CardPaymentListParams, ), ), - model=CardPayment, + cast_to=CardPaymentListResponse, ) diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index c768f0946..024531798 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -6,7 +6,7 @@ from ..types import card_purchase_supplement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement +from ..types.card_purchase_supplement_list_response import CardPurchaseSupplementListResponse __all__ = ["CardPurchaseSupplementsResource", "AsyncCardPurchaseSupplementsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardPurchaseSupplement]: + ) -> CardPurchaseSupplementListResponse: """ List Card Purchase Supplements @@ -113,9 +113,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_purchase_supplements", - page=SyncPage[CardPurchaseSupplement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -131,7 +130,7 @@ def list( card_purchase_supplement_list_params.CardPurchaseSupplementListParams, ), ), - model=CardPurchaseSupplement, + cast_to=CardPurchaseSupplementListResponse, ) @@ -192,7 +191,7 @@ async def retrieve( cast_to=CardPurchaseSupplement, ) - def list( + async def list( self, *, card_payment_id: str | Omit = omit, @@ -205,7 +204,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardPurchaseSupplement, AsyncPage[CardPurchaseSupplement]]: + ) -> CardPurchaseSupplementListResponse: """ List Card Purchase Supplements @@ -226,15 +225,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_purchase_supplements", - page=AsyncPage[CardPurchaseSupplement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "card_payment_id": card_payment_id, "created_at": created_at, @@ -244,7 +242,7 @@ def list( card_purchase_supplement_list_params.CardPurchaseSupplementListParams, ), ), - model=CardPurchaseSupplement, + cast_to=CardPurchaseSupplementListResponse, ) diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index b72363fce..98d8113bd 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_push_transfer import CardPushTransfer +from ..types.card_push_transfer_list_response import CardPushTransferListResponse __all__ = ["CardPushTransfersResource", "AsyncCardPushTransfersResource"] @@ -247,7 +247,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardPushTransfer]: + ) -> CardPushTransferListResponse: """ List Card Push Transfers @@ -272,9 +272,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_push_transfers", - page=SyncPage[CardPushTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -292,7 +291,7 @@ def list( card_push_transfer_list_params.CardPushTransferListParams, ), ), - model=CardPushTransfer, + cast_to=CardPushTransferListResponse, ) def approve( @@ -592,7 +591,7 @@ async def retrieve( cast_to=CardPushTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -607,7 +606,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardPushTransfer, AsyncPage[CardPushTransfer]]: + ) -> CardPushTransferListResponse: """ List Card Push Transfers @@ -632,15 +631,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_push_transfers", - page=AsyncPage[CardPushTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -652,7 +650,7 @@ def list( card_push_transfer_list_params.CardPushTransferListParams, ), ), - model=CardPushTransfer, + cast_to=CardPushTransferListResponse, ) async def approve( diff --git a/src/increase/resources/card_tokens.py b/src/increase/resources/card_tokens.py index c00023910..be0d3fd94 100644 --- a/src/increase/resources/card_tokens.py +++ b/src/increase/resources/card_tokens.py @@ -6,7 +6,7 @@ from ..types import card_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,10 +15,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_token import CardToken from ..types.card_token_capabilities import CardTokenCapabilities +from ..types.card_token_list_response import CardTokenListResponse __all__ = ["CardTokensResource", "AsyncCardTokensResource"] @@ -90,7 +90,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardToken]: + ) -> CardTokenListResponse: """ List Card Tokens @@ -108,9 +108,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_tokens", - page=SyncPage[CardToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -125,7 +124,7 @@ def list( card_token_list_params.CardTokenListParams, ), ), - model=CardToken, + cast_to=CardTokenListResponse, ) def capabilities( @@ -221,7 +220,7 @@ async def retrieve( cast_to=CardToken, ) - def list( + async def list( self, *, created_at: card_token_list_params.CreatedAt | Omit = omit, @@ -233,7 +232,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardToken, AsyncPage[CardToken]]: + ) -> CardTokenListResponse: """ List Card Tokens @@ -251,15 +250,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_tokens", - page=AsyncPage[CardToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -268,7 +266,7 @@ def list( card_token_list_params.CardTokenListParams, ), ), - model=CardToken, + cast_to=CardTokenListResponse, ) async def capabilities( diff --git a/src/increase/resources/card_validations.py b/src/increase/resources/card_validations.py index e24a34ac7..8b6443a18 100644 --- a/src/increase/resources/card_validations.py +++ b/src/increase/resources/card_validations.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_validation import CardValidation +from ..types.card_validation_list_response import CardValidationListResponse __all__ = ["CardValidationsResource", "AsyncCardValidationsResource"] @@ -185,7 +185,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CardValidation]: + ) -> CardValidationListResponse: """ List Card Validations @@ -210,9 +210,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/card_validations", - page=SyncPage[CardValidation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -230,7 +229,7 @@ def list( card_validation_list_params.CardValidationListParams, ), ), - model=CardValidation, + cast_to=CardValidationListResponse, ) @@ -382,7 +381,7 @@ async def retrieve( cast_to=CardValidation, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -397,7 +396,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CardValidation, AsyncPage[CardValidation]]: + ) -> CardValidationListResponse: """ List Card Validations @@ -422,15 +421,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/card_validations", - page=AsyncPage[CardValidation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -442,7 +440,7 @@ def list( card_validation_list_params.CardValidationListParams, ), ), - model=CardValidation, + cast_to=CardValidationListResponse, ) diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index f5dae7300..6f21b8d5e 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -23,11 +23,11 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage from ..types.card import Card -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.card_details import CardDetails from ..types.card_iframe_url import CardIframeURL +from ..types.card_list_response import CardListResponse __all__ = ["CardsResource", "AsyncCardsResource"] @@ -243,7 +243,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Card]: + ) -> CardListResponse: """ List Cards @@ -268,9 +268,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/cards", - page=SyncPage[Card], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -288,7 +287,7 @@ def list( card_list_params.CardListParams, ), ), - model=Card, + cast_to=CardListResponse, ) def create_details_iframe( @@ -622,7 +621,7 @@ async def update( cast_to=Card, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -637,7 +636,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Card, AsyncPage[Card]]: + ) -> CardListResponse: """ List Cards @@ -662,15 +661,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/cards", - page=AsyncPage[Card], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -682,7 +680,7 @@ def list( card_list_params.CardListParams, ), ), - model=Card, + cast_to=CardListResponse, ) async def create_details_iframe( diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 2683f91aa..b0e22c088 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.check_deposit import CheckDeposit +from ..types.check_deposit_list_response import CheckDepositListResponse __all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] @@ -153,7 +153,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CheckDeposit]: + ) -> CheckDepositListResponse: """ List Check Deposits @@ -178,9 +178,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/check_deposits", - page=SyncPage[CheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -197,7 +196,7 @@ def list( check_deposit_list_params.CheckDepositListParams, ), ), - model=CheckDeposit, + cast_to=CheckDepositListResponse, ) @@ -318,7 +317,7 @@ async def retrieve( cast_to=CheckDeposit, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -332,7 +331,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CheckDeposit, AsyncPage[CheckDeposit]]: + ) -> CheckDepositListResponse: """ List Check Deposits @@ -357,15 +356,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/check_deposits", - page=AsyncPage[CheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -376,7 +374,7 @@ def list( check_deposit_list_params.CheckDepositListParams, ), ), - model=CheckDeposit, + cast_to=CheckDepositListResponse, ) diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index d7773c3c6..2b6512c5f 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.check_transfer import CheckTransfer +from ..types.check_transfer_list_response import CheckTransferListResponse __all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] @@ -201,7 +201,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[CheckTransfer]: + ) -> CheckTransferListResponse: """ List Check Transfers @@ -226,9 +226,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/check_transfers", - page=SyncPage[CheckTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -246,7 +245,7 @@ def list( check_transfer_list_params.CheckTransferListParams, ), ), - model=CheckTransfer, + cast_to=CheckTransferListResponse, ) def approve( @@ -548,7 +547,7 @@ async def retrieve( cast_to=CheckTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -563,7 +562,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[CheckTransfer, AsyncPage[CheckTransfer]]: + ) -> CheckTransferListResponse: """ List Check Transfers @@ -588,15 +587,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/check_transfers", - page=AsyncPage[CheckTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -608,7 +606,7 @@ def list( check_transfer_list_params.CheckTransferListParams, ), ), - model=CheckTransfer, + cast_to=CheckTransferListResponse, ) async def approve( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 17f7eab97..e3816301c 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -6,7 +6,7 @@ from ..types import declined_transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.declined_transaction import DeclinedTransaction +from ..types.declined_transaction_list_response import DeclinedTransactionListResponse __all__ = ["DeclinedTransactionsResource", "AsyncDeclinedTransactionsResource"] @@ -94,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[DeclinedTransaction]: + ) -> DeclinedTransactionListResponse: """ List Declined Transactions @@ -116,9 +116,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/declined_transactions", - page=SyncPage[DeclinedTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -136,7 +135,7 @@ def list( declined_transaction_list_params.DeclinedTransactionListParams, ), ), - model=DeclinedTransaction, + cast_to=DeclinedTransactionListResponse, ) @@ -197,7 +196,7 @@ async def retrieve( cast_to=DeclinedTransaction, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -212,7 +211,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[DeclinedTransaction, AsyncPage[DeclinedTransaction]]: + ) -> DeclinedTransactionListResponse: """ List Declined Transactions @@ -234,15 +233,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/declined_transactions", - page=AsyncPage[DeclinedTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "category": category, @@ -254,7 +252,7 @@ def list( declined_transaction_list_params.DeclinedTransactionListParams, ), ), - model=DeclinedTransaction, + cast_to=DeclinedTransactionListResponse, ) diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 84cbd1292..14821fb87 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.digital_card_profile import DigitalCardProfile +from ..types.digital_card_profile_list_response import DigitalCardProfileListResponse __all__ = ["DigitalCardProfilesResource", "AsyncDigitalCardProfilesResource"] @@ -174,7 +174,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[DigitalCardProfile]: + ) -> DigitalCardProfileListResponse: """ List Card Profiles @@ -197,9 +197,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/digital_card_profiles", - page=SyncPage[DigitalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -215,7 +214,7 @@ def list( digital_card_profile_list_params.DigitalCardProfileListParams, ), ), - model=DigitalCardProfile, + cast_to=DigitalCardProfileListResponse, ) def archive( @@ -483,7 +482,7 @@ async def retrieve( cast_to=DigitalCardProfile, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -496,7 +495,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[DigitalCardProfile, AsyncPage[DigitalCardProfile]]: + ) -> DigitalCardProfileListResponse: """ List Card Profiles @@ -519,15 +518,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/digital_card_profiles", - page=AsyncPage[DigitalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -537,7 +535,7 @@ def list( digital_card_profile_list_params.DigitalCardProfileListParams, ), ), - model=DigitalCardProfile, + cast_to=DigitalCardProfileListResponse, ) async def archive( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index f41d35b7f..175b45487 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -6,7 +6,7 @@ from ..types import digital_wallet_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.digital_wallet_token import DigitalWalletToken +from ..types.digital_wallet_token_list_response import DigitalWalletTokenListResponse __all__ = ["DigitalWalletTokensResource", "AsyncDigitalWalletTokensResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[DigitalWalletToken]: + ) -> DigitalWalletTokenListResponse: """ List Digital Wallet Tokens @@ -112,9 +112,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/digital_wallet_tokens", - page=SyncPage[DigitalWalletToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +129,7 @@ def list( digital_wallet_token_list_params.DigitalWalletTokenListParams, ), ), - model=DigitalWalletToken, + cast_to=DigitalWalletTokenListResponse, ) @@ -191,7 +190,7 @@ async def retrieve( cast_to=DigitalWalletToken, ) - def list( + async def list( self, *, card_id: str | Omit = omit, @@ -204,7 +203,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[DigitalWalletToken, AsyncPage[DigitalWalletToken]]: + ) -> DigitalWalletTokenListResponse: """ List Digital Wallet Tokens @@ -224,15 +223,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/digital_wallet_tokens", - page=AsyncPage[DigitalWalletToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "card_id": card_id, "created_at": created_at, @@ -242,7 +240,7 @@ def list( digital_wallet_token_list_params.DigitalWalletTokenListParams, ), ), - model=DigitalWalletToken, + cast_to=DigitalWalletTokenListResponse, ) diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 90b72744d..84b5d5c92 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.document import Document +from ..types.document_list_response import DocumentListResponse __all__ = ["DocumentsResource", "AsyncDocumentsResource"] @@ -153,7 +153,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Document]: + ) -> DocumentListResponse: """ List Documents @@ -178,9 +178,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/documents", - page=SyncPage[Document], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -198,7 +197,7 @@ def list( document_list_params.DocumentListParams, ), ), - model=Document, + cast_to=DocumentListResponse, ) @@ -316,7 +315,7 @@ async def retrieve( cast_to=Document, ) - def list( + async def list( self, *, category: document_list_params.Category | Omit = omit, @@ -331,7 +330,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Document, AsyncPage[Document]]: + ) -> DocumentListResponse: """ List Documents @@ -356,15 +355,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/documents", - page=AsyncPage[Document], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "category": category, "created_at": created_at, @@ -376,7 +374,7 @@ def list( document_list_params.DocumentListParams, ), ), - model=Document, + cast_to=DocumentListResponse, ) diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index ddbdf06a9..53ed5f6f8 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -29,9 +29,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.entity import Entity +from ..types.entity_list_response import EntityListResponse __all__ = ["EntitiesResource", "AsyncEntitiesResource"] @@ -287,7 +287,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Entity]: + ) -> EntityListResponse: """ List Entities @@ -310,9 +310,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/entities", - page=SyncPage[Entity], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -329,7 +328,7 @@ def list( entity_list_params.EntityListParams, ), ), - model=Entity, + cast_to=EntityListResponse, ) def archive( @@ -921,7 +920,7 @@ async def update( cast_to=Entity, ) - def list( + async def list( self, *, created_at: entity_list_params.CreatedAt | Omit = omit, @@ -935,7 +934,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Entity, AsyncPage[Entity]]: + ) -> EntityListResponse: """ List Entities @@ -958,15 +957,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/entities", - page=AsyncPage[Entity], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -977,7 +975,7 @@ def list( entity_list_params.EntityListParams, ), ), - model=Entity, + cast_to=EntityListResponse, ) async def archive( diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index faa477930..4e6d7ccb5 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.event_subscription import EventSubscription +from ..types.event_subscription_list_response import EventSubscriptionListResponse __all__ = ["EventSubscriptionsResource", "AsyncEventSubscriptionsResource"] @@ -471,7 +471,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[EventSubscription]: + ) -> EventSubscriptionListResponse: """ List Event Subscriptions @@ -494,9 +494,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/event_subscriptions", - page=SyncPage[EventSubscription], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -511,7 +510,7 @@ def list( event_subscription_list_params.EventSubscriptionListParams, ), ), - model=EventSubscription, + cast_to=EventSubscriptionListResponse, ) @@ -952,7 +951,7 @@ async def update( cast_to=EventSubscription, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -964,7 +963,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[EventSubscription, AsyncPage[EventSubscription]]: + ) -> EventSubscriptionListResponse: """ List Event Subscriptions @@ -987,15 +986,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/event_subscriptions", - page=AsyncPage[EventSubscription], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -1004,7 +1002,7 @@ def list( event_subscription_list_params.EventSubscriptionListParams, ), ), - model=EventSubscription, + cast_to=EventSubscriptionListResponse, ) diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 0e6be4fbe..14a61d722 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -6,7 +6,7 @@ from ..types import event_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage from ..types.event import Event -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options +from ..types.event_list_response import EventListResponse __all__ = ["EventsResource", "AsyncEventsResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Event]: + ) -> EventListResponse: """ List Events @@ -111,9 +111,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/events", - page=SyncPage[Event], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +129,7 @@ def list( event_list_params.EventListParams, ), ), - model=Event, + cast_to=EventListResponse, ) @@ -189,7 +188,7 @@ async def retrieve( cast_to=Event, ) - def list( + async def list( self, *, associated_object_id: str | Omit = omit, @@ -203,7 +202,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Event, AsyncPage[Event]]: + ) -> EventListResponse: """ List Events @@ -223,15 +222,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/events", - page=AsyncPage[Event], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "associated_object_id": associated_object_id, "category": category, @@ -242,7 +240,7 @@ def list( event_list_params.EventListParams, ), ), - model=Event, + cast_to=EventListResponse, ) diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 754a1a9dd..69426e559 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.export import Export +from ..types.export_list_response import ExportListResponse __all__ = ["ExportsResource", "AsyncExportsResource"] @@ -194,7 +194,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Export]: + ) -> ExportListResponse: """ List Exports @@ -217,9 +217,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/exports", - page=SyncPage[Export], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -237,7 +236,7 @@ def list( export_list_params.ExportListParams, ), ), - model=Export, + cast_to=ExportListResponse, ) @@ -396,7 +395,7 @@ async def retrieve( cast_to=Export, ) - def list( + async def list( self, *, category: export_list_params.Category | Omit = omit, @@ -411,7 +410,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Export, AsyncPage[Export]]: + ) -> ExportListResponse: """ List Exports @@ -434,15 +433,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/exports", - page=AsyncPage[Export], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "category": category, "created_at": created_at, @@ -454,7 +452,7 @@ def list( export_list_params.ExportListParams, ), ), - model=Export, + cast_to=ExportListResponse, ) diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index f1ec6f568..3ee97ff72 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.external_account import ExternalAccount +from ..types.external_account_list_response import ExternalAccountListResponse __all__ = ["ExternalAccountsResource", "AsyncExternalAccountsResource"] @@ -244,7 +244,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[ExternalAccount]: + ) -> ExternalAccountListResponse: """ List External Accounts @@ -269,9 +269,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/external_accounts", - page=SyncPage[ExternalAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -288,7 +287,7 @@ def list( external_account_list_params.ExternalAccountListParams, ), ), - model=ExternalAccount, + cast_to=ExternalAccountListResponse, ) @@ -498,7 +497,7 @@ async def update( cast_to=ExternalAccount, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -512,7 +511,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[ExternalAccount, AsyncPage[ExternalAccount]]: + ) -> ExternalAccountListResponse: """ List External Accounts @@ -537,15 +536,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/external_accounts", - page=AsyncPage[ExternalAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -556,7 +554,7 @@ def list( external_account_list_params.ExternalAccountListParams, ), ), - model=ExternalAccount, + cast_to=ExternalAccountListResponse, ) diff --git a/src/increase/resources/fednow_transfers.py b/src/increase/resources/fednow_transfers.py index 1ae25dc75..09cf8cf97 100644 --- a/src/increase/resources/fednow_transfers.py +++ b/src/increase/resources/fednow_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.fednow_transfer import FednowTransfer +from ..types.fednow_transfer_list_response import FednowTransferListResponse __all__ = ["FednowTransfersResource", "AsyncFednowTransfersResource"] @@ -184,7 +184,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[FednowTransfer]: + ) -> FednowTransferListResponse: """ List FedNow Transfers @@ -211,9 +211,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/fednow_transfers", - page=SyncPage[FednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -232,7 +231,7 @@ def list( fednow_transfer_list_params.FednowTransferListParams, ), ), - model=FednowTransfer, + cast_to=FednowTransferListResponse, ) def approve( @@ -466,7 +465,7 @@ async def retrieve( cast_to=FednowTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -482,7 +481,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[FednowTransfer, AsyncPage[FednowTransfer]]: + ) -> FednowTransferListResponse: """ List FedNow Transfers @@ -509,15 +508,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/fednow_transfers", - page=AsyncPage[FednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -530,7 +528,7 @@ def list( fednow_transfer_list_params.FednowTransferListParams, ), ), - model=FednowTransfer, + cast_to=FednowTransferListResponse, ) async def approve( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 8e0880de1..dcf7fab9e 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage from ..types.file import File -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options +from ..types.file_list_response import FileListResponse __all__ = ["FilesResource", "AsyncFilesResource"] @@ -211,7 +211,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[File]: + ) -> FileListResponse: """ List Files @@ -234,9 +234,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/files", - page=SyncPage[File], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -253,7 +252,7 @@ def list( file_list_params.FileListParams, ), ), - model=File, + cast_to=FileListResponse, ) @@ -429,7 +428,7 @@ async def retrieve( cast_to=File, ) - def list( + async def list( self, *, created_at: file_list_params.CreatedAt | Omit = omit, @@ -443,7 +442,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[File, AsyncPage[File]]: + ) -> FileListResponse: """ List Files @@ -466,15 +465,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/files", - page=AsyncPage[File], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -485,7 +483,7 @@ def list( file_list_params.FileListParams, ), ), - model=File, + cast_to=FileListResponse, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 465202ce1..7b129776c 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -22,9 +22,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer +from ..types.inbound_ach_transfer_list_response import InboundACHTransferListResponse __all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] @@ -101,7 +101,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundACHTransfer]: + ) -> InboundACHTransferListResponse: """ List Inbound ACH Transfers @@ -123,9 +123,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_ach_transfers", - page=SyncPage[InboundACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -143,7 +142,7 @@ def list( inbound_ach_transfer_list_params.InboundACHTransferListParams, ), ), - model=InboundACHTransfer, + cast_to=InboundACHTransferListResponse, ) def create_notification_of_change( @@ -431,7 +430,7 @@ async def retrieve( cast_to=InboundACHTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -446,7 +445,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundACHTransfer, AsyncPage[InboundACHTransfer]]: + ) -> InboundACHTransferListResponse: """ List Inbound ACH Transfers @@ -468,15 +467,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_ach_transfers", - page=AsyncPage[InboundACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -488,7 +486,7 @@ def list( inbound_ach_transfer_list_params.InboundACHTransferListParams, ), ), - model=InboundACHTransfer, + cast_to=InboundACHTransferListResponse, ) async def create_notification_of_change( diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 4337bcd62..b615d677f 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit +from ..types.inbound_check_deposit_list_response import InboundCheckDepositListResponse __all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] @@ -95,7 +95,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundCheckDeposit]: + ) -> InboundCheckDepositListResponse: """ List Inbound Check Deposits @@ -118,9 +118,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_check_deposits", - page=SyncPage[InboundCheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -137,7 +136,7 @@ def list( inbound_check_deposit_list_params.InboundCheckDepositListParams, ), ), - model=InboundCheckDeposit, + cast_to=InboundCheckDepositListResponse, ) def decline( @@ -304,7 +303,7 @@ async def retrieve( cast_to=InboundCheckDeposit, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -318,7 +317,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundCheckDeposit, AsyncPage[InboundCheckDeposit]]: + ) -> InboundCheckDepositListResponse: """ List Inbound Check Deposits @@ -341,15 +340,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_check_deposits", - page=AsyncPage[InboundCheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "check_transfer_id": check_transfer_id, @@ -360,7 +358,7 @@ def list( inbound_check_deposit_list_params.InboundCheckDepositListParams, ), ), - model=InboundCheckDeposit, + cast_to=InboundCheckDepositListResponse, ) async def decline( diff --git a/src/increase/resources/inbound_fednow_transfers.py b/src/increase/resources/inbound_fednow_transfers.py index 9a314e19f..fa317235d 100644 --- a/src/increase/resources/inbound_fednow_transfers.py +++ b/src/increase/resources/inbound_fednow_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_fednow_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_fednow_transfer import InboundFednowTransfer +from ..types.inbound_fednow_transfer_list_response import InboundFednowTransferListResponse __all__ = ["InboundFednowTransfersResource", "AsyncInboundFednowTransfersResource"] @@ -93,7 +93,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundFednowTransfer]: + ) -> InboundFednowTransferListResponse: """ List Inbound FedNow Transfers @@ -116,9 +116,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_fednow_transfers", - page=SyncPage[InboundFednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,7 +134,7 @@ def list( inbound_fednow_transfer_list_params.InboundFednowTransferListParams, ), ), - model=InboundFednowTransfer, + cast_to=InboundFednowTransferListResponse, ) @@ -196,7 +195,7 @@ async def retrieve( cast_to=InboundFednowTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -210,7 +209,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundFednowTransfer, AsyncPage[InboundFednowTransfer]]: + ) -> InboundFednowTransferListResponse: """ List Inbound FedNow Transfers @@ -233,15 +232,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_fednow_transfers", - page=AsyncPage[InboundFednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -252,7 +250,7 @@ def list( inbound_fednow_transfer_list_params.InboundFednowTransferListParams, ), ), - model=InboundFednowTransfer, + cast_to=InboundFednowTransferListResponse, ) diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 7e04c7944..1a22ffa0b 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_mail_item import InboundMailItem +from ..types.inbound_mail_item_list_response import InboundMailItemListResponse __all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] @@ -94,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundMailItem]: + ) -> InboundMailItemListResponse: """ List Inbound Mail Items @@ -114,9 +114,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_mail_items", - page=SyncPage[InboundMailItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -132,7 +131,7 @@ def list( inbound_mail_item_list_params.InboundMailItemListParams, ), ), - model=InboundMailItem, + cast_to=InboundMailItemListResponse, ) def action( @@ -241,7 +240,7 @@ async def retrieve( cast_to=InboundMailItem, ) - def list( + async def list( self, *, created_at: inbound_mail_item_list_params.CreatedAt | Omit = omit, @@ -254,7 +253,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundMailItem, AsyncPage[InboundMailItem]]: + ) -> InboundMailItemListResponse: """ List Inbound Mail Items @@ -274,15 +273,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_mail_items", - page=AsyncPage[InboundMailItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -292,7 +290,7 @@ def list( inbound_mail_item_list_params.InboundMailItemListParams, ), ), - model=InboundMailItem, + cast_to=InboundMailItemListResponse, ) async def action( diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index 8bbf1d4f8..bba57022a 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_real_time_payments_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer +from ..types.inbound_real_time_payments_transfer_list_response import InboundRealTimePaymentsTransferListResponse __all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] @@ -93,7 +93,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundRealTimePaymentsTransfer]: + ) -> InboundRealTimePaymentsTransferListResponse: """ List Inbound Real-Time Payments Transfers @@ -117,9 +117,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_real_time_payments_transfers", - page=SyncPage[InboundRealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -136,7 +135,7 @@ def list( inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, ), ), - model=InboundRealTimePaymentsTransfer, + cast_to=InboundRealTimePaymentsTransferListResponse, ) @@ -197,7 +196,7 @@ async def retrieve( cast_to=InboundRealTimePaymentsTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -211,7 +210,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundRealTimePaymentsTransfer, AsyncPage[InboundRealTimePaymentsTransfer]]: + ) -> InboundRealTimePaymentsTransferListResponse: """ List Inbound Real-Time Payments Transfers @@ -235,15 +234,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_real_time_payments_transfers", - page=AsyncPage[InboundRealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -254,7 +252,7 @@ def list( inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, ), ), - model=InboundRealTimePaymentsTransfer, + cast_to=InboundRealTimePaymentsTransferListResponse, ) diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index b1e02507a..fdd8c378b 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -6,7 +6,7 @@ from ..types import inbound_wire_drawdown_request_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest +from ..types.inbound_wire_drawdown_request_list_response import InboundWireDrawdownRequestListResponse __all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] @@ -90,7 +90,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundWireDrawdownRequest]: + ) -> InboundWireDrawdownRequestListResponse: """ List Inbound Wire Drawdown Requests @@ -108,9 +108,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_wire_drawdown_requests", - page=SyncPage[InboundWireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -124,7 +123,7 @@ def list( inbound_wire_drawdown_request_list_params.InboundWireDrawdownRequestListParams, ), ), - model=InboundWireDrawdownRequest, + cast_to=InboundWireDrawdownRequestListResponse, ) @@ -185,7 +184,7 @@ async def retrieve( cast_to=InboundWireDrawdownRequest, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -196,7 +195,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundWireDrawdownRequest, AsyncPage[InboundWireDrawdownRequest]]: + ) -> InboundWireDrawdownRequestListResponse: """ List Inbound Wire Drawdown Requests @@ -214,15 +213,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_wire_drawdown_requests", - page=AsyncPage[InboundWireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "limit": limit, @@ -230,7 +228,7 @@ def list( inbound_wire_drawdown_request_list_params.InboundWireDrawdownRequestListParams, ), ), - model=InboundWireDrawdownRequest, + cast_to=InboundWireDrawdownRequestListResponse, ) diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 964804140..15bfffee3 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer +from ..types.inbound_wire_transfer_list_response import InboundWireTransferListResponse __all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] @@ -97,7 +97,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[InboundWireTransfer]: + ) -> InboundWireTransferListResponse: """ List Inbound Wire Transfers @@ -122,9 +122,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/inbound_wire_transfers", - page=SyncPage[InboundWireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -143,7 +142,7 @@ def list( inbound_wire_transfer_list_params.InboundWireTransferListParams, ), ), - model=InboundWireTransfer, + cast_to=InboundWireTransferListResponse, ) def reverse( @@ -258,7 +257,7 @@ async def retrieve( cast_to=InboundWireTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -274,7 +273,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[InboundWireTransfer, AsyncPage[InboundWireTransfer]]: + ) -> InboundWireTransferListResponse: """ List Inbound Wire Transfers @@ -299,15 +298,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/inbound_wire_transfers", - page=AsyncPage[InboundWireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -320,7 +318,7 @@ def list( inbound_wire_transfer_list_params.InboundWireTransferListParams, ), ), - model=InboundWireTransfer, + cast_to=InboundWireTransferListResponse, ) async def reverse( diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 0fadbae5e..c1d2c7687 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.intrafi_account_enrollment import IntrafiAccountEnrollment +from ..types.intrafi_account_enrollment_list_response import IntrafiAccountEnrollmentListResponse __all__ = ["IntrafiAccountEnrollmentsResource", "AsyncIntrafiAccountEnrollmentsResource"] @@ -143,7 +143,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[IntrafiAccountEnrollment]: + ) -> IntrafiAccountEnrollmentListResponse: """ List IntraFi Account Enrollments @@ -168,9 +168,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/intrafi_account_enrollments", - page=SyncPage[IntrafiAccountEnrollment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -187,7 +186,7 @@ def list( intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), - model=IntrafiAccountEnrollment, + cast_to=IntrafiAccountEnrollmentListResponse, ) def unenroll( @@ -342,7 +341,7 @@ async def retrieve( cast_to=IntrafiAccountEnrollment, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -356,7 +355,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[IntrafiAccountEnrollment, AsyncPage[IntrafiAccountEnrollment]]: + ) -> IntrafiAccountEnrollmentListResponse: """ List IntraFi Account Enrollments @@ -381,15 +380,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/intrafi_account_enrollments", - page=AsyncPage[IntrafiAccountEnrollment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -400,7 +398,7 @@ def list( intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), - model=IntrafiAccountEnrollment, + cast_to=IntrafiAccountEnrollmentListResponse, ) async def unenroll( diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 53e2563c4..8c6f4b6a5 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.intrafi_exclusion import IntrafiExclusion +from ..types.intrafi_exclusion_list_response import IntrafiExclusionListResponse __all__ = ["IntrafiExclusionsResource", "AsyncIntrafiExclusionsResource"] @@ -142,7 +142,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[IntrafiExclusion]: + ) -> IntrafiExclusionListResponse: """ List IntraFi Exclusions @@ -167,9 +167,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/intrafi_exclusions", - page=SyncPage[IntrafiExclusion], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -185,7 +184,7 @@ def list( intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), - model=IntrafiExclusion, + cast_to=IntrafiExclusionListResponse, ) def archive( @@ -342,7 +341,7 @@ async def retrieve( cast_to=IntrafiExclusion, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -355,7 +354,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[IntrafiExclusion, AsyncPage[IntrafiExclusion]]: + ) -> IntrafiExclusionListResponse: """ List IntraFi Exclusions @@ -380,15 +379,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/intrafi_exclusions", - page=AsyncPage[IntrafiExclusion], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "entity_id": entity_id, @@ -398,7 +396,7 @@ def list( intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), - model=IntrafiExclusion, + cast_to=IntrafiExclusionListResponse, ) async def archive( diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 276fe76b0..29aee7cd0 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.lockbox import Lockbox +from ..types.lockbox_list_response import LockboxListResponse __all__ = ["LockboxesResource", "AsyncLockboxesResource"] @@ -211,7 +211,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Lockbox]: + ) -> LockboxListResponse: """ List Lockboxes @@ -236,9 +236,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/lockboxes", - page=SyncPage[Lockbox], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -255,7 +254,7 @@ def list( lockbox_list_params.LockboxListParams, ), ), - model=Lockbox, + cast_to=LockboxListResponse, ) @@ -432,7 +431,7 @@ async def update( cast_to=Lockbox, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -446,7 +445,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Lockbox, AsyncPage[Lockbox]]: + ) -> LockboxListResponse: """ List Lockboxes @@ -471,15 +470,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/lockboxes", - page=AsyncPage[Lockbox], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -490,7 +488,7 @@ def list( lockbox_list_params.LockboxListParams, ), ), - model=Lockbox, + cast_to=LockboxListResponse, ) diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index d69d83ab3..d8641324c 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -6,7 +6,7 @@ from ..types import oauth_application_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.oauth_application import OAuthApplication +from ..types.oauth_application_list_response import OAuthApplicationListResponse __all__ = ["OAuthApplicationsResource", "AsyncOAuthApplicationsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[OAuthApplication]: + ) -> OAuthApplicationListResponse: """ List OAuth Applications @@ -110,9 +110,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/oauth_applications", - page=SyncPage[OAuthApplication], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -128,7 +127,7 @@ def list( oauth_application_list_params.OAuthApplicationListParams, ), ), - model=OAuthApplication, + cast_to=OAuthApplicationListResponse, ) @@ -189,7 +188,7 @@ async def retrieve( cast_to=OAuthApplication, ) - def list( + async def list( self, *, created_at: oauth_application_list_params.CreatedAt | Omit = omit, @@ -202,7 +201,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[OAuthApplication, AsyncPage[OAuthApplication]]: + ) -> OAuthApplicationListResponse: """ List OAuth Applications @@ -220,15 +219,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/oauth_applications", - page=AsyncPage[OAuthApplication], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -238,7 +236,7 @@ def list( oauth_application_list_params.OAuthApplicationListParams, ), ), - model=OAuthApplication, + cast_to=OAuthApplicationListResponse, ) diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index aa27390ad..e1c4466b9 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -6,7 +6,7 @@ from ..types import oauth_connection_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.oauth_connection import OAuthConnection +from ..types.oauth_connection_list_response import OAuthConnectionListResponse __all__ = ["OAuthConnectionsResource", "AsyncOAuthConnectionsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[OAuthConnection]: + ) -> OAuthConnectionListResponse: """ List OAuth Connections @@ -113,9 +113,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/oauth_connections", - page=SyncPage[OAuthConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -131,7 +130,7 @@ def list( oauth_connection_list_params.OAuthConnectionListParams, ), ), - model=OAuthConnection, + cast_to=OAuthConnectionListResponse, ) @@ -192,7 +191,7 @@ async def retrieve( cast_to=OAuthConnection, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -205,7 +204,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[OAuthConnection, AsyncPage[OAuthConnection]]: + ) -> OAuthConnectionListResponse: """ List OAuth Connections @@ -226,15 +225,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/oauth_connections", - page=AsyncPage[OAuthConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "limit": limit, @@ -244,7 +242,7 @@ def list( oauth_connection_list_params.OAuthConnectionListParams, ), ), - model=OAuthConnection, + cast_to=OAuthConnectionListResponse, ) diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 19747929c..e1ae84eb4 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.pending_transaction import PendingTransaction +from ..types.pending_transaction_list_response import PendingTransactionListResponse __all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] @@ -155,7 +155,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[PendingTransaction]: + ) -> PendingTransactionListResponse: """ List Pending Transactions @@ -177,9 +177,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/pending_transactions", - page=SyncPage[PendingTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -198,7 +197,7 @@ def list( pending_transaction_list_params.PendingTransactionListParams, ), ), - model=PendingTransaction, + cast_to=PendingTransactionListResponse, ) def release( @@ -367,7 +366,7 @@ async def retrieve( cast_to=PendingTransaction, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -383,7 +382,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[PendingTransaction, AsyncPage[PendingTransaction]]: + ) -> PendingTransactionListResponse: """ List Pending Transactions @@ -405,15 +404,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/pending_transactions", - page=AsyncPage[PendingTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "category": category, @@ -426,7 +424,7 @@ def list( pending_transaction_list_params.PendingTransactionListParams, ), ), - model=PendingTransaction, + cast_to=PendingTransactionListResponse, ) async def release( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 67e2b910e..695b9fcbc 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.physical_card_profile import PhysicalCardProfile +from ..types.physical_card_profile_list_response import PhysicalCardProfileListResponse __all__ = ["PhysicalCardProfilesResource", "AsyncPhysicalCardProfilesResource"] @@ -163,7 +163,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[PhysicalCardProfile]: + ) -> PhysicalCardProfileListResponse: """ List Physical Card Profiles @@ -186,9 +186,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/physical_card_profiles", - page=SyncPage[PhysicalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -204,7 +203,7 @@ def list( physical_card_profile_list_params.PhysicalCardProfileListParams, ), ), - model=PhysicalCardProfile, + cast_to=PhysicalCardProfileListResponse, ) def archive( @@ -450,7 +449,7 @@ async def retrieve( cast_to=PhysicalCardProfile, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -463,7 +462,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[PhysicalCardProfile, AsyncPage[PhysicalCardProfile]]: + ) -> PhysicalCardProfileListResponse: """ List Physical Card Profiles @@ -486,15 +485,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/physical_card_profiles", - page=AsyncPage[PhysicalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -504,7 +502,7 @@ def list( physical_card_profile_list_params.PhysicalCardProfileListParams, ), ), - model=PhysicalCardProfile, + cast_to=PhysicalCardProfileListResponse, ) async def archive( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 818ed4baf..c4326af92 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.physical_card import PhysicalCard +from ..types.physical_card_list_response import PhysicalCardListResponse __all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] @@ -202,7 +202,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[PhysicalCard]: + ) -> PhysicalCardListResponse: """ List Physical Cards @@ -227,9 +227,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/physical_cards", - page=SyncPage[PhysicalCard], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -246,7 +245,7 @@ def list( physical_card_list_params.PhysicalCardListParams, ), ), - model=PhysicalCard, + cast_to=PhysicalCardListResponse, ) @@ -414,7 +413,7 @@ async def update( cast_to=PhysicalCard, ) - def list( + async def list( self, *, card_id: str | Omit = omit, @@ -428,7 +427,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[PhysicalCard, AsyncPage[PhysicalCard]]: + ) -> PhysicalCardListResponse: """ List Physical Cards @@ -453,15 +452,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/physical_cards", - page=AsyncPage[PhysicalCard], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "card_id": card_id, "created_at": created_at, @@ -472,7 +470,7 @@ def list( physical_card_list_params.PhysicalCardListParams, ), ), - model=PhysicalCard, + cast_to=PhysicalCardListResponse, ) diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 9130af3fc..50450bc42 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -6,7 +6,7 @@ from ..types import program_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.program import Program +from ..types.program_list_response import ProgramListResponse __all__ = ["ProgramsResource", "AsyncProgramsResource"] @@ -88,7 +88,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Program]: + ) -> ProgramListResponse: """ List Programs @@ -106,9 +106,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/programs", - page=SyncPage[Program], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -122,7 +121,7 @@ def list( program_list_params.ProgramListParams, ), ), - model=Program, + cast_to=ProgramListResponse, ) @@ -181,7 +180,7 @@ async def retrieve( cast_to=Program, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -192,7 +191,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Program, AsyncPage[Program]]: + ) -> ProgramListResponse: """ List Programs @@ -210,15 +209,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/programs", - page=AsyncPage[Program], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "limit": limit, @@ -226,7 +224,7 @@ def list( program_list_params.ProgramListParams, ), ), - model=Program, + cast_to=ProgramListResponse, ) diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 40605dc8e..6436c5c9a 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer +from ..types.real_time_payments_transfer_list_response import RealTimePaymentsTransferListResponse __all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] @@ -188,7 +188,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[RealTimePaymentsTransfer]: + ) -> RealTimePaymentsTransferListResponse: """ List Real-Time Payments Transfers @@ -216,9 +216,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/real_time_payments_transfers", - page=SyncPage[RealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -237,7 +236,7 @@ def list( real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), ), - model=RealTimePaymentsTransfer, + cast_to=RealTimePaymentsTransferListResponse, ) def approve( @@ -479,7 +478,7 @@ async def retrieve( cast_to=RealTimePaymentsTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -495,7 +494,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[RealTimePaymentsTransfer, AsyncPage[RealTimePaymentsTransfer]]: + ) -> RealTimePaymentsTransferListResponse: """ List Real-Time Payments Transfers @@ -523,15 +522,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/real_time_payments_transfers", - page=AsyncPage[RealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -544,7 +542,7 @@ def list( real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), ), - model=RealTimePaymentsTransfer, + cast_to=RealTimePaymentsTransferListResponse, ) async def approve( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 569b565d2..8546d695d 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -6,7 +6,7 @@ from ..types import routing_number_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,8 +15,7 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.routing_number_list_response import RoutingNumberListResponse __all__ = ["RoutingNumbersResource", "AsyncRoutingNumbersResource"] @@ -54,7 +53,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[RoutingNumberListResponse]: + ) -> RoutingNumberListResponse: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -77,9 +76,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/routing_numbers", - page=SyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -94,7 +92,7 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumberListResponse, + cast_to=RoutingNumberListResponse, ) @@ -118,7 +116,7 @@ def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingRes """ return AsyncRoutingNumbersResourceWithStreamingResponse(self) - def list( + async def list( self, *, routing_number: str, @@ -130,7 +128,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: + ) -> RoutingNumberListResponse: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -153,15 +151,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/routing_numbers", - page=AsyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "routing_number": routing_number, "cursor": cursor, @@ -170,7 +167,7 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - model=RoutingNumberListResponse, + cast_to=RoutingNumberListResponse, ) diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index adb9d9645..52735403f 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.entity_supplemental_document import EntitySupplementalDocument +from ..types.supplemental_document_list_response import SupplementalDocumentListResponse __all__ = ["SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource"] @@ -105,7 +105,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[EntitySupplementalDocument]: + ) -> SupplementalDocumentListResponse: """ List Entity Supplemental Document Submissions @@ -130,9 +130,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/entity_supplemental_documents", - page=SyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -148,7 +147,7 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=EntitySupplementalDocument, + cast_to=SupplementalDocumentListResponse, ) @@ -222,7 +221,7 @@ async def create( cast_to=EntitySupplementalDocument, ) - def list( + async def list( self, *, entity_id: str, @@ -235,7 +234,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: + ) -> SupplementalDocumentListResponse: """ List Entity Supplemental Document Submissions @@ -260,15 +259,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/entity_supplemental_documents", - page=AsyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "entity_id": entity_id, "cursor": cursor, @@ -278,7 +276,7 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - model=EntitySupplementalDocument, + cast_to=SupplementalDocumentListResponse, ) diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index d61dda617..81aa2facd 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -6,7 +6,7 @@ from ..types import transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.transaction import Transaction +from ..types.transaction_list_response import TransactionListResponse __all__ = ["TransactionsResource", "AsyncTransactionsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Transaction]: + ) -> TransactionListResponse: """ List Transactions @@ -115,9 +115,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/transactions", - page=SyncPage[Transaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,7 +134,7 @@ def list( transaction_list_params.TransactionListParams, ), ), - model=Transaction, + cast_to=TransactionListResponse, ) @@ -194,7 +193,7 @@ async def retrieve( cast_to=Transaction, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -209,7 +208,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Transaction, AsyncPage[Transaction]]: + ) -> TransactionListResponse: """ List Transactions @@ -232,15 +231,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/transactions", - page=AsyncPage[Transaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "category": category, @@ -252,7 +250,7 @@ def list( transaction_list_params.TransactionListParams, ), ), - model=Transaction, + cast_to=TransactionListResponse, ) diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index ee73f74d0..2836d5019 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest +from ..types.wire_drawdown_request_list_response import WireDrawdownRequestListResponse __all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] @@ -175,7 +175,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[WireDrawdownRequest]: + ) -> WireDrawdownRequestListResponse: """ List Wire Drawdown Requests @@ -198,9 +198,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/wire_drawdown_requests", - page=SyncPage[WireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -216,7 +215,7 @@ def list( wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), ), - model=WireDrawdownRequest, + cast_to=WireDrawdownRequestListResponse, ) @@ -360,7 +359,7 @@ async def retrieve( cast_to=WireDrawdownRequest, ) - def list( + async def list( self, *, cursor: str | Omit = omit, @@ -373,7 +372,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[WireDrawdownRequest, AsyncPage[WireDrawdownRequest]]: + ) -> WireDrawdownRequestListResponse: """ List Wire Drawdown Requests @@ -396,15 +395,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/wire_drawdown_requests", - page=AsyncPage[WireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -414,7 +412,7 @@ def list( wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), ), - model=WireDrawdownRequest, + cast_to=WireDrawdownRequestListResponse, ) diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 080468288..40d3d3ed8 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options +from .._base_client import make_request_options from ..types.wire_transfer import WireTransfer +from ..types.wire_transfer_list_response import WireTransferListResponse __all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] @@ -183,7 +183,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[WireTransfer]: + ) -> WireTransferListResponse: """ List Wire Transfers @@ -210,9 +210,8 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return self._get( "/wire_transfers", - page=SyncPage[WireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -230,7 +229,7 @@ def list( wire_transfer_list_params.WireTransferListParams, ), ), - model=WireTransfer, + cast_to=WireTransferListResponse, ) def approve( @@ -464,7 +463,7 @@ async def retrieve( cast_to=WireTransfer, ) - def list( + async def list( self, *, account_id: str | Omit = omit, @@ -479,7 +478,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[WireTransfer, AsyncPage[WireTransfer]]: + ) -> WireTransferListResponse: """ List Wire Transfers @@ -506,15 +505,14 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get_api_list( + return await self._get( "/wire_transfers", - page=AsyncPage[WireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=maybe_transform( + query=await async_maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -526,7 +524,7 @@ def list( wire_transfer_list_params.WireTransferListParams, ), ), - model=WireTransfer, + cast_to=WireTransferListResponse, ) async def approve( diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 6eaf9bf97..e798c8ed1 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -42,16 +42,19 @@ from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .oauth_application import OAuthApplication as OAuthApplication from .card_create_params import CardCreateParams as CardCreateParams +from .card_list_response import CardListResponse as CardListResponse from .card_push_transfer import CardPushTransfer as CardPushTransfer from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams from .event_subscription import EventSubscription as EventSubscription from .export_list_params import ExportListParams as ExportListParams from .file_create_params import FileCreateParams as FileCreateParams +from .file_list_response import FileListResponse as FileListResponse from .real_time_decision import RealTimeDecision as RealTimeDecision from .account_list_params import AccountListParams as AccountListParams from .ach_prenotification import ACHPrenotification as ACHPrenotification from .bookkeeping_account import BookkeepingAccount as BookkeepingAccount +from .event_list_response import EventListResponse as EventListResponse from .lockbox_list_params import LockboxListParams as LockboxListParams from .pending_transaction import PendingTransaction as PendingTransaction from .program_list_params import ProgramListParams as ProgramListParams @@ -60,23 +63,29 @@ from .digital_wallet_token import DigitalWalletToken as DigitalWalletToken from .document_list_params import DocumentListParams as DocumentListParams from .entity_create_params import EntityCreateParams as EntityCreateParams +from .entity_list_response import EntityListResponse as EntityListResponse from .entity_update_params import EntityUpdateParams as EntityUpdateParams from .export_create_params import ExportCreateParams as ExportCreateParams +from .export_list_response import ExportListResponse as ExportListResponse from .inbound_ach_transfer import InboundACHTransfer as InboundACHTransfer from .account_create_params import AccountCreateParams as AccountCreateParams +from .account_list_response import AccountListResponse as AccountListResponse from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams +from .lockbox_list_response import LockboxListResponse as LockboxListResponse from .lockbox_update_params import LockboxUpdateParams as LockboxUpdateParams from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile +from .program_list_response import ProgramListResponse as ProgramListResponse from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams from .card_token_list_params import CardTokenListParams as CardTokenListParams from .card_update_pin_params import CardUpdatePinParams as CardUpdatePinParams from .document_create_params import DocumentCreateParams as DocumentCreateParams +from .document_list_response import DocumentListResponse as DocumentListResponse from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .inbound_fednow_transfer import InboundFednowTransfer as InboundFednowTransfer @@ -85,28 +94,38 @@ from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement +from .card_token_list_response import CardTokenListResponse as CardTokenListResponse from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams +from .transaction_list_response import TransactionListResponse as TransactionListResponse from .wire_transfer_list_params import WireTransferListParams as WireTransferListParams from .account_number_list_params import AccountNumberListParams as AccountNumberListParams from .ach_transfer_create_params import ACHTransferCreateParams as ACHTransferCreateParams +from .ach_transfer_list_response import ACHTransferListResponse as ACHTransferListResponse from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams +from .card_dispute_list_response import CardDisputeListResponse as CardDisputeListResponse +from .card_payment_list_response import CardPaymentListResponse as CardPaymentListResponse from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .card_validation_list_params import CardValidationListParams as CardValidationListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams +from .check_deposit_list_response import CheckDepositListResponse as CheckDepositListResponse from .fednow_transfer_list_params import FednowTransferListParams as FednowTransferListParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams +from .physical_card_list_response import PhysicalCardListResponse as PhysicalCardListResponse from .physical_card_update_params import PhysicalCardUpdateParams as PhysicalCardUpdateParams from .real_time_payments_transfer import RealTimePaymentsTransfer as RealTimePaymentsTransfer from .wire_transfer_create_params import WireTransferCreateParams as WireTransferCreateParams +from .wire_transfer_list_response import WireTransferListResponse as WireTransferListResponse from .account_number_create_params import AccountNumberCreateParams as AccountNumberCreateParams +from .account_number_list_response import AccountNumberListResponse as AccountNumberListResponse from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams +from .check_transfer_list_response import CheckTransferListResponse as CheckTransferListResponse from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams @@ -115,31 +134,45 @@ from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .card_validation_create_params import CardValidationCreateParams as CardValidationCreateParams +from .card_validation_list_response import CardValidationListResponse as CardValidationListResponse from .fednow_transfer_create_params import FednowTransferCreateParams as FednowTransferCreateParams +from .fednow_transfer_list_response import FednowTransferListResponse as FednowTransferListResponse from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams +from .account_transfer_list_response import AccountTransferListResponse as AccountTransferListResponse from .card_push_transfer_list_params import CardPushTransferListParams as CardPushTransferListParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams +from .external_account_list_response import ExternalAccountListResponse as ExternalAccountListResponse from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams +from .oauth_connection_list_response import OAuthConnectionListResponse as OAuthConnectionListResponse +from .account_statement_list_response import AccountStatementListResponse as AccountStatementListResponse from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams +from .bookkeeping_entry_list_response import BookkeepingEntryListResponse as BookkeepingEntryListResponse from .inbound_mail_item_action_params import InboundMailItemActionParams as InboundMailItemActionParams +from .inbound_mail_item_list_response import InboundMailItemListResponse as InboundMailItemListResponse from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams +from .intrafi_exclusion_list_response import IntrafiExclusionListResponse as IntrafiExclusionListResponse +from .oauth_application_list_response import OAuthApplicationListResponse as OAuthApplicationListResponse from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .card_push_transfer_create_params import CardPushTransferCreateParams as CardPushTransferCreateParams +from .card_push_transfer_list_response import CardPushTransferListResponse as CardPushTransferListResponse from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams from .digital_wallet_token_list_params import DigitalWalletTokenListParams as DigitalWalletTokenListParams from .event_subscription_create_params import EventSubscriptionCreateParams as EventSubscriptionCreateParams +from .event_subscription_list_response import EventSubscriptionListResponse as EventSubscriptionListResponse from .event_subscription_update_params import EventSubscriptionUpdateParams as EventSubscriptionUpdateParams from .inbound_ach_transfer_list_params import InboundACHTransferListParams as InboundACHTransferListParams from .real_time_decision_action_params import RealTimeDecisionActionParams as RealTimeDecisionActionParams from .ach_prenotification_create_params import ACHPrenotificationCreateParams as ACHPrenotificationCreateParams +from .ach_prenotification_list_response import ACHPrenotificationListResponse as ACHPrenotificationListResponse from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams +from .bookkeeping_account_list_response import BookkeepingAccountListResponse as BookkeepingAccountListResponse from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams @@ -147,27 +180,44 @@ from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .pending_transaction_create_params import PendingTransactionCreateParams as PendingTransactionCreateParams +from .pending_transaction_list_response import PendingTransactionListResponse as PendingTransactionListResponse from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams +from .declined_transaction_list_response import DeclinedTransactionListResponse as DeclinedTransactionListResponse from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams +from .digital_card_profile_list_response import DigitalCardProfileListResponse as DigitalCardProfileListResponse +from .digital_wallet_token_list_response import DigitalWalletTokenListResponse as DigitalWalletTokenListResponse from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams +from .inbound_ach_transfer_list_response import InboundACHTransferListResponse as InboundACHTransferListResponse from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams +from .bookkeeping_entry_set_list_response import BookkeepingEntrySetListResponse as BookkeepingEntrySetListResponse from .inbound_ach_transfer_decline_params import InboundACHTransferDeclineParams as InboundACHTransferDeclineParams +from .inbound_check_deposit_list_response import InboundCheckDepositListResponse as InboundCheckDepositListResponse from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .inbound_fednow_transfer_list_params import InboundFednowTransferListParams as InboundFednowTransferListParams from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer as InboundRealTimePaymentsTransfer +from .inbound_wire_transfer_list_response import InboundWireTransferListResponse as InboundWireTransferListResponse from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams +from .physical_card_profile_list_response import PhysicalCardProfileListResponse as PhysicalCardProfileListResponse from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams +from .supplemental_document_list_response import SupplementalDocumentListResponse as SupplementalDocumentListResponse from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams +from .wire_drawdown_request_list_response import WireDrawdownRequestListResponse as WireDrawdownRequestListResponse from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams from .inbound_wire_transfer_reverse_params import InboundWireTransferReverseParams as InboundWireTransferReverseParams from .entity_create_beneficial_owner_params import ( EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, ) +from .inbound_fednow_transfer_list_response import ( + InboundFednowTransferListResponse as InboundFednowTransferListResponse, +) +from .card_purchase_supplement_list_response import ( + CardPurchaseSupplementListResponse as CardPurchaseSupplementListResponse, +) from .entity_archive_beneficial_owner_params import ( EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, ) @@ -180,24 +230,36 @@ from .intrafi_account_enrollment_create_params import ( IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, ) +from .intrafi_account_enrollment_list_response import ( + IntrafiAccountEnrollmentListResponse as IntrafiAccountEnrollmentListResponse, +) from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) +from .real_time_payments_transfer_list_response import ( + RealTimePaymentsTransferListResponse as RealTimePaymentsTransferListResponse, +) from .card_dispute_submit_user_submission_params import ( CardDisputeSubmitUserSubmissionParams as CardDisputeSubmitUserSubmissionParams, ) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) +from .inbound_wire_drawdown_request_list_response import ( + InboundWireDrawdownRequestListResponse as InboundWireDrawdownRequestListResponse, +) from .entity_update_beneficial_owner_address_params import ( EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, ) from .inbound_real_time_payments_transfer_list_params import ( InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, ) +from .inbound_real_time_payments_transfer_list_response import ( + InboundRealTimePaymentsTransferListResponse as InboundRealTimePaymentsTransferListResponse, +) from .inbound_ach_transfer_create_notification_of_change_params import ( InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, ) diff --git a/src/increase/types/account_list_response.py b/src/increase/types/account_list_response.py new file mode 100644 index 000000000..4e47c0746 --- /dev/null +++ b/src/increase/types/account_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .account import Account +from .._models import BaseModel + +__all__ = ["AccountListResponse"] + + +class AccountListResponse(BaseModel): + data: List[Account] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_number_list_response.py b/src/increase/types/account_number_list_response.py new file mode 100644 index 000000000..314a01c9d --- /dev/null +++ b/src/increase/types/account_number_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .account_number import AccountNumber + +__all__ = ["AccountNumberListResponse"] + + +class AccountNumberListResponse(BaseModel): + data: List[AccountNumber] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_statement_list_response.py b/src/increase/types/account_statement_list_response.py new file mode 100644 index 000000000..e4e2c39c8 --- /dev/null +++ b/src/increase/types/account_statement_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .account_statement import AccountStatement + +__all__ = ["AccountStatementListResponse"] + + +class AccountStatementListResponse(BaseModel): + data: List[AccountStatement] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_transfer_list_response.py b/src/increase/types/account_transfer_list_response.py new file mode 100644 index 000000000..7dff07834 --- /dev/null +++ b/src/increase/types/account_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .account_transfer import AccountTransfer + +__all__ = ["AccountTransferListResponse"] + + +class AccountTransferListResponse(BaseModel): + data: List[AccountTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/ach_prenotification_list_response.py b/src/increase/types/ach_prenotification_list_response.py new file mode 100644 index 000000000..a782c2f2d --- /dev/null +++ b/src/increase/types/ach_prenotification_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .ach_prenotification import ACHPrenotification + +__all__ = ["ACHPrenotificationListResponse"] + + +class ACHPrenotificationListResponse(BaseModel): + data: List[ACHPrenotification] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/ach_transfer_list_response.py b/src/increase/types/ach_transfer_list_response.py new file mode 100644 index 000000000..25902d2c7 --- /dev/null +++ b/src/increase/types/ach_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .ach_transfer import ACHTransfer + +__all__ = ["ACHTransferListResponse"] + + +class ACHTransferListResponse(BaseModel): + data: List[ACHTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_account_list_response.py b/src/increase/types/bookkeeping_account_list_response.py new file mode 100644 index 000000000..efede11c4 --- /dev/null +++ b/src/increase/types/bookkeeping_account_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .bookkeeping_account import BookkeepingAccount + +__all__ = ["BookkeepingAccountListResponse"] + + +class BookkeepingAccountListResponse(BaseModel): + data: List[BookkeepingAccount] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_entry_list_response.py b/src/increase/types/bookkeeping_entry_list_response.py new file mode 100644 index 000000000..ee89ccacf --- /dev/null +++ b/src/increase/types/bookkeeping_entry_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .bookkeeping_entry import BookkeepingEntry + +__all__ = ["BookkeepingEntryListResponse"] + + +class BookkeepingEntryListResponse(BaseModel): + data: List[BookkeepingEntry] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_entry_set_list_response.py b/src/increase/types/bookkeeping_entry_set_list_response.py new file mode 100644 index 000000000..d890a6ea6 --- /dev/null +++ b/src/increase/types/bookkeeping_entry_set_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .bookkeeping_entry_set import BookkeepingEntrySet + +__all__ = ["BookkeepingEntrySetListResponse"] + + +class BookkeepingEntrySetListResponse(BaseModel): + data: List[BookkeepingEntrySet] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_dispute_list_response.py b/src/increase/types/card_dispute_list_response.py new file mode 100644 index 000000000..0b89989e1 --- /dev/null +++ b/src/increase/types/card_dispute_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_dispute import CardDispute + +__all__ = ["CardDisputeListResponse"] + + +class CardDisputeListResponse(BaseModel): + data: List[CardDispute] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_list_response.py b/src/increase/types/card_list_response.py new file mode 100644 index 000000000..b85edf426 --- /dev/null +++ b/src/increase/types/card_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .card import Card +from .._models import BaseModel + +__all__ = ["CardListResponse"] + + +class CardListResponse(BaseModel): + data: List[Card] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_payment_list_response.py b/src/increase/types/card_payment_list_response.py new file mode 100644 index 000000000..5d87ddb6e --- /dev/null +++ b/src/increase/types/card_payment_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_payment import CardPayment + +__all__ = ["CardPaymentListResponse"] + + +class CardPaymentListResponse(BaseModel): + data: List[CardPayment] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_purchase_supplement_list_response.py b/src/increase/types/card_purchase_supplement_list_response.py new file mode 100644 index 000000000..b30e1be14 --- /dev/null +++ b/src/increase/types/card_purchase_supplement_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_purchase_supplement import CardPurchaseSupplement + +__all__ = ["CardPurchaseSupplementListResponse"] + + +class CardPurchaseSupplementListResponse(BaseModel): + data: List[CardPurchaseSupplement] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_push_transfer_list_response.py b/src/increase/types/card_push_transfer_list_response.py new file mode 100644 index 000000000..73cbe9d10 --- /dev/null +++ b/src/increase/types/card_push_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_push_transfer import CardPushTransfer + +__all__ = ["CardPushTransferListResponse"] + + +class CardPushTransferListResponse(BaseModel): + data: List[CardPushTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_token_list_response.py b/src/increase/types/card_token_list_response.py new file mode 100644 index 000000000..58e5983c4 --- /dev/null +++ b/src/increase/types/card_token_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_token import CardToken + +__all__ = ["CardTokenListResponse"] + + +class CardTokenListResponse(BaseModel): + data: List[CardToken] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_validation_list_response.py b/src/increase/types/card_validation_list_response.py new file mode 100644 index 000000000..df2980ffd --- /dev/null +++ b/src/increase/types/card_validation_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .card_validation import CardValidation + +__all__ = ["CardValidationListResponse"] + + +class CardValidationListResponse(BaseModel): + data: List[CardValidation] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_deposit_list_response.py b/src/increase/types/check_deposit_list_response.py new file mode 100644 index 000000000..0c3c61711 --- /dev/null +++ b/src/increase/types/check_deposit_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .check_deposit import CheckDeposit + +__all__ = ["CheckDepositListResponse"] + + +class CheckDepositListResponse(BaseModel): + data: List[CheckDeposit] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_transfer_list_response.py b/src/increase/types/check_transfer_list_response.py new file mode 100644 index 000000000..5c3fbeaf7 --- /dev/null +++ b/src/increase/types/check_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .check_transfer import CheckTransfer + +__all__ = ["CheckTransferListResponse"] + + +class CheckTransferListResponse(BaseModel): + data: List[CheckTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/declined_transaction_list_response.py b/src/increase/types/declined_transaction_list_response.py new file mode 100644 index 000000000..1b0e0a202 --- /dev/null +++ b/src/increase/types/declined_transaction_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .declined_transaction import DeclinedTransaction + +__all__ = ["DeclinedTransactionListResponse"] + + +class DeclinedTransactionListResponse(BaseModel): + data: List[DeclinedTransaction] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/digital_card_profile_list_response.py b/src/increase/types/digital_card_profile_list_response.py new file mode 100644 index 000000000..7cbdf20bc --- /dev/null +++ b/src/increase/types/digital_card_profile_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .digital_card_profile import DigitalCardProfile + +__all__ = ["DigitalCardProfileListResponse"] + + +class DigitalCardProfileListResponse(BaseModel): + data: List[DigitalCardProfile] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/digital_wallet_token_list_response.py b/src/increase/types/digital_wallet_token_list_response.py new file mode 100644 index 000000000..92365ce71 --- /dev/null +++ b/src/increase/types/digital_wallet_token_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .digital_wallet_token import DigitalWalletToken + +__all__ = ["DigitalWalletTokenListResponse"] + + +class DigitalWalletTokenListResponse(BaseModel): + data: List[DigitalWalletToken] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/document_list_response.py b/src/increase/types/document_list_response.py new file mode 100644 index 000000000..e55dbd33a --- /dev/null +++ b/src/increase/types/document_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .document import Document + +__all__ = ["DocumentListResponse"] + + +class DocumentListResponse(BaseModel): + data: List[Document] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/entity_list_response.py b/src/increase/types/entity_list_response.py new file mode 100644 index 000000000..01947e53f --- /dev/null +++ b/src/increase/types/entity_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .entity import Entity +from .._models import BaseModel + +__all__ = ["EntityListResponse"] + + +class EntityListResponse(BaseModel): + data: List[Entity] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/event_list_response.py b/src/increase/types/event_list_response.py new file mode 100644 index 000000000..c19eeb060 --- /dev/null +++ b/src/increase/types/event_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .event import Event +from .._models import BaseModel + +__all__ = ["EventListResponse"] + + +class EventListResponse(BaseModel): + data: List[Event] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/event_subscription_list_response.py b/src/increase/types/event_subscription_list_response.py new file mode 100644 index 000000000..9cebc95f4 --- /dev/null +++ b/src/increase/types/event_subscription_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .event_subscription import EventSubscription + +__all__ = ["EventSubscriptionListResponse"] + + +class EventSubscriptionListResponse(BaseModel): + data: List[EventSubscription] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/export_list_response.py b/src/increase/types/export_list_response.py new file mode 100644 index 000000000..711ac5d94 --- /dev/null +++ b/src/increase/types/export_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .export import Export +from .._models import BaseModel + +__all__ = ["ExportListResponse"] + + +class ExportListResponse(BaseModel): + data: List[Export] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/external_account_list_response.py b/src/increase/types/external_account_list_response.py new file mode 100644 index 000000000..998c5af1e --- /dev/null +++ b/src/increase/types/external_account_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .external_account import ExternalAccount + +__all__ = ["ExternalAccountListResponse"] + + +class ExternalAccountListResponse(BaseModel): + data: List[ExternalAccount] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/fednow_transfer_list_response.py b/src/increase/types/fednow_transfer_list_response.py new file mode 100644 index 000000000..f8702c2c6 --- /dev/null +++ b/src/increase/types/fednow_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .fednow_transfer import FednowTransfer + +__all__ = ["FednowTransferListResponse"] + + +class FednowTransferListResponse(BaseModel): + data: List[FednowTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/file_list_response.py b/src/increase/types/file_list_response.py new file mode 100644 index 000000000..a3f746343 --- /dev/null +++ b/src/increase/types/file_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .file import File +from .._models import BaseModel + +__all__ = ["FileListResponse"] + + +class FileListResponse(BaseModel): + data: List[File] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_ach_transfer_list_response.py b/src/increase/types/inbound_ach_transfer_list_response.py new file mode 100644 index 000000000..c81705c0d --- /dev/null +++ b/src/increase/types/inbound_ach_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_ach_transfer import InboundACHTransfer + +__all__ = ["InboundACHTransferListResponse"] + + +class InboundACHTransferListResponse(BaseModel): + data: List[InboundACHTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_check_deposit_list_response.py b/src/increase/types/inbound_check_deposit_list_response.py new file mode 100644 index 000000000..eff7dd4c7 --- /dev/null +++ b/src/increase/types/inbound_check_deposit_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_check_deposit import InboundCheckDeposit + +__all__ = ["InboundCheckDepositListResponse"] + + +class InboundCheckDepositListResponse(BaseModel): + data: List[InboundCheckDeposit] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_fednow_transfer_list_response.py b/src/increase/types/inbound_fednow_transfer_list_response.py new file mode 100644 index 000000000..6c116adb6 --- /dev/null +++ b/src/increase/types/inbound_fednow_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_fednow_transfer import InboundFednowTransfer + +__all__ = ["InboundFednowTransferListResponse"] + + +class InboundFednowTransferListResponse(BaseModel): + data: List[InboundFednowTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_mail_item_list_response.py b/src/increase/types/inbound_mail_item_list_response.py new file mode 100644 index 000000000..7770553f5 --- /dev/null +++ b/src/increase/types/inbound_mail_item_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_mail_item import InboundMailItem + +__all__ = ["InboundMailItemListResponse"] + + +class InboundMailItemListResponse(BaseModel): + data: List[InboundMailItem] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_real_time_payments_transfer_list_response.py b/src/increase/types/inbound_real_time_payments_transfer_list_response.py new file mode 100644 index 000000000..9bd2b08ee --- /dev/null +++ b/src/increase/types/inbound_real_time_payments_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer + +__all__ = ["InboundRealTimePaymentsTransferListResponse"] + + +class InboundRealTimePaymentsTransferListResponse(BaseModel): + data: List[InboundRealTimePaymentsTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_drawdown_request_list_response.py b/src/increase/types/inbound_wire_drawdown_request_list_response.py new file mode 100644 index 000000000..d31dd0d08 --- /dev/null +++ b/src/increase/types/inbound_wire_drawdown_request_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_wire_drawdown_request import InboundWireDrawdownRequest + +__all__ = ["InboundWireDrawdownRequestListResponse"] + + +class InboundWireDrawdownRequestListResponse(BaseModel): + data: List[InboundWireDrawdownRequest] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_transfer_list_response.py b/src/increase/types/inbound_wire_transfer_list_response.py new file mode 100644 index 000000000..f2453fb24 --- /dev/null +++ b/src/increase/types/inbound_wire_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .inbound_wire_transfer import InboundWireTransfer + +__all__ = ["InboundWireTransferListResponse"] + + +class InboundWireTransferListResponse(BaseModel): + data: List[InboundWireTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/intrafi_account_enrollment_list_response.py b/src/increase/types/intrafi_account_enrollment_list_response.py new file mode 100644 index 000000000..fff7494fc --- /dev/null +++ b/src/increase/types/intrafi_account_enrollment_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .intrafi_account_enrollment import IntrafiAccountEnrollment + +__all__ = ["IntrafiAccountEnrollmentListResponse"] + + +class IntrafiAccountEnrollmentListResponse(BaseModel): + data: List[IntrafiAccountEnrollment] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/intrafi_exclusion_list_response.py b/src/increase/types/intrafi_exclusion_list_response.py new file mode 100644 index 000000000..ff1d9ae46 --- /dev/null +++ b/src/increase/types/intrafi_exclusion_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .intrafi_exclusion import IntrafiExclusion + +__all__ = ["IntrafiExclusionListResponse"] + + +class IntrafiExclusionListResponse(BaseModel): + data: List[IntrafiExclusion] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/lockbox_list_response.py b/src/increase/types/lockbox_list_response.py new file mode 100644 index 000000000..092b37254 --- /dev/null +++ b/src/increase/types/lockbox_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .lockbox import Lockbox +from .._models import BaseModel + +__all__ = ["LockboxListResponse"] + + +class LockboxListResponse(BaseModel): + data: List[Lockbox] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/oauth_application_list_response.py b/src/increase/types/oauth_application_list_response.py new file mode 100644 index 000000000..9ac9647c7 --- /dev/null +++ b/src/increase/types/oauth_application_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .oauth_application import OAuthApplication + +__all__ = ["OAuthApplicationListResponse"] + + +class OAuthApplicationListResponse(BaseModel): + data: List[OAuthApplication] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/oauth_connection_list_response.py b/src/increase/types/oauth_connection_list_response.py new file mode 100644 index 000000000..828bfe805 --- /dev/null +++ b/src/increase/types/oauth_connection_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .oauth_connection import OAuthConnection + +__all__ = ["OAuthConnectionListResponse"] + + +class OAuthConnectionListResponse(BaseModel): + data: List[OAuthConnection] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/pending_transaction_list_response.py b/src/increase/types/pending_transaction_list_response.py new file mode 100644 index 000000000..ee304363b --- /dev/null +++ b/src/increase/types/pending_transaction_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .pending_transaction import PendingTransaction + +__all__ = ["PendingTransactionListResponse"] + + +class PendingTransactionListResponse(BaseModel): + data: List[PendingTransaction] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/physical_card_list_response.py b/src/increase/types/physical_card_list_response.py new file mode 100644 index 000000000..3f7ecb0b4 --- /dev/null +++ b/src/increase/types/physical_card_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .physical_card import PhysicalCard + +__all__ = ["PhysicalCardListResponse"] + + +class PhysicalCardListResponse(BaseModel): + data: List[PhysicalCard] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/physical_card_profile_list_response.py b/src/increase/types/physical_card_profile_list_response.py new file mode 100644 index 000000000..de23c3d0b --- /dev/null +++ b/src/increase/types/physical_card_profile_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .physical_card_profile import PhysicalCardProfile + +__all__ = ["PhysicalCardProfileListResponse"] + + +class PhysicalCardProfileListResponse(BaseModel): + data: List[PhysicalCardProfile] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/program_list_response.py b/src/increase/types/program_list_response.py new file mode 100644 index 000000000..365a6f308 --- /dev/null +++ b/src/increase/types/program_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .program import Program +from .._models import BaseModel + +__all__ = ["ProgramListResponse"] + + +class ProgramListResponse(BaseModel): + data: List[Program] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/real_time_payments_transfer_list_response.py b/src/increase/types/real_time_payments_transfer_list_response.py new file mode 100644 index 000000000..21d077c59 --- /dev/null +++ b/src/increase/types/real_time_payments_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .real_time_payments_transfer import RealTimePaymentsTransfer + +__all__ = ["RealTimePaymentsTransferListResponse"] + + +class RealTimePaymentsTransferListResponse(BaseModel): + data: List[RealTimePaymentsTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py index 4b7bd3d75..c0cdc6913 100644 --- a/src/increase/types/routing_number_list_response.py +++ b/src/increase/types/routing_number_list_response.py @@ -1,13 +1,16 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import TYPE_CHECKING, Dict, List, Optional from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel -__all__ = ["RoutingNumberListResponse"] +__all__ = ["RoutingNumberListResponse", "Data"] -class RoutingNumberListResponse(BaseModel): +class Data(BaseModel): ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. @@ -47,3 +50,23 @@ class RoutingNumberListResponse(BaseModel): - `supported` - The routing number can receive this transfer type. - `not_supported` - The routing number cannot receive this transfer type. """ + + +class RoutingNumberListResponse(BaseModel): + data: List[Data] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/supplemental_document_list_response.py b/src/increase/types/supplemental_document_list_response.py new file mode 100644 index 000000000..7910e0bb6 --- /dev/null +++ b/src/increase/types/supplemental_document_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .entity_supplemental_document import EntitySupplementalDocument + +__all__ = ["SupplementalDocumentListResponse"] + + +class SupplementalDocumentListResponse(BaseModel): + data: List[EntitySupplementalDocument] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/transaction_list_response.py b/src/increase/types/transaction_list_response.py new file mode 100644 index 000000000..c09e09583 --- /dev/null +++ b/src/increase/types/transaction_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .transaction import Transaction + +__all__ = ["TransactionListResponse"] + + +class TransactionListResponse(BaseModel): + data: List[Transaction] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_drawdown_request_list_response.py b/src/increase/types/wire_drawdown_request_list_response.py new file mode 100644 index 000000000..2ea3043b7 --- /dev/null +++ b/src/increase/types/wire_drawdown_request_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .wire_drawdown_request import WireDrawdownRequest + +__all__ = ["WireDrawdownRequestListResponse"] + + +class WireDrawdownRequestListResponse(BaseModel): + data: List[WireDrawdownRequest] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_transfer_list_response.py b/src/increase/types/wire_transfer_list_response.py new file mode 100644 index 000000000..b6566a167 --- /dev/null +++ b/src/increase/types/wire_transfer_list_response.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional + +from pydantic import Field as FieldInfo + +from .._models import BaseModel +from .wire_transfer import WireTransfer + +__all__ = ["WireTransferListResponse"] + + +class WireTransferListResponse(BaseModel): + data: List[WireTransfer] + """The contents of the list.""" + + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index d97124c78..6223cf6c2 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( AccountNumber, + AccountNumberListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -155,7 +155,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_number = client.account_numbers.list() - assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -173,7 +173,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -182,7 +182,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = response.parse() - assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -191,7 +191,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = response.parse() - assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -335,7 +335,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list() - assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -353,7 +353,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -362,7 +362,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = await response.parse() - assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -371,6 +371,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = await response.parse() - assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) + assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index 0caeb7f48..23c46c977 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountStatement +from increase.types import AccountStatement, AccountStatementListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_statement = client.account_statements.list() - assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -75,7 +74,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, ) - assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -84,7 +83,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = response.parse() - assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -93,7 +92,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = response.parse() - assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +143,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_statement = await async_client.account_statements.list() - assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -159,7 +158,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, ) - assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -168,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = await response.parse() - assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -177,6 +176,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = await response.parse() - assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) + assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index 02f608a43..ed14e99c2 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountTransfer +from increase.types import ( + AccountTransfer, + AccountTransferListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -111,7 +113,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_transfer = client.account_transfers.list() - assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -127,7 +129,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -136,7 +138,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = response.parse() - assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -145,7 +147,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = response.parse() - assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -323,7 +325,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.list() - assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -339,7 +341,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -348,7 +350,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = await response.parse() - assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -357,7 +359,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = await response.parse() - assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) + assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d6edc5ab9..e9b995967 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -12,9 +12,9 @@ from increase.types import ( Account, BalanceLookup, + AccountListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -151,7 +151,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account = client.accounts.list() - assert_matches_type(SyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -170,7 +170,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: program_id="program_id", status={"in": ["closed"]}, ) - assert_matches_type(SyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -179,7 +179,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = response.parse() - assert_matches_type(SyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -188,7 +188,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = response.parse() - assert_matches_type(SyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -411,7 +411,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.list() - assert_matches_type(AsyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -430,7 +430,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> program_id="program_id", status={"in": ["closed"]}, ) - assert_matches_type(AsyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -439,7 +439,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = await response.parse() - assert_matches_type(AsyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -448,7 +448,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = await response.parse() - assert_matches_type(AsyncPage[Account], account, path=["response"]) + assert_matches_type(AccountListResponse, account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index c86c20448..36739941a 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHPrenotification +from increase.types import ( + ACHPrenotification, + ACHPrenotificationListResponse, +) from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -118,7 +120,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.list() - assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -133,7 +135,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -142,7 +144,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = response.parse() - assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -151,7 +153,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = response.parse() - assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) assert cast(Any, response.is_closed) is True @@ -260,7 +262,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.list() - assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -275,7 +277,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -284,7 +286,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = await response.parse() - assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -293,6 +295,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = await response.parse() - assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) + assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index 103899c14..c323e54fb 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer +from increase.types import ACHTransfer, ACHTransferListResponse from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -136,7 +135,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: ach_transfer = client.ach_transfers.list() - assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -154,7 +153,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -163,7 +162,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -172,7 +171,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -375,7 +374,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.list() - assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -393,7 +392,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -402,7 +401,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -411,7 +410,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) + assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index e22057f1d..e7cd661fa 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -12,9 +12,9 @@ from increase.types import ( BookkeepingAccount, BookkeepingBalanceLookup, + BookkeepingAccountListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -110,7 +110,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.list() - assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -119,7 +119,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -128,7 +128,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = response.parse() - assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -137,7 +137,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = response.parse() - assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -283,7 +283,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.list() - assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -292,7 +292,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -301,7 +301,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = await response.parse() - assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -310,7 +310,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = await response.parse() - assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) + assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index 2e78003b4..a289b0c12 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -9,8 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import BookkeepingEntry -from increase.pagination import SyncPage, AsyncPage +from increase.types import BookkeepingEntry, BookkeepingEntryListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +58,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.list() - assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -68,7 +67,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -77,7 +76,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = response.parse() - assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -86,7 +85,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = response.parse() - assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -137,7 +136,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.list() - assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -146,7 +145,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -155,7 +154,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = await response.parse() - assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -164,6 +163,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = await response.parse() - assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) + assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index e13a51f2e..bf35a8bc0 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import BookkeepingEntrySet +from increase.types import ( + BookkeepingEntrySet, + BookkeepingEntrySetListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -138,7 +140,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.list() - assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -148,7 +150,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, transaction_id="transaction_id", ) - assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -157,7 +159,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = response.parse() - assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -166,7 +168,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = response.parse() - assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) assert cast(Any, response.is_closed) is True @@ -295,7 +297,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_entry_set = await async_client.bookkeeping_entry_sets.list() - assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -305,7 +307,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, transaction_id="transaction_id", ) - assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -314,7 +316,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = await response.parse() - assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -323,6 +325,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = await response.parse() - assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) + assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index ac4e72977..4ef303a73 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( CardDispute, + CardDisputeListResponse, ) from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -347,7 +347,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_dispute = client.card_disputes.list() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -363,7 +363,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["user_submission_required"]}, ) - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -372,7 +372,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = response.parse() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -381,7 +381,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = response.parse() - assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1061,7 +1061,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.card_disputes.list() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -1077,7 +1077,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["user_submission_required"]}, ) - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -1086,7 +1086,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = await response.parse() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -1095,7 +1095,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = await response.parse() - assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) + assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index aa0b599ff..69dd9644b 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPayment +from increase.types import CardPayment, CardPaymentListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_payment = client.card_payments.list() - assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -76,7 +75,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -85,7 +84,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = response.parse() - assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -94,7 +93,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = response.parse() - assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -145,7 +144,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_payment = await async_client.card_payments.list() - assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -161,7 +160,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -170,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = await response.parse() - assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -179,6 +178,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = await response.parse() - assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) + assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index 7bbf0fcd1..a8c5efe7e 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPurchaseSupplement +from increase.types import ( + CardPurchaseSupplement, + CardPurchaseSupplementListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +64,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_purchase_supplement = client.card_purchase_supplements.list() - assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -77,7 +79,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -86,7 +88,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = response.parse() - assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -95,7 +97,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = response.parse() - assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +150,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_purchase_supplement = await async_client.card_purchase_supplements.list() - assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -163,7 +165,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -172,7 +174,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = await response.parse() - assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -181,6 +183,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = await response.parse() - assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) + assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py index c12a8d0d5..48f920d9a 100644 --- a/tests/api_resources/test_card_push_transfers.py +++ b/tests/api_resources/test_card_push_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPushTransfer +from increase.types import ( + CardPushTransfer, + CardPushTransferListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -171,7 +173,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.list() - assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -188,7 +190,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -197,7 +199,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = response.parse() - assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -206,7 +208,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = response.parse() - assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -444,7 +446,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.list() - assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -461,7 +463,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -470,7 +472,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = await response.parse() - assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -479,7 +481,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = await response.parse() - assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) + assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_tokens.py b/tests/api_resources/test_card_tokens.py index f25e35b70..3fc40a713 100644 --- a/tests/api_resources/test_card_tokens.py +++ b/tests/api_resources/test_card_tokens.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardToken, CardTokenCapabilities +from increase.types import CardToken, CardTokenCapabilities, CardTokenListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_token = client.card_tokens.list() - assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -74,7 +73,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -83,7 +82,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = response.parse() - assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -92,7 +91,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = response.parse() - assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -181,7 +180,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_token = await async_client.card_tokens.list() - assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -195,7 +194,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -204,7 +203,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = await response.parse() - assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -213,7 +212,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = await response.parse() - assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) + assert_matches_type(CardTokenListResponse, card_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_validations.py b/tests/api_resources/test_card_validations.py index 566aeed1c..69a2bb2a9 100644 --- a/tests/api_resources/test_card_validations.py +++ b/tests/api_resources/test_card_validations.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardValidation +from increase.types import ( + CardValidation, + CardValidationListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -127,7 +129,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_validation = client.card_validations.list() - assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -144,7 +146,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["requires_attention"]}, ) - assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -153,7 +155,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = response.parse() - assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -162,7 +164,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = response.parse() - assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -280,7 +282,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_validation = await async_client.card_validations.list() - assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -297,7 +299,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["requires_attention"]}, ) - assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -306,7 +308,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = await response.parse() - assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -315,6 +317,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = await response.parse() - assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) + assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index ac1a9a3a4..2fdf64712 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -13,9 +13,9 @@ Card, CardDetails, CardIframeURL, + CardListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -176,7 +176,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card = client.cards.list() - assert_matches_type(SyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -193,7 +193,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(SyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -202,7 +202,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = response.parse() - assert_matches_type(SyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -211,7 +211,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = response.parse() - assert_matches_type(SyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) assert cast(Any, response.is_closed) is True @@ -500,7 +500,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.list() - assert_matches_type(AsyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -517,7 +517,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -526,7 +526,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = await response.parse() - assert_matches_type(AsyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -535,7 +535,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = await response.parse() - assert_matches_type(AsyncPage[Card], card, path=["response"]) + assert_matches_type(CardListResponse, card, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index 9f9a14b84..459dca003 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CheckDeposit +from increase.types import ( + CheckDeposit, + CheckDepositListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -111,7 +113,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: check_deposit = client.check_deposits.list() - assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -127,7 +129,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -136,7 +138,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = response.parse() - assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -145,7 +147,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = response.parse() - assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True @@ -247,7 +249,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.check_deposits.list() - assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -263,7 +265,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -272,7 +274,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = await response.parse() - assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -281,6 +283,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = await response.parse() - assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) + assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 43df830d1..fca9c6f02 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( CheckTransfer, + CheckTransferListResponse, ) from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -144,7 +144,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: check_transfer = client.check_transfers.list() - assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -161,7 +161,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -170,7 +170,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = response.parse() - assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -179,7 +179,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = response.parse() - assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -434,7 +434,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.list() - assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -451,7 +451,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -460,7 +460,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = await response.parse() - assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -469,7 +469,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = await response.parse() - assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) + assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index dbacde8c0..9ff726482 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DeclinedTransaction +from increase.types import DeclinedTransaction, DeclinedTransactionListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +61,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: declined_transaction = client.declined_transactions.list() - assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -79,7 +78,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, route_id="route_id", ) - assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -88,7 +87,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = response.parse() - assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -97,7 +96,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = response.parse() - assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -150,7 +149,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.list() - assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -167,7 +166,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, route_id="route_id", ) - assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -176,7 +175,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = await response.parse() - assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -185,6 +184,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = await response.parse() - assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) + assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 38bbafeea..2b8c928ae 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( DigitalCardProfile, + DigitalCardProfileListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -125,7 +125,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.list() - assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -135,7 +135,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -144,7 +144,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = response.parse() - assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -153,7 +153,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = response.parse() - assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -368,7 +368,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.list() - assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -378,7 +378,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -387,7 +387,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = await response.parse() - assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -396,7 +396,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = await response.parse() - assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) + assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index 1ce1ba95b..a13595fe3 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DigitalWalletToken +from increase.types import DigitalWalletToken, DigitalWalletTokenListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +61,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.list() - assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -77,7 +76,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -86,7 +85,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = response.parse() - assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -95,7 +94,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = response.parse() - assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +147,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: digital_wallet_token = await async_client.digital_wallet_tokens.list() - assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -163,7 +162,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -172,7 +171,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = await response.parse() - assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -181,6 +180,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = await response.parse() - assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) + assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index c0d808c7b..23e989e61 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Document +from increase.types import Document, DocumentListResponse from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -103,7 +102,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: document = client.documents.list() - assert_matches_type(SyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -120,7 +119,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -129,7 +128,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = response.parse() - assert_matches_type(SyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -138,7 +137,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = response.parse() - assert_matches_type(SyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -232,7 +231,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.list() - assert_matches_type(AsyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -249,7 +248,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -258,7 +257,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = await response.parse() - assert_matches_type(AsyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -267,6 +266,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = await response.parse() - assert_matches_type(AsyncPage[Document], document, path=["response"]) + assert_matches_type(DocumentListResponse, document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index ace0390a2..987aa4fec 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( Entity, + EntityListResponse, ) from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -434,7 +434,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: entity = client.entities.list() - assert_matches_type(SyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -450,7 +450,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(SyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -459,7 +459,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = response.parse() - assert_matches_type(SyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -468,7 +468,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = response.parse() - assert_matches_type(SyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1361,7 +1361,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.list() - assert_matches_type(AsyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -1377,7 +1377,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -1386,7 +1386,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = await response.parse() - assert_matches_type(AsyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -1395,7 +1395,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = await response.parse() - assert_matches_type(AsyncPage[Entity], entity, path=["response"]) + assert_matches_type(EntityListResponse, entity, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index f8577e2cf..f43599a63 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( EventSubscription, + EventSubscriptionListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -149,7 +149,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: event_subscription = client.event_subscriptions.list() - assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -158,7 +158,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -167,7 +167,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = response.parse() - assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -176,7 +176,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = response.parse() - assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) assert cast(Any, response.is_closed) is True @@ -315,7 +315,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.list() - assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -324,7 +324,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -333,7 +333,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = await response.parse() - assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -342,6 +342,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = await response.parse() - assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) + assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 101cba4be..d6de1afb1 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Event +from increase.types import Event, EventListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: event = client.events.list() - assert_matches_type(SyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -76,7 +75,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -85,7 +84,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(SyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -94,7 +93,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(SyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -145,7 +144,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: event = await async_client.events.list() - assert_matches_type(AsyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -161,7 +160,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -170,7 +169,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(AsyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -179,6 +178,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(AsyncPage[Event], event, path=["response"]) + assert_matches_type(EventListResponse, event, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 496ac45e1..66cafb089 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Export +from increase.types import Export, ExportListResponse from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -143,7 +142,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: export = client.exports.list() - assert_matches_type(SyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -160,7 +159,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(SyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -169,7 +168,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = response.parse() - assert_matches_type(SyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -178,7 +177,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = response.parse() - assert_matches_type(SyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) assert cast(Any, response.is_closed) is True @@ -312,7 +311,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list() - assert_matches_type(AsyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -329,7 +328,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(AsyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -338,7 +337,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = await response.parse() - assert_matches_type(AsyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -347,6 +346,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = await response.parse() - assert_matches_type(AsyncPage[Export], export, path=["response"]) + assert_matches_type(ExportListResponse, export, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 4d639e66e..33b48e74b 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( ExternalAccount, + ExternalAccountListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -158,7 +158,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: external_account = client.external_accounts.list() - assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -169,7 +169,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: routing_number="xxxxxxxxx", status={"in": ["active"]}, ) - assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -178,7 +178,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = response.parse() - assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -187,7 +187,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = response.parse() - assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -335,7 +335,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.list() - assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -346,7 +346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> routing_number="xxxxxxxxx", status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -355,7 +355,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = await response.parse() - assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -364,6 +364,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = await response.parse() - assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) + assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_fednow_transfers.py b/tests/api_resources/test_fednow_transfers.py index c13a3ee40..1e7e04341 100644 --- a/tests/api_resources/test_fednow_transfers.py +++ b/tests/api_resources/test_fednow_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import FednowTransfer +from increase.types import ( + FednowTransfer, + FednowTransferListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -134,7 +136,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: fednow_transfer = client.fednow_transfers.list() - assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -152,7 +154,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_reviewing"]}, ) - assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -161,7 +163,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = response.parse() - assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -170,7 +172,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = response.parse() - assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -371,7 +373,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: fednow_transfer = await async_client.fednow_transfers.list() - assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -389,7 +391,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_reviewing"]}, ) - assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -398,7 +400,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = await response.parse() - assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -407,7 +409,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = await response.parse() - assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) + assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index e36671d6d..d210a6fa1 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import File +from increase.types import File, FileListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -103,7 +102,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: file = client.files.list() - assert_matches_type(SyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -119,7 +118,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, purpose={"in": ["card_dispute_attachment"]}, ) - assert_matches_type(SyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -128,7 +127,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -137,7 +136,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(SyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -231,7 +230,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: file = await async_client.files.list() - assert_matches_type(AsyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -247,7 +246,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, purpose={"in": ["card_dispute_attachment"]}, ) - assert_matches_type(AsyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -256,7 +255,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -265,6 +264,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(AsyncPage[File], file, path=["response"]) + assert_matches_type(FileListResponse, file, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index 9c73918f4..f70dee03d 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( InboundACHTransfer, + InboundACHTransferListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +64,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.list() - assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -81,7 +81,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -90,7 +90,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = response.parse() - assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -99,7 +99,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = response.parse() - assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -293,7 +293,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.list() - assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -310,7 +310,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -319,7 +319,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -328,7 +328,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) + assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index 0b4064f1e..f501d9a7a 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundCheckDeposit +from increase.types import ( + InboundCheckDeposit, + InboundCheckDepositListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +64,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.list() - assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -78,7 +80,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -87,7 +89,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = response.parse() - assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -96,7 +98,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = response.parse() - assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True @@ -233,7 +235,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.list() - assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -249,7 +251,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -258,7 +260,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = await response.parse() - assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -267,7 +269,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = await response.parse() - assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) + assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_fednow_transfers.py b/tests/api_resources/test_inbound_fednow_transfers.py index 7ea08107c..a23be479e 100644 --- a/tests/api_resources/test_inbound_fednow_transfers.py +++ b/tests/api_resources/test_inbound_fednow_transfers.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundFednowTransfer +from increase.types import InboundFednowTransfer, InboundFednowTransferListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +61,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_fednow_transfer = client.inbound_fednow_transfers.list() - assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -78,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -87,7 +86,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = response.parse() - assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -96,7 +95,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = response.parse() - assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -149,7 +148,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_fednow_transfer = await async_client.inbound_fednow_transfers.list() - assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -165,7 +164,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -174,7 +173,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -183,6 +182,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) + assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 8f4229b5e..1de275ae2 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundMailItem +from increase.types import ( + InboundMailItem, + InboundMailItemListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_mail_item = client.inbound_mail_items.list() - assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -75,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, lockbox_id="lockbox_id", ) - assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -84,7 +86,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = response.parse() - assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -93,7 +95,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = response.parse() - assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True @@ -186,7 +188,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_mail_item = await async_client.inbound_mail_items.list() - assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -201,7 +203,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, lockbox_id="lockbox_id", ) - assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -210,7 +212,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = await response.parse() - assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -219,7 +221,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = await response.parse() - assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) + assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True 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 305dfa6fc..d5b61f5ec 100755 --- a/tests/api_resources/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/test_inbound_real_time_payments_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundRealTimePaymentsTransfer +from increase.types import ( + InboundRealTimePaymentsTransfer, + InboundRealTimePaymentsTransferListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -63,7 +65,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: def test_method_list(self, client: Increase) -> None: inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.list() assert_matches_type( - SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -81,7 +83,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, ) assert_matches_type( - SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -92,7 +94,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = response.parse() assert_matches_type( - SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -103,7 +105,7 @@ def test_streaming_response_list(self, client: Increase) -> None: inbound_real_time_payments_transfer = response.parse() assert_matches_type( - SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -158,7 +160,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.list() assert_matches_type( - AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -176,7 +178,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, ) assert_matches_type( - AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -187,7 +189,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = await response.parse() assert_matches_type( - AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -198,7 +200,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non inbound_real_time_payments_transfer = await response.parse() assert_matches_type( - AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] + InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index 8d0fb6d07..f412ee604 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireDrawdownRequest -from increase.pagination import SyncPage, AsyncPage +from increase.types import ( + InboundWireDrawdownRequest, + InboundWireDrawdownRequestListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -61,7 +63,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_wire_drawdown_request = client.inbound_wire_drawdown_requests.list() - assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -69,7 +71,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -78,7 +80,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = response.parse() - assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -87,7 +89,9 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = response.parse() - assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type( + InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"] + ) assert cast(Any, response.is_closed) is True @@ -140,7 +144,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.inbound_wire_drawdown_requests.list() - assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -148,7 +152,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -157,7 +161,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = await response.parse() - assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -166,6 +170,8 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = await response.parse() - assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) + assert_matches_type( + InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"] + ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 6087c698d..2f091c3e5 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundWireTransfer +from increase.types import ( + InboundWireTransfer, + InboundWireTransferListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +64,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_wire_transfer = client.inbound_wire_transfers.list() - assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -80,7 +82,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: status={"in": ["pending"]}, wire_drawdown_request_id="wire_drawdown_request_id", ) - assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -89,7 +91,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = response.parse() - assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -98,7 +100,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = response.parse() - assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -195,7 +197,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_wire_transfer = await async_client.inbound_wire_transfers.list() - assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -213,7 +215,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> status={"in": ["pending"]}, wire_drawdown_request_id="wire_drawdown_request_id", ) - assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -222,7 +224,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -231,7 +233,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = await response.parse() - assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) + assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py index 8ed6b9981..fff8e948a 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( IntrafiAccountEnrollment, + IntrafiAccountEnrollmentListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -97,7 +97,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: intrafi_account_enrollment = client.intrafi_account_enrollments.list() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -108,7 +108,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_enrolling"]}, ) - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -117,7 +117,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -126,7 +126,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = response.parse() - assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -253,7 +253,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -264,7 +264,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_enrolling"]}, ) - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -273,7 +273,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -282,7 +282,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = await response.parse() - assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) + assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py index b3564fc62..abbd2081d 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import IntrafiExclusion -from increase.pagination import SyncPage, AsyncPage +from increase.types import ( + IntrafiExclusion, + IntrafiExclusionListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -93,7 +95,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: intrafi_exclusion = client.intrafi_exclusions.list() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -103,7 +105,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -112,7 +114,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -121,7 +123,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = response.parse() - assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -244,7 +246,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: intrafi_exclusion = await async_client.intrafi_exclusions.list() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -254,7 +256,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -263,7 +265,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -272,7 +274,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = await response.parse() - assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) + assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index b8e2b12b9..4b3c35818 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Lockbox +from increase.types import ( + Lockbox, + LockboxListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -148,7 +150,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: lockbox = client.lockboxes.list() - assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -164,7 +166,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -173,7 +175,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = response.parse() - assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -182,7 +184,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = response.parse() - assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) assert cast(Any, response.is_closed) is True @@ -321,7 +323,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.list() - assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -337,7 +339,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -346,7 +348,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = await response.parse() - assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -355,6 +357,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = await response.parse() - assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) + assert_matches_type(LockboxListResponse, lockbox, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py index 17280bde0..547c9711d 100644 --- a/tests/api_resources/test_oauth_applications.py +++ b/tests/api_resources/test_oauth_applications.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthApplication +from increase.types import OAuthApplication, OAuthApplicationListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: oauth_application = client.oauth_applications.list() - assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -75,7 +74,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -84,7 +83,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = response.parse() - assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -93,7 +92,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = response.parse() - assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +143,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: oauth_application = await async_client.oauth_applications.list() - assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -159,7 +158,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -168,7 +167,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = await response.parse() - assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -177,6 +176,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = await response.parse() - assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) + assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 52eb24ab4..38fe62c60 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -9,8 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthConnection -from increase.pagination import SyncPage, AsyncPage +from increase.types import OAuthConnection, OAuthConnectionListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +58,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list() - assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -69,7 +68,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) - assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -78,7 +77,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = response.parse() - assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -87,7 +86,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = response.parse() - assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -138,7 +137,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.list() - assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -148,7 +147,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) - assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -157,7 +156,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = await response.parse() - assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -166,6 +165,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = await response.parse() - assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) + assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index af444a4d6..6d79a1d4b 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import PendingTransaction +from increase.types import ( + PendingTransaction, + PendingTransactionListResponse, +) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -105,7 +107,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: pending_transaction = client.pending_transactions.list() - assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -123,7 +125,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: route_id="route_id", status={"in": ["pending"]}, ) - assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -132,7 +134,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = response.parse() - assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -141,7 +143,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = response.parse() - assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -277,7 +279,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.list() - assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -295,7 +297,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> route_id="route_id", status={"in": ["pending"]}, ) - assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -304,7 +306,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = await response.parse() - assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -313,7 +315,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = await response.parse() - assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) + assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 012a20306..9a716658d 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( PhysicalCardProfile, + PhysicalCardProfileListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -121,7 +121,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.list() - assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -131,7 +131,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_creating"]}, ) - assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -140,7 +140,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = response.parse() - assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -149,7 +149,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = response.parse() - assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,7 +356,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.list() - assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -366,7 +366,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_creating"]}, ) - assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -375,7 +375,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = await response.parse() - assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -384,7 +384,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = await response.parse() - assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) + assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 42fda8cd1..8dc612bc6 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( PhysicalCard, + PhysicalCardListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -204,7 +204,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: physical_card = client.physical_cards.list() - assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -220,7 +220,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -229,7 +229,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = response.parse() - assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -238,7 +238,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = response.parse() - assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) assert cast(Any, response.is_closed) is True @@ -431,7 +431,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.list() - assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -447,7 +447,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -456,7 +456,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = await response.parse() - assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -465,6 +465,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = await response.parse() - assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) + assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 1a4df07ac..75841a257 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -9,8 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Program -from increase.pagination import SyncPage, AsyncPage +from increase.types import Program, ProgramListResponse base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +58,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: program = client.programs.list() - assert_matches_type(SyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -67,7 +66,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -76,7 +75,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = response.parse() - assert_matches_type(SyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -85,7 +84,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = response.parse() - assert_matches_type(SyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) assert cast(Any, response.is_closed) is True @@ -136,7 +135,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: program = await async_client.programs.list() - assert_matches_type(AsyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -144,7 +143,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -153,7 +152,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = await response.parse() - assert_matches_type(AsyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -162,6 +161,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = await response.parse() - assert_matches_type(AsyncPage[Program], program, path=["response"]) + assert_matches_type(ProgramListResponse, program, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 09e20196c..3eaee878b 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( RealTimePaymentsTransfer, + RealTimePaymentsTransferListResponse, ) from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -121,7 +121,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.list() - assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -139,7 +139,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -148,7 +148,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = response.parse() - assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -157,7 +157,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = response.parse() - assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -347,7 +347,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.list() - assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -365,7 +365,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -374,7 +374,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = await response.parse() - assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -383,7 +383,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = await response.parse() - assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) + assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 62e2949a1..359f80cd9 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -10,7 +10,6 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import RoutingNumberListResponse -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -23,7 +22,7 @@ def test_method_list(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -32,7 +31,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -43,7 +42,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -54,7 +53,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -69,7 +68,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -78,7 +77,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -89,7 +88,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -100,6 +99,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) + assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py index 5e15c2880..4df75ae86 100644 --- a/tests/api_resources/test_supplemental_documents.py +++ b/tests/api_resources/test_supplemental_documents.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( EntitySupplementalDocument, + SupplementalDocumentListResponse, ) -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +59,7 @@ def test_method_list(self, client: Increase) -> None: supplemental_document = client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -69,7 +69,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -80,7 +80,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -91,7 +91,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -140,7 +140,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -150,7 +150,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -161,7 +161,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -172,6 +172,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) + assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index d5491798f..844619826 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -9,9 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction +from increase.types import Transaction, TransactionListResponse from increase._utils import parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -60,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: transaction = client.transactions.list() - assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -77,7 +76,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, route_id="route_id", ) - assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -86,7 +85,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = response.parse() - assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -95,7 +94,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = response.parse() - assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -146,7 +145,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.list() - assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -163,7 +162,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, route_id="route_id", ) - assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -172,7 +171,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = await response.parse() - assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -181,6 +180,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = await response.parse() - assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) + assert_matches_type(TransactionListResponse, transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index dd4783e33..7284c4d8f 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -9,8 +9,10 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import WireDrawdownRequest -from increase.pagination import SyncPage, AsyncPage +from increase.types import ( + WireDrawdownRequest, + WireDrawdownRequestListResponse, +) base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -164,7 +166,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.list() - assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -174,7 +176,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_submission"]}, ) - assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -183,7 +185,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = response.parse() - assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -192,7 +194,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = response.parse() - assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -348,7 +350,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.list() - assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -358,7 +360,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_submission"]}, ) - assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -367,7 +369,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = await response.parse() - assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -376,6 +378,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = await response.parse() - assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) + assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index e68b36452..3330fa391 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -9,9 +9,11 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import WireTransfer +from increase.types import ( + WireTransfer, + WireTransferListResponse, +) from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -143,7 +145,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: wire_transfer = client.wire_transfers.list() - assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -160,7 +162,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -169,7 +171,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -178,7 +180,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -388,7 +390,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.list() - assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -405,7 +407,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -414,7 +416,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -423,7 +425,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) + assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True From d46e459a3bec567d28522666b2a92e8f46bf4881 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 18:32:17 +0000 Subject: [PATCH 1024/1325] feat(api): api update --- .stats.yml | 2 +- README.md | 77 +++++++ api.md | 209 +++++++++--------- src/increase/pagination.py | 20 +- src/increase/resources/account_numbers.py | 22 +- src/increase/resources/account_statements.py | 24 +- src/increase/resources/account_transfers.py | 22 +- src/increase/resources/accounts.py | 22 +- .../resources/ach_prenotifications.py | 22 +- src/increase/resources/ach_transfers.py | 22 +- .../resources/bookkeeping_accounts.py | 22 +- src/increase/resources/bookkeeping_entries.py | 24 +- .../resources/bookkeeping_entry_sets.py | 22 +- src/increase/resources/card_disputes.py | 22 +- src/increase/resources/card_payments.py | 24 +- .../resources/card_purchase_supplements.py | 24 +- src/increase/resources/card_push_transfers.py | 22 +- src/increase/resources/card_tokens.py | 24 +- src/increase/resources/card_validations.py | 22 +- src/increase/resources/cards.py | 22 +- src/increase/resources/check_deposits.py | 22 +- src/increase/resources/check_transfers.py | 22 +- .../resources/declined_transactions.py | 24 +- .../resources/digital_card_profiles.py | 22 +- .../resources/digital_wallet_tokens.py | 24 +- src/increase/resources/documents.py | 22 +- src/increase/resources/entities.py | 22 +- src/increase/resources/event_subscriptions.py | 22 +- src/increase/resources/events.py | 24 +- src/increase/resources/exports.py | 22 +- src/increase/resources/external_accounts.py | 22 +- src/increase/resources/fednow_transfers.py | 22 +- src/increase/resources/files.py | 22 +- .../resources/inbound_ach_transfers.py | 22 +- .../resources/inbound_check_deposits.py | 22 +- .../resources/inbound_fednow_transfers.py | 24 +- src/increase/resources/inbound_mail_items.py | 22 +- .../inbound_real_time_payments_transfers.py | 24 +- .../inbound_wire_drawdown_requests.py | 24 +- .../resources/inbound_wire_transfers.py | 22 +- .../resources/intrafi_account_enrollments.py | 22 +- src/increase/resources/intrafi_exclusions.py | 22 +- src/increase/resources/lockboxes.py | 22 +- src/increase/resources/oauth_applications.py | 24 +- src/increase/resources/oauth_connections.py | 24 +- .../resources/pending_transactions.py | 22 +- .../resources/physical_card_profiles.py | 22 +- src/increase/resources/physical_cards.py | 22 +- src/increase/resources/programs.py | 24 +- .../resources/real_time_payments_transfers.py | 22 +- src/increase/resources/routing_numbers.py | 23 +- .../resources/supplemental_documents.py | 22 +- src/increase/resources/transactions.py | 24 +- .../resources/wire_drawdown_requests.py | 22 +- src/increase/resources/wire_transfers.py | 22 +- src/increase/types/__init__.py | 62 ------ src/increase/types/account_list_response.py | 30 --- .../types/account_number_list_response.py | 30 --- .../types/account_statement_list_response.py | 30 --- .../types/account_transfer_list_response.py | 30 --- .../ach_prenotification_list_response.py | 30 --- .../types/ach_transfer_list_response.py | 30 --- .../bookkeeping_account_list_response.py | 30 --- .../types/bookkeeping_entry_list_response.py | 30 --- .../bookkeeping_entry_set_list_response.py | 30 --- .../types/card_dispute_list_response.py | 30 --- src/increase/types/card_list_response.py | 30 --- .../types/card_payment_list_response.py | 30 --- .../card_purchase_supplement_list_response.py | 30 --- .../types/card_push_transfer_list_response.py | 30 --- .../types/card_token_list_response.py | 30 --- .../types/card_validation_list_response.py | 30 --- .../types/check_deposit_list_response.py | 30 --- .../types/check_transfer_list_response.py | 30 --- .../declined_transaction_list_response.py | 30 --- .../digital_card_profile_list_response.py | 30 --- .../digital_wallet_token_list_response.py | 30 --- src/increase/types/document_list_response.py | 30 --- src/increase/types/entity_list_response.py | 30 --- src/increase/types/event_list_response.py | 30 --- .../types/event_subscription_list_response.py | 30 --- src/increase/types/export_list_response.py | 30 --- .../types/external_account_list_response.py | 30 --- .../types/fednow_transfer_list_response.py | 30 --- src/increase/types/file_list_response.py | 30 --- .../inbound_ach_transfer_list_response.py | 30 --- .../inbound_check_deposit_list_response.py | 30 --- .../inbound_fednow_transfer_list_response.py | 30 --- .../types/inbound_mail_item_list_response.py | 30 --- ...al_time_payments_transfer_list_response.py | 30 --- ...und_wire_drawdown_request_list_response.py | 30 --- .../inbound_wire_transfer_list_response.py | 30 --- ...ntrafi_account_enrollment_list_response.py | 30 --- .../types/intrafi_exclusion_list_response.py | 30 --- src/increase/types/lockbox_list_response.py | 30 --- .../types/oauth_application_list_response.py | 30 --- .../types/oauth_connection_list_response.py | 30 --- .../pending_transaction_list_response.py | 30 --- .../types/physical_card_list_response.py | 30 --- .../physical_card_profile_list_response.py | 30 --- src/increase/types/program_list_response.py | 30 --- ...al_time_payments_transfer_list_response.py | 30 --- .../types/routing_number_list_response.py | 27 +-- .../supplemental_document_list_response.py | 30 --- .../types/transaction_list_response.py | 30 --- .../wire_drawdown_request_list_response.py | 30 --- .../types/wire_transfer_list_response.py | 30 --- tests/api_resources/test_account_numbers.py | 18 +- .../api_resources/test_account_statements.py | 19 +- tests/api_resources/test_account_transfers.py | 22 +- tests/api_resources/test_accounts.py | 18 +- .../test_ach_prenotifications.py | 22 +- tests/api_resources/test_ach_transfers.py | 19 +- .../test_bookkeeping_accounts.py | 18 +- .../api_resources/test_bookkeeping_entries.py | 19 +- .../test_bookkeeping_entry_sets.py | 22 +- tests/api_resources/test_card_disputes.py | 18 +- tests/api_resources/test_card_payments.py | 19 +- .../test_card_purchase_supplements.py | 22 +- .../api_resources/test_card_push_transfers.py | 22 +- tests/api_resources/test_card_tokens.py | 19 +- tests/api_resources/test_card_validations.py | 22 +- tests/api_resources/test_cards.py | 18 +- tests/api_resources/test_check_deposits.py | 22 +- tests/api_resources/test_check_transfers.py | 18 +- .../test_declined_transactions.py | 19 +- .../test_digital_card_profiles.py | 18 +- .../test_digital_wallet_tokens.py | 19 +- tests/api_resources/test_documents.py | 19 +- tests/api_resources/test_entities.py | 18 +- .../api_resources/test_event_subscriptions.py | 18 +- tests/api_resources/test_events.py | 19 +- tests/api_resources/test_exports.py | 19 +- tests/api_resources/test_external_accounts.py | 18 +- tests/api_resources/test_fednow_transfers.py | 22 +- tests/api_resources/test_files.py | 19 +- .../test_inbound_ach_transfers.py | 18 +- .../test_inbound_check_deposits.py | 22 +- .../test_inbound_fednow_transfers.py | 19 +- .../api_resources/test_inbound_mail_items.py | 22 +- ...st_inbound_real_time_payments_transfers.py | 22 +- .../test_inbound_wire_drawdown_requests.py | 26 +-- .../test_inbound_wire_transfers.py | 22 +- .../test_intrafi_account_enrollments.py | 18 +- .../api_resources/test_intrafi_exclusions.py | 22 +- tests/api_resources/test_lockboxes.py | 22 +- .../api_resources/test_oauth_applications.py | 19 +- tests/api_resources/test_oauth_connections.py | 19 +- .../test_pending_transactions.py | 22 +- .../test_physical_card_profiles.py | 18 +- tests/api_resources/test_physical_cards.py | 18 +- tests/api_resources/test_programs.py | 19 +- .../test_real_time_payments_transfers.py | 18 +- tests/api_resources/test_routing_numbers.py | 17 +- .../test_supplemental_documents.py | 18 +- tests/api_resources/test_transactions.py | 19 +- .../test_wire_drawdown_requests.py | 22 +- tests/api_resources/test_wire_transfers.py | 22 +- 158 files changed, 1314 insertions(+), 2745 deletions(-) delete mode 100644 src/increase/types/account_list_response.py delete mode 100644 src/increase/types/account_number_list_response.py delete mode 100644 src/increase/types/account_statement_list_response.py delete mode 100644 src/increase/types/account_transfer_list_response.py delete mode 100644 src/increase/types/ach_prenotification_list_response.py delete mode 100644 src/increase/types/ach_transfer_list_response.py delete mode 100644 src/increase/types/bookkeeping_account_list_response.py delete mode 100644 src/increase/types/bookkeeping_entry_list_response.py delete mode 100644 src/increase/types/bookkeeping_entry_set_list_response.py delete mode 100644 src/increase/types/card_dispute_list_response.py delete mode 100644 src/increase/types/card_list_response.py delete mode 100644 src/increase/types/card_payment_list_response.py delete mode 100644 src/increase/types/card_purchase_supplement_list_response.py delete mode 100644 src/increase/types/card_push_transfer_list_response.py delete mode 100644 src/increase/types/card_token_list_response.py delete mode 100644 src/increase/types/card_validation_list_response.py delete mode 100644 src/increase/types/check_deposit_list_response.py delete mode 100644 src/increase/types/check_transfer_list_response.py delete mode 100644 src/increase/types/declined_transaction_list_response.py delete mode 100644 src/increase/types/digital_card_profile_list_response.py delete mode 100644 src/increase/types/digital_wallet_token_list_response.py delete mode 100644 src/increase/types/document_list_response.py delete mode 100644 src/increase/types/entity_list_response.py delete mode 100644 src/increase/types/event_list_response.py delete mode 100644 src/increase/types/event_subscription_list_response.py delete mode 100644 src/increase/types/export_list_response.py delete mode 100644 src/increase/types/external_account_list_response.py delete mode 100644 src/increase/types/fednow_transfer_list_response.py delete mode 100644 src/increase/types/file_list_response.py delete mode 100644 src/increase/types/inbound_ach_transfer_list_response.py delete mode 100644 src/increase/types/inbound_check_deposit_list_response.py delete mode 100644 src/increase/types/inbound_fednow_transfer_list_response.py delete mode 100644 src/increase/types/inbound_mail_item_list_response.py delete mode 100644 src/increase/types/inbound_real_time_payments_transfer_list_response.py delete mode 100644 src/increase/types/inbound_wire_drawdown_request_list_response.py delete mode 100644 src/increase/types/inbound_wire_transfer_list_response.py delete mode 100644 src/increase/types/intrafi_account_enrollment_list_response.py delete mode 100644 src/increase/types/intrafi_exclusion_list_response.py delete mode 100644 src/increase/types/lockbox_list_response.py delete mode 100644 src/increase/types/oauth_application_list_response.py delete mode 100644 src/increase/types/oauth_connection_list_response.py delete mode 100644 src/increase/types/pending_transaction_list_response.py delete mode 100644 src/increase/types/physical_card_list_response.py delete mode 100644 src/increase/types/physical_card_profile_list_response.py delete mode 100644 src/increase/types/program_list_response.py delete mode 100644 src/increase/types/real_time_payments_transfer_list_response.py delete mode 100644 src/increase/types/supplemental_document_list_response.py delete mode 100644 src/increase/types/transaction_list_response.py delete mode 100644 src/increase/types/wire_drawdown_request_list_response.py delete mode 100644 src/increase/types/wire_transfer_list_response.py diff --git a/.stats.yml b/.stats.yml index fa77aa9b3..b52e8c7d7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5 -config_hash: eecc5886c26d07c167f37f30ae505a2c +config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/README.md b/README.md index d3a91b9c1..6eb749f5f 100644 --- a/README.md +++ b/README.md @@ -34,6 +34,8 @@ client = Increase( account = client.accounts.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) ``` @@ -62,6 +64,8 @@ client = AsyncIncrease( async def main() -> None: account = await client.accounts.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) @@ -97,6 +101,8 @@ async def main() -> None: ) as client: account = await client.accounts.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(account.id) @@ -113,6 +119,69 @@ Nested request parameters are [TypedDicts](https://docs.python.org/3/library/typ Typed requests and responses provide autocomplete and documentation within your editor. If you would like to see type errors in VS Code to help catch bugs earlier, set `python.analysis.typeCheckingMode` to `basic`. +## Pagination + +List methods in the Increase API are paginated. + +This library provides auto-paginating iterators with each list response, so you do not have to request successive pages manually: + +```python +from increase import Increase + +client = Increase() + +all_accounts = [] +# Automatically fetches more pages as needed. +for account in client.accounts.list(): + # Do something with account here + all_accounts.append(account) +print(all_accounts) +``` + +Or, asynchronously: + +```python +import asyncio +from increase import AsyncIncrease + +client = AsyncIncrease() + + +async def main() -> None: + all_accounts = [] + # Iterate through items across all pages, issuing requests as needed. + async for account in client.accounts.list(): + all_accounts.append(account) + print(all_accounts) + + +asyncio.run(main()) +``` + +Alternatively, you can use the `.has_next_page()`, `.next_page_info()`, or `.get_next_page()` methods for more granular control working with pages: + +```python +first_page = await client.accounts.list() +if first_page.has_next_page(): + print(f"will fetch next page using these details: {first_page.next_page_info()}") + next_page = await first_page.get_next_page() + print(f"number of items we just fetched: {len(next_page.data)}") + +# Remove `await` for non-async usage. +``` + +Or just work directly with the returned data: + +```python +first_page = await client.accounts.list() + +print(f"next page cursor: {first_page.next_cursor}") # => "next page cursor: ..." +for account in first_page.data: + print(account.id) + +# Remove `await` for non-async usage. +``` + ## Nested params Nested parameters are dictionaries, typed using `TypedDict`, for example: @@ -209,6 +278,8 @@ client = Increase( # Or, configure per-request: client.with_options(max_retries=5).accounts.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -234,6 +305,8 @@ client = Increase( # Override per-request: client.with_options(timeout=5.0).accounts.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) ``` @@ -277,6 +350,8 @@ from increase import Increase client = Increase() response = client.accounts.with_raw_response.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) print(response.headers.get('X-My-Header')) @@ -297,6 +372,8 @@ To stream the response body, use `.with_streaming_response` instead, which requi ```python with client.accounts.with_streaming_response.create( name="New Account!", + entity_id="entity_n8y8tnk2p9339ti393yi", + program_id="program_i2v2os4mwza1oetokh9i", ) as response: print(response.headers.get("X-My-Header")) diff --git a/api.md b/api.md index 602ba91c9..6ef71b9b2 100644 --- a/api.md +++ b/api.md @@ -3,7 +3,7 @@ Types: ```python -from increase.types import Account, BalanceLookup, AccountListResponse +from increase.types import Account, BalanceLookup ``` Methods: @@ -11,7 +11,7 @@ Methods: - client.accounts.create(\*\*params) -> Account - client.accounts.retrieve(account_id) -> Account - client.accounts.update(account_id, \*\*params) -> Account -- client.accounts.list(\*\*params) -> AccountListResponse +- client.accounts.list(\*\*params) -> SyncPage[Account] - client.accounts.balance(account_id, \*\*params) -> BalanceLookup - client.accounts.close(account_id) -> Account @@ -20,7 +20,7 @@ Methods: Types: ```python -from increase.types import AccountNumber, AccountNumberListResponse +from increase.types import AccountNumber ``` Methods: @@ -28,21 +28,21 @@ Methods: - client.account_numbers.create(\*\*params) -> AccountNumber - client.account_numbers.retrieve(account_number_id) -> AccountNumber - client.account_numbers.update(account_number_id, \*\*params) -> AccountNumber -- client.account_numbers.list(\*\*params) -> AccountNumberListResponse +- client.account_numbers.list(\*\*params) -> SyncPage[AccountNumber] # AccountTransfers Types: ```python -from increase.types import AccountTransfer, AccountTransferListResponse +from increase.types import AccountTransfer ``` Methods: - client.account_transfers.create(\*\*params) -> AccountTransfer - client.account_transfers.retrieve(account_transfer_id) -> AccountTransfer -- client.account_transfers.list(\*\*params) -> AccountTransferListResponse +- client.account_transfers.list(\*\*params) -> SyncPage[AccountTransfer] - client.account_transfers.approve(account_transfer_id) -> AccountTransfer - client.account_transfers.cancel(account_transfer_id) -> AccountTransfer @@ -51,7 +51,7 @@ Methods: Types: ```python -from increase.types import Card, CardDetails, CardIframeURL, CardListResponse +from increase.types import Card, CardDetails, CardIframeURL ``` Methods: @@ -59,7 +59,7 @@ Methods: - client.cards.create(\*\*params) -> Card - client.cards.retrieve(card_id) -> Card - client.cards.update(card_id, \*\*params) -> Card -- client.cards.list(\*\*params) -> CardListResponse +- client.cards.list(\*\*params) -> SyncPage[Card] - client.cards.create_details_iframe(card_id, \*\*params) -> CardIframeURL - client.cards.details(card_id) -> CardDetails - client.cards.update_pin(card_id, \*\*params) -> CardDetails @@ -69,40 +69,40 @@ Methods: Types: ```python -from increase.types import CardPayment, CardPaymentListResponse +from increase.types import CardPayment ``` Methods: - client.card_payments.retrieve(card_payment_id) -> CardPayment -- client.card_payments.list(\*\*params) -> CardPaymentListResponse +- client.card_payments.list(\*\*params) -> SyncPage[CardPayment] # CardPurchaseSupplements Types: ```python -from increase.types import CardPurchaseSupplement, CardPurchaseSupplementListResponse +from increase.types import CardPurchaseSupplement ``` Methods: - client.card_purchase_supplements.retrieve(card_purchase_supplement_id) -> CardPurchaseSupplement -- client.card_purchase_supplements.list(\*\*params) -> CardPurchaseSupplementListResponse +- client.card_purchase_supplements.list(\*\*params) -> SyncPage[CardPurchaseSupplement] # CardDisputes Types: ```python -from increase.types import CardDispute, CardDisputeListResponse +from increase.types import CardDispute ``` Methods: - client.card_disputes.create(\*\*params) -> CardDispute - client.card_disputes.retrieve(card_dispute_id) -> CardDispute -- client.card_disputes.list(\*\*params) -> CardDisputeListResponse +- client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] - client.card_disputes.submit_user_submission(card_dispute_id, \*\*params) -> CardDispute - client.card_disputes.withdraw(card_dispute_id) -> CardDispute @@ -111,7 +111,7 @@ Methods: Types: ```python -from increase.types import PhysicalCard, PhysicalCardListResponse +from increase.types import PhysicalCard ``` Methods: @@ -119,21 +119,21 @@ Methods: - client.physical_cards.create(\*\*params) -> PhysicalCard - client.physical_cards.retrieve(physical_card_id) -> PhysicalCard - client.physical_cards.update(physical_card_id, \*\*params) -> PhysicalCard -- client.physical_cards.list(\*\*params) -> PhysicalCardListResponse +- client.physical_cards.list(\*\*params) -> SyncPage[PhysicalCard] # DigitalCardProfiles Types: ```python -from increase.types import DigitalCardProfile, DigitalCardProfileListResponse +from increase.types import DigitalCardProfile ``` Methods: - client.digital_card_profiles.create(\*\*params) -> DigitalCardProfile - client.digital_card_profiles.retrieve(digital_card_profile_id) -> DigitalCardProfile -- client.digital_card_profiles.list(\*\*params) -> DigitalCardProfileListResponse +- client.digital_card_profiles.list(\*\*params) -> SyncPage[DigitalCardProfile] - client.digital_card_profiles.archive(digital_card_profile_id) -> DigitalCardProfile - client.digital_card_profiles.clone(digital_card_profile_id, \*\*params) -> DigitalCardProfile @@ -142,14 +142,14 @@ Methods: Types: ```python -from increase.types import PhysicalCardProfile, PhysicalCardProfileListResponse +from increase.types import PhysicalCardProfile ``` Methods: - client.physical_card_profiles.create(\*\*params) -> PhysicalCardProfile - client.physical_card_profiles.retrieve(physical_card_profile_id) -> PhysicalCardProfile -- client.physical_card_profiles.list(\*\*params) -> PhysicalCardProfileListResponse +- client.physical_card_profiles.list(\*\*params) -> SyncPage[PhysicalCardProfile] - client.physical_card_profiles.archive(physical_card_profile_id) -> PhysicalCardProfile - client.physical_card_profiles.clone(physical_card_profile_id, \*\*params) -> PhysicalCardProfile @@ -158,40 +158,40 @@ Methods: Types: ```python -from increase.types import DigitalWalletToken, DigitalWalletTokenListResponse +from increase.types import DigitalWalletToken ``` Methods: - client.digital_wallet_tokens.retrieve(digital_wallet_token_id) -> DigitalWalletToken -- client.digital_wallet_tokens.list(\*\*params) -> DigitalWalletTokenListResponse +- client.digital_wallet_tokens.list(\*\*params) -> SyncPage[DigitalWalletToken] # Transactions Types: ```python -from increase.types import Transaction, TransactionListResponse +from increase.types import Transaction ``` Methods: - client.transactions.retrieve(transaction_id) -> Transaction -- client.transactions.list(\*\*params) -> TransactionListResponse +- client.transactions.list(\*\*params) -> SyncPage[Transaction] # PendingTransactions Types: ```python -from increase.types import PendingTransaction, PendingTransactionListResponse +from increase.types import PendingTransaction ``` Methods: - client.pending_transactions.create(\*\*params) -> PendingTransaction - client.pending_transactions.retrieve(pending_transaction_id) -> PendingTransaction -- client.pending_transactions.list(\*\*params) -> PendingTransactionListResponse +- client.pending_transactions.list(\*\*params) -> SyncPage[PendingTransaction] - client.pending_transactions.release(pending_transaction_id) -> PendingTransaction # DeclinedTransactions @@ -199,27 +199,27 @@ Methods: Types: ```python -from increase.types import DeclinedTransaction, DeclinedTransactionListResponse +from increase.types import DeclinedTransaction ``` Methods: - client.declined_transactions.retrieve(declined_transaction_id) -> DeclinedTransaction -- client.declined_transactions.list(\*\*params) -> DeclinedTransactionListResponse +- client.declined_transactions.list(\*\*params) -> SyncPage[DeclinedTransaction] # ACHTransfers Types: ```python -from increase.types import ACHTransfer, ACHTransferListResponse +from increase.types import ACHTransfer ``` Methods: - client.ach_transfers.create(\*\*params) -> ACHTransfer - client.ach_transfers.retrieve(ach_transfer_id) -> ACHTransfer -- client.ach_transfers.list(\*\*params) -> ACHTransferListResponse +- client.ach_transfers.list(\*\*params) -> SyncPage[ACHTransfer] - client.ach_transfers.approve(ach_transfer_id) -> ACHTransfer - client.ach_transfers.cancel(ach_transfer_id) -> ACHTransfer @@ -228,27 +228,27 @@ Methods: Types: ```python -from increase.types import ACHPrenotification, ACHPrenotificationListResponse +from increase.types import ACHPrenotification ``` Methods: - client.ach_prenotifications.create(\*\*params) -> ACHPrenotification - client.ach_prenotifications.retrieve(ach_prenotification_id) -> ACHPrenotification -- client.ach_prenotifications.list(\*\*params) -> ACHPrenotificationListResponse +- client.ach_prenotifications.list(\*\*params) -> SyncPage[ACHPrenotification] # InboundACHTransfers Types: ```python -from increase.types import InboundACHTransfer, InboundACHTransferListResponse +from increase.types import InboundACHTransfer ``` Methods: - client.inbound_ach_transfers.retrieve(inbound_ach_transfer_id) -> InboundACHTransfer -- client.inbound_ach_transfers.list(\*\*params) -> InboundACHTransferListResponse +- client.inbound_ach_transfers.list(\*\*params) -> SyncPage[InboundACHTransfer] - client.inbound_ach_transfers.create_notification_of_change(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer - client.inbound_ach_transfers.decline(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer - client.inbound_ach_transfers.transfer_return(inbound_ach_transfer_id, \*\*params) -> InboundACHTransfer @@ -258,14 +258,14 @@ Methods: Types: ```python -from increase.types import WireTransfer, WireTransferListResponse +from increase.types import WireTransfer ``` Methods: - client.wire_transfers.create(\*\*params) -> WireTransfer - client.wire_transfers.retrieve(wire_transfer_id) -> WireTransfer -- client.wire_transfers.list(\*\*params) -> WireTransferListResponse +- client.wire_transfers.list(\*\*params) -> SyncPage[WireTransfer] - client.wire_transfers.approve(wire_transfer_id) -> WireTransfer - client.wire_transfers.cancel(wire_transfer_id) -> WireTransfer @@ -274,13 +274,13 @@ Methods: Types: ```python -from increase.types import InboundWireTransfer, InboundWireTransferListResponse +from increase.types import InboundWireTransfer ``` Methods: - client.inbound_wire_transfers.retrieve(inbound_wire_transfer_id) -> InboundWireTransfer -- client.inbound_wire_transfers.list(\*\*params) -> InboundWireTransferListResponse +- client.inbound_wire_transfers.list(\*\*params) -> SyncPage[InboundWireTransfer] - client.inbound_wire_transfers.reverse(inbound_wire_transfer_id, \*\*params) -> InboundWireTransfer # WireDrawdownRequests @@ -288,41 +288,41 @@ Methods: Types: ```python -from increase.types import WireDrawdownRequest, WireDrawdownRequestListResponse +from increase.types import WireDrawdownRequest ``` Methods: - client.wire_drawdown_requests.create(\*\*params) -> WireDrawdownRequest - client.wire_drawdown_requests.retrieve(wire_drawdown_request_id) -> WireDrawdownRequest -- client.wire_drawdown_requests.list(\*\*params) -> WireDrawdownRequestListResponse +- client.wire_drawdown_requests.list(\*\*params) -> SyncPage[WireDrawdownRequest] # InboundWireDrawdownRequests Types: ```python -from increase.types import InboundWireDrawdownRequest, InboundWireDrawdownRequestListResponse +from increase.types import InboundWireDrawdownRequest ``` Methods: - client.inbound_wire_drawdown_requests.retrieve(inbound_wire_drawdown_request_id) -> InboundWireDrawdownRequest -- client.inbound_wire_drawdown_requests.list(\*\*params) -> InboundWireDrawdownRequestListResponse +- client.inbound_wire_drawdown_requests.list(\*\*params) -> SyncPage[InboundWireDrawdownRequest] # CheckTransfers Types: ```python -from increase.types import CheckTransfer, CheckTransferListResponse +from increase.types import CheckTransfer ``` Methods: - client.check_transfers.create(\*\*params) -> CheckTransfer - client.check_transfers.retrieve(check_transfer_id) -> CheckTransfer -- client.check_transfers.list(\*\*params) -> CheckTransferListResponse +- client.check_transfers.list(\*\*params) -> SyncPage[CheckTransfer] - client.check_transfers.approve(check_transfer_id) -> CheckTransfer - client.check_transfers.cancel(check_transfer_id) -> CheckTransfer - client.check_transfers.stop_payment(check_transfer_id, \*\*params) -> CheckTransfer @@ -332,13 +332,13 @@ Methods: Types: ```python -from increase.types import InboundCheckDeposit, InboundCheckDepositListResponse +from increase.types import InboundCheckDeposit ``` Methods: - client.inbound_check_deposits.retrieve(inbound_check_deposit_id) -> InboundCheckDeposit -- client.inbound_check_deposits.list(\*\*params) -> InboundCheckDepositListResponse +- client.inbound_check_deposits.list(\*\*params) -> SyncPage[InboundCheckDeposit] - client.inbound_check_deposits.decline(inbound_check_deposit_id) -> InboundCheckDeposit - client.inbound*check_deposits.return*(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit @@ -347,14 +347,14 @@ Methods: Types: ```python -from increase.types import RealTimePaymentsTransfer, RealTimePaymentsTransferListResponse +from increase.types import RealTimePaymentsTransfer ``` Methods: - client.real_time_payments_transfers.create(\*\*params) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.retrieve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer -- client.real_time_payments_transfers.list(\*\*params) -> RealTimePaymentsTransferListResponse +- client.real_time_payments_transfers.list(\*\*params) -> SyncPage[RealTimePaymentsTransfer] - client.real_time_payments_transfers.approve(real_time_payments_transfer_id) -> RealTimePaymentsTransfer - client.real_time_payments_transfers.cancel(real_time_payments_transfer_id) -> RealTimePaymentsTransfer @@ -363,30 +363,27 @@ Methods: Types: ```python -from increase.types import ( - InboundRealTimePaymentsTransfer, - InboundRealTimePaymentsTransferListResponse, -) +from increase.types import InboundRealTimePaymentsTransfer ``` Methods: - client.inbound_real_time_payments_transfers.retrieve(inbound_real_time_payments_transfer_id) -> InboundRealTimePaymentsTransfer -- client.inbound_real_time_payments_transfers.list(\*\*params) -> InboundRealTimePaymentsTransferListResponse +- client.inbound_real_time_payments_transfers.list(\*\*params) -> SyncPage[InboundRealTimePaymentsTransfer] # FednowTransfers Types: ```python -from increase.types import FednowTransfer, FednowTransferListResponse +from increase.types import FednowTransfer ``` Methods: - client.fednow_transfers.create(\*\*params) -> FednowTransfer - client.fednow_transfers.retrieve(fednow_transfer_id) -> FednowTransfer -- client.fednow_transfers.list(\*\*params) -> FednowTransferListResponse +- client.fednow_transfers.list(\*\*params) -> SyncPage[FednowTransfer] - client.fednow_transfers.approve(fednow_transfer_id) -> FednowTransfer - client.fednow_transfers.cancel(fednow_transfer_id) -> FednowTransfer @@ -395,34 +392,34 @@ Methods: Types: ```python -from increase.types import InboundFednowTransfer, InboundFednowTransferListResponse +from increase.types import InboundFednowTransfer ``` Methods: - client.inbound_fednow_transfers.retrieve(inbound_fednow_transfer_id) -> InboundFednowTransfer -- client.inbound_fednow_transfers.list(\*\*params) -> InboundFednowTransferListResponse +- client.inbound_fednow_transfers.list(\*\*params) -> SyncPage[InboundFednowTransfer] # CheckDeposits Types: ```python -from increase.types import CheckDeposit, CheckDepositListResponse +from increase.types import CheckDeposit ``` Methods: - client.check_deposits.create(\*\*params) -> CheckDeposit - client.check_deposits.retrieve(check_deposit_id) -> CheckDeposit -- client.check_deposits.list(\*\*params) -> CheckDepositListResponse +- client.check_deposits.list(\*\*params) -> SyncPage[CheckDeposit] # Lockboxes Types: ```python -from increase.types import Lockbox, LockboxListResponse +from increase.types import Lockbox ``` Methods: @@ -430,20 +427,20 @@ Methods: - client.lockboxes.create(\*\*params) -> Lockbox - client.lockboxes.retrieve(lockbox_id) -> Lockbox - client.lockboxes.update(lockbox_id, \*\*params) -> Lockbox -- client.lockboxes.list(\*\*params) -> LockboxListResponse +- client.lockboxes.list(\*\*params) -> SyncPage[Lockbox] # InboundMailItems Types: ```python -from increase.types import InboundMailItem, InboundMailItemListResponse +from increase.types import InboundMailItem ``` Methods: - client.inbound_mail_items.retrieve(inbound_mail_item_id) -> InboundMailItem -- client.inbound_mail_items.list(\*\*params) -> InboundMailItemListResponse +- client.inbound_mail_items.list(\*\*params) -> SyncPage[InboundMailItem] - client.inbound_mail_items.action(inbound_mail_item_id, \*\*params) -> InboundMailItem # RoutingNumbers @@ -456,14 +453,14 @@ from increase.types import RoutingNumberListResponse Methods: -- client.routing_numbers.list(\*\*params) -> RoutingNumberListResponse +- client.routing_numbers.list(\*\*params) -> SyncPage[RoutingNumberListResponse] # ExternalAccounts Types: ```python -from increase.types import ExternalAccount, ExternalAccountListResponse +from increase.types import ExternalAccount ``` Methods: @@ -471,14 +468,14 @@ Methods: - client.external_accounts.create(\*\*params) -> ExternalAccount - client.external_accounts.retrieve(external_account_id) -> ExternalAccount - client.external_accounts.update(external_account_id, \*\*params) -> ExternalAccount -- client.external_accounts.list(\*\*params) -> ExternalAccountListResponse +- client.external_accounts.list(\*\*params) -> SyncPage[ExternalAccount] # Entities Types: ```python -from increase.types import Entity, EntityListResponse +from increase.types import Entity ``` Methods: @@ -486,7 +483,7 @@ Methods: - client.entities.create(\*\*params) -> Entity - client.entities.retrieve(entity_id) -> Entity - client.entities.update(entity_id, \*\*params) -> Entity -- client.entities.list(\*\*params) -> EntityListResponse +- client.entities.list(\*\*params) -> SyncPage[Entity] - client.entities.archive(entity_id) -> Entity - client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity - client.entities.confirm(entity_id, \*\*params) -> Entity @@ -500,53 +497,53 @@ Methods: Types: ```python -from increase.types import EntitySupplementalDocument, SupplementalDocumentListResponse +from increase.types import EntitySupplementalDocument ``` Methods: - client.supplemental_documents.create(\*\*params) -> EntitySupplementalDocument -- client.supplemental_documents.list(\*\*params) -> SupplementalDocumentListResponse +- client.supplemental_documents.list(\*\*params) -> SyncPage[EntitySupplementalDocument] # Programs Types: ```python -from increase.types import Program, ProgramListResponse +from increase.types import Program ``` Methods: - client.programs.retrieve(program_id) -> Program -- client.programs.list(\*\*params) -> ProgramListResponse +- client.programs.list(\*\*params) -> SyncPage[Program] # AccountStatements Types: ```python -from increase.types import AccountStatement, AccountStatementListResponse +from increase.types import AccountStatement ``` Methods: - client.account_statements.retrieve(account_statement_id) -> AccountStatement -- client.account_statements.list(\*\*params) -> AccountStatementListResponse +- client.account_statements.list(\*\*params) -> SyncPage[AccountStatement] # Files Types: ```python -from increase.types import File, FileListResponse +from increase.types import File ``` Methods: - client.files.create(\*\*params) -> File - client.files.retrieve(file_id) -> File -- client.files.list(\*\*params) -> FileListResponse +- client.files.list(\*\*params) -> SyncPage[File] # FileLinks @@ -565,48 +562,48 @@ Methods: Types: ```python -from increase.types import Document, DocumentListResponse +from increase.types import Document ``` Methods: - client.documents.create(\*\*params) -> Document - client.documents.retrieve(document_id) -> Document -- client.documents.list(\*\*params) -> DocumentListResponse +- client.documents.list(\*\*params) -> SyncPage[Document] # Exports Types: ```python -from increase.types import Export, ExportListResponse +from increase.types import Export ``` Methods: - client.exports.create(\*\*params) -> Export - client.exports.retrieve(export_id) -> Export -- client.exports.list(\*\*params) -> ExportListResponse +- client.exports.list(\*\*params) -> SyncPage[Export] # Events Types: ```python -from increase.types import Event, EventListResponse +from increase.types import Event ``` Methods: - client.events.retrieve(event_id) -> Event -- client.events.list(\*\*params) -> EventListResponse +- client.events.list(\*\*params) -> SyncPage[Event] # EventSubscriptions Types: ```python -from increase.types import EventSubscription, EventSubscriptionListResponse +from increase.types import EventSubscription ``` Methods: @@ -614,7 +611,7 @@ Methods: - client.event_subscriptions.create(\*\*params) -> EventSubscription - client.event_subscriptions.retrieve(event_subscription_id) -> EventSubscription - client.event_subscriptions.update(event_subscription_id, \*\*params) -> EventSubscription -- client.event_subscriptions.list(\*\*params) -> EventSubscriptionListResponse +- client.event_subscriptions.list(\*\*params) -> SyncPage[EventSubscription] # RealTimeDecisions @@ -634,18 +631,14 @@ Methods: Types: ```python -from increase.types import ( - BookkeepingAccount, - BookkeepingBalanceLookup, - BookkeepingAccountListResponse, -) +from increase.types import BookkeepingAccount, BookkeepingBalanceLookup ``` Methods: - client.bookkeeping_accounts.create(\*\*params) -> BookkeepingAccount - client.bookkeeping_accounts.update(bookkeeping_account_id, \*\*params) -> BookkeepingAccount -- client.bookkeeping_accounts.list(\*\*params) -> BookkeepingAccountListResponse +- client.bookkeeping_accounts.list(\*\*params) -> SyncPage[BookkeepingAccount] - client.bookkeeping_accounts.balance(bookkeeping_account_id, \*\*params) -> BookkeepingBalanceLookup # BookkeepingEntrySets @@ -653,27 +646,27 @@ Methods: Types: ```python -from increase.types import BookkeepingEntrySet, BookkeepingEntrySetListResponse +from increase.types import BookkeepingEntrySet ``` Methods: - client.bookkeeping_entry_sets.create(\*\*params) -> BookkeepingEntrySet - client.bookkeeping_entry_sets.retrieve(bookkeeping_entry_set_id) -> BookkeepingEntrySet -- client.bookkeeping_entry_sets.list(\*\*params) -> BookkeepingEntrySetListResponse +- client.bookkeeping_entry_sets.list(\*\*params) -> SyncPage[BookkeepingEntrySet] # BookkeepingEntries Types: ```python -from increase.types import BookkeepingEntry, BookkeepingEntryListResponse +from increase.types import BookkeepingEntry ``` Methods: - client.bookkeeping_entries.retrieve(bookkeeping_entry_id) -> BookkeepingEntry -- client.bookkeeping_entries.list(\*\*params) -> BookkeepingEntryListResponse +- client.bookkeeping_entries.list(\*\*params) -> SyncPage[BookkeepingEntry] # Groups @@ -692,26 +685,26 @@ Methods: Types: ```python -from increase.types import OAuthApplication, OAuthApplicationListResponse +from increase.types import OAuthApplication ``` Methods: - client.oauth_applications.retrieve(oauth_application_id) -> OAuthApplication -- client.oauth_applications.list(\*\*params) -> OAuthApplicationListResponse +- client.oauth_applications.list(\*\*params) -> SyncPage[OAuthApplication] # OAuthConnections Types: ```python -from increase.types import OAuthConnection, OAuthConnectionListResponse +from increase.types import OAuthConnection ``` Methods: - client.oauth_connections.retrieve(oauth_connection_id) -> OAuthConnection -- client.oauth_connections.list(\*\*params) -> OAuthConnectionListResponse +- client.oauth_connections.list(\*\*params) -> SyncPage[OAuthConnection] # OAuthTokens @@ -730,14 +723,14 @@ Methods: Types: ```python -from increase.types import IntrafiAccountEnrollment, IntrafiAccountEnrollmentListResponse +from increase.types import IntrafiAccountEnrollment ``` Methods: - client.intrafi_account_enrollments.create(\*\*params) -> IntrafiAccountEnrollment - client.intrafi_account_enrollments.retrieve(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment -- client.intrafi_account_enrollments.list(\*\*params) -> IntrafiAccountEnrollmentListResponse +- client.intrafi_account_enrollments.list(\*\*params) -> SyncPage[IntrafiAccountEnrollment] - client.intrafi_account_enrollments.unenroll(intrafi_account_enrollment_id) -> IntrafiAccountEnrollment # IntrafiBalances @@ -757,14 +750,14 @@ Methods: Types: ```python -from increase.types import IntrafiExclusion, IntrafiExclusionListResponse +from increase.types import IntrafiExclusion ``` Methods: - client.intrafi_exclusions.create(\*\*params) -> IntrafiExclusion - client.intrafi_exclusions.retrieve(intrafi_exclusion_id) -> IntrafiExclusion -- client.intrafi_exclusions.list(\*\*params) -> IntrafiExclusionListResponse +- client.intrafi_exclusions.list(\*\*params) -> SyncPage[IntrafiExclusion] - client.intrafi_exclusions.archive(intrafi_exclusion_id) -> IntrafiExclusion # CardTokens @@ -772,13 +765,13 @@ Methods: Types: ```python -from increase.types import CardToken, CardTokenCapabilities, CardTokenListResponse +from increase.types import CardToken, CardTokenCapabilities ``` Methods: - client.card_tokens.retrieve(card_token_id) -> CardToken -- client.card_tokens.list(\*\*params) -> CardTokenListResponse +- client.card_tokens.list(\*\*params) -> SyncPage[CardToken] - client.card_tokens.capabilities(card_token_id) -> CardTokenCapabilities # CardPushTransfers @@ -786,14 +779,14 @@ Methods: Types: ```python -from increase.types import CardPushTransfer, CardPushTransferListResponse +from increase.types import CardPushTransfer ``` Methods: - client.card_push_transfers.create(\*\*params) -> CardPushTransfer - client.card_push_transfers.retrieve(card_push_transfer_id) -> CardPushTransfer -- client.card_push_transfers.list(\*\*params) -> CardPushTransferListResponse +- client.card_push_transfers.list(\*\*params) -> SyncPage[CardPushTransfer] - client.card_push_transfers.approve(card_push_transfer_id) -> CardPushTransfer - client.card_push_transfers.cancel(card_push_transfer_id) -> CardPushTransfer @@ -802,14 +795,14 @@ Methods: Types: ```python -from increase.types import CardValidation, CardValidationListResponse +from increase.types import CardValidation ``` Methods: - client.card_validations.create(\*\*params) -> CardValidation - client.card_validations.retrieve(card_validation_id) -> CardValidation -- client.card_validations.list(\*\*params) -> CardValidationListResponse +- client.card_validations.list(\*\*params) -> SyncPage[CardValidation] # Simulations diff --git a/src/increase/pagination.py b/src/increase/pagination.py index d229f5d71..9f14e71ae 100644 --- a/src/increase/pagination.py +++ b/src/increase/pagination.py @@ -3,8 +3,6 @@ from typing import List, Generic, TypeVar, Optional from typing_extensions import override -from pydantic import Field as FieldInfo - from ._base_client import BasePage, PageInfo, BaseSyncPage, BaseAsyncPage __all__ = ["SyncPage", "AsyncPage"] @@ -13,12 +11,15 @@ class SyncPage(BaseSyncPage[_T], BasePage[_T], Generic[_T]): - data: Optional[object] = FieldInfo(alias=":data", default=None) - next_cursor: Optional[object] = FieldInfo(alias=":next_cursor", default=None) + data: List[_T] + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" @override def _get_page_items(self) -> List[_T]: data = self.data + if not data: + return [] return data @override @@ -27,16 +28,19 @@ def next_page_info(self) -> Optional[PageInfo]: if not next_cursor: return None - return PageInfo(params={":cursor": next_cursor}) + return PageInfo(params={"cursor": next_cursor}) class AsyncPage(BaseAsyncPage[_T], BasePage[_T], Generic[_T]): - data: Optional[object] = FieldInfo(alias=":data", default=None) - next_cursor: Optional[object] = FieldInfo(alias=":next_cursor", default=None) + data: List[_T] + next_cursor: Optional[str] = None + """A pointer to a place in the list.""" @override def _get_page_items(self) -> List[_T]: data = self.data + if not data: + return [] return data @override @@ -45,4 +49,4 @@ def next_page_info(self) -> Optional[PageInfo]: if not next_cursor: return None - return PageInfo(params={":cursor": next_cursor}) + return PageInfo(params={"cursor": next_cursor}) diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index 78a8d1f07..fa2474e34 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.account_number import AccountNumber -from ..types.account_number_list_response import AccountNumberListResponse __all__ = ["AccountNumbersResource", "AsyncAccountNumbersResource"] @@ -222,7 +222,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountNumberListResponse: + ) -> SyncPage[AccountNumber]: """ List Account Numbers @@ -247,8 +247,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/account_numbers", + page=SyncPage[AccountNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -267,7 +268,7 @@ def list( account_number_list_params.AccountNumberListParams, ), ), - cast_to=AccountNumberListResponse, + model=AccountNumber, ) @@ -453,7 +454,7 @@ async def update( cast_to=AccountNumber, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -469,7 +470,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountNumberListResponse: + ) -> AsyncPaginator[AccountNumber, AsyncPage[AccountNumber]]: """ List Account Numbers @@ -494,14 +495,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/account_numbers", + page=AsyncPage[AccountNumber], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "ach_debit_status": ach_debit_status, @@ -514,7 +516,7 @@ async def list( account_number_list_params.AccountNumberListParams, ), ), - cast_to=AccountNumberListResponse, + model=AccountNumber, ) diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 9ddf09349..879016421 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -6,7 +6,7 @@ from ..types import account_statement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.account_statement import AccountStatement -from ..types.account_statement_list_response import AccountStatementListResponse __all__ = ["AccountStatementsResource", "AsyncAccountStatementsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountStatementListResponse: + ) -> SyncPage[AccountStatement]: """ List Account Statements @@ -112,8 +112,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/account_statements", + page=SyncPage[AccountStatement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -129,7 +130,7 @@ def list( account_statement_list_params.AccountStatementListParams, ), ), - cast_to=AccountStatementListResponse, + model=AccountStatement, ) @@ -190,7 +191,7 @@ async def retrieve( cast_to=AccountStatement, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -203,7 +204,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountStatementListResponse: + ) -> AsyncPaginator[AccountStatement, AsyncPage[AccountStatement]]: """ List Account Statements @@ -223,14 +224,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/account_statements", + page=AsyncPage[AccountStatement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -240,7 +242,7 @@ async def list( account_statement_list_params.AccountStatementListParams, ), ), - cast_to=AccountStatementListResponse, + model=AccountStatement, ) diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 6e5784955..6aa93303e 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.account_transfer import AccountTransfer -from ..types.account_transfer_list_response import AccountTransferListResponse __all__ = ["AccountTransfersResource", "AsyncAccountTransfersResource"] @@ -159,7 +159,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountTransferListResponse: + ) -> SyncPage[AccountTransfer]: """ List Account Transfers @@ -184,8 +184,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/account_transfers", + page=SyncPage[AccountTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -202,7 +203,7 @@ def list( account_transfer_list_params.AccountTransferListParams, ), ), - cast_to=AccountTransferListResponse, + model=AccountTransfer, ) def approve( @@ -417,7 +418,7 @@ async def retrieve( cast_to=AccountTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -431,7 +432,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountTransferListResponse: + ) -> AsyncPaginator[AccountTransfer, AsyncPage[AccountTransfer]]: """ List Account Transfers @@ -456,14 +457,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/account_transfers", + page=AsyncPage[AccountTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -474,7 +476,7 @@ async def list( account_transfer_list_params.AccountTransferListParams, ), ), - cast_to=AccountTransferListResponse, + model=AccountTransfer, ) async def approve( diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 9d1fe7f2e..080ab2bf6 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -18,10 +18,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.account import Account from ..types.balance_lookup import BalanceLookup -from ..types.account_list_response import AccountListResponse __all__ = ["AccountsResource", "AsyncAccountsResource"] @@ -214,7 +214,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountListResponse: + ) -> SyncPage[Account]: """ List Accounts @@ -243,8 +243,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/accounts", + page=SyncPage[Account], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -264,7 +265,7 @@ def list( account_list_params.AccountListParams, ), ), - cast_to=AccountListResponse, + model=Account, ) def balance( @@ -525,7 +526,7 @@ async def update( cast_to=Account, ) - async def list( + def list( self, *, created_at: account_list_params.CreatedAt | Omit = omit, @@ -542,7 +543,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AccountListResponse: + ) -> AsyncPaginator[Account, AsyncPage[Account]]: """ List Accounts @@ -571,14 +572,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/accounts", + page=AsyncPage[Account], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -592,7 +594,7 @@ async def list( account_list_params.AccountListParams, ), ), - cast_to=AccountListResponse, + model=Account, ) async def balance( diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index d5af0d51e..7d2af5fe1 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.ach_prenotification import ACHPrenotification -from ..types.ach_prenotification_list_response import ACHPrenotificationListResponse __all__ = ["ACHPrenotificationsResource", "AsyncACHPrenotificationsResource"] @@ -207,7 +207,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ACHPrenotificationListResponse: + ) -> SyncPage[ACHPrenotification]: """ List ACH Prenotifications @@ -230,8 +230,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/ach_prenotifications", + page=SyncPage[ACHPrenotification], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -247,7 +248,7 @@ def list( ach_prenotification_list_params.ACHPrenotificationListParams, ), ), - cast_to=ACHPrenotificationListResponse, + model=ACHPrenotification, ) @@ -419,7 +420,7 @@ async def retrieve( cast_to=ACHPrenotification, ) - async def list( + def list( self, *, created_at: ach_prenotification_list_params.CreatedAt | Omit = omit, @@ -432,7 +433,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ACHPrenotificationListResponse: + ) -> AsyncPaginator[ACHPrenotification, AsyncPage[ACHPrenotification]]: """ List ACH Prenotifications @@ -455,14 +456,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/ach_prenotifications", + page=AsyncPage[ACHPrenotification], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -472,7 +474,7 @@ async def list( ach_prenotification_list_params.ACHPrenotificationListParams, ), ), - cast_to=ACHPrenotificationListResponse, + model=ACHPrenotification, ) diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 09fdf9a73..d07b5534a 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.ach_transfer import ACHTransfer -from ..types.ach_transfer_list_response import ACHTransferListResponse __all__ = ["ACHTransfersResource", "AsyncACHTransfersResource"] @@ -255,7 +255,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ACHTransferListResponse: + ) -> SyncPage[ACHTransfer]: """ List ACH Transfers @@ -282,8 +282,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/ach_transfers", + page=SyncPage[ACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -302,7 +303,7 @@ def list( ach_transfer_list_params.ACHTransferListParams, ), ), - cast_to=ACHTransferListResponse, + model=ACHTransfer, ) def approve( @@ -605,7 +606,7 @@ async def retrieve( cast_to=ACHTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -621,7 +622,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ACHTransferListResponse: + ) -> AsyncPaginator[ACHTransfer, AsyncPage[ACHTransfer]]: """ List ACH Transfers @@ -648,14 +649,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/ach_transfers", + page=AsyncPage[ACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -668,7 +670,7 @@ async def list( ach_transfer_list_params.ACHTransferListParams, ), ), - cast_to=ACHTransferListResponse, + model=ACHTransfer, ) async def approve( diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 95d52f96a..238915094 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -24,10 +24,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_account import BookkeepingAccount from ..types.bookkeeping_balance_lookup import BookkeepingBalanceLookup -from ..types.bookkeeping_account_list_response import BookkeepingAccountListResponse __all__ = ["BookkeepingAccountsResource", "AsyncBookkeepingAccountsResource"] @@ -173,7 +173,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingAccountListResponse: + ) -> SyncPage[BookkeepingAccount]: """ List Bookkeeping Accounts @@ -196,8 +196,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/bookkeeping_accounts", + page=SyncPage[BookkeepingAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -212,7 +213,7 @@ def list( bookkeeping_account_list_params.BookkeepingAccountListParams, ), ), - cast_to=BookkeepingAccountListResponse, + model=BookkeepingAccount, ) def balance( @@ -393,7 +394,7 @@ async def update( cast_to=BookkeepingAccount, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -405,7 +406,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingAccountListResponse: + ) -> AsyncPaginator[BookkeepingAccount, AsyncPage[BookkeepingAccount]]: """ List Bookkeeping Accounts @@ -428,14 +429,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/bookkeeping_accounts", + page=AsyncPage[BookkeepingAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -444,7 +446,7 @@ async def list( bookkeeping_account_list_params.BookkeepingAccountListParams, ), ), - cast_to=BookkeepingAccountListResponse, + model=BookkeepingAccount, ) async def balance( diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index 0c56bc393..56be104f3 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -6,7 +6,7 @@ from ..types import bookkeeping_entry_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry import BookkeepingEntry -from ..types.bookkeeping_entry_list_response import BookkeepingEntryListResponse __all__ = ["BookkeepingEntriesResource", "AsyncBookkeepingEntriesResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingEntryListResponse: + ) -> SyncPage[BookkeepingEntry]: """ List Bookkeeping Entries @@ -111,8 +111,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/bookkeeping_entries", + page=SyncPage[BookkeepingEntry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -127,7 +128,7 @@ def list( bookkeeping_entry_list_params.BookkeepingEntryListParams, ), ), - cast_to=BookkeepingEntryListResponse, + model=BookkeepingEntry, ) @@ -188,7 +189,7 @@ async def retrieve( cast_to=BookkeepingEntry, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -200,7 +201,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingEntryListResponse: + ) -> AsyncPaginator[BookkeepingEntry, AsyncPage[BookkeepingEntry]]: """ List Bookkeeping Entries @@ -220,14 +221,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/bookkeeping_entries", + page=AsyncPage[BookkeepingEntry], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -236,7 +238,7 @@ async def list( bookkeeping_entry_list_params.BookkeepingEntryListParams, ), ), - cast_to=BookkeepingEntryListResponse, + model=BookkeepingEntry, ) diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index 2d952c4d6..c437c6185 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.bookkeeping_entry_set import BookkeepingEntrySet -from ..types.bookkeeping_entry_set_list_response import BookkeepingEntrySetListResponse __all__ = ["BookkeepingEntrySetsResource", "AsyncBookkeepingEntrySetsResource"] @@ -150,7 +150,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingEntrySetListResponse: + ) -> SyncPage[BookkeepingEntrySet]: """ List Bookkeeping Entry Sets @@ -175,8 +175,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/bookkeeping_entry_sets", + page=SyncPage[BookkeepingEntrySet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -192,7 +193,7 @@ def list( bookkeeping_entry_set_list_params.BookkeepingEntrySetListParams, ), ), - cast_to=BookkeepingEntrySetListResponse, + model=BookkeepingEntrySet, ) @@ -308,7 +309,7 @@ async def retrieve( cast_to=BookkeepingEntrySet, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -321,7 +322,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> BookkeepingEntrySetListResponse: + ) -> AsyncPaginator[BookkeepingEntrySet, AsyncPage[BookkeepingEntrySet]]: """ List Bookkeeping Entry Sets @@ -346,14 +347,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/bookkeeping_entry_sets", + page=AsyncPage[BookkeepingEntrySet], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -363,7 +365,7 @@ async def list( bookkeeping_entry_set_list_params.BookkeepingEntrySetListParams, ), ), - cast_to=BookkeepingEntrySetListResponse, + model=BookkeepingEntrySet, ) diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index f8f290615..2ef4e6958 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_dispute import CardDispute -from ..types.card_dispute_list_response import CardDisputeListResponse __all__ = ["CardDisputesResource", "AsyncCardDisputesResource"] @@ -164,7 +164,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDisputeListResponse: + ) -> SyncPage[CardDispute]: """ List Card Disputes @@ -187,8 +187,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_disputes", + page=SyncPage[CardDispute], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -205,7 +206,7 @@ def list( card_dispute_list_params.CardDisputeListParams, ), ), - cast_to=CardDisputeListResponse, + model=CardDispute, ) def submit_user_submission( @@ -446,7 +447,7 @@ async def retrieve( cast_to=CardDispute, ) - async def list( + def list( self, *, created_at: card_dispute_list_params.CreatedAt | Omit = omit, @@ -460,7 +461,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardDisputeListResponse: + ) -> AsyncPaginator[CardDispute, AsyncPage[CardDispute]]: """ List Card Disputes @@ -483,14 +484,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_disputes", + page=AsyncPage[CardDispute], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -501,7 +503,7 @@ async def list( card_dispute_list_params.CardDisputeListParams, ), ), - cast_to=CardDisputeListResponse, + model=CardDispute, ) async def submit_user_submission( diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index 06cc1adb4..c314d0e6c 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -6,7 +6,7 @@ from ..types import card_payment_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_payment import CardPayment -from ..types.card_payment_list_response import CardPaymentListResponse __all__ = ["CardPaymentsResource", "AsyncCardPaymentsResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPaymentListResponse: + ) -> SyncPage[CardPayment]: """ List Card Payments @@ -113,8 +113,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_payments", + page=SyncPage[CardPayment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -131,7 +132,7 @@ def list( card_payment_list_params.CardPaymentListParams, ), ), - cast_to=CardPaymentListResponse, + model=CardPayment, ) @@ -190,7 +191,7 @@ async def retrieve( cast_to=CardPayment, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -204,7 +205,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPaymentListResponse: + ) -> AsyncPaginator[CardPayment, AsyncPage[CardPayment]]: """ List Card Payments @@ -226,14 +227,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_payments", + page=AsyncPage[CardPayment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "card_id": card_id, @@ -244,7 +246,7 @@ async def list( card_payment_list_params.CardPaymentListParams, ), ), - cast_to=CardPaymentListResponse, + model=CardPayment, ) diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index 024531798..c768f0946 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -6,7 +6,7 @@ from ..types import card_purchase_supplement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_purchase_supplement import CardPurchaseSupplement -from ..types.card_purchase_supplement_list_response import CardPurchaseSupplementListResponse __all__ = ["CardPurchaseSupplementsResource", "AsyncCardPurchaseSupplementsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPurchaseSupplementListResponse: + ) -> SyncPage[CardPurchaseSupplement]: """ List Card Purchase Supplements @@ -113,8 +113,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_purchase_supplements", + page=SyncPage[CardPurchaseSupplement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +131,7 @@ def list( card_purchase_supplement_list_params.CardPurchaseSupplementListParams, ), ), - cast_to=CardPurchaseSupplementListResponse, + model=CardPurchaseSupplement, ) @@ -191,7 +192,7 @@ async def retrieve( cast_to=CardPurchaseSupplement, ) - async def list( + def list( self, *, card_payment_id: str | Omit = omit, @@ -204,7 +205,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPurchaseSupplementListResponse: + ) -> AsyncPaginator[CardPurchaseSupplement, AsyncPage[CardPurchaseSupplement]]: """ List Card Purchase Supplements @@ -225,14 +226,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_purchase_supplements", + page=AsyncPage[CardPurchaseSupplement], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "card_payment_id": card_payment_id, "created_at": created_at, @@ -242,7 +244,7 @@ async def list( card_purchase_supplement_list_params.CardPurchaseSupplementListParams, ), ), - cast_to=CardPurchaseSupplementListResponse, + model=CardPurchaseSupplement, ) diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index 98d8113bd..b72363fce 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_push_transfer import CardPushTransfer -from ..types.card_push_transfer_list_response import CardPushTransferListResponse __all__ = ["CardPushTransfersResource", "AsyncCardPushTransfersResource"] @@ -247,7 +247,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPushTransferListResponse: + ) -> SyncPage[CardPushTransfer]: """ List Card Push Transfers @@ -272,8 +272,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_push_transfers", + page=SyncPage[CardPushTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -291,7 +292,7 @@ def list( card_push_transfer_list_params.CardPushTransferListParams, ), ), - cast_to=CardPushTransferListResponse, + model=CardPushTransfer, ) def approve( @@ -591,7 +592,7 @@ async def retrieve( cast_to=CardPushTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -606,7 +607,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardPushTransferListResponse: + ) -> AsyncPaginator[CardPushTransfer, AsyncPage[CardPushTransfer]]: """ List Card Push Transfers @@ -631,14 +632,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_push_transfers", + page=AsyncPage[CardPushTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -650,7 +652,7 @@ async def list( card_push_transfer_list_params.CardPushTransferListParams, ), ), - cast_to=CardPushTransferListResponse, + model=CardPushTransfer, ) async def approve( diff --git a/src/increase/resources/card_tokens.py b/src/increase/resources/card_tokens.py index be0d3fd94..c00023910 100644 --- a/src/increase/resources/card_tokens.py +++ b/src/increase/resources/card_tokens.py @@ -6,7 +6,7 @@ from ..types import card_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,10 +15,10 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_token import CardToken from ..types.card_token_capabilities import CardTokenCapabilities -from ..types.card_token_list_response import CardTokenListResponse __all__ = ["CardTokensResource", "AsyncCardTokensResource"] @@ -90,7 +90,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardTokenListResponse: + ) -> SyncPage[CardToken]: """ List Card Tokens @@ -108,8 +108,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_tokens", + page=SyncPage[CardToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -124,7 +125,7 @@ def list( card_token_list_params.CardTokenListParams, ), ), - cast_to=CardTokenListResponse, + model=CardToken, ) def capabilities( @@ -220,7 +221,7 @@ async def retrieve( cast_to=CardToken, ) - async def list( + def list( self, *, created_at: card_token_list_params.CreatedAt | Omit = omit, @@ -232,7 +233,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardTokenListResponse: + ) -> AsyncPaginator[CardToken, AsyncPage[CardToken]]: """ List Card Tokens @@ -250,14 +251,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_tokens", + page=AsyncPage[CardToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -266,7 +268,7 @@ async def list( card_token_list_params.CardTokenListParams, ), ), - cast_to=CardTokenListResponse, + model=CardToken, ) async def capabilities( diff --git a/src/increase/resources/card_validations.py b/src/increase/resources/card_validations.py index 8b6443a18..e24a34ac7 100644 --- a/src/increase/resources/card_validations.py +++ b/src/increase/resources/card_validations.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.card_validation import CardValidation -from ..types.card_validation_list_response import CardValidationListResponse __all__ = ["CardValidationsResource", "AsyncCardValidationsResource"] @@ -185,7 +185,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardValidationListResponse: + ) -> SyncPage[CardValidation]: """ List Card Validations @@ -210,8 +210,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/card_validations", + page=SyncPage[CardValidation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -229,7 +230,7 @@ def list( card_validation_list_params.CardValidationListParams, ), ), - cast_to=CardValidationListResponse, + model=CardValidation, ) @@ -381,7 +382,7 @@ async def retrieve( cast_to=CardValidation, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -396,7 +397,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardValidationListResponse: + ) -> AsyncPaginator[CardValidation, AsyncPage[CardValidation]]: """ List Card Validations @@ -421,14 +422,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/card_validations", + page=AsyncPage[CardValidation], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -440,7 +442,7 @@ async def list( card_validation_list_params.CardValidationListParams, ), ), - cast_to=CardValidationListResponse, + model=CardValidation, ) diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 6f21b8d5e..f5dae7300 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -23,11 +23,11 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ..pagination import SyncPage, AsyncPage from ..types.card import Card -from .._base_client import make_request_options +from .._base_client import AsyncPaginator, make_request_options from ..types.card_details import CardDetails from ..types.card_iframe_url import CardIframeURL -from ..types.card_list_response import CardListResponse __all__ = ["CardsResource", "AsyncCardsResource"] @@ -243,7 +243,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardListResponse: + ) -> SyncPage[Card]: """ List Cards @@ -268,8 +268,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/cards", + page=SyncPage[Card], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -287,7 +288,7 @@ def list( card_list_params.CardListParams, ), ), - cast_to=CardListResponse, + model=Card, ) def create_details_iframe( @@ -621,7 +622,7 @@ async def update( cast_to=Card, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -636,7 +637,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CardListResponse: + ) -> AsyncPaginator[Card, AsyncPage[Card]]: """ List Cards @@ -661,14 +662,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/cards", + page=AsyncPage[Card], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -680,7 +682,7 @@ async def list( card_list_params.CardListParams, ), ), - cast_to=CardListResponse, + model=Card, ) async def create_details_iframe( diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index b0e22c088..2683f91aa 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.check_deposit import CheckDeposit -from ..types.check_deposit_list_response import CheckDepositListResponse __all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] @@ -153,7 +153,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CheckDepositListResponse: + ) -> SyncPage[CheckDeposit]: """ List Check Deposits @@ -178,8 +178,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/check_deposits", + page=SyncPage[CheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -196,7 +197,7 @@ def list( check_deposit_list_params.CheckDepositListParams, ), ), - cast_to=CheckDepositListResponse, + model=CheckDeposit, ) @@ -317,7 +318,7 @@ async def retrieve( cast_to=CheckDeposit, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -331,7 +332,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CheckDepositListResponse: + ) -> AsyncPaginator[CheckDeposit, AsyncPage[CheckDeposit]]: """ List Check Deposits @@ -356,14 +357,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/check_deposits", + page=AsyncPage[CheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -374,7 +376,7 @@ async def list( check_deposit_list_params.CheckDepositListParams, ), ), - cast_to=CheckDepositListResponse, + model=CheckDeposit, ) diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index 2b6512c5f..d7773c3c6 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.check_transfer import CheckTransfer -from ..types.check_transfer_list_response import CheckTransferListResponse __all__ = ["CheckTransfersResource", "AsyncCheckTransfersResource"] @@ -201,7 +201,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CheckTransferListResponse: + ) -> SyncPage[CheckTransfer]: """ List Check Transfers @@ -226,8 +226,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/check_transfers", + page=SyncPage[CheckTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -245,7 +246,7 @@ def list( check_transfer_list_params.CheckTransferListParams, ), ), - cast_to=CheckTransferListResponse, + model=CheckTransfer, ) def approve( @@ -547,7 +548,7 @@ async def retrieve( cast_to=CheckTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -562,7 +563,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> CheckTransferListResponse: + ) -> AsyncPaginator[CheckTransfer, AsyncPage[CheckTransfer]]: """ List Check Transfers @@ -587,14 +588,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/check_transfers", + page=AsyncPage[CheckTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -606,7 +608,7 @@ async def list( check_transfer_list_params.CheckTransferListParams, ), ), - cast_to=CheckTransferListResponse, + model=CheckTransfer, ) async def approve( diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index e3816301c..17f7eab97 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -6,7 +6,7 @@ from ..types import declined_transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.declined_transaction import DeclinedTransaction -from ..types.declined_transaction_list_response import DeclinedTransactionListResponse __all__ = ["DeclinedTransactionsResource", "AsyncDeclinedTransactionsResource"] @@ -94,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DeclinedTransactionListResponse: + ) -> SyncPage[DeclinedTransaction]: """ List Declined Transactions @@ -116,8 +116,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/declined_transactions", + page=SyncPage[DeclinedTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,7 +136,7 @@ def list( declined_transaction_list_params.DeclinedTransactionListParams, ), ), - cast_to=DeclinedTransactionListResponse, + model=DeclinedTransaction, ) @@ -196,7 +197,7 @@ async def retrieve( cast_to=DeclinedTransaction, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -211,7 +212,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DeclinedTransactionListResponse: + ) -> AsyncPaginator[DeclinedTransaction, AsyncPage[DeclinedTransaction]]: """ List Declined Transactions @@ -233,14 +234,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/declined_transactions", + page=AsyncPage[DeclinedTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "category": category, @@ -252,7 +254,7 @@ async def list( declined_transaction_list_params.DeclinedTransactionListParams, ), ), - cast_to=DeclinedTransactionListResponse, + model=DeclinedTransaction, ) diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 14821fb87..84cbd1292 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.digital_card_profile import DigitalCardProfile -from ..types.digital_card_profile_list_response import DigitalCardProfileListResponse __all__ = ["DigitalCardProfilesResource", "AsyncDigitalCardProfilesResource"] @@ -174,7 +174,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DigitalCardProfileListResponse: + ) -> SyncPage[DigitalCardProfile]: """ List Card Profiles @@ -197,8 +197,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/digital_card_profiles", + page=SyncPage[DigitalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -214,7 +215,7 @@ def list( digital_card_profile_list_params.DigitalCardProfileListParams, ), ), - cast_to=DigitalCardProfileListResponse, + model=DigitalCardProfile, ) def archive( @@ -482,7 +483,7 @@ async def retrieve( cast_to=DigitalCardProfile, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -495,7 +496,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DigitalCardProfileListResponse: + ) -> AsyncPaginator[DigitalCardProfile, AsyncPage[DigitalCardProfile]]: """ List Card Profiles @@ -518,14 +519,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/digital_card_profiles", + page=AsyncPage[DigitalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -535,7 +537,7 @@ async def list( digital_card_profile_list_params.DigitalCardProfileListParams, ), ), - cast_to=DigitalCardProfileListResponse, + model=DigitalCardProfile, ) async def archive( diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index 175b45487..f41d35b7f 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -6,7 +6,7 @@ from ..types import digital_wallet_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.digital_wallet_token import DigitalWalletToken -from ..types.digital_wallet_token_list_response import DigitalWalletTokenListResponse __all__ = ["DigitalWalletTokensResource", "AsyncDigitalWalletTokensResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DigitalWalletTokenListResponse: + ) -> SyncPage[DigitalWalletToken]: """ List Digital Wallet Tokens @@ -112,8 +112,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/digital_wallet_tokens", + page=SyncPage[DigitalWalletToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -129,7 +130,7 @@ def list( digital_wallet_token_list_params.DigitalWalletTokenListParams, ), ), - cast_to=DigitalWalletTokenListResponse, + model=DigitalWalletToken, ) @@ -190,7 +191,7 @@ async def retrieve( cast_to=DigitalWalletToken, ) - async def list( + def list( self, *, card_id: str | Omit = omit, @@ -203,7 +204,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DigitalWalletTokenListResponse: + ) -> AsyncPaginator[DigitalWalletToken, AsyncPage[DigitalWalletToken]]: """ List Digital Wallet Tokens @@ -223,14 +224,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/digital_wallet_tokens", + page=AsyncPage[DigitalWalletToken], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "card_id": card_id, "created_at": created_at, @@ -240,7 +242,7 @@ async def list( digital_wallet_token_list_params.DigitalWalletTokenListParams, ), ), - cast_to=DigitalWalletTokenListResponse, + model=DigitalWalletToken, ) diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py index 84b5d5c92..90b72744d 100644 --- a/src/increase/resources/documents.py +++ b/src/increase/resources/documents.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.document import Document -from ..types.document_list_response import DocumentListResponse __all__ = ["DocumentsResource", "AsyncDocumentsResource"] @@ -153,7 +153,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DocumentListResponse: + ) -> SyncPage[Document]: """ List Documents @@ -178,8 +178,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/documents", + page=SyncPage[Document], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -197,7 +198,7 @@ def list( document_list_params.DocumentListParams, ), ), - cast_to=DocumentListResponse, + model=Document, ) @@ -315,7 +316,7 @@ async def retrieve( cast_to=Document, ) - async def list( + def list( self, *, category: document_list_params.Category | Omit = omit, @@ -330,7 +331,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> DocumentListResponse: + ) -> AsyncPaginator[Document, AsyncPage[Document]]: """ List Documents @@ -355,14 +356,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/documents", + page=AsyncPage[Document], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "category": category, "created_at": created_at, @@ -374,7 +376,7 @@ async def list( document_list_params.DocumentListParams, ), ), - cast_to=DocumentListResponse, + model=Document, ) diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 53ed5f6f8..ddbdf06a9 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -29,9 +29,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.entity import Entity -from ..types.entity_list_response import EntityListResponse __all__ = ["EntitiesResource", "AsyncEntitiesResource"] @@ -287,7 +287,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EntityListResponse: + ) -> SyncPage[Entity]: """ List Entities @@ -310,8 +310,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/entities", + page=SyncPage[Entity], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -328,7 +329,7 @@ def list( entity_list_params.EntityListParams, ), ), - cast_to=EntityListResponse, + model=Entity, ) def archive( @@ -920,7 +921,7 @@ async def update( cast_to=Entity, ) - async def list( + def list( self, *, created_at: entity_list_params.CreatedAt | Omit = omit, @@ -934,7 +935,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EntityListResponse: + ) -> AsyncPaginator[Entity, AsyncPage[Entity]]: """ List Entities @@ -957,14 +958,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/entities", + page=AsyncPage[Entity], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -975,7 +977,7 @@ async def list( entity_list_params.EntityListParams, ), ), - cast_to=EntityListResponse, + model=Entity, ) async def archive( diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index 4e6d7ccb5..faa477930 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.event_subscription import EventSubscription -from ..types.event_subscription_list_response import EventSubscriptionListResponse __all__ = ["EventSubscriptionsResource", "AsyncEventSubscriptionsResource"] @@ -471,7 +471,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EventSubscriptionListResponse: + ) -> SyncPage[EventSubscription]: """ List Event Subscriptions @@ -494,8 +494,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/event_subscriptions", + page=SyncPage[EventSubscription], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -510,7 +511,7 @@ def list( event_subscription_list_params.EventSubscriptionListParams, ), ), - cast_to=EventSubscriptionListResponse, + model=EventSubscription, ) @@ -951,7 +952,7 @@ async def update( cast_to=EventSubscription, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -963,7 +964,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EventSubscriptionListResponse: + ) -> AsyncPaginator[EventSubscription, AsyncPage[EventSubscription]]: """ List Event Subscriptions @@ -986,14 +987,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/event_subscriptions", + page=AsyncPage[EventSubscription], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -1002,7 +1004,7 @@ async def list( event_subscription_list_params.EventSubscriptionListParams, ), ), - cast_to=EventSubscriptionListResponse, + model=EventSubscription, ) diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 14a61d722..0e6be4fbe 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -6,7 +6,7 @@ from ..types import event_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ..pagination import SyncPage, AsyncPage from ..types.event import Event -from .._base_client import make_request_options -from ..types.event_list_response import EventListResponse +from .._base_client import AsyncPaginator, make_request_options __all__ = ["EventsResource", "AsyncEventsResource"] @@ -91,7 +91,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EventListResponse: + ) -> SyncPage[Event]: """ List Events @@ -111,8 +111,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/events", + page=SyncPage[Event], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -129,7 +130,7 @@ def list( event_list_params.EventListParams, ), ), - cast_to=EventListResponse, + model=Event, ) @@ -188,7 +189,7 @@ async def retrieve( cast_to=Event, ) - async def list( + def list( self, *, associated_object_id: str | Omit = omit, @@ -202,7 +203,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> EventListResponse: + ) -> AsyncPaginator[Event, AsyncPage[Event]]: """ List Events @@ -222,14 +223,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/events", + page=AsyncPage[Event], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "associated_object_id": associated_object_id, "category": category, @@ -240,7 +242,7 @@ async def list( event_list_params.EventListParams, ), ), - cast_to=EventListResponse, + model=Event, ) diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 69426e559..754a1a9dd 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.export import Export -from ..types.export_list_response import ExportListResponse __all__ = ["ExportsResource", "AsyncExportsResource"] @@ -194,7 +194,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExportListResponse: + ) -> SyncPage[Export]: """ List Exports @@ -217,8 +217,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/exports", + page=SyncPage[Export], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -236,7 +237,7 @@ def list( export_list_params.ExportListParams, ), ), - cast_to=ExportListResponse, + model=Export, ) @@ -395,7 +396,7 @@ async def retrieve( cast_to=Export, ) - async def list( + def list( self, *, category: export_list_params.Category | Omit = omit, @@ -410,7 +411,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExportListResponse: + ) -> AsyncPaginator[Export, AsyncPage[Export]]: """ List Exports @@ -433,14 +434,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/exports", + page=AsyncPage[Export], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "category": category, "created_at": created_at, @@ -452,7 +454,7 @@ async def list( export_list_params.ExportListParams, ), ), - cast_to=ExportListResponse, + model=Export, ) diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index 3ee97ff72..f1ec6f568 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.external_account import ExternalAccount -from ..types.external_account_list_response import ExternalAccountListResponse __all__ = ["ExternalAccountsResource", "AsyncExternalAccountsResource"] @@ -244,7 +244,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExternalAccountListResponse: + ) -> SyncPage[ExternalAccount]: """ List External Accounts @@ -269,8 +269,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/external_accounts", + page=SyncPage[ExternalAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -287,7 +288,7 @@ def list( external_account_list_params.ExternalAccountListParams, ), ), - cast_to=ExternalAccountListResponse, + model=ExternalAccount, ) @@ -497,7 +498,7 @@ async def update( cast_to=ExternalAccount, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -511,7 +512,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ExternalAccountListResponse: + ) -> AsyncPaginator[ExternalAccount, AsyncPage[ExternalAccount]]: """ List External Accounts @@ -536,14 +537,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/external_accounts", + page=AsyncPage[ExternalAccount], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -554,7 +556,7 @@ async def list( external_account_list_params.ExternalAccountListParams, ), ), - cast_to=ExternalAccountListResponse, + model=ExternalAccount, ) diff --git a/src/increase/resources/fednow_transfers.py b/src/increase/resources/fednow_transfers.py index 09cf8cf97..1ae25dc75 100644 --- a/src/increase/resources/fednow_transfers.py +++ b/src/increase/resources/fednow_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.fednow_transfer import FednowTransfer -from ..types.fednow_transfer_list_response import FednowTransferListResponse __all__ = ["FednowTransfersResource", "AsyncFednowTransfersResource"] @@ -184,7 +184,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FednowTransferListResponse: + ) -> SyncPage[FednowTransfer]: """ List FedNow Transfers @@ -211,8 +211,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/fednow_transfers", + page=SyncPage[FednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -231,7 +232,7 @@ def list( fednow_transfer_list_params.FednowTransferListParams, ), ), - cast_to=FednowTransferListResponse, + model=FednowTransfer, ) def approve( @@ -465,7 +466,7 @@ async def retrieve( cast_to=FednowTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -481,7 +482,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FednowTransferListResponse: + ) -> AsyncPaginator[FednowTransfer, AsyncPage[FednowTransfer]]: """ List FedNow Transfers @@ -508,14 +509,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/fednow_transfers", + page=AsyncPage[FednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -528,7 +530,7 @@ async def list( fednow_transfer_list_params.FednowTransferListParams, ), ), - cast_to=FednowTransferListResponse, + model=FednowTransfer, ) async def approve( diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index dcf7fab9e..8e0880de1 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -18,9 +18,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) +from ..pagination import SyncPage, AsyncPage from ..types.file import File -from .._base_client import make_request_options -from ..types.file_list_response import FileListResponse +from .._base_client import AsyncPaginator, make_request_options __all__ = ["FilesResource", "AsyncFilesResource"] @@ -211,7 +211,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FileListResponse: + ) -> SyncPage[File]: """ List Files @@ -234,8 +234,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/files", + page=SyncPage[File], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -252,7 +253,7 @@ def list( file_list_params.FileListParams, ), ), - cast_to=FileListResponse, + model=File, ) @@ -428,7 +429,7 @@ async def retrieve( cast_to=File, ) - async def list( + def list( self, *, created_at: file_list_params.CreatedAt | Omit = omit, @@ -442,7 +443,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> FileListResponse: + ) -> AsyncPaginator[File, AsyncPage[File]]: """ List Files @@ -465,14 +466,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/files", + page=AsyncPage[File], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -483,7 +485,7 @@ async def list( file_list_params.FileListParams, ), ), - cast_to=FileListResponse, + model=File, ) diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 7b129776c..465202ce1 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -22,9 +22,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_ach_transfer import InboundACHTransfer -from ..types.inbound_ach_transfer_list_response import InboundACHTransferListResponse __all__ = ["InboundACHTransfersResource", "AsyncInboundACHTransfersResource"] @@ -101,7 +101,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundACHTransferListResponse: + ) -> SyncPage[InboundACHTransfer]: """ List Inbound ACH Transfers @@ -123,8 +123,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_ach_transfers", + page=SyncPage[InboundACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -142,7 +143,7 @@ def list( inbound_ach_transfer_list_params.InboundACHTransferListParams, ), ), - cast_to=InboundACHTransferListResponse, + model=InboundACHTransfer, ) def create_notification_of_change( @@ -430,7 +431,7 @@ async def retrieve( cast_to=InboundACHTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -445,7 +446,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundACHTransferListResponse: + ) -> AsyncPaginator[InboundACHTransfer, AsyncPage[InboundACHTransfer]]: """ List Inbound ACH Transfers @@ -467,14 +468,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_ach_transfers", + page=AsyncPage[InboundACHTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -486,7 +488,7 @@ async def list( inbound_ach_transfer_list_params.InboundACHTransferListParams, ), ), - cast_to=InboundACHTransferListResponse, + model=InboundACHTransfer, ) async def create_notification_of_change( diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index b615d677f..4337bcd62 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_check_deposit import InboundCheckDeposit -from ..types.inbound_check_deposit_list_response import InboundCheckDepositListResponse __all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] @@ -95,7 +95,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundCheckDepositListResponse: + ) -> SyncPage[InboundCheckDeposit]: """ List Inbound Check Deposits @@ -118,8 +118,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_check_deposits", + page=SyncPage[InboundCheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -136,7 +137,7 @@ def list( inbound_check_deposit_list_params.InboundCheckDepositListParams, ), ), - cast_to=InboundCheckDepositListResponse, + model=InboundCheckDeposit, ) def decline( @@ -303,7 +304,7 @@ async def retrieve( cast_to=InboundCheckDeposit, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -317,7 +318,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundCheckDepositListResponse: + ) -> AsyncPaginator[InboundCheckDeposit, AsyncPage[InboundCheckDeposit]]: """ List Inbound Check Deposits @@ -340,14 +341,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_check_deposits", + page=AsyncPage[InboundCheckDeposit], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "check_transfer_id": check_transfer_id, @@ -358,7 +360,7 @@ async def list( inbound_check_deposit_list_params.InboundCheckDepositListParams, ), ), - cast_to=InboundCheckDepositListResponse, + model=InboundCheckDeposit, ) async def decline( diff --git a/src/increase/resources/inbound_fednow_transfers.py b/src/increase/resources/inbound_fednow_transfers.py index fa317235d..9a314e19f 100644 --- a/src/increase/resources/inbound_fednow_transfers.py +++ b/src/increase/resources/inbound_fednow_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_fednow_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_fednow_transfer import InboundFednowTransfer -from ..types.inbound_fednow_transfer_list_response import InboundFednowTransferListResponse __all__ = ["InboundFednowTransfersResource", "AsyncInboundFednowTransfersResource"] @@ -93,7 +93,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundFednowTransferListResponse: + ) -> SyncPage[InboundFednowTransfer]: """ List Inbound FedNow Transfers @@ -116,8 +116,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_fednow_transfers", + page=SyncPage[InboundFednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -134,7 +135,7 @@ def list( inbound_fednow_transfer_list_params.InboundFednowTransferListParams, ), ), - cast_to=InboundFednowTransferListResponse, + model=InboundFednowTransfer, ) @@ -195,7 +196,7 @@ async def retrieve( cast_to=InboundFednowTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -209,7 +210,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundFednowTransferListResponse: + ) -> AsyncPaginator[InboundFednowTransfer, AsyncPage[InboundFednowTransfer]]: """ List Inbound FedNow Transfers @@ -232,14 +233,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_fednow_transfers", + page=AsyncPage[InboundFednowTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -250,7 +252,7 @@ async def list( inbound_fednow_transfer_list_params.InboundFednowTransferListParams, ), ), - cast_to=InboundFednowTransferListResponse, + model=InboundFednowTransfer, ) diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 1a22ffa0b..7e04c7944 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_mail_item import InboundMailItem -from ..types.inbound_mail_item_list_response import InboundMailItemListResponse __all__ = ["InboundMailItemsResource", "AsyncInboundMailItemsResource"] @@ -94,7 +94,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundMailItemListResponse: + ) -> SyncPage[InboundMailItem]: """ List Inbound Mail Items @@ -114,8 +114,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_mail_items", + page=SyncPage[InboundMailItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -131,7 +132,7 @@ def list( inbound_mail_item_list_params.InboundMailItemListParams, ), ), - cast_to=InboundMailItemListResponse, + model=InboundMailItem, ) def action( @@ -240,7 +241,7 @@ async def retrieve( cast_to=InboundMailItem, ) - async def list( + def list( self, *, created_at: inbound_mail_item_list_params.CreatedAt | Omit = omit, @@ -253,7 +254,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundMailItemListResponse: + ) -> AsyncPaginator[InboundMailItem, AsyncPage[InboundMailItem]]: """ List Inbound Mail Items @@ -273,14 +274,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_mail_items", + page=AsyncPage[InboundMailItem], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -290,7 +292,7 @@ async def list( inbound_mail_item_list_params.InboundMailItemListParams, ), ), - cast_to=InboundMailItemListResponse, + model=InboundMailItem, ) async def action( diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index bba57022a..8bbf1d4f8 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_real_time_payments_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer -from ..types.inbound_real_time_payments_transfer_list_response import InboundRealTimePaymentsTransferListResponse __all__ = ["InboundRealTimePaymentsTransfersResource", "AsyncInboundRealTimePaymentsTransfersResource"] @@ -93,7 +93,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundRealTimePaymentsTransferListResponse: + ) -> SyncPage[InboundRealTimePaymentsTransfer]: """ List Inbound Real-Time Payments Transfers @@ -117,8 +117,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_real_time_payments_transfers", + page=SyncPage[InboundRealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -135,7 +136,7 @@ def list( inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, ), ), - cast_to=InboundRealTimePaymentsTransferListResponse, + model=InboundRealTimePaymentsTransfer, ) @@ -196,7 +197,7 @@ async def retrieve( cast_to=InboundRealTimePaymentsTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -210,7 +211,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundRealTimePaymentsTransferListResponse: + ) -> AsyncPaginator[InboundRealTimePaymentsTransfer, AsyncPage[InboundRealTimePaymentsTransfer]]: """ List Inbound Real-Time Payments Transfers @@ -234,14 +235,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_real_time_payments_transfers", + page=AsyncPage[InboundRealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -252,7 +254,7 @@ async def list( inbound_real_time_payments_transfer_list_params.InboundRealTimePaymentsTransferListParams, ), ), - cast_to=InboundRealTimePaymentsTransferListResponse, + model=InboundRealTimePaymentsTransfer, ) diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index fdd8c378b..b1e02507a 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -6,7 +6,7 @@ from ..types import inbound_wire_drawdown_request_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_drawdown_request import InboundWireDrawdownRequest -from ..types.inbound_wire_drawdown_request_list_response import InboundWireDrawdownRequestListResponse __all__ = ["InboundWireDrawdownRequestsResource", "AsyncInboundWireDrawdownRequestsResource"] @@ -90,7 +90,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundWireDrawdownRequestListResponse: + ) -> SyncPage[InboundWireDrawdownRequest]: """ List Inbound Wire Drawdown Requests @@ -108,8 +108,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_wire_drawdown_requests", + page=SyncPage[InboundWireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -123,7 +124,7 @@ def list( inbound_wire_drawdown_request_list_params.InboundWireDrawdownRequestListParams, ), ), - cast_to=InboundWireDrawdownRequestListResponse, + model=InboundWireDrawdownRequest, ) @@ -184,7 +185,7 @@ async def retrieve( cast_to=InboundWireDrawdownRequest, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -195,7 +196,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundWireDrawdownRequestListResponse: + ) -> AsyncPaginator[InboundWireDrawdownRequest, AsyncPage[InboundWireDrawdownRequest]]: """ List Inbound Wire Drawdown Requests @@ -213,14 +214,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_wire_drawdown_requests", + page=AsyncPage[InboundWireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "limit": limit, @@ -228,7 +230,7 @@ async def list( inbound_wire_drawdown_request_list_params.InboundWireDrawdownRequestListParams, ), ), - cast_to=InboundWireDrawdownRequestListResponse, + model=InboundWireDrawdownRequest, ) diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 15bfffee3..964804140 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.inbound_wire_transfer import InboundWireTransfer -from ..types.inbound_wire_transfer_list_response import InboundWireTransferListResponse __all__ = ["InboundWireTransfersResource", "AsyncInboundWireTransfersResource"] @@ -97,7 +97,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundWireTransferListResponse: + ) -> SyncPage[InboundWireTransfer]: """ List Inbound Wire Transfers @@ -122,8 +122,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/inbound_wire_transfers", + page=SyncPage[InboundWireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -142,7 +143,7 @@ def list( inbound_wire_transfer_list_params.InboundWireTransferListParams, ), ), - cast_to=InboundWireTransferListResponse, + model=InboundWireTransfer, ) def reverse( @@ -257,7 +258,7 @@ async def retrieve( cast_to=InboundWireTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -273,7 +274,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> InboundWireTransferListResponse: + ) -> AsyncPaginator[InboundWireTransfer, AsyncPage[InboundWireTransfer]]: """ List Inbound Wire Transfers @@ -298,14 +299,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/inbound_wire_transfers", + page=AsyncPage[InboundWireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "account_number_id": account_number_id, @@ -318,7 +320,7 @@ async def list( inbound_wire_transfer_list_params.InboundWireTransferListParams, ), ), - cast_to=InboundWireTransferListResponse, + model=InboundWireTransfer, ) async def reverse( diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index c1d2c7687..0fadbae5e 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.intrafi_account_enrollment import IntrafiAccountEnrollment -from ..types.intrafi_account_enrollment_list_response import IntrafiAccountEnrollmentListResponse __all__ = ["IntrafiAccountEnrollmentsResource", "AsyncIntrafiAccountEnrollmentsResource"] @@ -143,7 +143,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> IntrafiAccountEnrollmentListResponse: + ) -> SyncPage[IntrafiAccountEnrollment]: """ List IntraFi Account Enrollments @@ -168,8 +168,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/intrafi_account_enrollments", + page=SyncPage[IntrafiAccountEnrollment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -186,7 +187,7 @@ def list( intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), - cast_to=IntrafiAccountEnrollmentListResponse, + model=IntrafiAccountEnrollment, ) def unenroll( @@ -341,7 +342,7 @@ async def retrieve( cast_to=IntrafiAccountEnrollment, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -355,7 +356,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> IntrafiAccountEnrollmentListResponse: + ) -> AsyncPaginator[IntrafiAccountEnrollment, AsyncPage[IntrafiAccountEnrollment]]: """ List IntraFi Account Enrollments @@ -380,14 +381,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/intrafi_account_enrollments", + page=AsyncPage[IntrafiAccountEnrollment], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "cursor": cursor, @@ -398,7 +400,7 @@ async def list( intrafi_account_enrollment_list_params.IntrafiAccountEnrollmentListParams, ), ), - cast_to=IntrafiAccountEnrollmentListResponse, + model=IntrafiAccountEnrollment, ) async def unenroll( diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 8c6f4b6a5..53e2563c4 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.intrafi_exclusion import IntrafiExclusion -from ..types.intrafi_exclusion_list_response import IntrafiExclusionListResponse __all__ = ["IntrafiExclusionsResource", "AsyncIntrafiExclusionsResource"] @@ -142,7 +142,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> IntrafiExclusionListResponse: + ) -> SyncPage[IntrafiExclusion]: """ List IntraFi Exclusions @@ -167,8 +167,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/intrafi_exclusions", + page=SyncPage[IntrafiExclusion], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -184,7 +185,7 @@ def list( intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), - cast_to=IntrafiExclusionListResponse, + model=IntrafiExclusion, ) def archive( @@ -341,7 +342,7 @@ async def retrieve( cast_to=IntrafiExclusion, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -354,7 +355,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> IntrafiExclusionListResponse: + ) -> AsyncPaginator[IntrafiExclusion, AsyncPage[IntrafiExclusion]]: """ List IntraFi Exclusions @@ -379,14 +380,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/intrafi_exclusions", + page=AsyncPage[IntrafiExclusion], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "entity_id": entity_id, @@ -396,7 +398,7 @@ async def list( intrafi_exclusion_list_params.IntrafiExclusionListParams, ), ), - cast_to=IntrafiExclusionListResponse, + model=IntrafiExclusion, ) async def archive( diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 29aee7cd0..276fe76b0 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.lockbox import Lockbox -from ..types.lockbox_list_response import LockboxListResponse __all__ = ["LockboxesResource", "AsyncLockboxesResource"] @@ -211,7 +211,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> LockboxListResponse: + ) -> SyncPage[Lockbox]: """ List Lockboxes @@ -236,8 +236,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/lockboxes", + page=SyncPage[Lockbox], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -254,7 +255,7 @@ def list( lockbox_list_params.LockboxListParams, ), ), - cast_to=LockboxListResponse, + model=Lockbox, ) @@ -431,7 +432,7 @@ async def update( cast_to=Lockbox, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -445,7 +446,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> LockboxListResponse: + ) -> AsyncPaginator[Lockbox, AsyncPage[Lockbox]]: """ List Lockboxes @@ -470,14 +471,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/lockboxes", + page=AsyncPage[Lockbox], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -488,7 +490,7 @@ async def list( lockbox_list_params.LockboxListParams, ), ), - cast_to=LockboxListResponse, + model=Lockbox, ) diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index d8641324c..d69d83ab3 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -6,7 +6,7 @@ from ..types import oauth_application_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_application import OAuthApplication -from ..types.oauth_application_list_response import OAuthApplicationListResponse __all__ = ["OAuthApplicationsResource", "AsyncOAuthApplicationsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> OAuthApplicationListResponse: + ) -> SyncPage[OAuthApplication]: """ List OAuth Applications @@ -110,8 +110,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/oauth_applications", + page=SyncPage[OAuthApplication], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -127,7 +128,7 @@ def list( oauth_application_list_params.OAuthApplicationListParams, ), ), - cast_to=OAuthApplicationListResponse, + model=OAuthApplication, ) @@ -188,7 +189,7 @@ async def retrieve( cast_to=OAuthApplication, ) - async def list( + def list( self, *, created_at: oauth_application_list_params.CreatedAt | Omit = omit, @@ -201,7 +202,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> OAuthApplicationListResponse: + ) -> AsyncPaginator[OAuthApplication, AsyncPage[OAuthApplication]]: """ List OAuth Applications @@ -219,14 +220,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/oauth_applications", + page=AsyncPage[OAuthApplication], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "created_at": created_at, "cursor": cursor, @@ -236,7 +238,7 @@ async def list( oauth_application_list_params.OAuthApplicationListParams, ), ), - cast_to=OAuthApplicationListResponse, + model=OAuthApplication, ) diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index e1c4466b9..aa27390ad 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -6,7 +6,7 @@ from ..types import oauth_connection_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.oauth_connection import OAuthConnection -from ..types.oauth_connection_list_response import OAuthConnectionListResponse __all__ = ["OAuthConnectionsResource", "AsyncOAuthConnectionsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> OAuthConnectionListResponse: + ) -> SyncPage[OAuthConnection]: """ List OAuth Connections @@ -113,8 +113,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/oauth_connections", + page=SyncPage[OAuthConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -130,7 +131,7 @@ def list( oauth_connection_list_params.OAuthConnectionListParams, ), ), - cast_to=OAuthConnectionListResponse, + model=OAuthConnection, ) @@ -191,7 +192,7 @@ async def retrieve( cast_to=OAuthConnection, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -204,7 +205,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> OAuthConnectionListResponse: + ) -> AsyncPaginator[OAuthConnection, AsyncPage[OAuthConnection]]: """ List OAuth Connections @@ -225,14 +226,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/oauth_connections", + page=AsyncPage[OAuthConnection], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "limit": limit, @@ -242,7 +244,7 @@ async def list( oauth_connection_list_params.OAuthConnectionListParams, ), ), - cast_to=OAuthConnectionListResponse, + model=OAuthConnection, ) diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index e1ae84eb4..19747929c 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.pending_transaction import PendingTransaction -from ..types.pending_transaction_list_response import PendingTransactionListResponse __all__ = ["PendingTransactionsResource", "AsyncPendingTransactionsResource"] @@ -155,7 +155,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PendingTransactionListResponse: + ) -> SyncPage[PendingTransaction]: """ List Pending Transactions @@ -177,8 +177,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/pending_transactions", + page=SyncPage[PendingTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -197,7 +198,7 @@ def list( pending_transaction_list_params.PendingTransactionListParams, ), ), - cast_to=PendingTransactionListResponse, + model=PendingTransaction, ) def release( @@ -366,7 +367,7 @@ async def retrieve( cast_to=PendingTransaction, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -382,7 +383,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PendingTransactionListResponse: + ) -> AsyncPaginator[PendingTransaction, AsyncPage[PendingTransaction]]: """ List Pending Transactions @@ -404,14 +405,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/pending_transactions", + page=AsyncPage[PendingTransaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "category": category, @@ -424,7 +426,7 @@ async def list( pending_transaction_list_params.PendingTransactionListParams, ), ), - cast_to=PendingTransactionListResponse, + model=PendingTransaction, ) async def release( diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 695b9fcbc..67e2b910e 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -19,9 +19,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card_profile import PhysicalCardProfile -from ..types.physical_card_profile_list_response import PhysicalCardProfileListResponse __all__ = ["PhysicalCardProfilesResource", "AsyncPhysicalCardProfilesResource"] @@ -163,7 +163,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PhysicalCardProfileListResponse: + ) -> SyncPage[PhysicalCardProfile]: """ List Physical Card Profiles @@ -186,8 +186,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/physical_card_profiles", + page=SyncPage[PhysicalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -203,7 +204,7 @@ def list( physical_card_profile_list_params.PhysicalCardProfileListParams, ), ), - cast_to=PhysicalCardProfileListResponse, + model=PhysicalCardProfile, ) def archive( @@ -449,7 +450,7 @@ async def retrieve( cast_to=PhysicalCardProfile, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -462,7 +463,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PhysicalCardProfileListResponse: + ) -> AsyncPaginator[PhysicalCardProfile, AsyncPage[PhysicalCardProfile]]: """ List Physical Card Profiles @@ -485,14 +486,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/physical_card_profiles", + page=AsyncPage[PhysicalCardProfile], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -502,7 +504,7 @@ async def list( physical_card_profile_list_params.PhysicalCardProfileListParams, ), ), - cast_to=PhysicalCardProfileListResponse, + model=PhysicalCardProfile, ) async def archive( diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index c4326af92..818ed4baf 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -17,9 +17,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.physical_card import PhysicalCard -from ..types.physical_card_list_response import PhysicalCardListResponse __all__ = ["PhysicalCardsResource", "AsyncPhysicalCardsResource"] @@ -202,7 +202,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PhysicalCardListResponse: + ) -> SyncPage[PhysicalCard]: """ List Physical Cards @@ -227,8 +227,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/physical_cards", + page=SyncPage[PhysicalCard], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -245,7 +246,7 @@ def list( physical_card_list_params.PhysicalCardListParams, ), ), - cast_to=PhysicalCardListResponse, + model=PhysicalCard, ) @@ -413,7 +414,7 @@ async def update( cast_to=PhysicalCard, ) - async def list( + def list( self, *, card_id: str | Omit = omit, @@ -427,7 +428,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> PhysicalCardListResponse: + ) -> AsyncPaginator[PhysicalCard, AsyncPage[PhysicalCard]]: """ List Physical Cards @@ -452,14 +453,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/physical_cards", + page=AsyncPage[PhysicalCard], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "card_id": card_id, "created_at": created_at, @@ -470,7 +472,7 @@ async def list( physical_card_list_params.PhysicalCardListParams, ), ), - cast_to=PhysicalCardListResponse, + model=PhysicalCard, ) diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 50450bc42..9130af3fc 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -6,7 +6,7 @@ from ..types import program_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.program import Program -from ..types.program_list_response import ProgramListResponse __all__ = ["ProgramsResource", "AsyncProgramsResource"] @@ -88,7 +88,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ProgramListResponse: + ) -> SyncPage[Program]: """ List Programs @@ -106,8 +106,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/programs", + page=SyncPage[Program], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -121,7 +122,7 @@ def list( program_list_params.ProgramListParams, ), ), - cast_to=ProgramListResponse, + model=Program, ) @@ -180,7 +181,7 @@ async def retrieve( cast_to=Program, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -191,7 +192,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> ProgramListResponse: + ) -> AsyncPaginator[Program, AsyncPage[Program]]: """ List Programs @@ -209,14 +210,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/programs", + page=AsyncPage[Program], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "limit": limit, @@ -224,7 +226,7 @@ async def list( program_list_params.ProgramListParams, ), ), - cast_to=ProgramListResponse, + model=Program, ) diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 6436c5c9a..40605dc8e 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.real_time_payments_transfer import RealTimePaymentsTransfer -from ..types.real_time_payments_transfer_list_response import RealTimePaymentsTransferListResponse __all__ = ["RealTimePaymentsTransfersResource", "AsyncRealTimePaymentsTransfersResource"] @@ -188,7 +188,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RealTimePaymentsTransferListResponse: + ) -> SyncPage[RealTimePaymentsTransfer]: """ List Real-Time Payments Transfers @@ -216,8 +216,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/real_time_payments_transfers", + page=SyncPage[RealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -236,7 +237,7 @@ def list( real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), ), - cast_to=RealTimePaymentsTransferListResponse, + model=RealTimePaymentsTransfer, ) def approve( @@ -478,7 +479,7 @@ async def retrieve( cast_to=RealTimePaymentsTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -494,7 +495,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RealTimePaymentsTransferListResponse: + ) -> AsyncPaginator[RealTimePaymentsTransfer, AsyncPage[RealTimePaymentsTransfer]]: """ List Real-Time Payments Transfers @@ -522,14 +523,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/real_time_payments_transfers", + page=AsyncPage[RealTimePaymentsTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -542,7 +544,7 @@ async def list( real_time_payments_transfer_list_params.RealTimePaymentsTransferListParams, ), ), - cast_to=RealTimePaymentsTransferListResponse, + model=RealTimePaymentsTransfer, ) async def approve( diff --git a/src/increase/resources/routing_numbers.py b/src/increase/resources/routing_numbers.py index 8546d695d..569b565d2 100644 --- a/src/increase/resources/routing_numbers.py +++ b/src/increase/resources/routing_numbers.py @@ -6,7 +6,7 @@ from ..types import routing_number_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,7 +15,8 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.routing_number_list_response import RoutingNumberListResponse __all__ = ["RoutingNumbersResource", "AsyncRoutingNumbersResource"] @@ -53,7 +54,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RoutingNumberListResponse: + ) -> SyncPage[RoutingNumberListResponse]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -76,8 +77,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/routing_numbers", + page=SyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -92,7 +94,7 @@ def list( routing_number_list_params.RoutingNumberListParams, ), ), - cast_to=RoutingNumberListResponse, + model=RoutingNumberListResponse, ) @@ -116,7 +118,7 @@ def with_streaming_response(self) -> AsyncRoutingNumbersResourceWithStreamingRes """ return AsyncRoutingNumbersResourceWithStreamingResponse(self) - async def list( + def list( self, *, routing_number: str, @@ -128,7 +130,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> RoutingNumberListResponse: + ) -> AsyncPaginator[RoutingNumberListResponse, AsyncPage[RoutingNumberListResponse]]: """ You can use this API to confirm if a routing number is valid, such as when a user is providing you with bank account details. Since routing numbers uniquely @@ -151,14 +153,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/routing_numbers", + page=AsyncPage[RoutingNumberListResponse], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "routing_number": routing_number, "cursor": cursor, @@ -167,7 +170,7 @@ async def list( routing_number_list_params.RoutingNumberListParams, ), ), - cast_to=RoutingNumberListResponse, + model=RoutingNumberListResponse, ) diff --git a/src/increase/resources/supplemental_documents.py b/src/increase/resources/supplemental_documents.py index 52735403f..adb9d9645 100644 --- a/src/increase/resources/supplemental_documents.py +++ b/src/increase/resources/supplemental_documents.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.entity_supplemental_document import EntitySupplementalDocument -from ..types.supplemental_document_list_response import SupplementalDocumentListResponse __all__ = ["SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource"] @@ -105,7 +105,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SupplementalDocumentListResponse: + ) -> SyncPage[EntitySupplementalDocument]: """ List Entity Supplemental Document Submissions @@ -130,8 +130,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/entity_supplemental_documents", + page=SyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -147,7 +148,7 @@ def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - cast_to=SupplementalDocumentListResponse, + model=EntitySupplementalDocument, ) @@ -221,7 +222,7 @@ async def create( cast_to=EntitySupplementalDocument, ) - async def list( + def list( self, *, entity_id: str, @@ -234,7 +235,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SupplementalDocumentListResponse: + ) -> AsyncPaginator[EntitySupplementalDocument, AsyncPage[EntitySupplementalDocument]]: """ List Entity Supplemental Document Submissions @@ -259,14 +260,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/entity_supplemental_documents", + page=AsyncPage[EntitySupplementalDocument], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "entity_id": entity_id, "cursor": cursor, @@ -276,7 +278,7 @@ async def list( supplemental_document_list_params.SupplementalDocumentListParams, ), ), - cast_to=SupplementalDocumentListResponse, + model=EntitySupplementalDocument, ) diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index 81aa2facd..d61dda617 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -6,7 +6,7 @@ from ..types import transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.transaction import Transaction -from ..types.transaction_list_response import TransactionListResponse __all__ = ["TransactionsResource", "AsyncTransactionsResource"] @@ -92,7 +92,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> TransactionListResponse: + ) -> SyncPage[Transaction]: """ List Transactions @@ -115,8 +115,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/transactions", + page=SyncPage[Transaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -134,7 +135,7 @@ def list( transaction_list_params.TransactionListParams, ), ), - cast_to=TransactionListResponse, + model=Transaction, ) @@ -193,7 +194,7 @@ async def retrieve( cast_to=Transaction, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -208,7 +209,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> TransactionListResponse: + ) -> AsyncPaginator[Transaction, AsyncPage[Transaction]]: """ List Transactions @@ -231,14 +232,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/transactions", + page=AsyncPage[Transaction], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "category": category, @@ -250,7 +252,7 @@ async def list( transaction_list_params.TransactionListParams, ), ), - cast_to=TransactionListResponse, + model=Transaction, ) diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 2836d5019..ee73f74d0 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.wire_drawdown_request import WireDrawdownRequest -from ..types.wire_drawdown_request_list_response import WireDrawdownRequestListResponse __all__ = ["WireDrawdownRequestsResource", "AsyncWireDrawdownRequestsResource"] @@ -175,7 +175,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> WireDrawdownRequestListResponse: + ) -> SyncPage[WireDrawdownRequest]: """ List Wire Drawdown Requests @@ -198,8 +198,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/wire_drawdown_requests", + page=SyncPage[WireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -215,7 +216,7 @@ def list( wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), ), - cast_to=WireDrawdownRequestListResponse, + model=WireDrawdownRequest, ) @@ -359,7 +360,7 @@ async def retrieve( cast_to=WireDrawdownRequest, ) - async def list( + def list( self, *, cursor: str | Omit = omit, @@ -372,7 +373,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> WireDrawdownRequestListResponse: + ) -> AsyncPaginator[WireDrawdownRequest, AsyncPage[WireDrawdownRequest]]: """ List Wire Drawdown Requests @@ -395,14 +396,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/wire_drawdown_requests", + page=AsyncPage[WireDrawdownRequest], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "cursor": cursor, "idempotency_key": idempotency_key, @@ -412,7 +414,7 @@ async def list( wire_drawdown_request_list_params.WireDrawdownRequestListParams, ), ), - cast_to=WireDrawdownRequestListResponse, + model=WireDrawdownRequest, ) diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 40d3d3ed8..080468288 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -15,9 +15,9 @@ async_to_raw_response_wrapper, async_to_streamed_response_wrapper, ) -from .._base_client import make_request_options +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options from ..types.wire_transfer import WireTransfer -from ..types.wire_transfer_list_response import WireTransferListResponse __all__ = ["WireTransfersResource", "AsyncWireTransfersResource"] @@ -183,7 +183,7 @@ def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> WireTransferListResponse: + ) -> SyncPage[WireTransfer]: """ List Wire Transfers @@ -210,8 +210,9 @@ def list( timeout: Override the client-level default timeout for this request, in seconds """ - return self._get( + return self._get_api_list( "/wire_transfers", + page=SyncPage[WireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -229,7 +230,7 @@ def list( wire_transfer_list_params.WireTransferListParams, ), ), - cast_to=WireTransferListResponse, + model=WireTransfer, ) def approve( @@ -463,7 +464,7 @@ async def retrieve( cast_to=WireTransfer, ) - async def list( + def list( self, *, account_id: str | Omit = omit, @@ -478,7 +479,7 @@ async def list( extra_query: Query | None = None, extra_body: Body | None = None, timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> WireTransferListResponse: + ) -> AsyncPaginator[WireTransfer, AsyncPage[WireTransfer]]: """ List Wire Transfers @@ -505,14 +506,15 @@ async def list( timeout: Override the client-level default timeout for this request, in seconds """ - return await self._get( + return self._get_api_list( "/wire_transfers", + page=AsyncPage[WireTransfer], options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout, - query=await async_maybe_transform( + query=maybe_transform( { "account_id": account_id, "created_at": created_at, @@ -524,7 +526,7 @@ async def list( wire_transfer_list_params.WireTransferListParams, ), ), - cast_to=WireTransferListResponse, + model=WireTransfer, ) async def approve( diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index e798c8ed1..6eaf9bf97 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -42,19 +42,16 @@ from .intrafi_exclusion import IntrafiExclusion as IntrafiExclusion from .oauth_application import OAuthApplication as OAuthApplication from .card_create_params import CardCreateParams as CardCreateParams -from .card_list_response import CardListResponse as CardListResponse from .card_push_transfer import CardPushTransfer as CardPushTransfer from .card_update_params import CardUpdateParams as CardUpdateParams from .entity_list_params import EntityListParams as EntityListParams from .event_subscription import EventSubscription as EventSubscription from .export_list_params import ExportListParams as ExportListParams from .file_create_params import FileCreateParams as FileCreateParams -from .file_list_response import FileListResponse as FileListResponse from .real_time_decision import RealTimeDecision as RealTimeDecision from .account_list_params import AccountListParams as AccountListParams from .ach_prenotification import ACHPrenotification as ACHPrenotification from .bookkeeping_account import BookkeepingAccount as BookkeepingAccount -from .event_list_response import EventListResponse as EventListResponse from .lockbox_list_params import LockboxListParams as LockboxListParams from .pending_transaction import PendingTransaction as PendingTransaction from .program_list_params import ProgramListParams as ProgramListParams @@ -63,29 +60,23 @@ from .digital_wallet_token import DigitalWalletToken as DigitalWalletToken from .document_list_params import DocumentListParams as DocumentListParams from .entity_create_params import EntityCreateParams as EntityCreateParams -from .entity_list_response import EntityListResponse as EntityListResponse from .entity_update_params import EntityUpdateParams as EntityUpdateParams from .export_create_params import ExportCreateParams as ExportCreateParams -from .export_list_response import ExportListResponse as ExportListResponse from .inbound_ach_transfer import InboundACHTransfer as InboundACHTransfer from .account_create_params import AccountCreateParams as AccountCreateParams -from .account_list_response import AccountListResponse as AccountListResponse from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams -from .lockbox_list_response import LockboxListResponse as LockboxListResponse from .lockbox_update_params import LockboxUpdateParams as LockboxUpdateParams from .physical_card_profile import PhysicalCardProfile as PhysicalCardProfile -from .program_list_response import ProgramListResponse as ProgramListResponse from .wire_drawdown_request import WireDrawdownRequest as WireDrawdownRequest from .account_balance_params import AccountBalanceParams as AccountBalanceParams from .card_token_list_params import CardTokenListParams as CardTokenListParams from .card_update_pin_params import CardUpdatePinParams as CardUpdatePinParams from .document_create_params import DocumentCreateParams as DocumentCreateParams -from .document_list_response import DocumentListResponse as DocumentListResponse from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .inbound_fednow_transfer import InboundFednowTransfer as InboundFednowTransfer @@ -94,38 +85,28 @@ from .card_dispute_list_params import CardDisputeListParams as CardDisputeListParams from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement -from .card_token_list_response import CardTokenListResponse as CardTokenListResponse from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams -from .transaction_list_response import TransactionListResponse as TransactionListResponse from .wire_transfer_list_params import WireTransferListParams as WireTransferListParams from .account_number_list_params import AccountNumberListParams as AccountNumberListParams from .ach_transfer_create_params import ACHTransferCreateParams as ACHTransferCreateParams -from .ach_transfer_list_response import ACHTransferListResponse as ACHTransferListResponse from .bookkeeping_balance_lookup import BookkeepingBalanceLookup as BookkeepingBalanceLookup from .card_dispute_create_params import CardDisputeCreateParams as CardDisputeCreateParams -from .card_dispute_list_response import CardDisputeListResponse as CardDisputeListResponse -from .card_payment_list_response import CardPaymentListResponse as CardPaymentListResponse from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams from .card_validation_list_params import CardValidationListParams as CardValidationListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams -from .check_deposit_list_response import CheckDepositListResponse as CheckDepositListResponse from .fednow_transfer_list_params import FednowTransferListParams as FednowTransferListParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams -from .physical_card_list_response import PhysicalCardListResponse as PhysicalCardListResponse from .physical_card_update_params import PhysicalCardUpdateParams as PhysicalCardUpdateParams from .real_time_payments_transfer import RealTimePaymentsTransfer as RealTimePaymentsTransfer from .wire_transfer_create_params import WireTransferCreateParams as WireTransferCreateParams -from .wire_transfer_list_response import WireTransferListResponse as WireTransferListResponse from .account_number_create_params import AccountNumberCreateParams as AccountNumberCreateParams -from .account_number_list_response import AccountNumberListResponse as AccountNumberListResponse from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams -from .check_transfer_list_response import CheckTransferListResponse as CheckTransferListResponse from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams @@ -134,45 +115,31 @@ from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .card_validation_create_params import CardValidationCreateParams as CardValidationCreateParams -from .card_validation_list_response import CardValidationListResponse as CardValidationListResponse from .fednow_transfer_create_params import FednowTransferCreateParams as FednowTransferCreateParams -from .fednow_transfer_list_response import FednowTransferListResponse as FednowTransferListResponse from .inbound_mail_item_list_params import InboundMailItemListParams as InboundMailItemListParams from .inbound_wire_drawdown_request import InboundWireDrawdownRequest as InboundWireDrawdownRequest from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams -from .account_transfer_list_response import AccountTransferListResponse as AccountTransferListResponse from .card_push_transfer_list_params import CardPushTransferListParams as CardPushTransferListParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams -from .external_account_list_response import ExternalAccountListResponse as ExternalAccountListResponse from .external_account_update_params import ExternalAccountUpdateParams as ExternalAccountUpdateParams -from .oauth_connection_list_response import OAuthConnectionListResponse as OAuthConnectionListResponse -from .account_statement_list_response import AccountStatementListResponse as AccountStatementListResponse from .ach_prenotification_list_params import ACHPrenotificationListParams as ACHPrenotificationListParams from .bookkeeping_account_list_params import BookkeepingAccountListParams as BookkeepingAccountListParams -from .bookkeeping_entry_list_response import BookkeepingEntryListResponse as BookkeepingEntryListResponse from .inbound_mail_item_action_params import InboundMailItemActionParams as InboundMailItemActionParams -from .inbound_mail_item_list_response import InboundMailItemListResponse as InboundMailItemListResponse from .intrafi_exclusion_create_params import IntrafiExclusionCreateParams as IntrafiExclusionCreateParams -from .intrafi_exclusion_list_response import IntrafiExclusionListResponse as IntrafiExclusionListResponse -from .oauth_application_list_response import OAuthApplicationListResponse as OAuthApplicationListResponse from .pending_transaction_list_params import PendingTransactionListParams as PendingTransactionListParams from .card_push_transfer_create_params import CardPushTransferCreateParams as CardPushTransferCreateParams -from .card_push_transfer_list_response import CardPushTransferListResponse as CardPushTransferListResponse from .declined_transaction_list_params import DeclinedTransactionListParams as DeclinedTransactionListParams from .digital_card_profile_list_params import DigitalCardProfileListParams as DigitalCardProfileListParams from .digital_wallet_token_list_params import DigitalWalletTokenListParams as DigitalWalletTokenListParams from .event_subscription_create_params import EventSubscriptionCreateParams as EventSubscriptionCreateParams -from .event_subscription_list_response import EventSubscriptionListResponse as EventSubscriptionListResponse from .event_subscription_update_params import EventSubscriptionUpdateParams as EventSubscriptionUpdateParams from .inbound_ach_transfer_list_params import InboundACHTransferListParams as InboundACHTransferListParams from .real_time_decision_action_params import RealTimeDecisionActionParams as RealTimeDecisionActionParams from .ach_prenotification_create_params import ACHPrenotificationCreateParams as ACHPrenotificationCreateParams -from .ach_prenotification_list_response import ACHPrenotificationListResponse as ACHPrenotificationListResponse from .bookkeeping_account_create_params import BookkeepingAccountCreateParams as BookkeepingAccountCreateParams -from .bookkeeping_account_list_response import BookkeepingAccountListResponse as BookkeepingAccountListResponse from .bookkeeping_account_update_params import BookkeepingAccountUpdateParams as BookkeepingAccountUpdateParams from .bookkeeping_entry_set_list_params import BookkeepingEntrySetListParams as BookkeepingEntrySetListParams from .card_create_details_iframe_params import CardCreateDetailsIframeParams as CardCreateDetailsIframeParams @@ -180,44 +147,27 @@ from .inbound_check_deposit_list_params import InboundCheckDepositListParams as InboundCheckDepositListParams from .inbound_wire_transfer_list_params import InboundWireTransferListParams as InboundWireTransferListParams from .pending_transaction_create_params import PendingTransactionCreateParams as PendingTransactionCreateParams -from .pending_transaction_list_response import PendingTransactionListResponse as PendingTransactionListResponse from .physical_card_profile_list_params import PhysicalCardProfileListParams as PhysicalCardProfileListParams from .supplemental_document_list_params import SupplementalDocumentListParams as SupplementalDocumentListParams from .wire_drawdown_request_list_params import WireDrawdownRequestListParams as WireDrawdownRequestListParams from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams -from .declined_transaction_list_response import DeclinedTransactionListResponse as DeclinedTransactionListResponse from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams -from .digital_card_profile_list_response import DigitalCardProfileListResponse as DigitalCardProfileListResponse -from .digital_wallet_token_list_response import DigitalWalletTokenListResponse as DigitalWalletTokenListResponse from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams -from .inbound_ach_transfer_list_response import InboundACHTransferListResponse as InboundACHTransferListResponse from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams -from .bookkeeping_entry_set_list_response import BookkeepingEntrySetListResponse as BookkeepingEntrySetListResponse from .inbound_ach_transfer_decline_params import InboundACHTransferDeclineParams as InboundACHTransferDeclineParams -from .inbound_check_deposit_list_response import InboundCheckDepositListResponse as InboundCheckDepositListResponse from .inbound_check_deposit_return_params import InboundCheckDepositReturnParams as InboundCheckDepositReturnParams from .inbound_fednow_transfer_list_params import InboundFednowTransferListParams as InboundFednowTransferListParams from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer as InboundRealTimePaymentsTransfer -from .inbound_wire_transfer_list_response import InboundWireTransferListResponse as InboundWireTransferListResponse from .physical_card_profile_create_params import PhysicalCardProfileCreateParams as PhysicalCardProfileCreateParams -from .physical_card_profile_list_response import PhysicalCardProfileListResponse as PhysicalCardProfileListResponse from .supplemental_document_create_params import SupplementalDocumentCreateParams as SupplementalDocumentCreateParams -from .supplemental_document_list_response import SupplementalDocumentListResponse as SupplementalDocumentListResponse from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams -from .wire_drawdown_request_list_response import WireDrawdownRequestListResponse as WireDrawdownRequestListResponse from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams from .inbound_wire_transfer_reverse_params import InboundWireTransferReverseParams as InboundWireTransferReverseParams from .entity_create_beneficial_owner_params import ( EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, ) -from .inbound_fednow_transfer_list_response import ( - InboundFednowTransferListResponse as InboundFednowTransferListResponse, -) -from .card_purchase_supplement_list_response import ( - CardPurchaseSupplementListResponse as CardPurchaseSupplementListResponse, -) from .entity_archive_beneficial_owner_params import ( EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, ) @@ -230,36 +180,24 @@ from .intrafi_account_enrollment_create_params import ( IntrafiAccountEnrollmentCreateParams as IntrafiAccountEnrollmentCreateParams, ) -from .intrafi_account_enrollment_list_response import ( - IntrafiAccountEnrollmentListResponse as IntrafiAccountEnrollmentListResponse, -) from .inbound_wire_drawdown_request_list_params import ( InboundWireDrawdownRequestListParams as InboundWireDrawdownRequestListParams, ) from .real_time_payments_transfer_create_params import ( RealTimePaymentsTransferCreateParams as RealTimePaymentsTransferCreateParams, ) -from .real_time_payments_transfer_list_response import ( - RealTimePaymentsTransferListResponse as RealTimePaymentsTransferListResponse, -) from .card_dispute_submit_user_submission_params import ( CardDisputeSubmitUserSubmissionParams as CardDisputeSubmitUserSubmissionParams, ) from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) -from .inbound_wire_drawdown_request_list_response import ( - InboundWireDrawdownRequestListResponse as InboundWireDrawdownRequestListResponse, -) from .entity_update_beneficial_owner_address_params import ( EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, ) from .inbound_real_time_payments_transfer_list_params import ( InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, ) -from .inbound_real_time_payments_transfer_list_response import ( - InboundRealTimePaymentsTransferListResponse as InboundRealTimePaymentsTransferListResponse, -) from .inbound_ach_transfer_create_notification_of_change_params import ( InboundACHTransferCreateNotificationOfChangeParams as InboundACHTransferCreateNotificationOfChangeParams, ) diff --git a/src/increase/types/account_list_response.py b/src/increase/types/account_list_response.py deleted file mode 100644 index 4e47c0746..000000000 --- a/src/increase/types/account_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .account import Account -from .._models import BaseModel - -__all__ = ["AccountListResponse"] - - -class AccountListResponse(BaseModel): - data: List[Account] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_number_list_response.py b/src/increase/types/account_number_list_response.py deleted file mode 100644 index 314a01c9d..000000000 --- a/src/increase/types/account_number_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .account_number import AccountNumber - -__all__ = ["AccountNumberListResponse"] - - -class AccountNumberListResponse(BaseModel): - data: List[AccountNumber] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_statement_list_response.py b/src/increase/types/account_statement_list_response.py deleted file mode 100644 index e4e2c39c8..000000000 --- a/src/increase/types/account_statement_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .account_statement import AccountStatement - -__all__ = ["AccountStatementListResponse"] - - -class AccountStatementListResponse(BaseModel): - data: List[AccountStatement] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_transfer_list_response.py b/src/increase/types/account_transfer_list_response.py deleted file mode 100644 index 7dff07834..000000000 --- a/src/increase/types/account_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .account_transfer import AccountTransfer - -__all__ = ["AccountTransferListResponse"] - - -class AccountTransferListResponse(BaseModel): - data: List[AccountTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/ach_prenotification_list_response.py b/src/increase/types/ach_prenotification_list_response.py deleted file mode 100644 index a782c2f2d..000000000 --- a/src/increase/types/ach_prenotification_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .ach_prenotification import ACHPrenotification - -__all__ = ["ACHPrenotificationListResponse"] - - -class ACHPrenotificationListResponse(BaseModel): - data: List[ACHPrenotification] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/ach_transfer_list_response.py b/src/increase/types/ach_transfer_list_response.py deleted file mode 100644 index 25902d2c7..000000000 --- a/src/increase/types/ach_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .ach_transfer import ACHTransfer - -__all__ = ["ACHTransferListResponse"] - - -class ACHTransferListResponse(BaseModel): - data: List[ACHTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_account_list_response.py b/src/increase/types/bookkeeping_account_list_response.py deleted file mode 100644 index efede11c4..000000000 --- a/src/increase/types/bookkeeping_account_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .bookkeeping_account import BookkeepingAccount - -__all__ = ["BookkeepingAccountListResponse"] - - -class BookkeepingAccountListResponse(BaseModel): - data: List[BookkeepingAccount] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_entry_list_response.py b/src/increase/types/bookkeeping_entry_list_response.py deleted file mode 100644 index ee89ccacf..000000000 --- a/src/increase/types/bookkeeping_entry_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .bookkeeping_entry import BookkeepingEntry - -__all__ = ["BookkeepingEntryListResponse"] - - -class BookkeepingEntryListResponse(BaseModel): - data: List[BookkeepingEntry] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/bookkeeping_entry_set_list_response.py b/src/increase/types/bookkeeping_entry_set_list_response.py deleted file mode 100644 index d890a6ea6..000000000 --- a/src/increase/types/bookkeeping_entry_set_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .bookkeeping_entry_set import BookkeepingEntrySet - -__all__ = ["BookkeepingEntrySetListResponse"] - - -class BookkeepingEntrySetListResponse(BaseModel): - data: List[BookkeepingEntrySet] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_dispute_list_response.py b/src/increase/types/card_dispute_list_response.py deleted file mode 100644 index 0b89989e1..000000000 --- a/src/increase/types/card_dispute_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_dispute import CardDispute - -__all__ = ["CardDisputeListResponse"] - - -class CardDisputeListResponse(BaseModel): - data: List[CardDispute] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_list_response.py b/src/increase/types/card_list_response.py deleted file mode 100644 index b85edf426..000000000 --- a/src/increase/types/card_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .card import Card -from .._models import BaseModel - -__all__ = ["CardListResponse"] - - -class CardListResponse(BaseModel): - data: List[Card] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_payment_list_response.py b/src/increase/types/card_payment_list_response.py deleted file mode 100644 index 5d87ddb6e..000000000 --- a/src/increase/types/card_payment_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_payment import CardPayment - -__all__ = ["CardPaymentListResponse"] - - -class CardPaymentListResponse(BaseModel): - data: List[CardPayment] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_purchase_supplement_list_response.py b/src/increase/types/card_purchase_supplement_list_response.py deleted file mode 100644 index b30e1be14..000000000 --- a/src/increase/types/card_purchase_supplement_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_purchase_supplement import CardPurchaseSupplement - -__all__ = ["CardPurchaseSupplementListResponse"] - - -class CardPurchaseSupplementListResponse(BaseModel): - data: List[CardPurchaseSupplement] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_push_transfer_list_response.py b/src/increase/types/card_push_transfer_list_response.py deleted file mode 100644 index 73cbe9d10..000000000 --- a/src/increase/types/card_push_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_push_transfer import CardPushTransfer - -__all__ = ["CardPushTransferListResponse"] - - -class CardPushTransferListResponse(BaseModel): - data: List[CardPushTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_token_list_response.py b/src/increase/types/card_token_list_response.py deleted file mode 100644 index 58e5983c4..000000000 --- a/src/increase/types/card_token_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_token import CardToken - -__all__ = ["CardTokenListResponse"] - - -class CardTokenListResponse(BaseModel): - data: List[CardToken] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/card_validation_list_response.py b/src/increase/types/card_validation_list_response.py deleted file mode 100644 index df2980ffd..000000000 --- a/src/increase/types/card_validation_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .card_validation import CardValidation - -__all__ = ["CardValidationListResponse"] - - -class CardValidationListResponse(BaseModel): - data: List[CardValidation] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_deposit_list_response.py b/src/increase/types/check_deposit_list_response.py deleted file mode 100644 index 0c3c61711..000000000 --- a/src/increase/types/check_deposit_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .check_deposit import CheckDeposit - -__all__ = ["CheckDepositListResponse"] - - -class CheckDepositListResponse(BaseModel): - data: List[CheckDeposit] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/check_transfer_list_response.py b/src/increase/types/check_transfer_list_response.py deleted file mode 100644 index 5c3fbeaf7..000000000 --- a/src/increase/types/check_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .check_transfer import CheckTransfer - -__all__ = ["CheckTransferListResponse"] - - -class CheckTransferListResponse(BaseModel): - data: List[CheckTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/declined_transaction_list_response.py b/src/increase/types/declined_transaction_list_response.py deleted file mode 100644 index 1b0e0a202..000000000 --- a/src/increase/types/declined_transaction_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .declined_transaction import DeclinedTransaction - -__all__ = ["DeclinedTransactionListResponse"] - - -class DeclinedTransactionListResponse(BaseModel): - data: List[DeclinedTransaction] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/digital_card_profile_list_response.py b/src/increase/types/digital_card_profile_list_response.py deleted file mode 100644 index 7cbdf20bc..000000000 --- a/src/increase/types/digital_card_profile_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .digital_card_profile import DigitalCardProfile - -__all__ = ["DigitalCardProfileListResponse"] - - -class DigitalCardProfileListResponse(BaseModel): - data: List[DigitalCardProfile] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/digital_wallet_token_list_response.py b/src/increase/types/digital_wallet_token_list_response.py deleted file mode 100644 index 92365ce71..000000000 --- a/src/increase/types/digital_wallet_token_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .digital_wallet_token import DigitalWalletToken - -__all__ = ["DigitalWalletTokenListResponse"] - - -class DigitalWalletTokenListResponse(BaseModel): - data: List[DigitalWalletToken] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/document_list_response.py b/src/increase/types/document_list_response.py deleted file mode 100644 index e55dbd33a..000000000 --- a/src/increase/types/document_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .document import Document - -__all__ = ["DocumentListResponse"] - - -class DocumentListResponse(BaseModel): - data: List[Document] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/entity_list_response.py b/src/increase/types/entity_list_response.py deleted file mode 100644 index 01947e53f..000000000 --- a/src/increase/types/entity_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .entity import Entity -from .._models import BaseModel - -__all__ = ["EntityListResponse"] - - -class EntityListResponse(BaseModel): - data: List[Entity] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/event_list_response.py b/src/increase/types/event_list_response.py deleted file mode 100644 index c19eeb060..000000000 --- a/src/increase/types/event_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .event import Event -from .._models import BaseModel - -__all__ = ["EventListResponse"] - - -class EventListResponse(BaseModel): - data: List[Event] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/event_subscription_list_response.py b/src/increase/types/event_subscription_list_response.py deleted file mode 100644 index 9cebc95f4..000000000 --- a/src/increase/types/event_subscription_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .event_subscription import EventSubscription - -__all__ = ["EventSubscriptionListResponse"] - - -class EventSubscriptionListResponse(BaseModel): - data: List[EventSubscription] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/export_list_response.py b/src/increase/types/export_list_response.py deleted file mode 100644 index 711ac5d94..000000000 --- a/src/increase/types/export_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .export import Export -from .._models import BaseModel - -__all__ = ["ExportListResponse"] - - -class ExportListResponse(BaseModel): - data: List[Export] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/external_account_list_response.py b/src/increase/types/external_account_list_response.py deleted file mode 100644 index 998c5af1e..000000000 --- a/src/increase/types/external_account_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .external_account import ExternalAccount - -__all__ = ["ExternalAccountListResponse"] - - -class ExternalAccountListResponse(BaseModel): - data: List[ExternalAccount] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/fednow_transfer_list_response.py b/src/increase/types/fednow_transfer_list_response.py deleted file mode 100644 index f8702c2c6..000000000 --- a/src/increase/types/fednow_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .fednow_transfer import FednowTransfer - -__all__ = ["FednowTransferListResponse"] - - -class FednowTransferListResponse(BaseModel): - data: List[FednowTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/file_list_response.py b/src/increase/types/file_list_response.py deleted file mode 100644 index a3f746343..000000000 --- a/src/increase/types/file_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .file import File -from .._models import BaseModel - -__all__ = ["FileListResponse"] - - -class FileListResponse(BaseModel): - data: List[File] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_ach_transfer_list_response.py b/src/increase/types/inbound_ach_transfer_list_response.py deleted file mode 100644 index c81705c0d..000000000 --- a/src/increase/types/inbound_ach_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_ach_transfer import InboundACHTransfer - -__all__ = ["InboundACHTransferListResponse"] - - -class InboundACHTransferListResponse(BaseModel): - data: List[InboundACHTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_check_deposit_list_response.py b/src/increase/types/inbound_check_deposit_list_response.py deleted file mode 100644 index eff7dd4c7..000000000 --- a/src/increase/types/inbound_check_deposit_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_check_deposit import InboundCheckDeposit - -__all__ = ["InboundCheckDepositListResponse"] - - -class InboundCheckDepositListResponse(BaseModel): - data: List[InboundCheckDeposit] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_fednow_transfer_list_response.py b/src/increase/types/inbound_fednow_transfer_list_response.py deleted file mode 100644 index 6c116adb6..000000000 --- a/src/increase/types/inbound_fednow_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_fednow_transfer import InboundFednowTransfer - -__all__ = ["InboundFednowTransferListResponse"] - - -class InboundFednowTransferListResponse(BaseModel): - data: List[InboundFednowTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_mail_item_list_response.py b/src/increase/types/inbound_mail_item_list_response.py deleted file mode 100644 index 7770553f5..000000000 --- a/src/increase/types/inbound_mail_item_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_mail_item import InboundMailItem - -__all__ = ["InboundMailItemListResponse"] - - -class InboundMailItemListResponse(BaseModel): - data: List[InboundMailItem] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_real_time_payments_transfer_list_response.py b/src/increase/types/inbound_real_time_payments_transfer_list_response.py deleted file mode 100644 index 9bd2b08ee..000000000 --- a/src/increase/types/inbound_real_time_payments_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_real_time_payments_transfer import InboundRealTimePaymentsTransfer - -__all__ = ["InboundRealTimePaymentsTransferListResponse"] - - -class InboundRealTimePaymentsTransferListResponse(BaseModel): - data: List[InboundRealTimePaymentsTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_drawdown_request_list_response.py b/src/increase/types/inbound_wire_drawdown_request_list_response.py deleted file mode 100644 index d31dd0d08..000000000 --- a/src/increase/types/inbound_wire_drawdown_request_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_wire_drawdown_request import InboundWireDrawdownRequest - -__all__ = ["InboundWireDrawdownRequestListResponse"] - - -class InboundWireDrawdownRequestListResponse(BaseModel): - data: List[InboundWireDrawdownRequest] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_wire_transfer_list_response.py b/src/increase/types/inbound_wire_transfer_list_response.py deleted file mode 100644 index f2453fb24..000000000 --- a/src/increase/types/inbound_wire_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .inbound_wire_transfer import InboundWireTransfer - -__all__ = ["InboundWireTransferListResponse"] - - -class InboundWireTransferListResponse(BaseModel): - data: List[InboundWireTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/intrafi_account_enrollment_list_response.py b/src/increase/types/intrafi_account_enrollment_list_response.py deleted file mode 100644 index fff7494fc..000000000 --- a/src/increase/types/intrafi_account_enrollment_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .intrafi_account_enrollment import IntrafiAccountEnrollment - -__all__ = ["IntrafiAccountEnrollmentListResponse"] - - -class IntrafiAccountEnrollmentListResponse(BaseModel): - data: List[IntrafiAccountEnrollment] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/intrafi_exclusion_list_response.py b/src/increase/types/intrafi_exclusion_list_response.py deleted file mode 100644 index ff1d9ae46..000000000 --- a/src/increase/types/intrafi_exclusion_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .intrafi_exclusion import IntrafiExclusion - -__all__ = ["IntrafiExclusionListResponse"] - - -class IntrafiExclusionListResponse(BaseModel): - data: List[IntrafiExclusion] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/lockbox_list_response.py b/src/increase/types/lockbox_list_response.py deleted file mode 100644 index 092b37254..000000000 --- a/src/increase/types/lockbox_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .lockbox import Lockbox -from .._models import BaseModel - -__all__ = ["LockboxListResponse"] - - -class LockboxListResponse(BaseModel): - data: List[Lockbox] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/oauth_application_list_response.py b/src/increase/types/oauth_application_list_response.py deleted file mode 100644 index 9ac9647c7..000000000 --- a/src/increase/types/oauth_application_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .oauth_application import OAuthApplication - -__all__ = ["OAuthApplicationListResponse"] - - -class OAuthApplicationListResponse(BaseModel): - data: List[OAuthApplication] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/oauth_connection_list_response.py b/src/increase/types/oauth_connection_list_response.py deleted file mode 100644 index 828bfe805..000000000 --- a/src/increase/types/oauth_connection_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .oauth_connection import OAuthConnection - -__all__ = ["OAuthConnectionListResponse"] - - -class OAuthConnectionListResponse(BaseModel): - data: List[OAuthConnection] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/pending_transaction_list_response.py b/src/increase/types/pending_transaction_list_response.py deleted file mode 100644 index ee304363b..000000000 --- a/src/increase/types/pending_transaction_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .pending_transaction import PendingTransaction - -__all__ = ["PendingTransactionListResponse"] - - -class PendingTransactionListResponse(BaseModel): - data: List[PendingTransaction] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/physical_card_list_response.py b/src/increase/types/physical_card_list_response.py deleted file mode 100644 index 3f7ecb0b4..000000000 --- a/src/increase/types/physical_card_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .physical_card import PhysicalCard - -__all__ = ["PhysicalCardListResponse"] - - -class PhysicalCardListResponse(BaseModel): - data: List[PhysicalCard] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/physical_card_profile_list_response.py b/src/increase/types/physical_card_profile_list_response.py deleted file mode 100644 index de23c3d0b..000000000 --- a/src/increase/types/physical_card_profile_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .physical_card_profile import PhysicalCardProfile - -__all__ = ["PhysicalCardProfileListResponse"] - - -class PhysicalCardProfileListResponse(BaseModel): - data: List[PhysicalCardProfile] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/program_list_response.py b/src/increase/types/program_list_response.py deleted file mode 100644 index 365a6f308..000000000 --- a/src/increase/types/program_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .program import Program -from .._models import BaseModel - -__all__ = ["ProgramListResponse"] - - -class ProgramListResponse(BaseModel): - data: List[Program] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/real_time_payments_transfer_list_response.py b/src/increase/types/real_time_payments_transfer_list_response.py deleted file mode 100644 index 21d077c59..000000000 --- a/src/increase/types/real_time_payments_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .real_time_payments_transfer import RealTimePaymentsTransfer - -__all__ = ["RealTimePaymentsTransferListResponse"] - - -class RealTimePaymentsTransferListResponse(BaseModel): - data: List[RealTimePaymentsTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py index c0cdc6913..4b7bd3d75 100644 --- a/src/increase/types/routing_number_list_response.py +++ b/src/increase/types/routing_number_list_response.py @@ -1,16 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, List, Optional from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel -__all__ = ["RoutingNumberListResponse", "Data"] +__all__ = ["RoutingNumberListResponse"] -class Data(BaseModel): +class RoutingNumberListResponse(BaseModel): ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. @@ -50,23 +47,3 @@ class Data(BaseModel): - `supported` - The routing number can receive this transfer type. - `not_supported` - The routing number cannot receive this transfer type. """ - - -class RoutingNumberListResponse(BaseModel): - data: List[Data] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/supplemental_document_list_response.py b/src/increase/types/supplemental_document_list_response.py deleted file mode 100644 index 7910e0bb6..000000000 --- a/src/increase/types/supplemental_document_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .entity_supplemental_document import EntitySupplementalDocument - -__all__ = ["SupplementalDocumentListResponse"] - - -class SupplementalDocumentListResponse(BaseModel): - data: List[EntitySupplementalDocument] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/transaction_list_response.py b/src/increase/types/transaction_list_response.py deleted file mode 100644 index c09e09583..000000000 --- a/src/increase/types/transaction_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .transaction import Transaction - -__all__ = ["TransactionListResponse"] - - -class TransactionListResponse(BaseModel): - data: List[Transaction] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_drawdown_request_list_response.py b/src/increase/types/wire_drawdown_request_list_response.py deleted file mode 100644 index 2ea3043b7..000000000 --- a/src/increase/types/wire_drawdown_request_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .wire_drawdown_request import WireDrawdownRequest - -__all__ = ["WireDrawdownRequestListResponse"] - - -class WireDrawdownRequestListResponse(BaseModel): - data: List[WireDrawdownRequest] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_transfer_list_response.py b/src/increase/types/wire_transfer_list_response.py deleted file mode 100644 index b6566a167..000000000 --- a/src/increase/types/wire_transfer_list_response.py +++ /dev/null @@ -1,30 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import TYPE_CHECKING, Dict, List, Optional - -from pydantic import Field as FieldInfo - -from .._models import BaseModel -from .wire_transfer import WireTransfer - -__all__ = ["WireTransferListResponse"] - - -class WireTransferListResponse(BaseModel): - data: List[WireTransfer] - """The contents of the list.""" - - next_cursor: Optional[str] = None - """A pointer to a place in the list.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/tests/api_resources/test_account_numbers.py b/tests/api_resources/test_account_numbers.py index 6223cf6c2..d97124c78 100644 --- a/tests/api_resources/test_account_numbers.py +++ b/tests/api_resources/test_account_numbers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( AccountNumber, - AccountNumberListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -155,7 +155,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_number = client.account_numbers.list() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -173,7 +173,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -182,7 +182,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = response.parse() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -191,7 +191,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = response.parse() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(SyncPage[AccountNumber], account_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -335,7 +335,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_number = await async_client.account_numbers.list() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -353,7 +353,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -362,7 +362,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = await response.parse() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -371,6 +371,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_number = await response.parse() - assert_matches_type(AccountNumberListResponse, account_number, path=["response"]) + assert_matches_type(AsyncPage[AccountNumber], account_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_account_statements.py b/tests/api_resources/test_account_statements.py index 23c46c977..0caeb7f48 100644 --- a/tests/api_resources/test_account_statements.py +++ b/tests/api_resources/test_account_statements.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import AccountStatement, AccountStatementListResponse +from increase.types import AccountStatement from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_statement = client.account_statements.list() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -74,7 +75,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, ) - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -83,7 +84,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = response.parse() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -92,7 +93,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = response.parse() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(SyncPage[AccountStatement], account_statement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +144,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_statement = await async_client.account_statements.list() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -158,7 +159,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, ) - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -167,7 +168,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = await response.parse() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -176,6 +177,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_statement = await response.parse() - assert_matches_type(AccountStatementListResponse, account_statement, path=["response"]) + assert_matches_type(AsyncPage[AccountStatement], account_statement, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_account_transfers.py b/tests/api_resources/test_account_transfers.py index ed14e99c2..02f608a43 100644 --- a/tests/api_resources/test_account_transfers.py +++ b/tests/api_resources/test_account_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - AccountTransfer, - AccountTransferListResponse, -) +from increase.types import AccountTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -113,7 +111,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account_transfer = client.account_transfers.list() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -129,7 +127,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -138,7 +136,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = response.parse() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -147,7 +145,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = response.parse() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(SyncPage[AccountTransfer], account_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -325,7 +323,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account_transfer = await async_client.account_transfers.list() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -341,7 +339,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -350,7 +348,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = await response.parse() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -359,7 +357,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account_transfer = await response.parse() - assert_matches_type(AccountTransferListResponse, account_transfer, path=["response"]) + assert_matches_type(AsyncPage[AccountTransfer], account_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index e9b995967..d6edc5ab9 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -12,9 +12,9 @@ from increase.types import ( Account, BalanceLookup, - AccountListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -151,7 +151,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: account = client.accounts.list() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(SyncPage[Account], account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -170,7 +170,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: program_id="program_id", status={"in": ["closed"]}, ) - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(SyncPage[Account], account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -179,7 +179,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = response.parse() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(SyncPage[Account], account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -188,7 +188,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = response.parse() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(SyncPage[Account], account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -411,7 +411,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.list() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -430,7 +430,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> program_id="program_id", status={"in": ["closed"]}, ) - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -439,7 +439,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = await response.parse() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(AsyncPage[Account], account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -448,7 +448,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" account = await response.parse() - assert_matches_type(AccountListResponse, account, path=["response"]) + assert_matches_type(AsyncPage[Account], account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_ach_prenotifications.py b/tests/api_resources/test_ach_prenotifications.py index 36739941a..c86c20448 100644 --- a/tests/api_resources/test_ach_prenotifications.py +++ b/tests/api_resources/test_ach_prenotifications.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - ACHPrenotification, - ACHPrenotificationListResponse, -) +from increase.types import ACHPrenotification from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -120,7 +118,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: ach_prenotification = client.ach_prenotifications.list() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -135,7 +133,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -144,7 +142,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = response.parse() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -153,7 +151,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = response.parse() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(SyncPage[ACHPrenotification], ach_prenotification, path=["response"]) assert cast(Any, response.is_closed) is True @@ -262,7 +260,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: ach_prenotification = await async_client.ach_prenotifications.list() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -277,7 +275,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -286,7 +284,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = await response.parse() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -295,6 +293,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_prenotification = await response.parse() - assert_matches_type(ACHPrenotificationListResponse, ach_prenotification, path=["response"]) + assert_matches_type(AsyncPage[ACHPrenotification], ach_prenotification, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_ach_transfers.py b/tests/api_resources/test_ach_transfers.py index c323e54fb..103899c14 100644 --- a/tests/api_resources/test_ach_transfers.py +++ b/tests/api_resources/test_ach_transfers.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ACHTransfer, ACHTransferListResponse +from increase.types import ACHTransfer from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -135,7 +136,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: ach_transfer = client.ach_transfers.list() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -153,7 +154,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -162,7 +163,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -171,7 +172,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = response.parse() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(SyncPage[ACHTransfer], ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -374,7 +375,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: ach_transfer = await async_client.ach_transfers.list() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -392,7 +393,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -401,7 +402,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -410,7 +411,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" ach_transfer = await response.parse() - assert_matches_type(ACHTransferListResponse, ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[ACHTransfer], ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_accounts.py b/tests/api_resources/test_bookkeeping_accounts.py index e7cd661fa..e22057f1d 100644 --- a/tests/api_resources/test_bookkeeping_accounts.py +++ b/tests/api_resources/test_bookkeeping_accounts.py @@ -12,9 +12,9 @@ from increase.types import ( BookkeepingAccount, BookkeepingBalanceLookup, - BookkeepingAccountListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -110,7 +110,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_account = client.bookkeeping_accounts.list() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -119,7 +119,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -128,7 +128,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = response.parse() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -137,7 +137,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = response.parse() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(SyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -283,7 +283,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_account = await async_client.bookkeeping_accounts.list() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -292,7 +292,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -301,7 +301,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = await response.parse() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -310,7 +310,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_account = await response.parse() - assert_matches_type(BookkeepingAccountListResponse, bookkeeping_account, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingAccount], bookkeeping_account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_entries.py b/tests/api_resources/test_bookkeeping_entries.py index a289b0c12..2e78003b4 100644 --- a/tests/api_resources/test_bookkeeping_entries.py +++ b/tests/api_resources/test_bookkeeping_entries.py @@ -9,7 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import BookkeepingEntry, BookkeepingEntryListResponse +from increase.types import BookkeepingEntry +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -58,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_entry = client.bookkeeping_entries.list() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -67,7 +68,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -76,7 +77,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = response.parse() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -85,7 +86,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = response.parse() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) assert cast(Any, response.is_closed) is True @@ -136,7 +137,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_entry = await async_client.bookkeeping_entries.list() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -145,7 +146,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -154,7 +155,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = await response.parse() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -163,6 +164,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry = await response.parse() - assert_matches_type(BookkeepingEntryListResponse, bookkeeping_entry, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntry], bookkeeping_entry, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_bookkeeping_entry_sets.py b/tests/api_resources/test_bookkeeping_entry_sets.py index bf35a8bc0..e13a51f2e 100644 --- a/tests/api_resources/test_bookkeeping_entry_sets.py +++ b/tests/api_resources/test_bookkeeping_entry_sets.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - BookkeepingEntrySet, - BookkeepingEntrySetListResponse, -) +from increase.types import BookkeepingEntrySet from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -140,7 +138,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: bookkeeping_entry_set = client.bookkeeping_entry_sets.list() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -150,7 +148,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, transaction_id="transaction_id", ) - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -159,7 +157,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = response.parse() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -168,7 +166,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = response.parse() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(SyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) assert cast(Any, response.is_closed) is True @@ -297,7 +295,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: bookkeeping_entry_set = await async_client.bookkeeping_entry_sets.list() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -307,7 +305,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, transaction_id="transaction_id", ) - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -316,7 +314,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = await response.parse() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -325,6 +323,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" bookkeeping_entry_set = await response.parse() - assert_matches_type(BookkeepingEntrySetListResponse, bookkeeping_entry_set, path=["response"]) + assert_matches_type(AsyncPage[BookkeepingEntrySet], bookkeeping_entry_set, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 4ef303a73..ac4e72977 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( CardDispute, - CardDisputeListResponse, ) from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -347,7 +347,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_dispute = client.card_disputes.list() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -363,7 +363,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["user_submission_required"]}, ) - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -372,7 +372,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = response.parse() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -381,7 +381,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = response.parse() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(SyncPage[CardDispute], card_dispute, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1061,7 +1061,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.card_disputes.list() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -1077,7 +1077,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["user_submission_required"]}, ) - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -1086,7 +1086,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = await response.parse() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -1095,7 +1095,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_dispute = await response.parse() - assert_matches_type(CardDisputeListResponse, card_dispute, path=["response"]) + assert_matches_type(AsyncPage[CardDispute], card_dispute, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_payments.py b/tests/api_resources/test_card_payments.py index 69dd9644b..aa0b599ff 100644 --- a/tests/api_resources/test_card_payments.py +++ b/tests/api_resources/test_card_payments.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardPayment, CardPaymentListResponse +from increase.types import CardPayment from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_payment = client.card_payments.list() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -75,7 +76,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -84,7 +85,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = response.parse() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -93,7 +94,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = response.parse() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(SyncPage[CardPayment], card_payment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +145,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_payment = await async_client.card_payments.list() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -160,7 +161,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -169,7 +170,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = await response.parse() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -178,6 +179,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_payment = await response.parse() - assert_matches_type(CardPaymentListResponse, card_payment, path=["response"]) + assert_matches_type(AsyncPage[CardPayment], card_payment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_purchase_supplements.py b/tests/api_resources/test_card_purchase_supplements.py index a8c5efe7e..7bbf0fcd1 100644 --- a/tests/api_resources/test_card_purchase_supplements.py +++ b/tests/api_resources/test_card_purchase_supplements.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CardPurchaseSupplement, - CardPurchaseSupplementListResponse, -) +from increase.types import CardPurchaseSupplement from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_purchase_supplement = client.card_purchase_supplements.list() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -79,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -88,7 +86,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = response.parse() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -97,7 +95,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = response.parse() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(SyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) assert cast(Any, response.is_closed) is True @@ -150,7 +148,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_purchase_supplement = await async_client.card_purchase_supplements.list() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -165,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -174,7 +172,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = await response.parse() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -183,6 +181,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_purchase_supplement = await response.parse() - assert_matches_type(CardPurchaseSupplementListResponse, card_purchase_supplement, path=["response"]) + assert_matches_type(AsyncPage[CardPurchaseSupplement], card_purchase_supplement, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py index 48f920d9a..c12a8d0d5 100644 --- a/tests/api_resources/test_card_push_transfers.py +++ b/tests/api_resources/test_card_push_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CardPushTransfer, - CardPushTransferListResponse, -) +from increase.types import CardPushTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -173,7 +171,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_push_transfer = client.card_push_transfers.list() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -190,7 +188,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -199,7 +197,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = response.parse() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -208,7 +206,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = response.parse() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(SyncPage[CardPushTransfer], card_push_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -446,7 +444,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_push_transfer = await async_client.card_push_transfers.list() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -463,7 +461,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -472,7 +470,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = await response.parse() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -481,7 +479,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_push_transfer = await response.parse() - assert_matches_type(CardPushTransferListResponse, card_push_transfer, path=["response"]) + assert_matches_type(AsyncPage[CardPushTransfer], card_push_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_tokens.py b/tests/api_resources/test_card_tokens.py index 3fc40a713..f25e35b70 100644 --- a/tests/api_resources/test_card_tokens.py +++ b/tests/api_resources/test_card_tokens.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import CardToken, CardTokenCapabilities, CardTokenListResponse +from increase.types import CardToken, CardTokenCapabilities from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_token = client.card_tokens.list() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -73,7 +74,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -82,7 +83,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = response.parse() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -91,7 +92,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = response.parse() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(SyncPage[CardToken], card_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -180,7 +181,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_token = await async_client.card_tokens.list() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -194,7 +195,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -203,7 +204,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = await response.parse() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -212,7 +213,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_token = await response.parse() - assert_matches_type(CardTokenListResponse, card_token, path=["response"]) + assert_matches_type(AsyncPage[CardToken], card_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_card_validations.py b/tests/api_resources/test_card_validations.py index 69a2bb2a9..566aeed1c 100644 --- a/tests/api_resources/test_card_validations.py +++ b/tests/api_resources/test_card_validations.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CardValidation, - CardValidationListResponse, -) +from increase.types import CardValidation from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -129,7 +127,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card_validation = client.card_validations.list() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -146,7 +144,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["requires_attention"]}, ) - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -155,7 +153,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = response.parse() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -164,7 +162,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = response.parse() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(SyncPage[CardValidation], card_validation, path=["response"]) assert cast(Any, response.is_closed) is True @@ -282,7 +280,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card_validation = await async_client.card_validations.list() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -299,7 +297,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["requires_attention"]}, ) - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -308,7 +306,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = await response.parse() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -317,6 +315,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card_validation = await response.parse() - assert_matches_type(CardValidationListResponse, card_validation, path=["response"]) + assert_matches_type(AsyncPage[CardValidation], card_validation, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index 2fdf64712..ac1a9a3a4 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -13,9 +13,9 @@ Card, CardDetails, CardIframeURL, - CardListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -176,7 +176,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: card = client.cards.list() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(SyncPage[Card], card, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -193,7 +193,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(SyncPage[Card], card, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -202,7 +202,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = response.parse() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(SyncPage[Card], card, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -211,7 +211,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = response.parse() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(SyncPage[Card], card, path=["response"]) assert cast(Any, response.is_closed) is True @@ -500,7 +500,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.list() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -517,7 +517,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -526,7 +526,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = await response.parse() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(AsyncPage[Card], card, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -535,7 +535,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" card = await response.parse() - assert_matches_type(CardListResponse, card, path=["response"]) + assert_matches_type(AsyncPage[Card], card, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_check_deposits.py b/tests/api_resources/test_check_deposits.py index 459dca003..9f9a14b84 100644 --- a/tests/api_resources/test_check_deposits.py +++ b/tests/api_resources/test_check_deposits.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - CheckDeposit, - CheckDepositListResponse, -) +from increase.types import CheckDeposit from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -113,7 +111,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: check_deposit = client.check_deposits.list() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -129,7 +127,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -138,7 +136,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = response.parse() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -147,7 +145,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = response.parse() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(SyncPage[CheckDeposit], check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True @@ -249,7 +247,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.check_deposits.list() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -265,7 +263,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -274,7 +272,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = await response.parse() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -283,6 +281,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_deposit = await response.parse() - assert_matches_type(CheckDepositListResponse, check_deposit, path=["response"]) + assert_matches_type(AsyncPage[CheckDeposit], check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index fca9c6f02..43df830d1 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( CheckTransfer, - CheckTransferListResponse, ) from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -144,7 +144,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: check_transfer = client.check_transfers.list() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -161,7 +161,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -170,7 +170,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = response.parse() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -179,7 +179,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = response.parse() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(SyncPage[CheckTransfer], check_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -434,7 +434,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: check_transfer = await async_client.check_transfers.list() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -451,7 +451,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -460,7 +460,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = await response.parse() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -469,7 +469,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" check_transfer = await response.parse() - assert_matches_type(CheckTransferListResponse, check_transfer, path=["response"]) + assert_matches_type(AsyncPage[CheckTransfer], check_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_declined_transactions.py b/tests/api_resources/test_declined_transactions.py index 9ff726482..dbacde8c0 100644 --- a/tests/api_resources/test_declined_transactions.py +++ b/tests/api_resources/test_declined_transactions.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DeclinedTransaction, DeclinedTransactionListResponse +from increase.types import DeclinedTransaction from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -61,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: declined_transaction = client.declined_transactions.list() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -78,7 +79,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, route_id="route_id", ) - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -87,7 +88,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = response.parse() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -96,7 +97,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = response.parse() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(SyncPage[DeclinedTransaction], declined_transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -149,7 +150,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: declined_transaction = await async_client.declined_transactions.list() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -166,7 +167,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, route_id="route_id", ) - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -175,7 +176,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = await response.parse() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -184,6 +185,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" declined_transaction = await response.parse() - assert_matches_type(DeclinedTransactionListResponse, declined_transaction, path=["response"]) + assert_matches_type(AsyncPage[DeclinedTransaction], declined_transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_digital_card_profiles.py b/tests/api_resources/test_digital_card_profiles.py index 2b8c928ae..38bbafeea 100644 --- a/tests/api_resources/test_digital_card_profiles.py +++ b/tests/api_resources/test_digital_card_profiles.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( DigitalCardProfile, - DigitalCardProfileListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -125,7 +125,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: digital_card_profile = client.digital_card_profiles.list() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -135,7 +135,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -144,7 +144,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = response.parse() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -153,7 +153,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = response.parse() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(SyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -368,7 +368,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: digital_card_profile = await async_client.digital_card_profiles.list() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -378,7 +378,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -387,7 +387,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = await response.parse() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -396,7 +396,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_card_profile = await response.parse() - assert_matches_type(DigitalCardProfileListResponse, digital_card_profile, path=["response"]) + assert_matches_type(AsyncPage[DigitalCardProfile], digital_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_digital_wallet_tokens.py b/tests/api_resources/test_digital_wallet_tokens.py index a13595fe3..1ce1ba95b 100644 --- a/tests/api_resources/test_digital_wallet_tokens.py +++ b/tests/api_resources/test_digital_wallet_tokens.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import DigitalWalletToken, DigitalWalletTokenListResponse +from increase.types import DigitalWalletToken from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -61,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: digital_wallet_token = client.digital_wallet_tokens.list() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -76,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -85,7 +86,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = response.parse() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -94,7 +95,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = response.parse() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(SyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) assert cast(Any, response.is_closed) is True @@ -147,7 +148,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: digital_wallet_token = await async_client.digital_wallet_tokens.list() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -162,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -171,7 +172,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = await response.parse() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -180,6 +181,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" digital_wallet_token = await response.parse() - assert_matches_type(DigitalWalletTokenListResponse, digital_wallet_token, path=["response"]) + assert_matches_type(AsyncPage[DigitalWalletToken], digital_wallet_token, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py index 23e989e61..c0d808c7b 100644 --- a/tests/api_resources/test_documents.py +++ b/tests/api_resources/test_documents.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Document, DocumentListResponse +from increase.types import Document from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -102,7 +103,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: document = client.documents.list() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(SyncPage[Document], document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -119,7 +120,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(SyncPage[Document], document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -128,7 +129,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = response.parse() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(SyncPage[Document], document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -137,7 +138,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = response.parse() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(SyncPage[Document], document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -231,7 +232,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: document = await async_client.documents.list() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -248,7 +249,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -257,7 +258,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = await response.parse() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(AsyncPage[Document], document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -266,6 +267,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" document = await response.parse() - assert_matches_type(DocumentListResponse, document, path=["response"]) + assert_matches_type(AsyncPage[Document], document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 987aa4fec..ace0390a2 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( Entity, - EntityListResponse, ) from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -434,7 +434,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: entity = client.entities.list() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(SyncPage[Entity], entity, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -450,7 +450,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(SyncPage[Entity], entity, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -459,7 +459,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = response.parse() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(SyncPage[Entity], entity, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -468,7 +468,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = response.parse() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(SyncPage[Entity], entity, path=["response"]) assert cast(Any, response.is_closed) is True @@ -1361,7 +1361,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.list() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -1377,7 +1377,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -1386,7 +1386,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = await response.parse() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(AsyncPage[Entity], entity, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -1395,7 +1395,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" entity = await response.parse() - assert_matches_type(EntityListResponse, entity, path=["response"]) + assert_matches_type(AsyncPage[Entity], entity, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index f43599a63..f8577e2cf 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( EventSubscription, - EventSubscriptionListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -149,7 +149,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: event_subscription = client.event_subscriptions.list() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -158,7 +158,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -167,7 +167,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = response.parse() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -176,7 +176,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = response.parse() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(SyncPage[EventSubscription], event_subscription, path=["response"]) assert cast(Any, response.is_closed) is True @@ -315,7 +315,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: event_subscription = await async_client.event_subscriptions.list() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -324,7 +324,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -333,7 +333,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = await response.parse() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -342,6 +342,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" event_subscription = await response.parse() - assert_matches_type(EventSubscriptionListResponse, event_subscription, path=["response"]) + assert_matches_type(AsyncPage[EventSubscription], event_subscription, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index d6de1afb1..101cba4be 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Event, EventListResponse +from increase.types import Event from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: event = client.events.list() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(SyncPage[Event], event, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -75,7 +76,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(SyncPage[Event], event, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -84,7 +85,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(SyncPage[Event], event, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -93,7 +94,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = response.parse() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(SyncPage[Event], event, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +145,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: event = await async_client.events.list() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -160,7 +161,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -169,7 +170,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(AsyncPage[Event], event, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -178,6 +179,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" event = await response.parse() - assert_matches_type(EventListResponse, event, path=["response"]) + assert_matches_type(AsyncPage[Event], event, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 66cafb089..496ac45e1 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Export, ExportListResponse +from increase.types import Export from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -142,7 +143,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: export = client.exports.list() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(SyncPage[Export], export, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -159,7 +160,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(SyncPage[Export], export, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -168,7 +169,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = response.parse() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(SyncPage[Export], export, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -177,7 +178,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = response.parse() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(SyncPage[Export], export, path=["response"]) assert cast(Any, response.is_closed) is True @@ -311,7 +312,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -328,7 +329,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -337,7 +338,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = await response.parse() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(AsyncPage[Export], export, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -346,6 +347,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" export = await response.parse() - assert_matches_type(ExportListResponse, export, path=["response"]) + assert_matches_type(AsyncPage[Export], export, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_external_accounts.py b/tests/api_resources/test_external_accounts.py index 33b48e74b..4d639e66e 100644 --- a/tests/api_resources/test_external_accounts.py +++ b/tests/api_resources/test_external_accounts.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( ExternalAccount, - ExternalAccountListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -158,7 +158,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: external_account = client.external_accounts.list() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -169,7 +169,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: routing_number="xxxxxxxxx", status={"in": ["active"]}, ) - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -178,7 +178,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = response.parse() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -187,7 +187,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = response.parse() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(SyncPage[ExternalAccount], external_account, path=["response"]) assert cast(Any, response.is_closed) is True @@ -335,7 +335,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: external_account = await async_client.external_accounts.list() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -346,7 +346,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> routing_number="xxxxxxxxx", status={"in": ["active"]}, ) - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -355,7 +355,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = await response.parse() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -364,6 +364,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" external_account = await response.parse() - assert_matches_type(ExternalAccountListResponse, external_account, path=["response"]) + assert_matches_type(AsyncPage[ExternalAccount], external_account, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_fednow_transfers.py b/tests/api_resources/test_fednow_transfers.py index 1e7e04341..c13a3ee40 100644 --- a/tests/api_resources/test_fednow_transfers.py +++ b/tests/api_resources/test_fednow_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - FednowTransfer, - FednowTransferListResponse, -) +from increase.types import FednowTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -136,7 +134,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: fednow_transfer = client.fednow_transfers.list() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -154,7 +152,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_reviewing"]}, ) - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -163,7 +161,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = response.parse() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -172,7 +170,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = response.parse() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[FednowTransfer], fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -373,7 +371,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: fednow_transfer = await async_client.fednow_transfers.list() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -391,7 +389,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_reviewing"]}, ) - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -400,7 +398,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = await response.parse() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -409,7 +407,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" fednow_transfer = await response.parse() - assert_matches_type(FednowTransferListResponse, fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[FednowTransfer], fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index d210a6fa1..e36671d6d 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import File, FileListResponse +from increase.types import File from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -102,7 +103,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: file = client.files.list() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(SyncPage[File], file, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -118,7 +119,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, purpose={"in": ["card_dispute_attachment"]}, ) - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(SyncPage[File], file, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -127,7 +128,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(SyncPage[File], file, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -136,7 +137,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = response.parse() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(SyncPage[File], file, path=["response"]) assert cast(Any, response.is_closed) is True @@ -230,7 +231,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: file = await async_client.files.list() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -246,7 +247,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, purpose={"in": ["card_dispute_attachment"]}, ) - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -255,7 +256,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(AsyncPage[File], file, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -264,6 +265,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" file = await response.parse() - assert_matches_type(FileListResponse, file, path=["response"]) + assert_matches_type(AsyncPage[File], file, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_ach_transfers.py b/tests/api_resources/test_inbound_ach_transfers.py index f70dee03d..9c73918f4 100644 --- a/tests/api_resources/test_inbound_ach_transfers.py +++ b/tests/api_resources/test_inbound_ach_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( InboundACHTransfer, - InboundACHTransferListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +64,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_ach_transfer = client.inbound_ach_transfers.list() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -81,7 +81,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending"]}, ) - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -90,7 +90,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = response.parse() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -99,7 +99,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = response.parse() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -293,7 +293,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_ach_transfer = await async_client.inbound_ach_transfers.list() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -310,7 +310,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending"]}, ) - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -319,7 +319,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = await response.parse() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -328,7 +328,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_ach_transfer = await response.parse() - assert_matches_type(InboundACHTransferListResponse, inbound_ach_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundACHTransfer], inbound_ach_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_check_deposits.py b/tests/api_resources/test_inbound_check_deposits.py index f501d9a7a..0b4064f1e 100644 --- a/tests/api_resources/test_inbound_check_deposits.py +++ b/tests/api_resources/test_inbound_check_deposits.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundCheckDeposit, - InboundCheckDepositListResponse, -) +from increase.types import InboundCheckDeposit from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_check_deposit = client.inbound_check_deposits.list() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -80,7 +78,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -89,7 +87,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -98,7 +96,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = response.parse() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(SyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True @@ -235,7 +233,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_check_deposit = await async_client.inbound_check_deposits.list() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -251,7 +249,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -260,7 +258,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -269,7 +267,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_check_deposit = await response.parse() - assert_matches_type(InboundCheckDepositListResponse, inbound_check_deposit, path=["response"]) + assert_matches_type(AsyncPage[InboundCheckDeposit], inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_fednow_transfers.py b/tests/api_resources/test_inbound_fednow_transfers.py index a23be479e..7ea08107c 100644 --- a/tests/api_resources/test_inbound_fednow_transfers.py +++ b/tests/api_resources/test_inbound_fednow_transfers.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import InboundFednowTransfer, InboundFednowTransferListResponse +from increase.types import InboundFednowTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -61,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_fednow_transfer = client.inbound_fednow_transfers.list() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -77,7 +78,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -86,7 +87,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = response.parse() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -95,7 +96,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = response.parse() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -148,7 +149,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_fednow_transfer = await async_client.inbound_fednow_transfers.list() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -164,7 +165,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -173,7 +174,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = await response.parse() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -182,6 +183,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_fednow_transfer = await response.parse() - assert_matches_type(InboundFednowTransferListResponse, inbound_fednow_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundFednowTransfer], inbound_fednow_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_mail_items.py b/tests/api_resources/test_inbound_mail_items.py index 1de275ae2..8f4229b5e 100644 --- a/tests/api_resources/test_inbound_mail_items.py +++ b/tests/api_resources/test_inbound_mail_items.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundMailItem, - InboundMailItemListResponse, -) +from increase.types import InboundMailItem from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -62,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_mail_item = client.inbound_mail_items.list() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -77,7 +75,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, lockbox_id="lockbox_id", ) - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -86,7 +84,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = response.parse() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -95,7 +93,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = response.parse() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(SyncPage[InboundMailItem], inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True @@ -188,7 +186,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_mail_item = await async_client.inbound_mail_items.list() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -203,7 +201,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, lockbox_id="lockbox_id", ) - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -212,7 +210,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = await response.parse() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -221,7 +219,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_mail_item = await response.parse() - assert_matches_type(InboundMailItemListResponse, inbound_mail_item, path=["response"]) + assert_matches_type(AsyncPage[InboundMailItem], inbound_mail_item, path=["response"]) assert cast(Any, response.is_closed) is True 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 d5b61f5ec..305dfa6fc 100755 --- a/tests/api_resources/test_inbound_real_time_payments_transfers.py +++ b/tests/api_resources/test_inbound_real_time_payments_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundRealTimePaymentsTransfer, - InboundRealTimePaymentsTransferListResponse, -) +from increase.types import InboundRealTimePaymentsTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -65,7 +63,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: def test_method_list(self, client: Increase) -> None: inbound_real_time_payments_transfer = client.inbound_real_time_payments_transfers.list() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -83,7 +81,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, ) assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -94,7 +92,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = response.parse() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -105,7 +103,7 @@ def test_streaming_response_list(self, client: Increase) -> None: inbound_real_time_payments_transfer = response.parse() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + SyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) assert cast(Any, response.is_closed) is True @@ -160,7 +158,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_real_time_payments_transfer = await async_client.inbound_real_time_payments_transfers.list() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -178,7 +176,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, ) assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -189,7 +187,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_real_time_payments_transfer = await response.parse() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) @parametrize @@ -200,7 +198,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non inbound_real_time_payments_transfer = await response.parse() assert_matches_type( - InboundRealTimePaymentsTransferListResponse, inbound_real_time_payments_transfer, path=["response"] + AsyncPage[InboundRealTimePaymentsTransfer], inbound_real_time_payments_transfer, path=["response"] ) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_wire_drawdown_requests.py b/tests/api_resources/test_inbound_wire_drawdown_requests.py index f412ee604..8d0fb6d07 100644 --- a/tests/api_resources/test_inbound_wire_drawdown_requests.py +++ b/tests/api_resources/test_inbound_wire_drawdown_requests.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundWireDrawdownRequest, - InboundWireDrawdownRequestListResponse, -) +from increase.types import InboundWireDrawdownRequest +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -63,7 +61,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_wire_drawdown_request = client.inbound_wire_drawdown_requests.list() - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -71,7 +69,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -80,7 +78,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = response.parse() - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -89,9 +87,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = response.parse() - assert_matches_type( - InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"] - ) + assert_matches_type(SyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -144,7 +140,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_wire_drawdown_request = await async_client.inbound_wire_drawdown_requests.list() - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -152,7 +148,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -161,7 +157,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = await response.parse() - assert_matches_type(InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -170,8 +166,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_drawdown_request = await response.parse() - assert_matches_type( - InboundWireDrawdownRequestListResponse, inbound_wire_drawdown_request, path=["response"] - ) + assert_matches_type(AsyncPage[InboundWireDrawdownRequest], inbound_wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_inbound_wire_transfers.py b/tests/api_resources/test_inbound_wire_transfers.py index 2f091c3e5..6087c698d 100644 --- a/tests/api_resources/test_inbound_wire_transfers.py +++ b/tests/api_resources/test_inbound_wire_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - InboundWireTransfer, - InboundWireTransferListResponse, -) +from increase.types import InboundWireTransfer from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -64,7 +62,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: inbound_wire_transfer = client.inbound_wire_transfers.list() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -82,7 +80,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: status={"in": ["pending"]}, wire_drawdown_request_id="wire_drawdown_request_id", ) - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -91,7 +89,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = response.parse() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -100,7 +98,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = response.parse() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(SyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -197,7 +195,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: inbound_wire_transfer = await async_client.inbound_wire_transfers.list() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -215,7 +213,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> status={"in": ["pending"]}, wire_drawdown_request_id="wire_drawdown_request_id", ) - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -224,7 +222,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = await response.parse() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -233,7 +231,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" inbound_wire_transfer = await response.parse() - assert_matches_type(InboundWireTransferListResponse, inbound_wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[InboundWireTransfer], inbound_wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_intrafi_account_enrollments.py b/tests/api_resources/test_intrafi_account_enrollments.py index fff8e948a..8ed6b9981 100644 --- a/tests/api_resources/test_intrafi_account_enrollments.py +++ b/tests/api_resources/test_intrafi_account_enrollments.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( IntrafiAccountEnrollment, - IntrafiAccountEnrollmentListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -97,7 +97,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: intrafi_account_enrollment = client.intrafi_account_enrollments.list() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -108,7 +108,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_enrolling"]}, ) - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -117,7 +117,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -126,7 +126,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = response.parse() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(SyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True @@ -253,7 +253,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: intrafi_account_enrollment = await async_client.intrafi_account_enrollments.list() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -264,7 +264,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_enrolling"]}, ) - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -273,7 +273,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -282,7 +282,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_account_enrollment = await response.parse() - assert_matches_type(IntrafiAccountEnrollmentListResponse, intrafi_account_enrollment, path=["response"]) + assert_matches_type(AsyncPage[IntrafiAccountEnrollment], intrafi_account_enrollment, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py index abbd2081d..b3564fc62 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - IntrafiExclusion, - IntrafiExclusionListResponse, -) +from increase.types import IntrafiExclusion +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -95,7 +93,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: intrafi_exclusion = client.intrafi_exclusions.list() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -105,7 +103,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -114,7 +112,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -123,7 +121,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = response.parse() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(SyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True @@ -246,7 +244,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: intrafi_exclusion = await async_client.intrafi_exclusions.list() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -256,7 +254,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -265,7 +263,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -274,7 +272,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" intrafi_exclusion = await response.parse() - assert_matches_type(IntrafiExclusionListResponse, intrafi_exclusion, path=["response"]) + assert_matches_type(AsyncPage[IntrafiExclusion], intrafi_exclusion, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_lockboxes.py b/tests/api_resources/test_lockboxes.py index 4b3c35818..b8e2b12b9 100644 --- a/tests/api_resources/test_lockboxes.py +++ b/tests/api_resources/test_lockboxes.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - Lockbox, - LockboxListResponse, -) +from increase.types import Lockbox from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -150,7 +148,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: lockbox = client.lockboxes.list() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -166,7 +164,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -175,7 +173,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = response.parse() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -184,7 +182,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = response.parse() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(SyncPage[Lockbox], lockbox, path=["response"]) assert cast(Any, response.is_closed) is True @@ -323,7 +321,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: lockbox = await async_client.lockboxes.list() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -339,7 +337,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -348,7 +346,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = await response.parse() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -357,6 +355,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" lockbox = await response.parse() - assert_matches_type(LockboxListResponse, lockbox, path=["response"]) + assert_matches_type(AsyncPage[Lockbox], lockbox, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_oauth_applications.py b/tests/api_resources/test_oauth_applications.py index 547c9711d..17280bde0 100644 --- a/tests/api_resources/test_oauth_applications.py +++ b/tests/api_resources/test_oauth_applications.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthApplication, OAuthApplicationListResponse +from increase.types import OAuthApplication from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: oauth_application = client.oauth_applications.list() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -74,7 +75,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["active"]}, ) - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -83,7 +84,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = response.parse() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -92,7 +93,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = response.parse() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(SyncPage[OAuthApplication], oauth_application, path=["response"]) assert cast(Any, response.is_closed) is True @@ -143,7 +144,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: oauth_application = await async_client.oauth_applications.list() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -158,7 +159,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["active"]}, ) - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -167,7 +168,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = await response.parse() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -176,6 +177,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_application = await response.parse() - assert_matches_type(OAuthApplicationListResponse, oauth_application, path=["response"]) + assert_matches_type(AsyncPage[OAuthApplication], oauth_application, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_oauth_connections.py b/tests/api_resources/test_oauth_connections.py index 38fe62c60..52eb24ab4 100644 --- a/tests/api_resources/test_oauth_connections.py +++ b/tests/api_resources/test_oauth_connections.py @@ -9,7 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import OAuthConnection, OAuthConnectionListResponse +from increase.types import OAuthConnection +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -58,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: oauth_connection = client.oauth_connections.list() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -68,7 +69,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -77,7 +78,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = response.parse() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -86,7 +87,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = response.parse() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(SyncPage[OAuthConnection], oauth_connection, path=["response"]) assert cast(Any, response.is_closed) is True @@ -137,7 +138,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: oauth_connection = await async_client.oauth_connections.list() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -147,7 +148,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> oauth_application_id="oauth_application_id", status={"in": ["active"]}, ) - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -156,7 +157,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = await response.parse() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -165,6 +166,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" oauth_connection = await response.parse() - assert_matches_type(OAuthConnectionListResponse, oauth_connection, path=["response"]) + assert_matches_type(AsyncPage[OAuthConnection], oauth_connection, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_pending_transactions.py b/tests/api_resources/test_pending_transactions.py index 6d79a1d4b..af444a4d6 100644 --- a/tests/api_resources/test_pending_transactions.py +++ b/tests/api_resources/test_pending_transactions.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - PendingTransaction, - PendingTransactionListResponse, -) +from increase.types import PendingTransaction from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -107,7 +105,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: pending_transaction = client.pending_transactions.list() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -125,7 +123,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: route_id="route_id", status={"in": ["pending"]}, ) - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -134,7 +132,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = response.parse() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -143,7 +141,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = response.parse() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(SyncPage[PendingTransaction], pending_transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -279,7 +277,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: pending_transaction = await async_client.pending_transactions.list() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -297,7 +295,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> route_id="route_id", status={"in": ["pending"]}, ) - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -306,7 +304,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = await response.parse() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -315,7 +313,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" pending_transaction = await response.parse() - assert_matches_type(PendingTransactionListResponse, pending_transaction, path=["response"]) + assert_matches_type(AsyncPage[PendingTransaction], pending_transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_physical_card_profiles.py b/tests/api_resources/test_physical_card_profiles.py index 9a716658d..012a20306 100644 --- a/tests/api_resources/test_physical_card_profiles.py +++ b/tests/api_resources/test_physical_card_profiles.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( PhysicalCardProfile, - PhysicalCardProfileListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -121,7 +121,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: physical_card_profile = client.physical_card_profiles.list() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -131,7 +131,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_creating"]}, ) - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -140,7 +140,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = response.parse() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -149,7 +149,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = response.parse() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(SyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True @@ -356,7 +356,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: physical_card_profile = await async_client.physical_card_profiles.list() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -366,7 +366,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_creating"]}, ) - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -375,7 +375,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = await response.parse() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -384,7 +384,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card_profile = await response.parse() - assert_matches_type(PhysicalCardProfileListResponse, physical_card_profile, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCardProfile], physical_card_profile, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_physical_cards.py b/tests/api_resources/test_physical_cards.py index 8dc612bc6..42fda8cd1 100644 --- a/tests/api_resources/test_physical_cards.py +++ b/tests/api_resources/test_physical_cards.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( PhysicalCard, - PhysicalCardListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -204,7 +204,7 @@ def test_path_params_update(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: physical_card = client.physical_cards.list() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -220,7 +220,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -229,7 +229,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = response.parse() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -238,7 +238,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = response.parse() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(SyncPage[PhysicalCard], physical_card, path=["response"]) assert cast(Any, response.is_closed) is True @@ -431,7 +431,7 @@ async def test_path_params_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: physical_card = await async_client.physical_cards.list() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -447,7 +447,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -456,7 +456,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = await response.parse() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -465,6 +465,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" physical_card = await response.parse() - assert_matches_type(PhysicalCardListResponse, physical_card, path=["response"]) + assert_matches_type(AsyncPage[PhysicalCard], physical_card, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_programs.py b/tests/api_resources/test_programs.py index 75841a257..1a4df07ac 100644 --- a/tests/api_resources/test_programs.py +++ b/tests/api_resources/test_programs.py @@ -9,7 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Program, ProgramListResponse +from increase.types import Program +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -58,7 +59,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: program = client.programs.list() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(SyncPage[Program], program, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -66,7 +67,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(SyncPage[Program], program, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -75,7 +76,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = response.parse() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(SyncPage[Program], program, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -84,7 +85,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = response.parse() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(SyncPage[Program], program, path=["response"]) assert cast(Any, response.is_closed) is True @@ -135,7 +136,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: program = await async_client.programs.list() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -143,7 +144,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -152,7 +153,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = await response.parse() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(AsyncPage[Program], program, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -161,6 +162,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" program = await response.parse() - assert_matches_type(ProgramListResponse, program, path=["response"]) + assert_matches_type(AsyncPage[Program], program, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 3eaee878b..09e20196c 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -11,9 +11,9 @@ from tests.utils import assert_matches_type from increase.types import ( RealTimePaymentsTransfer, - RealTimePaymentsTransferListResponse, ) from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -121,7 +121,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.list() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -139,7 +139,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -148,7 +148,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = response.parse() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -157,7 +157,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = response.parse() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(SyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -347,7 +347,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.list() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -365,7 +365,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_approval"]}, ) - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -374,7 +374,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = await response.parse() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -383,7 +383,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" real_time_payments_transfer = await response.parse() - assert_matches_type(RealTimePaymentsTransferListResponse, real_time_payments_transfer, path=["response"]) + assert_matches_type(AsyncPage[RealTimePaymentsTransfer], real_time_payments_transfer, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_routing_numbers.py b/tests/api_resources/test_routing_numbers.py index 359f80cd9..62e2949a1 100644 --- a/tests/api_resources/test_routing_numbers.py +++ b/tests/api_resources/test_routing_numbers.py @@ -10,6 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import RoutingNumberListResponse +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -22,7 +23,7 @@ def test_method_list(self, client: Increase) -> None: routing_number = client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -31,7 +32,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: cursor="cursor", limit=1, ) - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -42,7 +43,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -53,7 +54,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = response.parse() - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(SyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True @@ -68,7 +69,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: routing_number = await async_client.routing_numbers.list( routing_number="xxxxxxxxx", ) - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -77,7 +78,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> cursor="cursor", limit=1, ) - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -88,7 +89,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -99,6 +100,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" routing_number = await response.parse() - assert_matches_type(RoutingNumberListResponse, routing_number, path=["response"]) + assert_matches_type(AsyncPage[RoutingNumberListResponse], routing_number, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_supplemental_documents.py b/tests/api_resources/test_supplemental_documents.py index 4df75ae86..5e15c2880 100644 --- a/tests/api_resources/test_supplemental_documents.py +++ b/tests/api_resources/test_supplemental_documents.py @@ -11,8 +11,8 @@ from tests.utils import assert_matches_type from increase.types import ( EntitySupplementalDocument, - SupplementalDocumentListResponse, ) +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +59,7 @@ def test_method_list(self, client: Increase) -> None: supplemental_document = client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -69,7 +69,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -80,7 +80,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -91,7 +91,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = response.parse() - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(SyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True @@ -140,7 +140,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: supplemental_document = await async_client.supplemental_documents.list( entity_id="entity_id", ) - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -150,7 +150,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -161,7 +161,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -172,6 +172,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" supplemental_document = await response.parse() - assert_matches_type(SupplementalDocumentListResponse, supplemental_document, path=["response"]) + assert_matches_type(AsyncPage[EntitySupplementalDocument], supplemental_document, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_transactions.py b/tests/api_resources/test_transactions.py index 844619826..d5491798f 100644 --- a/tests/api_resources/test_transactions.py +++ b/tests/api_resources/test_transactions.py @@ -9,8 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import Transaction, TransactionListResponse +from increase.types import Transaction from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -59,7 +60,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: transaction = client.transactions.list() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -76,7 +77,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, route_id="route_id", ) - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -85,7 +86,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = response.parse() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -94,7 +95,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = response.parse() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(SyncPage[Transaction], transaction, path=["response"]) assert cast(Any, response.is_closed) is True @@ -145,7 +146,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: transaction = await async_client.transactions.list() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -162,7 +163,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, route_id="route_id", ) - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -171,7 +172,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = await response.parse() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -180,6 +181,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" transaction = await response.parse() - assert_matches_type(TransactionListResponse, transaction, path=["response"]) + assert_matches_type(AsyncPage[Transaction], transaction, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 7284c4d8f..dd4783e33 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -9,10 +9,8 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - WireDrawdownRequest, - WireDrawdownRequestListResponse, -) +from increase.types import WireDrawdownRequest +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -166,7 +164,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: wire_drawdown_request = client.wire_drawdown_requests.list() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -176,7 +174,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: limit=1, status={"in": ["pending_submission"]}, ) - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -185,7 +183,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = response.parse() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -194,7 +192,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = response.parse() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(SyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True @@ -350,7 +348,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: wire_drawdown_request = await async_client.wire_drawdown_requests.list() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -360,7 +358,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> limit=1, status={"in": ["pending_submission"]}, ) - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -369,7 +367,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = await response.parse() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -378,6 +376,6 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_drawdown_request = await response.parse() - assert_matches_type(WireDrawdownRequestListResponse, wire_drawdown_request, path=["response"]) + assert_matches_type(AsyncPage[WireDrawdownRequest], wire_drawdown_request, path=["response"]) assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index 3330fa391..e68b36452 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -9,11 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - WireTransfer, - WireTransferListResponse, -) +from increase.types import WireTransfer from increase._utils import parse_date, parse_datetime +from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -145,7 +143,7 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_list(self, client: Increase) -> None: wire_transfer = client.wire_transfers.list() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: @@ -162,7 +160,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: idempotency_key="x", limit=1, ) - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize def test_raw_response_list(self, client: Increase) -> None: @@ -171,7 +169,7 @@ def test_raw_response_list(self, client: Increase) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize def test_streaming_response_list(self, client: Increase) -> None: @@ -180,7 +178,7 @@ def test_streaming_response_list(self, client: Increase) -> None: assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = response.parse() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True @@ -390,7 +388,7 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: wire_transfer = await async_client.wire_transfers.list() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: @@ -407,7 +405,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> idempotency_key="x", limit=1, ) - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: @@ -416,7 +414,7 @@ async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: assert response.is_closed is True assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) @parametrize async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: @@ -425,7 +423,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert response.http_request.headers.get("X-Stainless-Lang") == "python" wire_transfer = await response.parse() - assert_matches_type(WireTransferListResponse, wire_transfer, path=["response"]) + assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) assert cast(Any, response.is_closed) is True From 177506722217d822d8d98734a190279c8ca23eb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 26 Nov 2025 18:36:08 +0000 Subject: [PATCH 1025/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f4b8c8ab5..82487aa15 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.401.0" + ".": "0.402.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 19cc2e34d..0807076a8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.401.0" +version = "0.402.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5db0e202d..147dd81e7 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.401.0" # x-release-please-version +__version__ = "0.402.0" # x-release-please-version From 4217c43443eef62da883b343554a55077a44f7fd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 16:54:06 +0000 Subject: [PATCH 1026/1325] fix: ensure streams are always closed --- src/increase/_streaming.py | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 31a769686..48bbc2c53 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -54,11 +54,12 @@ def __stream__(self) -> Iterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - response.close() + try: + for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + response.close() def __enter__(self) -> Self: return self @@ -117,11 +118,12 @@ async def __stream__(self) -> AsyncIterator[_T]: process_data = self._client._process_response_data iterator = self._iter_events() - async for sse in iterator: - yield process_data(data=sse.json(), cast_to=cast_to, response=response) - - # As we might not fully consume the response stream, we need to close it explicitly - await response.aclose() + try: + async for sse in iterator: + yield process_data(data=sse.json(), cast_to=cast_to, response=response) + finally: + # Ensure the response is closed even if the consumer doesn't read all data + await response.aclose() async def __aenter__(self) -> Self: return self From e03b1723b8d70bd1bb80f0191e3c60ccf3182633 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 16:57:04 +0000 Subject: [PATCH 1027/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 82487aa15..3293542f5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.402.0" + ".": "0.402.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0807076a8..53ef7b403 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.402.0" +version = "0.402.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 147dd81e7..181d08f67 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.402.0" # x-release-please-version +__version__ = "0.402.1" # x-release-please-version From 1d585623a5e8e5320b24ca0428bf1611515c8da4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 27 Nov 2025 18:50:20 +0000 Subject: [PATCH 1028/1325] chore(deps): mypy 1.18.1 has a regression, pin to 1.17 --- pyproject.toml | 2 +- requirements-dev.lock | 4 +++- requirements.lock | 8 ++++---- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 53ef7b403..88daf70d8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -46,7 +46,7 @@ managed = true # version pins are in requirements-dev.lock dev-dependencies = [ "pyright==1.1.399", - "mypy", + "mypy==1.17", "respx", "pytest", "pytest-asyncio", diff --git a/requirements-dev.lock b/requirements-dev.lock index 18804abe3..6cfc1ea75 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -72,7 +72,7 @@ mdurl==0.1.2 multidict==6.4.4 # via aiohttp # via yarl -mypy==1.14.1 +mypy==1.17.0 mypy-extensions==1.0.0 # via mypy nodeenv==1.8.0 @@ -81,6 +81,8 @@ nox==2023.4.22 packaging==23.2 # via nox # via pytest +pathspec==0.12.1 + # via mypy platformdirs==3.11.0 # via virtualenv pluggy==1.5.0 diff --git a/requirements.lock b/requirements.lock index ac22be93c..7f4bff497 100644 --- a/requirements.lock +++ b/requirements.lock @@ -55,21 +55,21 @@ multidict==6.4.4 propcache==0.3.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via increase -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic sniffio==1.3.0 # via anyio # via increase -typing-extensions==4.12.2 +typing-extensions==4.15.0 # via anyio # via increase # via multidict # via pydantic # via pydantic-core # via typing-inspection -typing-inspection==0.4.1 +typing-inspection==0.4.2 # via pydantic yarl==1.20.0 # via aiohttp From 8109979e8aa846b180a81f14aeca39d22a396405 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 02:39:33 +0000 Subject: [PATCH 1029/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer_create_params.py | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index b52e8c7d7..fe442fee6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-bd464d151612058d8029150b376949b22d5515af23621465c0ce1c1069b91644.yml -openapi_spec_hash: e60e1548c523a0ee7c9daa1bd988cbc5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml +openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 config_hash: ca1425272e17fa23d4466d33492334fa diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index c55b483c9..89ea3b122 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -112,9 +112,8 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): phone: str """The phone number to associate with the check's destination address. - Only used if shipping method is `fedex_overnight`. Will be supplied to FedEx as - the contact phone number for the recipient to be used in case of delivery - issues. + The number is only used when `shipping_method` is `fedex_overnight` and will be + supplied to FedEx to be used in case of delivery issues. """ From b6a193b19705f1b6a1b203faf8d644c9a776b485 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 1 Dec 2025 02:42:30 +0000 Subject: [PATCH 1030/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3293542f5..d484554e9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.402.1" + ".": "0.403.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 88daf70d8..7b55156f2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.402.1" +version = "0.403.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 181d08f67..bf0f091d1 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.402.1" # x-release-please-version +__version__ = "0.403.0" # x-release-please-version From 6e87102f8f3d06b506cd557a442e4f67d0e26e47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 11:11:10 +0000 Subject: [PATCH 1031/1325] chore: update lockfile --- pyproject.toml | 14 +++--- requirements-dev.lock | 108 +++++++++++++++++++++++------------------- requirements.lock | 31 ++++++------ 3 files changed, 83 insertions(+), 70 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 7b55156f2..693e78647 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -7,14 +7,16 @@ license = "Apache-2.0" authors = [ { name = "Increase", email = "dev-feedback@increase.com" }, ] + dependencies = [ - "httpx>=0.23.0, <1", - "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", - "anyio>=3.5.0, <5", - "distro>=1.7.0, <2", - "sniffio", + "httpx>=0.23.0, <1", + "pydantic>=1.9.0, <3", + "typing-extensions>=4.10, <5", + "anyio>=3.5.0, <5", + "distro>=1.7.0, <2", + "sniffio", ] + requires-python = ">= 3.9" classifiers = [ "Typing :: Typed", diff --git a/requirements-dev.lock b/requirements-dev.lock index 6cfc1ea75..b89977af4 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,40 +12,45 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via increase -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via increase -argcomplete==3.1.2 +argcomplete==3.6.3 # via nox async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 + # via nox +backports-asyncio-runner==1.2.0 + # via pytest-asyncio +certifi==2025.11.12 # via httpcore # via httpx -colorlog==6.7.0 +colorlog==6.10.1 + # via nox +dependency-groups==1.3.1 # via nox -dirty-equals==0.6.0 -distlib==0.3.7 +dirty-equals==0.11 +distlib==0.4.0 # via virtualenv -distro==1.8.0 +distro==1.9.0 # via increase -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio # via pytest -execnet==2.1.1 +execnet==2.1.2 # via pytest-xdist -filelock==3.12.4 +filelock==3.19.1 # via virtualenv -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -58,82 +63,87 @@ httpx==0.28.1 # via respx httpx-aiohttp==0.1.9 # via increase -idna==3.4 +humanize==4.13.0 + # via nox +idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==7.0.0 -iniconfig==2.0.0 +importlib-metadata==8.7.0 +iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 # via rich mdurl==0.1.2 # via markdown-it-py -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl mypy==1.17.0 -mypy-extensions==1.0.0 +mypy-extensions==1.1.0 # via mypy -nodeenv==1.8.0 +nodeenv==1.9.1 # via pyright -nox==2023.4.22 -packaging==23.2 +nox==2025.11.12 +packaging==25.0 + # via dependency-groups # via nox # via pytest pathspec==0.12.1 # via mypy -platformdirs==3.11.0 +platformdirs==4.4.0 # via virtualenv -pluggy==1.5.0 +pluggy==1.6.0 # via pytest -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl -pydantic==2.11.9 +pydantic==2.12.5 # via increase -pydantic-core==2.33.2 +pydantic-core==2.41.5 # via pydantic -pygments==2.18.0 +pygments==2.19.2 + # via pytest # via rich pyright==1.1.399 -pytest==8.3.3 +pytest==8.4.2 # via pytest-asyncio # via pytest-xdist -pytest-asyncio==0.24.0 -pytest-xdist==3.7.0 -python-dateutil==2.8.2 +pytest-asyncio==1.2.0 +pytest-xdist==3.8.0 +python-dateutil==2.9.0.post0 # via time-machine -pytz==2023.3.post1 - # via dirty-equals respx==0.22.0 -rich==13.7.1 -ruff==0.9.4 -setuptools==68.2.2 - # via nodeenv -six==1.16.0 +rich==14.2.0 +ruff==0.14.7 +six==1.17.0 # via python-dateutil -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via increase -time-machine==2.9.0 -tomli==2.0.2 +time-machine==2.19.0 +tomli==2.3.0 + # via dependency-groups # via mypy + # via nox # via pytest -typing-extensions==4.12.2 +typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via increase # via multidict # via mypy # via pydantic # via pydantic-core # via pyright + # via pytest-asyncio # via typing-inspection -typing-inspection==0.4.1 + # via virtualenv +typing-inspection==0.4.2 # via pydantic -virtualenv==20.24.5 +virtualenv==20.35.4 # via nox -yarl==1.20.0 +yarl==1.22.0 # via aiohttp -zipp==3.17.0 +zipp==3.23.0 # via importlib-metadata diff --git a/requirements.lock b/requirements.lock index 7f4bff497..db5859e44 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,28 +12,28 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.12.8 +aiohttp==3.13.2 # via httpx-aiohttp # via increase -aiosignal==1.3.2 +aiosignal==1.4.0 # via aiohttp -annotated-types==0.6.0 +annotated-types==0.7.0 # via pydantic -anyio==4.4.0 +anyio==4.12.0 # via httpx # via increase async-timeout==5.0.1 # via aiohttp -attrs==25.3.0 +attrs==25.4.0 # via aiohttp -certifi==2023.7.22 +certifi==2025.11.12 # via httpcore # via httpx -distro==1.8.0 +distro==1.9.0 # via increase -exceptiongroup==1.2.2 +exceptiongroup==1.3.1 # via anyio -frozenlist==1.6.2 +frozenlist==1.8.0 # via aiohttp # via aiosignal h11==0.16.0 @@ -45,25 +45,26 @@ httpx==0.28.1 # via increase httpx-aiohttp==0.1.9 # via increase -idna==3.4 +idna==3.11 # via anyio # via httpx # via yarl -multidict==6.4.4 +multidict==6.7.0 # via aiohttp # via yarl -propcache==0.3.1 +propcache==0.4.1 # via aiohttp # via yarl pydantic==2.12.5 # via increase pydantic-core==2.41.5 # via pydantic -sniffio==1.3.0 - # via anyio +sniffio==1.3.1 # via increase typing-extensions==4.15.0 + # via aiosignal # via anyio + # via exceptiongroup # via increase # via multidict # via pydantic @@ -71,5 +72,5 @@ typing-extensions==4.15.0 # via typing-inspection typing-inspection==0.4.2 # via pydantic -yarl==1.20.0 +yarl==1.22.0 # via aiohttp From 74fcc65455bf628b134204896a25127053a63afa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 2 Dec 2025 21:26:52 +0000 Subject: [PATCH 1032/1325] chore(docs): use environment variables for authentication in code snippets --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 6eb749f5f..0ac52ffa5 100644 --- a/README.md +++ b/README.md @@ -89,6 +89,7 @@ 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 @@ -96,7 +97,7 @@ from increase import AsyncIncrease async def main() -> None: async with AsyncIncrease( - api_key="My API Key", + 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( From 5dfb68e4072d888c3e4bce2d0fd9c299a0758423 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 20:21:32 +0000 Subject: [PATCH 1033/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index fe442fee6..35a2ed3b8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 -config_hash: ca1425272e17fa23d4466d33492334fa +config_hash: 34055d04f1ea0611258ab8ce23b0ff59 From 29c9f947df1ba90d8350695da91c92e0d7d55da0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 3 Dec 2025 21:20:03 +0000 Subject: [PATCH 1034/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 35a2ed3b8..bd5b47488 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 -config_hash: 34055d04f1ea0611258ab8ce23b0ff59 +config_hash: bee993a392c4314906b0530fb3046acf From 62087120cbd047692d0841814e300093df6e5360 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 04:25:43 +0000 Subject: [PATCH 1035/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index bd5b47488..1dd4ba646 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 -config_hash: bee993a392c4314906b0530fb3046acf +config_hash: b6f365add90e618b2174634df140826e From b31054a27cefbbc918b2a43ec8c70cfe51e09d3b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:39:34 +0000 Subject: [PATCH 1036/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/real_time_decision.py | 22 +++++++++++++++++++ .../types/real_time_decision_action_params.py | 8 +++++++ .../api_resources/test_real_time_decisions.py | 6 +++-- 4 files changed, 36 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1dd4ba646..5c11eef91 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f24e91d60005894c135a6ccad84e179e0a2cb64def7e1101904c430a8e5e5dd9.yml -openapi_spec_hash: a63e06588ae354c03b68d6cb9d965e11 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d3646347697623deab851a220ce4b217e923bde3b3108af9eceb4da6df0534e2.yml +openapi_spec_hash: 516fabeef616c695941d3a4aa4051f76 config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 3de77429d..ebe9f4f02 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -24,6 +24,7 @@ "CardAuthorizationAdditionalAmountsTransit", "CardAuthorizationAdditionalAmountsUnknown", "CardAuthorizationAdditionalAmountsVision", + "CardAuthorizationApproval", "CardAuthorizationDecline", "CardAuthorizationNetworkDetails", "CardAuthorizationNetworkDetailsPulse", @@ -274,6 +275,14 @@ class CardAuthorizationAdditionalAmounts(BaseModel): """The part of this transaction amount that was for vision-related services.""" +class CardAuthorizationApproval(BaseModel): + partial_amount: Optional[int] = None + """ + If the authorization was partially approved, this field contains the approved + amount in the minor unit of the settlement currency. + """ + + class CardAuthorizationDecline(BaseModel): reason: Literal[ "insufficient_funds", @@ -572,6 +581,12 @@ class CardAuthorization(BaseModel): to provide more detailed information about the transaction. """ + approval: Optional[CardAuthorizationApproval] = None + """Present if and only if `decision` is `approve`. + + Contains information related to the approval of the authorization. + """ + card_id: str """The identifier of the Card that is being authorized.""" @@ -650,6 +665,13 @@ class CardAuthorization(BaseModel): riskiest. """ + partial_approval_capability: Literal["supported", "not_supported"] + """Whether or not the authorization supports partial approvals. + + - `supported` - This transaction supports partial approvals. + - `not_supported` - This transaction does not support partial approvals. + """ + physical_card_id: Optional[str] = None """ If the authorization was made in-person with a physical card, the Physical Card diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index b4a73334b..7f3792ab5 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -108,6 +108,14 @@ class CardAuthorizationApproval(TypedDict, total=False): guide. """ + partial_amount: int + """ + If the transaction supports partial approvals + (`partial_approval_capability: supported`) the `partial_amount` can be provided + in the transaction's settlement currency to approve a lower amount than was + requested. + """ + class CardAuthorizationDecline(TypedDict, total=False): reason: Required[ diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 3cc0575b9..a547359a4 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -74,7 +74,8 @@ def test_method_action_with_all_params(self, client: Increase) -> None: "cardholder_address_verification_result": { "line1": "match", "postal_code": "no_match", - } + }, + "partial_amount": 1, }, "decline": {"reason": "insufficient_funds"}, }, @@ -189,7 +190,8 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) "cardholder_address_verification_result": { "line1": "match", "postal_code": "no_match", - } + }, + "partial_amount": 1, }, "decline": {"reason": "insufficient_funds"}, }, From aa8afe4ffc50bbc0a01c06a2e5217f34c3a87c95 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 4 Dec 2025 23:42:15 +0000 Subject: [PATCH 1037/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d484554e9..68b7001a1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.403.0" + ".": "0.404.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 693e78647..341ddcf07 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.403.0" +version = "0.404.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index bf0f091d1..edea8e76f 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.403.0" # x-release-please-version +__version__ = "0.404.0" # x-release-please-version From 2bef093ed8bea7fe541a52cb861cdbfdec9f5742 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 02:41:43 +0000 Subject: [PATCH 1038/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/pending_transactions.py | 14 ++++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5c11eef91..9130f4384 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d3646347697623deab851a220ce4b217e923bde3b3108af9eceb4da6df0534e2.yml -openapi_spec_hash: 516fabeef616c695941d3a4aa4051f76 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-979679fb897563997cb8d20590ac73729287354524a0c2579f4dfd41fa8b63d9.yml +openapi_spec_hash: 22eae96401c4a0de1d135e18133924d1 config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index 19747929c..fc9aac6db 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -59,9 +59,10 @@ def create( """Creates a pending transaction on an account. This can be useful to hold funds - for an external payment or known future transaction outside of Increase. The - resulting Pending Transaction will have a `category` of `user_initiated_hold` - and can be released via the API to unlock the held funds. + for an external payment or known future transaction outside of Increase (only + negative amounts are supported). The resulting Pending Transaction will have a + `category` of `user_initiated_hold` and can be released via the API to unlock + the held funds. Args: account_id: The Account to place the hold on. @@ -287,9 +288,10 @@ async def create( """Creates a pending transaction on an account. This can be useful to hold funds - for an external payment or known future transaction outside of Increase. The - resulting Pending Transaction will have a `category` of `user_initiated_hold` - and can be released via the API to unlock the held funds. + for an external payment or known future transaction outside of Increase (only + negative amounts are supported). The resulting Pending Transaction will have a + `category` of `user_initiated_hold` and can be released via the API to unlock + the held funds. Args: account_id: The Account to place the hold on. From 90b3553b722bafbc3dc7d7a167d61a50203d5616 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 5 Dec 2025 02:44:30 +0000 Subject: [PATCH 1039/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 68b7001a1..4b59bd483 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.404.0" + ".": "0.405.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 341ddcf07..7c5811cc3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.404.0" +version = "0.405.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index edea8e76f..e9c705f2f 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.404.0" # x-release-please-version +__version__ = "0.405.0" # x-release-please-version From 9645a7d9da5f75831dd257f793bab89d8c36a899 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 01:15:20 +0000 Subject: [PATCH 1040/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 9 +++++++++ src/increase/types/declined_transaction.py | 3 +++ src/increase/types/pending_transaction.py | 3 +++ src/increase/types/real_time_decision.py | 3 +++ .../simulations/card_authorization_create_params.py | 3 +++ src/increase/types/transaction.py | 3 +++ 7 files changed, 26 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9130f4384..f25fc9162 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-979679fb897563997cb8d20590ac73729287354524a0c2579f4dfd41fa8b63d9.yml -openapi_spec_hash: 22eae96401c4a0de1d135e18133924d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db504b55f81ac4d64ccbfc4d2fecdd346b2a671da840afd3b47fd499ea52e640.yml +openapi_spec_hash: 06d1e20101565b4c8ba616cfa84fbfdd config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index c243faf76..35434edac 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -861,6 +861,7 @@ class ElementCardAuthorization(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -883,6 +884,8 @@ class ElementCardAuthorization(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ @@ -1515,6 +1518,7 @@ class ElementCardDecline(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -1537,6 +1541,8 @@ class ElementCardDecline(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ @@ -2188,6 +2194,7 @@ class ElementCardFinancial(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -2210,6 +2217,8 @@ class ElementCardFinancial(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index f15808ce7..ba7b3dcbd 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -687,6 +687,7 @@ class SourceCardDecline(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -709,6 +710,8 @@ class SourceCardDecline(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 9858faeb8..655dd916d 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -642,6 +642,7 @@ class SourceCardAuthorization(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -664,6 +665,8 @@ class SourceCardAuthorization(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index ebe9f4f02..a4d56c1fa 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -700,6 +700,7 @@ class CardAuthorization(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -722,6 +723,8 @@ class CardAuthorization(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index 6907569dd..f11ed0c71 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -197,6 +197,7 @@ class ProcessingCategory(TypedDict, total=False): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", ] ] """ @@ -219,6 +220,8 @@ class ProcessingCategory(TypedDict, total=False): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. """ refund: ProcessingCategoryRefund diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index d3a0b993e..5a6922690 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1124,6 +1124,7 @@ class SourceCardFinancial(BaseModel): "quasi_cash", "refund", "cash_disbursement", + "balance_inquiry", "unknown", ] """ @@ -1146,6 +1147,8 @@ class SourceCardFinancial(BaseModel): voucher authorization, where funds are credited to the cardholder. - `cash_disbursement` - Cash disbursement transactions are used to withdraw cash from an ATM or a point of sale. + - `balance_inquiry` - A balance inquiry transaction is used to check the balance + of an account associated with a card. - `unknown` - The processing category is unknown. """ From 87175d2ac3df27749aabb993285309285ea05374 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 6 Dec 2025 01:18:03 +0000 Subject: [PATCH 1041/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4b59bd483..f86031a6a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.405.0" + ".": "0.406.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7c5811cc3..77db21a8b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.405.0" +version = "0.406.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e9c705f2f..9a3df12c7 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.405.0" # x-release-please-version +__version__ = "0.406.0" # x-release-please-version From 5da10b0a20c9ce41f913b0cc329b7f34443c9723 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:45:36 +0000 Subject: [PATCH 1042/1325] fix(types): allow pyright to infer TypedDict types within SequenceNotStr --- src/increase/_types.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/increase/_types.py b/src/increase/_types.py index b81ab29db..d9b38629d 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -243,6 +243,9 @@ class HttpxSendArgs(TypedDict, total=False): if TYPE_CHECKING: # This works because str.__contains__ does not accept object (either in typeshed or at runtime) # https://github.com/hauntsaninja/useful_types/blob/5e9710f3875107d068e7679fd7fec9cfab0eff3b/useful_types/__init__.py#L285 + # + # Note: index() and count() methods are intentionally omitted to allow pyright to properly + # infer TypedDict types when dict literals are used in lists assigned to SequenceNotStr. class SequenceNotStr(Protocol[_T_co]): @overload def __getitem__(self, index: SupportsIndex, /) -> _T_co: ... @@ -251,8 +254,6 @@ def __getitem__(self, index: slice, /) -> Sequence[_T_co]: ... def __contains__(self, value: object, /) -> bool: ... def __len__(self) -> int: ... def __iter__(self) -> Iterator[_T_co]: ... - def index(self, value: Any, start: int = 0, stop: int = ..., /) -> int: ... - def count(self, value: Any, /) -> int: ... def __reversed__(self) -> Iterator[_T_co]: ... else: # just point this to a normal `Sequence` at runtime to avoid having to special case From 799a420fc463b83f9ab79eadb7d63d09c8c7685d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 18:51:08 +0000 Subject: [PATCH 1043/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index f86031a6a..323261fc3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.406.0" + ".": "0.406.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 77db21a8b..79fd56f26 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.406.0" +version = "0.406.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9a3df12c7..40bafa3e3 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.406.0" # x-release-please-version +__version__ = "0.406.1" # x-release-please-version From 67d7f92056ff010f6cbef38fcd340d31d7f0fdf0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 19:33:51 +0000 Subject: [PATCH 1044/1325] chore: add missing docstrings --- src/increase/types/account.py | 5 + src/increase/types/account_number.py | 11 + .../types/account_number_create_params.py | 6 + .../types/account_number_update_params.py | 6 + src/increase/types/account_statement.py | 5 + src/increase/types/account_transfer.py | 20 + src/increase/types/ach_prenotification.py | 6 + src/increase/types/ach_transfer.py | 53 +++ .../types/ach_transfer_create_params.py | 20 + src/increase/types/balance_lookup.py | 4 + src/increase/types/bookkeeping_account.py | 5 + .../types/bookkeeping_balance_lookup.py | 4 + src/increase/types/bookkeeping_entry.py | 5 + src/increase/types/bookkeeping_entry_set.py | 5 + src/increase/types/card.py | 11 + src/increase/types/card_create_params.py | 6 + src/increase/types/card_details.py | 4 + src/increase/types/card_dispute.py | 382 ++++++++++++++++++ .../types/card_dispute_create_params.py | 220 ++++++++++ ...d_dispute_submit_user_submission_params.py | 240 +++++++++++ src/increase/types/card_iframe_url.py | 2 + src/increase/types/card_payment.py | 322 +++++++++++++++ .../types/card_purchase_supplement.py | 6 + src/increase/types/card_push_transfer.py | 35 ++ .../types/card_push_transfer_create_params.py | 5 + src/increase/types/card_token.py | 4 + src/increase/types/card_token_capabilities.py | 4 + src/increase/types/card_update_params.py | 6 + src/increase/types/card_validation.py | 24 ++ src/increase/types/check_deposit.py | 24 ++ src/increase/types/check_transfer.py | 49 +++ .../types/check_transfer_create_params.py | 17 + src/increase/types/declined_transaction.py | 91 +++++ src/increase/types/digital_card_profile.py | 6 + .../digital_card_profile_clone_params.py | 2 + .../digital_card_profile_create_params.py | 2 + src/increase/types/digital_wallet_token.py | 8 + src/increase/types/document.py | 8 + src/increase/types/document_create_params.py | 10 + src/increase/types/entity.py | 73 ++++ .../entity_create_beneficial_owner_params.py | 28 ++ src/increase/types/entity_create_params.py | 167 ++++++++ .../types/entity_supplemental_document.py | 4 + .../types/entity_update_address_params.py | 5 + ..._update_beneficial_owner_address_params.py | 5 + src/increase/types/entity_update_params.py | 48 +++ src/increase/types/event.py | 5 + src/increase/types/event_subscription.py | 5 + src/increase/types/export.py | 5 + src/increase/types/export_create_params.py | 45 +++ src/increase/types/external_account.py | 4 + src/increase/types/fednow_transfer.py | 24 ++ .../types/fednow_transfer_create_params.py | 4 + src/increase/types/file.py | 5 + src/increase/types/file_link.py | 2 + src/increase/types/group.py | 5 + src/increase/types/inbound_ach_transfer.py | 26 ++ src/increase/types/inbound_check_deposit.py | 8 + src/increase/types/inbound_fednow_transfer.py | 8 + src/increase/types/inbound_mail_item.py | 4 + .../inbound_real_time_payments_transfer.py | 8 + .../types/inbound_wire_drawdown_request.py | 4 + src/increase/types/inbound_wire_transfer.py | 8 + .../types/intrafi_account_enrollment.py | 4 + src/increase/types/intrafi_balance.py | 6 + src/increase/types/intrafi_exclusion.py | 4 + src/increase/types/lockbox.py | 7 + src/increase/types/oauth_application.py | 4 + src/increase/types/oauth_connection.py | 4 + src/increase/types/oauth_token.py | 4 + src/increase/types/pending_transaction.py | 116 ++++++ src/increase/types/physical_card.py | 13 + .../types/physical_card_create_params.py | 6 + src/increase/types/physical_card_profile.py | 5 + .../physical_card_profile_clone_params.py | 5 + .../physical_card_profile_create_params.py | 5 + src/increase/types/program.py | 5 + src/increase/types/real_time_decision.py | 76 ++++ .../types/real_time_decision_action_params.py | 45 +++ .../types/real_time_payments_transfer.py | 32 ++ .../types/routing_number_list_response.py | 2 + .../card_authorization_create_params.py | 10 + .../card_authorization_create_response.py | 2 + .../simulations/card_dispute_action_params.py | 55 +++ ...al_wallet_token_request_create_response.py | 2 + .../inbound_ach_transfer_create_params.py | 4 + ..._time_payments_transfer_complete_params.py | 2 + src/increase/types/transaction.py | 286 +++++++++++++ src/increase/types/wire_drawdown_request.py | 13 + .../wire_drawdown_request_create_params.py | 4 + src/increase/types/wire_transfer.py | 50 +++ .../types/wire_transfer_create_params.py | 27 ++ 92 files changed, 2941 insertions(+) diff --git a/src/increase/types/account.py b/src/increase/types/account.py index afc80739b..a9d98010f 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -12,6 +12,11 @@ class Account(BaseModel): + """Accounts are your bank accounts with Increase. + + They store money, receive transfers, and send payments. They earn interest and have depository insurance. + """ + id: str """The Account identifier.""" diff --git a/src/increase/types/account_number.py b/src/increase/types/account_number.py index 5d0cade9a..6977332d7 100644 --- a/src/increase/types/account_number.py +++ b/src/increase/types/account_number.py @@ -12,6 +12,8 @@ class InboundACH(BaseModel): + """Properties related to how this Account Number handles inbound ACH transfers.""" + debit_status: Literal["allowed", "blocked"] """Whether ACH debits are allowed against this Account Number. @@ -24,6 +26,10 @@ class InboundACH(BaseModel): class InboundChecks(BaseModel): + """ + Properties related to how this Account Number should handle inbound check withdrawals. + """ + status: Literal["allowed", "check_transfers_only"] """How Increase should process checks with this account number printed on them. @@ -35,6 +41,11 @@ class InboundChecks(BaseModel): class AccountNumber(BaseModel): + """Each account can have multiple account and routing numbers. + + We recommend that you use a set per vendor. This is similar to how you use different passwords for different websites. Account numbers can also be used to seamlessly reconcile inbound payments. Generating a unique account number per vendor ensures you always know the originator of an incoming payment. + """ + id: str """The Account Number identifier.""" diff --git a/src/increase/types/account_number_create_params.py b/src/increase/types/account_number_create_params.py index 15a4d8682..32d7e1a39 100644 --- a/src/increase/types/account_number_create_params.py +++ b/src/increase/types/account_number_create_params.py @@ -25,6 +25,8 @@ class AccountNumberCreateParams(TypedDict, total=False): class InboundACH(TypedDict, total=False): + """Options related to how this Account Number should handle inbound ACH transfers.""" + debit_status: Required[Literal["allowed", "blocked"]] """Whether ACH debits are allowed against this Account Number. @@ -38,6 +40,10 @@ class InboundACH(TypedDict, total=False): class InboundChecks(TypedDict, total=False): + """ + Options related to how this Account Number should handle inbound check withdrawals. + """ + status: Required[Literal["allowed", "check_transfers_only"]] """How Increase should process checks with this account number printed on them. diff --git a/src/increase/types/account_number_update_params.py b/src/increase/types/account_number_update_params.py index 1ee620fe4..47ad6ae70 100644 --- a/src/increase/types/account_number_update_params.py +++ b/src/increase/types/account_number_update_params.py @@ -30,6 +30,8 @@ class AccountNumberUpdateParams(TypedDict, total=False): class InboundACH(TypedDict, total=False): + """Options related to how this Account Number handles inbound ACH transfers.""" + debit_status: Literal["allowed", "blocked"] """Whether ACH debits are allowed against this Account Number. @@ -42,6 +44,10 @@ class InboundACH(TypedDict, total=False): class InboundChecks(TypedDict, total=False): + """ + Options related to how this Account Number should handle inbound check withdrawals. + """ + status: Required[Literal["allowed", "check_transfers_only"]] """How Increase should process checks with this account number printed on them. diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py index d2e124f86..7a95b9a5c 100644 --- a/src/increase/types/account_statement.py +++ b/src/increase/types/account_statement.py @@ -9,6 +9,11 @@ class AccountStatement(BaseModel): + """Account Statements are generated monthly for every active Account. + + You can access the statement's data via the API or retrieve a PDF with its details via its associated File. + """ + id: str """The Account Statement identifier.""" diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index d0fcf9ab5..22ba640bd 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -20,6 +20,10 @@ class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -34,6 +38,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -48,21 +56,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -84,6 +100,10 @@ class CreatedBy(BaseModel): class AccountTransfer(BaseModel): + """ + Account transfers move funds between your own accounts at Increase (accounting systems often refer to these as Book Transfers). Account Transfers are free and synchronous. Upon creation they create two Transactions, one negative on the originating account and one positive on the destination account (unless the transfer requires approval, in which case the Transactions will be created when the transfer is approved). + """ + id: str """The Account Transfer's identifier.""" diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py index 02fdeec9b..19afbc81b 100644 --- a/src/increase/types/ach_prenotification.py +++ b/src/increase/types/ach_prenotification.py @@ -88,6 +88,8 @@ class NotificationsOfChange(BaseModel): class PrenotificationReturn(BaseModel): + """If your prenotification is returned, this will contain details of the return.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -319,6 +321,10 @@ class PrenotificationReturn(BaseModel): class ACHPrenotification(BaseModel): + """ + ACH Prenotifications are one way you can verify account and routing numbers by Automated Clearing House (ACH). + """ + id: str """The ACH Prenotification's identifier.""" diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index d9a0af757..0639334bb 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -32,6 +32,10 @@ class Acknowledgement(BaseModel): + """ + After the transfer is acknowledged by FedACH, this will contain supplemental details. The Federal Reserve sends an acknowledgement message for each file that Increase submits. + """ + acknowledged_at: str """ When the Federal Reserve acknowledged the submitted file containing this @@ -45,6 +49,8 @@ class AddendaFreeformEntry(BaseModel): class AddendaFreeform(BaseModel): + """Unstructured `payment_related_information` passed through with the transfer.""" + entries: List[AddendaFreeformEntry] """Each entry represents an addendum sent with the transfer.""" @@ -61,11 +67,18 @@ class AddendaPaymentOrderRemittanceAdviceInvoice(BaseModel): class AddendaPaymentOrderRemittanceAdvice(BaseModel): + """Structured ASC X12 820 remittance advice records. + + Please reach out to [support@increase.com](mailto:support@increase.com) for more information. + """ + invoices: List[AddendaPaymentOrderRemittanceAdviceInvoice] """ASC X12 RMR records for this specific transfer.""" class Addenda(BaseModel): + """Additional information that will be sent to the recipient.""" + category: Literal["freeform", "payment_order_remittance_advice", "other"] """The type of the resource. @@ -92,6 +105,10 @@ class Addenda(BaseModel): class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -106,6 +123,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -120,21 +141,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -156,6 +185,11 @@ class CreatedBy(BaseModel): class InboundFundsHold(BaseModel): + """Increase will sometimes hold the funds for ACH debit transfers. + + If funds are held, this sub-object will contain details of the hold. + """ + amount: int """The held amount in the minor unit of the account's currency. @@ -296,6 +330,11 @@ class NotificationsOfChange(BaseModel): class PreferredEffectiveDate(BaseModel): + """Configuration for how the effective date of the transfer will be set. + + This determines same-day vs future-dated settlement timing. If not set, defaults to a `settlement_schedule` of `same_day`. If set, exactly one of the child attributes must be set. + """ + date: Optional[datetime.date] = None """ A specific date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format to @@ -316,6 +355,8 @@ class PreferredEffectiveDate(BaseModel): class Return(BaseModel): + """If your transfer is returned, this will contain details of the return.""" + created_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -578,6 +619,10 @@ def __getattr__(self, attr: str) -> object: ... class Settlement(BaseModel): + """ + A subhash containing information about when and how the transfer settled at the Federal Reserve. + """ + settled_at: datetime.datetime """ When the funds for this transfer have settled at the destination bank at the @@ -586,6 +631,10 @@ class Settlement(BaseModel): class Submission(BaseModel): + """ + After the transfer is submitted to FedACH, this will contain supplemental details. Increase batches transfers and submits a file to the Federal Reserve roughly every 30 minutes. The Federal Reserve processes ACH transfers during weekdays according to their [posted schedule](https://www.frbservices.org/resources/resource-centers/same-day-ach/fedach-processing-schedule.html). + """ + administrative_returns_expected_by: datetime.datetime """The timestamp by which any administrative returns are expected to be received by. @@ -637,6 +686,10 @@ class Submission(BaseModel): class ACHTransfer(BaseModel): + """ + ACH transfers move funds between your Increase account and any other account accessible by the Automated Clearing House (ACH). + """ + id: str """The ACH transfer's identifier.""" diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index d4b0566cd..ecb07fbbe 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -155,6 +155,11 @@ class AddendaFreeformEntry(TypedDict, total=False): class AddendaFreeform(TypedDict, total=False): + """Unstructured `payment_related_information` passed through with the transfer. + + Required if and only if `category` is `freeform`. + """ + entries: Required[Iterable[AddendaFreeformEntry]] """Each entry represents an addendum sent with the transfer. @@ -177,11 +182,21 @@ class AddendaPaymentOrderRemittanceAdviceInvoice(TypedDict, total=False): class AddendaPaymentOrderRemittanceAdvice(TypedDict, total=False): + """Structured ASC X12 820 remittance advice records. + + Please reach out to [support@increase.com](mailto:support@increase.com) for more information. Required if and only if `category` is `payment_order_remittance_advice`. + """ + invoices: Required[Iterable[AddendaPaymentOrderRemittanceAdviceInvoice]] """ASC X12 RMR records for this specific transfer.""" class Addenda(TypedDict, total=False): + """Additional information that will be sent to the recipient. + + This is included in the transfer data sent to the receiving bank. + """ + category: Required[Literal["freeform", "payment_order_remittance_advice"]] """The type of addenda to pass with the transfer. @@ -208,6 +223,11 @@ class Addenda(TypedDict, total=False): class PreferredEffectiveDate(TypedDict, total=False): + """Configuration for how the effective date of the transfer will be set. + + This determines same-day vs future-dated settlement timing. If not set, defaults to a `settlement_schedule` of `same_day`. If set, exactly one of the child attributes must be set. + """ + date: Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")] """ A specific date in [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) format to diff --git a/src/increase/types/balance_lookup.py b/src/increase/types/balance_lookup.py index 94b09f413..e2d3ac552 100644 --- a/src/increase/types/balance_lookup.py +++ b/src/increase/types/balance_lookup.py @@ -8,6 +8,10 @@ class BalanceLookup(BaseModel): + """ + Represents a request to lookup the balance of an Account at a given point in time. + """ + account_id: str """The identifier for the account for which the balance was queried.""" diff --git a/src/increase/types/bookkeeping_account.py b/src/increase/types/bookkeeping_account.py index fbe1f0239..b33b8f61b 100644 --- a/src/increase/types/bookkeeping_account.py +++ b/src/increase/types/bookkeeping_account.py @@ -9,6 +9,11 @@ class BookkeepingAccount(BaseModel): + """Accounts are T-accounts. + + They can store accounting entries. Your compliance setup might require annotating money movements using this API. Learn more in our [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping). + """ + id: str """The account identifier.""" diff --git a/src/increase/types/bookkeeping_balance_lookup.py b/src/increase/types/bookkeeping_balance_lookup.py index 71ff0385b..bcd350e84 100644 --- a/src/increase/types/bookkeeping_balance_lookup.py +++ b/src/increase/types/bookkeeping_balance_lookup.py @@ -8,6 +8,10 @@ class BookkeepingBalanceLookup(BaseModel): + """ + Represents a request to lookup the balance of an Bookkeeping Account at a given point in time. + """ + balance: int """ The Bookkeeping Account's current balance, representing the sum of all diff --git a/src/increase/types/bookkeeping_entry.py b/src/increase/types/bookkeeping_entry.py index ffcd2ab5a..06aed0aaa 100644 --- a/src/increase/types/bookkeeping_entry.py +++ b/src/increase/types/bookkeeping_entry.py @@ -9,6 +9,11 @@ class BookkeepingEntry(BaseModel): + """Entries are T-account entries recording debits and credits. + + Your compliance setup might require annotating money movements using this API. Learn more in our [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping). + """ + id: str """The entry identifier.""" diff --git a/src/increase/types/bookkeeping_entry_set.py b/src/increase/types/bookkeeping_entry_set.py index d83ecd71f..4b6760f05 100644 --- a/src/increase/types/bookkeeping_entry_set.py +++ b/src/increase/types/bookkeeping_entry_set.py @@ -21,6 +21,11 @@ class Entry(BaseModel): class BookkeepingEntrySet(BaseModel): + """Entry Sets are accounting entries that are transactionally applied. + + Your compliance setup might require annotating money movements using this API. Learn more in our [guide to Bookkeeping](https://increase.com/documentation/bookkeeping#bookkeeping). + """ + id: str """The entry set identifier.""" diff --git a/src/increase/types/card.py b/src/increase/types/card.py index 46025eb85..b3e8186e6 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -12,6 +12,8 @@ class BillingAddress(BaseModel): + """The Card's billing address.""" + city: Optional[str] = None """The city of the billing address.""" @@ -29,6 +31,10 @@ class BillingAddress(BaseModel): class DigitalWallet(BaseModel): + """ + The contact information used in the two-factor steps for digital wallet card creation. At least one field must be present to complete the digital wallet steps. + """ + digital_card_profile_id: Optional[str] = None """The digital card profile assigned to this digital card. @@ -49,6 +55,11 @@ class DigitalWallet(BaseModel): class Card(BaseModel): + """Cards are commercial credit cards. + + They'll immediately work for online purchases after you create them. All cards maintain a credit limit of 100% of the Account’s available balance at the time of transaction. Funds are deducted from the Account upon transaction settlement. + """ + id: str """The card identifier.""" diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py index c86269dcb..3a3f24cf3 100644 --- a/src/increase/types/card_create_params.py +++ b/src/increase/types/card_create_params.py @@ -35,6 +35,8 @@ class CardCreateParams(TypedDict, total=False): class BillingAddress(TypedDict, total=False): + """The card's billing address.""" + city: Required[str] """The city of the billing address.""" @@ -52,6 +54,10 @@ class BillingAddress(TypedDict, total=False): class DigitalWallet(TypedDict, total=False): + """ + The contact information used in the two-factor steps for digital wallet card creation. To add the card to a digital wallet, you may supply an email or phone number with this request. Otherwise, subscribe and then action a Real Time Decision with the category `digital_wallet_token_requested` or `digital_wallet_authentication_requested`. + """ + digital_card_profile_id: str """The digital card profile assigned to this digital card.""" diff --git a/src/increase/types/card_details.py b/src/increase/types/card_details.py index 33b9578f7..6fc7caeae 100644 --- a/src/increase/types/card_details.py +++ b/src/increase/types/card_details.py @@ -8,6 +8,10 @@ class CardDetails(BaseModel): + """ + An object containing the sensitive details (card number, CVC, PIN, etc) for a Card. These details are not included in the Card object. If you'd prefer to never access these details directly, you can use the [embedded iframe](/documentation/embedded-card-component) to display the information to your users. + """ + card_id: str """The identifier for the Card for which sensitive details have been returned.""" diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 375569bea..7f68cedea 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -109,6 +109,10 @@ class Loss(BaseModel): + """ + If the Card Dispute's status is `lost`, this will contain details of the lost dispute. + """ + lost_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -129,22 +133,46 @@ class VisaNetworkEventAttachmentFile(BaseModel): class VisaNetworkEventChargebackAccepted(BaseModel): + """A Card Dispute Chargeback Accepted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `chargeback_accepted`. Contains the details specific to a chargeback accepted Visa Card Dispute Network Event, which represents that a chargeback has been accepted by the merchant. + """ + pass class VisaNetworkEventChargebackSubmitted(BaseModel): + """A Card Dispute Chargeback Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `chargeback_submitted`. Contains the details specific to a chargeback submitted Visa Card Dispute Network Event, which represents that a chargeback has been submitted to the network. + """ + pass class VisaNetworkEventChargebackTimedOut(BaseModel): + """A Card Dispute Chargeback Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `chargeback_timed_out`. Contains the details specific to a chargeback timed out Visa Card Dispute Network Event, which represents that the chargeback has timed out in the user's favor. + """ + pass class VisaNetworkEventMerchantPrearbitrationDeclineSubmitted(BaseModel): + """ + A Card Dispute Merchant Pre-Arbitration Decline Submitted Visa Network Event object. This field will be present in the JSON response if and only if `category` is equal to `merchant_prearbitration_decline_submitted`. Contains the details specific to a merchant prearbitration decline submitted Visa Card Dispute Network Event, which represents that the user has declined the merchant's request for a prearbitration request decision in their favor. + """ + pass class VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes(BaseModel): + """Cardholder no longer disputes details. + + Present if and only if `reason` is `cardholder_no_longer_disputes`. + """ + explanation: Optional[str] = None """ Explanation for why the merchant believes the cardholder no longer disputes the @@ -153,6 +181,11 @@ class VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes(B class VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence(BaseModel): + """Compelling evidence details. + + Present if and only if `reason` is `compelling_evidence`. + """ + category: Literal[ "authorized_signer", "delivery", @@ -207,6 +240,11 @@ class VisaNetworkEventMerchantPrearbitrationReceivedCompellingEvidence(BaseModel class VisaNetworkEventMerchantPrearbitrationReceivedCreditOrReversalProcessed(BaseModel): + """Credit or reversal processed details. + + Present if and only if `reason` is `credit_or_reversal_processed`. + """ + amount: int """The amount of the credit or reversal in the minor unit of its currency. @@ -227,16 +265,28 @@ class VisaNetworkEventMerchantPrearbitrationReceivedCreditOrReversalProcessed(Ba class VisaNetworkEventMerchantPrearbitrationReceivedDelayedChargeTransaction(BaseModel): + """Delayed charge transaction details. + + Present if and only if `reason` is `delayed_charge_transaction`. + """ + explanation: Optional[str] = None """Additional details about the delayed charge transaction.""" class VisaNetworkEventMerchantPrearbitrationReceivedEvidenceOfImprint(BaseModel): + """Evidence of imprint details. + + Present if and only if `reason` is `evidence_of_imprint`. + """ + explanation: Optional[str] = None """Explanation of the evidence of imprint.""" class VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute(BaseModel): + """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" + explanation: Optional[str] = None """Explanation for why the dispute is considered invalid by the merchant.""" @@ -250,6 +300,11 @@ class VisaNetworkEventMerchantPrearbitrationReceivedInvalidDispute(BaseModel): class VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): + """Non-fiat currency or non-fungible token received details. + + Present if and only if `reason` is `non_fiat_currency_or_non_fungible_token_received`. + """ + blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -261,6 +316,11 @@ class VisaNetworkEventMerchantPrearbitrationReceivedNonFiatCurrencyOrNonFungible class VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTransactions(BaseModel): + """Prior undisputed non-fraud transactions details. + + Present if and only if `reason` is `prior_undisputed_non_fraud_transactions`. + """ + explanation: Optional[str] = None """ Explanation of the prior undisputed non-fraud transactions provided by the @@ -269,6 +329,11 @@ class VisaNetworkEventMerchantPrearbitrationReceivedPriorUndisputedNonFraudTrans class VisaNetworkEventMerchantPrearbitrationReceived(BaseModel): + """A Card Dispute Merchant Pre-Arbitration Received Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `merchant_prearbitration_received`. Contains the details specific to a merchant prearbitration received Visa Card Dispute Network Event, which represents that the merchant has issued a prearbitration request in the user's favor. + """ + cardholder_no_longer_disputes: Optional[ VisaNetworkEventMerchantPrearbitrationReceivedCardholderNoLongerDisputes ] = None @@ -350,10 +415,20 @@ class VisaNetworkEventMerchantPrearbitrationReceived(BaseModel): class VisaNetworkEventMerchantPrearbitrationTimedOut(BaseModel): + """A Card Dispute Merchant Pre-Arbitration Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `merchant_prearbitration_timed_out`. Contains the details specific to a merchant prearbitration timed out Visa Card Dispute Network Event, which represents that the user has timed out responding to the merchant's prearbitration request. + """ + pass class VisaNetworkEventRepresentedCardholderNoLongerDisputes(BaseModel): + """Cardholder no longer disputes details. + + Present if and only if `reason` is `cardholder_no_longer_disputes`. + """ + explanation: Optional[str] = None """ Explanation for why the merchant believes the cardholder no longer disputes the @@ -362,6 +437,11 @@ class VisaNetworkEventRepresentedCardholderNoLongerDisputes(BaseModel): class VisaNetworkEventRepresentedCreditOrReversalProcessed(BaseModel): + """Credit or reversal processed details. + + Present if and only if `reason` is `credit_or_reversal_processed`. + """ + amount: int """The amount of the credit or reversal in the minor unit of its currency. @@ -382,6 +462,8 @@ class VisaNetworkEventRepresentedCreditOrReversalProcessed(BaseModel): class VisaNetworkEventRepresentedInvalidDispute(BaseModel): + """Invalid dispute details. Present if and only if `reason` is `invalid_dispute`.""" + explanation: Optional[str] = None """Explanation for why the dispute is considered invalid by the merchant.""" @@ -484,10 +566,20 @@ class VisaNetworkEventRepresentedInvalidDispute(BaseModel): class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenAsDescribed(BaseModel): + """Non-fiat currency or non-fungible token as described details. + + Present if and only if `reason` is `non_fiat_currency_or_non_fungible_token_as_described`. + """ + pass class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseModel): + """Non-fiat currency or non-fungible token received details. + + Present if and only if `reason` is `non_fiat_currency_or_non_fungible_token_received`. + """ + blockchain_transaction_hash: str """Blockchain transaction hash.""" @@ -499,6 +591,11 @@ class VisaNetworkEventRepresentedNonFiatCurrencyOrNonFungibleTokenReceived(BaseM class VisaNetworkEventRepresentedProofOfCashDisbursement(BaseModel): + """Proof of cash disbursement details. + + Present if and only if `reason` is `proof_of_cash_disbursement`. + """ + explanation: Optional[str] = None """ Explanation for why the merchant believes the evidence provides proof of cash @@ -507,11 +604,21 @@ class VisaNetworkEventRepresentedProofOfCashDisbursement(BaseModel): class VisaNetworkEventRepresentedReversalIssued(BaseModel): + """Reversal issued by merchant details. + + Present if and only if `reason` is `reversal_issued`. + """ + explanation: Optional[str] = None """Explanation of the reversal issued by the merchant.""" class VisaNetworkEventRepresented(BaseModel): + """A Card Dispute Re-presented Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `represented`. Contains the details specific to a re-presented Visa Card Dispute Network Event, which represents that the merchant has declined the user's chargeback and has re-presented the payment. + """ + cardholder_no_longer_disputes: Optional[VisaNetworkEventRepresentedCardholderNoLongerDisputes] = None """Cardholder no longer disputes details. @@ -582,26 +689,56 @@ class VisaNetworkEventRepresented(BaseModel): class VisaNetworkEventRepresentmentTimedOut(BaseModel): + """A Card Dispute Re-presentment Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `representment_timed_out`. Contains the details specific to a re-presentment time-out Visa Card Dispute Network Event, which represents that the user did not respond to the re-presentment by the merchant within the time limit. + """ + pass class VisaNetworkEventUserPrearbitrationAccepted(BaseModel): + """A Card Dispute User Pre-Arbitration Accepted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `user_prearbitration_accepted`. Contains the details specific to a user prearbitration accepted Visa Card Dispute Network Event, which represents that the merchant has accepted the user's prearbitration request in the user's favor. + """ + pass class VisaNetworkEventUserPrearbitrationDeclined(BaseModel): + """A Card Dispute User Pre-Arbitration Declined Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `user_prearbitration_declined`. Contains the details specific to a user prearbitration declined Visa Card Dispute Network Event, which represents that the merchant has declined the user's prearbitration request. + """ + pass class VisaNetworkEventUserPrearbitrationSubmitted(BaseModel): + """A Card Dispute User Pre-Arbitration Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `user_prearbitration_submitted`. Contains the details specific to a user prearbitration submitted Visa Card Dispute Network Event, which represents that the user's request for prearbitration has been submitted to the network. + """ + pass class VisaNetworkEventUserPrearbitrationTimedOut(BaseModel): + """A Card Dispute User Pre-Arbitration Timed Out Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `user_prearbitration_timed_out`. Contains the details specific to a user prearbitration timed out Visa Card Dispute Network Event, which represents that the merchant has timed out responding to the user's prearbitration request. + """ + pass class VisaNetworkEventUserWithdrawalSubmitted(BaseModel): + """A Card Dispute User Withdrawal Submitted Visa Network Event object. + + This field will be present in the JSON response if and only if `category` is equal to `user_withdrawal_submitted`. Contains the details specific to a user withdrawal submitted Visa Card Dispute Network Event, which represents that the user's request to withdraw the dispute has been submitted to the network. + """ + pass @@ -801,6 +938,8 @@ class VisaUserSubmissionAttachmentFile(BaseModel): class VisaUserSubmissionChargebackAuthorization(BaseModel): + """Authorization. Present if and only if `category` is `authorization`.""" + account_status: Literal["account_closed", "credit_problem", "fraud"] """Account status. @@ -811,6 +950,8 @@ class VisaUserSubmissionChargebackAuthorization(BaseModel): class VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation(BaseModel): + """Cardholder cancellation.""" + canceled_at: date """Canceled at.""" @@ -833,10 +974,17 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellat class VisaUserSubmissionChargebackConsumerCanceledMerchandiseNotReturned(BaseModel): + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + pass class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: str """Attempt explanation.""" @@ -864,6 +1012,8 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturnAttempted(Bas class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Optional[date] = None """Merchant received return at.""" @@ -889,6 +1039,11 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandiseReturned(BaseModel) class VisaUserSubmissionChargebackConsumerCanceledMerchandise(BaseModel): + """Canceled merchandise. + + Present if and only if `category` is `consumer_canceled_merchandise`. + """ + cardholder_cancellation: Optional[VisaUserSubmissionChargebackConsumerCanceledMerchandiseCardholderCancellation] = ( None ) @@ -929,6 +1084,8 @@ class VisaUserSubmissionChargebackConsumerCanceledMerchandise(BaseModel): class VisaUserSubmissionChargebackConsumerCanceledRecurringTransactionMerchantContactMethods(BaseModel): + """Merchant contact methods.""" + application_name: Optional[str] = None """Application name.""" @@ -949,6 +1106,11 @@ class VisaUserSubmissionChargebackConsumerCanceledRecurringTransactionMerchantCo class VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction(BaseModel): + """Canceled recurring transaction. + + Present if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + cancellation_target: Literal["account", "transaction"] """Cancellation target. @@ -967,6 +1129,8 @@ class VisaUserSubmissionChargebackConsumerCanceledRecurringTransaction(BaseModel class VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation(BaseModel): + """Cardholder cancellation.""" + canceled_at: date """Canceled at.""" @@ -982,6 +1146,11 @@ class VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation class VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation(BaseModel): + """Guaranteed reservation explanation. + + Present if and only if `service_type` is `guaranteed_reservation`. + """ + explanation: Literal[ "cardholder_canceled_prior_to_service", "cardholder_cancellation_attempt_within_24_hours_of_confirmation", @@ -997,14 +1166,26 @@ class VisaUserSubmissionChargebackConsumerCanceledServicesGuaranteedReservation( class VisaUserSubmissionChargebackConsumerCanceledServicesOther(BaseModel): + """Other service type explanation. + + Present if and only if `service_type` is `other`. + """ + pass class VisaUserSubmissionChargebackConsumerCanceledServicesTimeshare(BaseModel): + """Timeshare explanation. Present if and only if `service_type` is `timeshare`.""" + pass class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): + """Canceled services. + + Present if and only if `category` is `consumer_canceled_services`. + """ + cardholder_cancellation: VisaUserSubmissionChargebackConsumerCanceledServicesCardholderCancellation """Cardholder cancellation.""" @@ -1046,6 +1227,11 @@ class VisaUserSubmissionChargebackConsumerCanceledServices(BaseModel): class VisaUserSubmissionChargebackConsumerCounterfeitMerchandise(BaseModel): + """Counterfeit merchandise. + + Present if and only if `category` is `consumer_counterfeit_merchandise`. + """ + counterfeit_explanation: str """Counterfeit explanation.""" @@ -1060,6 +1246,11 @@ class VisaUserSubmissionChargebackConsumerCounterfeitMerchandise(BaseModel): class VisaUserSubmissionChargebackConsumerCreditNotProcessed(BaseModel): + """Credit not processed. + + Present if and only if `category` is `consumer_credit_not_processed`. + """ + canceled_or_returned_at: Optional[date] = None """Canceled or returned at.""" @@ -1068,10 +1259,17 @@ class VisaUserSubmissionChargebackConsumerCreditNotProcessed(BaseModel): class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned(BaseModel): + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + pass class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: str """Attempt explanation.""" @@ -1099,6 +1297,8 @@ class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturnAtt class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Optional[date] = None """Merchant received return at.""" @@ -1124,6 +1324,11 @@ class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandiseReturned( class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise(BaseModel): + """Damaged or defective merchandise. + + Present if and only if `category` is `consumer_damaged_or_defective_merchandise`. + """ + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] """Merchant resolution attempted. @@ -1159,10 +1364,17 @@ class VisaUserSubmissionChargebackConsumerDamagedOrDefectiveMerchandise(BaseMode class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationNotReturned(BaseModel): + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + pass class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: str """Attempt explanation.""" @@ -1190,6 +1402,8 @@ class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturnAtte class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Optional[date] = None """Merchant received return at.""" @@ -1215,6 +1429,11 @@ class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentationReturned(B class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation(BaseModel): + """Merchandise misrepresentation. + + Present if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] """Merchant resolution attempted. @@ -1253,6 +1472,11 @@ class VisaUserSubmissionChargebackConsumerMerchandiseMisrepresentation(BaseModel class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: str """Attempt explanation.""" @@ -1280,6 +1504,8 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturnAttempt class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Optional[date] = None """Merchant received return at.""" @@ -1305,6 +1531,11 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribedReturned(Base class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed(BaseModel): + """Merchandise not as described. + + Present if and only if `category` is `consumer_merchandise_not_as_described`. + """ + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] """Merchant resolution attempted. @@ -1333,6 +1564,11 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotAsDescribed(BaseModel): class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(BaseModel): + """Cardholder cancellation prior to expected receipt. + + Present if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: date """Canceled at.""" @@ -1341,15 +1577,24 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedCardholderCancel class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedNotReturned(BaseModel): + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + pass class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempted_at: date """Attempted at.""" class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: date """Merchant received return at.""" @@ -1358,6 +1603,8 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayedReturned( class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed(BaseModel): + """Delayed. Present if and only if `delivery_issue` is `delayed`.""" + explanation: str """Explanation.""" @@ -1383,20 +1630,40 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDelayed(BaseMode class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation(BaseModel): + """Delivered to wrong location. + + Present if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + agreed_location: str """Agreed location.""" class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedMerchantCancellation(BaseModel): + """Merchant cancellation. + + Present if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: date """Canceled at.""" class VisaUserSubmissionChargebackConsumerMerchandiseNotReceivedNoCancellation(BaseModel): + """No cancellation. + + Present if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): + """Merchandise not received. + + Present if and only if `category` is `consumer_merchandise_not_received`. + """ + cancellation_outcome: Literal[ "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" ] @@ -1464,10 +1731,20 @@ class VisaUserSubmissionChargebackConsumerMerchandiseNotReceived(BaseModel): class VisaUserSubmissionChargebackConsumerNonReceiptOfCash(BaseModel): + """Non-receipt of cash. + + Present if and only if `category` is `consumer_non_receipt_of_cash`. + """ + pass class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(BaseModel): + """Original Credit Transaction (OCT) not accepted. + + Present if and only if `category` is `consumer_original_credit_transaction_not_accepted`. + """ + explanation: str """Explanation.""" @@ -1481,10 +1758,14 @@ class VisaUserSubmissionChargebackConsumerOriginalCreditTransactionNotAccepted(B class VisaUserSubmissionChargebackConsumerQualityMerchandiseNotReturned(BaseModel): + """Not returned. Present if and only if `return_outcome` is `not_returned`.""" + pass class VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations(BaseModel): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: str """ Explanation of the previous ongoing negotiations between the cardholder and @@ -1499,6 +1780,11 @@ class VisaUserSubmissionChargebackConsumerQualityMerchandiseOngoingNegotiations( class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted(BaseModel): + """Return attempted. + + Present if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: str """Attempt explanation.""" @@ -1526,6 +1812,8 @@ class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturnAttempted(Base class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned(BaseModel): + """Returned. Present if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Optional[date] = None """Merchant received return at.""" @@ -1551,6 +1839,11 @@ class VisaUserSubmissionChargebackConsumerQualityMerchandiseReturned(BaseModel): class VisaUserSubmissionChargebackConsumerQualityMerchandise(BaseModel): + """Merchandise quality issue. + + Present if and only if `category` is `consumer_quality_merchandise`. + """ + expected_at: date """Expected at.""" @@ -1592,6 +1885,8 @@ class VisaUserSubmissionChargebackConsumerQualityMerchandise(BaseModel): class VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation(BaseModel): + """Cardholder cancellation.""" + accepted_by_merchant: Literal["accepted", "not_accepted"] """Accepted by merchant. @@ -1607,6 +1902,8 @@ class VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation( class VisaUserSubmissionChargebackConsumerQualityServicesOngoingNegotiations(BaseModel): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: str """ Explanation of the previous ongoing negotiations between the cardholder and @@ -1621,6 +1918,11 @@ class VisaUserSubmissionChargebackConsumerQualityServicesOngoingNegotiations(Bas class VisaUserSubmissionChargebackConsumerQualityServices(BaseModel): + """Services quality issue. + + Present if and only if `category` is `consumer_quality_services`. + """ + cardholder_cancellation: VisaUserSubmissionChargebackConsumerQualityServicesCardholderCancellation """Cardholder cancellation.""" @@ -1662,6 +1964,8 @@ class VisaUserSubmissionChargebackConsumerQualityServices(BaseModel): class VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCancellation(BaseModel): + """Cardholder cancellation.""" + accepted_by_merchant: Literal["accepted", "not_accepted"] """Accepted by merchant. @@ -1677,6 +1981,11 @@ class VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCan class VisaUserSubmissionChargebackConsumerServicesMisrepresentation(BaseModel): + """Services misrepresentation. + + Present if and only if `category` is `consumer_services_misrepresentation`. + """ + cardholder_cancellation: VisaUserSubmissionChargebackConsumerServicesMisrepresentationCardholderCancellation """Cardholder cancellation.""" @@ -1698,6 +2007,8 @@ class VisaUserSubmissionChargebackConsumerServicesMisrepresentation(BaseModel): class VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation(BaseModel): + """Cardholder cancellation.""" + accepted_by_merchant: Literal["accepted", "not_accepted"] """Accepted by merchant. @@ -1713,6 +2024,11 @@ class VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancel class VisaUserSubmissionChargebackConsumerServicesNotAsDescribed(BaseModel): + """Services not as described. + + Present if and only if `category` is `consumer_services_not_as_described`. + """ + cardholder_cancellation: VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation """Cardholder cancellation.""" @@ -1728,6 +2044,11 @@ class VisaUserSubmissionChargebackConsumerServicesNotAsDescribed(BaseModel): class VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(BaseModel): + """Cardholder cancellation prior to expected receipt. + + Present if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: date """Canceled at.""" @@ -1736,15 +2057,30 @@ class VisaUserSubmissionChargebackConsumerServicesNotReceivedCardholderCancellat class VisaUserSubmissionChargebackConsumerServicesNotReceivedMerchantCancellation(BaseModel): + """Merchant cancellation. + + Present if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: date """Canceled at.""" class VisaUserSubmissionChargebackConsumerServicesNotReceivedNoCancellation(BaseModel): + """No cancellation. + + Present if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaUserSubmissionChargebackConsumerServicesNotReceived(BaseModel): + """Services not received. + + Present if and only if `category` is `consumer_services_not_received`. + """ + cancellation_outcome: Literal[ "cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation" ] @@ -1792,6 +2128,8 @@ class VisaUserSubmissionChargebackConsumerServicesNotReceived(BaseModel): class VisaUserSubmissionChargebackFraud(BaseModel): + """Fraud. Present if and only if `category` is `fraud`.""" + fraud_type: Literal[ "account_or_credentials_takeover", "card_not_received_as_issued", @@ -1822,16 +2160,28 @@ class VisaUserSubmissionChargebackFraud(BaseModel): class VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction(BaseModel): + """Duplicate transaction. + + Present if and only if `error_reason` is `duplicate_transaction`. + """ + other_transaction_id: str """Other transaction ID.""" class VisaUserSubmissionChargebackProcessingErrorIncorrectAmount(BaseModel): + """Incorrect amount. Present if and only if `error_reason` is `incorrect_amount`.""" + expected_amount: int """Expected amount.""" class VisaUserSubmissionChargebackProcessingErrorPaidByOtherMeans(BaseModel): + """Paid by other means. + + Present if and only if `error_reason` is `paid_by_other_means`. + """ + other_form_of_payment_evidence: Literal[ "canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher" ] @@ -1850,6 +2200,8 @@ class VisaUserSubmissionChargebackProcessingErrorPaidByOtherMeans(BaseModel): class VisaUserSubmissionChargebackProcessingError(BaseModel): + """Processing error. Present if and only if `category` is `processing_error`.""" + duplicate_transaction: Optional[VisaUserSubmissionChargebackProcessingErrorDuplicateTransaction] = None """Duplicate transaction. @@ -1882,6 +2234,11 @@ class VisaUserSubmissionChargebackProcessingError(BaseModel): class VisaUserSubmissionChargeback(BaseModel): + """A Visa Card Dispute Chargeback User Submission Chargeback Details object. + + This field will be present in the JSON response if and only if `category` is equal to `chargeback`. Contains the details specific to a Visa chargeback User Submission for a Card Dispute. + """ + authorization: Optional[VisaUserSubmissionChargebackAuthorization] = None """Authorization. Present if and only if `category` is `authorization`.""" @@ -2050,6 +2407,11 @@ class VisaUserSubmissionChargeback(BaseModel): class VisaUserSubmissionMerchantPrearbitrationDecline(BaseModel): + """A Visa Card Dispute Merchant Pre-Arbitration Decline User Submission object. + + This field will be present in the JSON response if and only if `category` is equal to `merchant_prearbitration_decline`. Contains the details specific to a merchant prearbitration decline Visa Card Dispute User Submission. + """ + reason: str """ The reason the user declined the merchant's request for pre-arbitration in their @@ -2058,6 +2420,8 @@ class VisaUserSubmissionMerchantPrearbitrationDecline(BaseModel): class VisaUserSubmissionUserPrearbitrationCategoryChange(BaseModel): + """Category change details for the pre-arbitration request, if requested.""" + category: Literal[ "authorization", "consumer_canceled_merchandise", @@ -2112,6 +2476,11 @@ class VisaUserSubmissionUserPrearbitrationCategoryChange(BaseModel): class VisaUserSubmissionUserPrearbitration(BaseModel): + """A Visa Card Dispute User-Initiated Pre-Arbitration User Submission object. + + This field will be present in the JSON response if and only if `category` is equal to `user_prearbitration`. Contains the details specific to a user-initiated pre-arbitration Visa Card Dispute User Submission. + """ + category_change: Optional[VisaUserSubmissionUserPrearbitrationCategoryChange] = None """Category change details for the pre-arbitration request, if requested.""" @@ -2210,6 +2579,11 @@ class VisaUserSubmission(BaseModel): class Visa(BaseModel): + """Card Dispute information for card payments processed over Visa's network. + + This field will be present in the JSON response if and only if `network` is equal to `visa`. + """ + network_events: List[VisaNetworkEvent] """The network events for the Card Dispute.""" @@ -2233,6 +2607,10 @@ class Visa(BaseModel): class Win(BaseModel): + """ + If the Card Dispute's status is `won`, this will contain details of the won dispute. + """ + won_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -2241,6 +2619,10 @@ class Win(BaseModel): class CardDispute(BaseModel): + """ + If unauthorized activity occurs on a card, you can create a Card Dispute and we'll work with the card networks to return the funds if appropriate. + """ + id: str """The Card Dispute identifier.""" diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py index 089cf7add..0d52259cb 100644 --- a/src/increase/types/card_dispute_create_params.py +++ b/src/increase/types/card_dispute_create_params.py @@ -116,6 +116,8 @@ class AttachmentFile(TypedDict, total=False): class VisaAuthorization(TypedDict, total=False): + """Authorization. Required if and only if `category` is `authorization`.""" + account_status: Required[Literal["account_closed", "credit_problem", "fraud"]] """Account status. @@ -126,6 +128,8 @@ class VisaAuthorization(TypedDict, total=False): class VisaConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -148,10 +152,17 @@ class VisaConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=Fal class VisaConsumerCanceledMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -181,6 +192,8 @@ class VisaConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): class VisaConsumerCanceledMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -206,6 +219,11 @@ class VisaConsumerCanceledMerchandiseReturned(TypedDict, total=False): class VisaConsumerCanceledMerchandise(TypedDict, total=False): + """Canceled merchandise. + + Required if and only if `category` is `consumer_canceled_merchandise`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -244,6 +262,8 @@ class VisaConsumerCanceledMerchandise(TypedDict, total=False): class VisaConsumerCanceledRecurringTransactionMerchantContactMethods(TypedDict, total=False): + """Merchant contact methods.""" + application_name: str """Application name.""" @@ -264,6 +284,11 @@ class VisaConsumerCanceledRecurringTransactionMerchantContactMethods(TypedDict, class VisaConsumerCanceledRecurringTransaction(TypedDict, total=False): + """Canceled recurring transaction. + + Required if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + cancellation_target: Required[Literal["account", "transaction"]] """Cancellation target. @@ -282,6 +307,8 @@ class VisaConsumerCanceledRecurringTransaction(TypedDict, total=False): class VisaConsumerCanceledServicesCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -297,6 +324,11 @@ class VisaConsumerCanceledServicesCardholderCancellation(TypedDict, total=False) class VisaConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): + """Guaranteed reservation explanation. + + Required if and only if `service_type` is `guaranteed_reservation`. + """ + explanation: Required[ Literal[ "cardholder_canceled_prior_to_service", @@ -314,14 +346,26 @@ class VisaConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): class VisaConsumerCanceledServicesOther(TypedDict, total=False): + """Other service type explanation. + + Required if and only if `service_type` is `other`. + """ + pass class VisaConsumerCanceledServicesTimeshare(TypedDict, total=False): + """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" + pass class VisaConsumerCanceledServices(TypedDict, total=False): + """Canceled services. + + Required if and only if `category` is `consumer_canceled_services`. + """ + cardholder_cancellation: Required[VisaConsumerCanceledServicesCardholderCancellation] """Cardholder cancellation.""" @@ -363,6 +407,11 @@ class VisaConsumerCanceledServices(TypedDict, total=False): class VisaConsumerCounterfeitMerchandise(TypedDict, total=False): + """Counterfeit merchandise. + + Required if and only if `category` is `consumer_counterfeit_merchandise`. + """ + counterfeit_explanation: Required[str] """Counterfeit explanation.""" @@ -377,6 +426,11 @@ class VisaConsumerCounterfeitMerchandise(TypedDict, total=False): class VisaConsumerCreditNotProcessed(TypedDict, total=False): + """Credit not processed. + + Required if and only if `category` is `consumer_credit_not_processed`. + """ + canceled_or_returned_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] """Canceled or returned at.""" @@ -385,10 +439,17 @@ class VisaConsumerCreditNotProcessed(TypedDict, total=False): class VisaConsumerDamagedOrDefectiveMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -418,6 +479,8 @@ class VisaConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total= class VisaConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -443,6 +506,11 @@ class VisaConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, total=False): class VisaConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): + """Damaged or defective merchandise. + + Required if and only if `category` is `consumer_damaged_or_defective_merchandise`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -478,10 +546,17 @@ class VisaConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): class VisaConsumerMerchandiseMisrepresentationNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -511,6 +586,8 @@ class VisaConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=F class VisaConsumerMerchandiseMisrepresentationReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -536,6 +613,11 @@ class VisaConsumerMerchandiseMisrepresentationReturned(TypedDict, total=False): class VisaConsumerMerchandiseMisrepresentation(TypedDict, total=False): + """Merchandise misrepresentation. + + Required if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -574,6 +656,11 @@ class VisaConsumerMerchandiseMisrepresentation(TypedDict, total=False): class VisaConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -603,6 +690,8 @@ class VisaConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, total=Fals class VisaConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -628,6 +717,11 @@ class VisaConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=False): class VisaConsumerMerchandiseNotAsDescribed(TypedDict, total=False): + """Merchandise not as described. + + Required if and only if `category` is `consumer_merchandise_not_as_described`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -656,6 +750,11 @@ class VisaConsumerMerchandiseNotAsDescribed(TypedDict, total=False): class VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -664,15 +763,24 @@ class VisaConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedRec class VisaConsumerMerchandiseNotReceivedDelayedNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Attempted at.""" class VisaConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Merchant received return at.""" @@ -681,6 +789,8 @@ class VisaConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, total=False): class VisaConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): + """Delayed. Required if and only if `delivery_issue` is `delayed`.""" + explanation: Required[str] """Explanation.""" @@ -706,20 +816,40 @@ class VisaConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): class VisaConsumerMerchandiseNotReceivedDeliveredToWrongLocation(TypedDict, total=False): + """Delivered to wrong location. + + Required if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + agreed_location: Required[str] """Agreed location.""" class VisaConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict, total=False): + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" class VisaConsumerMerchandiseNotReceivedNoCancellation(TypedDict, total=False): + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaConsumerMerchandiseNotReceived(TypedDict, total=False): + """Merchandise not received. + + Required if and only if `category` is `consumer_merchandise_not_received`. + """ + cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] ] @@ -783,10 +913,20 @@ class VisaConsumerMerchandiseNotReceived(TypedDict, total=False): class VisaConsumerNonReceiptOfCash(TypedDict, total=False): + """Non-receipt of cash. + + Required if and only if `category` is `consumer_non_receipt_of_cash`. + """ + pass class VisaConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): + """Original Credit Transaction (OCT) not accepted. + + Required if and only if `category` is `consumer_original_credit_transaction_not_accepted`. + """ + explanation: Required[str] """Explanation.""" @@ -800,10 +940,14 @@ class VisaConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): class VisaConsumerQualityMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: Required[str] """ Explanation of the previous ongoing negotiations between the cardholder and @@ -818,6 +962,11 @@ class VisaConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): class VisaConsumerQualityMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -847,6 +996,8 @@ class VisaConsumerQualityMerchandiseReturnAttempted(TypedDict, total=False): class VisaConsumerQualityMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -872,6 +1023,11 @@ class VisaConsumerQualityMerchandiseReturned(TypedDict, total=False): class VisaConsumerQualityMerchandise(TypedDict, total=False): + """Merchandise quality issue. + + Required if and only if `category` is `consumer_quality_merchandise`. + """ + expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Expected at.""" @@ -913,6 +1069,8 @@ class VisaConsumerQualityMerchandise(TypedDict, total=False): class VisaConsumerQualityServicesCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -928,6 +1086,8 @@ class VisaConsumerQualityServicesCardholderCancellation(TypedDict, total=False): class VisaConsumerQualityServicesOngoingNegotiations(TypedDict, total=False): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: Required[str] """ Explanation of the previous ongoing negotiations between the cardholder and @@ -942,6 +1102,11 @@ class VisaConsumerQualityServicesOngoingNegotiations(TypedDict, total=False): class VisaConsumerQualityServices(TypedDict, total=False): + """Services quality issue. + + Required if and only if `category` is `consumer_quality_services`. + """ + cardholder_cancellation: Required[VisaConsumerQualityServicesCardholderCancellation] """Cardholder cancellation.""" @@ -983,6 +1148,8 @@ class VisaConsumerQualityServices(TypedDict, total=False): class VisaConsumerServicesMisrepresentationCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -998,6 +1165,11 @@ class VisaConsumerServicesMisrepresentationCardholderCancellation(TypedDict, tot class VisaConsumerServicesMisrepresentation(TypedDict, total=False): + """Services misrepresentation. + + Required if and only if `category` is `consumer_services_misrepresentation`. + """ + cardholder_cancellation: Required[VisaConsumerServicesMisrepresentationCardholderCancellation] """Cardholder cancellation.""" @@ -1019,6 +1191,8 @@ class VisaConsumerServicesMisrepresentation(TypedDict, total=False): class VisaConsumerServicesNotAsDescribedCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -1034,6 +1208,11 @@ class VisaConsumerServicesNotAsDescribedCardholderCancellation(TypedDict, total= class VisaConsumerServicesNotAsDescribed(TypedDict, total=False): + """Services not as described. + + Required if and only if `category` is `consumer_services_not_as_described`. + """ + cardholder_cancellation: Required[VisaConsumerServicesNotAsDescribedCardholderCancellation] """Cardholder cancellation.""" @@ -1049,6 +1228,11 @@ class VisaConsumerServicesNotAsDescribed(TypedDict, total=False): class VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -1057,15 +1241,30 @@ class VisaConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceip class VisaConsumerServicesNotReceivedMerchantCancellation(TypedDict, total=False): + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" class VisaConsumerServicesNotReceivedNoCancellation(TypedDict, total=False): + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaConsumerServicesNotReceived(TypedDict, total=False): + """Services not received. + + Required if and only if `category` is `consumer_services_not_received`. + """ + cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] ] @@ -1113,6 +1312,8 @@ class VisaConsumerServicesNotReceived(TypedDict, total=False): class VisaFraud(TypedDict, total=False): + """Fraud. Required if and only if `category` is `fraud`.""" + fraud_type: Required[ Literal[ "account_or_credentials_takeover", @@ -1145,16 +1346,28 @@ class VisaFraud(TypedDict, total=False): class VisaProcessingErrorDuplicateTransaction(TypedDict, total=False): + """Duplicate transaction. + + Required if and only if `error_reason` is `duplicate_transaction`. + """ + other_transaction_id: Required[str] """Other transaction ID.""" class VisaProcessingErrorIncorrectAmount(TypedDict, total=False): + """Incorrect amount. Required if and only if `error_reason` is `incorrect_amount`.""" + expected_amount: Required[int] """Expected amount.""" class VisaProcessingErrorPaidByOtherMeans(TypedDict, total=False): + """Paid by other means. + + Required if and only if `error_reason` is `paid_by_other_means`. + """ + other_form_of_payment_evidence: Required[ Literal["canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher"] ] @@ -1173,6 +1386,8 @@ class VisaProcessingErrorPaidByOtherMeans(TypedDict, total=False): class VisaProcessingError(TypedDict, total=False): + """Processing error. Required if and only if `category` is `processing_error`.""" + error_reason: Required[Literal["duplicate_transaction", "incorrect_amount", "paid_by_other_means"]] """Error reason. @@ -1205,6 +1420,11 @@ class VisaProcessingError(TypedDict, total=False): class Visa(TypedDict, total=False): + """The Visa-specific parameters for the dispute. + + Required if and only if `network` is `visa`. + """ + category: Required[ Literal[ "authorization", diff --git a/src/increase/types/card_dispute_submit_user_submission_params.py b/src/increase/types/card_dispute_submit_user_submission_params.py index 3384f3968..eb5eb847a 100644 --- a/src/increase/types/card_dispute_submit_user_submission_params.py +++ b/src/increase/types/card_dispute_submit_user_submission_params.py @@ -114,6 +114,8 @@ class AttachmentFile(TypedDict, total=False): class VisaChargebackAuthorization(TypedDict, total=False): + """Authorization. Required if and only if `category` is `authorization`.""" + account_status: Required[Literal["account_closed", "credit_problem", "fraud"]] """Account status. @@ -124,6 +126,8 @@ class VisaChargebackAuthorization(TypedDict, total=False): class VisaChargebackConsumerCanceledMerchandiseCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -146,10 +150,17 @@ class VisaChargebackConsumerCanceledMerchandiseCardholderCancellation(TypedDict, class VisaChargebackConsumerCanceledMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaChargebackConsumerCanceledMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -179,6 +190,8 @@ class VisaChargebackConsumerCanceledMerchandiseReturnAttempted(TypedDict, total= class VisaChargebackConsumerCanceledMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -204,6 +217,11 @@ class VisaChargebackConsumerCanceledMerchandiseReturned(TypedDict, total=False): class VisaChargebackConsumerCanceledMerchandise(TypedDict, total=False): + """Canceled merchandise. + + Required if and only if `category` is `consumer_canceled_merchandise`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -242,6 +260,8 @@ class VisaChargebackConsumerCanceledMerchandise(TypedDict, total=False): class VisaChargebackConsumerCanceledRecurringTransactionMerchantContactMethods(TypedDict, total=False): + """Merchant contact methods.""" + application_name: str """Application name.""" @@ -262,6 +282,11 @@ class VisaChargebackConsumerCanceledRecurringTransactionMerchantContactMethods(T class VisaChargebackConsumerCanceledRecurringTransaction(TypedDict, total=False): + """Canceled recurring transaction. + + Required if and only if `category` is `consumer_canceled_recurring_transaction`. + """ + cancellation_target: Required[Literal["account", "transaction"]] """Cancellation target. @@ -280,6 +305,8 @@ class VisaChargebackConsumerCanceledRecurringTransaction(TypedDict, total=False) class VisaChargebackConsumerCanceledServicesCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -295,6 +322,11 @@ class VisaChargebackConsumerCanceledServicesCardholderCancellation(TypedDict, to class VisaChargebackConsumerCanceledServicesGuaranteedReservation(TypedDict, total=False): + """Guaranteed reservation explanation. + + Required if and only if `service_type` is `guaranteed_reservation`. + """ + explanation: Required[ Literal[ "cardholder_canceled_prior_to_service", @@ -312,14 +344,26 @@ class VisaChargebackConsumerCanceledServicesGuaranteedReservation(TypedDict, tot class VisaChargebackConsumerCanceledServicesOther(TypedDict, total=False): + """Other service type explanation. + + Required if and only if `service_type` is `other`. + """ + pass class VisaChargebackConsumerCanceledServicesTimeshare(TypedDict, total=False): + """Timeshare explanation. Required if and only if `service_type` is `timeshare`.""" + pass class VisaChargebackConsumerCanceledServices(TypedDict, total=False): + """Canceled services. + + Required if and only if `category` is `consumer_canceled_services`. + """ + cardholder_cancellation: Required[VisaChargebackConsumerCanceledServicesCardholderCancellation] """Cardholder cancellation.""" @@ -361,6 +405,11 @@ class VisaChargebackConsumerCanceledServices(TypedDict, total=False): class VisaChargebackConsumerCounterfeitMerchandise(TypedDict, total=False): + """Counterfeit merchandise. + + Required if and only if `category` is `consumer_counterfeit_merchandise`. + """ + counterfeit_explanation: Required[str] """Counterfeit explanation.""" @@ -375,6 +424,11 @@ class VisaChargebackConsumerCounterfeitMerchandise(TypedDict, total=False): class VisaChargebackConsumerCreditNotProcessed(TypedDict, total=False): + """Credit not processed. + + Required if and only if `category` is `consumer_credit_not_processed`. + """ + canceled_or_returned_at: Annotated[Union[str, date], PropertyInfo(format="iso8601")] """Canceled or returned at.""" @@ -383,10 +437,17 @@ class VisaChargebackConsumerCreditNotProcessed(TypedDict, total=False): class VisaChargebackConsumerDamagedOrDefectiveMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -416,6 +477,8 @@ class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturnAttempted(TypedDi class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -441,6 +504,11 @@ class VisaChargebackConsumerDamagedOrDefectiveMerchandiseReturned(TypedDict, tot class VisaChargebackConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False): + """Damaged or defective merchandise. + + Required if and only if `category` is `consumer_damaged_or_defective_merchandise`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -476,10 +544,17 @@ class VisaChargebackConsumerDamagedOrDefectiveMerchandise(TypedDict, total=False class VisaChargebackConsumerMerchandiseMisrepresentationNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -509,6 +584,8 @@ class VisaChargebackConsumerMerchandiseMisrepresentationReturnAttempted(TypedDic class VisaChargebackConsumerMerchandiseMisrepresentationReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -534,6 +611,11 @@ class VisaChargebackConsumerMerchandiseMisrepresentationReturned(TypedDict, tota class VisaChargebackConsumerMerchandiseMisrepresentation(TypedDict, total=False): + """Merchandise misrepresentation. + + Required if and only if `category` is `consumer_merchandise_misrepresentation`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -572,6 +654,11 @@ class VisaChargebackConsumerMerchandiseMisrepresentation(TypedDict, total=False) class VisaChargebackConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -601,6 +688,8 @@ class VisaChargebackConsumerMerchandiseNotAsDescribedReturnAttempted(TypedDict, class VisaChargebackConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -626,6 +715,11 @@ class VisaChargebackConsumerMerchandiseNotAsDescribedReturned(TypedDict, total=F class VisaChargebackConsumerMerchandiseNotAsDescribed(TypedDict, total=False): + """Merchandise not as described. + + Required if and only if `category` is `consumer_merchandise_not_as_described`. + """ + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. @@ -654,6 +748,11 @@ class VisaChargebackConsumerMerchandiseNotAsDescribed(TypedDict, total=False): class VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -662,15 +761,24 @@ class VisaChargebackConsumerMerchandiseNotReceivedCardholderCancellationPriorToE class VisaChargebackConsumerMerchandiseNotReceivedDelayedNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempted_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Attempted at.""" class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + merchant_received_return_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Merchant received return at.""" @@ -679,6 +787,8 @@ class VisaChargebackConsumerMerchandiseNotReceivedDelayedReturned(TypedDict, tot class VisaChargebackConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False): + """Delayed. Required if and only if `delivery_issue` is `delayed`.""" + explanation: Required[str] """Explanation.""" @@ -704,20 +814,40 @@ class VisaChargebackConsumerMerchandiseNotReceivedDelayed(TypedDict, total=False class VisaChargebackConsumerMerchandiseNotReceivedDeliveredToWrongLocation(TypedDict, total=False): + """Delivered to wrong location. + + Required if and only if `delivery_issue` is `delivered_to_wrong_location`. + """ + agreed_location: Required[str] """Agreed location.""" class VisaChargebackConsumerMerchandiseNotReceivedMerchantCancellation(TypedDict, total=False): + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" class VisaChargebackConsumerMerchandiseNotReceivedNoCancellation(TypedDict, total=False): + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaChargebackConsumerMerchandiseNotReceived(TypedDict, total=False): + """Merchandise not received. + + Required if and only if `category` is `consumer_merchandise_not_received`. + """ + cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] ] @@ -781,10 +911,20 @@ class VisaChargebackConsumerMerchandiseNotReceived(TypedDict, total=False): class VisaChargebackConsumerNonReceiptOfCash(TypedDict, total=False): + """Non-receipt of cash. + + Required if and only if `category` is `consumer_non_receipt_of_cash`. + """ + pass class VisaChargebackConsumerOriginalCreditTransactionNotAccepted(TypedDict, total=False): + """Original Credit Transaction (OCT) not accepted. + + Required if and only if `category` is `consumer_original_credit_transaction_not_accepted`. + """ + explanation: Required[str] """Explanation.""" @@ -798,10 +938,14 @@ class VisaChargebackConsumerOriginalCreditTransactionNotAccepted(TypedDict, tota class VisaChargebackConsumerQualityMerchandiseNotReturned(TypedDict, total=False): + """Not returned. Required if and only if `return_outcome` is `not_returned`.""" + pass class VisaChargebackConsumerQualityMerchandiseOngoingNegotiations(TypedDict, total=False): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: Required[str] """ Explanation of the previous ongoing negotiations between the cardholder and @@ -816,6 +960,11 @@ class VisaChargebackConsumerQualityMerchandiseOngoingNegotiations(TypedDict, tot class VisaChargebackConsumerQualityMerchandiseReturnAttempted(TypedDict, total=False): + """Return attempted. + + Required if and only if `return_outcome` is `return_attempted`. + """ + attempt_explanation: Required[str] """Attempt explanation.""" @@ -845,6 +994,8 @@ class VisaChargebackConsumerQualityMerchandiseReturnAttempted(TypedDict, total=F class VisaChargebackConsumerQualityMerchandiseReturned(TypedDict, total=False): + """Returned. Required if and only if `return_outcome` is `returned`.""" + return_method: Required[Literal["dhl", "face_to_face", "fedex", "other", "postal_service", "ups"]] """Return method. @@ -870,6 +1021,11 @@ class VisaChargebackConsumerQualityMerchandiseReturned(TypedDict, total=False): class VisaChargebackConsumerQualityMerchandise(TypedDict, total=False): + """Merchandise quality issue. + + Required if and only if `category` is `consumer_quality_merchandise`. + """ + expected_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Expected at.""" @@ -911,6 +1067,8 @@ class VisaChargebackConsumerQualityMerchandise(TypedDict, total=False): class VisaChargebackConsumerQualityServicesCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -926,6 +1084,8 @@ class VisaChargebackConsumerQualityServicesCardholderCancellation(TypedDict, tot class VisaChargebackConsumerQualityServicesOngoingNegotiations(TypedDict, total=False): + """Ongoing negotiations. Exclude if there is no evidence of ongoing negotiations.""" + explanation: Required[str] """ Explanation of the previous ongoing negotiations between the cardholder and @@ -940,6 +1100,11 @@ class VisaChargebackConsumerQualityServicesOngoingNegotiations(TypedDict, total= class VisaChargebackConsumerQualityServices(TypedDict, total=False): + """Services quality issue. + + Required if and only if `category` is `consumer_quality_services`. + """ + cardholder_cancellation: Required[VisaChargebackConsumerQualityServicesCardholderCancellation] """Cardholder cancellation.""" @@ -981,6 +1146,8 @@ class VisaChargebackConsumerQualityServices(TypedDict, total=False): class VisaChargebackConsumerServicesMisrepresentationCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -996,6 +1163,11 @@ class VisaChargebackConsumerServicesMisrepresentationCardholderCancellation(Type class VisaChargebackConsumerServicesMisrepresentation(TypedDict, total=False): + """Services misrepresentation. + + Required if and only if `category` is `consumer_services_misrepresentation`. + """ + cardholder_cancellation: Required[VisaChargebackConsumerServicesMisrepresentationCardholderCancellation] """Cardholder cancellation.""" @@ -1017,6 +1189,8 @@ class VisaChargebackConsumerServicesMisrepresentation(TypedDict, total=False): class VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation(TypedDict, total=False): + """Cardholder cancellation.""" + accepted_by_merchant: Required[Literal["accepted", "not_accepted"]] """Accepted by merchant. @@ -1032,6 +1206,11 @@ class VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation(TypedDi class VisaChargebackConsumerServicesNotAsDescribed(TypedDict, total=False): + """Services not as described. + + Required if and only if `category` is `consumer_services_not_as_described`. + """ + cardholder_cancellation: Required[VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation] """Cardholder cancellation.""" @@ -1047,6 +1226,11 @@ class VisaChargebackConsumerServicesNotAsDescribed(TypedDict, total=False): class VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpectedReceipt(TypedDict, total=False): + """Cardholder cancellation prior to expected receipt. + + Required if and only if `cancellation_outcome` is `cardholder_cancellation_prior_to_expected_receipt`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" @@ -1055,15 +1239,30 @@ class VisaChargebackConsumerServicesNotReceivedCardholderCancellationPriorToExpe class VisaChargebackConsumerServicesNotReceivedMerchantCancellation(TypedDict, total=False): + """Merchant cancellation. + + Required if and only if `cancellation_outcome` is `merchant_cancellation`. + """ + canceled_at: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """Canceled at.""" class VisaChargebackConsumerServicesNotReceivedNoCancellation(TypedDict, total=False): + """No cancellation. + + Required if and only if `cancellation_outcome` is `no_cancellation`. + """ + pass class VisaChargebackConsumerServicesNotReceived(TypedDict, total=False): + """Services not received. + + Required if and only if `category` is `consumer_services_not_received`. + """ + cancellation_outcome: Required[ Literal["cardholder_cancellation_prior_to_expected_receipt", "merchant_cancellation", "no_cancellation"] ] @@ -1111,6 +1310,8 @@ class VisaChargebackConsumerServicesNotReceived(TypedDict, total=False): class VisaChargebackFraud(TypedDict, total=False): + """Fraud. Required if and only if `category` is `fraud`.""" + fraud_type: Required[ Literal[ "account_or_credentials_takeover", @@ -1143,16 +1344,28 @@ class VisaChargebackFraud(TypedDict, total=False): class VisaChargebackProcessingErrorDuplicateTransaction(TypedDict, total=False): + """Duplicate transaction. + + Required if and only if `error_reason` is `duplicate_transaction`. + """ + other_transaction_id: Required[str] """Other transaction ID.""" class VisaChargebackProcessingErrorIncorrectAmount(TypedDict, total=False): + """Incorrect amount. Required if and only if `error_reason` is `incorrect_amount`.""" + expected_amount: Required[int] """Expected amount.""" class VisaChargebackProcessingErrorPaidByOtherMeans(TypedDict, total=False): + """Paid by other means. + + Required if and only if `error_reason` is `paid_by_other_means`. + """ + other_form_of_payment_evidence: Required[ Literal["canceled_check", "card_transaction", "cash_receipt", "other", "statement", "voucher"] ] @@ -1171,6 +1384,8 @@ class VisaChargebackProcessingErrorPaidByOtherMeans(TypedDict, total=False): class VisaChargebackProcessingError(TypedDict, total=False): + """Processing error. Required if and only if `category` is `processing_error`.""" + error_reason: Required[Literal["duplicate_transaction", "incorrect_amount", "paid_by_other_means"]] """Error reason. @@ -1203,6 +1418,11 @@ class VisaChargebackProcessingError(TypedDict, total=False): class VisaChargeback(TypedDict, total=False): + """The chargeback details for the user submission. + + Required if and only if `category` is `chargeback`. + """ + category: Required[ Literal[ "authorization", @@ -1363,11 +1583,21 @@ class VisaChargeback(TypedDict, total=False): class VisaMerchantPrearbitrationDecline(TypedDict, total=False): + """The merchant pre-arbitration decline details for the user submission. + + Required if and only if `category` is `merchant_prearbitration_decline`. + """ + reason: Required[str] """The reason for declining the merchant's pre-arbitration request.""" class VisaUserPrearbitrationCategoryChange(TypedDict, total=False): + """Category change details for the pre-arbitration request. + + Should only be populated if the category of the dispute is being changed as part of the pre-arbitration request. + """ + category: Required[ Literal[ "authorization", @@ -1423,6 +1653,11 @@ class VisaUserPrearbitrationCategoryChange(TypedDict, total=False): class VisaUserPrearbitration(TypedDict, total=False): + """The user pre-arbitration details for the user submission. + + Required if and only if `category` is `user_prearbitration`. + """ + reason: Required[str] """The reason for the pre-arbitration request.""" @@ -1435,6 +1670,11 @@ class VisaUserPrearbitration(TypedDict, total=False): class Visa(TypedDict, total=False): + """The Visa-specific parameters for the dispute. + + Required if and only if `network` is `visa`. + """ + category: Required[Literal["chargeback", "merchant_prearbitration_decline", "user_prearbitration"]] """The category of the user submission. diff --git a/src/increase/types/card_iframe_url.py b/src/increase/types/card_iframe_url.py index e4da2319c..5449f0823 100644 --- a/src/increase/types/card_iframe_url.py +++ b/src/increase/types/card_iframe_url.py @@ -9,6 +9,8 @@ class CardIframeURL(BaseModel): + """An object containing the iframe URL for a Card.""" + expires_at: datetime """The time the iframe URL will expire.""" diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 35434edac..5f3c177da 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -152,6 +152,8 @@ class ElementCardAuthenticationChallengeAttempt(BaseModel): class ElementCardAuthenticationChallenge(BaseModel): + """Details about the challenge, if one was requested.""" + attempts: List[ElementCardAuthenticationChallengeAttempt] """Details about the challenge verification attempts, if any happened.""" @@ -180,6 +182,11 @@ class ElementCardAuthenticationChallenge(BaseModel): class ElementCardAuthentication(BaseModel): + """A Card Authentication object. + + This field will be present in the JSON response if and only if `category` is equal to `card_authentication`. Card Authentications are attempts to authenticate a transaction or a card with 3DS. + """ + id: str """The Card Authentication identifier.""" @@ -316,6 +323,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -331,6 +340,8 @@ class ElementCardAuthorizationAdditionalAmountsClinic(BaseModel): class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -346,6 +357,8 @@ class ElementCardAuthorizationAdditionalAmountsDental(BaseModel): class ElementCardAuthorizationAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -361,6 +374,8 @@ class ElementCardAuthorizationAdditionalAmountsOriginal(BaseModel): class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -376,6 +391,8 @@ class ElementCardAuthorizationAdditionalAmountsPrescription(BaseModel): class ElementCardAuthorizationAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -391,6 +408,10 @@ class ElementCardAuthorizationAdditionalAmountsSurcharge(BaseModel): class ElementCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -406,6 +427,8 @@ class ElementCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class ElementCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -421,6 +444,8 @@ class ElementCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardAuthorizationAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -436,6 +461,8 @@ class ElementCardAuthorizationAdditionalAmountsTransit(BaseModel): class ElementCardAuthorizationAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -451,6 +478,8 @@ class ElementCardAuthorizationAdditionalAmountsUnknown(BaseModel): class ElementCardAuthorizationAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -466,6 +495,10 @@ class ElementCardAuthorizationAdditionalAmountsVision(BaseModel): class ElementCardAuthorizationAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[ElementCardAuthorizationAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -500,10 +533,14 @@ class ElementCardAuthorizationAdditionalAmounts(BaseModel): class ElementCardAuthorizationNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -622,6 +659,8 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): class ElementCardAuthorizationNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -637,6 +676,8 @@ class ElementCardAuthorizationNetworkDetails(BaseModel): class ElementCardAuthorizationNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -664,6 +705,10 @@ class ElementCardAuthorizationNetworkIdentifiers(BaseModel): class ElementCardAuthorizationVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -675,6 +720,10 @@ class ElementCardAuthorizationVerificationCardVerificationCode(BaseModel): class ElementCardAuthorizationVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -714,6 +763,8 @@ class ElementCardAuthorizationVerificationCardholderAddress(BaseModel): class ElementCardAuthorizationVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: ElementCardAuthorizationVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -728,6 +779,11 @@ class ElementCardAuthorizationVerification(BaseModel): class ElementCardAuthorization(BaseModel): + """A Card Authorization object. + + This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction. + """ + id: str """The Card Authorization identifier.""" @@ -924,6 +980,11 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardAuthorizationExpiration(BaseModel): + """A Card Authorization Expiration object. + + This field will be present in the JSON response if and only if `category` is equal to `card_authorization_expiration`. Card Authorization Expirations are cancellations of authorizations that were never settled by the acquirer. + """ + id: str """The Card Authorization Expiration identifier.""" @@ -971,6 +1032,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardDeclineAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -986,6 +1049,8 @@ class ElementCardDeclineAdditionalAmountsClinic(BaseModel): class ElementCardDeclineAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1001,6 +1066,8 @@ class ElementCardDeclineAdditionalAmountsDental(BaseModel): class ElementCardDeclineAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -1016,6 +1083,8 @@ class ElementCardDeclineAdditionalAmountsOriginal(BaseModel): class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -1031,6 +1100,8 @@ class ElementCardDeclineAdditionalAmountsPrescription(BaseModel): class ElementCardDeclineAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -1046,6 +1117,10 @@ class ElementCardDeclineAdditionalAmountsSurcharge(BaseModel): class ElementCardDeclineAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -1061,6 +1136,8 @@ class ElementCardDeclineAdditionalAmountsTotalCumulative(BaseModel): class ElementCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -1076,6 +1153,8 @@ class ElementCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardDeclineAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1091,6 +1170,8 @@ class ElementCardDeclineAdditionalAmountsTransit(BaseModel): class ElementCardDeclineAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -1106,6 +1187,8 @@ class ElementCardDeclineAdditionalAmountsUnknown(BaseModel): class ElementCardDeclineAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1121,6 +1204,10 @@ class ElementCardDeclineAdditionalAmountsVision(BaseModel): class ElementCardDeclineAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[ElementCardDeclineAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -1155,10 +1242,14 @@ class ElementCardDeclineAdditionalAmounts(BaseModel): class ElementCardDeclineNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class ElementCardDeclineNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -1277,6 +1368,8 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): class ElementCardDeclineNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -1292,6 +1385,8 @@ class ElementCardDeclineNetworkDetails(BaseModel): class ElementCardDeclineNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -1319,6 +1414,10 @@ class ElementCardDeclineNetworkIdentifiers(BaseModel): class ElementCardDeclineVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -1330,6 +1429,10 @@ class ElementCardDeclineVerificationCardVerificationCode(BaseModel): class ElementCardDeclineVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -1369,6 +1472,8 @@ class ElementCardDeclineVerificationCardholderAddress(BaseModel): class ElementCardDeclineVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: ElementCardDeclineVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -1383,6 +1488,11 @@ class ElementCardDeclineVerification(BaseModel): class ElementCardDecline(BaseModel): + """A Card Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `card_decline`. + """ + id: str """The Card Decline identifier.""" @@ -1658,6 +1768,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardFinancialAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1673,6 +1785,8 @@ class ElementCardFinancialAdditionalAmountsClinic(BaseModel): class ElementCardFinancialAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1688,6 +1802,8 @@ class ElementCardFinancialAdditionalAmountsDental(BaseModel): class ElementCardFinancialAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -1703,6 +1819,8 @@ class ElementCardFinancialAdditionalAmountsOriginal(BaseModel): class ElementCardFinancialAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -1718,6 +1836,8 @@ class ElementCardFinancialAdditionalAmountsPrescription(BaseModel): class ElementCardFinancialAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -1733,6 +1853,10 @@ class ElementCardFinancialAdditionalAmountsSurcharge(BaseModel): class ElementCardFinancialAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -1748,6 +1872,8 @@ class ElementCardFinancialAdditionalAmountsTotalCumulative(BaseModel): class ElementCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -1763,6 +1889,8 @@ class ElementCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardFinancialAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1778,6 +1906,8 @@ class ElementCardFinancialAdditionalAmountsTransit(BaseModel): class ElementCardFinancialAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -1793,6 +1923,8 @@ class ElementCardFinancialAdditionalAmountsUnknown(BaseModel): class ElementCardFinancialAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -1808,6 +1940,10 @@ class ElementCardFinancialAdditionalAmountsVision(BaseModel): class ElementCardFinancialAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[ElementCardFinancialAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -1842,10 +1978,14 @@ class ElementCardFinancialAdditionalAmounts(BaseModel): class ElementCardFinancialNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class ElementCardFinancialNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -1964,6 +2104,8 @@ class ElementCardFinancialNetworkDetailsVisa(BaseModel): class ElementCardFinancialNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -1979,6 +2121,8 @@ class ElementCardFinancialNetworkDetails(BaseModel): class ElementCardFinancialNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -2006,6 +2150,10 @@ class ElementCardFinancialNetworkIdentifiers(BaseModel): class ElementCardFinancialVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -2017,6 +2165,10 @@ class ElementCardFinancialVerificationCardVerificationCode(BaseModel): class ElementCardFinancialVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -2056,6 +2208,8 @@ class ElementCardFinancialVerificationCardholderAddress(BaseModel): class ElementCardFinancialVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: ElementCardFinancialVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -2070,6 +2224,11 @@ class ElementCardFinancialVerification(BaseModel): class ElementCardFinancial(BaseModel): + """A Card Financial object. + + This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customers funds with the intent to later clear a transaction. + """ + id: str """The Card Financial identifier.""" @@ -2260,6 +2419,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -2287,6 +2448,11 @@ class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): class ElementCardFuelConfirmation(BaseModel): + """A Card Fuel Confirmation object. + + This field will be present in the JSON response if and only if `category` is equal to `card_fuel_confirmation`. Card Fuel Confirmations update the amount of a Card Authorization after a fuel pump transaction is completed. + """ + id: str """The Card Fuel Confirmation identifier.""" @@ -2343,6 +2509,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardIncrementAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -2358,6 +2526,8 @@ class ElementCardIncrementAdditionalAmountsClinic(BaseModel): class ElementCardIncrementAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -2373,6 +2543,8 @@ class ElementCardIncrementAdditionalAmountsDental(BaseModel): class ElementCardIncrementAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -2388,6 +2560,8 @@ class ElementCardIncrementAdditionalAmountsOriginal(BaseModel): class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -2403,6 +2577,8 @@ class ElementCardIncrementAdditionalAmountsPrescription(BaseModel): class ElementCardIncrementAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -2418,6 +2594,10 @@ class ElementCardIncrementAdditionalAmountsSurcharge(BaseModel): class ElementCardIncrementAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -2433,6 +2613,8 @@ class ElementCardIncrementAdditionalAmountsTotalCumulative(BaseModel): class ElementCardIncrementAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -2448,6 +2630,8 @@ class ElementCardIncrementAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardIncrementAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -2463,6 +2647,8 @@ class ElementCardIncrementAdditionalAmountsTransit(BaseModel): class ElementCardIncrementAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -2478,6 +2664,8 @@ class ElementCardIncrementAdditionalAmountsUnknown(BaseModel): class ElementCardIncrementAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -2493,6 +2681,10 @@ class ElementCardIncrementAdditionalAmountsVision(BaseModel): class ElementCardIncrementAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[ElementCardIncrementAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -2527,6 +2719,8 @@ class ElementCardIncrementAdditionalAmounts(BaseModel): class ElementCardIncrementNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -2554,6 +2748,11 @@ class ElementCardIncrementNetworkIdentifiers(BaseModel): class ElementCardIncrement(BaseModel): + """A Card Increment object. + + This field will be present in the JSON response if and only if `category` is equal to `card_increment`. Card Increments increase the pending amount of an authorized transaction. + """ + id: str """The Card Increment identifier.""" @@ -2656,6 +2855,11 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardRefundCashback(BaseModel): + """Cashback debited for this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + amount: str """The cashback amount given as a string containing a decimal number. @@ -2671,6 +2875,8 @@ class ElementCardRefundCashback(BaseModel): class ElementCardRefundInterchange(BaseModel): + """Interchange assessed as a part of this transaciton.""" + amount: str """ The interchange amount given as a string containing a decimal number in major @@ -2692,6 +2898,8 @@ class ElementCardRefundInterchange(BaseModel): class ElementCardRefundNetworkIdentifiers(BaseModel): + """Network-specific identifiers for this refund.""" + acquirer_business_id: str """ A network assigned business ID that identifies the acquirer that processed this @@ -2715,6 +2923,8 @@ class ElementCardRefundNetworkIdentifiers(BaseModel): class ElementCardRefundPurchaseDetailsCarRental(BaseModel): + """Fields specific to car rentals.""" + car_class_code: Optional[str] = None """Code indicating the vehicle's class.""" @@ -2802,6 +3012,8 @@ class ElementCardRefundPurchaseDetailsCarRental(BaseModel): class ElementCardRefundPurchaseDetailsLodging(BaseModel): + """Fields specific to lodging.""" + check_in_date: Optional[date] = None """Date the customer checked in.""" @@ -2948,6 +3160,8 @@ class ElementCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): class ElementCardRefundPurchaseDetailsTravelAncillary(BaseModel): + """Ancillary purchases in addition to the airfare.""" + connected_ticket_document_number: Optional[str] = None """ If this purchase has a connection or relationship to another purchase, such as a @@ -3009,6 +3223,8 @@ class ElementCardRefundPurchaseDetailsTravelTripLeg(BaseModel): class ElementCardRefundPurchaseDetailsTravel(BaseModel): + """Fields specific to travel.""" + ancillary: Optional[ElementCardRefundPurchaseDetailsTravelAncillary] = None """Ancillary purchases in addition to the airfare.""" @@ -3075,6 +3291,10 @@ class ElementCardRefundPurchaseDetailsTravel(BaseModel): class ElementCardRefundPurchaseDetails(BaseModel): + """ + Additional details about the card purchase, such as tax and industry-specific fields. + """ + car_rental: Optional[ElementCardRefundPurchaseDetailsCarRental] = None """Fields specific to car rentals.""" @@ -3122,6 +3342,11 @@ class ElementCardRefundPurchaseDetails(BaseModel): class ElementCardRefund(BaseModel): + """A Card Refund object. + + This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement an acquirer can also refund money directly to a card without relation to a transaction. + """ + id: str """The Card Refund identifier.""" @@ -3216,6 +3441,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardReversalNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -3243,6 +3470,11 @@ class ElementCardReversalNetworkIdentifiers(BaseModel): class ElementCardReversal(BaseModel): + """A Card Reversal object. + + This field will be present in the JSON response if and only if `category` is equal to `card_reversal`. Card Reversals cancel parts of or the entirety of an existing Card Authorization. + """ + id: str """The Card Reversal identifier.""" @@ -3373,6 +3605,11 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardSettlementCashback(BaseModel): + """Cashback earned on this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + amount: str """The cashback amount given as a string containing a decimal number. @@ -3388,6 +3625,8 @@ class ElementCardSettlementCashback(BaseModel): class ElementCardSettlementInterchange(BaseModel): + """Interchange assessed as a part of this transaction.""" + amount: str """ The interchange amount given as a string containing a decimal number in major @@ -3409,6 +3648,8 @@ class ElementCardSettlementInterchange(BaseModel): class ElementCardSettlementNetworkIdentifiers(BaseModel): + """Network-specific identifiers for this refund.""" + acquirer_business_id: str """ A network assigned business ID that identifies the acquirer that processed this @@ -3432,6 +3673,8 @@ class ElementCardSettlementNetworkIdentifiers(BaseModel): class ElementCardSettlementPurchaseDetailsCarRental(BaseModel): + """Fields specific to car rentals.""" + car_class_code: Optional[str] = None """Code indicating the vehicle's class.""" @@ -3519,6 +3762,8 @@ class ElementCardSettlementPurchaseDetailsCarRental(BaseModel): class ElementCardSettlementPurchaseDetailsLodging(BaseModel): + """Fields specific to lodging.""" + check_in_date: Optional[date] = None """Date the customer checked in.""" @@ -3665,6 +3910,8 @@ class ElementCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): class ElementCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + """Ancillary purchases in addition to the airfare.""" + connected_ticket_document_number: Optional[str] = None """ If this purchase has a connection or relationship to another purchase, such as a @@ -3726,6 +3973,8 @@ class ElementCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): class ElementCardSettlementPurchaseDetailsTravel(BaseModel): + """Fields specific to travel.""" + ancillary: Optional[ElementCardSettlementPurchaseDetailsTravelAncillary] = None """Ancillary purchases in addition to the airfare.""" @@ -3792,6 +4041,10 @@ class ElementCardSettlementPurchaseDetailsTravel(BaseModel): class ElementCardSettlementPurchaseDetails(BaseModel): + """ + Additional details about the card purchase, such as tax and industry-specific fields. + """ + car_rental: Optional[ElementCardSettlementPurchaseDetailsCarRental] = None """Fields specific to car rentals.""" @@ -3839,6 +4092,11 @@ class ElementCardSettlementPurchaseDetails(BaseModel): class ElementCardSettlementSurcharge(BaseModel): + """Surcharge amount details, if applicable. + + The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). + """ + amount: int """ The surcharge amount in the minor unit of the transaction's settlement currency. @@ -3852,6 +4110,11 @@ class ElementCardSettlementSurcharge(BaseModel): class ElementCardSettlement(BaseModel): + """A Card Settlement object. + + This field will be present in the JSON response if and only if `category` is equal to `card_settlement`. Card Settlements are card transactions that have cleared and settled. While a settlement is usually preceded by an authorization, an acquirer can also directly clear a transaction without first authorizing it. + """ + id: str """The Card Settlement identifier.""" @@ -3970,6 +4233,8 @@ def __getattr__(self, attr: str) -> object: ... class ElementCardValidationAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -3985,6 +4250,8 @@ class ElementCardValidationAdditionalAmountsClinic(BaseModel): class ElementCardValidationAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -4000,6 +4267,8 @@ class ElementCardValidationAdditionalAmountsDental(BaseModel): class ElementCardValidationAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -4015,6 +4284,8 @@ class ElementCardValidationAdditionalAmountsOriginal(BaseModel): class ElementCardValidationAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -4030,6 +4301,8 @@ class ElementCardValidationAdditionalAmountsPrescription(BaseModel): class ElementCardValidationAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -4045,6 +4318,10 @@ class ElementCardValidationAdditionalAmountsSurcharge(BaseModel): class ElementCardValidationAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -4060,6 +4337,8 @@ class ElementCardValidationAdditionalAmountsTotalCumulative(BaseModel): class ElementCardValidationAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -4075,6 +4354,8 @@ class ElementCardValidationAdditionalAmountsTotalHealthcare(BaseModel): class ElementCardValidationAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -4090,6 +4371,8 @@ class ElementCardValidationAdditionalAmountsTransit(BaseModel): class ElementCardValidationAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -4105,6 +4388,8 @@ class ElementCardValidationAdditionalAmountsUnknown(BaseModel): class ElementCardValidationAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -4120,6 +4405,10 @@ class ElementCardValidationAdditionalAmountsVision(BaseModel): class ElementCardValidationAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[ElementCardValidationAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -4154,10 +4443,14 @@ class ElementCardValidationAdditionalAmounts(BaseModel): class ElementCardValidationNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class ElementCardValidationNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -4276,6 +4569,8 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): class ElementCardValidationNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -4291,6 +4586,8 @@ class ElementCardValidationNetworkDetails(BaseModel): class ElementCardValidationNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -4318,6 +4615,10 @@ class ElementCardValidationNetworkIdentifiers(BaseModel): class ElementCardValidationVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -4329,6 +4630,10 @@ class ElementCardValidationVerificationCardVerificationCode(BaseModel): class ElementCardValidationVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -4368,6 +4673,8 @@ class ElementCardValidationVerificationCardholderAddress(BaseModel): class ElementCardValidationVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: ElementCardValidationVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -4382,6 +4689,11 @@ class ElementCardValidationVerification(BaseModel): class ElementCardValidation(BaseModel): + """An Inbound Card Validation object. + + This field will be present in the JSON response if and only if `category` is 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. + """ + id: str """The Card Validation identifier.""" @@ -4506,6 +4818,10 @@ def __getattr__(self, attr: str) -> object: ... class ElementOther(BaseModel): + """ + If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. + """ + pass @@ -4657,6 +4973,8 @@ class Element(BaseModel): class State(BaseModel): + """The summarized state of this card payment.""" + authorized_amount: int """The total authorized amount in the minor unit of the transaction's currency. @@ -4701,6 +5019,10 @@ class State(BaseModel): class CardPayment(BaseModel): + """ + Card Payments group together interactions related to a single card payment, such as an authorization and its corresponding settlement. + """ + id: str """The Card Payment identifier.""" diff --git a/src/increase/types/card_purchase_supplement.py b/src/increase/types/card_purchase_supplement.py index 6b063db88..03ef7997c 100644 --- a/src/increase/types/card_purchase_supplement.py +++ b/src/increase/types/card_purchase_supplement.py @@ -12,6 +12,8 @@ class Invoice(BaseModel): + """Invoice-level information about the payment.""" + discount_amount: Optional[int] = None """Discount given to cardholder.""" @@ -173,6 +175,10 @@ class LineItem(BaseModel): class CardPurchaseSupplement(BaseModel): + """ + Additional information about a card purchase (e.g., settlement or refund), such as level 3 line item data. + """ + id: str """The Card Purchase Supplement identifier.""" diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 7718cb64e..f4965f0ae 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -24,6 +24,10 @@ class Acceptance(BaseModel): + """ + If the transfer is accepted by the recipient bank, this will contain supplemental details. + """ + accepted_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -49,6 +53,10 @@ class Acceptance(BaseModel): class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -63,6 +71,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -77,21 +89,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -113,6 +133,10 @@ class CreatedBy(BaseModel): class Decline(BaseModel): + """ + If the transfer is rejected by the card network or the destination financial institution, this will contain supplemental details. + """ + declined_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -245,6 +269,11 @@ class Decline(BaseModel): class PresentmentAmount(BaseModel): + """The amount that was transferred. + + The receiving bank will have converted this to the cardholder's currency. The amount that is applied to your Increase account matches the currency of your account. + """ + currency: Literal[ "AFN", "EUR", @@ -579,6 +608,10 @@ class PresentmentAmount(BaseModel): class Submission(BaseModel): + """ + After the transfer is submitted to the card network, this will contain supplemental details. + """ + retrieval_reference_number: str """A 12-digit retrieval reference number that identifies the transfer. @@ -602,6 +635,8 @@ class Submission(BaseModel): class CardPushTransfer(BaseModel): + """Card Push Transfers send funds to a recipient's payment card in real-time.""" + id: str """The Card Push Transfer's identifier.""" diff --git a/src/increase/types/card_push_transfer_create_params.py b/src/increase/types/card_push_transfer_create_params.py index d3b9d7f34..705439db4 100644 --- a/src/increase/types/card_push_transfer_create_params.py +++ b/src/increase/types/card_push_transfer_create_params.py @@ -116,6 +116,11 @@ class CardPushTransferCreateParams(TypedDict, total=False): class PresentmentAmount(TypedDict, total=False): + """The amount to transfer. + + The receiving bank will convert this to the cardholder's currency. The amount that is applied to your Increase account matches the currency of your account. + """ + currency: Required[ Literal[ "AFN", diff --git a/src/increase/types/card_token.py b/src/increase/types/card_token.py index b7f1b4a09..d687979a0 100644 --- a/src/increase/types/card_token.py +++ b/src/increase/types/card_token.py @@ -9,6 +9,10 @@ class CardToken(BaseModel): + """ + Card Tokens represent a tokenized card number that can be used for Card Push Transfers and Card Validations. + """ + id: str """The Card Token's identifier.""" diff --git a/src/increase/types/card_token_capabilities.py b/src/increase/types/card_token_capabilities.py index 0b2543b60..ca37c383c 100644 --- a/src/increase/types/card_token_capabilities.py +++ b/src/increase/types/card_token_capabilities.py @@ -32,6 +32,10 @@ class Route(BaseModel): class CardTokenCapabilities(BaseModel): + """ + The capabilities of a Card Token describe whether the card can be used for specific operations, such as Card Push Transfers. The capabilities can change over time based on the issuing bank's configuration of the card range. + """ + routes: List[Route] """Each route represent a path e.g., a push transfer can take.""" diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index 85c1842d9..6fb581532 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -38,6 +38,8 @@ class CardUpdateParams(TypedDict, total=False): class BillingAddress(TypedDict, total=False): + """The card's updated billing address.""" + city: Required[str] """The city of the billing address.""" @@ -55,6 +57,10 @@ class BillingAddress(TypedDict, total=False): class DigitalWallet(TypedDict, total=False): + """ + The contact information used in the two-factor steps for digital wallet card creation. At least one field must be present to complete the digital wallet steps. + """ + digital_card_profile_id: str """The digital card profile assigned to this digital card.""" diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 3ce823044..3d8f45370 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -21,6 +21,10 @@ class Acceptance(BaseModel): + """ + If the validation is accepted by the recipient bank, this will contain supplemental details. + """ + accepted_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -95,21 +99,29 @@ class Acceptance(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the validation, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -131,6 +143,10 @@ class CreatedBy(BaseModel): class Decline(BaseModel): + """ + If the validation is rejected by the card network or the destination financial institution, this will contain supplemental details. + """ + declined_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -263,6 +279,10 @@ class Decline(BaseModel): class Submission(BaseModel): + """ + After the validation is submitted to the card network, this will contain supplemental details. + """ + retrieval_reference_number: str """A 12-digit retrieval reference number that identifies the validation. @@ -283,6 +303,10 @@ class Submission(BaseModel): class CardValidation(BaseModel): + """ + Card Validations are used to validate a card and its cardholder before sending funds to or pulling funds from a card. + """ + id: str """The Card Validation's identifier.""" diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index dbbc7091a..4b84fa963 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -19,6 +19,10 @@ class DepositAcceptance(BaseModel): + """ + Once your deposit is successfully parsed and accepted by Increase, this will contain details of the parsed check. + """ + account_number: str """The account number printed on the check. @@ -75,6 +79,10 @@ def __getattr__(self, attr: str) -> object: ... class DepositRejection(BaseModel): + """ + If your deposit is rejected by Increase, this will contain details as to why it was rejected. + """ + amount: int """The rejected amount in the minor unit of check's currency. @@ -146,6 +154,10 @@ def __getattr__(self, attr: str) -> object: ... class DepositReturn(BaseModel): + """ + If your deposit is returned, this will contain details as to why it was returned. + """ + amount: int """The returned amount in USD cents.""" @@ -261,6 +273,11 @@ def __getattr__(self, attr: str) -> object: ... class DepositSubmission(BaseModel): + """After the check is parsed, it is submitted to the Check21 network for processing. + + This will contain details of the submission. + """ + back_file_id: str """ The ID for the File containing the check back image that was submitted to the @@ -282,6 +299,11 @@ class DepositSubmission(BaseModel): class InboundFundsHold(BaseModel): + """Increase will sometimes hold the funds for Check Deposits. + + If funds are held, this sub-object will contain details of the hold. + """ + amount: int """The held amount in the minor unit of the account's currency. @@ -344,6 +366,8 @@ def __getattr__(self, attr: str) -> object: ... class CheckDeposit(BaseModel): + """Check Deposits allow you to deposit images of paper checks into your account.""" + id: str """The deposit's identifier.""" diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index a9dfb1c5d..b9bb58b99 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -30,6 +30,10 @@ class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -44,6 +48,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -58,21 +66,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -94,6 +110,10 @@ class CreatedBy(BaseModel): class Mailing(BaseModel): + """ + If the check has been mailed by Increase, this will contain details of the shipment. + """ + image_id: Optional[str] = None """ The ID of the file corresponding to an image of the check that was mailed, if @@ -111,6 +131,8 @@ class Mailing(BaseModel): class PhysicalCheckMailingAddress(BaseModel): + """Details for where Increase will mail the check.""" + city: Optional[str] = None """The city of the check's destination.""" @@ -142,6 +164,8 @@ class PhysicalCheckPayer(BaseModel): class PhysicalCheckReturnAddress(BaseModel): + """The return address to be printed on the check.""" + city: Optional[str] = None """The city of the check's destination.""" @@ -182,6 +206,11 @@ class PhysicalCheckTrackingUpdate(BaseModel): class PhysicalCheck(BaseModel): + """Details relating to the physical check that Increase will print and mail. + + Will be present if and only if `fulfillment_method` is equal to `physical_check`. + """ + attachment_file_id: Optional[str] = None """The ID of the file for the check attachment.""" @@ -240,6 +269,10 @@ def __getattr__(self, attr: str) -> object: ... class StopPaymentRequest(BaseModel): + """ + After a stop-payment is requested on the check, this will contain supplemental details. + """ + reason: Literal[ "mail_delivery_failed", "rejected_by_increase", "not_authorized", "valid_until_date_passed", "unknown" ] @@ -280,6 +313,11 @@ def __getattr__(self, attr: str) -> object: ... class SubmissionSubmittedAddress(BaseModel): + """The address we submitted to the printer. + + This is what is physically printed on the check. + """ + city: str """The submitted address city.""" @@ -300,6 +338,8 @@ class SubmissionSubmittedAddress(BaseModel): class Submission(BaseModel): + """After the transfer is submitted, this will contain supplemental details.""" + address_correction_action: Literal["none", "standardization", "standardization_with_address_change", "error"] """ Per USPS requirements, Increase will standardize the address to USPS standards @@ -338,6 +378,11 @@ def __getattr__(self, attr: str) -> object: ... class ThirdParty(BaseModel): + """Details relating to the custom fulfillment you will perform. + + Will be present if and only if `fulfillment_method` is equal to `third_party`. + """ + recipient_name: Optional[str] = None """The name that you will print on the check.""" @@ -355,6 +400,10 @@ def __getattr__(self, attr: str) -> object: ... class CheckTransfer(BaseModel): + """ + Check Transfers move funds from your Increase account by mailing a physical check. + """ + id: str """The Check transfer's identifier.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 89ea3b122..44a617e04 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -88,6 +88,8 @@ class CheckTransferCreateParams(TypedDict, total=False): class PhysicalCheckMailingAddress(TypedDict, total=False): + """Details for where Increase will mail the check.""" + city: Required[str] """The city component of the check's destination address.""" @@ -123,6 +125,11 @@ class PhysicalCheckPayer(TypedDict, total=False): class PhysicalCheckReturnAddress(TypedDict, total=False): + """The return address to be printed on the check. + + If omitted this will default to an Increase-owned address that will mark checks as delivery failed and shred them. + """ + city: Required[str] """The city of the return address.""" @@ -143,6 +150,11 @@ class PhysicalCheckReturnAddress(TypedDict, total=False): class PhysicalCheckTyped(TypedDict, total=False): + """Details relating to the physical check that Increase will print and mail. + + This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. + """ + mailing_address: Required[PhysicalCheckMailingAddress] """Details for where Increase will mail the check.""" @@ -207,6 +219,11 @@ class PhysicalCheckTyped(TypedDict, total=False): class ThirdPartyTyped(TypedDict, total=False): + """Details relating to the custom fulfillment you will perform. + + This is required if `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. + """ + recipient_name: str """The pay-to name you will print on the check. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index ba7b3dcbd..e37adcfa9 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -41,6 +41,11 @@ class SourceACHDecline(BaseModel): + """An ACH Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `ach_decline`. + """ + id: str """The ACH Decline's identifier.""" @@ -140,6 +145,8 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardDeclineAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -155,6 +162,8 @@ class SourceCardDeclineAdditionalAmountsClinic(BaseModel): class SourceCardDeclineAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -170,6 +179,8 @@ class SourceCardDeclineAdditionalAmountsDental(BaseModel): class SourceCardDeclineAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -185,6 +196,8 @@ class SourceCardDeclineAdditionalAmountsOriginal(BaseModel): class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -200,6 +213,8 @@ class SourceCardDeclineAdditionalAmountsPrescription(BaseModel): class SourceCardDeclineAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -215,6 +230,10 @@ class SourceCardDeclineAdditionalAmountsSurcharge(BaseModel): class SourceCardDeclineAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -230,6 +249,8 @@ class SourceCardDeclineAdditionalAmountsTotalCumulative(BaseModel): class SourceCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -245,6 +266,8 @@ class SourceCardDeclineAdditionalAmountsTotalHealthcare(BaseModel): class SourceCardDeclineAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -260,6 +283,8 @@ class SourceCardDeclineAdditionalAmountsTransit(BaseModel): class SourceCardDeclineAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -275,6 +300,8 @@ class SourceCardDeclineAdditionalAmountsUnknown(BaseModel): class SourceCardDeclineAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -290,6 +317,10 @@ class SourceCardDeclineAdditionalAmountsVision(BaseModel): class SourceCardDeclineAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[SourceCardDeclineAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -324,10 +355,14 @@ class SourceCardDeclineAdditionalAmounts(BaseModel): class SourceCardDeclineNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class SourceCardDeclineNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -446,6 +481,8 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): class SourceCardDeclineNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -461,6 +498,8 @@ class SourceCardDeclineNetworkDetails(BaseModel): class SourceCardDeclineNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -488,6 +527,10 @@ class SourceCardDeclineNetworkIdentifiers(BaseModel): class SourceCardDeclineVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -499,6 +542,10 @@ class SourceCardDeclineVerificationCardVerificationCode(BaseModel): class SourceCardDeclineVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -538,6 +585,8 @@ class SourceCardDeclineVerificationCardholderAddress(BaseModel): class SourceCardDeclineVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: SourceCardDeclineVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -552,6 +601,11 @@ class SourceCardDeclineVerification(BaseModel): class SourceCardDecline(BaseModel): + """A Card Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `card_decline`. + """ + id: str """The Card Decline identifier.""" @@ -827,6 +881,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckDecline(BaseModel): + """A Check Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `check_decline`. + """ + amount: int """The declined amount in USD cents.""" @@ -917,6 +976,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckDepositRejection(BaseModel): + """A Check Deposit Rejection object. + + This field will be present in the JSON response if and only if `category` is equal to `check_deposit_rejection`. + """ + amount: int """The rejected amount in the minor unit of check's currency. @@ -988,6 +1052,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundFednowTransferDecline(BaseModel): + """An Inbound FedNow Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_fednow_transfer_decline`. + """ + reason: Literal[ "account_number_canceled", "account_number_disabled", @@ -1024,6 +1093,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundRealTimePaymentsTransferDecline(BaseModel): + """An Inbound Real-Time Payments Transfer Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_real_time_payments_transfer_decline`. + """ + amount: int """The declined amount in the minor unit of the destination account currency. @@ -1081,10 +1155,19 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): class SourceOther(BaseModel): + """ + If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. + """ + pass class SourceWireDecline(BaseModel): + """A Wire Decline object. + + This field will be present in the JSON response if and only if `category` is equal to `wire_decline`. + """ + inbound_wire_transfer_id: str """The identifier of the Inbound Wire Transfer that was declined.""" @@ -1121,6 +1204,10 @@ def __getattr__(self, attr: str) -> object: ... class Source(BaseModel): + """ + This is an object giving more details on the network-level event that caused the Declined Transaction. For example, for a card transaction this lists the merchant's industry and location. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future. + """ + ach_decline: Optional[SourceACHDecline] = None """An ACH Decline object. @@ -1223,6 +1310,10 @@ def __getattr__(self, attr: str) -> object: ... class DeclinedTransaction(BaseModel): + """ + Declined Transactions are refused additions and removals of money from your bank account. For example, Declined Transactions are caused when your Account has an insufficient balance or your Limits are triggered. + """ + id: str """The Declined Transaction identifier.""" diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py index 338be2d3b..9c5a9a596 100644 --- a/src/increase/types/digital_card_profile.py +++ b/src/increase/types/digital_card_profile.py @@ -10,6 +10,8 @@ class TextColor(BaseModel): + """The Card's text color, specified as an RGB triple.""" + blue: int """The value of the blue channel in the RGB color.""" @@ -21,6 +23,10 @@ class TextColor(BaseModel): class DigitalCardProfile(BaseModel): + """ + This contains artwork and metadata relating to a Card's appearance in digital wallet apps like Apple Pay and Google Pay. For more information, see our guide on [digital card artwork](https://increase.com/documentation/card-art). + """ + id: str """The Card Profile identifier.""" diff --git a/src/increase/types/digital_card_profile_clone_params.py b/src/increase/types/digital_card_profile_clone_params.py index 5945deea1..a1469bc8f 100644 --- a/src/increase/types/digital_card_profile_clone_params.py +++ b/src/increase/types/digital_card_profile_clone_params.py @@ -37,6 +37,8 @@ class DigitalCardProfileCloneParams(TypedDict, total=False): class TextColor(TypedDict, total=False): + """The Card's text color, specified as an RGB triple. The default is white.""" + blue: Required[int] """The value of the blue channel in the RGB color.""" diff --git a/src/increase/types/digital_card_profile_create_params.py b/src/increase/types/digital_card_profile_create_params.py index 6da1fd7c5..f3d2bdb8b 100644 --- a/src/increase/types/digital_card_profile_create_params.py +++ b/src/increase/types/digital_card_profile_create_params.py @@ -37,6 +37,8 @@ class DigitalCardProfileCreateParams(TypedDict, total=False): class TextColor(TypedDict, total=False): + """The Card's text color, specified as an RGB triple. The default is white.""" + blue: Required[int] """The value of the blue channel in the RGB color.""" diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py index 034a31788..7fd051f3d 100644 --- a/src/increase/types/digital_wallet_token.py +++ b/src/increase/types/digital_wallet_token.py @@ -10,11 +10,15 @@ class Cardholder(BaseModel): + """The cardholder information given when the Digital Wallet Token was created.""" + name: Optional[str] = None """Name of the cardholder, for example "John Smith".""" class Device(BaseModel): + """The device that was used to create the Digital Wallet Token.""" + device_type: Optional[ Literal[ "unknown", @@ -70,6 +74,10 @@ class Update(BaseModel): class DigitalWalletToken(BaseModel): + """ + A Digital Wallet Token is created when a user adds a Card to their Apple Pay or Google Pay app. The Digital Wallet Token can be used for purchases just like a Card. + """ + id: str """The Digital Wallet Token identifier.""" diff --git a/src/increase/types/document.py b/src/increase/types/document.py index 1c6c7f33f..0e2604ffc 100644 --- a/src/increase/types/document.py +++ b/src/increase/types/document.py @@ -10,16 +10,24 @@ class AccountVerificationLetter(BaseModel): + """Properties of an account verification letter document.""" + account_number_id: str """The identifier of the Account Number the document was generated for.""" class FundingInstructions(BaseModel): + """Properties of a funding instructions document.""" + account_number_id: str """The identifier of the Account Number the document was generated for.""" class Document(BaseModel): + """ + Increase generates certain documents / forms automatically for your application; they can be listed here. + """ + id: str """The Document identifier.""" diff --git a/src/increase/types/document_create_params.py b/src/increase/types/document_create_params.py index 986255c7a..61dfa4d6b 100644 --- a/src/increase/types/document_create_params.py +++ b/src/increase/types/document_create_params.py @@ -33,6 +33,11 @@ class DocumentCreateParams(TypedDict, total=False): class AccountVerificationLetter(TypedDict, total=False): + """An account verification letter. + + Required if and only if `category` is `account_verification_letter`. + """ + account_number_id: Required[str] """The Account Number the bank letter should be generated for.""" @@ -41,5 +46,10 @@ class AccountVerificationLetter(TypedDict, total=False): class FundingInstructions(TypedDict, total=False): + """Funding instructions. + + Required if and only if `category` is `funding_instructions`. + """ + account_number_id: Required[str] """The Account Number the funding instructions should be generated for.""" diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 3415982ef..b63a9c032 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -42,6 +42,8 @@ class CorporationAddress(BaseModel): + """The corporation's address.""" + city: str """The city of the address.""" @@ -62,6 +64,8 @@ class CorporationAddress(BaseModel): class CorporationBeneficialOwnerIndividualAddress(BaseModel): + """The person's address.""" + city: Optional[str] = None """The city, district, town, or village of the address.""" @@ -85,6 +89,8 @@ class CorporationBeneficialOwnerIndividualAddress(BaseModel): class CorporationBeneficialOwnerIndividualIdentification(BaseModel): + """A means of verifying the person's identity.""" + method: Literal[ "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" ] @@ -118,6 +124,8 @@ def __getattr__(self, attr: str) -> object: ... class CorporationBeneficialOwnerIndividual(BaseModel): + """Personal details for the beneficial owner.""" + address: CorporationBeneficialOwnerIndividualAddress """The person's address.""" @@ -152,6 +160,11 @@ class CorporationBeneficialOwner(BaseModel): class Corporation(BaseModel): + """Details of the corporation entity. + + Will be present if `structure` is equal to `corporation`. + """ + address: CorporationAddress """The corporation's address.""" @@ -184,6 +197,8 @@ class Corporation(BaseModel): class GovernmentAuthorityAddress(BaseModel): + """The government authority's address.""" + city: str """The city of the address.""" @@ -212,6 +227,11 @@ class GovernmentAuthorityAuthorizedPerson(BaseModel): class GovernmentAuthority(BaseModel): + """Details of the government authority entity. + + Will be present if `structure` is equal to `government_authority`. + """ + address: GovernmentAuthorityAddress """The government authority's address.""" @@ -238,6 +258,8 @@ class GovernmentAuthority(BaseModel): class JointIndividualAddress(BaseModel): + """The person's address.""" + city: str """The city of the address.""" @@ -258,6 +280,8 @@ class JointIndividualAddress(BaseModel): class JointIndividualIdentification(BaseModel): + """A means of verifying the person's identity.""" + method: Literal[ "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" ] @@ -305,6 +329,11 @@ class JointIndividual(BaseModel): class Joint(BaseModel): + """Details of the joint entity. + + Will be present if `structure` is equal to `joint`. + """ + individuals: List[JointIndividual] """The two individuals that share control of the entity.""" @@ -313,6 +342,8 @@ class Joint(BaseModel): class NaturalPersonAddress(BaseModel): + """The person's address.""" + city: str """The city of the address.""" @@ -333,6 +364,8 @@ class NaturalPersonAddress(BaseModel): class NaturalPersonIdentification(BaseModel): + """A means of verifying the person's identity.""" + method: Literal[ "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" ] @@ -366,6 +399,11 @@ def __getattr__(self, attr: str) -> object: ... class NaturalPerson(BaseModel): + """Details of the natural person entity. + + Will be present if `structure` is equal to `natural_person`. + """ + address: NaturalPersonAddress """The person's address.""" @@ -380,6 +418,10 @@ class NaturalPerson(BaseModel): class RiskRating(BaseModel): + """ + An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + """ + rated_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk @@ -396,6 +438,10 @@ class RiskRating(BaseModel): class ThirdPartyVerification(BaseModel): + """ + If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. + """ + reference: str """The reference identifier for the third party verification.""" @@ -409,6 +455,8 @@ class ThirdPartyVerification(BaseModel): class TrustAddress(BaseModel): + """The trust's address.""" + city: str """The city of the address.""" @@ -429,6 +477,8 @@ class TrustAddress(BaseModel): class TrustGrantorAddress(BaseModel): + """The person's address.""" + city: str """The city of the address.""" @@ -449,6 +499,8 @@ class TrustGrantorAddress(BaseModel): class TrustGrantorIdentification(BaseModel): + """A means of verifying the person's identity.""" + method: Literal[ "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" ] @@ -482,6 +534,8 @@ def __getattr__(self, attr: str) -> object: ... class TrustGrantor(BaseModel): + """The grantor of the trust. Will be present if the `category` is `revocable`.""" + address: TrustGrantorAddress """The person's address.""" @@ -496,6 +550,8 @@ class TrustGrantor(BaseModel): class TrustTrusteeIndividualAddress(BaseModel): + """The person's address.""" + city: str """The city of the address.""" @@ -516,6 +572,8 @@ class TrustTrusteeIndividualAddress(BaseModel): class TrustTrusteeIndividualIdentification(BaseModel): + """A means of verifying the person's identity.""" + method: Literal[ "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" ] @@ -549,6 +607,11 @@ def __getattr__(self, attr: str) -> object: ... class TrustTrusteeIndividual(BaseModel): + """The individual trustee of the trust. + + Will be present if the trustee's `structure` is equal to `individual`. + """ + address: TrustTrusteeIndividualAddress """The person's address.""" @@ -577,6 +640,11 @@ class TrustTrustee(BaseModel): class Trust(BaseModel): + """Details of the trust entity. + + Will be present if `structure` is equal to `trust`. + """ + address: TrustAddress """The trust's address.""" @@ -610,6 +678,11 @@ class Trust(BaseModel): class Entity(BaseModel): + """Entities are the legal entities that own accounts. + + They can be people, corporations, partnerships, government authorities, or trusts. + """ + id: str """The entity's identifier.""" diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index 88feb4d64..627979061 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -29,6 +29,11 @@ class EntityCreateBeneficialOwnerParams(TypedDict, total=False): class BeneficialOwnerIndividualAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city, district, town, or village of the address.""" @@ -52,6 +57,11 @@ class BeneficialOwnerIndividualAddress(TypedDict, total=False): class BeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -66,6 +76,11 @@ class BeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=Fal class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -89,6 +104,11 @@ class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -103,6 +123,8 @@ class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -153,6 +175,8 @@ class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): class BeneficialOwnerIndividual(TypedDict, total=False): + """Personal details for the beneficial owner.""" + address: Required[BeneficialOwnerIndividualAddress] """The individual's physical address. @@ -178,6 +202,10 @@ class BeneficialOwnerIndividual(TypedDict, total=False): class BeneficialOwnerTyped(TypedDict, total=False): + """ + The identifying details of anyone controlling or owning 25% or more of the corporation. + """ + individual: Required[BeneficialOwnerIndividual] """Personal details for the beneficial owner.""" diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 9e05147e4..182479f22 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -120,6 +120,11 @@ class EntityCreateParams(TypedDict, total=False): class CorporationAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -140,6 +145,11 @@ class CorporationAddress(TypedDict, total=False): class CorporationBeneficialOwnerIndividualAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city, district, town, or village of the address.""" @@ -163,6 +173,11 @@ class CorporationBeneficialOwnerIndividualAddress(TypedDict, total=False): class CorporationBeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -177,6 +192,11 @@ class CorporationBeneficialOwnerIndividualIdentificationDriversLicense(TypedDict class CorporationBeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -200,6 +220,11 @@ class CorporationBeneficialOwnerIndividualIdentificationOther(TypedDict, total=F class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -214,6 +239,8 @@ class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, tota class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -264,6 +291,8 @@ class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=F class CorporationBeneficialOwnerIndividual(TypedDict, total=False): + """Personal details for the beneficial owner.""" + address: Required[CorporationBeneficialOwnerIndividualAddress] """The individual's physical address. @@ -307,6 +336,11 @@ class CorporationBeneficialOwnerTyped(TypedDict, total=False): class Corporation(TypedDict, total=False): + """Details of the corporation entity to create. + + Required if `structure` is equal to `corporation`. + """ + address: Required[CorporationAddress] """The entity's physical address. @@ -362,6 +396,11 @@ class Corporation(TypedDict, total=False): class GovernmentAuthorityAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -387,6 +426,11 @@ class GovernmentAuthorityAuthorizedPerson(TypedDict, total=False): class GovernmentAuthority(TypedDict, total=False): + """Details of the Government Authority entity to create. + + Required if `structure` is equal to `government_authority`. + """ + address: Required[GovernmentAuthorityAddress] """The entity's physical address. @@ -416,6 +460,11 @@ class GovernmentAuthority(TypedDict, total=False): class JointIndividualAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -436,6 +485,11 @@ class JointIndividualAddress(TypedDict, total=False): class JointIndividualIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -450,6 +504,11 @@ class JointIndividualIdentificationDriversLicense(TypedDict, total=False): class JointIndividualIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -473,6 +532,11 @@ class JointIndividualIdentificationOther(TypedDict, total=False): class JointIndividualIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -487,6 +551,8 @@ class JointIndividualIdentificationPassport(TypedDict, total=False): class JointIndividualIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -560,11 +626,21 @@ class JointIndividual(TypedDict, total=False): class Joint(TypedDict, total=False): + """Details of the joint entity to create. + + Required if `structure` is equal to `joint`. + """ + individuals: Required[Iterable[JointIndividual]] """The two individuals that share control of the entity.""" class NaturalPersonAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -585,6 +661,11 @@ class NaturalPersonAddress(TypedDict, total=False): class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -599,6 +680,11 @@ class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): class NaturalPersonIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -622,6 +708,11 @@ class NaturalPersonIdentificationOther(TypedDict, total=False): class NaturalPersonIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -636,6 +727,8 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False): class NaturalPersonIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -684,6 +777,11 @@ class NaturalPersonIdentificationTyped(TypedDict, total=False): class NaturalPerson(TypedDict, total=False): + """Details of the natural person entity to create. + + Required if `structure` is equal to `natural_person`. Natural people entities should be submitted with `social_security_number` or `individual_taxpayer_identification_number` identification methods. + """ + address: Required[NaturalPersonAddress] """The individual's physical address. @@ -709,6 +807,10 @@ class NaturalPerson(TypedDict, total=False): class RiskRating(TypedDict, total=False): + """ + An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + """ + rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk @@ -730,6 +832,10 @@ class SupplementalDocument(TypedDict, total=False): class ThirdPartyVerification(TypedDict, total=False): + """ + If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. + """ + reference: Required[str] """The reference identifier for the third party verification.""" @@ -743,6 +849,11 @@ class ThirdPartyVerification(TypedDict, total=False): class TrustAddress(TypedDict, total=False): + """The trust's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -763,6 +874,11 @@ class TrustAddress(TypedDict, total=False): class TrustTrusteeIndividualAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -783,6 +899,11 @@ class TrustTrusteeIndividualAddress(TypedDict, total=False): class TrustTrusteeIndividualIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -797,6 +918,11 @@ class TrustTrusteeIndividualIdentificationDriversLicense(TypedDict, total=False) class TrustTrusteeIndividualIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -820,6 +946,11 @@ class TrustTrusteeIndividualIdentificationOther(TypedDict, total=False): class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -834,6 +965,8 @@ class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -882,6 +1015,11 @@ class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False): class TrustTrusteeIndividual(TypedDict, total=False): + """Details of the individual trustee. + + Within the trustee object, this is required if `structure` is equal to `individual`. + """ + address: Required[TrustTrusteeIndividualAddress] """The individual's physical address. @@ -922,6 +1060,11 @@ class TrustTrustee(TypedDict, total=False): class TrustGrantorAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -942,6 +1085,11 @@ class TrustGrantorAddress(TypedDict, total=False): class TrustGrantorIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] """The driver's license's expiration date in YYYY-MM-DD format.""" @@ -956,6 +1104,11 @@ class TrustGrantorIdentificationDriversLicense(TypedDict, total=False): class TrustGrantorIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -979,6 +1132,11 @@ class TrustGrantorIdentificationOther(TypedDict, total=False): class TrustGrantorIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the @@ -993,6 +1151,8 @@ class TrustGrantorIdentificationPassport(TypedDict, total=False): class TrustGrantorIdentificationTyped(TypedDict, total=False): + """A means of verifying the person's identity.""" + method: Required[ Literal[ "social_security_number", @@ -1041,6 +1201,8 @@ class TrustGrantorIdentificationTyped(TypedDict, total=False): class TrustGrantor(TypedDict, total=False): + """The grantor of the trust. Required if `category` is equal to `revocable`.""" + address: Required[TrustGrantorAddress] """The individual's physical address. @@ -1066,6 +1228,11 @@ class TrustGrantor(TypedDict, total=False): class Trust(TypedDict, total=False): + """Details of the trust entity to create. + + Required if `structure` is equal to `trust`. + """ + address: Required[TrustAddress] """The trust's physical address. diff --git a/src/increase/types/entity_supplemental_document.py b/src/increase/types/entity_supplemental_document.py index 695107f9d..fcf8fbbd2 100644 --- a/src/increase/types/entity_supplemental_document.py +++ b/src/increase/types/entity_supplemental_document.py @@ -10,6 +10,10 @@ class EntitySupplementalDocument(BaseModel): + """ + Supplemental Documents are uploaded files connected to an Entity during onboarding. + """ + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the diff --git a/src/increase/types/entity_update_address_params.py b/src/increase/types/entity_update_address_params.py index 0b2ede59b..c5fac648b 100644 --- a/src/increase/types/entity_update_address_params.py +++ b/src/increase/types/entity_update_address_params.py @@ -16,6 +16,11 @@ class EntityUpdateAddressParams(TypedDict, total=False): class Address(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py index bbf846143..5848cc86c 100644 --- a/src/increase/types/entity_update_beneficial_owner_address_params.py +++ b/src/increase/types/entity_update_beneficial_owner_address_params.py @@ -22,6 +22,11 @@ class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): class Address(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city, district, town, or village of the address.""" diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 28b57a7e8..4da1dbf9b 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -74,6 +74,11 @@ class EntityUpdateParams(TypedDict, total=False): class CorporationAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -94,6 +99,11 @@ class CorporationAddress(TypedDict, total=False): class Corporation(TypedDict, total=False): + """Details of the corporation entity to update. + + If you specify this parameter and the entity is not a corporation, the request will fail. + """ + address: CorporationAddress """The entity's physical address. @@ -113,6 +123,11 @@ class Corporation(TypedDict, total=False): class GovernmentAuthorityAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -133,6 +148,11 @@ class GovernmentAuthorityAddress(TypedDict, total=False): class GovernmentAuthority(TypedDict, total=False): + """Details of the government authority entity to update. + + If you specify this parameter and the entity is not a government authority, the request will fail. + """ + address: GovernmentAuthorityAddress """The entity's physical address. @@ -144,6 +164,11 @@ class GovernmentAuthority(TypedDict, total=False): class NaturalPersonAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -164,6 +189,11 @@ class NaturalPersonAddress(TypedDict, total=False): class NaturalPerson(TypedDict, total=False): + """Details of the natural person entity to update. + + If you specify this parameter and the entity is not a natural person, the request will fail. + """ + address: NaturalPersonAddress """The entity's physical address. @@ -175,6 +205,10 @@ class NaturalPerson(TypedDict, total=False): class RiskRating(TypedDict, total=False): + """ + An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + """ + rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the risk @@ -191,6 +225,10 @@ class RiskRating(TypedDict, total=False): class ThirdPartyVerification(TypedDict, total=False): + """ + If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. + """ + reference: Required[str] """The reference identifier for the third party verification.""" @@ -204,6 +242,11 @@ class ThirdPartyVerification(TypedDict, total=False): class TrustAddress(TypedDict, total=False): + """The entity's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + city: Required[str] """The city of the address.""" @@ -224,6 +267,11 @@ class TrustAddress(TypedDict, total=False): class Trust(TypedDict, total=False): + """Details of the trust entity to update. + + If you specify this parameter and the entity is not a trust, the request will fail. + """ + address: TrustAddress """The entity's physical address. diff --git a/src/increase/types/event.py b/src/increase/types/event.py index a0593a368..e040c26e1 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -9,6 +9,11 @@ class Event(BaseModel): + """Events are records of things that happened to objects at Increase. + + Events are accessible via the List Events endpoint and can be delivered to your application via webhooks. For more information, see our [webhooks guide](https://increase.com/documentation/webhooks). + """ + id: str """The Event identifier.""" diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 522784bc1..4fa59584f 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -10,6 +10,11 @@ class EventSubscription(BaseModel): + """Webhooks are event notifications we send to you by HTTPS POST requests. + + Event Subscriptions are how you configure your application to listen for them. You can create an Event Subscription through your [developer dashboard](https://dashboard.increase.com/developers/webhooks) or the API. For more information, see our [webhooks guide](https://increase.com/documentation/webhooks). + """ + id: str """The event subscription identifier.""" diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 350be3956..e8a36d78b 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -10,6 +10,11 @@ class Export(BaseModel): + """Exports are batch summaries of your Increase data. + + You can make them from the API or dashboard. Since they can take a while, they are generated asynchronously. We send a webhook when they are ready. For more information, please read our [Exports documentation](https://increase.com/documentation/exports). + """ + id: str """The Export identifier.""" diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index b9733fd56..54e5adb30 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -97,6 +97,11 @@ class ExportCreateParams(TypedDict, total=False): class AccountStatementBai2(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `account_statement_bai2`. + """ + account_id: str """The Account to create a BAI2 report for. @@ -119,6 +124,8 @@ class AccountStatementBai2(TypedDict, total=False): class AccountStatementOfxCreatedAt(TypedDict, total=False): + """Filter results by time range on the `created_at` attribute.""" + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -145,6 +152,11 @@ class AccountStatementOfxCreatedAt(TypedDict, total=False): class AccountStatementOfx(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `account_statement_ofx`. + """ + account_id: Required[str] """The Account to create a statement for.""" @@ -153,6 +165,8 @@ class AccountStatementOfx(TypedDict, total=False): class BalanceCsvCreatedAt(TypedDict, total=False): + """Filter results by time range on the `created_at` attribute.""" + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -179,6 +193,11 @@ class BalanceCsvCreatedAt(TypedDict, total=False): class BalanceCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `balance_csv`. + """ + account_id: str """Filter exported Transactions to the specified Account.""" @@ -190,6 +209,8 @@ class BalanceCsv(TypedDict, total=False): class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): + """Filter results by time range on the `created_at` attribute.""" + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -216,6 +237,11 @@ class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): class BookkeepingAccountBalanceCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `bookkeeping_account_balance_csv`. + """ + bookkeeping_account_id: str """Filter exported Transactions to the specified Bookkeeping Account.""" @@ -233,15 +259,24 @@ class BookkeepingAccountBalanceCsv(TypedDict, total=False): class EntityCsvStatus(_EntityCsvStatusReservedKeywords, total=False): + """Entity statuses to filter by.""" + pass class EntityCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `entity_csv`. + """ + status: EntityCsvStatus """Entity statuses to filter by.""" class TransactionCsvCreatedAt(TypedDict, total=False): + """Filter results by time range on the `created_at` attribute.""" + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) @@ -268,6 +303,11 @@ class TransactionCsvCreatedAt(TypedDict, total=False): class TransactionCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `transaction_csv`. + """ + account_id: str """Filter exported Transactions to the specified Account.""" @@ -279,4 +319,9 @@ class TransactionCsv(TypedDict, total=False): class VendorCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `vendor_csv`. + """ + pass diff --git a/src/increase/types/external_account.py b/src/increase/types/external_account.py index c0cfac121..939830548 100644 --- a/src/increase/types/external_account.py +++ b/src/increase/types/external_account.py @@ -12,6 +12,10 @@ class ExternalAccount(BaseModel): + """ + External Accounts represent accounts at financial institutions other than Increase. You can use this API to store their details for reuse. + """ + id: str """The External Account's identifier.""" diff --git a/src/increase/types/fednow_transfer.py b/src/increase/types/fednow_transfer.py index 5de9bf2e9..03bf44291 100644 --- a/src/increase/types/fednow_transfer.py +++ b/src/increase/types/fednow_transfer.py @@ -19,26 +19,38 @@ class Acknowledgement(BaseModel): + """ + If the transfer is acknowledged by the recipient bank, this will contain supplemental details. + """ + acknowledged_at: datetime """When the transfer was acknowledged.""" class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -60,6 +72,10 @@ class CreatedBy(BaseModel): class Rejection(BaseModel): + """ + If the transfer is rejected by FedNow or the destination financial institution, this will contain supplemental details. + """ + reject_reason_additional_information: Optional[str] = None """Additional information about the rejection provided by the recipient bank.""" @@ -123,6 +139,10 @@ class Rejection(BaseModel): class Submission(BaseModel): + """ + After the transfer is submitted to FedNow, this will contain supplemental details. + """ + message_identification: str """The FedNow network identification of the message submitted.""" @@ -134,6 +154,10 @@ class Submission(BaseModel): class FednowTransfer(BaseModel): + """ + FedNow transfers move funds, within seconds, between your Increase account and any other account supporting FedNow. + """ + id: str """The FedNow Transfer's identifier.""" diff --git a/src/increase/types/fednow_transfer_create_params.py b/src/increase/types/fednow_transfer_create_params.py index 082a0c9d2..29fa51456 100644 --- a/src/increase/types/fednow_transfer_create_params.py +++ b/src/increase/types/fednow_transfer_create_params.py @@ -50,6 +50,8 @@ class FednowTransferCreateParams(TypedDict, total=False): class CreditorAddress(TypedDict, total=False): + """The creditor's address.""" + city: Required[str] """The city, district, town, or village of the address.""" @@ -64,6 +66,8 @@ class CreditorAddress(TypedDict, total=False): class DebtorAddress(TypedDict, total=False): + """The debtor's address.""" + city: Required[str] """The city, district, town, or village of the address.""" diff --git a/src/increase/types/file.py b/src/increase/types/file.py index c50998f1d..985de238c 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -12,6 +12,11 @@ class File(BaseModel): + """Files are objects that represent a file hosted on Increase's servers. + + The file may have been uploaded by you (for example, when uploading a check image) or it may have been created by Increase (for example, an autogenerated statement PDF). If you need to download a File, create a File Link. + """ + id: str """The File's identifier.""" diff --git a/src/increase/types/file_link.py b/src/increase/types/file_link.py index 5299453d0..d3118075b 100644 --- a/src/increase/types/file_link.py +++ b/src/increase/types/file_link.py @@ -10,6 +10,8 @@ class FileLink(BaseModel): + """File Links let you generate a URL that can be used to download a File.""" + id: str """The File Link identifier.""" diff --git a/src/increase/types/group.py b/src/increase/types/group.py index 0920f4a2d..def782606 100644 --- a/src/increase/types/group.py +++ b/src/increase/types/group.py @@ -9,6 +9,11 @@ class Group(BaseModel): + """Groups represent organizations using Increase. + + You can retrieve information about your own organization via the API. More commonly, OAuth platforms can retrieve information about the organizations that have granted them access. Learn more about OAuth [here](https://increase.com/documentation/oauth). + """ + id: str """The Group identifier.""" diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index a87775eeb..bce55afef 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -21,6 +21,8 @@ class Acceptance(BaseModel): + """If your transfer is accepted, this will contain details of the acceptance.""" + accepted_at: datetime """The time at which the transfer was accepted.""" @@ -34,11 +36,15 @@ class AddendaFreeformEntry(BaseModel): class AddendaFreeform(BaseModel): + """Unstructured `payment_related_information` passed through by the originator.""" + entries: List[AddendaFreeformEntry] """Each entry represents an addendum received from the originator.""" class Addenda(BaseModel): + """Additional information sent from the originator.""" + category: Literal["freeform"] """The type of addendum. @@ -50,6 +56,8 @@ class Addenda(BaseModel): class Decline(BaseModel): + """If your transfer is declined, this will contain details of the decline.""" + declined_at: datetime """The time at which the transfer was declined.""" @@ -107,6 +115,10 @@ class Decline(BaseModel): class InternationalAddenda(BaseModel): + """ + If the Inbound ACH Transfer has a Standard Entry Class Code of IAT, this will contain fields pertaining to the International ACH Transaction. + """ + destination_country_code: str """ The [ISO 3166](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2), Alpha-2 @@ -335,6 +347,10 @@ class InternationalAddenda(BaseModel): class NotificationOfChange(BaseModel): + """ + If you initiate a notification of change in response to the transfer, this will contain its details. + """ + updated_account_number: Optional[str] = None """The new account number provided in the notification of change.""" @@ -343,6 +359,10 @@ class NotificationOfChange(BaseModel): class Settlement(BaseModel): + """ + A subhash containing information about when and how the transfer settled at the Federal Reserve. + """ + settled_at: datetime """ When the funds for this transfer settle at the recipient bank at the Federal @@ -358,6 +378,8 @@ class Settlement(BaseModel): class TransferReturn(BaseModel): + """If your transfer is returned, this will contain details of the return.""" + reason: Literal[ "insufficient_funds", "returned_per_odfi_request", @@ -404,6 +426,10 @@ class TransferReturn(BaseModel): class InboundACHTransfer(BaseModel): + """ + An Inbound ACH Transfer is an ACH transfer initiated outside of Increase to your account. + """ + id: str """The inbound ACH transfer's identifier.""" diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index f34e043ba..0e715e1a3 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -36,6 +36,10 @@ class Adjustment(BaseModel): class DepositReturn(BaseModel): + """ + If you requested a return of this deposit, this will contain details of the return. + """ + reason: Literal[ "altered_or_fictitious", "not_authorized", @@ -60,6 +64,10 @@ class DepositReturn(BaseModel): class InboundCheckDeposit(BaseModel): + """ + Inbound Check Deposits are records of third-parties attempting to deposit checks against your account. + """ + id: str """The deposit's identifier.""" diff --git a/src/increase/types/inbound_fednow_transfer.py b/src/increase/types/inbound_fednow_transfer.py index 6dcfe37b2..55470b22f 100644 --- a/src/increase/types/inbound_fednow_transfer.py +++ b/src/increase/types/inbound_fednow_transfer.py @@ -12,6 +12,8 @@ class Confirmation(BaseModel): + """If your transfer is confirmed, this will contain details of the confirmation.""" + transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" @@ -29,6 +31,8 @@ def __getattr__(self, attr: str) -> object: ... class Decline(BaseModel): + """If your transfer is declined, this will contain details of the decline.""" + reason: Literal[ "account_number_canceled", "account_number_disabled", @@ -65,6 +69,10 @@ def __getattr__(self, attr: str) -> object: ... class InboundFednowTransfer(BaseModel): + """ + An Inbound FedNow Transfer is a FedNow transfer initiated outside of Increase to your account. + """ + id: str """The inbound FedNow transfer's identifier.""" diff --git a/src/increase/types/inbound_mail_item.py b/src/increase/types/inbound_mail_item.py index eb281f025..3adafc034 100644 --- a/src/increase/types/inbound_mail_item.py +++ b/src/increase/types/inbound_mail_item.py @@ -12,6 +12,8 @@ class Check(BaseModel): + """Inbound Mail Item Checks represent the checks in an Inbound Mail Item.""" + amount: int """The amount of the check.""" @@ -34,6 +36,8 @@ class Check(BaseModel): class InboundMailItem(BaseModel): + """Inbound Mail Items represent pieces of physical mail delivered to a Lockbox.""" + id: str """The Inbound Mail Item identifier.""" diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index 39888f6c6..1338408d0 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -10,6 +10,8 @@ class Confirmation(BaseModel): + """If your transfer is confirmed, this will contain details of the confirmation.""" + confirmed_at: datetime """The time at which the transfer was confirmed.""" @@ -18,6 +20,8 @@ class Confirmation(BaseModel): class Decline(BaseModel): + """If your transfer is declined, this will contain details of the decline.""" + declined_at: datetime """The time at which the transfer was declined.""" @@ -45,6 +49,10 @@ class Decline(BaseModel): class InboundRealTimePaymentsTransfer(BaseModel): + """ + An Inbound Real-Time Payments Transfer is a Real-Time Payments transfer initiated outside of Increase to your account. + """ + id: str """The inbound Real-Time Payments transfer's identifier.""" diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index eba97035f..25b06446b 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -12,6 +12,10 @@ class InboundWireDrawdownRequest(BaseModel): + """ + Inbound wire drawdown requests are requests from someone else to send them a wire. For more information, see our [Wire Drawdown Requests documentation](/documentation/wire-drawdown-requests). + """ + id: str """The Wire drawdown request identifier.""" diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 0eab26d60..8b7faee00 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -12,6 +12,10 @@ class Reversal(BaseModel): + """ + Information about the reversal of the inbound wire transfer if it has been reversed. + """ + reason: Literal["duplicate", "creditor_request"] """The reason for the reversal. @@ -28,6 +32,10 @@ class Reversal(BaseModel): class InboundWireTransfer(BaseModel): + """ + An Inbound Wire Transfer is a wire transfer initiated outside of Increase to your account. + """ + id: str """The inbound wire transfer's identifier.""" diff --git a/src/increase/types/intrafi_account_enrollment.py b/src/increase/types/intrafi_account_enrollment.py index 89444fc6f..9d77c7651 100644 --- a/src/increase/types/intrafi_account_enrollment.py +++ b/src/increase/types/intrafi_account_enrollment.py @@ -10,6 +10,10 @@ class IntrafiAccountEnrollment(BaseModel): + """ + IntraFi is a [network of financial institutions](https://www.intrafi.com/network-banks) that allows Increase users to sweep funds to multiple banks. This enables accounts to become eligible for additional Federal Deposit Insurance Corporation (FDIC) insurance. An IntraFi Account Enrollment object represents the status of an account in the network. Sweeping an account to IntraFi doesn't affect funds availability. + """ + id: str """The identifier of this enrollment at IntraFi.""" diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi_balance.py index 6c929d872..590110197 100644 --- a/src/increase/types/intrafi_balance.py +++ b/src/increase/types/intrafi_balance.py @@ -10,6 +10,8 @@ class BalanceBankLocation(BaseModel): + """The primary location of the bank.""" + city: str """The bank's city.""" @@ -39,6 +41,10 @@ class Balance(BaseModel): class IntrafiBalance(BaseModel): + """ + When using IntraFi, each account's balance over the standard FDIC insurance amount is swept to various other institutions. Funds are rebalanced across banks as needed once per business day. + """ + id: str """The identifier of this balance.""" diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py index c0a215fa7..6e99025ba 100644 --- a/src/increase/types/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -10,6 +10,10 @@ class IntrafiExclusion(BaseModel): + """ + Certain institutions may be excluded per Entity when sweeping funds into the IntraFi network. This is useful when an Entity already has deposits at a particular bank, and does not want to sweep additional funds to it. It may take 5 business days for an exclusion to be processed. + """ + id: str """The identifier of this exclusion request.""" diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index 0350841c7..283784228 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -10,6 +10,8 @@ class Address(BaseModel): + """The mailing address for the Lockbox.""" + city: str """The city of the address.""" @@ -38,6 +40,11 @@ class Address(BaseModel): class Lockbox(BaseModel): + """Lockboxes are physical locations that can receive mail containing paper checks. + + Increase will automatically create a Check Deposit for checks received this way. + """ + id: str """The Lockbox identifier.""" diff --git a/src/increase/types/oauth_application.py b/src/increase/types/oauth_application.py index 99bb1f92c..dc9ccb187 100644 --- a/src/increase/types/oauth_application.py +++ b/src/increase/types/oauth_application.py @@ -10,6 +10,10 @@ class OAuthApplication(BaseModel): + """ + An OAuth Application lets you build an application for others to use with their Increase data. You can create an OAuth Application via the Dashboard and read information about it with the API. Learn more about OAuth [here](https://increase.com/documentation/oauth). + """ + id: str """The OAuth Application's identifier.""" diff --git a/src/increase/types/oauth_connection.py b/src/increase/types/oauth_connection.py index e8ef81603..db8f2fc0f 100644 --- a/src/increase/types/oauth_connection.py +++ b/src/increase/types/oauth_connection.py @@ -10,6 +10,10 @@ class OAuthConnection(BaseModel): + """ + When a user authorizes your OAuth application, an OAuth Connection object is created. Learn more about OAuth [here](https://increase.com/documentation/oauth). + """ + id: str """The OAuth Connection's identifier.""" diff --git a/src/increase/types/oauth_token.py b/src/increase/types/oauth_token.py index 48cb1b819..7013e173e 100644 --- a/src/increase/types/oauth_token.py +++ b/src/increase/types/oauth_token.py @@ -8,6 +8,10 @@ class OAuthToken(BaseModel): + """ + A token that is returned to your application when a user completes the OAuth flow and may be used to authenticate requests. Learn more about OAuth [here](/documentation/oauth). + """ + access_token: str """ You may use this token in place of an API key to make OAuth requests on a user's diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 655dd916d..aba8ee0eb 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -46,6 +46,11 @@ class SourceAccountTransferInstruction(BaseModel): + """An Account Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `account_transfer_instruction`. + """ + amount: int """The pending amount in the minor unit of the transaction's currency. @@ -77,6 +82,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceACHTransferInstruction(BaseModel): + """An ACH Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `ach_transfer_instruction`. + """ + amount: int """The pending amount in USD cents.""" @@ -97,6 +107,8 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -112,6 +124,8 @@ class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -127,6 +141,8 @@ class SourceCardAuthorizationAdditionalAmountsDental(BaseModel): class SourceCardAuthorizationAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -142,6 +158,8 @@ class SourceCardAuthorizationAdditionalAmountsOriginal(BaseModel): class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -157,6 +175,8 @@ class SourceCardAuthorizationAdditionalAmountsPrescription(BaseModel): class SourceCardAuthorizationAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -172,6 +192,10 @@ class SourceCardAuthorizationAdditionalAmountsSurcharge(BaseModel): class SourceCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -187,6 +211,8 @@ class SourceCardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class SourceCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -202,6 +228,8 @@ class SourceCardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class SourceCardAuthorizationAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -217,6 +245,8 @@ class SourceCardAuthorizationAdditionalAmountsTransit(BaseModel): class SourceCardAuthorizationAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -232,6 +262,8 @@ class SourceCardAuthorizationAdditionalAmountsUnknown(BaseModel): class SourceCardAuthorizationAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -247,6 +279,10 @@ class SourceCardAuthorizationAdditionalAmountsVision(BaseModel): class SourceCardAuthorizationAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[SourceCardAuthorizationAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -281,10 +317,14 @@ class SourceCardAuthorizationAdditionalAmounts(BaseModel): class SourceCardAuthorizationNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -403,6 +443,8 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): class SourceCardAuthorizationNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -418,6 +460,8 @@ class SourceCardAuthorizationNetworkDetails(BaseModel): class SourceCardAuthorizationNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -445,6 +489,10 @@ class SourceCardAuthorizationNetworkIdentifiers(BaseModel): class SourceCardAuthorizationVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -456,6 +504,10 @@ class SourceCardAuthorizationVerificationCardVerificationCode(BaseModel): class SourceCardAuthorizationVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -495,6 +547,8 @@ class SourceCardAuthorizationVerificationCardholderAddress(BaseModel): class SourceCardAuthorizationVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: SourceCardAuthorizationVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -509,6 +563,11 @@ class SourceCardAuthorizationVerification(BaseModel): class SourceCardAuthorization(BaseModel): + """A Card Authorization object. + + This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction. + """ + id: str """The Card Authorization identifier.""" @@ -705,6 +764,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardPushTransferInstruction(BaseModel): + """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`. + """ + amount: int """The transfer amount in USD cents.""" @@ -713,6 +777,11 @@ class SourceCardPushTransferInstruction(BaseModel): class SourceCheckDepositInstruction(BaseModel): + """A Check Deposit Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `check_deposit_instruction`. + """ + amount: int """The pending amount in USD cents.""" @@ -753,6 +822,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckTransferInstruction(BaseModel): + """A Check Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `check_transfer_instruction`. + """ + amount: int """The transfer amount in USD cents.""" @@ -781,6 +855,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceFednowTransferInstruction(BaseModel): + """A FedNow Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `fednow_transfer_instruction`. + """ + transfer_id: str """The identifier of the FedNow Transfer that led to this Pending Transaction.""" @@ -798,6 +877,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundFundsHold(BaseModel): + """An Inbound Funds Hold object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_funds_hold`. We hold funds for certain transaction types to account for return windows where funds might still be clawed back by the sending institution. + """ + amount: int """The held amount in the minor unit of the account's currency. @@ -860,6 +944,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundWireTransferReversal(BaseModel): + """An Inbound Wire Transfer Reversal object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_wire_transfer_reversal`. An Inbound Wire Transfer Reversal is created when Increase has received a wire and the User requests that it be reversed. + """ + inbound_wire_transfer_id: str """The ID of the Inbound Wire Transfer that is being reversed.""" @@ -877,10 +966,19 @@ def __getattr__(self, attr: str) -> object: ... class SourceOther(BaseModel): + """ + If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. + """ + pass class SourceRealTimePaymentsTransferInstruction(BaseModel): + """A Real-Time Payments Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `real_time_payments_transfer_instruction`. + """ + amount: int """The transfer amount in USD cents.""" @@ -892,6 +990,11 @@ class SourceRealTimePaymentsTransferInstruction(BaseModel): class SourceSwiftTransferInstruction(BaseModel): + """A Swift Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `swift_transfer_instruction`. + """ + transfer_id: str """The identifier of the Swift Transfer that led to this Pending Transaction.""" @@ -909,6 +1012,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceWireTransferInstruction(BaseModel): + """A Wire Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `wire_transfer_instruction`. + """ + account_number: str """The account number for the destination account.""" @@ -941,6 +1049,10 @@ def __getattr__(self, attr: str) -> object: ... class Source(BaseModel): + """ + This is an object giving more details on the network-level event that caused the Pending Transaction. For example, for a card transaction this lists the merchant's industry and location. + """ + account_transfer_instruction: Optional[SourceAccountTransferInstruction] = None """An Account Transfer Instruction object. @@ -1110,6 +1222,10 @@ def __getattr__(self, attr: str) -> object: ... class PendingTransaction(BaseModel): + """ + Pending Transactions are potential future additions and removals of money from your bank account. They impact your available balance, but not your current balance. To learn more, see [Transactions and Transfers](/documentation/transactions-transfers). + """ + id: str """The Pending Transaction identifier.""" diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index 8087891e6..d8244067b 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -10,6 +10,8 @@ class Cardholder(BaseModel): + """Details about the cardholder, as it appears on the printed card.""" + first_name: str """The cardholder's first name.""" @@ -18,6 +20,8 @@ class Cardholder(BaseModel): class ShipmentAddress(BaseModel): + """The location to where the card's packing label is addressed.""" + city: str """The city of the shipping address.""" @@ -77,6 +81,8 @@ class ShipmentTrackingUpdate(BaseModel): class ShipmentTracking(BaseModel): + """Tracking details for the shipment.""" + number: Optional[str] = None """The tracking number. Not available for USPS shipments.""" @@ -98,6 +104,8 @@ class ShipmentTracking(BaseModel): class Shipment(BaseModel): + """The details used to ship this physical card.""" + address: ShipmentAddress """The location to where the card's packing label is addressed.""" @@ -151,6 +159,11 @@ class Shipment(BaseModel): class PhysicalCard(BaseModel): + """Custom physical Visa cards that are shipped to your customers. + + The artwork is configurable by a connected [Card Profile](/documentation/api#card-profiles). The same Card can be used for multiple Physical Cards. Printing cards incurs a fee. Please contact [support@increase.com](mailto:support@increase.com) for pricing! + """ + id: str """The physical card identifier.""" diff --git a/src/increase/types/physical_card_create_params.py b/src/increase/types/physical_card_create_params.py index 3de994bc1..03d872376 100644 --- a/src/increase/types/physical_card_create_params.py +++ b/src/increase/types/physical_card_create_params.py @@ -25,6 +25,8 @@ class PhysicalCardCreateParams(TypedDict, total=False): class Cardholder(TypedDict, total=False): + """Details about the cardholder, as it will appear on the physical card.""" + first_name: Required[str] """The cardholder's first name.""" @@ -33,6 +35,8 @@ class Cardholder(TypedDict, total=False): class ShipmentAddress(TypedDict, total=False): + """The address to where the card should be shipped.""" + city: Required[str] """The city of the shipping address.""" @@ -67,6 +71,8 @@ class ShipmentAddress(TypedDict, total=False): class Shipment(TypedDict, total=False): + """The details used to ship this physical card.""" + address: Required[ShipmentAddress] """The address to where the card should be shipped.""" diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py index 175ff6c07..e6e35e926 100644 --- a/src/increase/types/physical_card_profile.py +++ b/src/increase/types/physical_card_profile.py @@ -12,6 +12,11 @@ class PhysicalCardProfile(BaseModel): + """This contains artwork and metadata relating to a Physical Card's appearance. + + For more information, see our guide on [physical card artwork](https://increase.com/documentation/card-art-physical-cards). + """ + id: str """The Card Profile identifier.""" diff --git a/src/increase/types/physical_card_profile_clone_params.py b/src/increase/types/physical_card_profile_clone_params.py index 917b9becf..597756601 100644 --- a/src/increase/types/physical_card_profile_clone_params.py +++ b/src/increase/types/physical_card_profile_clone_params.py @@ -32,6 +32,11 @@ class PhysicalCardProfileCloneParams(TypedDict, total=False): class FrontText(TypedDict, total=False): + """Text printed on the front of the card. + + Reach out to [support@increase.com](mailto:support@increase.com) for more information. + """ + line1: Required[str] """The first line of text on the front of the card.""" diff --git a/src/increase/types/physical_card_profile_create_params.py b/src/increase/types/physical_card_profile_create_params.py index 6544cf53f..bd98f17c7 100644 --- a/src/increase/types/physical_card_profile_create_params.py +++ b/src/increase/types/physical_card_profile_create_params.py @@ -32,6 +32,11 @@ class PhysicalCardProfileCreateParams(TypedDict, total=False): class FrontText(TypedDict, total=False): + """Text printed on the front of the card. + + Reach out to [support@increase.com](mailto:support@increase.com) for more information. + """ + line1: Required[str] """The first line of text on the front of the card.""" diff --git a/src/increase/types/program.py b/src/increase/types/program.py index 8ede73010..d7f852af0 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -10,6 +10,11 @@ class Program(BaseModel): + """Programs determine the compliance and commercial terms of Accounts. + + By default, you have a Commercial Banking program for managing your own funds. If you are lending or managing funds on behalf of your customers, or otherwise engaged in regulated activity, we will work together to create additional Programs for you. + """ + id: str """The Program identifier.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index a4d56c1fa..72fe24fbf 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -43,6 +43,8 @@ class CardAuthentication(BaseModel): + """Fields related to a 3DS authentication attempt.""" + account_id: str """The identifier of the Account the card belongs to.""" @@ -66,6 +68,8 @@ class CardAuthentication(BaseModel): class CardAuthenticationChallenge(BaseModel): + """Fields related to a 3DS authentication attempt.""" + account_id: str """The identifier of the Account the card belongs to.""" @@ -92,6 +96,8 @@ class CardAuthenticationChallenge(BaseModel): class CardAuthorizationAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -107,6 +113,8 @@ class CardAuthorizationAdditionalAmountsClinic(BaseModel): class CardAuthorizationAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -122,6 +130,8 @@ class CardAuthorizationAdditionalAmountsDental(BaseModel): class CardAuthorizationAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -137,6 +147,8 @@ class CardAuthorizationAdditionalAmountsOriginal(BaseModel): class CardAuthorizationAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -152,6 +164,8 @@ class CardAuthorizationAdditionalAmountsPrescription(BaseModel): class CardAuthorizationAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -167,6 +181,10 @@ class CardAuthorizationAdditionalAmountsSurcharge(BaseModel): class CardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -182,6 +200,8 @@ class CardAuthorizationAdditionalAmountsTotalCumulative(BaseModel): class CardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -197,6 +217,8 @@ class CardAuthorizationAdditionalAmountsTotalHealthcare(BaseModel): class CardAuthorizationAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -212,6 +234,8 @@ class CardAuthorizationAdditionalAmountsTransit(BaseModel): class CardAuthorizationAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -227,6 +251,8 @@ class CardAuthorizationAdditionalAmountsUnknown(BaseModel): class CardAuthorizationAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -242,6 +268,10 @@ class CardAuthorizationAdditionalAmountsVision(BaseModel): class CardAuthorizationAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[CardAuthorizationAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -276,6 +306,11 @@ class CardAuthorizationAdditionalAmounts(BaseModel): class CardAuthorizationApproval(BaseModel): + """Present if and only if `decision` is `approve`. + + Contains information related to the approval of the authorization. + """ + partial_amount: Optional[int] = None """ If the authorization was partially approved, this field contains the approved @@ -284,6 +319,11 @@ class CardAuthorizationApproval(BaseModel): class CardAuthorizationDecline(BaseModel): + """Present if and only if `decision` is `decline`. + + Contains information related to the reason the authorization was declined. + """ + reason: Literal[ "insufficient_funds", "transaction_never_allowed", @@ -310,10 +350,14 @@ class CardAuthorizationDecline(BaseModel): class CardAuthorizationNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class CardAuthorizationNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -432,6 +476,8 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): class CardAuthorizationNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -447,6 +493,8 @@ class CardAuthorizationNetworkDetails(BaseModel): class CardAuthorizationNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -474,6 +522,8 @@ class CardAuthorizationNetworkIdentifiers(BaseModel): class CardAuthorizationRequestDetailsIncrementalAuthorization(BaseModel): + """Fields specific to the category `incremental_authorization`.""" + card_payment_id: str """The card payment for this authorization and increment.""" @@ -485,10 +535,14 @@ class CardAuthorizationRequestDetailsIncrementalAuthorization(BaseModel): class CardAuthorizationRequestDetailsInitialAuthorization(BaseModel): + """Fields specific to the category `initial_authorization`.""" + pass class CardAuthorizationRequestDetails(BaseModel): + """Fields specific to the type of request, such as an incremental authorization.""" + category: Literal["initial_authorization", "incremental_authorization"] """ The type of this request (e.g., an initial authorization or an incremental @@ -507,6 +561,10 @@ class CardAuthorizationRequestDetails(BaseModel): class CardAuthorizationVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -518,6 +576,10 @@ class CardAuthorizationVerificationCardVerificationCode(BaseModel): class CardAuthorizationVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -557,6 +619,8 @@ class CardAuthorizationVerificationCardholderAddress(BaseModel): class CardAuthorizationVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: CardAuthorizationVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -571,6 +635,8 @@ class CardAuthorizationVerification(BaseModel): class CardAuthorization(BaseModel): + """Fields related to a card authorization.""" + account_id: str """The identifier of the Account the authorization will debit.""" @@ -772,6 +838,8 @@ def __getattr__(self, attr: str) -> object: ... class DigitalWalletAuthentication(BaseModel): + """Fields related to a digital wallet authentication attempt.""" + card_id: str """The identifier of the Card that is being tokenized.""" @@ -814,11 +882,15 @@ class DigitalWalletAuthentication(BaseModel): class DigitalWalletTokenDevice(BaseModel): + """Device that is being used to provision the digital wallet token.""" + identifier: Optional[str] = None """ID assigned to the device by the digital wallet provider.""" class DigitalWalletToken(BaseModel): + """Fields related to a digital wallet token provisioning attempt.""" + card_id: str """The identifier of the Card that is being tokenized.""" @@ -845,6 +917,10 @@ class DigitalWalletToken(BaseModel): class RealTimeDecision(BaseModel): + """ + Real Time Decisions are created when your application needs to take action in real-time to some event such as a card authorization. For more information, see our [Real-Time Decisions guide](https://increase.com/documentation/real-time-decisions). + """ + id: str """The Real-Time Decision identifier.""" diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 7f3792ab5..2040b623e 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -54,6 +54,10 @@ class RealTimeDecisionActionParams(TypedDict, total=False): class CardAuthentication(TypedDict, total=False): + """ + If the Real-Time Decision relates to a 3DS card authentication attempt, this object contains your response to the authentication. + """ + decision: Required[Literal["approve", "challenge", "deny"]] """Whether the card authentication attempt should be approved or declined. @@ -65,6 +69,10 @@ class CardAuthentication(TypedDict, total=False): class CardAuthenticationChallenge(TypedDict, total=False): + """ + If the Real-Time Decision relates to 3DS card authentication challenge delivery, this object contains your response. + """ + result: Required[Literal["success", "failure"]] """ Whether the card authentication challenge was successfully delivered to the @@ -78,6 +86,11 @@ class CardAuthenticationChallenge(TypedDict, total=False): class CardAuthorizationApprovalCardholderAddressVerificationResult(TypedDict, total=False): + """Your decisions on whether or not each provided address component is a match. + + Your response here is evaluated against the customer's provided `postal_code` and `line1`, and an appropriate network response is generated. For more information, see our [Address Verification System Codes and Overrides](https://increase.com/documentation/address-verification-system-codes-and-overrides) guide. + """ + line1: Required[Literal["match", "no_match"]] """Your decision on the address line of the provided address. @@ -98,6 +111,10 @@ class CardAuthorizationApprovalCardholderAddressVerificationResult(TypedDict, to class CardAuthorizationApproval(TypedDict, total=False): + """ + If your application approves the authorization, this contains metadata about your decision to approve. Your response here is advisory to the acquiring bank. The bank may choose to reverse the authorization if you approve the transaction but indicate the address does not match. + """ + cardholder_address_verification_result: CardAuthorizationApprovalCardholderAddressVerificationResult """Your decisions on whether or not each provided address component is a match. @@ -118,6 +135,10 @@ class CardAuthorizationApproval(TypedDict, total=False): class CardAuthorizationDecline(TypedDict, total=False): + """ + If your application declines the authorization, this contains details about the decline. + """ + reason: Required[ Literal[ "insufficient_funds", @@ -148,6 +169,10 @@ class CardAuthorizationDecline(TypedDict, total=False): class CardAuthorizationTyped(TypedDict, total=False): + """ + If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. + """ + decision: Required[Literal["approve", "decline"]] """Whether the card authorization should be approved or declined. @@ -174,6 +199,10 @@ class CardAuthorizationTyped(TypedDict, total=False): class DigitalWalletAuthenticationSuccess(TypedDict, total=False): + """ + If your application was able to deliver the one-time passcode, this contains metadata about the delivery. Exactly one of `phone` or `email` must be provided. + """ + email: str """The email address that was used to verify the cardholder via one-time passcode.""" @@ -185,6 +214,10 @@ class DigitalWalletAuthenticationSuccess(TypedDict, total=False): class DigitalWalletAuthentication(TypedDict, total=False): + """ + If the Real-Time Decision relates to a digital wallet authentication attempt, this object contains your response to the authentication. + """ + result: Required[Literal["success", "failure"]] """Whether your application was able to deliver the one-time passcode. @@ -202,6 +235,10 @@ class DigitalWalletAuthentication(TypedDict, total=False): class DigitalWalletTokenApproval(TypedDict, total=False): + """ + If your application approves the provisioning attempt, this contains metadata about the digital wallet token that will be generated. + """ + email: str """ An email address that can be used to verify the cardholder via one-time @@ -216,6 +253,10 @@ class DigitalWalletTokenApproval(TypedDict, total=False): class DigitalWalletTokenDecline(TypedDict, total=False): + """ + If your application declines the provisioning attempt, this contains details about the decline. + """ + reason: str """Why the tokenization attempt was declined. @@ -224,6 +265,10 @@ class DigitalWalletTokenDecline(TypedDict, total=False): class DigitalWalletToken(TypedDict, total=False): + """ + If the Real-Time Decision relates to a digital wallet token provisioning attempt, this object contains your response to the attempt. + """ + approval: DigitalWalletTokenApproval """ If your application approves the provisioning attempt, this contains metadata diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 8934f40aa..127baf9d6 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -23,11 +23,19 @@ class Acknowledgement(BaseModel): + """ + If the transfer is acknowledged by the recipient bank, this will contain supplemental details. + """ + acknowledged_at: datetime """When the transfer was acknowledged.""" class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -42,6 +50,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -56,21 +68,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -92,6 +112,10 @@ class CreatedBy(BaseModel): class Rejection(BaseModel): + """ + If the transfer is rejected by Real-Time Payments or the destination financial institution, this will contain supplemental details. + """ + reject_reason_additional_information: Optional[str] = None """ Additional information about the rejection provided by the recipient bank when @@ -183,6 +207,10 @@ class Rejection(BaseModel): class Submission(BaseModel): + """ + After the transfer is submitted to Real-Time Payments, this will contain supplemental details. + """ + submitted_at: Optional[datetime] = None """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -194,6 +222,10 @@ class Submission(BaseModel): class RealTimePaymentsTransfer(BaseModel): + """ + Real-Time Payments transfers move funds, within seconds, between your Increase account and any other account on the Real-Time Payments network. + """ + id: str """The Real-Time Payments Transfer's identifier.""" diff --git a/src/increase/types/routing_number_list_response.py b/src/increase/types/routing_number_list_response.py index 4b7bd3d75..30cce17e4 100644 --- a/src/increase/types/routing_number_list_response.py +++ b/src/increase/types/routing_number_list_response.py @@ -8,6 +8,8 @@ class RoutingNumberListResponse(BaseModel): + """Routing numbers are used to identify your bank in a financial transaction.""" + ach_transfers: Literal["supported", "not_supported"] """This routing number's support for ACH Transfers. diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index f11ed0c71..e66950f04 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -145,6 +145,8 @@ class CardAuthorizationCreateParams(TypedDict, total=False): class NetworkDetailsVisa(TypedDict, total=False): + """Fields specific to the Visa network.""" + stand_in_processing_reason: Literal[ "issuer_error", "invalid_physical_card", @@ -177,16 +179,24 @@ class NetworkDetailsVisa(TypedDict, total=False): class NetworkDetails(TypedDict, total=False): + """Fields specific to a given card network.""" + visa: Required[NetworkDetailsVisa] """Fields specific to the Visa network.""" class ProcessingCategoryRefund(TypedDict, total=False): + """Details related to refund authorizations.""" + original_card_payment_id: str """The card payment to link this refund to.""" class ProcessingCategory(TypedDict, total=False): + """ + Fields specific to a specific type of authorization, such as Automatic Fuel Dispensers, Refund Authorizations, or Cash Disbursements. + """ + category: Required[ Literal[ "account_funding", diff --git a/src/increase/types/simulations/card_authorization_create_response.py b/src/increase/types/simulations/card_authorization_create_response.py index 5944bf00d..b6cd03098 100644 --- a/src/increase/types/simulations/card_authorization_create_response.py +++ b/src/increase/types/simulations/card_authorization_create_response.py @@ -11,6 +11,8 @@ class CardAuthorizationCreateResponse(BaseModel): + """The results of a Card Authorization simulation.""" + declined_transaction: Optional[DeclinedTransaction] = None """ If the authorization attempt fails, this will contain the resulting diff --git a/src/increase/types/simulations/card_dispute_action_params.py b/src/increase/types/simulations/card_dispute_action_params.py index d712dbb42..3cd69b425 100644 --- a/src/increase/types/simulations/card_dispute_action_params.py +++ b/src/increase/types/simulations/card_dispute_action_params.py @@ -38,47 +38,102 @@ class CardDisputeActionParams(TypedDict, total=False): class VisaAcceptChargeback(TypedDict, total=False): + """The parameters for accepting the chargeback. + + Required if and only if `action` is `accept_chargeback`. + """ + pass class VisaAcceptUserSubmission(TypedDict, total=False): + """The parameters for accepting the user submission. + + Required if and only if `action` is `accept_user_submission`. + """ + pass class VisaDeclineUserPrearbitration(TypedDict, total=False): + """The parameters for declining the prearbitration. + + Required if and only if `action` is `decline_user_prearbitration`. + """ + pass class VisaReceiveMerchantPrearbitration(TypedDict, total=False): + """The parameters for receiving the prearbitration. + + Required if and only if `action` is `receive_merchant_prearbitration`. + """ + pass class VisaRepresent(TypedDict, total=False): + """The parameters for re-presenting the dispute. + + Required if and only if `action` is `represent`. + """ + pass class VisaRequestFurtherInformation(TypedDict, total=False): + """The parameters for requesting further information from the user. + + Required if and only if `action` is `request_further_information`. + """ + reason: Required[str] """The reason for requesting further information from the user.""" class VisaTimeOutChargeback(TypedDict, total=False): + """The parameters for timing out the chargeback. + + Required if and only if `action` is `time_out_chargeback`. + """ + pass class VisaTimeOutMerchantPrearbitration(TypedDict, total=False): + """The parameters for timing out the merchant prearbitration. + + Required if and only if `action` is `time_out_merchant_prearbitration`. + """ + pass class VisaTimeOutRepresentment(TypedDict, total=False): + """The parameters for timing out the re-presentment. + + Required if and only if `action` is `time_out_representment`. + """ + pass class VisaTimeOutUserPrearbitration(TypedDict, total=False): + """The parameters for timing out the user prearbitration. + + Required if and only if `action` is `time_out_user_prearbitration`. + """ + pass class Visa(TypedDict, total=False): + """The Visa-specific parameters for the taking action on the dispute. + + Required if and only if `network` is `visa`. + """ + action: Required[ Literal[ "accept_chargeback", diff --git a/src/increase/types/simulations/digital_wallet_token_request_create_response.py b/src/increase/types/simulations/digital_wallet_token_request_create_response.py index 29df122fe..bd2fa140c 100644 --- a/src/increase/types/simulations/digital_wallet_token_request_create_response.py +++ b/src/increase/types/simulations/digital_wallet_token_request_create_response.py @@ -9,6 +9,8 @@ class DigitalWalletTokenRequestCreateResponse(BaseModel): + """The results of a Digital Wallet Token simulation.""" + decline_reason: Optional[ Literal["card_not_active", "no_verification_method", "webhook_timed_out", "webhook_declined"] ] = None diff --git a/src/increase/types/simulations/inbound_ach_transfer_create_params.py b/src/increase/types/simulations/inbound_ach_transfer_create_params.py index f269429a4..616dfa2a7 100644 --- a/src/increase/types/simulations/inbound_ach_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_ach_transfer_create_params.py @@ -98,11 +98,15 @@ class AddendaFreeformEntry(TypedDict, total=False): class AddendaFreeform(TypedDict, total=False): + """Unstructured `payment_related_information` passed through with the transfer.""" + entries: Required[Iterable[AddendaFreeformEntry]] """Each entry represents an addendum sent with the transfer.""" class Addenda(TypedDict, total=False): + """Additional information to include in the transfer.""" + category: Required[Literal["freeform"]] """The type of addenda to simulate being sent with the transfer. diff --git a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py index 1bbadeeb6..f96f2fd3b 100644 --- a/src/increase/types/simulations/real_time_payments_transfer_complete_params.py +++ b/src/increase/types/simulations/real_time_payments_transfer_complete_params.py @@ -13,6 +13,8 @@ class RealTimePaymentsTransferCompleteParams(TypedDict, total=False): class Rejection(TypedDict, total=False): + """If set, the simulation will reject the transfer.""" + reject_reason_code: Required[ Literal[ "account_closed", diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 5a6922690..6dcd5e495 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -94,6 +94,11 @@ class SourceAccountRevenuePayment(BaseModel): + """An Account Revenue Payment object. + + This field will be present in the JSON response if and only if `category` is equal to `account_revenue_payment`. An Account Revenue Payment represents a payment made to an account from the bank. Account revenue is a type of non-interest income. + """ + accrued_on_account_id: str """The account on which the account revenue was accrued.""" @@ -117,6 +122,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceAccountTransferIntention(BaseModel): + """An Account Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `account_transfer_intention`. Two Account Transfer Intentions are created from each Account Transfer. One decrements the source account, and the other increments the destination account. + """ + amount: int """The pending amount in the minor unit of the transaction's currency. @@ -157,6 +167,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceACHTransferIntention(BaseModel): + """An ACH Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `ach_transfer_intention`. An ACH Transfer Intention is created from an ACH Transfer. It reflects the intention to move money into or out of an Increase account via the ACH network. + """ + account_number: str """The account number for the destination account.""" @@ -192,6 +207,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceACHTransferRejection(BaseModel): + """An ACH Transfer Rejection object. + + This field will be present in the JSON response if and only if `category` is equal to `ach_transfer_rejection`. An ACH Transfer Rejection is created when an ACH Transfer is rejected by Increase. It offsets the ACH Transfer Intention. These rejections are rare. + """ + transfer_id: str """The identifier of the ACH Transfer that led to this Transaction.""" @@ -209,6 +229,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceACHTransferReturn(BaseModel): + """An ACH Transfer Return object. + + This field will be present in the JSON response if and only if `category` is equal to `ach_transfer_return`. An ACH Transfer Return is created when an ACH Transfer is returned by the receiving bank. It offsets the ACH Transfer Intention. ACH Transfer Returns usually occur within the first two business days after the transfer is initiated, but can occur much later. + """ + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -471,6 +496,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardDisputeAcceptance(BaseModel): + """A Legacy Card Dispute Acceptance object. + + This field will be present in the JSON response if and only if `category` is equal to `card_dispute_acceptance`. Contains the details of a successful Card Dispute. + """ + accepted_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -497,6 +527,10 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardDisputeFinancialVisa(BaseModel): + """ + Information for events related to card dispute for card payments processed over Visa's network. This field will be present in the JSON response if and only if `network` is equal to `visa`. + """ + event_type: Literal[ "chargeback_submitted", "merchant_prearbitration_decline_submitted", @@ -522,6 +556,11 @@ class SourceCardDisputeFinancialVisa(BaseModel): class SourceCardDisputeFinancial(BaseModel): + """A Card Dispute Financial object. + + This field will be present in the JSON response if and only if `category` is equal to `card_dispute_financial`. Financial event related to a Card Dispute. + """ + amount: int """The amount of the financial event.""" @@ -559,6 +598,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardDisputeLoss(BaseModel): + """A Legacy Card Dispute Loss object. + + This field will be present in the JSON response if and only if `category` is equal to `card_dispute_loss`. Contains the details of a lost Card Dispute. + """ + explanation: str """Why the Card Dispute was lost.""" @@ -588,6 +632,8 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardFinancialAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -603,6 +649,8 @@ class SourceCardFinancialAdditionalAmountsClinic(BaseModel): class SourceCardFinancialAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -618,6 +666,8 @@ class SourceCardFinancialAdditionalAmountsDental(BaseModel): class SourceCardFinancialAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -633,6 +683,8 @@ class SourceCardFinancialAdditionalAmountsOriginal(BaseModel): class SourceCardFinancialAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + amount: int """The amount in minor units of the `currency` field. @@ -648,6 +700,8 @@ class SourceCardFinancialAdditionalAmountsPrescription(BaseModel): class SourceCardFinancialAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + amount: int """The amount in minor units of the `currency` field. @@ -663,6 +717,10 @@ class SourceCardFinancialAdditionalAmountsSurcharge(BaseModel): class SourceCardFinancialAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + amount: int """The amount in minor units of the `currency` field. @@ -678,6 +736,8 @@ class SourceCardFinancialAdditionalAmountsTotalCumulative(BaseModel): class SourceCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + amount: int """The amount in minor units of the `currency` field. @@ -693,6 +753,8 @@ class SourceCardFinancialAdditionalAmountsTotalHealthcare(BaseModel): class SourceCardFinancialAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -708,6 +770,8 @@ class SourceCardFinancialAdditionalAmountsTransit(BaseModel): class SourceCardFinancialAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + amount: int """The amount in minor units of the `currency` field. @@ -723,6 +787,8 @@ class SourceCardFinancialAdditionalAmountsUnknown(BaseModel): class SourceCardFinancialAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + amount: int """The amount in minor units of the `currency` field. @@ -738,6 +804,10 @@ class SourceCardFinancialAdditionalAmountsVision(BaseModel): class SourceCardFinancialAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + clinic: Optional[SourceCardFinancialAdditionalAmountsClinic] = None """The part of this transaction amount that was for clinic-related services.""" @@ -772,10 +842,14 @@ class SourceCardFinancialAdditionalAmounts(BaseModel): class SourceCardFinancialNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + pass class SourceCardFinancialNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + electronic_commerce_indicator: Optional[ Literal[ "mail_phone_order", @@ -894,6 +968,8 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): class SourceCardFinancialNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + category: Literal["visa", "pulse"] """The payment network used to process this card authorization. @@ -909,6 +985,8 @@ class SourceCardFinancialNetworkDetails(BaseModel): class SourceCardFinancialNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + authorization_identification_response: Optional[str] = None """ The randomly generated 6-character Authorization Identification Response code @@ -936,6 +1014,10 @@ class SourceCardFinancialNetworkIdentifiers(BaseModel): class SourceCardFinancialVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + result: Literal["not_checked", "match", "no_match"] """The result of verifying the Card Verification Code. @@ -947,6 +1029,10 @@ class SourceCardFinancialVerificationCardVerificationCode(BaseModel): class SourceCardFinancialVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + actual_line1: Optional[str] = None """Line 1 of the address on file for the cardholder.""" @@ -986,6 +1072,8 @@ class SourceCardFinancialVerificationCardholderAddress(BaseModel): class SourceCardFinancialVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + card_verification_code: SourceCardFinancialVerificationCardVerificationCode """ Fields related to verification of the Card Verification Code, a 3-digit code on @@ -1000,6 +1088,11 @@ class SourceCardFinancialVerification(BaseModel): class SourceCardFinancial(BaseModel): + """A Card Financial object. + + This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customers funds with the intent to later clear a transaction. + """ + id: str """The Card Financial identifier.""" @@ -1190,6 +1283,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardPushTransferAcceptance(BaseModel): + """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. + """ + settlement_amount: int """The transfer amount in USD cents.""" @@ -1210,6 +1308,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardRefundCashback(BaseModel): + """Cashback debited for this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + amount: str """The cashback amount given as a string containing a decimal number. @@ -1225,6 +1328,8 @@ class SourceCardRefundCashback(BaseModel): class SourceCardRefundInterchange(BaseModel): + """Interchange assessed as a part of this transaciton.""" + amount: str """ The interchange amount given as a string containing a decimal number in major @@ -1246,6 +1351,8 @@ class SourceCardRefundInterchange(BaseModel): class SourceCardRefundNetworkIdentifiers(BaseModel): + """Network-specific identifiers for this refund.""" + acquirer_business_id: str """ A network assigned business ID that identifies the acquirer that processed this @@ -1269,6 +1376,8 @@ class SourceCardRefundNetworkIdentifiers(BaseModel): class SourceCardRefundPurchaseDetailsCarRental(BaseModel): + """Fields specific to car rentals.""" + car_class_code: Optional[str] = None """Code indicating the vehicle's class.""" @@ -1356,6 +1465,8 @@ class SourceCardRefundPurchaseDetailsCarRental(BaseModel): class SourceCardRefundPurchaseDetailsLodging(BaseModel): + """Fields specific to lodging.""" + check_in_date: Optional[date] = None """Date the customer checked in.""" @@ -1502,6 +1613,8 @@ class SourceCardRefundPurchaseDetailsTravelAncillaryService(BaseModel): class SourceCardRefundPurchaseDetailsTravelAncillary(BaseModel): + """Ancillary purchases in addition to the airfare.""" + connected_ticket_document_number: Optional[str] = None """ If this purchase has a connection or relationship to another purchase, such as a @@ -1563,6 +1676,8 @@ class SourceCardRefundPurchaseDetailsTravelTripLeg(BaseModel): class SourceCardRefundPurchaseDetailsTravel(BaseModel): + """Fields specific to travel.""" + ancillary: Optional[SourceCardRefundPurchaseDetailsTravelAncillary] = None """Ancillary purchases in addition to the airfare.""" @@ -1629,6 +1744,10 @@ class SourceCardRefundPurchaseDetailsTravel(BaseModel): class SourceCardRefundPurchaseDetails(BaseModel): + """ + Additional details about the card purchase, such as tax and industry-specific fields. + """ + car_rental: Optional[SourceCardRefundPurchaseDetailsCarRental] = None """Fields specific to car rentals.""" @@ -1676,6 +1795,11 @@ class SourceCardRefundPurchaseDetails(BaseModel): class SourceCardRefund(BaseModel): + """A Card Refund object. + + This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement an acquirer can also refund money directly to a card without relation to a transaction. + """ + id: str """The Card Refund identifier.""" @@ -1770,6 +1894,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardRevenuePayment(BaseModel): + """A Card Revenue Payment object. + + This field will be present in the JSON response if and only if `category` is equal to `card_revenue_payment`. Card Revenue Payments reflect earnings from fees on card transactions. + """ + amount: int """The amount in the minor unit of the transaction's currency. @@ -1807,6 +1936,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCardSettlementCashback(BaseModel): + """Cashback earned on this transaction, if eligible. + + Cashback is paid out in aggregate, monthly. + """ + amount: str """The cashback amount given as a string containing a decimal number. @@ -1822,6 +1956,8 @@ class SourceCardSettlementCashback(BaseModel): class SourceCardSettlementInterchange(BaseModel): + """Interchange assessed as a part of this transaction.""" + amount: str """ The interchange amount given as a string containing a decimal number in major @@ -1843,6 +1979,8 @@ class SourceCardSettlementInterchange(BaseModel): class SourceCardSettlementNetworkIdentifiers(BaseModel): + """Network-specific identifiers for this refund.""" + acquirer_business_id: str """ A network assigned business ID that identifies the acquirer that processed this @@ -1866,6 +2004,8 @@ class SourceCardSettlementNetworkIdentifiers(BaseModel): class SourceCardSettlementPurchaseDetailsCarRental(BaseModel): + """Fields specific to car rentals.""" + car_class_code: Optional[str] = None """Code indicating the vehicle's class.""" @@ -1953,6 +2093,8 @@ class SourceCardSettlementPurchaseDetailsCarRental(BaseModel): class SourceCardSettlementPurchaseDetailsLodging(BaseModel): + """Fields specific to lodging.""" + check_in_date: Optional[date] = None """Date the customer checked in.""" @@ -2099,6 +2241,8 @@ class SourceCardSettlementPurchaseDetailsTravelAncillaryService(BaseModel): class SourceCardSettlementPurchaseDetailsTravelAncillary(BaseModel): + """Ancillary purchases in addition to the airfare.""" + connected_ticket_document_number: Optional[str] = None """ If this purchase has a connection or relationship to another purchase, such as a @@ -2160,6 +2304,8 @@ class SourceCardSettlementPurchaseDetailsTravelTripLeg(BaseModel): class SourceCardSettlementPurchaseDetailsTravel(BaseModel): + """Fields specific to travel.""" + ancillary: Optional[SourceCardSettlementPurchaseDetailsTravelAncillary] = None """Ancillary purchases in addition to the airfare.""" @@ -2226,6 +2372,10 @@ class SourceCardSettlementPurchaseDetailsTravel(BaseModel): class SourceCardSettlementPurchaseDetails(BaseModel): + """ + Additional details about the card purchase, such as tax and industry-specific fields. + """ + car_rental: Optional[SourceCardSettlementPurchaseDetailsCarRental] = None """Fields specific to car rentals.""" @@ -2273,6 +2423,11 @@ class SourceCardSettlementPurchaseDetails(BaseModel): class SourceCardSettlementSurcharge(BaseModel): + """Surcharge amount details, if applicable. + + The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). + """ + amount: int """ The surcharge amount in the minor unit of the transaction's settlement currency. @@ -2286,6 +2441,11 @@ class SourceCardSettlementSurcharge(BaseModel): class SourceCardSettlement(BaseModel): + """A Card Settlement object. + + This field will be present in the JSON response if and only if `category` is equal to `card_settlement`. Card Settlements are card transactions that have cleared and settled. While a settlement is usually preceded by an authorization, an acquirer can also directly clear a transaction without first authorizing it. + """ + id: str """The Card Settlement identifier.""" @@ -2404,6 +2564,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCashbackPayment(BaseModel): + """A Cashback Payment object. + + This field will be present in the JSON response if and only if `category` is equal to `cashback_payment`. A Cashback Payment represents the cashback paid to a cardholder for a given period. Cashback is usually paid monthly for the prior month's transactions. + """ + accrued_on_card_id: Optional[str] = None """The card on which the cashback was accrued.""" @@ -2441,6 +2606,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckDepositAcceptance(BaseModel): + """A Check Deposit Acceptance object. + + This field will be present in the JSON response if and only if `category` is equal to `check_deposit_acceptance`. A Check Deposit Acceptance is created when a Check Deposit is processed and its details confirmed. Check Deposits may be returned by the receiving bank, which will appear as a Check Deposit Return. + """ + account_number: str """The account number printed on the check. @@ -2497,6 +2667,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckDepositReturn(BaseModel): + """A Check Deposit Return object. + + This field will be present in the JSON response if and only if `category` is equal to `check_deposit_return`. A Check Deposit Return is created when a Check Deposit is returned by the bank holding the account it was drawn against. Check Deposits may be returned for a variety of reasons, including insufficient funds or a mismatched account number. Usually, checks are returned within the first 7 days after the deposit is made. + """ + amount: int """The returned amount in USD cents.""" @@ -2612,6 +2787,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceCheckTransferDeposit(BaseModel): + """A Check Transfer Deposit object. + + This field will be present in the JSON response if and only if `category` is equal to `check_transfer_deposit`. An Inbound Check is a check drawn on an Increase account that has been deposited by an external bank account. These types of checks are not pre-registered. + """ + back_image_file_id: Optional[str] = None """ The identifier of the API File object containing an image of the back of the @@ -2666,6 +2846,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceFednowTransferAcknowledgement(BaseModel): + """A FedNow Transfer Acknowledgement object. + + This field will be present in the JSON response if and only if `category` is equal to `fednow_transfer_acknowledgement`. A FedNow Transfer Acknowledgement is created when a FedNow Transfer sent from Increase is acknowledged by the receiving bank. + """ + transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" @@ -2683,6 +2868,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceFeePayment(BaseModel): + """A Fee Payment object. + + This field will be present in the JSON response if and only if `category` is equal to `fee_payment`. A Fee Payment represents a payment made to Increase. + """ + amount: int """The amount in the minor unit of the transaction's currency. @@ -2722,11 +2912,15 @@ class SourceInboundACHTransferAddendaFreeformEntry(BaseModel): class SourceInboundACHTransferAddendaFreeform(BaseModel): + """Unstructured `payment_related_information` passed through by the originator.""" + entries: List[SourceInboundACHTransferAddendaFreeformEntry] """Each entry represents an addendum received from the originator.""" class SourceInboundACHTransferAddenda(BaseModel): + """Additional information sent from the originator.""" + category: Literal["freeform"] """The type of addendum. @@ -2738,6 +2932,11 @@ class SourceInboundACHTransferAddenda(BaseModel): class SourceInboundACHTransfer(BaseModel): + """An Inbound ACH Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_ach_transfer`. An Inbound ACH Transfer Intention is created when an ACH transfer is initiated at another bank and received by Increase. + """ + addenda: Optional[SourceInboundACHTransferAddenda] = None """Additional information sent from the originator.""" @@ -2798,6 +2997,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundACHTransferReturnIntention(BaseModel): + """An Inbound ACH Transfer Return Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_ach_transfer_return_intention`. An Inbound ACH Transfer Return Intention is created when an ACH transfer is initiated at another bank and returned by Increase. + """ + inbound_ach_transfer_id: str """The ID of the Inbound ACH Transfer that is being returned.""" @@ -2815,6 +3019,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundCheckAdjustment(BaseModel): + """An Inbound Check Adjustment object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_check_adjustment`. An Inbound Check Adjustment is created when Increase receives an adjustment for a check or return deposited through Check21. + """ + adjusted_transaction_id: str """The ID of the transaction that was adjusted.""" @@ -2850,6 +3059,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundCheckDepositReturnIntention(BaseModel): + """An Inbound Check Deposit Return Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_check_deposit_return_intention`. An Inbound Check Deposit Return Intention is created when Increase receives an Inbound Check and the User requests that it be returned. + """ + inbound_check_deposit_id: str """The ID of the Inbound Check Deposit that is being returned.""" @@ -2870,6 +3084,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundFednowTransferConfirmation(BaseModel): + """An Inbound FedNow Transfer Confirmation object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_fednow_transfer_confirmation`. An Inbound FedNow Transfer Confirmation is created when a FedNow transfer is initiated at another bank and received by Increase. + """ + transfer_id: str """The identifier of the FedNow Transfer that led to this Transaction.""" @@ -2887,6 +3106,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): + """An Inbound Real-Time Payments Transfer Confirmation object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_real_time_payments_transfer_confirmation`. An Inbound Real-Time Payments Transfer Confirmation is created when a Real-Time Payments transfer is initiated at another bank and received by Increase. + """ + amount: int """The amount in the minor unit of the transfer's currency. @@ -2936,6 +3160,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundWireReversal(BaseModel): + """An Inbound Wire Reversal object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_wire_reversal`. An Inbound Wire Reversal represents a reversal of a wire transfer that was initiated via Increase. The other bank is sending the money back. This most often happens when the original destination account details were incorrect. + """ + amount: int """The amount that was reversed in USD cents.""" @@ -3005,6 +3234,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundWireTransfer(BaseModel): + """An Inbound Wire Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_wire_transfer`. An Inbound Wire Transfer Intention is created when a wire transfer is initiated at another bank and received by Increase. + """ + amount: int """The amount in USD cents.""" @@ -3081,6 +3315,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInboundWireTransferReversal(BaseModel): + """An Inbound Wire Transfer Reversal Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `inbound_wire_transfer_reversal`. An Inbound Wire Transfer Reversal Intention is created when Increase has received a wire and the User requests that it be reversed. + """ + inbound_wire_transfer_id: str """The ID of the Inbound Wire Transfer that is being reversed.""" @@ -3098,6 +3337,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInterestPayment(BaseModel): + """An Interest Payment object. + + This field will be present in the JSON response if and only if `category` is equal to `interest_payment`. An Interest Payment represents a payment of interest on an account. Interest is usually paid monthly. + """ + accrued_on_account_id: str """The account on which the interest was accrued.""" @@ -3135,6 +3379,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceInternalSource(BaseModel): + """An Internal Source object. + + This field will be present in the JSON response if and only if `category` is equal to `internal_source`. A transaction between the user and Increase. See the `reason` attribute for more information. + """ + amount: int """The amount in the minor unit of the transaction's currency. @@ -3205,10 +3454,19 @@ def __getattr__(self, attr: str) -> object: ... class SourceOther(BaseModel): + """ + If the category of this Transaction source is equal to `other`, this field will contain an empty object, otherwise it will contain null. + """ + pass class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): + """A Real-Time Payments Transfer Acknowledgement object. + + This field will be present in the JSON response if and only if `category` is equal to `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer Acknowledgement is created when a Real-Time Payments Transfer sent from Increase is acknowledged by the receiving bank. + """ + amount: int """The transfer amount in USD cents.""" @@ -3238,6 +3496,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceSampleFunds(BaseModel): + """A Sample Funds object. + + This field will be present in the JSON response if and only if `category` is equal to `sample_funds`. Sample funds for testing purposes. + """ + originator: str """Where the sample funds came from.""" @@ -3255,6 +3518,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceSwiftTransferIntention(BaseModel): + """A Swift Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `swift_transfer_intention`. A Swift Transfer initiated via Increase. + """ + transfer_id: str """The identifier of the Swift Transfer that led to this Transaction.""" @@ -3272,6 +3540,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceSwiftTransferReturn(BaseModel): + """A Swift Transfer Return object. + + This field will be present in the JSON response if and only if `category` is equal to `swift_transfer_return`. A Swift Transfer Return is created when a Swift Transfer is returned by the receiving bank. + """ + transfer_id: str """The identifier of the Swift Transfer that led to this Transaction.""" @@ -3289,6 +3562,11 @@ def __getattr__(self, attr: str) -> object: ... class SourceWireTransferIntention(BaseModel): + """A Wire Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `wire_transfer_intention`. A Wire Transfer initiated via Increase and sent to a different bank. + """ + account_number: str """The destination account number.""" @@ -3318,6 +3596,10 @@ def __getattr__(self, attr: str) -> object: ... class Source(BaseModel): + """ + This is an object giving more details on the network-level event that caused the Transaction. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future. + """ + account_revenue_payment: Optional[SourceAccountRevenuePayment] = None """An Account Revenue Payment object. @@ -3755,6 +4037,10 @@ def __getattr__(self, attr: str) -> object: ... class Transaction(BaseModel): + """ + Transactions are the immutable additions and removals of money from your bank account. They're the equivalent of line items on your bank statement. To learn more, see [Transactions and Transfers](/documentation/transactions-transfers). + """ + id: str """The Transaction identifier.""" diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index c6114d64d..e797756b6 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -10,6 +10,8 @@ class CreditorAddress(BaseModel): + """The creditor's address.""" + city: str """The city, district, town, or village of the address.""" @@ -34,6 +36,8 @@ class CreditorAddress(BaseModel): class DebtorAddress(BaseModel): + """The debtor's address.""" + city: str """The city, district, town, or village of the address.""" @@ -58,6 +62,10 @@ class DebtorAddress(BaseModel): class Submission(BaseModel): + """ + After the drawdown request is submitted to Fedwire, this will contain supplemental details. + """ + input_message_accountability_data: str """ The input message accountability data (IMAD) uniquely identifying the submission @@ -66,6 +74,11 @@ class Submission(BaseModel): class WireDrawdownRequest(BaseModel): + """Wire drawdown requests enable you to request that someone else send you a wire. + + Because there is nuance to making sure your counterparty's bank processes these correctly, we ask that you reach out to [support@increase.com](mailto:support@increase.com) to enable this feature so we can help you plan your integration. For more information, see our [Wire Drawdown Requests documentation](/documentation/wire-drawdown-requests). + """ + id: str """The Wire drawdown request identifier.""" diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index d7d44da47..aca2bee42 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -44,6 +44,8 @@ class WireDrawdownRequestCreateParams(TypedDict, total=False): class CreditorAddress(TypedDict, total=False): + """The creditor's address.""" + city: Required[str] """The city, district, town, or village of the address.""" @@ -68,6 +70,8 @@ class CreditorAddress(TypedDict, total=False): class DebtorAddress(TypedDict, total=False): + """The debtor's address.""" + city: Required[str] """The city, district, town, or village of the address.""" diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 218fa97c9..3a1aa033f 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -31,6 +31,10 @@ class Approval(BaseModel): + """ + If your account requires approvals for transfers and the transfer was approved, this will contain details of the approval. + """ + approved_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -45,6 +49,10 @@ class Approval(BaseModel): class Cancellation(BaseModel): + """ + If your account requires approvals for transfers and the transfer was not approved, this will contain details of the cancellation. + """ + canceled_at: datetime.datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -59,21 +67,29 @@ class Cancellation(BaseModel): class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + description: Optional[str] = None """The description set for the API key when it was created.""" class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + name: str """The name of the OAuth Application.""" class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + email: str """The email address of the User.""" class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + api_key: Optional[CreatedByAPIKey] = None """If present, details about the API key that created the transfer.""" @@ -95,6 +111,8 @@ class CreatedBy(BaseModel): class CreditorAddressUnstructured(BaseModel): + """Unstructured address lines.""" + line1: Optional[str] = None """The first line.""" @@ -106,11 +124,15 @@ class CreditorAddressUnstructured(BaseModel): class CreditorAddress(BaseModel): + """The person or business's address.""" + unstructured: Optional[CreditorAddressUnstructured] = None """Unstructured address lines.""" class Creditor(BaseModel): + """The person or business that is receiving the funds from the transfer.""" + address: Optional[CreditorAddress] = None """The person or business's address.""" @@ -119,6 +141,8 @@ class Creditor(BaseModel): class DebtorAddressUnstructured(BaseModel): + """Unstructured address lines.""" + line1: Optional[str] = None """The first line.""" @@ -130,11 +154,15 @@ class DebtorAddressUnstructured(BaseModel): class DebtorAddress(BaseModel): + """The person or business's address.""" + unstructured: Optional[DebtorAddressUnstructured] = None """Unstructured address lines.""" class Debtor(BaseModel): + """The person or business whose funds are being transferred.""" + address: Optional[DebtorAddress] = None """The person or business's address.""" @@ -143,6 +171,11 @@ class Debtor(BaseModel): class RemittanceTax(BaseModel): + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + date: datetime.date """The month and year the tax payment is for, in YYYY-MM-DD format. @@ -160,11 +193,18 @@ class RemittanceTax(BaseModel): class RemittanceUnstructured(BaseModel): + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ + message: str """The message to the beneficiary.""" class Remittance(BaseModel): + """Remittance information sent with the wire transfer.""" + category: Literal["unstructured", "tax"] """The type of remittance information being passed. @@ -188,6 +228,8 @@ class Remittance(BaseModel): class Reversal(BaseModel): + """If your transfer is reversed, this will contain details of the reversal.""" + amount: int """The amount that was reversed in USD cents.""" @@ -257,6 +299,10 @@ def __getattr__(self, attr: str) -> object: ... class Submission(BaseModel): + """ + After the transfer is submitted to Fedwire, this will contain supplemental details. + """ + input_message_accountability_data: str """The accountability data for the submission.""" @@ -265,6 +311,10 @@ class Submission(BaseModel): class WireTransfer(BaseModel): + """ + Wire transfers move funds between your Increase account and any other account accessible by Fedwire. + """ + id: str """The wire transfer's identifier.""" diff --git a/src/increase/types/wire_transfer_create_params.py b/src/increase/types/wire_transfer_create_params.py index 6786b5629..84bdd3abc 100644 --- a/src/increase/types/wire_transfer_create_params.py +++ b/src/increase/types/wire_transfer_create_params.py @@ -72,6 +72,8 @@ class WireTransferCreateParams(TypedDict, total=False): class CreditorAddressUnstructured(TypedDict, total=False): + """Unstructured address lines.""" + line1: Required[str] """The address line 1.""" @@ -83,11 +85,15 @@ class CreditorAddressUnstructured(TypedDict, total=False): class CreditorAddress(TypedDict, total=False): + """The person or business's address.""" + unstructured: Required[CreditorAddressUnstructured] """Unstructured address lines.""" class Creditor(TypedDict, total=False): + """The person or business that is receiving the funds from the transfer.""" + name: Required[str] """The person or business's name.""" @@ -96,6 +102,11 @@ class Creditor(TypedDict, total=False): class RemittanceTax(TypedDict, total=False): + """Internal Revenue Service (IRS) tax repayment information. + + Required if `category` is equal to `tax`. + """ + date: Required[Annotated[Union[str, datetime.date], PropertyInfo(format="iso8601")]] """The month and year the tax payment is for, in YYYY-MM-DD format. @@ -113,11 +124,18 @@ class RemittanceTax(TypedDict, total=False): class RemittanceUnstructured(TypedDict, total=False): + """Unstructured remittance information. + + Required if `category` is equal to `unstructured`. + """ + message: Required[str] """The information.""" class Remittance(TypedDict, total=False): + """Additional remittance information related to the wire transfer.""" + category: Required[Literal["unstructured", "tax"]] """The type of remittance information being passed. @@ -141,6 +159,8 @@ class Remittance(TypedDict, total=False): class DebtorAddressUnstructured(TypedDict, total=False): + """Unstructured address lines.""" + line1: Required[str] """The address line 1.""" @@ -152,11 +172,18 @@ class DebtorAddressUnstructured(TypedDict, total=False): class DebtorAddress(TypedDict, total=False): + """The person or business's address.""" + unstructured: Required[DebtorAddressUnstructured] """Unstructured address lines.""" class Debtor(TypedDict, total=False): + """The person or business whose funds are being transferred. + + This is only necessary if you're transferring from a commingled account. Otherwise, we'll use the associated entity's details. + """ + name: Required[str] """The person or business's name.""" From aa6dc87439233c25ab5ee13d21f730119ea9bd7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:00:19 +0000 Subject: [PATCH 1045/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 3 ++- src/increase/types/entity_create_params.py | 3 ++- src/increase/types/entity_update_params.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index f25fc9162..62bd5d7e3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-db504b55f81ac4d64ccbfc4d2fecdd346b2a671da840afd3b47fd499ea52e640.yml -openapi_spec_hash: 06d1e20101565b4c8ba616cfa84fbfdd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-56334e000721ba4ee20536271d3acf7231529d7b1f651729e2f4ebe75eb12048.yml +openapi_spec_hash: 45777c412bcbc1aead50c84f78695203 config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index b63a9c032..bb1af1ee2 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -445,12 +445,13 @@ class ThirdPartyVerification(BaseModel): reference: str """The reference identifier for the third party verification.""" - vendor: Literal["alloy", "middesk", "oscilar"] + vendor: Literal["alloy", "middesk", "oscilar", "persona"] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. + - `persona` - Persona. See https://withpersona.com for more information. """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 182479f22..f02ce2fdb 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -839,12 +839,13 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy", "middesk", "oscilar"]] + vendor: Required[Literal["alloy", "middesk", "oscilar", "persona"]] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. + - `persona` - Persona. See https://withpersona.com for more information. """ diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 4da1dbf9b..a4a324c54 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -232,12 +232,13 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy", "middesk", "oscilar"]] + vendor: Required[Literal["alloy", "middesk", "oscilar", "persona"]] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. + - `persona` - Persona. See https://withpersona.com for more information. """ From ffed4a20b3e8d984764131b6a7392ee37c2a04d6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:03:14 +0000 Subject: [PATCH 1046/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 323261fc3..8e585de79 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.406.1" + ".": "0.407.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 79fd56f26..e60dea4fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.406.1" +version = "0.407.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 40bafa3e3..d67452072 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.406.1" # x-release-please-version +__version__ = "0.407.0" # x-release-please-version From 16dcd9f9b3042c9c502a5553b12d615d242968cf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:20:42 +0000 Subject: [PATCH 1047/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/event_subscriptions.py | 6 + src/increase/resources/real_time_decisions.py | 10 + src/increase/types/event.py | 3 + src/increase/types/event_list_params.py | 1 + src/increase/types/event_subscription.py | 3 + .../types/event_subscription_create_params.py | 3 + src/increase/types/real_time_decision.py | 608 ++++++++++++++++++ .../types/real_time_decision_action_params.py | 36 ++ .../api_resources/test_real_time_decisions.py | 8 + 10 files changed, 680 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 62bd5d7e3..537cdff67 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-56334e000721ba4ee20536271d3acf7231529d7b1f651729e2f4ebe75eb12048.yml -openapi_spec_hash: 45777c412bcbc1aead50c84f78695203 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-942f7494ee0f14c1634ede0989985359cea633e5eece3d761910e7ffd6ac0fd8.yml +openapi_spec_hash: d87134899fb29e27832158facf9d67eb config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index faa477930..a732bbfce 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -135,6 +135,7 @@ def create( "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", @@ -299,6 +300,8 @@ def create( Authorization Request is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet provisioning attempt. @@ -626,6 +629,7 @@ async def create( "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", @@ -790,6 +794,8 @@ async def create( Authorization Request is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet provisioning attempt. diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 70ca02c13..4099e3c2e 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -85,6 +85,7 @@ def action( card_authentication: real_time_decision_action_params.CardAuthentication | Omit = omit, card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge | Omit = omit, card_authorization: real_time_decision_action_params.CardAuthorization | Omit = omit, + card_balance_inquiry: real_time_decision_action_params.CardBalanceInquiry | Omit = omit, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | Omit = omit, digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -110,6 +111,9 @@ def action( card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. + card_balance_inquiry: If the Real-Time Decision relates to a card balance inquiry attempt, this object + contains your response to the inquiry. + digital_wallet_authentication: If the Real-Time Decision relates to a digital wallet authentication attempt, this object contains your response to the authentication. @@ -137,6 +141,7 @@ def action( "card_authentication": card_authentication, "card_authentication_challenge": card_authentication_challenge, "card_authorization": card_authorization, + "card_balance_inquiry": card_balance_inquiry, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, }, @@ -217,6 +222,7 @@ async def action( card_authentication: real_time_decision_action_params.CardAuthentication | Omit = omit, card_authentication_challenge: real_time_decision_action_params.CardAuthenticationChallenge | Omit = omit, card_authorization: real_time_decision_action_params.CardAuthorization | Omit = omit, + card_balance_inquiry: real_time_decision_action_params.CardBalanceInquiry | Omit = omit, digital_wallet_authentication: real_time_decision_action_params.DigitalWalletAuthentication | Omit = omit, digital_wallet_token: real_time_decision_action_params.DigitalWalletToken | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -242,6 +248,9 @@ async def action( card_authorization: If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. + card_balance_inquiry: If the Real-Time Decision relates to a card balance inquiry attempt, this object + contains your response to the inquiry. + digital_wallet_authentication: If the Real-Time Decision relates to a digital wallet authentication attempt, this object contains your response to the authentication. @@ -269,6 +278,7 @@ async def action( "card_authentication": card_authentication, "card_authentication_challenge": card_authentication_challenge, "card_authorization": card_authorization, + "card_balance_inquiry": card_balance_inquiry, "digital_wallet_authentication": digital_wallet_authentication, "digital_wallet_token": digital_wallet_token, }, diff --git a/src/increase/types/event.py b/src/increase/types/event.py index e040c26e1..906307e02 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -109,6 +109,7 @@ class Event(BaseModel): "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", @@ -255,6 +256,8 @@ class Event(BaseModel): Authorization Request is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet provisioning attempt. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index e2bbb4c45..d26640c14 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -119,6 +119,7 @@ class EventListParams(TypedDict, total=False): "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 4fa59584f..488fc5a44 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -122,6 +122,7 @@ class EventSubscription(BaseModel): "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", @@ -268,6 +269,8 @@ class EventSubscription(BaseModel): Authorization Request is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet provisioning attempt. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 68346473f..46a68ffe5 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -103,6 +103,7 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "proof_of_authorization_request.created", "proof_of_authorization_request.updated", "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", "real_time_decision.digital_wallet_token_requested", "real_time_decision.digital_wallet_authentication_requested", "real_time_decision.card_authentication_requested", @@ -248,6 +249,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): Authorization Request is updated. - `real_time_decision.card_authorization_requested` - Occurs whenever a Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a Real-Time Decision is created in response to a digital wallet provisioning attempt. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 72fe24fbf..5d891ca4d 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -36,6 +36,26 @@ "CardAuthorizationVerification", "CardAuthorizationVerificationCardVerificationCode", "CardAuthorizationVerificationCardholderAddress", + "CardBalanceInquiry", + "CardBalanceInquiryAdditionalAmounts", + "CardBalanceInquiryAdditionalAmountsClinic", + "CardBalanceInquiryAdditionalAmountsDental", + "CardBalanceInquiryAdditionalAmountsOriginal", + "CardBalanceInquiryAdditionalAmountsPrescription", + "CardBalanceInquiryAdditionalAmountsSurcharge", + "CardBalanceInquiryAdditionalAmountsTotalCumulative", + "CardBalanceInquiryAdditionalAmountsTotalHealthcare", + "CardBalanceInquiryAdditionalAmountsTransit", + "CardBalanceInquiryAdditionalAmountsUnknown", + "CardBalanceInquiryAdditionalAmountsVision", + "CardBalanceInquiryApproval", + "CardBalanceInquiryNetworkDetails", + "CardBalanceInquiryNetworkDetailsPulse", + "CardBalanceInquiryNetworkDetailsVisa", + "CardBalanceInquiryNetworkIdentifiers", + "CardBalanceInquiryVerification", + "CardBalanceInquiryVerificationCardVerificationCode", + "CardBalanceInquiryVerificationCardholderAddress", "DigitalWalletAuthentication", "DigitalWalletToken", "DigitalWalletTokenDevice", @@ -837,6 +857,589 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class CardBalanceInquiryAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class CardBalanceInquiryAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + + clinic: Optional[CardBalanceInquiryAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[CardBalanceInquiryAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + original: Optional[CardBalanceInquiryAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + + prescription: Optional[CardBalanceInquiryAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[CardBalanceInquiryAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[CardBalanceInquiryAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[CardBalanceInquiryAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[CardBalanceInquiryAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[CardBalanceInquiryAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[CardBalanceInquiryAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + +class CardBalanceInquiryApproval(BaseModel): + """Present if and only if `decision` is `approve`. + + Contains information related to the approval of the balance inquiry. + """ + + balance: int + """ + If the balance inquiry was approved, this field contains the balance in the + minor unit of the settlement currency. + """ + + +class CardBalanceInquiryNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + + pass + + +class CardBalanceInquiryNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however, cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class CardBalanceInquiryNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + + category: Literal["visa", "pulse"] + """The payment network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + pulse: Optional[CardBalanceInquiryNetworkDetailsPulse] = None + """Fields specific to the `pulse` network.""" + + visa: Optional[CardBalanceInquiryNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class CardBalanceInquiryNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class CardBalanceInquiryVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class CardBalanceInquiryVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class CardBalanceInquiryVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + + card_verification_code: CardBalanceInquiryVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: CardBalanceInquiryVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class CardBalanceInquiry(BaseModel): + """Fields related to a card balance inquiry.""" + + account_id: str + """The identifier of the Account the authorization will debit.""" + + additional_amounts: CardBalanceInquiryAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + approval: Optional[CardBalanceInquiryApproval] = None + """Present if and only if `decision` is `approve`. + + Contains information related to the approval of the balance inquiry. + """ + + card_id: str + """The identifier of the Card that is being authorized.""" + + decision: Optional[Literal["approve", "decline"]] = None + """Whether or not the authorization was approved. + + - `approve` - Approve the authorization. + - `decline` - Decline the authorization. + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: CardBalanceInquiryNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: CardBalanceInquiryNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + upcoming_card_payment_id: str + """The identifier of the Card Payment this authorization will belong to. + + Available in the API once the card authorization has completed. + """ + + verification: CardBalanceInquiryVerification + """Fields related to verification of cardholder-provided values.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + class DigitalWalletAuthentication(BaseModel): """Fields related to a digital wallet authentication attempt.""" @@ -933,8 +1536,12 @@ class RealTimeDecision(BaseModel): card_authorization: Optional[CardAuthorization] = None """Fields related to a card authorization.""" + card_balance_inquiry: Optional[CardBalanceInquiry] = None + """Fields related to a card balance inquiry.""" + category: Literal[ "card_authorization_requested", + "card_balance_inquiry_requested", "card_authentication_requested", "card_authentication_challenge_requested", "digital_wallet_token_requested", @@ -943,6 +1550,7 @@ class RealTimeDecision(BaseModel): """The category of the Real-Time Decision. - `card_authorization_requested` - A card is being authorized. + - `card_balance_inquiry_requested` - A balance inquiry is being made on a card. - `card_authentication_requested` - 3DS authentication is requested. - `card_authentication_challenge_requested` - 3DS authentication challenge requires cardholder involvement. diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 2040b623e..decc8849f 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -13,6 +13,8 @@ "CardAuthorizationApproval", "CardAuthorizationApprovalCardholderAddressVerificationResult", "CardAuthorizationDecline", + "CardBalanceInquiry", + "CardBalanceInquiryApproval", "DigitalWalletAuthentication", "DigitalWalletAuthenticationSuccess", "DigitalWalletToken", @@ -40,6 +42,12 @@ class RealTimeDecisionActionParams(TypedDict, total=False): contains your response to the authorization. """ + card_balance_inquiry: CardBalanceInquiry + """ + If the Real-Time Decision relates to a card balance inquiry attempt, this object + contains your response to the inquiry. + """ + digital_wallet_authentication: DigitalWalletAuthentication """ If the Real-Time Decision relates to a digital wallet authentication attempt, @@ -198,6 +206,34 @@ class CardAuthorizationTyped(TypedDict, total=False): CardAuthorization: TypeAlias = Union[CardAuthorizationTyped, Dict[str, object]] +class CardBalanceInquiryApproval(TypedDict, total=False): + """ + If your application approves the balance inquiry, this contains metadata about your decision to approve. + """ + + balance: Required[int] + """The balance on the card in the settlement currency of the transaction.""" + + +class CardBalanceInquiry(TypedDict, total=False): + """ + If the Real-Time Decision relates to a card balance inquiry attempt, this object contains your response to the inquiry. + """ + + decision: Required[Literal["approve", "decline"]] + """Whether the card balance inquiry should be approved or declined. + + - `approve` - Approve the authorization. + - `decline` - Decline the authorization. + """ + + approval: CardBalanceInquiryApproval + """ + If your application approves the balance inquiry, this contains metadata about + your decision to approve. + """ + + class DigitalWalletAuthenticationSuccess(TypedDict, total=False): """ If your application was able to deliver the one-time passcode, this contains metadata about the delivery. Exactly one of `phone` or `email` must be provided. diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index a547359a4..57855613a 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -79,6 +79,10 @@ def test_method_action_with_all_params(self, client: Increase) -> None: }, "decline": {"reason": "insufficient_funds"}, }, + card_balance_inquiry={ + "decision": "approve", + "approval": {"balance": 0}, + }, digital_wallet_authentication={ "result": "success", "success": { @@ -195,6 +199,10 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) }, "decline": {"reason": "insufficient_funds"}, }, + card_balance_inquiry={ + "decision": "approve", + "approval": {"balance": 0}, + }, digital_wallet_authentication={ "result": "success", "success": { From d8bb97186c92cb2b04e9673425bd020cfadf07e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:23:23 +0000 Subject: [PATCH 1048/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8e585de79..85c79bb04 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.407.0" + ".": "0.408.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e60dea4fd..29dd6190f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.407.0" +version = "0.408.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d67452072..ae6507db9 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.407.0" # x-release-please-version +__version__ = "0.408.0" # x-release-please-version From a29bc869fd01650c82ef6c24e8eeff7b1b382fb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:54:34 +0000 Subject: [PATCH 1049/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 611 +++++++++++++++++++++++++++++ 2 files changed, 613 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 537cdff67..f5d26caa7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-942f7494ee0f14c1634ede0989985359cea633e5eece3d761910e7ffd6ac0fd8.yml -openapi_spec_hash: d87134899fb29e27832158facf9d67eb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-79f55910f087930ab5447372ef856ab63fe18f08d2151c59b8aebcccd6f41700.yml +openapi_spec_hash: 5b6d915106e3361863168d9b084a570c config_hash: b6f365add90e618b2174634df140826e diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 5f3c177da..ad45d6e3a 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -34,6 +34,25 @@ "ElementCardAuthorizationVerificationCardVerificationCode", "ElementCardAuthorizationVerificationCardholderAddress", "ElementCardAuthorizationExpiration", + "ElementCardBalanceInquiry", + "ElementCardBalanceInquiryAdditionalAmounts", + "ElementCardBalanceInquiryAdditionalAmountsClinic", + "ElementCardBalanceInquiryAdditionalAmountsDental", + "ElementCardBalanceInquiryAdditionalAmountsOriginal", + "ElementCardBalanceInquiryAdditionalAmountsPrescription", + "ElementCardBalanceInquiryAdditionalAmountsSurcharge", + "ElementCardBalanceInquiryAdditionalAmountsTotalCumulative", + "ElementCardBalanceInquiryAdditionalAmountsTotalHealthcare", + "ElementCardBalanceInquiryAdditionalAmountsTransit", + "ElementCardBalanceInquiryAdditionalAmountsUnknown", + "ElementCardBalanceInquiryAdditionalAmountsVision", + "ElementCardBalanceInquiryNetworkDetails", + "ElementCardBalanceInquiryNetworkDetailsPulse", + "ElementCardBalanceInquiryNetworkDetailsVisa", + "ElementCardBalanceInquiryNetworkIdentifiers", + "ElementCardBalanceInquiryVerification", + "ElementCardBalanceInquiryVerificationCardVerificationCode", + "ElementCardBalanceInquiryVerificationCardholderAddress", "ElementCardDecline", "ElementCardDeclineAdditionalAmounts", "ElementCardDeclineAdditionalAmountsClinic", @@ -1031,6 +1050,586 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class ElementCardBalanceInquiryAdditionalAmountsClinic(BaseModel): + """The part of this transaction amount that was for clinic-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsDental(BaseModel): + """The part of this transaction amount that was for dental-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsOriginal(BaseModel): + """The original pre-authorized amount.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsPrescription(BaseModel): + """The part of this transaction amount that was for healthcare prescriptions.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsSurcharge(BaseModel): + """The surcharge amount charged for this transaction by the merchant.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsTotalCumulative(BaseModel): + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsTotalHealthcare(BaseModel): + """The total amount of healthcare-related additional amounts.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsTransit(BaseModel): + """The part of this transaction amount that was for transit-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsUnknown(BaseModel): + """An unknown additional amount.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmountsVision(BaseModel): + """The part of this transaction amount that was for vision-related services.""" + + amount: int + """The amount in minor units of the `currency` field. + + The amount is positive if it is added to the amount (such as an ATM surcharge + fee) and negative if it is subtracted from the amount (such as a discount). + """ + + currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the additional + amount's currency. + """ + + +class ElementCardBalanceInquiryAdditionalAmounts(BaseModel): + """ + Additional amounts associated with the card authorization, such as ATM surcharges fees. These are usually a subset of the `amount` field and are used to provide more detailed information about the transaction. + """ + + clinic: Optional[ElementCardBalanceInquiryAdditionalAmountsClinic] = None + """The part of this transaction amount that was for clinic-related services.""" + + dental: Optional[ElementCardBalanceInquiryAdditionalAmountsDental] = None + """The part of this transaction amount that was for dental-related services.""" + + original: Optional[ElementCardBalanceInquiryAdditionalAmountsOriginal] = None + """The original pre-authorized amount.""" + + prescription: Optional[ElementCardBalanceInquiryAdditionalAmountsPrescription] = None + """The part of this transaction amount that was for healthcare prescriptions.""" + + surcharge: Optional[ElementCardBalanceInquiryAdditionalAmountsSurcharge] = None + """The surcharge amount charged for this transaction by the merchant.""" + + total_cumulative: Optional[ElementCardBalanceInquiryAdditionalAmountsTotalCumulative] = None + """ + The total amount of a series of incremental authorizations, optionally provided. + """ + + total_healthcare: Optional[ElementCardBalanceInquiryAdditionalAmountsTotalHealthcare] = None + """The total amount of healthcare-related additional amounts.""" + + transit: Optional[ElementCardBalanceInquiryAdditionalAmountsTransit] = None + """The part of this transaction amount that was for transit-related services.""" + + unknown: Optional[ElementCardBalanceInquiryAdditionalAmountsUnknown] = None + """An unknown additional amount.""" + + vision: Optional[ElementCardBalanceInquiryAdditionalAmountsVision] = None + """The part of this transaction amount that was for vision-related services.""" + + +class ElementCardBalanceInquiryNetworkDetailsPulse(BaseModel): + """Fields specific to the `pulse` network.""" + + pass + + +class ElementCardBalanceInquiryNetworkDetailsVisa(BaseModel): + """Fields specific to the `visa` network.""" + + electronic_commerce_indicator: Optional[ + Literal[ + "mail_phone_order", + "recurring", + "installment", + "unknown_mail_phone_order", + "secure_electronic_commerce", + "non_authenticated_security_transaction_at_3ds_capable_merchant", + "non_authenticated_security_transaction", + "non_secure_transaction", + ] + ] = None + """ + For electronic commerce transactions, this identifies the level of security used + in obtaining the customer's payment credential. For mail or telephone order + transactions, identifies the type of mail or telephone order. + + - `mail_phone_order` - Single transaction of a mail/phone order: Use to indicate + that the transaction is a mail/phone order purchase, not a recurring + transaction or installment payment. For domestic transactions in the US + region, this value may also indicate one bill payment transaction in the + card-present or card-absent environments. + - `recurring` - Recurring transaction: Payment indicator used to indicate a + recurring transaction that originates from an acquirer in the US region. + - `installment` - Installment payment: Payment indicator used to indicate one + purchase of goods or services that is billed to the account in multiple + charges over a period of time agreed upon by the cardholder and merchant from + transactions that originate from an acquirer in the US region. + - `unknown_mail_phone_order` - Unknown classification: other mail order: Use to + indicate that the type of mail/telephone order is unknown. + - `secure_electronic_commerce` - Secure electronic commerce transaction: Use to + indicate that the electronic commerce transaction has been authenticated using + e.g., 3-D Secure + - `non_authenticated_security_transaction_at_3ds_capable_merchant` - + Non-authenticated security transaction at a 3-D Secure-capable merchant, and + merchant attempted to authenticate the cardholder using 3-D Secure: Use to + identify an electronic commerce transaction where the merchant attempted to + authenticate the cardholder using 3-D Secure, but was unable to complete the + authentication because the issuer or cardholder does not participate in the + 3-D Secure program. + - `non_authenticated_security_transaction` - Non-authenticated security + transaction: Use to identify an electronic commerce transaction that uses data + encryption for security however, cardholder authentication is not performed + using 3-D Secure. + - `non_secure_transaction` - Non-secure transaction: Use to identify an + electronic commerce transaction that has no data protection. + """ + + point_of_service_entry_mode: Optional[ + Literal[ + "unknown", + "manual", + "magnetic_stripe_no_cvv", + "optical_code", + "integrated_circuit_card", + "contactless", + "credential_on_file", + "magnetic_stripe", + "contactless_magnetic_stripe", + "integrated_circuit_card_no_cvv", + ] + ] = None + """ + The method used to enter the cardholder's primary account number and card + expiration date. + + - `unknown` - Unknown + - `manual` - Manual key entry + - `magnetic_stripe_no_cvv` - Magnetic stripe read, without card verification + value + - `optical_code` - Optical code + - `integrated_circuit_card` - Contact chip card + - `contactless` - Contactless read of chip card + - `credential_on_file` - Transaction initiated using a credential that has + previously been stored on file + - `magnetic_stripe` - Magnetic stripe read + - `contactless_magnetic_stripe` - Contactless read of magnetic stripe data + - `integrated_circuit_card_no_cvv` - Contact chip card, without card + verification value + """ + + stand_in_processing_reason: Optional[ + Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + ] = None + """Only present when `actioner: network`. + + Describes why a card authorization was approved or declined by Visa through + stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class ElementCardBalanceInquiryNetworkDetails(BaseModel): + """Fields specific to the `network`.""" + + category: Literal["visa", "pulse"] + """The payment network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + pulse: Optional[ElementCardBalanceInquiryNetworkDetailsPulse] = None + """Fields specific to the `pulse` network.""" + + visa: Optional[ElementCardBalanceInquiryNetworkDetailsVisa] = None + """Fields specific to the `visa` network.""" + + +class ElementCardBalanceInquiryNetworkIdentifiers(BaseModel): + """Network-specific identifiers for a specific request or transaction.""" + + authorization_identification_response: Optional[str] = None + """ + The randomly generated 6-character Authorization Identification Response code + sent back to the acquirer in an approved response. + """ + + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class ElementCardBalanceInquiryVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardBalanceInquiryVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class ElementCardBalanceInquiryVerification(BaseModel): + """Fields related to verification of cardholder-provided values.""" + + card_verification_code: ElementCardBalanceInquiryVerificationCardVerificationCode + """ + Fields related to verification of the Card Verification Code, a 3-digit code on + the back of the card. + """ + + cardholder_address: ElementCardBalanceInquiryVerificationCardholderAddress + """ + Cardholder address provided in the authorization request and the address on file + we verified it against. + """ + + +class ElementCardBalanceInquiry(BaseModel): + """A Card Balance Inquiry object. + + This field will be present in the JSON response if and only if `category` is equal to `card_balance_inquiry`. Card Balance Inquiries are transactions that allow merchants to check the available balance on a card without placing a hold on funds, commonly used when a customer requests their balance at an ATM. + """ + + id: str + """The Card Balance Inquiry identifier.""" + + additional_amounts: ElementCardBalanceInquiryAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + balance: int + """The balance amount in the minor unit of the account's currency. + + For dollars, for example, this is cents. + """ + + card_payment_id: str + """The ID of the Card Payment this transaction belongs to.""" + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the account's + currency. + + - `USD` - US Dollar (USD) + """ + + digital_wallet_token_id: Optional[str] = None + """ + If the authorization was made via a Digital Wallet Token (such as an Apple Pay + purchase), the identifier of the token that was used. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: Optional[str] = None + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_postal_code: Optional[str] = None + """The merchant's postal code. + + For US merchants this is either a 5-digit or 9-digit ZIP code, where the first 5 + and last 4 are separated by a dash. + """ + + merchant_state: Optional[str] = None + """The state the merchant resides in.""" + + network_details: ElementCardBalanceInquiryNetworkDetails + """Fields specific to the `network`.""" + + network_identifiers: ElementCardBalanceInquiryNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. For Pulse the score is from 0 to 999, where 999 is the + riskiest. + """ + + physical_card_id: Optional[str] = None + """ + If the authorization was made in-person with a physical card, the Physical Card + that was used. + """ + + real_time_decision_id: Optional[str] = None + """ + The identifier of the Real-Time Decision sent to approve or decline this + transaction. + """ + + terminal_id: Optional[str] = None + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + type: Literal["card_balance_inquiry"] + """A constant representing the object's type. + + For this resource it will always be `card_balance_inquiry`. + """ + + verification: ElementCardBalanceInquiryVerification + """Fields related to verification of cardholder-provided values.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + class ElementCardDeclineAdditionalAmountsClinic(BaseModel): """The part of this transaction amount that was for clinic-related services.""" @@ -4850,6 +5449,15 @@ class Element(BaseModel): cancellations of authorizations that were never settled by the acquirer. """ + card_balance_inquiry: Optional[ElementCardBalanceInquiry] = None + """A Card Balance Inquiry object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_balance_inquiry`. Card Balance Inquiries are transactions that + allow merchants to check the available balance on a card without placing a hold + on funds, commonly used when a customer requests their balance at an ATM. + """ + card_decline: Optional[ElementCardDecline] = None """A Card Decline object. @@ -4919,6 +5527,7 @@ class Element(BaseModel): category: Literal[ "card_authorization", "card_authentication", + "card_balance_inquiry", "card_validation", "card_decline", "card_reversal", @@ -4939,6 +5548,8 @@ class Element(BaseModel): `card_authorization` object. - `card_authentication` - Card Authentication: details will be under the `card_authentication` object. + - `card_balance_inquiry` - Card Balance Inquiry: details will be under the + `card_balance_inquiry` object. - `card_validation` - Inbound Card Validation: details will be under the `card_validation` object. - `card_decline` - Card Decline: details will be under the `card_decline` From 9d55ef13dc1f14bbef90d7d3c1730bf6f68d8663 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 8 Dec 2025 23:57:42 +0000 Subject: [PATCH 1050/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 85c79bb04..bfd4e4464 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.408.0" + ".": "0.409.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 29dd6190f..edf35f866 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.408.0" +version = "0.409.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ae6507db9..e1141bd6c 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.408.0" # x-release-please-version +__version__ = "0.409.0" # x-release-please-version From 096db44effeedf9175660d98c06270eace72edf6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 01:33:46 +0000 Subject: [PATCH 1051/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 6 + .../resources/simulations/__init__.py | 14 + .../simulations/card_balance_inquiries.py | 425 ++++++++++++++++++ .../resources/simulations/simulations.py | 32 ++ src/increase/types/simulations/__init__.py | 1 + .../card_balance_inquiry_create_params.py | 167 +++++++ .../test_card_balance_inquiries.py | 116 +++++ 8 files changed, 765 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/simulations/card_balance_inquiries.py create mode 100644 src/increase/types/simulations/card_balance_inquiry_create_params.py create mode 100644 tests/api_resources/simulations/test_card_balance_inquiries.py diff --git a/.stats.yml b/.stats.yml index f5d26caa7..f4cd30496 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 229 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-79f55910f087930ab5447372ef856ab63fe18f08d2151c59b8aebcccd6f41700.yml -openapi_spec_hash: 5b6d915106e3361863168d9b084a570c -config_hash: b6f365add90e618b2174634df140826e +configured_endpoints: 230 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f7d8729d517e528b4a2bad402f49122fdf982be7b2df213c393e0d692cef7e7.yml +openapi_spec_hash: bd048174c7a122d23818810434e7881d +config_hash: dd86da070cc89eb6d3868bf23764c847 diff --git a/api.md b/api.md index 6ef71b9b2..5a67964cd 100644 --- a/api.md +++ b/api.md @@ -830,6 +830,12 @@ Methods: - client.simulations.card_authorizations.create(\*\*params) -> CardAuthorizationCreateResponse +## CardBalanceInquiries + +Methods: + +- client.simulations.card_balance_inquiries.create(\*\*params) -> CardPayment + ## CardAuthorizationExpirations Methods: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 27f9585d1..5366a0c9c 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -168,6 +168,14 @@ InboundACHTransfersResourceWithStreamingResponse, AsyncInboundACHTransfersResourceWithStreamingResponse, ) +from .card_balance_inquiries import ( + CardBalanceInquiriesResource, + AsyncCardBalanceInquiriesResource, + CardBalanceInquiriesResourceWithRawResponse, + AsyncCardBalanceInquiriesResourceWithRawResponse, + CardBalanceInquiriesResourceWithStreamingResponse, + AsyncCardBalanceInquiriesResourceWithStreamingResponse, +) from .inbound_check_deposits import ( InboundCheckDepositsResource, AsyncInboundCheckDepositsResource, @@ -268,6 +276,12 @@ "AsyncCardAuthorizationsResourceWithRawResponse", "CardAuthorizationsResourceWithStreamingResponse", "AsyncCardAuthorizationsResourceWithStreamingResponse", + "CardBalanceInquiriesResource", + "AsyncCardBalanceInquiriesResource", + "CardBalanceInquiriesResourceWithRawResponse", + "AsyncCardBalanceInquiriesResourceWithRawResponse", + "CardBalanceInquiriesResourceWithStreamingResponse", + "AsyncCardBalanceInquiriesResourceWithStreamingResponse", "CardAuthorizationExpirationsResource", "AsyncCardAuthorizationExpirationsResource", "CardAuthorizationExpirationsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_balance_inquiries.py b/src/increase/resources/simulations/card_balance_inquiries.py new file mode 100644 index 000000000..adfd37367 --- /dev/null +++ b/src/increase/resources/simulations/card_balance_inquiries.py @@ -0,0 +1,425 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_balance_inquiry_create_params +from ...types.card_payment import CardPayment + +__all__ = ["CardBalanceInquiriesResource", "AsyncCardBalanceInquiriesResource"] + + +class CardBalanceInquiriesResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardBalanceInquiriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardBalanceInquiriesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardBalanceInquiriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardBalanceInquiriesResourceWithStreamingResponse(self) + + def create( + self, + *, + balance: int | Omit = omit, + card_id: str | Omit = omit, + decline_reason: Literal[ + "account_closed", + "card_not_active", + "card_canceled", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "pin_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "failed_3ds_authentication", + "suspected_card_testing", + "suspected_fraud", + ] + | Omit = omit, + digital_wallet_token_id: str | Omit = omit, + event_subscription_id: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_city: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_descriptor: str | Omit = omit, + merchant_state: str | Omit = omit, + network_details: card_balance_inquiry_create_params.NetworkDetails | Omit = omit, + network_risk_score: int | Omit = omit, + physical_card_id: str | Omit = omit, + terminal_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates a balance inquiry on a [Card](#cards). + + Args: + balance: The balance amount in cents. The account balance will be used if not provided. + + card_id: The identifier of the Card to be authorized. + + decline_reason: Forces a card decline with a specific reason. No real time decision will be + sent. + + - `account_closed` - The account has been closed. + - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + + digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + merchant_acceptor_id: The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + + merchant_category_code: The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + + merchant_city: The city the merchant resides in. + + merchant_country: The country the merchant resides in. + + merchant_descriptor: The merchant descriptor of the merchant the card is transacting with. + + merchant_state: The state the merchant resides in. + + network_details: Fields specific to a given card network. + + network_risk_score: The risk score generated by the card network. For Visa this is the Visa Advanced + Authorization risk score, from 0 to 99, where 99 is the riskiest. + + physical_card_id: The identifier of the Physical Card to be authorized. + + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_balance_inquiries", + body=maybe_transform( + { + "balance": balance, + "card_id": card_id, + "decline_reason": decline_reason, + "digital_wallet_token_id": digital_wallet_token_id, + "event_subscription_id": event_subscription_id, + "merchant_acceptor_id": merchant_acceptor_id, + "merchant_category_code": merchant_category_code, + "merchant_city": merchant_city, + "merchant_country": merchant_country, + "merchant_descriptor": merchant_descriptor, + "merchant_state": merchant_state, + "network_details": network_details, + "network_risk_score": network_risk_score, + "physical_card_id": physical_card_id, + "terminal_id": terminal_id, + }, + card_balance_inquiry_create_params.CardBalanceInquiryCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardBalanceInquiriesResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardBalanceInquiriesResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardBalanceInquiriesResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardBalanceInquiriesResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardBalanceInquiriesResourceWithStreamingResponse(self) + + async def create( + self, + *, + balance: int | Omit = omit, + card_id: str | Omit = omit, + decline_reason: Literal[ + "account_closed", + "card_not_active", + "card_canceled", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "pin_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "failed_3ds_authentication", + "suspected_card_testing", + "suspected_fraud", + ] + | Omit = omit, + digital_wallet_token_id: str | Omit = omit, + event_subscription_id: str | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_city: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_descriptor: str | Omit = omit, + merchant_state: str | Omit = omit, + network_details: card_balance_inquiry_create_params.NetworkDetails | Omit = omit, + network_risk_score: int | Omit = omit, + physical_card_id: str | Omit = omit, + terminal_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates a balance inquiry on a [Card](#cards). + + Args: + balance: The balance amount in cents. The account balance will be used if not provided. + + card_id: The identifier of the Card to be authorized. + + decline_reason: Forces a card decline with a specific reason. No real time decision will be + sent. + + - `account_closed` - The account has been closed. + - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + + digital_wallet_token_id: The identifier of the Digital Wallet Token to be authorized. + + event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the + default real time event subscription. Because you can only create one real time + decision event subscription, you can use this field to route events to any + specified event subscription for testing purposes. + + merchant_acceptor_id: The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + + merchant_category_code: The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + + merchant_city: The city the merchant resides in. + + merchant_country: The country the merchant resides in. + + merchant_descriptor: The merchant descriptor of the merchant the card is transacting with. + + merchant_state: The state the merchant resides in. + + network_details: Fields specific to a given card network. + + network_risk_score: The risk score generated by the card network. For Visa this is the Visa Advanced + Authorization risk score, from 0 to 99, where 99 is the riskiest. + + physical_card_id: The identifier of the Physical Card to be authorized. + + terminal_id: The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_balance_inquiries", + body=await async_maybe_transform( + { + "balance": balance, + "card_id": card_id, + "decline_reason": decline_reason, + "digital_wallet_token_id": digital_wallet_token_id, + "event_subscription_id": event_subscription_id, + "merchant_acceptor_id": merchant_acceptor_id, + "merchant_category_code": merchant_category_code, + "merchant_city": merchant_city, + "merchant_country": merchant_country, + "merchant_descriptor": merchant_descriptor, + "merchant_state": merchant_state, + "network_details": network_details, + "network_risk_score": network_risk_score, + "physical_card_id": physical_card_id, + "terminal_id": terminal_id, + }, + card_balance_inquiry_create_params.CardBalanceInquiryCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardBalanceInquiriesResourceWithRawResponse: + def __init__(self, card_balance_inquiries: CardBalanceInquiriesResource) -> None: + self._card_balance_inquiries = card_balance_inquiries + + self.create = to_raw_response_wrapper( + card_balance_inquiries.create, + ) + + +class AsyncCardBalanceInquiriesResourceWithRawResponse: + def __init__(self, card_balance_inquiries: AsyncCardBalanceInquiriesResource) -> None: + self._card_balance_inquiries = card_balance_inquiries + + self.create = async_to_raw_response_wrapper( + card_balance_inquiries.create, + ) + + +class CardBalanceInquiriesResourceWithStreamingResponse: + def __init__(self, card_balance_inquiries: CardBalanceInquiriesResource) -> None: + self._card_balance_inquiries = card_balance_inquiries + + self.create = to_streamed_response_wrapper( + card_balance_inquiries.create, + ) + + +class AsyncCardBalanceInquiriesResourceWithStreamingResponse: + def __init__(self, card_balance_inquiries: AsyncCardBalanceInquiriesResource) -> None: + self._card_balance_inquiries = card_balance_inquiries + + self.create = async_to_streamed_response_wrapper( + card_balance_inquiries.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 4dda2f035..f02536d09 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -164,6 +164,14 @@ InboundACHTransfersResourceWithStreamingResponse, AsyncInboundACHTransfersResourceWithStreamingResponse, ) +from .card_balance_inquiries import ( + CardBalanceInquiriesResource, + AsyncCardBalanceInquiriesResource, + CardBalanceInquiriesResourceWithRawResponse, + AsyncCardBalanceInquiriesResourceWithRawResponse, + CardBalanceInquiriesResourceWithStreamingResponse, + AsyncCardBalanceInquiriesResourceWithStreamingResponse, +) from .inbound_check_deposits import ( InboundCheckDepositsResource, AsyncInboundCheckDepositsResource, @@ -261,6 +269,10 @@ def account_transfers(self) -> AccountTransfersResource: def card_authorizations(self) -> CardAuthorizationsResource: return CardAuthorizationsResource(self._client) + @cached_property + def card_balance_inquiries(self) -> CardBalanceInquiriesResource: + return CardBalanceInquiriesResource(self._client) + @cached_property def card_authorization_expirations(self) -> CardAuthorizationExpirationsResource: return CardAuthorizationExpirationsResource(self._client) @@ -402,6 +414,10 @@ def account_transfers(self) -> AsyncAccountTransfersResource: def card_authorizations(self) -> AsyncCardAuthorizationsResource: return AsyncCardAuthorizationsResource(self._client) + @cached_property + def card_balance_inquiries(self) -> AsyncCardBalanceInquiriesResource: + return AsyncCardBalanceInquiriesResource(self._client) + @cached_property def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResource: return AsyncCardAuthorizationExpirationsResource(self._client) @@ -546,6 +562,10 @@ def account_transfers(self) -> AccountTransfersResourceWithRawResponse: def card_authorizations(self) -> CardAuthorizationsResourceWithRawResponse: return CardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) + @cached_property + def card_balance_inquiries(self) -> CardBalanceInquiriesResourceWithRawResponse: + return CardBalanceInquiriesResourceWithRawResponse(self._simulations.card_balance_inquiries) + @cached_property def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithRawResponse: return CardAuthorizationExpirationsResourceWithRawResponse(self._simulations.card_authorization_expirations) @@ -673,6 +693,10 @@ def account_transfers(self) -> AsyncAccountTransfersResourceWithRawResponse: def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithRawResponse: return AsyncCardAuthorizationsResourceWithRawResponse(self._simulations.card_authorizations) + @cached_property + def card_balance_inquiries(self) -> AsyncCardBalanceInquiriesResourceWithRawResponse: + return AsyncCardBalanceInquiriesResourceWithRawResponse(self._simulations.card_balance_inquiries) + @cached_property def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithRawResponse: return AsyncCardAuthorizationExpirationsResourceWithRawResponse( @@ -802,6 +826,10 @@ def account_transfers(self) -> AccountTransfersResourceWithStreamingResponse: def card_authorizations(self) -> CardAuthorizationsResourceWithStreamingResponse: return CardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + @cached_property + def card_balance_inquiries(self) -> CardBalanceInquiriesResourceWithStreamingResponse: + return CardBalanceInquiriesResourceWithStreamingResponse(self._simulations.card_balance_inquiries) + @cached_property def card_authorization_expirations(self) -> CardAuthorizationExpirationsResourceWithStreamingResponse: return CardAuthorizationExpirationsResourceWithStreamingResponse( @@ -933,6 +961,10 @@ def account_transfers(self) -> AsyncAccountTransfersResourceWithStreamingRespons def card_authorizations(self) -> AsyncCardAuthorizationsResourceWithStreamingResponse: return AsyncCardAuthorizationsResourceWithStreamingResponse(self._simulations.card_authorizations) + @cached_property + def card_balance_inquiries(self) -> AsyncCardBalanceInquiriesResourceWithStreamingResponse: + return AsyncCardBalanceInquiriesResourceWithStreamingResponse(self._simulations.card_balance_inquiries) + @cached_property def card_authorization_expirations(self) -> AsyncCardAuthorizationExpirationsResourceWithStreamingResponse: return AsyncCardAuthorizationExpirationsResourceWithStreamingResponse( diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 1b04cffc6..318e54366 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -18,6 +18,7 @@ from .inbound_mail_item_create_params import InboundMailItemCreateParams as InboundMailItemCreateParams from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse +from .card_balance_inquiry_create_params import CardBalanceInquiryCreateParams as CardBalanceInquiryCreateParams from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams from .inbound_check_deposit_create_params import InboundCheckDepositCreateParams as InboundCheckDepositCreateParams from .inbound_wire_transfer_create_params import InboundWireTransferCreateParams as InboundWireTransferCreateParams diff --git a/src/increase/types/simulations/card_balance_inquiry_create_params.py b/src/increase/types/simulations/card_balance_inquiry_create_params.py new file mode 100644 index 000000000..8ce3cf2b3 --- /dev/null +++ b/src/increase/types/simulations/card_balance_inquiry_create_params.py @@ -0,0 +1,167 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["CardBalanceInquiryCreateParams", "NetworkDetails", "NetworkDetailsVisa"] + + +class CardBalanceInquiryCreateParams(TypedDict, total=False): + balance: int + """The balance amount in cents. The account balance will be used if not provided.""" + + card_id: str + """The identifier of the Card to be authorized.""" + + decline_reason: Literal[ + "account_closed", + "card_not_active", + "card_canceled", + "physical_card_not_active", + "entity_not_active", + "group_locked", + "insufficient_funds", + "cvv2_mismatch", + "pin_mismatch", + "card_expiration_mismatch", + "transaction_not_allowed", + "breaches_limit", + "webhook_declined", + "webhook_timed_out", + "declined_by_stand_in_processing", + "invalid_physical_card", + "missing_original_authorization", + "failed_3ds_authentication", + "suspected_card_testing", + "suspected_fraud", + ] + """Forces a card decline with a specific reason. + + No real time decision will be sent. + + - `account_closed` - The account has been closed. + - `card_not_active` - The Card was not active. + - `card_canceled` - The Card has been canceled. + - `physical_card_not_active` - The Physical Card was not active. + - `entity_not_active` - The account's entity was not active. + - `group_locked` - The account was inactive. + - `insufficient_funds` - The Card's Account did not have a sufficient available + balance. + - `cvv2_mismatch` - The given CVV2 did not match the card's value. + - `pin_mismatch` - The given PIN did not match the card's value. + - `card_expiration_mismatch` - The given expiration date did not match the + card's value. Only applies when a CVV2 is present. + - `transaction_not_allowed` - The attempted card transaction is not allowed per + Increase's terms. + - `breaches_limit` - The transaction was blocked by a Limit. + - `webhook_declined` - Your application declined the transaction via webhook. + - `webhook_timed_out` - Your application webhook did not respond without the + required timeout. + - `declined_by_stand_in_processing` - Declined by stand-in processing. + - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `missing_original_authorization` - The original card authorization for this + incremental authorization does not exist. + - `failed_3ds_authentication` - The transaction was declined because the 3DS + authentication failed. + - `suspected_card_testing` - The transaction was suspected to be used by a card + tester to test for valid card numbers. + - `suspected_fraud` - The transaction was suspected to be fraudulent. Please + reach out to support@increase.com for more information. + """ + + digital_wallet_token_id: str + """The identifier of the Digital Wallet Token to be authorized.""" + + event_subscription_id: str + """The identifier of the Event Subscription to use. + + If provided, will override the default real time event subscription. Because you + can only create one real time decision event subscription, you can use this + field to route events to any specified event subscription for testing purposes. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_city: str + """The city the merchant resides in.""" + + merchant_country: str + """The country the merchant resides in.""" + + merchant_descriptor: str + """The merchant descriptor of the merchant the card is transacting with.""" + + merchant_state: str + """The state the merchant resides in.""" + + network_details: NetworkDetails + """Fields specific to a given card network.""" + + network_risk_score: int + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + physical_card_id: str + """The identifier of the Physical Card to be authorized.""" + + terminal_id: str + """ + The terminal identifier (commonly abbreviated as TID) of the terminal the card + is transacting with. + """ + + +class NetworkDetailsVisa(TypedDict, total=False): + """Fields specific to the Visa network.""" + + stand_in_processing_reason: Literal[ + "issuer_error", + "invalid_physical_card", + "invalid_cardholder_authentication_verification_value", + "internal_visa_error", + "merchant_transaction_advisory_service_authentication_required", + "payment_fraud_disruption_acquirer_block", + "other", + ] + """The reason code for the stand-in processing. + + - `issuer_error` - Increase failed to process the authorization in a timely + manner. + - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or + authorization request cryptogram. + - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder + authentication verification value was invalid. + - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason + code for certain expected occurrences as well, such as Application Transaction + Counter (ATC) replays. + - `merchant_transaction_advisory_service_authentication_required` - The merchant + has enabled Visa's Transaction Advisory Service and requires further + authentication to perform the transaction. In practice this is often utilized + at fuel pumps to tell the cardholder to see the cashier. + - `payment_fraud_disruption_acquirer_block` - The transaction was blocked by + Visa's Payment Fraud Disruption service due to fraudulent Acquirer behavior, + such as card testing. + - `other` - An unspecific reason for stand-in processing. + """ + + +class NetworkDetails(TypedDict, total=False): + """Fields specific to a given card network.""" + + visa: Required[NetworkDetailsVisa] + """Fields specific to the Visa network.""" diff --git a/tests/api_resources/simulations/test_card_balance_inquiries.py b/tests/api_resources/simulations/test_card_balance_inquiries.py new file mode 100644 index 000000000..afdcbd4fa --- /dev/null +++ b/tests/api_resources/simulations/test_card_balance_inquiries.py @@ -0,0 +1,116 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardBalanceInquiries: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_balance_inquiry = client.simulations.card_balance_inquiries.create() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_balance_inquiry = client.simulations.card_balance_inquiries.create( + balance=1000000, + card_id="card_oubs0hwk5rn6knuecxg2", + decline_reason="account_closed", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="CITIBANK", + merchant_state="NY", + network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, + network_risk_score=0, + physical_card_id="physical_card_id", + terminal_id="x", + ) + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_balance_inquiries.with_raw_response.create() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_balance_inquiry = response.parse() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_balance_inquiries.with_streaming_response.create() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_balance_inquiry = response.parse() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncCardBalanceInquiries: + 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: + card_balance_inquiry = await async_client.simulations.card_balance_inquiries.create() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_balance_inquiry = await async_client.simulations.card_balance_inquiries.create( + balance=1000000, + card_id="card_oubs0hwk5rn6knuecxg2", + decline_reason="account_closed", + digital_wallet_token_id="digital_wallet_token_id", + event_subscription_id="event_subscription_001dzz0r20rcdxgb013zqb8m04g", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_city="New York", + merchant_country="US", + merchant_descriptor="CITIBANK", + merchant_state="NY", + network_details={"visa": {"stand_in_processing_reason": "issuer_error"}}, + network_risk_score=0, + physical_card_id="physical_card_id", + terminal_id="x", + ) + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_balance_inquiries.with_raw_response.create() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_balance_inquiry = await response.parse() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_balance_inquiries.with_streaming_response.create() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_balance_inquiry = await response.parse() + assert_matches_type(CardPayment, card_balance_inquiry, path=["response"]) + + assert cast(Any, response.is_closed) is True From aaacb636315e253d5ca19f330b296c30e4d636ca Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 9 Dec 2025 01:36:36 +0000 Subject: [PATCH 1052/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bfd4e4464..79c939347 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.409.0" + ".": "0.410.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index edf35f866..8483839e5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.409.0" +version = "0.410.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e1141bd6c..0ba71bbe2 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.409.0" # x-release-please-version +__version__ = "0.410.0" # x-release-please-version From f3933d41dd22aca2b09d2f9a647fa8f2bf8e2912 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 11 Dec 2025 20:36:04 +0000 Subject: [PATCH 1053/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index f4cd30496..d4f74e2f7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f7d8729d517e528b4a2bad402f49122fdf982be7b2df213c393e0d692cef7e7.yml openapi_spec_hash: bd048174c7a122d23818810434e7881d -config_hash: dd86da070cc89eb6d3868bf23764c847 +config_hash: ff2eb5f192b4de36611b37b27961c2d8 From 665972b75e7114e9976582a4efcd5f446631d23e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 04:47:03 +0000 Subject: [PATCH 1054/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 3 +++ src/increase/types/entity_create_params.py | 6 ++++++ src/increase/types/entity_update_params.py | 6 ++++++ tests/api_resources/test_entities.py | 4 ++++ 5 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4f74e2f7..beed026f6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f7d8729d517e528b4a2bad402f49122fdf982be7b2df213c393e0d692cef7e7.yml -openapi_spec_hash: bd048174c7a122d23818810434e7881d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6b5ac6804e3261a05214c5891c95222ef1b5e9003f211ab32db1d03a7531835a.yml +openapi_spec_hash: 611c8d38ba7122a428f57f3069aac84a config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index bb1af1ee2..e5088b0e2 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -174,6 +174,9 @@ class Corporation(BaseModel): corporation. """ + email: Optional[str] = None + """An email address for the business.""" + incorporation_state: Optional[str] = None """ The two-letter United States Postal Service (USPS) abbreviation for the diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index f02ce2fdb..e2e2bf609 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -377,6 +377,12 @@ class Corporation(TypedDict, total=False): your bank partner. """ + email: str + """An email address for the business. + + Not every program requires an email for submitted Entities. + """ + incorporation_state: str """ The two-letter United States Postal Service (USPS) abbreviation for the diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index a4a324c54..2036fd597 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -110,6 +110,12 @@ class Corporation(TypedDict, total=False): Mail receiving locations like PO Boxes and PMB's are disallowed. """ + email: str + """An email address for the business. + + Not every program requires an email for submitted Entities. + """ + industry_code: str """ The North American Industry Classification System (NAICS) code for the diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index ace0390a2..0c3953041 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -84,6 +84,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "name": "National Phonograph Company", "tax_identifier": "602214076", "beneficial_ownership_exemption_reason": "regulated_financial_institution", + "email": "dev@stainless.com", "incorporation_state": "NY", "industry_code": "x", "website": "https://example.com", @@ -355,6 +356,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "zip": "10045", "line2": "Unit 2", }, + "email": "dev@stainless.com", "industry_code": "x", "name": "x", }, @@ -1011,6 +1013,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "name": "National Phonograph Company", "tax_identifier": "602214076", "beneficial_ownership_exemption_reason": "regulated_financial_institution", + "email": "dev@stainless.com", "incorporation_state": "NY", "industry_code": "x", "website": "https://example.com", @@ -1282,6 +1285,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "zip": "10045", "line2": "Unit 2", }, + "email": "dev@stainless.com", "industry_code": "x", "name": "x", }, From 650b36c2e92a38272dd48b131a7bc27597adfaad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 04:50:18 +0000 Subject: [PATCH 1055/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 79c939347..179ae823c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.410.0" + ".": "0.411.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8483839e5..09e3d4e30 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.410.0" +version = "0.411.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0ba71bbe2..1315ef5ad 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.410.0" # x-release-please-version +__version__ = "0.411.0" # x-release-please-version From 5fdda9e7483d557234ff7446ad64c828c31837db Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:42:44 +0000 Subject: [PATCH 1056/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 6 ++++++ src/increase/types/check_transfer_create_params.py | 11 +++++++++-- tests/api_resources/test_check_transfers.py | 2 ++ 4 files changed, 19 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index beed026f6..989a349be 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6b5ac6804e3261a05214c5891c95222ef1b5e9003f211ab32db1d03a7531835a.yml -openapi_spec_hash: 611c8d38ba7122a428f57f3069aac84a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2b7de6202d48efc0e77fd72d2788987e6e3ecf2dfff8a491b88fe9a838f0bd5.yml +openapi_spec_hash: 5af8bcd38aae780c364688cb048d258b config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index b9bb58b99..00ed3a04a 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -178,6 +178,12 @@ class PhysicalCheckReturnAddress(BaseModel): name: Optional[str] = None """The name component of the check's return address.""" + phone: Optional[str] = None + """The shipper's phone number to be used in case of delivery issues. + + Only used for FedEx overnight shipping. + """ + postal_code: Optional[str] = None """The postal code of the check's destination.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index 44a617e04..a93f1da43 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -114,8 +114,8 @@ class PhysicalCheckMailingAddress(TypedDict, total=False): phone: str """The phone number to associate with the check's destination address. - The number is only used when `shipping_method` is `fedex_overnight` and will be - supplied to FedEx to be used in case of delivery issues. + The phone number is only used when `shipping_method` is `fedex_overnight` and + will be supplied to FedEx to be used in case of delivery issues. """ @@ -148,6 +148,13 @@ class PhysicalCheckReturnAddress(TypedDict, total=False): line2: str """The second line of the return address.""" + phone: str + """The phone number to associate with the shipper. + + The phone number is only used when `shipping_method` is `fedex_overnight` and + will be supplied to FedEx to be used in case of delivery issues. + """ + class PhysicalCheckTyped(TypedDict, total=False): """Details relating to the physical check that Increase will print and mail. diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index 43df830d1..c3d6def2c 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -63,6 +63,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "postal_code": "x", "state": "x", "line2": "x", + "phone": "x", }, "shipping_method": "usps_first_class", "signature_text": "Ian Crease", @@ -353,6 +354,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "postal_code": "x", "state": "x", "line2": "x", + "phone": "x", }, "shipping_method": "usps_first_class", "signature_text": "Ian Crease", From 53624618ff0ed4bd271e8b4073472b10c54025b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 18:45:31 +0000 Subject: [PATCH 1057/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 179ae823c..39edb4e3a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.411.0" + ".": "0.412.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 09e3d4e30..dff39c588 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.411.0" +version = "0.412.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1315ef5ad..810c4645b 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.411.0" # x-release-please-version +__version__ = "0.412.0" # x-release-please-version From 3630261978946eec04f109a4b3d429ec6f20472c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:11:30 +0000 Subject: [PATCH 1058/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/simulations/physical_cards.py | 10 ++++++++-- src/increase/types/check_transfer.py | 5 ++++- src/increase/types/physical_card.py | 5 ++++- .../types/simulations/physical_card_create_params.py | 7 ++++++- 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 989a349be..e08e2557e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2b7de6202d48efc0e77fd72d2788987e6e3ecf2dfff8a491b88fe9a838f0bd5.yml -openapi_spec_hash: 5af8bcd38aae780c364688cb048d258b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d9f5f3bab4d163b340b6737dde4f7a46bca89379801bcc761c4221a24f8cc4cf.yml +openapi_spec_hash: 7b5eddf42e9fa57ec04b5b1b6d9ff872 config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index bc2b3413d..e4b4a5cf0 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -49,7 +49,7 @@ def create( self, physical_card_id: str, *, - category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], + category: Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"], carrier_estimated_delivery_at: Union[str, datetime] | Omit = omit, city: str | Omit = omit, postal_code: str | Omit = omit, @@ -74,6 +74,9 @@ def create( - `in_transit` - The physical card is in transit. - `processed_for_delivery` - The physical card has been processed for delivery. - `delivered` - The physical card has been delivered. + - `delivery_issue` - There is an issue preventing delivery. The delivery will be + attempted again if possible. If the issue cannot be resolved, the physical + card will be returned to sender. - `returned_to_sender` - Delivery failed and the physical card was returned to sender. @@ -212,7 +215,7 @@ async def create( self, physical_card_id: str, *, - category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"], + category: Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"], carrier_estimated_delivery_at: Union[str, datetime] | Omit = omit, city: str | Omit = omit, postal_code: str | Omit = omit, @@ -237,6 +240,9 @@ async def create( - `in_transit` - The physical card is in transit. - `processed_for_delivery` - The physical card has been processed for delivery. - `delivered` - The physical card has been delivered. + - `delivery_issue` - There is an issue preventing delivery. The delivery will be + attempted again if possible. If the issue cannot be resolved, the physical + card will be returned to sender. - `returned_to_sender` - Delivery failed and the physical card was returned to sender. diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 00ed3a04a..8a192cfb2 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -192,12 +192,15 @@ class PhysicalCheckReturnAddress(BaseModel): class PhysicalCheckTrackingUpdate(BaseModel): - category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"] + category: Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"] """The type of tracking event. - `in_transit` - The check is in transit. - `processed_for_delivery` - The check has been processed for delivery. - `delivered` - The check has been delivered. + - `delivery_issue` - There is an issue preventing delivery. The delivery will be + attempted again if possible. If the issue cannot be resolved, the check will + be returned to sender. - `returned_to_sender` - Delivery failed and the check was returned to sender. """ diff --git a/src/increase/types/physical_card.py b/src/increase/types/physical_card.py index d8244067b..8141cee42 100644 --- a/src/increase/types/physical_card.py +++ b/src/increase/types/physical_card.py @@ -54,12 +54,15 @@ class ShipmentTrackingUpdate(BaseModel): carrier expects the card to be delivered. """ - category: Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"] + category: Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"] """The type of tracking event. - `in_transit` - The physical card is in transit. - `processed_for_delivery` - The physical card has been processed for delivery. - `delivered` - The physical card has been delivered. + - `delivery_issue` - There is an issue preventing delivery. The delivery will be + attempted again if possible. If the issue cannot be resolved, the physical + card will be returned to sender. - `returned_to_sender` - Delivery failed and the physical card was returned to sender. """ diff --git a/src/increase/types/simulations/physical_card_create_params.py b/src/increase/types/simulations/physical_card_create_params.py index b51e71093..d61a0d028 100644 --- a/src/increase/types/simulations/physical_card_create_params.py +++ b/src/increase/types/simulations/physical_card_create_params.py @@ -12,12 +12,17 @@ class PhysicalCardCreateParams(TypedDict, total=False): - category: Required[Literal["in_transit", "processed_for_delivery", "delivered", "returned_to_sender"]] + category: Required[ + Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"] + ] """The type of tracking event. - `in_transit` - The physical card is in transit. - `processed_for_delivery` - The physical card has been processed for delivery. - `delivered` - The physical card has been delivered. + - `delivery_issue` - There is an issue preventing delivery. The delivery will be + attempted again if possible. If the issue cannot be resolved, the physical + card will be returned to sender. - `returned_to_sender` - Delivery failed and the physical card was returned to sender. """ From 18989c7d22faf097b50bb7879bd855036e9e2936 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:14:31 +0000 Subject: [PATCH 1059/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 39edb4e3a..fb2267880 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.412.0" + ".": "0.413.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dff39c588..e92d1a113 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.412.0" +version = "0.413.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 810c4645b..400d06a3a 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.412.0" # x-release-please-version +__version__ = "0.413.0" # x-release-please-version From b5a0a19cdf6119a0d590ddd952d1013c997735c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 19:24:18 +0000 Subject: [PATCH 1060/1325] chore(internal): add missing files argument to base client --- src/increase/_base_client.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index ef4af0342..5cbf525bb 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1247,9 +1247,12 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return self.request(cast_to, opts) def put( @@ -1767,9 +1770,12 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="patch", url=path, json_data=body, **options) + opts = FinalRequestOptions.construct( + method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + ) return await self.request(cast_to, opts) async def put( From 9b08788b5afcd719da98b55d1e3e6971ea7054c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:08:52 +0000 Subject: [PATCH 1061/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 6 ++++-- src/increase/types/file.py | 3 ++- src/increase/types/file_create_params.py | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index e08e2557e..e72d63107 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d9f5f3bab4d163b340b6737dde4f7a46bca89379801bcc761c4221a24f8cc4cf.yml -openapi_spec_hash: 7b5eddf42e9fa57ec04b5b1b6d9ff872 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f184b6347de456d3db4fc3d5c691beb9dec85f74849cc4439a9dd4635998b1ec.yml +openapi_spec_hash: 255de9f0f702449bddf655b19a09a0cd config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index 8e0880de1..d86cd1f58 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -97,7 +97,8 @@ def create( - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed - with a check that you've requested Increase print. + with a check that you've requested Increase print. This must be a PDF whose + pages are all US letter size and all have the same orientation. - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. @@ -329,7 +330,8 @@ async def create( - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed - with a check that you've requested Increase print. + with a check that you've requested Increase print. This must be a PDF whose + pages are all US letter size and all have the same orientation. - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 985de238c..8391769aa 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -95,7 +95,8 @@ class File(BaseModel): processing by Increase and submission to the Federal Reserve. - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed - with a check that you've requested Increase print. + with a check that you've requested Increase print. This must be a PDF whose + pages are all US letter size and all have the same orientation. - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index 8677b27fc..a2ea75d87 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -49,7 +49,8 @@ class FileCreateParams(TypedDict, total=False): - `check_image_back` - An image of the back of a check, used for check deposits. - `mailed_check_image` - An image of a check that was mailed to a recipient. - `check_attachment` - A document to be printed on an additional page and mailed - with a check that you've requested Increase print. + with a check that you've requested Increase print. This must be a PDF whose + pages are all US letter size and all have the same orientation. - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. From 0e328b28694e6a259d7563dcdc74f0f573f22159 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:11:53 +0000 Subject: [PATCH 1062/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index fb2267880..26de66871 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.413.0" + ".": "0.414.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e92d1a113..25c1bfad0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.413.0" +version = "0.414.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 400d06a3a..f0c6b0fd9 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.413.0" # x-release-please-version +__version__ = "0.414.0" # x-release-please-version From e1e981f9711ca8fc98f5bed356bacbb6a4464448 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:15:32 +0000 Subject: [PATCH 1063/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account_statement.py | 15 +++++++++++++++ src/increase/types/balance_lookup.py | 15 +++++++++++++++ src/increase/types/program.py | 16 +++++++++++++++- 4 files changed, 47 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e72d63107..01dd0f602 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f184b6347de456d3db4fc3d5c691beb9dec85f74849cc4439a9dd4635998b1ec.yml -openapi_spec_hash: 255de9f0f702449bddf655b19a09a0cd +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-86f5f21622005ed0d2488066a1194b09fb6add92314eb797edc1ced57d7e0435.yml +openapi_spec_hash: e2e09186517e41d2332a8b59cff9b6e7 config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py index 7a95b9a5c..f43fc0ea0 100644 --- a/src/increase/types/account_statement.py +++ b/src/increase/types/account_statement.py @@ -1,8 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import TYPE_CHECKING, Dict from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["AccountStatement"] @@ -52,3 +55,15 @@ class AccountStatement(BaseModel): For this resource it will always be `account_statement`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/balance_lookup.py b/src/increase/types/balance_lookup.py index e2d3ac552..f8e1ee75b 100644 --- a/src/increase/types/balance_lookup.py +++ b/src/increase/types/balance_lookup.py @@ -1,7 +1,10 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import TYPE_CHECKING, Dict from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["BalanceLookup"] @@ -32,3 +35,15 @@ class BalanceLookup(BaseModel): For this resource it will always be `balance_lookup`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/program.py b/src/increase/types/program.py index d7f852af0..bc0b15eea 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["Program"] @@ -59,3 +61,15 @@ class Program(BaseModel): The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Program was last updated. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From ee3f2711746aab771b377a056362cce033ddbfd0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 15 Dec 2025 23:18:15 +0000 Subject: [PATCH 1064/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 26de66871..91c7e2e53 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.414.0" + ".": "0.415.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 25c1bfad0..491d13fe4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.414.0" +version = "0.415.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f0c6b0fd9..82909792b 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.414.0" # x-release-please-version +__version__ = "0.415.0" # x-release-please-version From 77a45d22bb6b0c8de14a654a4ec6646f9d78324c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 02:51:00 +0000 Subject: [PATCH 1065/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 4 ++-- src/increase/types/wire_transfer.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 01dd0f602..c34fe88d8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-86f5f21622005ed0d2488066a1194b09fb6add92314eb797edc1ced57d7e0435.yml -openapi_spec_hash: e2e09186517e41d2332a8b59cff9b6e7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-01b0246dcddc851a762ec864d0a728fb63f4020fe94039d2403518b22f3af120.yml +openapi_spec_hash: 773dfed2baf70342616421533b9b5a56 config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 6dcd5e495..05c14c2b5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -3207,8 +3207,8 @@ class SourceInboundWireReversal(BaseModel): return_reason_code: Optional[str] = None """A code provided by the sending bank giving a reason for the reversal. - It will generally be one of the codes defined in the ISO20022 - `ExternalReturnReason1Code` code set, but this is not enforced by the network. + The common return reason codes are + [documented here](/documentation/wire-reversals#reversal-reason-codes). """ return_reason_code_description: Optional[str] = None diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index 3a1aa033f..ec289f225 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -272,8 +272,8 @@ class Reversal(BaseModel): return_reason_code: Optional[str] = None """A code provided by the sending bank giving a reason for the reversal. - It will generally be one of the codes defined in the ISO20022 - `ExternalReturnReason1Code` code set, but this is not enforced by the network. + The common return reason codes are + [documented here](/documentation/wire-reversals#reversal-reason-codes). """ return_reason_code_description: Optional[str] = None From d63ad96316bcde7eb4e6261f659658f3de0c6f8f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 02:53:47 +0000 Subject: [PATCH 1066/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 91c7e2e53..905c8453a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.415.0" + ".": "0.416.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 491d13fe4..841b286b3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.415.0" +version = "0.416.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 82909792b..5a8306020 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.415.0" # x-release-please-version +__version__ = "0.416.0" # x-release-please-version From 94054e01b4683eb2f0cfaf9d946bbd73354b1301 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 17:25:32 +0000 Subject: [PATCH 1067/1325] chore: speedup initial import --- src/increase/_client.py | 3057 +++++++++++++++++++++++++++++---------- 1 file changed, 2265 insertions(+), 792 deletions(-) diff --git a/src/increase/_client.py b/src/increase/_client.py index aa3fdba86..8092e198a 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -3,7 +3,7 @@ from __future__ import annotations import os -from typing import Any, Dict, Mapping, cast +from typing import TYPE_CHECKING, Any, Dict, Mapping, cast from typing_extensions import Self, Literal, override import httpx @@ -24,65 +24,8 @@ is_mapping, get_async_library, ) +from ._compat import cached_property from ._version import __version__ -from .resources import ( - cards, - files, - events, - groups, - exports, - accounts, - entities, - programs, - documents, - lockboxes, - file_links, - card_tokens, - oauth_tokens, - transactions, - ach_transfers, - card_disputes, - card_payments, - check_deposits, - physical_cards, - wire_transfers, - account_numbers, - check_transfers, - routing_numbers, - card_validations, - fednow_transfers, - intrafi_balances, - account_transfers, - external_accounts, - oauth_connections, - account_statements, - inbound_mail_items, - intrafi_exclusions, - oauth_applications, - bookkeeping_entries, - card_push_transfers, - event_subscriptions, - real_time_decisions, - ach_prenotifications, - bookkeeping_accounts, - pending_transactions, - declined_transactions, - digital_card_profiles, - digital_wallet_tokens, - inbound_ach_transfers, - bookkeeping_entry_sets, - inbound_check_deposits, - inbound_wire_transfers, - physical_card_profiles, - supplemental_documents, - wire_drawdown_requests, - inbound_fednow_transfers, - card_purchase_supplements, - intrafi_account_enrollments, - real_time_payments_transfers, - inbound_wire_drawdown_requests, - inbound_real_time_payments_transfers, -) from ._streaming import Stream as Stream, AsyncStream as AsyncStream from ._exceptions import IncreaseError, APIStatusError from ._base_client import ( @@ -90,7 +33,139 @@ SyncAPIClient, AsyncAPIClient, ) -from .resources.simulations import simulations + +if TYPE_CHECKING: + from .resources import ( + cards, + files, + events, + groups, + exports, + accounts, + entities, + programs, + documents, + lockboxes, + file_links, + card_tokens, + simulations, + oauth_tokens, + transactions, + ach_transfers, + card_disputes, + card_payments, + check_deposits, + physical_cards, + wire_transfers, + account_numbers, + check_transfers, + routing_numbers, + card_validations, + fednow_transfers, + intrafi_balances, + account_transfers, + external_accounts, + oauth_connections, + account_statements, + inbound_mail_items, + intrafi_exclusions, + oauth_applications, + bookkeeping_entries, + card_push_transfers, + event_subscriptions, + real_time_decisions, + ach_prenotifications, + bookkeeping_accounts, + pending_transactions, + declined_transactions, + digital_card_profiles, + digital_wallet_tokens, + inbound_ach_transfers, + bookkeeping_entry_sets, + inbound_check_deposits, + inbound_wire_transfers, + physical_card_profiles, + supplemental_documents, + wire_drawdown_requests, + inbound_fednow_transfers, + card_purchase_supplements, + intrafi_account_enrollments, + real_time_payments_transfers, + inbound_wire_drawdown_requests, + inbound_real_time_payments_transfers, + ) + from .resources.cards import CardsResource, AsyncCardsResource + from .resources.files import FilesResource, AsyncFilesResource + from .resources.events import EventsResource, AsyncEventsResource + from .resources.groups import GroupsResource, AsyncGroupsResource + from .resources.exports import ExportsResource, AsyncExportsResource + from .resources.accounts import AccountsResource, AsyncAccountsResource + from .resources.entities import EntitiesResource, AsyncEntitiesResource + from .resources.programs import ProgramsResource, AsyncProgramsResource + from .resources.documents import DocumentsResource, AsyncDocumentsResource + from .resources.lockboxes import LockboxesResource, AsyncLockboxesResource + from .resources.file_links import FileLinksResource, AsyncFileLinksResource + from .resources.card_tokens import CardTokensResource, AsyncCardTokensResource + from .resources.oauth_tokens import OAuthTokensResource, AsyncOAuthTokensResource + from .resources.transactions import TransactionsResource, AsyncTransactionsResource + from .resources.ach_transfers import ACHTransfersResource, AsyncACHTransfersResource + from .resources.card_disputes import CardDisputesResource, AsyncCardDisputesResource + from .resources.card_payments import CardPaymentsResource, AsyncCardPaymentsResource + from .resources.check_deposits import CheckDepositsResource, AsyncCheckDepositsResource + from .resources.physical_cards import PhysicalCardsResource, AsyncPhysicalCardsResource + from .resources.wire_transfers import WireTransfersResource, AsyncWireTransfersResource + from .resources.account_numbers import AccountNumbersResource, AsyncAccountNumbersResource + from .resources.check_transfers import CheckTransfersResource, AsyncCheckTransfersResource + from .resources.routing_numbers import RoutingNumbersResource, AsyncRoutingNumbersResource + from .resources.card_validations import CardValidationsResource, AsyncCardValidationsResource + from .resources.fednow_transfers import FednowTransfersResource, AsyncFednowTransfersResource + from .resources.intrafi_balances import IntrafiBalancesResource, AsyncIntrafiBalancesResource + from .resources.account_transfers import AccountTransfersResource, AsyncAccountTransfersResource + from .resources.external_accounts import ExternalAccountsResource, AsyncExternalAccountsResource + from .resources.oauth_connections import OAuthConnectionsResource, AsyncOAuthConnectionsResource + from .resources.account_statements import AccountStatementsResource, AsyncAccountStatementsResource + from .resources.inbound_mail_items import InboundMailItemsResource, AsyncInboundMailItemsResource + from .resources.intrafi_exclusions import IntrafiExclusionsResource, AsyncIntrafiExclusionsResource + from .resources.oauth_applications import OAuthApplicationsResource, AsyncOAuthApplicationsResource + from .resources.bookkeeping_entries import BookkeepingEntriesResource, AsyncBookkeepingEntriesResource + from .resources.card_push_transfers import CardPushTransfersResource, AsyncCardPushTransfersResource + from .resources.event_subscriptions import EventSubscriptionsResource, AsyncEventSubscriptionsResource + from .resources.real_time_decisions import RealTimeDecisionsResource, AsyncRealTimeDecisionsResource + from .resources.ach_prenotifications import ACHPrenotificationsResource, AsyncACHPrenotificationsResource + from .resources.bookkeeping_accounts import BookkeepingAccountsResource, AsyncBookkeepingAccountsResource + from .resources.pending_transactions import PendingTransactionsResource, AsyncPendingTransactionsResource + from .resources.declined_transactions import DeclinedTransactionsResource, AsyncDeclinedTransactionsResource + from .resources.digital_card_profiles import DigitalCardProfilesResource, AsyncDigitalCardProfilesResource + from .resources.digital_wallet_tokens import DigitalWalletTokensResource, AsyncDigitalWalletTokensResource + from .resources.inbound_ach_transfers import InboundACHTransfersResource, AsyncInboundACHTransfersResource + from .resources.bookkeeping_entry_sets import BookkeepingEntrySetsResource, AsyncBookkeepingEntrySetsResource + from .resources.inbound_check_deposits import InboundCheckDepositsResource, AsyncInboundCheckDepositsResource + from .resources.inbound_wire_transfers import InboundWireTransfersResource, AsyncInboundWireTransfersResource + from .resources.physical_card_profiles import PhysicalCardProfilesResource, AsyncPhysicalCardProfilesResource + from .resources.supplemental_documents import SupplementalDocumentsResource, AsyncSupplementalDocumentsResource + from .resources.wire_drawdown_requests import WireDrawdownRequestsResource, AsyncWireDrawdownRequestsResource + from .resources.simulations.simulations import SimulationsResource, AsyncSimulationsResource + from .resources.inbound_fednow_transfers import InboundFednowTransfersResource, AsyncInboundFednowTransfersResource + from .resources.card_purchase_supplements import ( + CardPurchaseSupplementsResource, + AsyncCardPurchaseSupplementsResource, + ) + from .resources.intrafi_account_enrollments import ( + IntrafiAccountEnrollmentsResource, + AsyncIntrafiAccountEnrollmentsResource, + ) + from .resources.real_time_payments_transfers import ( + RealTimePaymentsTransfersResource, + AsyncRealTimePaymentsTransfersResource, + ) + from .resources.inbound_wire_drawdown_requests import ( + InboundWireDrawdownRequestsResource, + AsyncInboundWireDrawdownRequestsResource, + ) + from .resources.inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResource, + AsyncInboundRealTimePaymentsTransfersResource, + ) __all__ = [ "ENVIRONMENTS", @@ -111,66 +186,6 @@ class Increase(SyncAPIClient): - accounts: accounts.AccountsResource - account_numbers: account_numbers.AccountNumbersResource - account_transfers: account_transfers.AccountTransfersResource - cards: cards.CardsResource - card_payments: card_payments.CardPaymentsResource - card_purchase_supplements: card_purchase_supplements.CardPurchaseSupplementsResource - card_disputes: card_disputes.CardDisputesResource - physical_cards: physical_cards.PhysicalCardsResource - digital_card_profiles: digital_card_profiles.DigitalCardProfilesResource - physical_card_profiles: physical_card_profiles.PhysicalCardProfilesResource - digital_wallet_tokens: digital_wallet_tokens.DigitalWalletTokensResource - transactions: transactions.TransactionsResource - pending_transactions: pending_transactions.PendingTransactionsResource - declined_transactions: declined_transactions.DeclinedTransactionsResource - ach_transfers: ach_transfers.ACHTransfersResource - ach_prenotifications: ach_prenotifications.ACHPrenotificationsResource - inbound_ach_transfers: inbound_ach_transfers.InboundACHTransfersResource - wire_transfers: wire_transfers.WireTransfersResource - inbound_wire_transfers: inbound_wire_transfers.InboundWireTransfersResource - wire_drawdown_requests: wire_drawdown_requests.WireDrawdownRequestsResource - inbound_wire_drawdown_requests: inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResource - check_transfers: check_transfers.CheckTransfersResource - inbound_check_deposits: inbound_check_deposits.InboundCheckDepositsResource - real_time_payments_transfers: real_time_payments_transfers.RealTimePaymentsTransfersResource - inbound_real_time_payments_transfers: inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource - fednow_transfers: fednow_transfers.FednowTransfersResource - inbound_fednow_transfers: inbound_fednow_transfers.InboundFednowTransfersResource - check_deposits: check_deposits.CheckDepositsResource - lockboxes: lockboxes.LockboxesResource - inbound_mail_items: inbound_mail_items.InboundMailItemsResource - routing_numbers: routing_numbers.RoutingNumbersResource - external_accounts: external_accounts.ExternalAccountsResource - entities: entities.EntitiesResource - supplemental_documents: supplemental_documents.SupplementalDocumentsResource - programs: programs.ProgramsResource - account_statements: account_statements.AccountStatementsResource - files: files.FilesResource - file_links: file_links.FileLinksResource - documents: documents.DocumentsResource - exports: exports.ExportsResource - events: events.EventsResource - event_subscriptions: event_subscriptions.EventSubscriptionsResource - real_time_decisions: real_time_decisions.RealTimeDecisionsResource - bookkeeping_accounts: bookkeeping_accounts.BookkeepingAccountsResource - bookkeeping_entry_sets: bookkeeping_entry_sets.BookkeepingEntrySetsResource - bookkeeping_entries: bookkeeping_entries.BookkeepingEntriesResource - groups: groups.GroupsResource - oauth_applications: oauth_applications.OAuthApplicationsResource - oauth_connections: oauth_connections.OAuthConnectionsResource - oauth_tokens: oauth_tokens.OAuthTokensResource - intrafi_account_enrollments: intrafi_account_enrollments.IntrafiAccountEnrollmentsResource - intrafi_balances: intrafi_balances.IntrafiBalancesResource - intrafi_exclusions: intrafi_exclusions.IntrafiExclusionsResource - card_tokens: card_tokens.CardTokensResource - card_push_transfers: card_push_transfers.CardPushTransfersResource - card_validations: card_validations.CardValidationsResource - simulations: simulations.SimulationsResource - with_raw_response: IncreaseWithRawResponse - with_streaming_response: IncreaseWithStreamedResponse - # client options api_key: str webhook_secret: str | None @@ -259,67 +274,355 @@ def __init__( self._idempotency_header = "Idempotency-Key" - self.accounts = accounts.AccountsResource(self) - self.account_numbers = account_numbers.AccountNumbersResource(self) - self.account_transfers = account_transfers.AccountTransfersResource(self) - self.cards = cards.CardsResource(self) - self.card_payments = card_payments.CardPaymentsResource(self) - self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResource(self) - self.card_disputes = card_disputes.CardDisputesResource(self) - self.physical_cards = physical_cards.PhysicalCardsResource(self) - self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResource(self) - self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResource(self) - self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResource(self) - self.transactions = transactions.TransactionsResource(self) - self.pending_transactions = pending_transactions.PendingTransactionsResource(self) - self.declined_transactions = declined_transactions.DeclinedTransactionsResource(self) - self.ach_transfers = ach_transfers.ACHTransfersResource(self) - self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResource(self) - self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResource(self) - self.wire_transfers = wire_transfers.WireTransfersResource(self) - self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResource(self) - self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResource(self) - self.inbound_wire_drawdown_requests = inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResource(self) - self.check_transfers = check_transfers.CheckTransfersResource(self) - self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResource(self) - self.real_time_payments_transfers = real_time_payments_transfers.RealTimePaymentsTransfersResource(self) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResource(self) - ) - self.fednow_transfers = fednow_transfers.FednowTransfersResource(self) - self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResource(self) - self.check_deposits = check_deposits.CheckDepositsResource(self) - self.lockboxes = lockboxes.LockboxesResource(self) - self.inbound_mail_items = inbound_mail_items.InboundMailItemsResource(self) - self.routing_numbers = routing_numbers.RoutingNumbersResource(self) - self.external_accounts = external_accounts.ExternalAccountsResource(self) - self.entities = entities.EntitiesResource(self) - self.supplemental_documents = supplemental_documents.SupplementalDocumentsResource(self) - self.programs = programs.ProgramsResource(self) - self.account_statements = account_statements.AccountStatementsResource(self) - self.files = files.FilesResource(self) - self.file_links = file_links.FileLinksResource(self) - self.documents = documents.DocumentsResource(self) - self.exports = exports.ExportsResource(self) - self.events = events.EventsResource(self) - self.event_subscriptions = event_subscriptions.EventSubscriptionsResource(self) - self.real_time_decisions = real_time_decisions.RealTimeDecisionsResource(self) - self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResource(self) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResource(self) - self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResource(self) - self.groups = groups.GroupsResource(self) - self.oauth_applications = oauth_applications.OAuthApplicationsResource(self) - self.oauth_connections = oauth_connections.OAuthConnectionsResource(self) - self.oauth_tokens = oauth_tokens.OAuthTokensResource(self) - self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResource(self) - self.intrafi_balances = intrafi_balances.IntrafiBalancesResource(self) - self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResource(self) - self.card_tokens = card_tokens.CardTokensResource(self) - self.card_push_transfers = card_push_transfers.CardPushTransfersResource(self) - self.card_validations = card_validations.CardValidationsResource(self) - self.simulations = simulations.SimulationsResource(self) - self.with_raw_response = IncreaseWithRawResponse(self) - self.with_streaming_response = IncreaseWithStreamedResponse(self) + @cached_property + def accounts(self) -> AccountsResource: + from .resources.accounts import AccountsResource + + return AccountsResource(self) + + @cached_property + def account_numbers(self) -> AccountNumbersResource: + from .resources.account_numbers import AccountNumbersResource + + return AccountNumbersResource(self) + + @cached_property + def account_transfers(self) -> AccountTransfersResource: + from .resources.account_transfers import AccountTransfersResource + + return AccountTransfersResource(self) + + @cached_property + def cards(self) -> CardsResource: + from .resources.cards import CardsResource + + return CardsResource(self) + + @cached_property + def card_payments(self) -> CardPaymentsResource: + from .resources.card_payments import CardPaymentsResource + + return CardPaymentsResource(self) + + @cached_property + def card_purchase_supplements(self) -> CardPurchaseSupplementsResource: + from .resources.card_purchase_supplements import CardPurchaseSupplementsResource + + return CardPurchaseSupplementsResource(self) + + @cached_property + def card_disputes(self) -> CardDisputesResource: + from .resources.card_disputes import CardDisputesResource + + return CardDisputesResource(self) + + @cached_property + def physical_cards(self) -> PhysicalCardsResource: + from .resources.physical_cards import PhysicalCardsResource + + return PhysicalCardsResource(self) + + @cached_property + def digital_card_profiles(self) -> DigitalCardProfilesResource: + from .resources.digital_card_profiles import DigitalCardProfilesResource + + return DigitalCardProfilesResource(self) + + @cached_property + def physical_card_profiles(self) -> PhysicalCardProfilesResource: + from .resources.physical_card_profiles import PhysicalCardProfilesResource + + return PhysicalCardProfilesResource(self) + + @cached_property + def digital_wallet_tokens(self) -> DigitalWalletTokensResource: + from .resources.digital_wallet_tokens import DigitalWalletTokensResource + + return DigitalWalletTokensResource(self) + + @cached_property + def transactions(self) -> TransactionsResource: + from .resources.transactions import TransactionsResource + + return TransactionsResource(self) + + @cached_property + def pending_transactions(self) -> PendingTransactionsResource: + from .resources.pending_transactions import PendingTransactionsResource + + return PendingTransactionsResource(self) + + @cached_property + def declined_transactions(self) -> DeclinedTransactionsResource: + from .resources.declined_transactions import DeclinedTransactionsResource + + return DeclinedTransactionsResource(self) + + @cached_property + def ach_transfers(self) -> ACHTransfersResource: + from .resources.ach_transfers import ACHTransfersResource + + return ACHTransfersResource(self) + + @cached_property + def ach_prenotifications(self) -> ACHPrenotificationsResource: + from .resources.ach_prenotifications import ACHPrenotificationsResource + + return ACHPrenotificationsResource(self) + + @cached_property + def inbound_ach_transfers(self) -> InboundACHTransfersResource: + from .resources.inbound_ach_transfers import InboundACHTransfersResource + + return InboundACHTransfersResource(self) + + @cached_property + def wire_transfers(self) -> WireTransfersResource: + from .resources.wire_transfers import WireTransfersResource + + return WireTransfersResource(self) + + @cached_property + def inbound_wire_transfers(self) -> InboundWireTransfersResource: + from .resources.inbound_wire_transfers import InboundWireTransfersResource + + return InboundWireTransfersResource(self) + + @cached_property + def wire_drawdown_requests(self) -> WireDrawdownRequestsResource: + from .resources.wire_drawdown_requests import WireDrawdownRequestsResource + + return WireDrawdownRequestsResource(self) + + @cached_property + def inbound_wire_drawdown_requests(self) -> InboundWireDrawdownRequestsResource: + from .resources.inbound_wire_drawdown_requests import InboundWireDrawdownRequestsResource + + return InboundWireDrawdownRequestsResource(self) + + @cached_property + def check_transfers(self) -> CheckTransfersResource: + from .resources.check_transfers import CheckTransfersResource + + return CheckTransfersResource(self) + + @cached_property + def inbound_check_deposits(self) -> InboundCheckDepositsResource: + from .resources.inbound_check_deposits import InboundCheckDepositsResource + + return InboundCheckDepositsResource(self) + + @cached_property + def real_time_payments_transfers(self) -> RealTimePaymentsTransfersResource: + from .resources.real_time_payments_transfers import RealTimePaymentsTransfersResource + + return RealTimePaymentsTransfersResource(self) + + @cached_property + def inbound_real_time_payments_transfers(self) -> InboundRealTimePaymentsTransfersResource: + from .resources.inbound_real_time_payments_transfers import InboundRealTimePaymentsTransfersResource + + return InboundRealTimePaymentsTransfersResource(self) + + @cached_property + def fednow_transfers(self) -> FednowTransfersResource: + from .resources.fednow_transfers import FednowTransfersResource + + return FednowTransfersResource(self) + + @cached_property + def inbound_fednow_transfers(self) -> InboundFednowTransfersResource: + from .resources.inbound_fednow_transfers import InboundFednowTransfersResource + + return InboundFednowTransfersResource(self) + + @cached_property + def check_deposits(self) -> CheckDepositsResource: + from .resources.check_deposits import CheckDepositsResource + + return CheckDepositsResource(self) + + @cached_property + def lockboxes(self) -> LockboxesResource: + from .resources.lockboxes import LockboxesResource + + return LockboxesResource(self) + + @cached_property + def inbound_mail_items(self) -> InboundMailItemsResource: + from .resources.inbound_mail_items import InboundMailItemsResource + + return InboundMailItemsResource(self) + + @cached_property + def routing_numbers(self) -> RoutingNumbersResource: + from .resources.routing_numbers import RoutingNumbersResource + + return RoutingNumbersResource(self) + + @cached_property + def external_accounts(self) -> ExternalAccountsResource: + from .resources.external_accounts import ExternalAccountsResource + + return ExternalAccountsResource(self) + + @cached_property + def entities(self) -> EntitiesResource: + from .resources.entities import EntitiesResource + + return EntitiesResource(self) + + @cached_property + def supplemental_documents(self) -> SupplementalDocumentsResource: + from .resources.supplemental_documents import SupplementalDocumentsResource + + return SupplementalDocumentsResource(self) + + @cached_property + def programs(self) -> ProgramsResource: + from .resources.programs import ProgramsResource + + return ProgramsResource(self) + + @cached_property + def account_statements(self) -> AccountStatementsResource: + from .resources.account_statements import AccountStatementsResource + + return AccountStatementsResource(self) + + @cached_property + def files(self) -> FilesResource: + from .resources.files import FilesResource + + return FilesResource(self) + + @cached_property + def file_links(self) -> FileLinksResource: + from .resources.file_links import FileLinksResource + + return FileLinksResource(self) + + @cached_property + def documents(self) -> DocumentsResource: + from .resources.documents import DocumentsResource + + return DocumentsResource(self) + + @cached_property + def exports(self) -> ExportsResource: + from .resources.exports import ExportsResource + + return ExportsResource(self) + + @cached_property + def events(self) -> EventsResource: + from .resources.events import EventsResource + + return EventsResource(self) + + @cached_property + def event_subscriptions(self) -> EventSubscriptionsResource: + from .resources.event_subscriptions import EventSubscriptionsResource + + return EventSubscriptionsResource(self) + + @cached_property + def real_time_decisions(self) -> RealTimeDecisionsResource: + from .resources.real_time_decisions import RealTimeDecisionsResource + + return RealTimeDecisionsResource(self) + + @cached_property + def bookkeeping_accounts(self) -> BookkeepingAccountsResource: + from .resources.bookkeeping_accounts import BookkeepingAccountsResource + + return BookkeepingAccountsResource(self) + + @cached_property + def bookkeeping_entry_sets(self) -> BookkeepingEntrySetsResource: + from .resources.bookkeeping_entry_sets import BookkeepingEntrySetsResource + + return BookkeepingEntrySetsResource(self) + + @cached_property + def bookkeeping_entries(self) -> BookkeepingEntriesResource: + from .resources.bookkeeping_entries import BookkeepingEntriesResource + + return BookkeepingEntriesResource(self) + + @cached_property + def groups(self) -> GroupsResource: + from .resources.groups import GroupsResource + + return GroupsResource(self) + + @cached_property + def oauth_applications(self) -> OAuthApplicationsResource: + from .resources.oauth_applications import OAuthApplicationsResource + + return OAuthApplicationsResource(self) + + @cached_property + def oauth_connections(self) -> OAuthConnectionsResource: + from .resources.oauth_connections import OAuthConnectionsResource + + return OAuthConnectionsResource(self) + + @cached_property + def oauth_tokens(self) -> OAuthTokensResource: + from .resources.oauth_tokens import OAuthTokensResource + + return OAuthTokensResource(self) + + @cached_property + def intrafi_account_enrollments(self) -> IntrafiAccountEnrollmentsResource: + from .resources.intrafi_account_enrollments import IntrafiAccountEnrollmentsResource + + return IntrafiAccountEnrollmentsResource(self) + + @cached_property + def intrafi_balances(self) -> IntrafiBalancesResource: + from .resources.intrafi_balances import IntrafiBalancesResource + + return IntrafiBalancesResource(self) + + @cached_property + def intrafi_exclusions(self) -> IntrafiExclusionsResource: + from .resources.intrafi_exclusions import IntrafiExclusionsResource + + return IntrafiExclusionsResource(self) + + @cached_property + def card_tokens(self) -> CardTokensResource: + from .resources.card_tokens import CardTokensResource + + return CardTokensResource(self) + + @cached_property + def card_push_transfers(self) -> CardPushTransfersResource: + from .resources.card_push_transfers import CardPushTransfersResource + + return CardPushTransfersResource(self) + + @cached_property + def card_validations(self) -> CardValidationsResource: + from .resources.card_validations import CardValidationsResource + + return CardValidationsResource(self) + + @cached_property + def simulations(self) -> SimulationsResource: + from .resources.simulations import SimulationsResource + + return SimulationsResource(self) + + @cached_property + def with_raw_response(self) -> IncreaseWithRawResponse: + return IncreaseWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> IncreaseWithStreamedResponse: + return IncreaseWithStreamedResponse(self) @property @override @@ -476,68 +779,6 @@ def _make_status_error( class AsyncIncrease(AsyncAPIClient): - accounts: accounts.AsyncAccountsResource - account_numbers: account_numbers.AsyncAccountNumbersResource - account_transfers: account_transfers.AsyncAccountTransfersResource - cards: cards.AsyncCardsResource - card_payments: card_payments.AsyncCardPaymentsResource - card_purchase_supplements: card_purchase_supplements.AsyncCardPurchaseSupplementsResource - card_disputes: card_disputes.AsyncCardDisputesResource - physical_cards: physical_cards.AsyncPhysicalCardsResource - digital_card_profiles: digital_card_profiles.AsyncDigitalCardProfilesResource - physical_card_profiles: physical_card_profiles.AsyncPhysicalCardProfilesResource - digital_wallet_tokens: digital_wallet_tokens.AsyncDigitalWalletTokensResource - transactions: transactions.AsyncTransactionsResource - pending_transactions: pending_transactions.AsyncPendingTransactionsResource - declined_transactions: declined_transactions.AsyncDeclinedTransactionsResource - ach_transfers: ach_transfers.AsyncACHTransfersResource - ach_prenotifications: ach_prenotifications.AsyncACHPrenotificationsResource - inbound_ach_transfers: inbound_ach_transfers.AsyncInboundACHTransfersResource - wire_transfers: wire_transfers.AsyncWireTransfersResource - inbound_wire_transfers: inbound_wire_transfers.AsyncInboundWireTransfersResource - wire_drawdown_requests: wire_drawdown_requests.AsyncWireDrawdownRequestsResource - inbound_wire_drawdown_requests: inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResource - check_transfers: check_transfers.AsyncCheckTransfersResource - inbound_check_deposits: inbound_check_deposits.AsyncInboundCheckDepositsResource - real_time_payments_transfers: real_time_payments_transfers.AsyncRealTimePaymentsTransfersResource - inbound_real_time_payments_transfers: ( - inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource - ) - fednow_transfers: fednow_transfers.AsyncFednowTransfersResource - inbound_fednow_transfers: inbound_fednow_transfers.AsyncInboundFednowTransfersResource - check_deposits: check_deposits.AsyncCheckDepositsResource - lockboxes: lockboxes.AsyncLockboxesResource - inbound_mail_items: inbound_mail_items.AsyncInboundMailItemsResource - routing_numbers: routing_numbers.AsyncRoutingNumbersResource - external_accounts: external_accounts.AsyncExternalAccountsResource - entities: entities.AsyncEntitiesResource - supplemental_documents: supplemental_documents.AsyncSupplementalDocumentsResource - programs: programs.AsyncProgramsResource - account_statements: account_statements.AsyncAccountStatementsResource - files: files.AsyncFilesResource - file_links: file_links.AsyncFileLinksResource - documents: documents.AsyncDocumentsResource - exports: exports.AsyncExportsResource - events: events.AsyncEventsResource - event_subscriptions: event_subscriptions.AsyncEventSubscriptionsResource - real_time_decisions: real_time_decisions.AsyncRealTimeDecisionsResource - bookkeeping_accounts: bookkeeping_accounts.AsyncBookkeepingAccountsResource - bookkeeping_entry_sets: bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource - bookkeeping_entries: bookkeeping_entries.AsyncBookkeepingEntriesResource - groups: groups.AsyncGroupsResource - oauth_applications: oauth_applications.AsyncOAuthApplicationsResource - oauth_connections: oauth_connections.AsyncOAuthConnectionsResource - oauth_tokens: oauth_tokens.AsyncOAuthTokensResource - intrafi_account_enrollments: intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource - intrafi_balances: intrafi_balances.AsyncIntrafiBalancesResource - intrafi_exclusions: intrafi_exclusions.AsyncIntrafiExclusionsResource - card_tokens: card_tokens.AsyncCardTokensResource - card_push_transfers: card_push_transfers.AsyncCardPushTransfersResource - card_validations: card_validations.AsyncCardValidationsResource - simulations: simulations.AsyncSimulationsResource - with_raw_response: AsyncIncreaseWithRawResponse - with_streaming_response: AsyncIncreaseWithStreamedResponse - # client options api_key: str webhook_secret: str | None @@ -626,69 +867,355 @@ def __init__( self._idempotency_header = "Idempotency-Key" - self.accounts = accounts.AsyncAccountsResource(self) - self.account_numbers = account_numbers.AsyncAccountNumbersResource(self) - self.account_transfers = account_transfers.AsyncAccountTransfersResource(self) - self.cards = cards.AsyncCardsResource(self) - self.card_payments = card_payments.AsyncCardPaymentsResource(self) - self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResource(self) - self.card_disputes = card_disputes.AsyncCardDisputesResource(self) - self.physical_cards = physical_cards.AsyncPhysicalCardsResource(self) - self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResource(self) - self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResource(self) - self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResource(self) - self.transactions = transactions.AsyncTransactionsResource(self) - self.pending_transactions = pending_transactions.AsyncPendingTransactionsResource(self) - self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResource(self) - self.ach_transfers = ach_transfers.AsyncACHTransfersResource(self) - self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResource(self) - self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResource(self) - self.wire_transfers = wire_transfers.AsyncWireTransfersResource(self) - self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResource(self) - self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResource(self) - self.inbound_wire_drawdown_requests = inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResource( - self - ) - self.check_transfers = check_transfers.AsyncCheckTransfersResource(self) - self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResource(self) - self.real_time_payments_transfers = real_time_payments_transfers.AsyncRealTimePaymentsTransfersResource(self) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResource(self) - ) - self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResource(self) - self.inbound_fednow_transfers = inbound_fednow_transfers.AsyncInboundFednowTransfersResource(self) - self.check_deposits = check_deposits.AsyncCheckDepositsResource(self) - self.lockboxes = lockboxes.AsyncLockboxesResource(self) - self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResource(self) - self.routing_numbers = routing_numbers.AsyncRoutingNumbersResource(self) - self.external_accounts = external_accounts.AsyncExternalAccountsResource(self) - self.entities = entities.AsyncEntitiesResource(self) - self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResource(self) - self.programs = programs.AsyncProgramsResource(self) - self.account_statements = account_statements.AsyncAccountStatementsResource(self) - self.files = files.AsyncFilesResource(self) - self.file_links = file_links.AsyncFileLinksResource(self) - self.documents = documents.AsyncDocumentsResource(self) - self.exports = exports.AsyncExportsResource(self) - self.events = events.AsyncEventsResource(self) - self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResource(self) - self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResource(self) - self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResource(self) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResource(self) - self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResource(self) - self.groups = groups.AsyncGroupsResource(self) - self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResource(self) - self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResource(self) - self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResource(self) - self.intrafi_account_enrollments = intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResource(self) - self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResource(self) - self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResource(self) - self.card_tokens = card_tokens.AsyncCardTokensResource(self) - self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResource(self) - self.card_validations = card_validations.AsyncCardValidationsResource(self) - self.simulations = simulations.AsyncSimulationsResource(self) - self.with_raw_response = AsyncIncreaseWithRawResponse(self) - self.with_streaming_response = AsyncIncreaseWithStreamedResponse(self) + @cached_property + def accounts(self) -> AsyncAccountsResource: + from .resources.accounts import AsyncAccountsResource + + return AsyncAccountsResource(self) + + @cached_property + def account_numbers(self) -> AsyncAccountNumbersResource: + from .resources.account_numbers import AsyncAccountNumbersResource + + return AsyncAccountNumbersResource(self) + + @cached_property + def account_transfers(self) -> AsyncAccountTransfersResource: + from .resources.account_transfers import AsyncAccountTransfersResource + + return AsyncAccountTransfersResource(self) + + @cached_property + def cards(self) -> AsyncCardsResource: + from .resources.cards import AsyncCardsResource + + return AsyncCardsResource(self) + + @cached_property + def card_payments(self) -> AsyncCardPaymentsResource: + from .resources.card_payments import AsyncCardPaymentsResource + + return AsyncCardPaymentsResource(self) + + @cached_property + def card_purchase_supplements(self) -> AsyncCardPurchaseSupplementsResource: + from .resources.card_purchase_supplements import AsyncCardPurchaseSupplementsResource + + return AsyncCardPurchaseSupplementsResource(self) + + @cached_property + def card_disputes(self) -> AsyncCardDisputesResource: + from .resources.card_disputes import AsyncCardDisputesResource + + return AsyncCardDisputesResource(self) + + @cached_property + def physical_cards(self) -> AsyncPhysicalCardsResource: + from .resources.physical_cards import AsyncPhysicalCardsResource + + return AsyncPhysicalCardsResource(self) + + @cached_property + def digital_card_profiles(self) -> AsyncDigitalCardProfilesResource: + from .resources.digital_card_profiles import AsyncDigitalCardProfilesResource + + return AsyncDigitalCardProfilesResource(self) + + @cached_property + def physical_card_profiles(self) -> AsyncPhysicalCardProfilesResource: + from .resources.physical_card_profiles import AsyncPhysicalCardProfilesResource + + return AsyncPhysicalCardProfilesResource(self) + + @cached_property + def digital_wallet_tokens(self) -> AsyncDigitalWalletTokensResource: + from .resources.digital_wallet_tokens import AsyncDigitalWalletTokensResource + + return AsyncDigitalWalletTokensResource(self) + + @cached_property + def transactions(self) -> AsyncTransactionsResource: + from .resources.transactions import AsyncTransactionsResource + + return AsyncTransactionsResource(self) + + @cached_property + def pending_transactions(self) -> AsyncPendingTransactionsResource: + from .resources.pending_transactions import AsyncPendingTransactionsResource + + return AsyncPendingTransactionsResource(self) + + @cached_property + def declined_transactions(self) -> AsyncDeclinedTransactionsResource: + from .resources.declined_transactions import AsyncDeclinedTransactionsResource + + return AsyncDeclinedTransactionsResource(self) + + @cached_property + def ach_transfers(self) -> AsyncACHTransfersResource: + from .resources.ach_transfers import AsyncACHTransfersResource + + return AsyncACHTransfersResource(self) + + @cached_property + def ach_prenotifications(self) -> AsyncACHPrenotificationsResource: + from .resources.ach_prenotifications import AsyncACHPrenotificationsResource + + return AsyncACHPrenotificationsResource(self) + + @cached_property + def inbound_ach_transfers(self) -> AsyncInboundACHTransfersResource: + from .resources.inbound_ach_transfers import AsyncInboundACHTransfersResource + + return AsyncInboundACHTransfersResource(self) + + @cached_property + def wire_transfers(self) -> AsyncWireTransfersResource: + from .resources.wire_transfers import AsyncWireTransfersResource + + return AsyncWireTransfersResource(self) + + @cached_property + def inbound_wire_transfers(self) -> AsyncInboundWireTransfersResource: + from .resources.inbound_wire_transfers import AsyncInboundWireTransfersResource + + return AsyncInboundWireTransfersResource(self) + + @cached_property + def wire_drawdown_requests(self) -> AsyncWireDrawdownRequestsResource: + from .resources.wire_drawdown_requests import AsyncWireDrawdownRequestsResource + + return AsyncWireDrawdownRequestsResource(self) + + @cached_property + def inbound_wire_drawdown_requests(self) -> AsyncInboundWireDrawdownRequestsResource: + from .resources.inbound_wire_drawdown_requests import AsyncInboundWireDrawdownRequestsResource + + return AsyncInboundWireDrawdownRequestsResource(self) + + @cached_property + def check_transfers(self) -> AsyncCheckTransfersResource: + from .resources.check_transfers import AsyncCheckTransfersResource + + return AsyncCheckTransfersResource(self) + + @cached_property + def inbound_check_deposits(self) -> AsyncInboundCheckDepositsResource: + from .resources.inbound_check_deposits import AsyncInboundCheckDepositsResource + + return AsyncInboundCheckDepositsResource(self) + + @cached_property + def real_time_payments_transfers(self) -> AsyncRealTimePaymentsTransfersResource: + from .resources.real_time_payments_transfers import AsyncRealTimePaymentsTransfersResource + + return AsyncRealTimePaymentsTransfersResource(self) + + @cached_property + def inbound_real_time_payments_transfers(self) -> AsyncInboundRealTimePaymentsTransfersResource: + from .resources.inbound_real_time_payments_transfers import AsyncInboundRealTimePaymentsTransfersResource + + return AsyncInboundRealTimePaymentsTransfersResource(self) + + @cached_property + def fednow_transfers(self) -> AsyncFednowTransfersResource: + from .resources.fednow_transfers import AsyncFednowTransfersResource + + return AsyncFednowTransfersResource(self) + + @cached_property + def inbound_fednow_transfers(self) -> AsyncInboundFednowTransfersResource: + from .resources.inbound_fednow_transfers import AsyncInboundFednowTransfersResource + + return AsyncInboundFednowTransfersResource(self) + + @cached_property + def check_deposits(self) -> AsyncCheckDepositsResource: + from .resources.check_deposits import AsyncCheckDepositsResource + + return AsyncCheckDepositsResource(self) + + @cached_property + def lockboxes(self) -> AsyncLockboxesResource: + from .resources.lockboxes import AsyncLockboxesResource + + return AsyncLockboxesResource(self) + + @cached_property + def inbound_mail_items(self) -> AsyncInboundMailItemsResource: + from .resources.inbound_mail_items import AsyncInboundMailItemsResource + + return AsyncInboundMailItemsResource(self) + + @cached_property + def routing_numbers(self) -> AsyncRoutingNumbersResource: + from .resources.routing_numbers import AsyncRoutingNumbersResource + + return AsyncRoutingNumbersResource(self) + + @cached_property + def external_accounts(self) -> AsyncExternalAccountsResource: + from .resources.external_accounts import AsyncExternalAccountsResource + + return AsyncExternalAccountsResource(self) + + @cached_property + def entities(self) -> AsyncEntitiesResource: + from .resources.entities import AsyncEntitiesResource + + return AsyncEntitiesResource(self) + + @cached_property + def supplemental_documents(self) -> AsyncSupplementalDocumentsResource: + from .resources.supplemental_documents import AsyncSupplementalDocumentsResource + + return AsyncSupplementalDocumentsResource(self) + + @cached_property + def programs(self) -> AsyncProgramsResource: + from .resources.programs import AsyncProgramsResource + + return AsyncProgramsResource(self) + + @cached_property + def account_statements(self) -> AsyncAccountStatementsResource: + from .resources.account_statements import AsyncAccountStatementsResource + + return AsyncAccountStatementsResource(self) + + @cached_property + def files(self) -> AsyncFilesResource: + from .resources.files import AsyncFilesResource + + return AsyncFilesResource(self) + + @cached_property + def file_links(self) -> AsyncFileLinksResource: + from .resources.file_links import AsyncFileLinksResource + + return AsyncFileLinksResource(self) + + @cached_property + def documents(self) -> AsyncDocumentsResource: + from .resources.documents import AsyncDocumentsResource + + return AsyncDocumentsResource(self) + + @cached_property + def exports(self) -> AsyncExportsResource: + from .resources.exports import AsyncExportsResource + + return AsyncExportsResource(self) + + @cached_property + def events(self) -> AsyncEventsResource: + from .resources.events import AsyncEventsResource + + return AsyncEventsResource(self) + + @cached_property + def event_subscriptions(self) -> AsyncEventSubscriptionsResource: + from .resources.event_subscriptions import AsyncEventSubscriptionsResource + + return AsyncEventSubscriptionsResource(self) + + @cached_property + def real_time_decisions(self) -> AsyncRealTimeDecisionsResource: + from .resources.real_time_decisions import AsyncRealTimeDecisionsResource + + return AsyncRealTimeDecisionsResource(self) + + @cached_property + def bookkeeping_accounts(self) -> AsyncBookkeepingAccountsResource: + from .resources.bookkeeping_accounts import AsyncBookkeepingAccountsResource + + return AsyncBookkeepingAccountsResource(self) + + @cached_property + def bookkeeping_entry_sets(self) -> AsyncBookkeepingEntrySetsResource: + from .resources.bookkeeping_entry_sets import AsyncBookkeepingEntrySetsResource + + return AsyncBookkeepingEntrySetsResource(self) + + @cached_property + def bookkeeping_entries(self) -> AsyncBookkeepingEntriesResource: + from .resources.bookkeeping_entries import AsyncBookkeepingEntriesResource + + return AsyncBookkeepingEntriesResource(self) + + @cached_property + def groups(self) -> AsyncGroupsResource: + from .resources.groups import AsyncGroupsResource + + return AsyncGroupsResource(self) + + @cached_property + def oauth_applications(self) -> AsyncOAuthApplicationsResource: + from .resources.oauth_applications import AsyncOAuthApplicationsResource + + return AsyncOAuthApplicationsResource(self) + + @cached_property + def oauth_connections(self) -> AsyncOAuthConnectionsResource: + from .resources.oauth_connections import AsyncOAuthConnectionsResource + + return AsyncOAuthConnectionsResource(self) + + @cached_property + def oauth_tokens(self) -> AsyncOAuthTokensResource: + from .resources.oauth_tokens import AsyncOAuthTokensResource + + return AsyncOAuthTokensResource(self) + + @cached_property + def intrafi_account_enrollments(self) -> AsyncIntrafiAccountEnrollmentsResource: + from .resources.intrafi_account_enrollments import AsyncIntrafiAccountEnrollmentsResource + + return AsyncIntrafiAccountEnrollmentsResource(self) + + @cached_property + def intrafi_balances(self) -> AsyncIntrafiBalancesResource: + from .resources.intrafi_balances import AsyncIntrafiBalancesResource + + return AsyncIntrafiBalancesResource(self) + + @cached_property + def intrafi_exclusions(self) -> AsyncIntrafiExclusionsResource: + from .resources.intrafi_exclusions import AsyncIntrafiExclusionsResource + + return AsyncIntrafiExclusionsResource(self) + + @cached_property + def card_tokens(self) -> AsyncCardTokensResource: + from .resources.card_tokens import AsyncCardTokensResource + + return AsyncCardTokensResource(self) + + @cached_property + def card_push_transfers(self) -> AsyncCardPushTransfersResource: + from .resources.card_push_transfers import AsyncCardPushTransfersResource + + return AsyncCardPushTransfersResource(self) + + @cached_property + def card_validations(self) -> AsyncCardValidationsResource: + from .resources.card_validations import AsyncCardValidationsResource + + return AsyncCardValidationsResource(self) + + @cached_property + def simulations(self) -> AsyncSimulationsResource: + from .resources.simulations import AsyncSimulationsResource + + return AsyncSimulationsResource(self) + + @cached_property + def with_raw_response(self) -> AsyncIncreaseWithRawResponse: + return AsyncIncreaseWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncIncreaseWithStreamedResponse: + return AsyncIncreaseWithStreamedResponse(self) @property @override @@ -845,513 +1372,1459 @@ def _make_status_error( class IncreaseWithRawResponse: + _client: Increase + def __init__(self, client: Increase) -> None: - self.accounts = accounts.AccountsResourceWithRawResponse(client.accounts) - self.account_numbers = account_numbers.AccountNumbersResourceWithRawResponse(client.account_numbers) - self.account_transfers = account_transfers.AccountTransfersResourceWithRawResponse(client.account_transfers) - self.cards = cards.CardsResourceWithRawResponse(client.cards) - self.card_payments = card_payments.CardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) - self.card_disputes = card_disputes.CardDisputesResourceWithRawResponse(client.card_disputes) - self.physical_cards = physical_cards.PhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithRawResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResourceWithRawResponse( - client.digital_wallet_tokens - ) - self.transactions = transactions.TransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = pending_transactions.PendingTransactionsResourceWithRawResponse( - client.pending_transactions - ) - self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithRawResponse( - client.declined_transactions - ) - self.ach_transfers = ach_transfers.ACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithRawResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResourceWithRawResponse( - client.inbound_ach_transfers - ) - self.wire_transfers = wire_transfers.WireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = ( - inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) - ) - self.check_transfers = check_transfers.CheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = ( - real_time_payments_transfers.RealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) - ) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithRawResponse( - client.inbound_real_time_payments_transfers - ) - ) - self.fednow_transfers = fednow_transfers.FednowTransfersResourceWithRawResponse(client.fednow_transfers) - self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResourceWithRawResponse( - client.inbound_fednow_transfers - ) - self.check_deposits = check_deposits.CheckDepositsResourceWithRawResponse(client.check_deposits) - self.lockboxes = lockboxes.LockboxesResourceWithRawResponse(client.lockboxes) - self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithRawResponse(client.inbound_mail_items) - self.routing_numbers = routing_numbers.RoutingNumbersResourceWithRawResponse(client.routing_numbers) - self.external_accounts = external_accounts.ExternalAccountsResourceWithRawResponse(client.external_accounts) - self.entities = entities.EntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = supplemental_documents.SupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) - self.programs = programs.ProgramsResourceWithRawResponse(client.programs) - self.account_statements = account_statements.AccountStatementsResourceWithRawResponse(client.account_statements) - self.files = files.FilesResourceWithRawResponse(client.files) - self.file_links = file_links.FileLinksResourceWithRawResponse(client.file_links) - self.documents = documents.DocumentsResourceWithRawResponse(client.documents) - self.exports = exports.ExportsResourceWithRawResponse(client.exports) - self.events = events.EventsResourceWithRawResponse(client.events) - self.event_subscriptions = event_subscriptions.EventSubscriptionsResourceWithRawResponse( - client.event_subscriptions - ) - self.real_time_decisions = real_time_decisions.RealTimeDecisionsResourceWithRawResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResourceWithRawResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResourceWithRawResponse( - client.bookkeeping_entries - ) - self.groups = groups.GroupsResourceWithRawResponse(client.groups) - self.oauth_applications = oauth_applications.OAuthApplicationsResourceWithRawResponse(client.oauth_applications) - self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithRawResponse(client.oauth_connections) - self.oauth_tokens = oauth_tokens.OAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments + self._client = client + + @cached_property + def accounts(self) -> accounts.AccountsResourceWithRawResponse: + from .resources.accounts import AccountsResourceWithRawResponse + + return AccountsResourceWithRawResponse(self._client.accounts) + + @cached_property + def account_numbers(self) -> account_numbers.AccountNumbersResourceWithRawResponse: + from .resources.account_numbers import AccountNumbersResourceWithRawResponse + + return AccountNumbersResourceWithRawResponse(self._client.account_numbers) + + @cached_property + def account_transfers(self) -> account_transfers.AccountTransfersResourceWithRawResponse: + from .resources.account_transfers import AccountTransfersResourceWithRawResponse + + return AccountTransfersResourceWithRawResponse(self._client.account_transfers) + + @cached_property + def cards(self) -> cards.CardsResourceWithRawResponse: + from .resources.cards import CardsResourceWithRawResponse + + return CardsResourceWithRawResponse(self._client.cards) + + @cached_property + def card_payments(self) -> card_payments.CardPaymentsResourceWithRawResponse: + from .resources.card_payments import CardPaymentsResourceWithRawResponse + + return CardPaymentsResourceWithRawResponse(self._client.card_payments) + + @cached_property + def card_purchase_supplements(self) -> card_purchase_supplements.CardPurchaseSupplementsResourceWithRawResponse: + from .resources.card_purchase_supplements import CardPurchaseSupplementsResourceWithRawResponse + + return CardPurchaseSupplementsResourceWithRawResponse(self._client.card_purchase_supplements) + + @cached_property + def card_disputes(self) -> card_disputes.CardDisputesResourceWithRawResponse: + from .resources.card_disputes import CardDisputesResourceWithRawResponse + + return CardDisputesResourceWithRawResponse(self._client.card_disputes) + + @cached_property + def physical_cards(self) -> physical_cards.PhysicalCardsResourceWithRawResponse: + from .resources.physical_cards import PhysicalCardsResourceWithRawResponse + + return PhysicalCardsResourceWithRawResponse(self._client.physical_cards) + + @cached_property + def digital_card_profiles(self) -> digital_card_profiles.DigitalCardProfilesResourceWithRawResponse: + from .resources.digital_card_profiles import DigitalCardProfilesResourceWithRawResponse + + return DigitalCardProfilesResourceWithRawResponse(self._client.digital_card_profiles) + + @cached_property + def physical_card_profiles(self) -> physical_card_profiles.PhysicalCardProfilesResourceWithRawResponse: + from .resources.physical_card_profiles import PhysicalCardProfilesResourceWithRawResponse + + return PhysicalCardProfilesResourceWithRawResponse(self._client.physical_card_profiles) + + @cached_property + def digital_wallet_tokens(self) -> digital_wallet_tokens.DigitalWalletTokensResourceWithRawResponse: + from .resources.digital_wallet_tokens import DigitalWalletTokensResourceWithRawResponse + + return DigitalWalletTokensResourceWithRawResponse(self._client.digital_wallet_tokens) + + @cached_property + def transactions(self) -> transactions.TransactionsResourceWithRawResponse: + from .resources.transactions import TransactionsResourceWithRawResponse + + return TransactionsResourceWithRawResponse(self._client.transactions) + + @cached_property + def pending_transactions(self) -> pending_transactions.PendingTransactionsResourceWithRawResponse: + from .resources.pending_transactions import PendingTransactionsResourceWithRawResponse + + return PendingTransactionsResourceWithRawResponse(self._client.pending_transactions) + + @cached_property + def declined_transactions(self) -> declined_transactions.DeclinedTransactionsResourceWithRawResponse: + from .resources.declined_transactions import DeclinedTransactionsResourceWithRawResponse + + return DeclinedTransactionsResourceWithRawResponse(self._client.declined_transactions) + + @cached_property + def ach_transfers(self) -> ach_transfers.ACHTransfersResourceWithRawResponse: + from .resources.ach_transfers import ACHTransfersResourceWithRawResponse + + return ACHTransfersResourceWithRawResponse(self._client.ach_transfers) + + @cached_property + def ach_prenotifications(self) -> ach_prenotifications.ACHPrenotificationsResourceWithRawResponse: + from .resources.ach_prenotifications import ACHPrenotificationsResourceWithRawResponse + + return ACHPrenotificationsResourceWithRawResponse(self._client.ach_prenotifications) + + @cached_property + def inbound_ach_transfers(self) -> inbound_ach_transfers.InboundACHTransfersResourceWithRawResponse: + from .resources.inbound_ach_transfers import InboundACHTransfersResourceWithRawResponse + + return InboundACHTransfersResourceWithRawResponse(self._client.inbound_ach_transfers) + + @cached_property + def wire_transfers(self) -> wire_transfers.WireTransfersResourceWithRawResponse: + from .resources.wire_transfers import WireTransfersResourceWithRawResponse + + return WireTransfersResourceWithRawResponse(self._client.wire_transfers) + + @cached_property + def inbound_wire_transfers(self) -> inbound_wire_transfers.InboundWireTransfersResourceWithRawResponse: + from .resources.inbound_wire_transfers import InboundWireTransfersResourceWithRawResponse + + return InboundWireTransfersResourceWithRawResponse(self._client.inbound_wire_transfers) + + @cached_property + def wire_drawdown_requests(self) -> wire_drawdown_requests.WireDrawdownRequestsResourceWithRawResponse: + from .resources.wire_drawdown_requests import WireDrawdownRequestsResourceWithRawResponse + + return WireDrawdownRequestsResourceWithRawResponse(self._client.wire_drawdown_requests) + + @cached_property + def inbound_wire_drawdown_requests( + self, + ) -> inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithRawResponse: + from .resources.inbound_wire_drawdown_requests import InboundWireDrawdownRequestsResourceWithRawResponse + + return InboundWireDrawdownRequestsResourceWithRawResponse(self._client.inbound_wire_drawdown_requests) + + @cached_property + def check_transfers(self) -> check_transfers.CheckTransfersResourceWithRawResponse: + from .resources.check_transfers import CheckTransfersResourceWithRawResponse + + return CheckTransfersResourceWithRawResponse(self._client.check_transfers) + + @cached_property + def inbound_check_deposits(self) -> inbound_check_deposits.InboundCheckDepositsResourceWithRawResponse: + from .resources.inbound_check_deposits import InboundCheckDepositsResourceWithRawResponse + + return InboundCheckDepositsResourceWithRawResponse(self._client.inbound_check_deposits) + + @cached_property + def real_time_payments_transfers( + self, + ) -> real_time_payments_transfers.RealTimePaymentsTransfersResourceWithRawResponse: + from .resources.real_time_payments_transfers import RealTimePaymentsTransfersResourceWithRawResponse + + return RealTimePaymentsTransfersResourceWithRawResponse(self._client.real_time_payments_transfers) + + @cached_property + def inbound_real_time_payments_transfers( + self, + ) -> inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithRawResponse: + from .resources.inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResourceWithRawResponse, ) - self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithRawResponse(client.intrafi_balances) - self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithRawResponse(client.intrafi_exclusions) - self.card_tokens = card_tokens.CardTokensResourceWithRawResponse(client.card_tokens) - self.card_push_transfers = card_push_transfers.CardPushTransfersResourceWithRawResponse( - client.card_push_transfers + + return InboundRealTimePaymentsTransfersResourceWithRawResponse( + self._client.inbound_real_time_payments_transfers ) - self.card_validations = card_validations.CardValidationsResourceWithRawResponse(client.card_validations) - self.simulations = simulations.SimulationsResourceWithRawResponse(client.simulations) + + @cached_property + def fednow_transfers(self) -> fednow_transfers.FednowTransfersResourceWithRawResponse: + from .resources.fednow_transfers import FednowTransfersResourceWithRawResponse + + return FednowTransfersResourceWithRawResponse(self._client.fednow_transfers) + + @cached_property + def inbound_fednow_transfers(self) -> inbound_fednow_transfers.InboundFednowTransfersResourceWithRawResponse: + from .resources.inbound_fednow_transfers import InboundFednowTransfersResourceWithRawResponse + + return InboundFednowTransfersResourceWithRawResponse(self._client.inbound_fednow_transfers) + + @cached_property + def check_deposits(self) -> check_deposits.CheckDepositsResourceWithRawResponse: + from .resources.check_deposits import CheckDepositsResourceWithRawResponse + + return CheckDepositsResourceWithRawResponse(self._client.check_deposits) + + @cached_property + def lockboxes(self) -> lockboxes.LockboxesResourceWithRawResponse: + from .resources.lockboxes import LockboxesResourceWithRawResponse + + return LockboxesResourceWithRawResponse(self._client.lockboxes) + + @cached_property + def inbound_mail_items(self) -> inbound_mail_items.InboundMailItemsResourceWithRawResponse: + from .resources.inbound_mail_items import InboundMailItemsResourceWithRawResponse + + return InboundMailItemsResourceWithRawResponse(self._client.inbound_mail_items) + + @cached_property + def routing_numbers(self) -> routing_numbers.RoutingNumbersResourceWithRawResponse: + from .resources.routing_numbers import RoutingNumbersResourceWithRawResponse + + return RoutingNumbersResourceWithRawResponse(self._client.routing_numbers) + + @cached_property + def external_accounts(self) -> external_accounts.ExternalAccountsResourceWithRawResponse: + from .resources.external_accounts import ExternalAccountsResourceWithRawResponse + + return ExternalAccountsResourceWithRawResponse(self._client.external_accounts) + + @cached_property + def entities(self) -> entities.EntitiesResourceWithRawResponse: + from .resources.entities import EntitiesResourceWithRawResponse + + return EntitiesResourceWithRawResponse(self._client.entities) + + @cached_property + def supplemental_documents(self) -> supplemental_documents.SupplementalDocumentsResourceWithRawResponse: + from .resources.supplemental_documents import SupplementalDocumentsResourceWithRawResponse + + return SupplementalDocumentsResourceWithRawResponse(self._client.supplemental_documents) + + @cached_property + def programs(self) -> programs.ProgramsResourceWithRawResponse: + from .resources.programs import ProgramsResourceWithRawResponse + + return ProgramsResourceWithRawResponse(self._client.programs) + + @cached_property + def account_statements(self) -> account_statements.AccountStatementsResourceWithRawResponse: + from .resources.account_statements import AccountStatementsResourceWithRawResponse + + return AccountStatementsResourceWithRawResponse(self._client.account_statements) + + @cached_property + def files(self) -> files.FilesResourceWithRawResponse: + from .resources.files import FilesResourceWithRawResponse + + return FilesResourceWithRawResponse(self._client.files) + + @cached_property + def file_links(self) -> file_links.FileLinksResourceWithRawResponse: + from .resources.file_links import FileLinksResourceWithRawResponse + + return FileLinksResourceWithRawResponse(self._client.file_links) + + @cached_property + def documents(self) -> documents.DocumentsResourceWithRawResponse: + from .resources.documents import DocumentsResourceWithRawResponse + + return DocumentsResourceWithRawResponse(self._client.documents) + + @cached_property + def exports(self) -> exports.ExportsResourceWithRawResponse: + from .resources.exports import ExportsResourceWithRawResponse + + return ExportsResourceWithRawResponse(self._client.exports) + + @cached_property + def events(self) -> events.EventsResourceWithRawResponse: + from .resources.events import EventsResourceWithRawResponse + + return EventsResourceWithRawResponse(self._client.events) + + @cached_property + def event_subscriptions(self) -> event_subscriptions.EventSubscriptionsResourceWithRawResponse: + from .resources.event_subscriptions import EventSubscriptionsResourceWithRawResponse + + return EventSubscriptionsResourceWithRawResponse(self._client.event_subscriptions) + + @cached_property + def real_time_decisions(self) -> real_time_decisions.RealTimeDecisionsResourceWithRawResponse: + from .resources.real_time_decisions import RealTimeDecisionsResourceWithRawResponse + + return RealTimeDecisionsResourceWithRawResponse(self._client.real_time_decisions) + + @cached_property + def bookkeeping_accounts(self) -> bookkeeping_accounts.BookkeepingAccountsResourceWithRawResponse: + from .resources.bookkeeping_accounts import BookkeepingAccountsResourceWithRawResponse + + return BookkeepingAccountsResourceWithRawResponse(self._client.bookkeeping_accounts) + + @cached_property + def bookkeeping_entry_sets(self) -> bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithRawResponse: + from .resources.bookkeeping_entry_sets import BookkeepingEntrySetsResourceWithRawResponse + + return BookkeepingEntrySetsResourceWithRawResponse(self._client.bookkeeping_entry_sets) + + @cached_property + def bookkeeping_entries(self) -> bookkeeping_entries.BookkeepingEntriesResourceWithRawResponse: + from .resources.bookkeeping_entries import BookkeepingEntriesResourceWithRawResponse + + return BookkeepingEntriesResourceWithRawResponse(self._client.bookkeeping_entries) + + @cached_property + def groups(self) -> groups.GroupsResourceWithRawResponse: + from .resources.groups import GroupsResourceWithRawResponse + + return GroupsResourceWithRawResponse(self._client.groups) + + @cached_property + def oauth_applications(self) -> oauth_applications.OAuthApplicationsResourceWithRawResponse: + from .resources.oauth_applications import OAuthApplicationsResourceWithRawResponse + + return OAuthApplicationsResourceWithRawResponse(self._client.oauth_applications) + + @cached_property + def oauth_connections(self) -> oauth_connections.OAuthConnectionsResourceWithRawResponse: + from .resources.oauth_connections import OAuthConnectionsResourceWithRawResponse + + return OAuthConnectionsResourceWithRawResponse(self._client.oauth_connections) + + @cached_property + def oauth_tokens(self) -> oauth_tokens.OAuthTokensResourceWithRawResponse: + from .resources.oauth_tokens import OAuthTokensResourceWithRawResponse + + return OAuthTokensResourceWithRawResponse(self._client.oauth_tokens) + + @cached_property + def intrafi_account_enrollments( + self, + ) -> intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithRawResponse: + from .resources.intrafi_account_enrollments import IntrafiAccountEnrollmentsResourceWithRawResponse + + return IntrafiAccountEnrollmentsResourceWithRawResponse(self._client.intrafi_account_enrollments) + + @cached_property + def intrafi_balances(self) -> intrafi_balances.IntrafiBalancesResourceWithRawResponse: + from .resources.intrafi_balances import IntrafiBalancesResourceWithRawResponse + + return IntrafiBalancesResourceWithRawResponse(self._client.intrafi_balances) + + @cached_property + def intrafi_exclusions(self) -> intrafi_exclusions.IntrafiExclusionsResourceWithRawResponse: + from .resources.intrafi_exclusions import IntrafiExclusionsResourceWithRawResponse + + return IntrafiExclusionsResourceWithRawResponse(self._client.intrafi_exclusions) + + @cached_property + def card_tokens(self) -> card_tokens.CardTokensResourceWithRawResponse: + from .resources.card_tokens import CardTokensResourceWithRawResponse + + return CardTokensResourceWithRawResponse(self._client.card_tokens) + + @cached_property + def card_push_transfers(self) -> card_push_transfers.CardPushTransfersResourceWithRawResponse: + from .resources.card_push_transfers import CardPushTransfersResourceWithRawResponse + + return CardPushTransfersResourceWithRawResponse(self._client.card_push_transfers) + + @cached_property + def card_validations(self) -> card_validations.CardValidationsResourceWithRawResponse: + from .resources.card_validations import CardValidationsResourceWithRawResponse + + return CardValidationsResourceWithRawResponse(self._client.card_validations) + + @cached_property + def simulations(self) -> simulations.SimulationsResourceWithRawResponse: + from .resources.simulations import SimulationsResourceWithRawResponse + + return SimulationsResourceWithRawResponse(self._client.simulations) class AsyncIncreaseWithRawResponse: + _client: AsyncIncrease + def __init__(self, client: AsyncIncrease) -> None: - self.accounts = accounts.AsyncAccountsResourceWithRawResponse(client.accounts) - self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithRawResponse(client.account_numbers) - self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithRawResponse( - client.account_transfers - ) - self.cards = cards.AsyncCardsResourceWithRawResponse(client.cards) - self.card_payments = card_payments.AsyncCardPaymentsResourceWithRawResponse(client.card_payments) - self.card_purchase_supplements = card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse( - client.card_purchase_supplements - ) - self.card_disputes = card_disputes.AsyncCardDisputesResourceWithRawResponse(client.card_disputes) - self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithRawResponse(client.physical_cards) - self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResourceWithRawResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithRawResponse( - client.digital_wallet_tokens - ) - self.transactions = transactions.AsyncTransactionsResourceWithRawResponse(client.transactions) - self.pending_transactions = pending_transactions.AsyncPendingTransactionsResourceWithRawResponse( - client.pending_transactions - ) - self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithRawResponse( - client.declined_transactions - ) - self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithRawResponse(client.ach_transfers) - self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithRawResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResourceWithRawResponse( - client.inbound_ach_transfers - ) - self.wire_transfers = wire_transfers.AsyncWireTransfersResourceWithRawResponse(client.wire_transfers) - self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResourceWithRawResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithRawResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = ( - inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithRawResponse( - client.inbound_wire_drawdown_requests - ) - ) - self.check_transfers = check_transfers.AsyncCheckTransfersResourceWithRawResponse(client.check_transfers) - self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResourceWithRawResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = ( - real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithRawResponse( - client.real_time_payments_transfers - ) - ) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( - client.inbound_real_time_payments_transfers - ) - ) - self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResourceWithRawResponse(client.fednow_transfers) - self.inbound_fednow_transfers = inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithRawResponse( - client.inbound_fednow_transfers - ) - self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithRawResponse(client.check_deposits) - self.lockboxes = lockboxes.AsyncLockboxesResourceWithRawResponse(client.lockboxes) - self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithRawResponse( - client.inbound_mail_items - ) - self.routing_numbers = routing_numbers.AsyncRoutingNumbersResourceWithRawResponse(client.routing_numbers) - self.external_accounts = external_accounts.AsyncExternalAccountsResourceWithRawResponse( - client.external_accounts - ) - self.entities = entities.AsyncEntitiesResourceWithRawResponse(client.entities) - self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResourceWithRawResponse( - client.supplemental_documents - ) - self.programs = programs.AsyncProgramsResourceWithRawResponse(client.programs) - self.account_statements = account_statements.AsyncAccountStatementsResourceWithRawResponse( - client.account_statements - ) - self.files = files.AsyncFilesResourceWithRawResponse(client.files) - self.file_links = file_links.AsyncFileLinksResourceWithRawResponse(client.file_links) - self.documents = documents.AsyncDocumentsResourceWithRawResponse(client.documents) - self.exports = exports.AsyncExportsResourceWithRawResponse(client.exports) - self.events = events.AsyncEventsResourceWithRawResponse(client.events) - self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResourceWithRawResponse( - client.event_subscriptions - ) - self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResourceWithRawResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithRawResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithRawResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResourceWithRawResponse( - client.bookkeeping_entries - ) - self.groups = groups.AsyncGroupsResourceWithRawResponse(client.groups) - self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResourceWithRawResponse( - client.oauth_applications - ) - self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithRawResponse( - client.oauth_connections + self._client = client + + @cached_property + def accounts(self) -> accounts.AsyncAccountsResourceWithRawResponse: + from .resources.accounts import AsyncAccountsResourceWithRawResponse + + return AsyncAccountsResourceWithRawResponse(self._client.accounts) + + @cached_property + def account_numbers(self) -> account_numbers.AsyncAccountNumbersResourceWithRawResponse: + from .resources.account_numbers import AsyncAccountNumbersResourceWithRawResponse + + return AsyncAccountNumbersResourceWithRawResponse(self._client.account_numbers) + + @cached_property + def account_transfers(self) -> account_transfers.AsyncAccountTransfersResourceWithRawResponse: + from .resources.account_transfers import AsyncAccountTransfersResourceWithRawResponse + + return AsyncAccountTransfersResourceWithRawResponse(self._client.account_transfers) + + @cached_property + def cards(self) -> cards.AsyncCardsResourceWithRawResponse: + from .resources.cards import AsyncCardsResourceWithRawResponse + + return AsyncCardsResourceWithRawResponse(self._client.cards) + + @cached_property + def card_payments(self) -> card_payments.AsyncCardPaymentsResourceWithRawResponse: + from .resources.card_payments import AsyncCardPaymentsResourceWithRawResponse + + return AsyncCardPaymentsResourceWithRawResponse(self._client.card_payments) + + @cached_property + def card_purchase_supplements( + self, + ) -> card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithRawResponse: + from .resources.card_purchase_supplements import AsyncCardPurchaseSupplementsResourceWithRawResponse + + return AsyncCardPurchaseSupplementsResourceWithRawResponse(self._client.card_purchase_supplements) + + @cached_property + def card_disputes(self) -> card_disputes.AsyncCardDisputesResourceWithRawResponse: + from .resources.card_disputes import AsyncCardDisputesResourceWithRawResponse + + return AsyncCardDisputesResourceWithRawResponse(self._client.card_disputes) + + @cached_property + def physical_cards(self) -> physical_cards.AsyncPhysicalCardsResourceWithRawResponse: + from .resources.physical_cards import AsyncPhysicalCardsResourceWithRawResponse + + return AsyncPhysicalCardsResourceWithRawResponse(self._client.physical_cards) + + @cached_property + def digital_card_profiles(self) -> digital_card_profiles.AsyncDigitalCardProfilesResourceWithRawResponse: + from .resources.digital_card_profiles import AsyncDigitalCardProfilesResourceWithRawResponse + + return AsyncDigitalCardProfilesResourceWithRawResponse(self._client.digital_card_profiles) + + @cached_property + def physical_card_profiles(self) -> physical_card_profiles.AsyncPhysicalCardProfilesResourceWithRawResponse: + from .resources.physical_card_profiles import AsyncPhysicalCardProfilesResourceWithRawResponse + + return AsyncPhysicalCardProfilesResourceWithRawResponse(self._client.physical_card_profiles) + + @cached_property + def digital_wallet_tokens(self) -> digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithRawResponse: + from .resources.digital_wallet_tokens import AsyncDigitalWalletTokensResourceWithRawResponse + + return AsyncDigitalWalletTokensResourceWithRawResponse(self._client.digital_wallet_tokens) + + @cached_property + def transactions(self) -> transactions.AsyncTransactionsResourceWithRawResponse: + from .resources.transactions import AsyncTransactionsResourceWithRawResponse + + return AsyncTransactionsResourceWithRawResponse(self._client.transactions) + + @cached_property + def pending_transactions(self) -> pending_transactions.AsyncPendingTransactionsResourceWithRawResponse: + from .resources.pending_transactions import AsyncPendingTransactionsResourceWithRawResponse + + return AsyncPendingTransactionsResourceWithRawResponse(self._client.pending_transactions) + + @cached_property + def declined_transactions(self) -> declined_transactions.AsyncDeclinedTransactionsResourceWithRawResponse: + from .resources.declined_transactions import AsyncDeclinedTransactionsResourceWithRawResponse + + return AsyncDeclinedTransactionsResourceWithRawResponse(self._client.declined_transactions) + + @cached_property + def ach_transfers(self) -> ach_transfers.AsyncACHTransfersResourceWithRawResponse: + from .resources.ach_transfers import AsyncACHTransfersResourceWithRawResponse + + return AsyncACHTransfersResourceWithRawResponse(self._client.ach_transfers) + + @cached_property + def ach_prenotifications(self) -> ach_prenotifications.AsyncACHPrenotificationsResourceWithRawResponse: + from .resources.ach_prenotifications import AsyncACHPrenotificationsResourceWithRawResponse + + return AsyncACHPrenotificationsResourceWithRawResponse(self._client.ach_prenotifications) + + @cached_property + def inbound_ach_transfers(self) -> inbound_ach_transfers.AsyncInboundACHTransfersResourceWithRawResponse: + from .resources.inbound_ach_transfers import AsyncInboundACHTransfersResourceWithRawResponse + + return AsyncInboundACHTransfersResourceWithRawResponse(self._client.inbound_ach_transfers) + + @cached_property + def wire_transfers(self) -> wire_transfers.AsyncWireTransfersResourceWithRawResponse: + from .resources.wire_transfers import AsyncWireTransfersResourceWithRawResponse + + return AsyncWireTransfersResourceWithRawResponse(self._client.wire_transfers) + + @cached_property + def inbound_wire_transfers(self) -> inbound_wire_transfers.AsyncInboundWireTransfersResourceWithRawResponse: + from .resources.inbound_wire_transfers import AsyncInboundWireTransfersResourceWithRawResponse + + return AsyncInboundWireTransfersResourceWithRawResponse(self._client.inbound_wire_transfers) + + @cached_property + def wire_drawdown_requests(self) -> wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithRawResponse: + from .resources.wire_drawdown_requests import AsyncWireDrawdownRequestsResourceWithRawResponse + + return AsyncWireDrawdownRequestsResourceWithRawResponse(self._client.wire_drawdown_requests) + + @cached_property + def inbound_wire_drawdown_requests( + self, + ) -> inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithRawResponse: + from .resources.inbound_wire_drawdown_requests import AsyncInboundWireDrawdownRequestsResourceWithRawResponse + + return AsyncInboundWireDrawdownRequestsResourceWithRawResponse(self._client.inbound_wire_drawdown_requests) + + @cached_property + def check_transfers(self) -> check_transfers.AsyncCheckTransfersResourceWithRawResponse: + from .resources.check_transfers import AsyncCheckTransfersResourceWithRawResponse + + return AsyncCheckTransfersResourceWithRawResponse(self._client.check_transfers) + + @cached_property + def inbound_check_deposits(self) -> inbound_check_deposits.AsyncInboundCheckDepositsResourceWithRawResponse: + from .resources.inbound_check_deposits import AsyncInboundCheckDepositsResourceWithRawResponse + + return AsyncInboundCheckDepositsResourceWithRawResponse(self._client.inbound_check_deposits) + + @cached_property + def real_time_payments_transfers( + self, + ) -> real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithRawResponse: + from .resources.real_time_payments_transfers import AsyncRealTimePaymentsTransfersResourceWithRawResponse + + return AsyncRealTimePaymentsTransfersResourceWithRawResponse(self._client.real_time_payments_transfers) + + @cached_property + def inbound_real_time_payments_transfers( + self, + ) -> inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse: + from .resources.inbound_real_time_payments_transfers import ( + AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse, ) - self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResourceWithRawResponse(client.oauth_tokens) - self.intrafi_account_enrollments = ( - intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse( - client.intrafi_account_enrollments - ) + + return AsyncInboundRealTimePaymentsTransfersResourceWithRawResponse( + self._client.inbound_real_time_payments_transfers ) - self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResourceWithRawResponse(client.intrafi_balances) - self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithRawResponse( - client.intrafi_exclusions + + @cached_property + def fednow_transfers(self) -> fednow_transfers.AsyncFednowTransfersResourceWithRawResponse: + from .resources.fednow_transfers import AsyncFednowTransfersResourceWithRawResponse + + return AsyncFednowTransfersResourceWithRawResponse(self._client.fednow_transfers) + + @cached_property + def inbound_fednow_transfers(self) -> inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithRawResponse: + from .resources.inbound_fednow_transfers import AsyncInboundFednowTransfersResourceWithRawResponse + + return AsyncInboundFednowTransfersResourceWithRawResponse(self._client.inbound_fednow_transfers) + + @cached_property + def check_deposits(self) -> check_deposits.AsyncCheckDepositsResourceWithRawResponse: + from .resources.check_deposits import AsyncCheckDepositsResourceWithRawResponse + + return AsyncCheckDepositsResourceWithRawResponse(self._client.check_deposits) + + @cached_property + def lockboxes(self) -> lockboxes.AsyncLockboxesResourceWithRawResponse: + from .resources.lockboxes import AsyncLockboxesResourceWithRawResponse + + return AsyncLockboxesResourceWithRawResponse(self._client.lockboxes) + + @cached_property + def inbound_mail_items(self) -> inbound_mail_items.AsyncInboundMailItemsResourceWithRawResponse: + from .resources.inbound_mail_items import AsyncInboundMailItemsResourceWithRawResponse + + return AsyncInboundMailItemsResourceWithRawResponse(self._client.inbound_mail_items) + + @cached_property + def routing_numbers(self) -> routing_numbers.AsyncRoutingNumbersResourceWithRawResponse: + from .resources.routing_numbers import AsyncRoutingNumbersResourceWithRawResponse + + return AsyncRoutingNumbersResourceWithRawResponse(self._client.routing_numbers) + + @cached_property + def external_accounts(self) -> external_accounts.AsyncExternalAccountsResourceWithRawResponse: + from .resources.external_accounts import AsyncExternalAccountsResourceWithRawResponse + + return AsyncExternalAccountsResourceWithRawResponse(self._client.external_accounts) + + @cached_property + def entities(self) -> entities.AsyncEntitiesResourceWithRawResponse: + from .resources.entities import AsyncEntitiesResourceWithRawResponse + + return AsyncEntitiesResourceWithRawResponse(self._client.entities) + + @cached_property + def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocumentsResourceWithRawResponse: + from .resources.supplemental_documents import AsyncSupplementalDocumentsResourceWithRawResponse + + return AsyncSupplementalDocumentsResourceWithRawResponse(self._client.supplemental_documents) + + @cached_property + def programs(self) -> programs.AsyncProgramsResourceWithRawResponse: + from .resources.programs import AsyncProgramsResourceWithRawResponse + + return AsyncProgramsResourceWithRawResponse(self._client.programs) + + @cached_property + def account_statements(self) -> account_statements.AsyncAccountStatementsResourceWithRawResponse: + from .resources.account_statements import AsyncAccountStatementsResourceWithRawResponse + + return AsyncAccountStatementsResourceWithRawResponse(self._client.account_statements) + + @cached_property + def files(self) -> files.AsyncFilesResourceWithRawResponse: + from .resources.files import AsyncFilesResourceWithRawResponse + + return AsyncFilesResourceWithRawResponse(self._client.files) + + @cached_property + def file_links(self) -> file_links.AsyncFileLinksResourceWithRawResponse: + from .resources.file_links import AsyncFileLinksResourceWithRawResponse + + return AsyncFileLinksResourceWithRawResponse(self._client.file_links) + + @cached_property + def documents(self) -> documents.AsyncDocumentsResourceWithRawResponse: + from .resources.documents import AsyncDocumentsResourceWithRawResponse + + return AsyncDocumentsResourceWithRawResponse(self._client.documents) + + @cached_property + def exports(self) -> exports.AsyncExportsResourceWithRawResponse: + from .resources.exports import AsyncExportsResourceWithRawResponse + + return AsyncExportsResourceWithRawResponse(self._client.exports) + + @cached_property + def events(self) -> events.AsyncEventsResourceWithRawResponse: + from .resources.events import AsyncEventsResourceWithRawResponse + + return AsyncEventsResourceWithRawResponse(self._client.events) + + @cached_property + def event_subscriptions(self) -> event_subscriptions.AsyncEventSubscriptionsResourceWithRawResponse: + from .resources.event_subscriptions import AsyncEventSubscriptionsResourceWithRawResponse + + return AsyncEventSubscriptionsResourceWithRawResponse(self._client.event_subscriptions) + + @cached_property + def real_time_decisions(self) -> real_time_decisions.AsyncRealTimeDecisionsResourceWithRawResponse: + from .resources.real_time_decisions import AsyncRealTimeDecisionsResourceWithRawResponse + + return AsyncRealTimeDecisionsResourceWithRawResponse(self._client.real_time_decisions) + + @cached_property + def bookkeeping_accounts(self) -> bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithRawResponse: + from .resources.bookkeeping_accounts import AsyncBookkeepingAccountsResourceWithRawResponse + + return AsyncBookkeepingAccountsResourceWithRawResponse(self._client.bookkeeping_accounts) + + @cached_property + def bookkeeping_entry_sets(self) -> bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithRawResponse: + from .resources.bookkeeping_entry_sets import AsyncBookkeepingEntrySetsResourceWithRawResponse + + return AsyncBookkeepingEntrySetsResourceWithRawResponse(self._client.bookkeeping_entry_sets) + + @cached_property + def bookkeeping_entries(self) -> bookkeeping_entries.AsyncBookkeepingEntriesResourceWithRawResponse: + from .resources.bookkeeping_entries import AsyncBookkeepingEntriesResourceWithRawResponse + + return AsyncBookkeepingEntriesResourceWithRawResponse(self._client.bookkeeping_entries) + + @cached_property + def groups(self) -> groups.AsyncGroupsResourceWithRawResponse: + from .resources.groups import AsyncGroupsResourceWithRawResponse + + return AsyncGroupsResourceWithRawResponse(self._client.groups) + + @cached_property + def oauth_applications(self) -> oauth_applications.AsyncOAuthApplicationsResourceWithRawResponse: + from .resources.oauth_applications import AsyncOAuthApplicationsResourceWithRawResponse + + return AsyncOAuthApplicationsResourceWithRawResponse(self._client.oauth_applications) + + @cached_property + def oauth_connections(self) -> oauth_connections.AsyncOAuthConnectionsResourceWithRawResponse: + from .resources.oauth_connections import AsyncOAuthConnectionsResourceWithRawResponse + + return AsyncOAuthConnectionsResourceWithRawResponse(self._client.oauth_connections) + + @cached_property + def oauth_tokens(self) -> oauth_tokens.AsyncOAuthTokensResourceWithRawResponse: + from .resources.oauth_tokens import AsyncOAuthTokensResourceWithRawResponse + + return AsyncOAuthTokensResourceWithRawResponse(self._client.oauth_tokens) + + @cached_property + def intrafi_account_enrollments( + self, + ) -> intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithRawResponse: + from .resources.intrafi_account_enrollments import AsyncIntrafiAccountEnrollmentsResourceWithRawResponse + + return AsyncIntrafiAccountEnrollmentsResourceWithRawResponse(self._client.intrafi_account_enrollments) + + @cached_property + def intrafi_balances(self) -> intrafi_balances.AsyncIntrafiBalancesResourceWithRawResponse: + from .resources.intrafi_balances import AsyncIntrafiBalancesResourceWithRawResponse + + return AsyncIntrafiBalancesResourceWithRawResponse(self._client.intrafi_balances) + + @cached_property + def intrafi_exclusions(self) -> intrafi_exclusions.AsyncIntrafiExclusionsResourceWithRawResponse: + from .resources.intrafi_exclusions import AsyncIntrafiExclusionsResourceWithRawResponse + + return AsyncIntrafiExclusionsResourceWithRawResponse(self._client.intrafi_exclusions) + + @cached_property + def card_tokens(self) -> card_tokens.AsyncCardTokensResourceWithRawResponse: + from .resources.card_tokens import AsyncCardTokensResourceWithRawResponse + + return AsyncCardTokensResourceWithRawResponse(self._client.card_tokens) + + @cached_property + def card_push_transfers(self) -> card_push_transfers.AsyncCardPushTransfersResourceWithRawResponse: + from .resources.card_push_transfers import AsyncCardPushTransfersResourceWithRawResponse + + return AsyncCardPushTransfersResourceWithRawResponse(self._client.card_push_transfers) + + @cached_property + def card_validations(self) -> card_validations.AsyncCardValidationsResourceWithRawResponse: + from .resources.card_validations import AsyncCardValidationsResourceWithRawResponse + + return AsyncCardValidationsResourceWithRawResponse(self._client.card_validations) + + @cached_property + def simulations(self) -> simulations.AsyncSimulationsResourceWithRawResponse: + from .resources.simulations import AsyncSimulationsResourceWithRawResponse + + return AsyncSimulationsResourceWithRawResponse(self._client.simulations) + + +class IncreaseWithStreamedResponse: + _client: Increase + + def __init__(self, client: Increase) -> None: + self._client = client + + @cached_property + def accounts(self) -> accounts.AccountsResourceWithStreamingResponse: + from .resources.accounts import AccountsResourceWithStreamingResponse + + return AccountsResourceWithStreamingResponse(self._client.accounts) + + @cached_property + def account_numbers(self) -> account_numbers.AccountNumbersResourceWithStreamingResponse: + from .resources.account_numbers import AccountNumbersResourceWithStreamingResponse + + return AccountNumbersResourceWithStreamingResponse(self._client.account_numbers) + + @cached_property + def account_transfers(self) -> account_transfers.AccountTransfersResourceWithStreamingResponse: + from .resources.account_transfers import AccountTransfersResourceWithStreamingResponse + + return AccountTransfersResourceWithStreamingResponse(self._client.account_transfers) + + @cached_property + def cards(self) -> cards.CardsResourceWithStreamingResponse: + from .resources.cards import CardsResourceWithStreamingResponse + + return CardsResourceWithStreamingResponse(self._client.cards) + + @cached_property + def card_payments(self) -> card_payments.CardPaymentsResourceWithStreamingResponse: + from .resources.card_payments import CardPaymentsResourceWithStreamingResponse + + return CardPaymentsResourceWithStreamingResponse(self._client.card_payments) + + @cached_property + def card_purchase_supplements( + self, + ) -> card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse: + from .resources.card_purchase_supplements import CardPurchaseSupplementsResourceWithStreamingResponse + + return CardPurchaseSupplementsResourceWithStreamingResponse(self._client.card_purchase_supplements) + + @cached_property + def card_disputes(self) -> card_disputes.CardDisputesResourceWithStreamingResponse: + from .resources.card_disputes import CardDisputesResourceWithStreamingResponse + + return CardDisputesResourceWithStreamingResponse(self._client.card_disputes) + + @cached_property + def physical_cards(self) -> physical_cards.PhysicalCardsResourceWithStreamingResponse: + from .resources.physical_cards import PhysicalCardsResourceWithStreamingResponse + + return PhysicalCardsResourceWithStreamingResponse(self._client.physical_cards) + + @cached_property + def digital_card_profiles(self) -> digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse: + from .resources.digital_card_profiles import DigitalCardProfilesResourceWithStreamingResponse + + return DigitalCardProfilesResourceWithStreamingResponse(self._client.digital_card_profiles) + + @cached_property + def physical_card_profiles(self) -> physical_card_profiles.PhysicalCardProfilesResourceWithStreamingResponse: + from .resources.physical_card_profiles import PhysicalCardProfilesResourceWithStreamingResponse + + return PhysicalCardProfilesResourceWithStreamingResponse(self._client.physical_card_profiles) + + @cached_property + def digital_wallet_tokens(self) -> digital_wallet_tokens.DigitalWalletTokensResourceWithStreamingResponse: + from .resources.digital_wallet_tokens import DigitalWalletTokensResourceWithStreamingResponse + + return DigitalWalletTokensResourceWithStreamingResponse(self._client.digital_wallet_tokens) + + @cached_property + def transactions(self) -> transactions.TransactionsResourceWithStreamingResponse: + from .resources.transactions import TransactionsResourceWithStreamingResponse + + return TransactionsResourceWithStreamingResponse(self._client.transactions) + + @cached_property + def pending_transactions(self) -> pending_transactions.PendingTransactionsResourceWithStreamingResponse: + from .resources.pending_transactions import PendingTransactionsResourceWithStreamingResponse + + return PendingTransactionsResourceWithStreamingResponse(self._client.pending_transactions) + + @cached_property + def declined_transactions(self) -> declined_transactions.DeclinedTransactionsResourceWithStreamingResponse: + from .resources.declined_transactions import DeclinedTransactionsResourceWithStreamingResponse + + return DeclinedTransactionsResourceWithStreamingResponse(self._client.declined_transactions) + + @cached_property + def ach_transfers(self) -> ach_transfers.ACHTransfersResourceWithStreamingResponse: + from .resources.ach_transfers import ACHTransfersResourceWithStreamingResponse + + return ACHTransfersResourceWithStreamingResponse(self._client.ach_transfers) + + @cached_property + def ach_prenotifications(self) -> ach_prenotifications.ACHPrenotificationsResourceWithStreamingResponse: + from .resources.ach_prenotifications import ACHPrenotificationsResourceWithStreamingResponse + + return ACHPrenotificationsResourceWithStreamingResponse(self._client.ach_prenotifications) + + @cached_property + def inbound_ach_transfers(self) -> inbound_ach_transfers.InboundACHTransfersResourceWithStreamingResponse: + from .resources.inbound_ach_transfers import InboundACHTransfersResourceWithStreamingResponse + + return InboundACHTransfersResourceWithStreamingResponse(self._client.inbound_ach_transfers) + + @cached_property + def wire_transfers(self) -> wire_transfers.WireTransfersResourceWithStreamingResponse: + from .resources.wire_transfers import WireTransfersResourceWithStreamingResponse + + return WireTransfersResourceWithStreamingResponse(self._client.wire_transfers) + + @cached_property + def inbound_wire_transfers(self) -> inbound_wire_transfers.InboundWireTransfersResourceWithStreamingResponse: + from .resources.inbound_wire_transfers import InboundWireTransfersResourceWithStreamingResponse + + return InboundWireTransfersResourceWithStreamingResponse(self._client.inbound_wire_transfers) + + @cached_property + def wire_drawdown_requests(self) -> wire_drawdown_requests.WireDrawdownRequestsResourceWithStreamingResponse: + from .resources.wire_drawdown_requests import WireDrawdownRequestsResourceWithStreamingResponse + + return WireDrawdownRequestsResourceWithStreamingResponse(self._client.wire_drawdown_requests) + + @cached_property + def inbound_wire_drawdown_requests( + self, + ) -> inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithStreamingResponse: + from .resources.inbound_wire_drawdown_requests import InboundWireDrawdownRequestsResourceWithStreamingResponse + + return InboundWireDrawdownRequestsResourceWithStreamingResponse(self._client.inbound_wire_drawdown_requests) + + @cached_property + def check_transfers(self) -> check_transfers.CheckTransfersResourceWithStreamingResponse: + from .resources.check_transfers import CheckTransfersResourceWithStreamingResponse + + return CheckTransfersResourceWithStreamingResponse(self._client.check_transfers) + + @cached_property + def inbound_check_deposits(self) -> inbound_check_deposits.InboundCheckDepositsResourceWithStreamingResponse: + from .resources.inbound_check_deposits import InboundCheckDepositsResourceWithStreamingResponse + + return InboundCheckDepositsResourceWithStreamingResponse(self._client.inbound_check_deposits) + + @cached_property + def real_time_payments_transfers( + self, + ) -> real_time_payments_transfers.RealTimePaymentsTransfersResourceWithStreamingResponse: + from .resources.real_time_payments_transfers import RealTimePaymentsTransfersResourceWithStreamingResponse + + return RealTimePaymentsTransfersResourceWithStreamingResponse(self._client.real_time_payments_transfers) + + @cached_property + def inbound_real_time_payments_transfers( + self, + ) -> inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithStreamingResponse: + from .resources.inbound_real_time_payments_transfers import ( + InboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) - self.card_tokens = card_tokens.AsyncCardTokensResourceWithRawResponse(client.card_tokens) - self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResourceWithRawResponse( - client.card_push_transfers + + return InboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._client.inbound_real_time_payments_transfers ) - self.card_validations = card_validations.AsyncCardValidationsResourceWithRawResponse(client.card_validations) - self.simulations = simulations.AsyncSimulationsResourceWithRawResponse(client.simulations) + @cached_property + def fednow_transfers(self) -> fednow_transfers.FednowTransfersResourceWithStreamingResponse: + from .resources.fednow_transfers import FednowTransfersResourceWithStreamingResponse -class IncreaseWithStreamedResponse: - def __init__(self, client: Increase) -> None: - self.accounts = accounts.AccountsResourceWithStreamingResponse(client.accounts) - self.account_numbers = account_numbers.AccountNumbersResourceWithStreamingResponse(client.account_numbers) - self.account_transfers = account_transfers.AccountTransfersResourceWithStreamingResponse( - client.account_transfers - ) - self.cards = cards.CardsResourceWithStreamingResponse(client.cards) - self.card_payments = card_payments.CardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = card_purchase_supplements.CardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) - self.card_disputes = card_disputes.CardDisputesResourceWithStreamingResponse(client.card_disputes) - self.physical_cards = physical_cards.PhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = digital_card_profiles.DigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = physical_card_profiles.PhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = digital_wallet_tokens.DigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) - self.transactions = transactions.TransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = pending_transactions.PendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = declined_transactions.DeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) - self.ach_transfers = ach_transfers.ACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = ach_prenotifications.ACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = inbound_ach_transfers.InboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) - self.wire_transfers = wire_transfers.WireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = inbound_wire_transfers.InboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = wire_drawdown_requests.WireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = ( - inbound_wire_drawdown_requests.InboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) - ) - self.check_transfers = check_transfers.CheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = inbound_check_deposits.InboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = ( - real_time_payments_transfers.RealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) - ) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.InboundRealTimePaymentsTransfersResourceWithStreamingResponse( - client.inbound_real_time_payments_transfers - ) - ) - self.fednow_transfers = fednow_transfers.FednowTransfersResourceWithStreamingResponse(client.fednow_transfers) - self.inbound_fednow_transfers = inbound_fednow_transfers.InboundFednowTransfersResourceWithStreamingResponse( - client.inbound_fednow_transfers - ) - self.check_deposits = check_deposits.CheckDepositsResourceWithStreamingResponse(client.check_deposits) - self.lockboxes = lockboxes.LockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = inbound_mail_items.InboundMailItemsResourceWithStreamingResponse( - client.inbound_mail_items - ) - self.routing_numbers = routing_numbers.RoutingNumbersResourceWithStreamingResponse(client.routing_numbers) - self.external_accounts = external_accounts.ExternalAccountsResourceWithStreamingResponse( - client.external_accounts - ) - self.entities = entities.EntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = supplemental_documents.SupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) - self.programs = programs.ProgramsResourceWithStreamingResponse(client.programs) - self.account_statements = account_statements.AccountStatementsResourceWithStreamingResponse( - client.account_statements - ) - self.files = files.FilesResourceWithStreamingResponse(client.files) - self.file_links = file_links.FileLinksResourceWithStreamingResponse(client.file_links) - self.documents = documents.DocumentsResourceWithStreamingResponse(client.documents) - self.exports = exports.ExportsResourceWithStreamingResponse(client.exports) - self.events = events.EventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = event_subscriptions.EventSubscriptionsResourceWithStreamingResponse( - client.event_subscriptions - ) - self.real_time_decisions = real_time_decisions.RealTimeDecisionsResourceWithStreamingResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = bookkeeping_accounts.BookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = bookkeeping_entries.BookkeepingEntriesResourceWithStreamingResponse( - client.bookkeeping_entries - ) - self.groups = groups.GroupsResourceWithStreamingResponse(client.groups) - self.oauth_applications = oauth_applications.OAuthApplicationsResourceWithStreamingResponse( - client.oauth_applications - ) - self.oauth_connections = oauth_connections.OAuthConnectionsResourceWithStreamingResponse( - client.oauth_connections - ) - self.oauth_tokens = oauth_tokens.OAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = ( - intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) - ) - self.intrafi_balances = intrafi_balances.IntrafiBalancesResourceWithStreamingResponse(client.intrafi_balances) - self.intrafi_exclusions = intrafi_exclusions.IntrafiExclusionsResourceWithStreamingResponse( - client.intrafi_exclusions - ) - self.card_tokens = card_tokens.CardTokensResourceWithStreamingResponse(client.card_tokens) - self.card_push_transfers = card_push_transfers.CardPushTransfersResourceWithStreamingResponse( - client.card_push_transfers - ) - self.card_validations = card_validations.CardValidationsResourceWithStreamingResponse(client.card_validations) - self.simulations = simulations.SimulationsResourceWithStreamingResponse(client.simulations) + return FednowTransfersResourceWithStreamingResponse(self._client.fednow_transfers) + + @cached_property + def inbound_fednow_transfers(self) -> inbound_fednow_transfers.InboundFednowTransfersResourceWithStreamingResponse: + from .resources.inbound_fednow_transfers import InboundFednowTransfersResourceWithStreamingResponse + + return InboundFednowTransfersResourceWithStreamingResponse(self._client.inbound_fednow_transfers) + + @cached_property + def check_deposits(self) -> check_deposits.CheckDepositsResourceWithStreamingResponse: + from .resources.check_deposits import CheckDepositsResourceWithStreamingResponse + + return CheckDepositsResourceWithStreamingResponse(self._client.check_deposits) + + @cached_property + def lockboxes(self) -> lockboxes.LockboxesResourceWithStreamingResponse: + from .resources.lockboxes import LockboxesResourceWithStreamingResponse + + return LockboxesResourceWithStreamingResponse(self._client.lockboxes) + + @cached_property + def inbound_mail_items(self) -> inbound_mail_items.InboundMailItemsResourceWithStreamingResponse: + from .resources.inbound_mail_items import InboundMailItemsResourceWithStreamingResponse + + return InboundMailItemsResourceWithStreamingResponse(self._client.inbound_mail_items) + + @cached_property + def routing_numbers(self) -> routing_numbers.RoutingNumbersResourceWithStreamingResponse: + from .resources.routing_numbers import RoutingNumbersResourceWithStreamingResponse + + return RoutingNumbersResourceWithStreamingResponse(self._client.routing_numbers) + + @cached_property + def external_accounts(self) -> external_accounts.ExternalAccountsResourceWithStreamingResponse: + from .resources.external_accounts import ExternalAccountsResourceWithStreamingResponse + + return ExternalAccountsResourceWithStreamingResponse(self._client.external_accounts) + + @cached_property + def entities(self) -> entities.EntitiesResourceWithStreamingResponse: + from .resources.entities import EntitiesResourceWithStreamingResponse + + return EntitiesResourceWithStreamingResponse(self._client.entities) + + @cached_property + def supplemental_documents(self) -> supplemental_documents.SupplementalDocumentsResourceWithStreamingResponse: + from .resources.supplemental_documents import SupplementalDocumentsResourceWithStreamingResponse + + return SupplementalDocumentsResourceWithStreamingResponse(self._client.supplemental_documents) + + @cached_property + def programs(self) -> programs.ProgramsResourceWithStreamingResponse: + from .resources.programs import ProgramsResourceWithStreamingResponse + + return ProgramsResourceWithStreamingResponse(self._client.programs) + + @cached_property + def account_statements(self) -> account_statements.AccountStatementsResourceWithStreamingResponse: + from .resources.account_statements import AccountStatementsResourceWithStreamingResponse + + return AccountStatementsResourceWithStreamingResponse(self._client.account_statements) + + @cached_property + def files(self) -> files.FilesResourceWithStreamingResponse: + from .resources.files import FilesResourceWithStreamingResponse + + return FilesResourceWithStreamingResponse(self._client.files) + + @cached_property + def file_links(self) -> file_links.FileLinksResourceWithStreamingResponse: + from .resources.file_links import FileLinksResourceWithStreamingResponse + + return FileLinksResourceWithStreamingResponse(self._client.file_links) + + @cached_property + def documents(self) -> documents.DocumentsResourceWithStreamingResponse: + from .resources.documents import DocumentsResourceWithStreamingResponse + + return DocumentsResourceWithStreamingResponse(self._client.documents) + + @cached_property + def exports(self) -> exports.ExportsResourceWithStreamingResponse: + from .resources.exports import ExportsResourceWithStreamingResponse + + return ExportsResourceWithStreamingResponse(self._client.exports) + + @cached_property + def events(self) -> events.EventsResourceWithStreamingResponse: + from .resources.events import EventsResourceWithStreamingResponse + + return EventsResourceWithStreamingResponse(self._client.events) + + @cached_property + def event_subscriptions(self) -> event_subscriptions.EventSubscriptionsResourceWithStreamingResponse: + from .resources.event_subscriptions import EventSubscriptionsResourceWithStreamingResponse + + return EventSubscriptionsResourceWithStreamingResponse(self._client.event_subscriptions) + + @cached_property + def real_time_decisions(self) -> real_time_decisions.RealTimeDecisionsResourceWithStreamingResponse: + from .resources.real_time_decisions import RealTimeDecisionsResourceWithStreamingResponse + + return RealTimeDecisionsResourceWithStreamingResponse(self._client.real_time_decisions) + + @cached_property + def bookkeeping_accounts(self) -> bookkeeping_accounts.BookkeepingAccountsResourceWithStreamingResponse: + from .resources.bookkeeping_accounts import BookkeepingAccountsResourceWithStreamingResponse + + return BookkeepingAccountsResourceWithStreamingResponse(self._client.bookkeeping_accounts) + + @cached_property + def bookkeeping_entry_sets(self) -> bookkeeping_entry_sets.BookkeepingEntrySetsResourceWithStreamingResponse: + from .resources.bookkeeping_entry_sets import BookkeepingEntrySetsResourceWithStreamingResponse + + return BookkeepingEntrySetsResourceWithStreamingResponse(self._client.bookkeeping_entry_sets) + + @cached_property + def bookkeeping_entries(self) -> bookkeeping_entries.BookkeepingEntriesResourceWithStreamingResponse: + from .resources.bookkeeping_entries import BookkeepingEntriesResourceWithStreamingResponse + + return BookkeepingEntriesResourceWithStreamingResponse(self._client.bookkeeping_entries) + + @cached_property + def groups(self) -> groups.GroupsResourceWithStreamingResponse: + from .resources.groups import GroupsResourceWithStreamingResponse + + return GroupsResourceWithStreamingResponse(self._client.groups) + + @cached_property + def oauth_applications(self) -> oauth_applications.OAuthApplicationsResourceWithStreamingResponse: + from .resources.oauth_applications import OAuthApplicationsResourceWithStreamingResponse + + return OAuthApplicationsResourceWithStreamingResponse(self._client.oauth_applications) + + @cached_property + def oauth_connections(self) -> oauth_connections.OAuthConnectionsResourceWithStreamingResponse: + from .resources.oauth_connections import OAuthConnectionsResourceWithStreamingResponse + + return OAuthConnectionsResourceWithStreamingResponse(self._client.oauth_connections) + + @cached_property + def oauth_tokens(self) -> oauth_tokens.OAuthTokensResourceWithStreamingResponse: + from .resources.oauth_tokens import OAuthTokensResourceWithStreamingResponse + + return OAuthTokensResourceWithStreamingResponse(self._client.oauth_tokens) + + @cached_property + def intrafi_account_enrollments( + self, + ) -> intrafi_account_enrollments.IntrafiAccountEnrollmentsResourceWithStreamingResponse: + from .resources.intrafi_account_enrollments import IntrafiAccountEnrollmentsResourceWithStreamingResponse + + return IntrafiAccountEnrollmentsResourceWithStreamingResponse(self._client.intrafi_account_enrollments) + + @cached_property + def intrafi_balances(self) -> intrafi_balances.IntrafiBalancesResourceWithStreamingResponse: + from .resources.intrafi_balances import IntrafiBalancesResourceWithStreamingResponse + + return IntrafiBalancesResourceWithStreamingResponse(self._client.intrafi_balances) + + @cached_property + def intrafi_exclusions(self) -> intrafi_exclusions.IntrafiExclusionsResourceWithStreamingResponse: + from .resources.intrafi_exclusions import IntrafiExclusionsResourceWithStreamingResponse + + return IntrafiExclusionsResourceWithStreamingResponse(self._client.intrafi_exclusions) + + @cached_property + def card_tokens(self) -> card_tokens.CardTokensResourceWithStreamingResponse: + from .resources.card_tokens import CardTokensResourceWithStreamingResponse + + return CardTokensResourceWithStreamingResponse(self._client.card_tokens) + + @cached_property + def card_push_transfers(self) -> card_push_transfers.CardPushTransfersResourceWithStreamingResponse: + from .resources.card_push_transfers import CardPushTransfersResourceWithStreamingResponse + + return CardPushTransfersResourceWithStreamingResponse(self._client.card_push_transfers) + + @cached_property + def card_validations(self) -> card_validations.CardValidationsResourceWithStreamingResponse: + from .resources.card_validations import CardValidationsResourceWithStreamingResponse + + return CardValidationsResourceWithStreamingResponse(self._client.card_validations) + + @cached_property + def simulations(self) -> simulations.SimulationsResourceWithStreamingResponse: + from .resources.simulations import SimulationsResourceWithStreamingResponse + + return SimulationsResourceWithStreamingResponse(self._client.simulations) class AsyncIncreaseWithStreamedResponse: + _client: AsyncIncrease + def __init__(self, client: AsyncIncrease) -> None: - self.accounts = accounts.AsyncAccountsResourceWithStreamingResponse(client.accounts) - self.account_numbers = account_numbers.AsyncAccountNumbersResourceWithStreamingResponse(client.account_numbers) - self.account_transfers = account_transfers.AsyncAccountTransfersResourceWithStreamingResponse( - client.account_transfers - ) - self.cards = cards.AsyncCardsResourceWithStreamingResponse(client.cards) - self.card_payments = card_payments.AsyncCardPaymentsResourceWithStreamingResponse(client.card_payments) - self.card_purchase_supplements = ( - card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse( - client.card_purchase_supplements - ) - ) - self.card_disputes = card_disputes.AsyncCardDisputesResourceWithStreamingResponse(client.card_disputes) - self.physical_cards = physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse(client.physical_cards) - self.digital_card_profiles = digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse( - client.digital_card_profiles - ) - self.physical_card_profiles = physical_card_profiles.AsyncPhysicalCardProfilesResourceWithStreamingResponse( - client.physical_card_profiles - ) - self.digital_wallet_tokens = digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithStreamingResponse( - client.digital_wallet_tokens - ) - self.transactions = transactions.AsyncTransactionsResourceWithStreamingResponse(client.transactions) - self.pending_transactions = pending_transactions.AsyncPendingTransactionsResourceWithStreamingResponse( - client.pending_transactions - ) - self.declined_transactions = declined_transactions.AsyncDeclinedTransactionsResourceWithStreamingResponse( - client.declined_transactions - ) - self.ach_transfers = ach_transfers.AsyncACHTransfersResourceWithStreamingResponse(client.ach_transfers) - self.ach_prenotifications = ach_prenotifications.AsyncACHPrenotificationsResourceWithStreamingResponse( - client.ach_prenotifications - ) - self.inbound_ach_transfers = inbound_ach_transfers.AsyncInboundACHTransfersResourceWithStreamingResponse( - client.inbound_ach_transfers - ) - self.wire_transfers = wire_transfers.AsyncWireTransfersResourceWithStreamingResponse(client.wire_transfers) - self.inbound_wire_transfers = inbound_wire_transfers.AsyncInboundWireTransfersResourceWithStreamingResponse( - client.inbound_wire_transfers - ) - self.wire_drawdown_requests = wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithStreamingResponse( - client.wire_drawdown_requests - ) - self.inbound_wire_drawdown_requests = ( - inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( - client.inbound_wire_drawdown_requests - ) - ) - self.check_transfers = check_transfers.AsyncCheckTransfersResourceWithStreamingResponse(client.check_transfers) - self.inbound_check_deposits = inbound_check_deposits.AsyncInboundCheckDepositsResourceWithStreamingResponse( - client.inbound_check_deposits - ) - self.real_time_payments_transfers = ( - real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse( - client.real_time_payments_transfers - ) - ) - self.inbound_real_time_payments_transfers = ( - inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( - client.inbound_real_time_payments_transfers - ) - ) - self.fednow_transfers = fednow_transfers.AsyncFednowTransfersResourceWithStreamingResponse( - client.fednow_transfers - ) - self.inbound_fednow_transfers = ( - inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithStreamingResponse( - client.inbound_fednow_transfers - ) - ) - self.check_deposits = check_deposits.AsyncCheckDepositsResourceWithStreamingResponse(client.check_deposits) - self.lockboxes = lockboxes.AsyncLockboxesResourceWithStreamingResponse(client.lockboxes) - self.inbound_mail_items = inbound_mail_items.AsyncInboundMailItemsResourceWithStreamingResponse( - client.inbound_mail_items - ) - self.routing_numbers = routing_numbers.AsyncRoutingNumbersResourceWithStreamingResponse(client.routing_numbers) - self.external_accounts = external_accounts.AsyncExternalAccountsResourceWithStreamingResponse( - client.external_accounts - ) - self.entities = entities.AsyncEntitiesResourceWithStreamingResponse(client.entities) - self.supplemental_documents = supplemental_documents.AsyncSupplementalDocumentsResourceWithStreamingResponse( - client.supplemental_documents - ) - self.programs = programs.AsyncProgramsResourceWithStreamingResponse(client.programs) - self.account_statements = account_statements.AsyncAccountStatementsResourceWithStreamingResponse( - client.account_statements - ) - self.files = files.AsyncFilesResourceWithStreamingResponse(client.files) - self.file_links = file_links.AsyncFileLinksResourceWithStreamingResponse(client.file_links) - self.documents = documents.AsyncDocumentsResourceWithStreamingResponse(client.documents) - self.exports = exports.AsyncExportsResourceWithStreamingResponse(client.exports) - self.events = events.AsyncEventsResourceWithStreamingResponse(client.events) - self.event_subscriptions = event_subscriptions.AsyncEventSubscriptionsResourceWithStreamingResponse( - client.event_subscriptions - ) - self.real_time_decisions = real_time_decisions.AsyncRealTimeDecisionsResourceWithStreamingResponse( - client.real_time_decisions - ) - self.bookkeeping_accounts = bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithStreamingResponse( - client.bookkeeping_accounts - ) - self.bookkeeping_entry_sets = bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithStreamingResponse( - client.bookkeeping_entry_sets - ) - self.bookkeeping_entries = bookkeeping_entries.AsyncBookkeepingEntriesResourceWithStreamingResponse( - client.bookkeeping_entries - ) - self.groups = groups.AsyncGroupsResourceWithStreamingResponse(client.groups) - self.oauth_applications = oauth_applications.AsyncOAuthApplicationsResourceWithStreamingResponse( - client.oauth_applications - ) - self.oauth_connections = oauth_connections.AsyncOAuthConnectionsResourceWithStreamingResponse( - client.oauth_connections - ) - self.oauth_tokens = oauth_tokens.AsyncOAuthTokensResourceWithStreamingResponse(client.oauth_tokens) - self.intrafi_account_enrollments = ( - intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse( - client.intrafi_account_enrollments - ) - ) - self.intrafi_balances = intrafi_balances.AsyncIntrafiBalancesResourceWithStreamingResponse( - client.intrafi_balances + self._client = client + + @cached_property + def accounts(self) -> accounts.AsyncAccountsResourceWithStreamingResponse: + from .resources.accounts import AsyncAccountsResourceWithStreamingResponse + + return AsyncAccountsResourceWithStreamingResponse(self._client.accounts) + + @cached_property + def account_numbers(self) -> account_numbers.AsyncAccountNumbersResourceWithStreamingResponse: + from .resources.account_numbers import AsyncAccountNumbersResourceWithStreamingResponse + + return AsyncAccountNumbersResourceWithStreamingResponse(self._client.account_numbers) + + @cached_property + def account_transfers(self) -> account_transfers.AsyncAccountTransfersResourceWithStreamingResponse: + from .resources.account_transfers import AsyncAccountTransfersResourceWithStreamingResponse + + return AsyncAccountTransfersResourceWithStreamingResponse(self._client.account_transfers) + + @cached_property + def cards(self) -> cards.AsyncCardsResourceWithStreamingResponse: + from .resources.cards import AsyncCardsResourceWithStreamingResponse + + return AsyncCardsResourceWithStreamingResponse(self._client.cards) + + @cached_property + def card_payments(self) -> card_payments.AsyncCardPaymentsResourceWithStreamingResponse: + from .resources.card_payments import AsyncCardPaymentsResourceWithStreamingResponse + + return AsyncCardPaymentsResourceWithStreamingResponse(self._client.card_payments) + + @cached_property + def card_purchase_supplements( + self, + ) -> card_purchase_supplements.AsyncCardPurchaseSupplementsResourceWithStreamingResponse: + from .resources.card_purchase_supplements import AsyncCardPurchaseSupplementsResourceWithStreamingResponse + + return AsyncCardPurchaseSupplementsResourceWithStreamingResponse(self._client.card_purchase_supplements) + + @cached_property + def card_disputes(self) -> card_disputes.AsyncCardDisputesResourceWithStreamingResponse: + from .resources.card_disputes import AsyncCardDisputesResourceWithStreamingResponse + + return AsyncCardDisputesResourceWithStreamingResponse(self._client.card_disputes) + + @cached_property + def physical_cards(self) -> physical_cards.AsyncPhysicalCardsResourceWithStreamingResponse: + from .resources.physical_cards import AsyncPhysicalCardsResourceWithStreamingResponse + + return AsyncPhysicalCardsResourceWithStreamingResponse(self._client.physical_cards) + + @cached_property + def digital_card_profiles(self) -> digital_card_profiles.AsyncDigitalCardProfilesResourceWithStreamingResponse: + from .resources.digital_card_profiles import AsyncDigitalCardProfilesResourceWithStreamingResponse + + return AsyncDigitalCardProfilesResourceWithStreamingResponse(self._client.digital_card_profiles) + + @cached_property + def physical_card_profiles(self) -> physical_card_profiles.AsyncPhysicalCardProfilesResourceWithStreamingResponse: + from .resources.physical_card_profiles import AsyncPhysicalCardProfilesResourceWithStreamingResponse + + return AsyncPhysicalCardProfilesResourceWithStreamingResponse(self._client.physical_card_profiles) + + @cached_property + def digital_wallet_tokens(self) -> digital_wallet_tokens.AsyncDigitalWalletTokensResourceWithStreamingResponse: + from .resources.digital_wallet_tokens import AsyncDigitalWalletTokensResourceWithStreamingResponse + + return AsyncDigitalWalletTokensResourceWithStreamingResponse(self._client.digital_wallet_tokens) + + @cached_property + def transactions(self) -> transactions.AsyncTransactionsResourceWithStreamingResponse: + from .resources.transactions import AsyncTransactionsResourceWithStreamingResponse + + return AsyncTransactionsResourceWithStreamingResponse(self._client.transactions) + + @cached_property + def pending_transactions(self) -> pending_transactions.AsyncPendingTransactionsResourceWithStreamingResponse: + from .resources.pending_transactions import AsyncPendingTransactionsResourceWithStreamingResponse + + return AsyncPendingTransactionsResourceWithStreamingResponse(self._client.pending_transactions) + + @cached_property + def declined_transactions(self) -> declined_transactions.AsyncDeclinedTransactionsResourceWithStreamingResponse: + from .resources.declined_transactions import AsyncDeclinedTransactionsResourceWithStreamingResponse + + return AsyncDeclinedTransactionsResourceWithStreamingResponse(self._client.declined_transactions) + + @cached_property + def ach_transfers(self) -> ach_transfers.AsyncACHTransfersResourceWithStreamingResponse: + from .resources.ach_transfers import AsyncACHTransfersResourceWithStreamingResponse + + return AsyncACHTransfersResourceWithStreamingResponse(self._client.ach_transfers) + + @cached_property + def ach_prenotifications(self) -> ach_prenotifications.AsyncACHPrenotificationsResourceWithStreamingResponse: + from .resources.ach_prenotifications import AsyncACHPrenotificationsResourceWithStreamingResponse + + return AsyncACHPrenotificationsResourceWithStreamingResponse(self._client.ach_prenotifications) + + @cached_property + def inbound_ach_transfers(self) -> inbound_ach_transfers.AsyncInboundACHTransfersResourceWithStreamingResponse: + from .resources.inbound_ach_transfers import AsyncInboundACHTransfersResourceWithStreamingResponse + + return AsyncInboundACHTransfersResourceWithStreamingResponse(self._client.inbound_ach_transfers) + + @cached_property + def wire_transfers(self) -> wire_transfers.AsyncWireTransfersResourceWithStreamingResponse: + from .resources.wire_transfers import AsyncWireTransfersResourceWithStreamingResponse + + return AsyncWireTransfersResourceWithStreamingResponse(self._client.wire_transfers) + + @cached_property + def inbound_wire_transfers(self) -> inbound_wire_transfers.AsyncInboundWireTransfersResourceWithStreamingResponse: + from .resources.inbound_wire_transfers import AsyncInboundWireTransfersResourceWithStreamingResponse + + return AsyncInboundWireTransfersResourceWithStreamingResponse(self._client.inbound_wire_transfers) + + @cached_property + def wire_drawdown_requests(self) -> wire_drawdown_requests.AsyncWireDrawdownRequestsResourceWithStreamingResponse: + from .resources.wire_drawdown_requests import AsyncWireDrawdownRequestsResourceWithStreamingResponse + + return AsyncWireDrawdownRequestsResourceWithStreamingResponse(self._client.wire_drawdown_requests) + + @cached_property + def inbound_wire_drawdown_requests( + self, + ) -> inbound_wire_drawdown_requests.AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse: + from .resources.inbound_wire_drawdown_requests import ( + AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse, ) - self.intrafi_exclusions = intrafi_exclusions.AsyncIntrafiExclusionsResourceWithStreamingResponse( - client.intrafi_exclusions + + return AsyncInboundWireDrawdownRequestsResourceWithStreamingResponse( + self._client.inbound_wire_drawdown_requests ) - self.card_tokens = card_tokens.AsyncCardTokensResourceWithStreamingResponse(client.card_tokens) - self.card_push_transfers = card_push_transfers.AsyncCardPushTransfersResourceWithStreamingResponse( - client.card_push_transfers + + @cached_property + def check_transfers(self) -> check_transfers.AsyncCheckTransfersResourceWithStreamingResponse: + from .resources.check_transfers import AsyncCheckTransfersResourceWithStreamingResponse + + return AsyncCheckTransfersResourceWithStreamingResponse(self._client.check_transfers) + + @cached_property + def inbound_check_deposits(self) -> inbound_check_deposits.AsyncInboundCheckDepositsResourceWithStreamingResponse: + from .resources.inbound_check_deposits import AsyncInboundCheckDepositsResourceWithStreamingResponse + + return AsyncInboundCheckDepositsResourceWithStreamingResponse(self._client.inbound_check_deposits) + + @cached_property + def real_time_payments_transfers( + self, + ) -> real_time_payments_transfers.AsyncRealTimePaymentsTransfersResourceWithStreamingResponse: + from .resources.real_time_payments_transfers import AsyncRealTimePaymentsTransfersResourceWithStreamingResponse + + return AsyncRealTimePaymentsTransfersResourceWithStreamingResponse(self._client.real_time_payments_transfers) + + @cached_property + def inbound_real_time_payments_transfers( + self, + ) -> inbound_real_time_payments_transfers.AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse: + from .resources.inbound_real_time_payments_transfers import ( + AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse, ) - self.card_validations = card_validations.AsyncCardValidationsResourceWithStreamingResponse( - client.card_validations + + return AsyncInboundRealTimePaymentsTransfersResourceWithStreamingResponse( + self._client.inbound_real_time_payments_transfers ) - self.simulations = simulations.AsyncSimulationsResourceWithStreamingResponse(client.simulations) + + @cached_property + def fednow_transfers(self) -> fednow_transfers.AsyncFednowTransfersResourceWithStreamingResponse: + from .resources.fednow_transfers import AsyncFednowTransfersResourceWithStreamingResponse + + return AsyncFednowTransfersResourceWithStreamingResponse(self._client.fednow_transfers) + + @cached_property + def inbound_fednow_transfers( + self, + ) -> inbound_fednow_transfers.AsyncInboundFednowTransfersResourceWithStreamingResponse: + from .resources.inbound_fednow_transfers import AsyncInboundFednowTransfersResourceWithStreamingResponse + + return AsyncInboundFednowTransfersResourceWithStreamingResponse(self._client.inbound_fednow_transfers) + + @cached_property + def check_deposits(self) -> check_deposits.AsyncCheckDepositsResourceWithStreamingResponse: + from .resources.check_deposits import AsyncCheckDepositsResourceWithStreamingResponse + + return AsyncCheckDepositsResourceWithStreamingResponse(self._client.check_deposits) + + @cached_property + def lockboxes(self) -> lockboxes.AsyncLockboxesResourceWithStreamingResponse: + from .resources.lockboxes import AsyncLockboxesResourceWithStreamingResponse + + return AsyncLockboxesResourceWithStreamingResponse(self._client.lockboxes) + + @cached_property + def inbound_mail_items(self) -> inbound_mail_items.AsyncInboundMailItemsResourceWithStreamingResponse: + from .resources.inbound_mail_items import AsyncInboundMailItemsResourceWithStreamingResponse + + return AsyncInboundMailItemsResourceWithStreamingResponse(self._client.inbound_mail_items) + + @cached_property + def routing_numbers(self) -> routing_numbers.AsyncRoutingNumbersResourceWithStreamingResponse: + from .resources.routing_numbers import AsyncRoutingNumbersResourceWithStreamingResponse + + return AsyncRoutingNumbersResourceWithStreamingResponse(self._client.routing_numbers) + + @cached_property + def external_accounts(self) -> external_accounts.AsyncExternalAccountsResourceWithStreamingResponse: + from .resources.external_accounts import AsyncExternalAccountsResourceWithStreamingResponse + + return AsyncExternalAccountsResourceWithStreamingResponse(self._client.external_accounts) + + @cached_property + def entities(self) -> entities.AsyncEntitiesResourceWithStreamingResponse: + from .resources.entities import AsyncEntitiesResourceWithStreamingResponse + + return AsyncEntitiesResourceWithStreamingResponse(self._client.entities) + + @cached_property + def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocumentsResourceWithStreamingResponse: + from .resources.supplemental_documents import AsyncSupplementalDocumentsResourceWithStreamingResponse + + return AsyncSupplementalDocumentsResourceWithStreamingResponse(self._client.supplemental_documents) + + @cached_property + def programs(self) -> programs.AsyncProgramsResourceWithStreamingResponse: + from .resources.programs import AsyncProgramsResourceWithStreamingResponse + + return AsyncProgramsResourceWithStreamingResponse(self._client.programs) + + @cached_property + def account_statements(self) -> account_statements.AsyncAccountStatementsResourceWithStreamingResponse: + from .resources.account_statements import AsyncAccountStatementsResourceWithStreamingResponse + + return AsyncAccountStatementsResourceWithStreamingResponse(self._client.account_statements) + + @cached_property + def files(self) -> files.AsyncFilesResourceWithStreamingResponse: + from .resources.files import AsyncFilesResourceWithStreamingResponse + + return AsyncFilesResourceWithStreamingResponse(self._client.files) + + @cached_property + def file_links(self) -> file_links.AsyncFileLinksResourceWithStreamingResponse: + from .resources.file_links import AsyncFileLinksResourceWithStreamingResponse + + return AsyncFileLinksResourceWithStreamingResponse(self._client.file_links) + + @cached_property + def documents(self) -> documents.AsyncDocumentsResourceWithStreamingResponse: + from .resources.documents import AsyncDocumentsResourceWithStreamingResponse + + return AsyncDocumentsResourceWithStreamingResponse(self._client.documents) + + @cached_property + def exports(self) -> exports.AsyncExportsResourceWithStreamingResponse: + from .resources.exports import AsyncExportsResourceWithStreamingResponse + + return AsyncExportsResourceWithStreamingResponse(self._client.exports) + + @cached_property + def events(self) -> events.AsyncEventsResourceWithStreamingResponse: + from .resources.events import AsyncEventsResourceWithStreamingResponse + + return AsyncEventsResourceWithStreamingResponse(self._client.events) + + @cached_property + def event_subscriptions(self) -> event_subscriptions.AsyncEventSubscriptionsResourceWithStreamingResponse: + from .resources.event_subscriptions import AsyncEventSubscriptionsResourceWithStreamingResponse + + return AsyncEventSubscriptionsResourceWithStreamingResponse(self._client.event_subscriptions) + + @cached_property + def real_time_decisions(self) -> real_time_decisions.AsyncRealTimeDecisionsResourceWithStreamingResponse: + from .resources.real_time_decisions import AsyncRealTimeDecisionsResourceWithStreamingResponse + + return AsyncRealTimeDecisionsResourceWithStreamingResponse(self._client.real_time_decisions) + + @cached_property + def bookkeeping_accounts(self) -> bookkeeping_accounts.AsyncBookkeepingAccountsResourceWithStreamingResponse: + from .resources.bookkeeping_accounts import AsyncBookkeepingAccountsResourceWithStreamingResponse + + return AsyncBookkeepingAccountsResourceWithStreamingResponse(self._client.bookkeeping_accounts) + + @cached_property + def bookkeeping_entry_sets(self) -> bookkeeping_entry_sets.AsyncBookkeepingEntrySetsResourceWithStreamingResponse: + from .resources.bookkeeping_entry_sets import AsyncBookkeepingEntrySetsResourceWithStreamingResponse + + return AsyncBookkeepingEntrySetsResourceWithStreamingResponse(self._client.bookkeeping_entry_sets) + + @cached_property + def bookkeeping_entries(self) -> bookkeeping_entries.AsyncBookkeepingEntriesResourceWithStreamingResponse: + from .resources.bookkeeping_entries import AsyncBookkeepingEntriesResourceWithStreamingResponse + + return AsyncBookkeepingEntriesResourceWithStreamingResponse(self._client.bookkeeping_entries) + + @cached_property + def groups(self) -> groups.AsyncGroupsResourceWithStreamingResponse: + from .resources.groups import AsyncGroupsResourceWithStreamingResponse + + return AsyncGroupsResourceWithStreamingResponse(self._client.groups) + + @cached_property + def oauth_applications(self) -> oauth_applications.AsyncOAuthApplicationsResourceWithStreamingResponse: + from .resources.oauth_applications import AsyncOAuthApplicationsResourceWithStreamingResponse + + return AsyncOAuthApplicationsResourceWithStreamingResponse(self._client.oauth_applications) + + @cached_property + def oauth_connections(self) -> oauth_connections.AsyncOAuthConnectionsResourceWithStreamingResponse: + from .resources.oauth_connections import AsyncOAuthConnectionsResourceWithStreamingResponse + + return AsyncOAuthConnectionsResourceWithStreamingResponse(self._client.oauth_connections) + + @cached_property + def oauth_tokens(self) -> oauth_tokens.AsyncOAuthTokensResourceWithStreamingResponse: + from .resources.oauth_tokens import AsyncOAuthTokensResourceWithStreamingResponse + + return AsyncOAuthTokensResourceWithStreamingResponse(self._client.oauth_tokens) + + @cached_property + def intrafi_account_enrollments( + self, + ) -> intrafi_account_enrollments.AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse: + from .resources.intrafi_account_enrollments import AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse + + return AsyncIntrafiAccountEnrollmentsResourceWithStreamingResponse(self._client.intrafi_account_enrollments) + + @cached_property + def intrafi_balances(self) -> intrafi_balances.AsyncIntrafiBalancesResourceWithStreamingResponse: + from .resources.intrafi_balances import AsyncIntrafiBalancesResourceWithStreamingResponse + + return AsyncIntrafiBalancesResourceWithStreamingResponse(self._client.intrafi_balances) + + @cached_property + def intrafi_exclusions(self) -> intrafi_exclusions.AsyncIntrafiExclusionsResourceWithStreamingResponse: + from .resources.intrafi_exclusions import AsyncIntrafiExclusionsResourceWithStreamingResponse + + return AsyncIntrafiExclusionsResourceWithStreamingResponse(self._client.intrafi_exclusions) + + @cached_property + def card_tokens(self) -> card_tokens.AsyncCardTokensResourceWithStreamingResponse: + from .resources.card_tokens import AsyncCardTokensResourceWithStreamingResponse + + return AsyncCardTokensResourceWithStreamingResponse(self._client.card_tokens) + + @cached_property + def card_push_transfers(self) -> card_push_transfers.AsyncCardPushTransfersResourceWithStreamingResponse: + from .resources.card_push_transfers import AsyncCardPushTransfersResourceWithStreamingResponse + + return AsyncCardPushTransfersResourceWithStreamingResponse(self._client.card_push_transfers) + + @cached_property + def card_validations(self) -> card_validations.AsyncCardValidationsResourceWithStreamingResponse: + from .resources.card_validations import AsyncCardValidationsResourceWithStreamingResponse + + return AsyncCardValidationsResourceWithStreamingResponse(self._client.card_validations) + + @cached_property + def simulations(self) -> simulations.AsyncSimulationsResourceWithStreamingResponse: + from .resources.simulations import AsyncSimulationsResourceWithStreamingResponse + + return AsyncSimulationsResourceWithStreamingResponse(self._client.simulations) Client = Increase From d6ca1c299b63c409a8a9086d929c8a34b02f7c49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 19:26:31 +0000 Subject: [PATCH 1068/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c34fe88d8..17143d76e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-01b0246dcddc851a762ec864d0a728fb63f4020fe94039d2403518b22f3af120.yml -openapi_spec_hash: 773dfed2baf70342616421533b9b5a56 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcf5debcde4487c85173470c99063002845f6b3fcee79ab92b89f421c30bbe93.yml +openapi_spec_hash: c58e376475a7175b6ae0fd48a9e1d8a1 config_hash: ff2eb5f192b4de36611b37b27961c2d8 From 680e381ef0a5812f942cc720f3b33f4d4791bf12 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 16 Dec 2025 21:29:16 +0000 Subject: [PATCH 1069/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/inbound_wire_transfers.py | 6 ++++-- src/increase/types/inbound_wire_transfer.py | 3 ++- src/increase/types/inbound_wire_transfer_reverse_params.py | 3 ++- 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 17143d76e..1df97ed70 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fcf5debcde4487c85173470c99063002845f6b3fcee79ab92b89f421c30bbe93.yml -openapi_spec_hash: c58e376475a7175b6ae0fd48a9e1d8a1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1d2c6658404319b576b7bc1c75242f23493b8ffedefd81b41b36dc5456af766a.yml +openapi_spec_hash: 0d8eeda32c249e6371843545f8f211ff config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 964804140..1cee06f11 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -150,7 +150,7 @@ def reverse( self, inbound_wire_transfer_id: str, *, - reason: Literal["duplicate", "creditor_request"], + reason: Literal["duplicate", "creditor_request", "transaction_forbidden"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -170,6 +170,7 @@ def reverse( - `duplicate` - The inbound wire transfer was a duplicate. - `creditor_request` - The recipient of the wire transfer requested the funds be returned to the sender. + - `transaction_forbidden` - The account cannot currently receive inbound wires. extra_headers: Send extra headers @@ -327,7 +328,7 @@ async def reverse( self, inbound_wire_transfer_id: str, *, - reason: Literal["duplicate", "creditor_request"], + reason: Literal["duplicate", "creditor_request", "transaction_forbidden"], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -347,6 +348,7 @@ async def reverse( - `duplicate` - The inbound wire transfer was a duplicate. - `creditor_request` - The recipient of the wire transfer requested the funds be returned to the sender. + - `transaction_forbidden` - The account cannot currently receive inbound wires. extra_headers: Send extra headers diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 8b7faee00..5c4993263 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -16,12 +16,13 @@ class Reversal(BaseModel): Information about the reversal of the inbound wire transfer if it has been reversed. """ - reason: Literal["duplicate", "creditor_request"] + reason: Literal["duplicate", "creditor_request", "transaction_forbidden"] """The reason for the reversal. - `duplicate` - The inbound wire transfer was a duplicate. - `creditor_request` - The recipient of the wire transfer requested the funds be returned to the sender. + - `transaction_forbidden` - The account cannot currently receive inbound wires. """ reversed_at: datetime diff --git a/src/increase/types/inbound_wire_transfer_reverse_params.py b/src/increase/types/inbound_wire_transfer_reverse_params.py index 871521cf2..6bee104c6 100644 --- a/src/increase/types/inbound_wire_transfer_reverse_params.py +++ b/src/increase/types/inbound_wire_transfer_reverse_params.py @@ -8,10 +8,11 @@ class InboundWireTransferReverseParams(TypedDict, total=False): - reason: Required[Literal["duplicate", "creditor_request"]] + reason: Required[Literal["duplicate", "creditor_request", "transaction_forbidden"]] """Reason for the reversal. - `duplicate` - The inbound wire transfer was a duplicate. - `creditor_request` - The recipient of the wire transfer requested the funds be returned to the sender. + - `transaction_forbidden` - The account cannot currently receive inbound wires. """ From df4e8126fab2b82e77b54ef24bd951b16cf99c41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 15:51:35 +0000 Subject: [PATCH 1070/1325] fix: use async_to_httpx_files in patch method --- src/increase/_base_client.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 5cbf525bb..200e5e8b3 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1774,7 +1774,7 @@ async def patch( options: RequestOptions = {}, ) -> ResponseT: opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) From 18fc111ddc82d98d84f960d2145f721a18de7dc0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 17 Dec 2025 17:26:25 +0000 Subject: [PATCH 1071/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export.py | 8 ++++++++ src/increase/types/export_list_params.py | 4 ++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1df97ed70..e5b11df29 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1d2c6658404319b576b7bc1c75242f23493b8ffedefd81b41b36dc5456af766a.yml -openapi_spec_hash: 0d8eeda32c249e6371843545f8f211ff +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-acaa7510acabd57dfdde78063277cef0c611dd42abd998e5f1f851c4655e8fd0.yml +openapi_spec_hash: d0684f4b10e09e2585ad70360531501c config_hash: ff2eb5f192b4de36611b37b27961c2d8 diff --git a/src/increase/types/export.py b/src/increase/types/export.py index e8a36d78b..1245bb90f 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -27,6 +27,10 @@ class Export(BaseModel): "entity_csv", "vendor_csv", "dashboard_table_csv", + "account_verification_letter", + "funding_instructions", + "form_1099_int", + "form_1099_misc", ] """The category of the Export. @@ -47,6 +51,10 @@ class Export(BaseModel): management dashboard. - `dashboard_table_csv` - Certain dashboard tables are available as CSV exports. This export cannot be created via the API. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. """ created_at: datetime diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index 237a7ceaa..3ba2c1ea6 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -49,6 +49,10 @@ class ExportListParams(TypedDict, total=False): "entity_csv", "vendor_csv", "dashboard_table_csv", + "account_verification_letter", + "funding_instructions", + "form_1099_int", + "form_1099_misc", ] ], }, From f46e7ca9e057590f895e08ba24bb613247b34b10 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 21:58:38 +0000 Subject: [PATCH 1072/1325] chore(internal): add `--fix` argument to lint script --- scripts/lint | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/lint b/scripts/lint index 76686137c..7dc201de4 100755 --- a/scripts/lint +++ b/scripts/lint @@ -4,8 +4,13 @@ set -e cd "$(dirname "$0")/.." -echo "==> Running lints" -rye run lint +if [ "$1" = "--fix" ]; then + echo "==> Running lints with --fix" + rye run fix:ruff +else + echo "==> Running lints" + rye run lint +fi echo "==> Making sure it imports" rye run python -c 'import increase' From b37d69b66c6535e0cd3db7f0827a05558d891b4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 22:36:34 +0000 Subject: [PATCH 1073/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 6 + src/increase/resources/exports.py | 28 +++ .../resources/simulations/__init__.py | 14 ++ src/increase/resources/simulations/exports.py | 181 ++++++++++++++++++ .../resources/simulations/simulations.py | 32 ++++ src/increase/types/export.py | 4 +- src/increase/types/export_create_params.py | 41 ++++ src/increase/types/simulations/__init__.py | 1 + .../types/simulations/export_create_params.py | 12 ++ .../api_resources/simulations/test_exports.py | 86 +++++++++ tests/api_resources/test_exports.py | 10 + 12 files changed, 417 insertions(+), 6 deletions(-) create mode 100644 src/increase/resources/simulations/exports.py create mode 100644 src/increase/types/simulations/export_create_params.py create mode 100644 tests/api_resources/simulations/test_exports.py diff --git a/.stats.yml b/.stats.yml index e5b11df29..bc6173cca 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 230 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-acaa7510acabd57dfdde78063277cef0c611dd42abd998e5f1f851c4655e8fd0.yml -openapi_spec_hash: d0684f4b10e09e2585ad70360531501c -config_hash: ff2eb5f192b4de36611b37b27961c2d8 +configured_endpoints: 231 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2304a782c25d2a6b9586de2f6e2b536b5abbf62735f9c18ed0551607f134b714.yml +openapi_spec_hash: 67d6de7181215abe88dcc3da557a1e0d +config_hash: 5a0bf28bf735edf93f36c6c808711847 diff --git a/api.md b/api.md index 5a67964cd..2ab83ca26 100644 --- a/api.md +++ b/api.md @@ -1007,6 +1007,12 @@ Methods: - client.simulations.documents.create(\*\*params) -> Document +## Exports + +Methods: + +- client.simulations.exports.create(\*\*params) -> Export + ## CardTokens Methods: diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 754a1a9dd..f58378da1 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -55,12 +55,16 @@ def create( "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", + "account_verification_letter", + "funding_instructions", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, + account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, + funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, vendor_csv: export_create_params.VendorCsv | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -89,6 +93,8 @@ def create( - `entity_csv` - Export a CSV of entities with a given status. - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -96,6 +102,9 @@ def create( account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. + account_verification_letter: Options for the created export. Required if `category` is equal to + `account_verification_letter`. + balance_csv: Options for the created export. Required if `category` is equal to `balance_csv`. @@ -104,6 +113,9 @@ def create( entity_csv: Options for the created export. Required if `category` is equal to `entity_csv`. + funding_instructions: Options for the created export. Required if `category` is equal to + `funding_instructions`. + transaction_csv: Options for the created export. Required if `category` is equal to `transaction_csv`. @@ -126,9 +138,11 @@ def create( "category": category, "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, + "account_verification_letter": account_verification_letter, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "entity_csv": entity_csv, + "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, "vendor_csv": vendor_csv, }, @@ -272,12 +286,16 @@ async def create( "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", + "account_verification_letter", + "funding_instructions", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, + account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, + funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, vendor_csv: export_create_params.VendorCsv | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -306,6 +324,8 @@ async def create( - `entity_csv` - Export a CSV of entities with a given status. - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -313,6 +333,9 @@ async def create( account_statement_ofx: Options for the created export. Required if `category` is equal to `account_statement_ofx`. + account_verification_letter: Options for the created export. Required if `category` is equal to + `account_verification_letter`. + balance_csv: Options for the created export. Required if `category` is equal to `balance_csv`. @@ -321,6 +344,9 @@ async def create( entity_csv: Options for the created export. Required if `category` is equal to `entity_csv`. + funding_instructions: Options for the created export. Required if `category` is equal to + `funding_instructions`. + transaction_csv: Options for the created export. Required if `category` is equal to `transaction_csv`. @@ -343,9 +369,11 @@ async def create( "category": category, "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, + "account_verification_letter": account_verification_letter, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "entity_csv": entity_csv, + "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, "vendor_csv": vendor_csv, }, diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 5366a0c9c..2a104e626 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -1,5 +1,13 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from .exports import ( + ExportsResource, + AsyncExportsResource, + ExportsResourceWithRawResponse, + AsyncExportsResourceWithRawResponse, + ExportsResourceWithStreamingResponse, + AsyncExportsResourceWithStreamingResponse, +) from .programs import ( ProgramsResource, AsyncProgramsResource, @@ -438,6 +446,12 @@ "AsyncDocumentsResourceWithRawResponse", "DocumentsResourceWithStreamingResponse", "AsyncDocumentsResourceWithStreamingResponse", + "ExportsResource", + "AsyncExportsResource", + "ExportsResourceWithRawResponse", + "AsyncExportsResourceWithRawResponse", + "ExportsResourceWithStreamingResponse", + "AsyncExportsResourceWithStreamingResponse", "CardTokensResource", "AsyncCardTokensResource", "CardTokensResourceWithRawResponse", diff --git a/src/increase/resources/simulations/exports.py b/src/increase/resources/simulations/exports.py new file mode 100644 index 000000000..01825a6dd --- /dev/null +++ b/src/increase/resources/simulations/exports.py @@ -0,0 +1,181 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.export import Export +from ...types.simulations import export_create_params + +__all__ = ["ExportsResource", "AsyncExportsResource"] + + +class ExportsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> ExportsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return ExportsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return ExportsResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> Export: + """ + Simulates a tax form export being generated. + + Args: + account_id: The identifier of the Account the tax document is for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/exports", + body=maybe_transform({"account_id": account_id}, export_create_params.ExportCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Export, + ) + + +class AsyncExportsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncExportsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncExportsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncExportsResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> Export: + """ + Simulates a tax form export being generated. + + Args: + account_id: The identifier of the Account the tax document is for. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/exports", + body=await async_maybe_transform({"account_id": account_id}, export_create_params.ExportCreateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=Export, + ) + + +class ExportsResourceWithRawResponse: + def __init__(self, exports: ExportsResource) -> None: + self._exports = exports + + self.create = to_raw_response_wrapper( + exports.create, + ) + + +class AsyncExportsResourceWithRawResponse: + def __init__(self, exports: AsyncExportsResource) -> None: + self._exports = exports + + self.create = async_to_raw_response_wrapper( + exports.create, + ) + + +class ExportsResourceWithStreamingResponse: + def __init__(self, exports: ExportsResource) -> None: + self._exports = exports + + self.create = to_streamed_response_wrapper( + exports.create, + ) + + +class AsyncExportsResourceWithStreamingResponse: + def __init__(self, exports: AsyncExportsResource) -> None: + self._exports = exports + + self.create = async_to_streamed_response_wrapper( + exports.create, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index f02536d09..d07c5addc 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -2,6 +2,14 @@ from __future__ import annotations +from .exports import ( + ExportsResource, + AsyncExportsResource, + ExportsResourceWithRawResponse, + AsyncExportsResourceWithRawResponse, + ExportsResourceWithStreamingResponse, + AsyncExportsResourceWithStreamingResponse, +) from .programs import ( ProgramsResource, AsyncProgramsResource, @@ -377,6 +385,10 @@ def account_statements(self) -> AccountStatementsResource: def documents(self) -> DocumentsResource: return DocumentsResource(self._client) + @cached_property + def exports(self) -> ExportsResource: + return ExportsResource(self._client) + @cached_property def card_tokens(self) -> CardTokensResource: return CardTokensResource(self._client) @@ -522,6 +534,10 @@ def account_statements(self) -> AsyncAccountStatementsResource: def documents(self) -> AsyncDocumentsResource: return AsyncDocumentsResource(self._client) + @cached_property + def exports(self) -> AsyncExportsResource: + return AsyncExportsResource(self._client) + @cached_property def card_tokens(self) -> AsyncCardTokensResource: return AsyncCardTokensResource(self._client) @@ -672,6 +688,10 @@ def account_statements(self) -> AccountStatementsResourceWithRawResponse: def documents(self) -> DocumentsResourceWithRawResponse: return DocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def exports(self) -> ExportsResourceWithRawResponse: + return ExportsResourceWithRawResponse(self._simulations.exports) + @cached_property def card_tokens(self) -> CardTokensResourceWithRawResponse: return CardTokensResourceWithRawResponse(self._simulations.card_tokens) @@ -805,6 +825,10 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: def documents(self) -> AsyncDocumentsResourceWithRawResponse: return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) + @cached_property + def exports(self) -> AsyncExportsResourceWithRawResponse: + return AsyncExportsResourceWithRawResponse(self._simulations.exports) + @cached_property def card_tokens(self) -> AsyncCardTokensResourceWithRawResponse: return AsyncCardTokensResourceWithRawResponse(self._simulations.card_tokens) @@ -940,6 +964,10 @@ def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: def documents(self) -> DocumentsResourceWithStreamingResponse: return DocumentsResourceWithStreamingResponse(self._simulations.documents) + @cached_property + def exports(self) -> ExportsResourceWithStreamingResponse: + return ExportsResourceWithStreamingResponse(self._simulations.exports) + @cached_property def card_tokens(self) -> CardTokensResourceWithStreamingResponse: return CardTokensResourceWithStreamingResponse(self._simulations.card_tokens) @@ -1081,6 +1109,10 @@ def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingRespo def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) + @cached_property + def exports(self) -> AsyncExportsResourceWithStreamingResponse: + return AsyncExportsResourceWithStreamingResponse(self._simulations.exports) + @cached_property def card_tokens(self) -> AsyncCardTokensResourceWithStreamingResponse: return AsyncCardTokensResourceWithStreamingResponse(self._simulations.card_tokens) diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 1245bb90f..4ec5c7719 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -10,9 +10,9 @@ class Export(BaseModel): - """Exports are batch summaries of your Increase data. + """Exports are generated files. - You can make them from the API or dashboard. Since they can take a while, they are generated asynchronously. We send a webhook when they are ready. For more information, please read our [Exports documentation](https://increase.com/documentation/exports). + Some exports can contain a lot of data, like a CSV of your transactions. Others can be a single document, like a tax form. Since they can take a while, they are generated asynchronously. We send a webhook when they are ready. For more information, please read our [Exports documentation](https://increase.com/documentation/exports). """ id: str diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 54e5adb30..47ce43b19 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -13,12 +13,14 @@ "AccountStatementBai2", "AccountStatementOfx", "AccountStatementOfxCreatedAt", + "AccountVerificationLetter", "BalanceCsv", "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", "BookkeepingAccountBalanceCsvCreatedAt", "EntityCsv", "EntityCsvStatus", + "FundingInstructions", "TransactionCsv", "TransactionCsvCreatedAt", "VendorCsv", @@ -35,6 +37,8 @@ class ExportCreateParams(TypedDict, total=False): "bookkeeping_account_balance_csv", "entity_csv", "vendor_csv", + "account_verification_letter", + "funding_instructions", ] ] """The type of Export to create. @@ -51,6 +55,8 @@ class ExportCreateParams(TypedDict, total=False): - `entity_csv` - Export a CSV of entities with a given status. - `vendor_csv` - Export a CSV of vendors added to the third-party risk management dashboard. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. """ account_statement_bai2: AccountStatementBai2 @@ -65,6 +71,12 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `account_statement_ofx`. """ + account_verification_letter: AccountVerificationLetter + """Options for the created export. + + Required if `category` is equal to `account_verification_letter`. + """ + balance_csv: BalanceCsv """Options for the created export. @@ -83,6 +95,12 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `entity_csv`. """ + funding_instructions: FundingInstructions + """Options for the created export. + + Required if `category` is equal to `funding_instructions`. + """ + transaction_csv: TransactionCsv """Options for the created export. @@ -164,6 +182,19 @@ class AccountStatementOfx(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" +class AccountVerificationLetter(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `account_verification_letter`. + """ + + account_number_id: Required[str] + """The Account Number to create a letter for.""" + + balance_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The date of the balance to include in the letter. Defaults to the current date.""" + + class BalanceCsvCreatedAt(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" @@ -274,6 +305,16 @@ class EntityCsv(TypedDict, total=False): """Entity statuses to filter by.""" +class FundingInstructions(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `funding_instructions`. + """ + + account_number_id: Required[str] + """The Account Number to create funding instructions for.""" + + class TransactionCsvCreatedAt(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 318e54366..589c9a62a 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -2,6 +2,7 @@ from __future__ import annotations +from .export_create_params import ExportCreateParams as ExportCreateParams from .program_create_params import ProgramCreateParams as ProgramCreateParams from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams diff --git a/src/increase/types/simulations/export_create_params.py b/src/increase/types/simulations/export_create_params.py new file mode 100644 index 000000000..f9f7a0471 --- /dev/null +++ b/src/increase/types/simulations/export_create_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["ExportCreateParams"] + + +class ExportCreateParams(TypedDict, total=False): + account_id: Required[str] + """The identifier of the Account the tax document is for.""" diff --git a/tests/api_resources/simulations/test_exports.py b/tests/api_resources/simulations/test_exports.py new file mode 100644 index 000000000..faac50a76 --- /dev/null +++ b/tests/api_resources/simulations/test_exports.py @@ -0,0 +1,86 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import Export + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestExports: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + export = client.simulations.exports.create( + account_id="account_in71c4amph0vgo2qllky", + ) + assert_matches_type(Export, export, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.exports.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + export = response.parse() + assert_matches_type(Export, export, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.exports.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + export = response.parse() + assert_matches_type(Export, export, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncExports: + 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: + export = await async_client.simulations.exports.create( + account_id="account_in71c4amph0vgo2qllky", + ) + assert_matches_type(Export, export, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.exports.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + export = await response.parse() + assert_matches_type(Export, export, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.exports.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + export = await response.parse() + assert_matches_type(Export, export, path=["response"]) + + assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 496ac45e1..9ecc5044c 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -44,6 +44,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + account_verification_letter={ + "account_number_id": "account_number_id", + "balance_date": parse_date("2019-12-27"), + }, balance_csv={ "account_id": "account_id", "created_at": { @@ -64,6 +68,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, entity_csv={"status": {"in": ["active"]}}, + funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", "created_at": { @@ -213,6 +218,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + account_verification_letter={ + "account_number_id": "account_number_id", + "balance_date": parse_date("2019-12-27"), + }, balance_csv={ "account_id": "account_id", "created_at": { @@ -233,6 +242,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, entity_csv={"status": {"in": ["active"]}}, + funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", "created_at": { From d6798948d72e7224c292aeb10fe1149358287cac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 18 Dec 2025 23:00:44 +0000 Subject: [PATCH 1074/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 20 - src/increase/_client.py | 38 -- src/increase/resources/__init__.py | 14 - src/increase/resources/documents.py | 440 ------------------ .../resources/simulations/__init__.py | 14 - .../resources/simulations/documents.py | 181 ------- .../resources/simulations/simulations.py | 32 -- src/increase/types/__init__.py | 3 - src/increase/types/document.py | 84 ---- src/increase/types/document_create_params.py | 55 --- src/increase/types/document_list_params.py | 85 ---- src/increase/types/simulations/__init__.py | 1 - .../simulations/document_create_params.py | 12 - .../simulations/test_documents.py | 86 ---- tests/api_resources/test_documents.py | 272 ----------- 16 files changed, 4 insertions(+), 1341 deletions(-) delete mode 100644 src/increase/resources/documents.py delete mode 100644 src/increase/resources/simulations/documents.py delete mode 100644 src/increase/types/document.py delete mode 100644 src/increase/types/document_create_params.py delete mode 100644 src/increase/types/document_list_params.py delete mode 100644 src/increase/types/simulations/document_create_params.py delete mode 100644 tests/api_resources/simulations/test_documents.py delete mode 100644 tests/api_resources/test_documents.py diff --git a/.stats.yml b/.stats.yml index bc6173cca..4bf821dee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 231 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2304a782c25d2a6b9586de2f6e2b536b5abbf62735f9c18ed0551607f134b714.yml -openapi_spec_hash: 67d6de7181215abe88dcc3da557a1e0d -config_hash: 5a0bf28bf735edf93f36c6c808711847 +configured_endpoints: 227 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-60f9bca532c8805735c227730bbb14858faa64bfd5f83a1a78640f0119a3f99c.yml +openapi_spec_hash: 17ddd87efe6c029f2fa660c8781ccfaf +config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/api.md b/api.md index 2ab83ca26..3424fa913 100644 --- a/api.md +++ b/api.md @@ -557,20 +557,6 @@ Methods: - client.file_links.create(\*\*params) -> FileLink -# Documents - -Types: - -```python -from increase.types import Document -``` - -Methods: - -- client.documents.create(\*\*params) -> Document -- client.documents.retrieve(document_id) -> Document -- client.documents.list(\*\*params) -> SyncPage[Document] - # Exports Types: @@ -1001,12 +987,6 @@ Methods: - client.simulations.account_statements.create(\*\*params) -> AccountStatement -## Documents - -Methods: - -- client.simulations.documents.create(\*\*params) -> Document - ## Exports Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index 8092e198a..30f4a23f7 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -44,7 +44,6 @@ accounts, entities, programs, - documents, lockboxes, file_links, card_tokens, @@ -102,7 +101,6 @@ from .resources.accounts import AccountsResource, AsyncAccountsResource from .resources.entities import EntitiesResource, AsyncEntitiesResource from .resources.programs import ProgramsResource, AsyncProgramsResource - from .resources.documents import DocumentsResource, AsyncDocumentsResource from .resources.lockboxes import LockboxesResource, AsyncLockboxesResource from .resources.file_links import FileLinksResource, AsyncFileLinksResource from .resources.card_tokens import CardTokensResource, AsyncCardTokensResource @@ -502,12 +500,6 @@ def file_links(self) -> FileLinksResource: return FileLinksResource(self) - @cached_property - def documents(self) -> DocumentsResource: - from .resources.documents import DocumentsResource - - return DocumentsResource(self) - @cached_property def exports(self) -> ExportsResource: from .resources.exports import ExportsResource @@ -1095,12 +1087,6 @@ def file_links(self) -> AsyncFileLinksResource: return AsyncFileLinksResource(self) - @cached_property - def documents(self) -> AsyncDocumentsResource: - from .resources.documents import AsyncDocumentsResource - - return AsyncDocumentsResource(self) - @cached_property def exports(self) -> AsyncExportsResource: from .resources.exports import AsyncExportsResource @@ -1615,12 +1601,6 @@ def file_links(self) -> file_links.FileLinksResourceWithRawResponse: return FileLinksResourceWithRawResponse(self._client.file_links) - @cached_property - def documents(self) -> documents.DocumentsResourceWithRawResponse: - from .resources.documents import DocumentsResourceWithRawResponse - - return DocumentsResourceWithRawResponse(self._client.documents) - @cached_property def exports(self) -> exports.ExportsResourceWithRawResponse: from .resources.exports import ExportsResourceWithRawResponse @@ -1978,12 +1958,6 @@ def file_links(self) -> file_links.AsyncFileLinksResourceWithRawResponse: return AsyncFileLinksResourceWithRawResponse(self._client.file_links) - @cached_property - def documents(self) -> documents.AsyncDocumentsResourceWithRawResponse: - from .resources.documents import AsyncDocumentsResourceWithRawResponse - - return AsyncDocumentsResourceWithRawResponse(self._client.documents) - @cached_property def exports(self) -> exports.AsyncExportsResourceWithRawResponse: from .resources.exports import AsyncExportsResourceWithRawResponse @@ -2341,12 +2315,6 @@ def file_links(self) -> file_links.FileLinksResourceWithStreamingResponse: return FileLinksResourceWithStreamingResponse(self._client.file_links) - @cached_property - def documents(self) -> documents.DocumentsResourceWithStreamingResponse: - from .resources.documents import DocumentsResourceWithStreamingResponse - - return DocumentsResourceWithStreamingResponse(self._client.documents) - @cached_property def exports(self) -> exports.ExportsResourceWithStreamingResponse: from .resources.exports import ExportsResourceWithStreamingResponse @@ -2710,12 +2678,6 @@ def file_links(self) -> file_links.AsyncFileLinksResourceWithStreamingResponse: return AsyncFileLinksResourceWithStreamingResponse(self._client.file_links) - @cached_property - def documents(self) -> documents.AsyncDocumentsResourceWithStreamingResponse: - from .resources.documents import AsyncDocumentsResourceWithStreamingResponse - - return AsyncDocumentsResourceWithStreamingResponse(self._client.documents) - @cached_property def exports(self) -> exports.AsyncExportsResourceWithStreamingResponse: from .resources.exports import AsyncExportsResourceWithStreamingResponse diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index bcdcfd1d4..05745b00e 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -64,14 +64,6 @@ ProgramsResourceWithStreamingResponse, AsyncProgramsResourceWithStreamingResponse, ) -from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, -) from .lockboxes import ( LockboxesResource, AsyncLockboxesResource, @@ -686,12 +678,6 @@ "AsyncFileLinksResourceWithRawResponse", "FileLinksResourceWithStreamingResponse", "AsyncFileLinksResourceWithStreamingResponse", - "DocumentsResource", - "AsyncDocumentsResource", - "DocumentsResourceWithRawResponse", - "AsyncDocumentsResourceWithRawResponse", - "DocumentsResourceWithStreamingResponse", - "AsyncDocumentsResourceWithStreamingResponse", "ExportsResource", "AsyncExportsResource", "ExportsResourceWithRawResponse", diff --git a/src/increase/resources/documents.py b/src/increase/resources/documents.py deleted file mode 100644 index 90b72744d..000000000 --- a/src/increase/resources/documents.py +++ /dev/null @@ -1,440 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Literal - -import httpx - -from ..types import document_list_params, document_create_params -from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform -from .._compat import cached_property -from .._resource import SyncAPIResource, AsyncAPIResource -from .._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..pagination import SyncPage, AsyncPage -from .._base_client import AsyncPaginator, make_request_options -from ..types.document import Document - -__all__ = ["DocumentsResource", "AsyncDocumentsResource"] - - -class DocumentsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> DocumentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return DocumentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return DocumentsResourceWithStreamingResponse(self) - - def create( - self, - *, - category: Literal["account_verification_letter", "funding_instructions"], - account_verification_letter: document_create_params.AccountVerificationLetter | Omit = omit, - funding_instructions: document_create_params.FundingInstructions | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Document: - """ - Create a Document - - Args: - category: The type of document to create. - - - `account_verification_letter` - An account verification letter. - - `funding_instructions` - Funding instructions. - - account_verification_letter: An account verification letter. Required if and only if `category` is - `account_verification_letter`. - - funding_instructions: Funding instructions. Required if and only if `category` is - `funding_instructions`. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/documents", - body=maybe_transform( - { - "category": category, - "account_verification_letter": account_verification_letter, - "funding_instructions": funding_instructions, - }, - document_create_params.DocumentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Document, - ) - - def retrieve( - self, - document_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> Document: - """ - Retrieve a Document - - Args: - document_id: The identifier of the Document to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not document_id: - raise ValueError(f"Expected a non-empty value for `document_id` but received {document_id!r}") - return self._get( - f"/documents/{document_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=Document, - ) - - def list( - self, - *, - category: document_list_params.Category | Omit = omit, - created_at: document_list_params.CreatedAt | Omit = omit, - cursor: str | Omit = omit, - entity_id: str | Omit = omit, - idempotency_key: str | Omit = omit, - limit: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> SyncPage[Document]: - """ - List Documents - - Args: - cursor: Return the page of entries after this one. - - entity_id: Filter Documents to ones belonging to the specified Entity. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/documents", - page=SyncPage[Document], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "category": category, - "created_at": created_at, - "cursor": cursor, - "entity_id": entity_id, - "idempotency_key": idempotency_key, - "limit": limit, - }, - document_list_params.DocumentListParams, - ), - ), - model=Document, - ) - - -class AsyncDocumentsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncDocumentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncDocumentsResourceWithStreamingResponse(self) - - async def create( - self, - *, - category: Literal["account_verification_letter", "funding_instructions"], - account_verification_letter: document_create_params.AccountVerificationLetter | Omit = omit, - funding_instructions: document_create_params.FundingInstructions | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Document: - """ - Create a Document - - Args: - category: The type of document to create. - - - `account_verification_letter` - An account verification letter. - - `funding_instructions` - Funding instructions. - - account_verification_letter: An account verification letter. Required if and only if `category` is - `account_verification_letter`. - - funding_instructions: Funding instructions. Required if and only if `category` is - `funding_instructions`. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/documents", - body=await async_maybe_transform( - { - "category": category, - "account_verification_letter": account_verification_letter, - "funding_instructions": funding_instructions, - }, - document_create_params.DocumentCreateParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Document, - ) - - async def retrieve( - self, - document_id: str, - *, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> Document: - """ - Retrieve a Document - - Args: - document_id: The identifier of the Document to retrieve. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - if not document_id: - raise ValueError(f"Expected a non-empty value for `document_id` but received {document_id!r}") - return await self._get( - f"/documents/{document_id}", - options=make_request_options( - extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout - ), - cast_to=Document, - ) - - def list( - self, - *, - category: document_list_params.Category | Omit = omit, - created_at: document_list_params.CreatedAt | Omit = omit, - cursor: str | Omit = omit, - entity_id: str | Omit = omit, - idempotency_key: str | Omit = omit, - limit: int | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - ) -> AsyncPaginator[Document, AsyncPage[Document]]: - """ - List Documents - - Args: - cursor: Return the page of entries after this one. - - entity_id: Filter Documents to ones belonging to the specified Entity. - - idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - - limit: Limit the size of the list that is returned. The default (and maximum) is 100 - objects. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - """ - return self._get_api_list( - "/documents", - page=AsyncPage[Document], - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - query=maybe_transform( - { - "category": category, - "created_at": created_at, - "cursor": cursor, - "entity_id": entity_id, - "idempotency_key": idempotency_key, - "limit": limit, - }, - document_list_params.DocumentListParams, - ), - ), - model=Document, - ) - - -class DocumentsResourceWithRawResponse: - def __init__(self, documents: DocumentsResource) -> None: - self._documents = documents - - self.create = to_raw_response_wrapper( - documents.create, - ) - self.retrieve = to_raw_response_wrapper( - documents.retrieve, - ) - self.list = to_raw_response_wrapper( - documents.list, - ) - - -class AsyncDocumentsResourceWithRawResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: - self._documents = documents - - self.create = async_to_raw_response_wrapper( - documents.create, - ) - self.retrieve = async_to_raw_response_wrapper( - documents.retrieve, - ) - self.list = async_to_raw_response_wrapper( - documents.list, - ) - - -class DocumentsResourceWithStreamingResponse: - def __init__(self, documents: DocumentsResource) -> None: - self._documents = documents - - self.create = to_streamed_response_wrapper( - documents.create, - ) - self.retrieve = to_streamed_response_wrapper( - documents.retrieve, - ) - self.list = to_streamed_response_wrapper( - documents.list, - ) - - -class AsyncDocumentsResourceWithStreamingResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: - self._documents = documents - - self.create = async_to_streamed_response_wrapper( - documents.create, - ) - self.retrieve = async_to_streamed_response_wrapper( - documents.retrieve, - ) - self.list = async_to_streamed_response_wrapper( - documents.list, - ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 2a104e626..93e0e270f 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -16,14 +16,6 @@ ProgramsResourceWithStreamingResponse, AsyncProgramsResourceWithStreamingResponse, ) -from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, -) from .card_tokens import ( CardTokensResource, AsyncCardTokensResource, @@ -440,12 +432,6 @@ "AsyncAccountStatementsResourceWithRawResponse", "AccountStatementsResourceWithStreamingResponse", "AsyncAccountStatementsResourceWithStreamingResponse", - "DocumentsResource", - "AsyncDocumentsResource", - "DocumentsResourceWithRawResponse", - "AsyncDocumentsResourceWithRawResponse", - "DocumentsResourceWithStreamingResponse", - "AsyncDocumentsResourceWithStreamingResponse", "ExportsResource", "AsyncExportsResource", "ExportsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/documents.py b/src/increase/resources/simulations/documents.py deleted file mode 100644 index 0f85ae779..000000000 --- a/src/increase/resources/simulations/documents.py +++ /dev/null @@ -1,181 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import httpx - -from ..._types import Body, Query, Headers, NotGiven, not_given -from ..._utils import maybe_transform, async_maybe_transform -from ..._compat import cached_property -from ..._resource import SyncAPIResource, AsyncAPIResource -from ..._response import ( - to_raw_response_wrapper, - to_streamed_response_wrapper, - async_to_raw_response_wrapper, - async_to_streamed_response_wrapper, -) -from ..._base_client import make_request_options -from ...types.document import Document -from ...types.simulations import document_create_params - -__all__ = ["DocumentsResource", "AsyncDocumentsResource"] - - -class DocumentsResource(SyncAPIResource): - @cached_property - def with_raw_response(self) -> DocumentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return DocumentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> DocumentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return DocumentsResourceWithStreamingResponse(self) - - def create( - self, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Document: - """ - Simulates an tax document being created for an account. - - Args: - account_id: The identifier of the Account the tax document is for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return self._post( - "/simulations/documents", - body=maybe_transform({"account_id": account_id}, document_create_params.DocumentCreateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Document, - ) - - -class AsyncDocumentsResource(AsyncAPIResource): - @cached_property - def with_raw_response(self) -> AsyncDocumentsResourceWithRawResponse: - """ - This property can be used as a prefix for any HTTP method call to return - the raw response object instead of the parsed content. - - For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers - """ - return AsyncDocumentsResourceWithRawResponse(self) - - @cached_property - def with_streaming_response(self) -> AsyncDocumentsResourceWithStreamingResponse: - """ - An alternative to `.with_raw_response` that doesn't eagerly read the response body. - - For more information, see https://www.github.com/Increase/increase-python#with_streaming_response - """ - return AsyncDocumentsResourceWithStreamingResponse(self) - - async def create( - self, - *, - account_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Document: - """ - Simulates an tax document being created for an account. - - Args: - account_id: The identifier of the Account the tax document is for. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - return await self._post( - "/simulations/documents", - body=await async_maybe_transform({"account_id": account_id}, document_create_params.DocumentCreateParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Document, - ) - - -class DocumentsResourceWithRawResponse: - def __init__(self, documents: DocumentsResource) -> None: - self._documents = documents - - self.create = to_raw_response_wrapper( - documents.create, - ) - - -class AsyncDocumentsResourceWithRawResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: - self._documents = documents - - self.create = async_to_raw_response_wrapper( - documents.create, - ) - - -class DocumentsResourceWithStreamingResponse: - def __init__(self, documents: DocumentsResource) -> None: - self._documents = documents - - self.create = to_streamed_response_wrapper( - documents.create, - ) - - -class AsyncDocumentsResourceWithStreamingResponse: - def __init__(self, documents: AsyncDocumentsResource) -> None: - self._documents = documents - - self.create = async_to_streamed_response_wrapper( - documents.create, - ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index d07c5addc..e5c83ebc7 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -19,14 +19,6 @@ AsyncProgramsResourceWithStreamingResponse, ) from ..._compat import cached_property -from .documents import ( - DocumentsResource, - AsyncDocumentsResource, - DocumentsResourceWithRawResponse, - AsyncDocumentsResourceWithRawResponse, - DocumentsResourceWithStreamingResponse, - AsyncDocumentsResourceWithStreamingResponse, -) from ..._resource import SyncAPIResource, AsyncAPIResource from .card_tokens import ( CardTokensResource, @@ -381,10 +373,6 @@ def programs(self) -> ProgramsResource: def account_statements(self) -> AccountStatementsResource: return AccountStatementsResource(self._client) - @cached_property - def documents(self) -> DocumentsResource: - return DocumentsResource(self._client) - @cached_property def exports(self) -> ExportsResource: return ExportsResource(self._client) @@ -530,10 +518,6 @@ def programs(self) -> AsyncProgramsResource: def account_statements(self) -> AsyncAccountStatementsResource: return AsyncAccountStatementsResource(self._client) - @cached_property - def documents(self) -> AsyncDocumentsResource: - return AsyncDocumentsResource(self._client) - @cached_property def exports(self) -> AsyncExportsResource: return AsyncExportsResource(self._client) @@ -684,10 +668,6 @@ def programs(self) -> ProgramsResourceWithRawResponse: def account_statements(self) -> AccountStatementsResourceWithRawResponse: return AccountStatementsResourceWithRawResponse(self._simulations.account_statements) - @cached_property - def documents(self) -> DocumentsResourceWithRawResponse: - return DocumentsResourceWithRawResponse(self._simulations.documents) - @cached_property def exports(self) -> ExportsResourceWithRawResponse: return ExportsResourceWithRawResponse(self._simulations.exports) @@ -821,10 +801,6 @@ def programs(self) -> AsyncProgramsResourceWithRawResponse: def account_statements(self) -> AsyncAccountStatementsResourceWithRawResponse: return AsyncAccountStatementsResourceWithRawResponse(self._simulations.account_statements) - @cached_property - def documents(self) -> AsyncDocumentsResourceWithRawResponse: - return AsyncDocumentsResourceWithRawResponse(self._simulations.documents) - @cached_property def exports(self) -> AsyncExportsResourceWithRawResponse: return AsyncExportsResourceWithRawResponse(self._simulations.exports) @@ -960,10 +936,6 @@ def programs(self) -> ProgramsResourceWithStreamingResponse: def account_statements(self) -> AccountStatementsResourceWithStreamingResponse: return AccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) - @cached_property - def documents(self) -> DocumentsResourceWithStreamingResponse: - return DocumentsResourceWithStreamingResponse(self._simulations.documents) - @cached_property def exports(self) -> ExportsResourceWithStreamingResponse: return ExportsResourceWithStreamingResponse(self._simulations.exports) @@ -1105,10 +1077,6 @@ def programs(self) -> AsyncProgramsResourceWithStreamingResponse: def account_statements(self) -> AsyncAccountStatementsResourceWithStreamingResponse: return AsyncAccountStatementsResourceWithStreamingResponse(self._simulations.account_statements) - @cached_property - def documents(self) -> AsyncDocumentsResourceWithStreamingResponse: - return AsyncDocumentsResourceWithStreamingResponse(self._simulations.documents) - @cached_property def exports(self) -> AsyncExportsResourceWithStreamingResponse: return AsyncExportsResourceWithStreamingResponse(self._simulations.exports) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 6eaf9bf97..c4fc145fa 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -11,7 +11,6 @@ from .account import Account as Account from .lockbox import Lockbox as Lockbox from .program import Program as Program -from .document import Document as Document from .file_link import FileLink as FileLink from .card_token import CardToken as CardToken from .oauth_token import OAuthToken as OAuthToken @@ -58,7 +57,6 @@ from .declined_transaction import DeclinedTransaction as DeclinedTransaction from .digital_card_profile import DigitalCardProfile as DigitalCardProfile from .digital_wallet_token import DigitalWalletToken as DigitalWalletToken -from .document_list_params import DocumentListParams as DocumentListParams from .entity_create_params import EntityCreateParams as EntityCreateParams from .entity_update_params import EntityUpdateParams as EntityUpdateParams from .export_create_params import ExportCreateParams as ExportCreateParams @@ -76,7 +74,6 @@ from .account_balance_params import AccountBalanceParams as AccountBalanceParams from .card_token_list_params import CardTokenListParams as CardTokenListParams from .card_update_pin_params import CardUpdatePinParams as CardUpdatePinParams -from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .inbound_fednow_transfer import InboundFednowTransfer as InboundFednowTransfer diff --git a/src/increase/types/document.py b/src/increase/types/document.py deleted file mode 100644 index 0e2604ffc..000000000 --- a/src/increase/types/document.py +++ /dev/null @@ -1,84 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from typing import Optional -from datetime import datetime -from typing_extensions import Literal - -from .._models import BaseModel - -__all__ = ["Document", "AccountVerificationLetter", "FundingInstructions"] - - -class AccountVerificationLetter(BaseModel): - """Properties of an account verification letter document.""" - - account_number_id: str - """The identifier of the Account Number the document was generated for.""" - - -class FundingInstructions(BaseModel): - """Properties of a funding instructions document.""" - - account_number_id: str - """The identifier of the Account Number the document was generated for.""" - - -class Document(BaseModel): - """ - Increase generates certain documents / forms automatically for your application; they can be listed here. - """ - - id: str - """The Document identifier.""" - - account_verification_letter: Optional[AccountVerificationLetter] = None - """Properties of an account verification letter document.""" - - category: Literal[ - "form_1099_int", - "form_1099_misc", - "proof_of_authorization", - "company_information", - "account_verification_letter", - "funding_instructions", - ] - """The type of document. - - - `form_1099_int` - Internal Revenue Service Form 1099-INT. - - `form_1099_misc` - Internal Revenue Service Form 1099-MISC. - - `proof_of_authorization` - A document submitted in response to a proof of - authorization request for an ACH transfer. - - `company_information` - Company information, such a policies or procedures, - typically submitted during our due diligence process. - - `account_verification_letter` - An account verification letter. - - `funding_instructions` - Funding instructions. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the - Document was created. - """ - - entity_id: Optional[str] = None - """The identifier of the Entity the document was generated for.""" - - file_id: str - """The identifier of the File containing the Document's contents.""" - - funding_instructions: Optional[FundingInstructions] = None - """Properties of a funding instructions document.""" - - idempotency_key: Optional[str] = None - """The idempotency key you chose for this object. - - This value is unique across Increase and is used to ensure that a request is - only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - type: Literal["document"] - """A constant representing the object's type. - - For this resource it will always be `document`. - """ diff --git a/src/increase/types/document_create_params.py b/src/increase/types/document_create_params.py deleted file mode 100644 index 61dfa4d6b..000000000 --- a/src/increase/types/document_create_params.py +++ /dev/null @@ -1,55 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import date -from typing_extensions import Literal, Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["DocumentCreateParams", "AccountVerificationLetter", "FundingInstructions"] - - -class DocumentCreateParams(TypedDict, total=False): - category: Required[Literal["account_verification_letter", "funding_instructions"]] - """The type of document to create. - - - `account_verification_letter` - An account verification letter. - - `funding_instructions` - Funding instructions. - """ - - account_verification_letter: AccountVerificationLetter - """An account verification letter. - - Required if and only if `category` is `account_verification_letter`. - """ - - funding_instructions: FundingInstructions - """Funding instructions. - - Required if and only if `category` is `funding_instructions`. - """ - - -class AccountVerificationLetter(TypedDict, total=False): - """An account verification letter. - - Required if and only if `category` is `account_verification_letter`. - """ - - account_number_id: Required[str] - """The Account Number the bank letter should be generated for.""" - - balance_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] - """If provided, the letter will include the Account's balance as of the date.""" - - -class FundingInstructions(TypedDict, total=False): - """Funding instructions. - - Required if and only if `category` is `funding_instructions`. - """ - - account_number_id: Required[str] - """The Account Number the funding instructions should be generated for.""" diff --git a/src/increase/types/document_list_params.py b/src/increase/types/document_list_params.py deleted file mode 100644 index 2e12d424d..000000000 --- a/src/increase/types/document_list_params.py +++ /dev/null @@ -1,85 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Union -from datetime import datetime -from typing_extensions import Literal, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["DocumentListParams", "Category", "CreatedAt"] - - -class DocumentListParams(TypedDict, total=False): - category: Category - - created_at: CreatedAt - - cursor: str - """Return the page of entries after this one.""" - - entity_id: str - """Filter Documents to ones belonging to the specified Entity.""" - - idempotency_key: str - """ - Filter records to the one with the specified `idempotency_key` you chose for - that object. This value is unique across Increase and is used to ensure that a - request is only processed once. Learn more about - [idempotency](https://increase.com/documentation/idempotency-keys). - """ - - limit: int - """Limit the size of the list that is returned. - - The default (and maximum) is 100 objects. - """ - - -_CategoryReservedKeywords = TypedDict( - "_CategoryReservedKeywords", - { - "in": List[ - Literal[ - "form_1099_int", - "form_1099_misc", - "proof_of_authorization", - "company_information", - "account_verification_letter", - "funding_instructions", - ] - ], - }, - total=False, -) - - -class Category(_CategoryReservedKeywords, total=False): - pass - - -class CreatedAt(TypedDict, total=False): - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 589c9a62a..36672da70 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -4,7 +4,6 @@ from .export_create_params import ExportCreateParams as ExportCreateParams from .program_create_params import ProgramCreateParams as ProgramCreateParams -from .document_create_params import DocumentCreateParams as DocumentCreateParams from .card_token_create_params import CardTokenCreateParams as CardTokenCreateParams from .card_refund_create_params import CardRefundCreateParams as CardRefundCreateParams from .ach_transfer_return_params import ACHTransferReturnParams as ACHTransferReturnParams diff --git a/src/increase/types/simulations/document_create_params.py b/src/increase/types/simulations/document_create_params.py deleted file mode 100644 index 34b6b854e..000000000 --- a/src/increase/types/simulations/document_create_params.py +++ /dev/null @@ -1,12 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["DocumentCreateParams"] - - -class DocumentCreateParams(TypedDict, total=False): - account_id: Required[str] - """The identifier of the Account the tax document is for.""" diff --git a/tests/api_resources/simulations/test_documents.py b/tests/api_resources/simulations/test_documents.py deleted file mode 100644 index 27ff5d598..000000000 --- a/tests/api_resources/simulations/test_documents.py +++ /dev/null @@ -1,86 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Document - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestDocuments: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - document = client.simulations.documents.create( - account_id="account_in71c4amph0vgo2qllky", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.simulations.documents.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.simulations.documents.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncDocuments: - 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: - document = await async_client.simulations.documents.create( - account_id="account_in71c4amph0vgo2qllky", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.simulations.documents.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.simulations.documents.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True diff --git a/tests/api_resources/test_documents.py b/tests/api_resources/test_documents.py deleted file mode 100644 index c0d808c7b..000000000 --- a/tests/api_resources/test_documents.py +++ /dev/null @@ -1,272 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -import os -from typing import Any, cast - -import pytest - -from increase import Increase, AsyncIncrease -from tests.utils import assert_matches_type -from increase.types import Document -from increase._utils import parse_date, parse_datetime -from increase.pagination import SyncPage, AsyncPage - -base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") - - -class TestDocuments: - parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) - - @parametrize - def test_method_create(self, client: Increase) -> None: - document = client.documents.create( - category="account_verification_letter", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_method_create_with_all_params(self, client: Increase) -> None: - document = client.documents.create( - category="account_verification_letter", - account_verification_letter={ - "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", - "balance_date": parse_date("2024-12-31"), - }, - funding_instructions={"account_number_id": "account_number_id"}, - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_raw_response_create(self, client: Increase) -> None: - response = client.documents.with_raw_response.create( - category="account_verification_letter", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_streaming_response_create(self, client: Increase) -> None: - with client.documents.with_streaming_response.create( - category="account_verification_letter", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_method_retrieve(self, client: Increase) -> None: - document = client.documents.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_raw_response_retrieve(self, client: Increase) -> None: - response = client.documents.with_raw_response.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - def test_streaming_response_retrieve(self, client: Increase) -> None: - with client.documents.with_streaming_response.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_retrieve(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"): - client.documents.with_raw_response.retrieve( - "", - ) - - @parametrize - def test_method_list(self, client: Increase) -> None: - document = client.documents.list() - assert_matches_type(SyncPage[Document], document, path=["response"]) - - @parametrize - def test_method_list_with_all_params(self, client: Increase) -> None: - document = client.documents.list( - category={"in": ["form_1099_int"]}, - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - entity_id="entity_id", - idempotency_key="x", - limit=1, - ) - assert_matches_type(SyncPage[Document], document, path=["response"]) - - @parametrize - def test_raw_response_list(self, client: Increase) -> None: - response = client.documents.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = response.parse() - assert_matches_type(SyncPage[Document], document, path=["response"]) - - @parametrize - def test_streaming_response_list(self, client: Increase) -> None: - with client.documents.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = response.parse() - assert_matches_type(SyncPage[Document], document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - -class TestAsyncDocuments: - 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: - document = await async_client.documents.create( - category="account_verification_letter", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: - document = await async_client.documents.create( - category="account_verification_letter", - account_verification_letter={ - "account_number_id": "account_number_v18nkfqm6afpsrvy82b2", - "balance_date": parse_date("2024-12-31"), - }, - funding_instructions={"account_number_id": "account_number_id"}, - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: - response = await async_client.documents.with_raw_response.create( - category="account_verification_letter", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: - async with async_client.documents.with_streaming_response.create( - category="account_verification_letter", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: - document = await async_client.documents.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: - response = await async_client.documents.with_raw_response.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - @parametrize - async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: - async with async_client.documents.with_streaming_response.retrieve( - "document_qjtqc6s4c14ve2q89izm", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = await response.parse() - assert_matches_type(Document, document, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `document_id` but received ''"): - await async_client.documents.with_raw_response.retrieve( - "", - ) - - @parametrize - async def test_method_list(self, async_client: AsyncIncrease) -> None: - document = await async_client.documents.list() - assert_matches_type(AsyncPage[Document], document, path=["response"]) - - @parametrize - async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: - document = await async_client.documents.list( - category={"in": ["form_1099_int"]}, - created_at={ - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - cursor="cursor", - entity_id="entity_id", - idempotency_key="x", - limit=1, - ) - assert_matches_type(AsyncPage[Document], document, path=["response"]) - - @parametrize - async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: - response = await async_client.documents.with_raw_response.list() - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - document = await response.parse() - assert_matches_type(AsyncPage[Document], document, path=["response"]) - - @parametrize - async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: - async with async_client.documents.with_streaming_response.list() as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - document = await response.parse() - assert_matches_type(AsyncPage[Document], document, path=["response"]) - - assert cast(Any, response.is_closed) is True From 611ffde42ffb88c8b52b2b90272852e0153b5041 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 19 Dec 2025 00:12:59 +0000 Subject: [PATCH 1075/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/simulations/exports.py | 56 +++++++++++++++---- .../types/simulations/export_create_params.py | 23 +++++++- .../api_resources/simulations/test_exports.py | 28 ++++++++-- 4 files changed, 90 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 4bf821dee..b1d32ecc6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-60f9bca532c8805735c227730bbb14858faa64bfd5f83a1a78640f0119a3f99c.yml -openapi_spec_hash: 17ddd87efe6c029f2fa660c8781ccfaf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63db8a5872b6a112abfc879f75a53bc6975994025752e86b27ab327884d94655.yml +openapi_spec_hash: b7ffb71e0102fcd040a575bf917656e3 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/resources/simulations/exports.py b/src/increase/resources/simulations/exports.py index 01825a6dd..2ff9a2b66 100644 --- a/src/increase/resources/simulations/exports.py +++ b/src/increase/resources/simulations/exports.py @@ -2,9 +2,11 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx -from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource @@ -44,7 +46,8 @@ def with_streaming_response(self) -> ExportsResourceWithStreamingResponse: def create( self, *, - account_id: str, + category: Literal["form_1099_int"], + form_1099_int: export_create_params.Form1099Int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -53,11 +56,20 @@ def create( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Export: - """ - Simulates a tax form export being generated. + """Many exports are created by you via POST /exports or in the Dashboard. + + Some + exports are created automatically by Increase. For example, tax documents are + published once a year. In sandbox, you can trigger the arrival of an export that + would normally only be created automatically via this simulation. Args: - account_id: The identifier of the Account the tax document is for. + category: The type of Export to create. + + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + + form_1099_int: Options for the created export. Required if `category` is equal to + `form_1099_int`. extra_headers: Send extra headers @@ -71,7 +83,13 @@ def create( """ return self._post( "/simulations/exports", - body=maybe_transform({"account_id": account_id}, export_create_params.ExportCreateParams), + body=maybe_transform( + { + "category": category, + "form_1099_int": form_1099_int, + }, + export_create_params.ExportCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -106,7 +124,8 @@ def with_streaming_response(self) -> AsyncExportsResourceWithStreamingResponse: async def create( self, *, - account_id: str, + category: Literal["form_1099_int"], + form_1099_int: export_create_params.Form1099Int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -115,11 +134,20 @@ async def create( timeout: float | httpx.Timeout | None | NotGiven = not_given, idempotency_key: str | None = None, ) -> Export: - """ - Simulates a tax form export being generated. + """Many exports are created by you via POST /exports or in the Dashboard. + + Some + exports are created automatically by Increase. For example, tax documents are + published once a year. In sandbox, you can trigger the arrival of an export that + would normally only be created automatically via this simulation. Args: - account_id: The identifier of the Account the tax document is for. + category: The type of Export to create. + + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + + form_1099_int: Options for the created export. Required if `category` is equal to + `form_1099_int`. extra_headers: Send extra headers @@ -133,7 +161,13 @@ async def create( """ return await self._post( "/simulations/exports", - body=await async_maybe_transform({"account_id": account_id}, export_create_params.ExportCreateParams), + body=await async_maybe_transform( + { + "category": category, + "form_1099_int": form_1099_int, + }, + export_create_params.ExportCreateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/simulations/export_create_params.py b/src/increase/types/simulations/export_create_params.py index f9f7a0471..9bb9acb43 100644 --- a/src/increase/types/simulations/export_create_params.py +++ b/src/increase/types/simulations/export_create_params.py @@ -2,11 +2,30 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict -__all__ = ["ExportCreateParams"] +__all__ = ["ExportCreateParams", "Form1099Int"] class ExportCreateParams(TypedDict, total=False): + category: Required[Literal["form_1099_int"]] + """The type of Export to create. + + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + """ + + form_1099_int: Form1099Int + """Options for the created export. + + Required if `category` is equal to `form_1099_int`. + """ + + +class Form1099Int(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `form_1099_int`. + """ + account_id: Required[str] """The identifier of the Account the tax document is for.""" diff --git a/tests/api_resources/simulations/test_exports.py b/tests/api_resources/simulations/test_exports.py index faac50a76..b36461d02 100644 --- a/tests/api_resources/simulations/test_exports.py +++ b/tests/api_resources/simulations/test_exports.py @@ -20,14 +20,22 @@ class TestExports: @parametrize def test_method_create(self, client: Increase) -> None: export = client.simulations.exports.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", + ) + assert_matches_type(Export, export, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + export = client.simulations.exports.create( + category="form_1099_int", + form_1099_int={"account_id": "account_in71c4amph0vgo2qllky"}, ) assert_matches_type(Export, export, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.simulations.exports.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", ) assert response.is_closed is True @@ -38,7 +46,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.simulations.exports.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -57,14 +65,22 @@ class TestAsyncExports: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: export = await async_client.simulations.exports.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", + ) + assert_matches_type(Export, export, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + export = await async_client.simulations.exports.create( + category="form_1099_int", + form_1099_int={"account_id": "account_in71c4amph0vgo2qllky"}, ) assert_matches_type(Export, export, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.exports.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", ) assert response.is_closed is True @@ -75,7 +91,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.exports.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", + category="form_1099_int", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From d23238af1102cbe68dd453150e6c95f8a05760a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 26 Dec 2025 19:49:56 +0000 Subject: [PATCH 1076/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 905c8453a..3dbadeb74 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.416.0" + ".": "0.417.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 841b286b3..a06a1d680 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.416.0" +version = "0.417.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5a8306020..942592aa8 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.416.0" # x-release-please-version +__version__ = "0.417.0" # x-release-please-version From a98a3fe51b54afba234bb0fdbf9e8e8420508228 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 19:22:27 +0000 Subject: [PATCH 1077/1325] feat(api): api update --- LICENSE | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/LICENSE b/LICENSE index 197f93625..3bdba4f51 100644 --- a/LICENSE +++ b/LICENSE @@ -186,7 +186,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2025 Increase + Copyright 2026 Increase Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. From 8c4f7533bf9bd340e0850bb17eb3f2b755cb295c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 1 Jan 2026 19:25:17 +0000 Subject: [PATCH 1078/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3dbadeb74..42836a9b1 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.417.0" + ".": "0.418.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index a06a1d680..55dd100b9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.417.0" +version = "0.418.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 942592aa8..afcdb7fba 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.417.0" # x-release-please-version +__version__ = "0.418.0" # x-release-please-version From ee5b72cec58f34eabe283a382e8417543608495c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 23:53:42 +0000 Subject: [PATCH 1079/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/card_disputes.py | 20 +++++++++++++++++++ src/increase/types/card_dispute.py | 6 ++++++ .../types/card_dispute_create_params.py | 6 ++++++ ...d_dispute_submit_user_submission_params.py | 6 ++++++ tests/api_resources/test_card_disputes.py | 4 ++++ 6 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b1d32ecc6..356c41695 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63db8a5872b6a112abfc879f75a53bc6975994025752e86b27ab327884d94655.yml -openapi_spec_hash: b7ffb71e0102fcd040a575bf917656e3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4e978c9426fb846c81f3169f5c1bc7aad137577c13e52ac48fcc756e613a1557.yml +openapi_spec_hash: b44f228e3feac325305cd744c072ebc9 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index 2ef4e6958..f5aea9266 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -52,6 +52,7 @@ def create( network: Literal["visa"], amount: int | Omit = omit, attachment_files: Iterable[card_dispute_create_params.AttachmentFile] | Omit = omit, + explanation: str | Omit = omit, visa: card_dispute_create_params.Visa | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -80,6 +81,9 @@ def create( attachment_files: The files to be attached to the initial dispute submission. + explanation: The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + visa: The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`. @@ -101,6 +105,7 @@ def create( "network": network, "amount": amount, "attachment_files": attachment_files, + "explanation": explanation, "visa": visa, }, card_dispute_create_params.CardDisputeCreateParams, @@ -216,6 +221,7 @@ def submit_user_submission( network: Literal["visa"], amount: int | Omit = omit, attachment_files: Iterable[card_dispute_submit_user_submission_params.AttachmentFile] | Omit = omit, + explanation: str | Omit = omit, visa: card_dispute_submit_user_submission_params.Visa | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -243,6 +249,9 @@ def submit_user_submission( attachment_files: The files to be attached to the user submission. + explanation: The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + visa: The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`. @@ -265,6 +274,7 @@ def submit_user_submission( "network": network, "amount": amount, "attachment_files": attachment_files, + "explanation": explanation, "visa": visa, }, card_dispute_submit_user_submission_params.CardDisputeSubmitUserSubmissionParams, @@ -349,6 +359,7 @@ async def create( network: Literal["visa"], amount: int | Omit = omit, attachment_files: Iterable[card_dispute_create_params.AttachmentFile] | Omit = omit, + explanation: str | Omit = omit, visa: card_dispute_create_params.Visa | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -377,6 +388,9 @@ async def create( attachment_files: The files to be attached to the initial dispute submission. + explanation: The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + visa: The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`. @@ -398,6 +412,7 @@ async def create( "network": network, "amount": amount, "attachment_files": attachment_files, + "explanation": explanation, "visa": visa, }, card_dispute_create_params.CardDisputeCreateParams, @@ -513,6 +528,7 @@ async def submit_user_submission( network: Literal["visa"], amount: int | Omit = omit, attachment_files: Iterable[card_dispute_submit_user_submission_params.AttachmentFile] | Omit = omit, + explanation: str | Omit = omit, visa: card_dispute_submit_user_submission_params.Visa | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -540,6 +556,9 @@ async def submit_user_submission( attachment_files: The files to be attached to the user submission. + explanation: The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + visa: The Visa-specific parameters for the dispute. Required if and only if `network` is `visa`. @@ -562,6 +581,7 @@ async def submit_user_submission( "network": network, "amount": amount, "attachment_files": attachment_files, + "explanation": explanation, "visa": visa, }, card_dispute_submit_user_submission_params.CardDisputeSubmitUserSubmissionParams, diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index 7f68cedea..a1a2a7897 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -2533,6 +2533,12 @@ class VisaUserSubmission(BaseModel): the Visa Card Dispute User Submission was created. """ + explanation: Optional[str] = None + """ + The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + """ + further_information_requested_at: Optional[datetime] = None """ The date and time at which Increase requested further information from the user diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py index 0d52259cb..5a90fd578 100644 --- a/src/increase/types/card_dispute_create_params.py +++ b/src/increase/types/card_dispute_create_params.py @@ -100,6 +100,12 @@ class CardDisputeCreateParams(TypedDict, total=False): attachment_files: Iterable[AttachmentFile] """The files to be attached to the initial dispute submission.""" + explanation: str + """ + The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + """ + visa: Visa """The Visa-specific parameters for the dispute. diff --git a/src/increase/types/card_dispute_submit_user_submission_params.py b/src/increase/types/card_dispute_submit_user_submission_params.py index eb5eb847a..525a891bb 100644 --- a/src/increase/types/card_dispute_submit_user_submission_params.py +++ b/src/increase/types/card_dispute_submit_user_submission_params.py @@ -98,6 +98,12 @@ class CardDisputeSubmitUserSubmissionParams(TypedDict, total=False): attachment_files: Iterable[AttachmentFile] """The files to be attached to the user submission.""" + explanation: str + """ + The free-form explanation provided to Increase to provide more context for the + user submission. This field is not sent directly to the card networks. + """ + visa: Visa """The Visa-specific parameters for the dispute. diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index ac4e72977..919ce4ef3 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -36,6 +36,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: network="visa", amount=100, attachment_files=[{"file_id": "file_id"}], + explanation="x", visa={ "category": "fraud", "authorization": {"account_status": "account_closed"}, @@ -400,6 +401,7 @@ def test_method_submit_user_submission_with_all_params(self, client: Increase) - network="visa", amount=1, attachment_files=[{"file_id": "file_id"}], + explanation="x", visa={ "category": "merchant_prearbitration_decline", "chargeback": { @@ -750,6 +752,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) network="visa", amount=100, attachment_files=[{"file_id": "file_id"}], + explanation="x", visa={ "category": "fraud", "authorization": {"account_status": "account_closed"}, @@ -1114,6 +1117,7 @@ async def test_method_submit_user_submission_with_all_params(self, async_client: network="visa", amount=1, attachment_files=[{"file_id": "file_id"}], + explanation="x", visa={ "category": "merchant_prearbitration_decline", "chargeback": { From af9c1b4a3b97851cded78662d7cc0efcba10aec4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 23:56:29 +0000 Subject: [PATCH 1080/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 42836a9b1..476a4257f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.418.0" + ".": "0.419.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 55dd100b9..560c6d0b0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.418.0" +version = "0.419.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index afcdb7fba..8af6248b1 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.418.0" # x-release-please-version +__version__ = "0.419.0" # x-release-please-version From d8ede01bd87f8c7db00d566afa94accbca667a0e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:11:59 +0000 Subject: [PATCH 1081/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/_exceptions.py | 10 +++++++++- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 356c41695..0cd639352 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4e978c9426fb846c81f3169f5c1bc7aad137577c13e52ac48fcc756e613a1557.yml -openapi_spec_hash: b44f228e3feac325305cd744c072ebc9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1882323c5df894ed193f1c1a0e4574d601de1f90b097e6e6566cbc0d763d9b3c.yml +openapi_spec_hash: dd38f9b070b885ae6bd07da46c08fc86 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index 40ea13832..a330649bd 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -167,11 +167,18 @@ class InvalidAPIKeyError(AuthenticationError): detail: Optional[str] = None reason: Literal[ - "deleted_credential", "expired_credential", "no_credential", "no_header", "no_api_access", "wrong_environment" + "deleted_credential", + "expired_credential", + "ip_not_allowed", + "no_credential", + "no_header", + "no_api_access", + "wrong_environment", ] """ - `deleted_credential` - deleted_credential - `expired_credential` - expired_credential + - `ip_not_allowed` - ip_not_allowed - `no_credential` - no_credential - `no_header` - no_header - `no_api_access` - no_api_access @@ -197,6 +204,7 @@ def __init__(self, message: str, *, body: object, response: httpx.Response) -> N type_=Literal[ "deleted_credential", "expired_credential", + "ip_not_allowed", "no_credential", "no_header", "no_api_access", From 1eb74a62b0671da9c70dc9cfb8088c3e0ac8f23d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 15:14:46 +0000 Subject: [PATCH 1082/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 476a4257f..9bc2b145e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.419.0" + ".": "0.420.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 560c6d0b0..2a17c6a2e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.419.0" +version = "0.420.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8af6248b1..e9a84e411 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.419.0" # x-release-please-version +__version__ = "0.420.0" # x-release-please-version From fb9c2de15078e0402076132a739f85a9976ec194 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:16:42 +0000 Subject: [PATCH 1083/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 10 ++++++++++ src/increase/types/entity.py | 21 +++++++++++++++++++++ src/increase/types/entity_create_params.py | 21 +++++++++++++++++++++ tests/api_resources/test_entities.py | 14 ++++++++++++++ 5 files changed, 68 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0cd639352..a54aa529c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1882323c5df894ed193f1c1a0e4574d601de1f90b097e6e6566cbc0d763d9b3c.yml -openapi_spec_hash: dd38f9b070b885ae6bd07da46c08fc86 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e32ea60c7028faaf552e2846c9a58f838b16922041d551664dcb1bfa343f38cf.yml +openapi_spec_hash: 8d3acf560b411999fee65eedda9e6a73 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index ddbdf06a9..016f4d84d 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -67,6 +67,7 @@ def create( natural_person: entity_create_params.NaturalPerson | Omit = omit, risk_rating: entity_create_params.RiskRating | Omit = omit, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | Omit = omit, + terms_agreements: Iterable[entity_create_params.TermsAgreement] | Omit = omit, third_party_verification: entity_create_params.ThirdPartyVerification | Omit = omit, trust: entity_create_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -110,6 +111,9 @@ def create( supplemental_documents: Additional documentation associated with the entity. + terms_agreements: The terms that the Entity agreed to. Not all programs are required to submit + this data. + third_party_verification: If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. @@ -139,6 +143,7 @@ def create( "natural_person": natural_person, "risk_rating": risk_rating, "supplemental_documents": supplemental_documents, + "terms_agreements": terms_agreements, "third_party_verification": third_party_verification, "trust": trust, }, @@ -715,6 +720,7 @@ async def create( natural_person: entity_create_params.NaturalPerson | Omit = omit, risk_rating: entity_create_params.RiskRating | Omit = omit, supplemental_documents: Iterable[entity_create_params.SupplementalDocument] | Omit = omit, + terms_agreements: Iterable[entity_create_params.TermsAgreement] | Omit = omit, third_party_verification: entity_create_params.ThirdPartyVerification | Omit = omit, trust: entity_create_params.Trust | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -758,6 +764,9 @@ async def create( supplemental_documents: Additional documentation associated with the entity. + terms_agreements: The terms that the Entity agreed to. Not all programs are required to submit + this data. + third_party_verification: If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. @@ -787,6 +796,7 @@ async def create( "natural_person": natural_person, "risk_rating": risk_rating, "supplemental_documents": supplemental_documents, + "terms_agreements": terms_agreements, "third_party_verification": third_party_verification, "trust": trust, }, diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index e5088b0e2..3670d6329 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -28,6 +28,7 @@ "NaturalPersonAddress", "NaturalPersonIdentification", "RiskRating", + "TermsAgreement", "ThirdPartyVerification", "Trust", "TrustAddress", @@ -440,6 +441,20 @@ class RiskRating(BaseModel): """ +class TermsAgreement(BaseModel): + agreed_at: datetime + """The timestamp of when the Entity agreed to the terms.""" + + ip_address: str + """The IP address the Entity accessed reviewed the terms from.""" + + terms_url: str + """The URL of the terms agreement. + + This link will be provided by your bank partner. + """ + + class ThirdPartyVerification(BaseModel): """ If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. @@ -771,6 +786,12 @@ class Entity(BaseModel): retrieve them. """ + terms_agreements: List[TermsAgreement] + """The terms that the Entity agreed to. + + Not all programs are required to submit this data. + """ + third_party_verification: Optional[ThirdPartyVerification] = None """ If you are using a third-party service for identity verification, you can use diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index e2e2bf609..df2c33a90 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -37,6 +37,7 @@ "NaturalPersonIdentificationPassport", "RiskRating", "SupplementalDocument", + "TermsAgreement", "ThirdPartyVerification", "Trust", "TrustAddress", @@ -105,6 +106,12 @@ class EntityCreateParams(TypedDict, total=False): supplemental_documents: Iterable[SupplementalDocument] """Additional documentation associated with the entity.""" + terms_agreements: Iterable[TermsAgreement] + """The terms that the Entity agreed to. + + Not all programs are required to submit this data. + """ + third_party_verification: ThirdPartyVerification """ If you are using a third-party service for identity verification, you can use @@ -837,6 +844,20 @@ class SupplementalDocument(TypedDict, total=False): """The identifier of the File containing the document.""" +class TermsAgreement(TypedDict, total=False): + agreed_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] + """The timestamp of when the Entity agreed to the terms.""" + + ip_address: Required[str] + """The IP address the Entity accessed reviewed the terms from.""" + + terms_url: Required[str] + """The URL of the terms agreement. + + This link will be provided by your bank partner. + """ + + class ThirdPartyVerification(TypedDict, total=False): """ If you are using a third-party service for identity verification, you can use this field to associate this Entity with the identifier that represents them in that service. diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 0c3953041..be1262466 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -181,6 +181,13 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "rating": "low", }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], + terms_agreements=[ + { + "agreed_at": parse_datetime("2019-12-27T18:11:19.117Z"), + "ip_address": "x", + "terms_url": "x", + } + ], third_party_verification={ "reference": "x", "vendor": "alloy", @@ -1110,6 +1117,13 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "rating": "low", }, supplemental_documents=[{"file_id": "file_makxrc67oh9l6sg7w9yc"}], + terms_agreements=[ + { + "agreed_at": parse_datetime("2019-12-27T18:11:19.117Z"), + "ip_address": "x", + "terms_url": "x", + } + ], third_party_verification={ "reference": "x", "vendor": "alloy", From 7127e330fd3784a182a1bf662ee0222768bc34a9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 6 Jan 2026 17:19:25 +0000 Subject: [PATCH 1084/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9bc2b145e..d7ecdd056 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.420.0" + ".": "0.421.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2a17c6a2e..f7d88d468 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.420.0" +version = "0.421.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e9a84e411..17799ef25 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.420.0" # x-release-please-version +__version__ = "0.421.0" # x-release-please-version From c033dff71267422282197836f01acc7322502402 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:38:54 +0000 Subject: [PATCH 1085/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_dispute.py | 3 +++ src/increase/types/card_dispute_create_params.py | 3 +++ .../types/card_dispute_submit_user_submission_params.py | 3 +++ tests/api_resources/test_card_disputes.py | 4 ++++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a54aa529c..ade5a4601 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e32ea60c7028faaf552e2846c9a58f838b16922041d551664dcb1bfa343f38cf.yml -openapi_spec_hash: 8d3acf560b411999fee65eedda9e6a73 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9e8b4907003e0149ea10d8c95b2facfbc011f366cea40fe86b5f02940e68998d.yml +openapi_spec_hash: e93ee5c48421038334b8961b303465d6 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index a1a2a7897..adc6f294b 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -2032,6 +2032,9 @@ class VisaUserSubmissionChargebackConsumerServicesNotAsDescribed(BaseModel): cardholder_cancellation: VisaUserSubmissionChargebackConsumerServicesNotAsDescribedCardholderCancellation """Cardholder cancellation.""" + explanation: str + """Explanation of what was ordered and was not as described.""" + merchant_resolution_attempted: Literal["attempted", "prohibited_by_local_law"] """Merchant resolution attempted. diff --git a/src/increase/types/card_dispute_create_params.py b/src/increase/types/card_dispute_create_params.py index 5a90fd578..eca8fc702 100644 --- a/src/increase/types/card_dispute_create_params.py +++ b/src/increase/types/card_dispute_create_params.py @@ -1222,6 +1222,9 @@ class VisaConsumerServicesNotAsDescribed(TypedDict, total=False): cardholder_cancellation: Required[VisaConsumerServicesNotAsDescribedCardholderCancellation] """Cardholder cancellation.""" + explanation: Required[str] + """Explanation of what was ordered and was not as described.""" + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. diff --git a/src/increase/types/card_dispute_submit_user_submission_params.py b/src/increase/types/card_dispute_submit_user_submission_params.py index 525a891bb..ccb3fed22 100644 --- a/src/increase/types/card_dispute_submit_user_submission_params.py +++ b/src/increase/types/card_dispute_submit_user_submission_params.py @@ -1220,6 +1220,9 @@ class VisaChargebackConsumerServicesNotAsDescribed(TypedDict, total=False): cardholder_cancellation: Required[VisaChargebackConsumerServicesNotAsDescribedCardholderCancellation] """Cardholder cancellation.""" + explanation: Required[str] + """Explanation of what was ordered and was not as described.""" + merchant_resolution_attempted: Required[Literal["attempted", "prohibited_by_local_law"]] """Merchant resolution attempted. diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 919ce4ef3..0ce895086 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -251,6 +251,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "canceled_at": parse_date("2019-12-27"), "reason": "x", }, + "explanation": "x", "merchant_resolution_attempted": "attempted", "received_at": parse_date("2019-12-27"), }, @@ -618,6 +619,7 @@ def test_method_submit_user_submission_with_all_params(self, client: Increase) - "canceled_at": parse_date("2019-12-27"), "reason": "x", }, + "explanation": "x", "merchant_resolution_attempted": "attempted", "received_at": parse_date("2019-12-27"), }, @@ -967,6 +969,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "canceled_at": parse_date("2019-12-27"), "reason": "x", }, + "explanation": "x", "merchant_resolution_attempted": "attempted", "received_at": parse_date("2019-12-27"), }, @@ -1334,6 +1337,7 @@ async def test_method_submit_user_submission_with_all_params(self, async_client: "canceled_at": parse_date("2019-12-27"), "reason": "x", }, + "explanation": "x", "merchant_resolution_attempted": "attempted", "received_at": parse_date("2019-12-27"), }, From 07158573ae5e1b925e7d2e44b349f5a0bc9a5a7a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 19:41:39 +0000 Subject: [PATCH 1086/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d7ecdd056..6dc358e4f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.421.0" + ".": "0.422.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f7d88d468..d3c55107d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.421.0" +version = "0.422.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 17799ef25..ea6c10c9a 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.421.0" # x-release-please-version +__version__ = "0.422.0" # x-release-please-version From 9389160e8c23a26b69e3085e97b14cec8352d9ff Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 21:27:31 +0000 Subject: [PATCH 1087/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_update_params.py | 6 ++++++ tests/api_resources/test_entities.py | 2 ++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index ade5a4601..6f42a9fee 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9e8b4907003e0149ea10d8c95b2facfbc011f366cea40fe86b5f02940e68998d.yml -openapi_spec_hash: e93ee5c48421038334b8961b303465d6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0281c1d774b1853b7b09bbce88b8d6e0301179b68d53627c5940edd7d2f8b180.yml +openapi_spec_hash: e22a9d6a4f0f32976d0ac9dd7e6d7dd0 config_hash: ca52ca9a2968f330339fd50c1a386e05 diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 2036fd597..8c09fb431 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -116,6 +116,12 @@ class Corporation(TypedDict, total=False): Not every program requires an email for submitted Entities. """ + incorporation_state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the + corporation's state of incorporation. + """ + industry_code: str """ The North American Industry Classification System (NAICS) code for the diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index be1262466..f51067d0a 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -364,6 +364,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "line2": "Unit 2", }, "email": "dev@stainless.com", + "incorporation_state": "x", "industry_code": "x", "name": "x", }, @@ -1300,6 +1301,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "line2": "Unit 2", }, "email": "dev@stainless.com", + "incorporation_state": "x", "industry_code": "x", "name": "x", }, From d3a1e292bca0d5d6b30cc38cd2d2dcaa5ed3b04b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 7 Jan 2026 21:30:26 +0000 Subject: [PATCH 1088/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6dc358e4f..2b0c6a48f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.422.0" + ".": "0.423.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d3c55107d..4e3009c12 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.422.0" +version = "0.423.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ea6c10c9a..1a1e8d6a1 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.422.0" # x-release-please-version +__version__ = "0.423.0" # x-release-please-version From 76dce55649c2414744ddb75696eeb490c71e5e59 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 8 Jan 2026 17:26:53 +0000 Subject: [PATCH 1089/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 16 + src/increase/_client.py | 38 + src/increase/resources/__init__.py | 14 + src/increase/resources/swift_transfers.py | 714 ++++++++++++++++++ src/increase/types/__init__.py | 3 + src/increase/types/swift_transfer.py | 232 ++++++ .../types/swift_transfer_create_params.py | 113 +++ .../types/swift_transfer_list_params.py | 87 +++ tests/api_resources/test_swift_transfers.py | 574 ++++++++++++++ 10 files changed, 1795 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/swift_transfers.py create mode 100644 src/increase/types/swift_transfer.py create mode 100644 src/increase/types/swift_transfer_create_params.py create mode 100644 src/increase/types/swift_transfer_list_params.py create mode 100644 tests/api_resources/test_swift_transfers.py diff --git a/.stats.yml b/.stats.yml index 6f42a9fee..af0e17b5e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 227 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0281c1d774b1853b7b09bbce88b8d6e0301179b68d53627c5940edd7d2f8b180.yml -openapi_spec_hash: e22a9d6a4f0f32976d0ac9dd7e6d7dd0 -config_hash: ca52ca9a2968f330339fd50c1a386e05 +configured_endpoints: 232 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a47821c7d33caac95ba05890682dde6da257dbe86033e4f119aa626c11ae387.yml +openapi_spec_hash: 0ccabc90834936bc2fcdeeee01e77a64 +config_hash: 8a9bb9e2d5dd0ccc3e78ad59f924fd3c diff --git a/api.md b/api.md index 3424fa913..7646d0760 100644 --- a/api.md +++ b/api.md @@ -400,6 +400,22 @@ Methods: - client.inbound_fednow_transfers.retrieve(inbound_fednow_transfer_id) -> InboundFednowTransfer - client.inbound_fednow_transfers.list(\*\*params) -> SyncPage[InboundFednowTransfer] +# SwiftTransfers + +Types: + +```python +from increase.types import SwiftTransfer +``` + +Methods: + +- client.swift_transfers.create(\*\*params) -> SwiftTransfer +- client.swift_transfers.retrieve(swift_transfer_id) -> SwiftTransfer +- client.swift_transfers.list(\*\*params) -> SyncPage[SwiftTransfer] +- client.swift_transfers.approve(swift_transfer_id) -> SwiftTransfer +- client.swift_transfers.cancel(swift_transfer_id) -> SwiftTransfer + # CheckDeposits Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 30f4a23f7..78729401b 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -59,6 +59,7 @@ account_numbers, check_transfers, routing_numbers, + swift_transfers, card_validations, fednow_transfers, intrafi_balances, @@ -115,6 +116,7 @@ from .resources.account_numbers import AccountNumbersResource, AsyncAccountNumbersResource from .resources.check_transfers import CheckTransfersResource, AsyncCheckTransfersResource from .resources.routing_numbers import RoutingNumbersResource, AsyncRoutingNumbersResource + from .resources.swift_transfers import SwiftTransfersResource, AsyncSwiftTransfersResource from .resources.card_validations import CardValidationsResource, AsyncCardValidationsResource from .resources.fednow_transfers import FednowTransfersResource, AsyncFednowTransfersResource from .resources.intrafi_balances import IntrafiBalancesResource, AsyncIntrafiBalancesResource @@ -434,6 +436,12 @@ def inbound_fednow_transfers(self) -> InboundFednowTransfersResource: return InboundFednowTransfersResource(self) + @cached_property + def swift_transfers(self) -> SwiftTransfersResource: + from .resources.swift_transfers import SwiftTransfersResource + + return SwiftTransfersResource(self) + @cached_property def check_deposits(self) -> CheckDepositsResource: from .resources.check_deposits import CheckDepositsResource @@ -1021,6 +1029,12 @@ def inbound_fednow_transfers(self) -> AsyncInboundFednowTransfersResource: return AsyncInboundFednowTransfersResource(self) + @cached_property + def swift_transfers(self) -> AsyncSwiftTransfersResource: + from .resources.swift_transfers import AsyncSwiftTransfersResource + + return AsyncSwiftTransfersResource(self) + @cached_property def check_deposits(self) -> AsyncCheckDepositsResource: from .resources.check_deposits import AsyncCheckDepositsResource @@ -1535,6 +1549,12 @@ def inbound_fednow_transfers(self) -> inbound_fednow_transfers.InboundFednowTran return InboundFednowTransfersResourceWithRawResponse(self._client.inbound_fednow_transfers) + @cached_property + def swift_transfers(self) -> swift_transfers.SwiftTransfersResourceWithRawResponse: + from .resources.swift_transfers import SwiftTransfersResourceWithRawResponse + + return SwiftTransfersResourceWithRawResponse(self._client.swift_transfers) + @cached_property def check_deposits(self) -> check_deposits.CheckDepositsResourceWithRawResponse: from .resources.check_deposits import CheckDepositsResourceWithRawResponse @@ -1892,6 +1912,12 @@ def inbound_fednow_transfers(self) -> inbound_fednow_transfers.AsyncInboundFedno return AsyncInboundFednowTransfersResourceWithRawResponse(self._client.inbound_fednow_transfers) + @cached_property + def swift_transfers(self) -> swift_transfers.AsyncSwiftTransfersResourceWithRawResponse: + from .resources.swift_transfers import AsyncSwiftTransfersResourceWithRawResponse + + return AsyncSwiftTransfersResourceWithRawResponse(self._client.swift_transfers) + @cached_property def check_deposits(self) -> check_deposits.AsyncCheckDepositsResourceWithRawResponse: from .resources.check_deposits import AsyncCheckDepositsResourceWithRawResponse @@ -2249,6 +2275,12 @@ def inbound_fednow_transfers(self) -> inbound_fednow_transfers.InboundFednowTran return InboundFednowTransfersResourceWithStreamingResponse(self._client.inbound_fednow_transfers) + @cached_property + def swift_transfers(self) -> swift_transfers.SwiftTransfersResourceWithStreamingResponse: + from .resources.swift_transfers import SwiftTransfersResourceWithStreamingResponse + + return SwiftTransfersResourceWithStreamingResponse(self._client.swift_transfers) + @cached_property def check_deposits(self) -> check_deposits.CheckDepositsResourceWithStreamingResponse: from .resources.check_deposits import CheckDepositsResourceWithStreamingResponse @@ -2612,6 +2644,12 @@ def inbound_fednow_transfers( return AsyncInboundFednowTransfersResourceWithStreamingResponse(self._client.inbound_fednow_transfers) + @cached_property + def swift_transfers(self) -> swift_transfers.AsyncSwiftTransfersResourceWithStreamingResponse: + from .resources.swift_transfers import AsyncSwiftTransfersResourceWithStreamingResponse + + return AsyncSwiftTransfersResourceWithStreamingResponse(self._client.swift_transfers) + @cached_property def check_deposits(self) -> check_deposits.AsyncCheckDepositsResourceWithStreamingResponse: from .resources.check_deposits import AsyncCheckDepositsResourceWithStreamingResponse diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 05745b00e..7cc7c62cf 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -184,6 +184,14 @@ RoutingNumbersResourceWithStreamingResponse, AsyncRoutingNumbersResourceWithStreamingResponse, ) +from .swift_transfers import ( + SwiftTransfersResource, + AsyncSwiftTransfersResource, + SwiftTransfersResourceWithRawResponse, + AsyncSwiftTransfersResourceWithRawResponse, + SwiftTransfersResourceWithStreamingResponse, + AsyncSwiftTransfersResourceWithStreamingResponse, +) from .card_validations import ( CardValidationsResource, AsyncCardValidationsResource, @@ -612,6 +620,12 @@ "AsyncInboundFednowTransfersResourceWithRawResponse", "InboundFednowTransfersResourceWithStreamingResponse", "AsyncInboundFednowTransfersResourceWithStreamingResponse", + "SwiftTransfersResource", + "AsyncSwiftTransfersResource", + "SwiftTransfersResourceWithRawResponse", + "AsyncSwiftTransfersResourceWithRawResponse", + "SwiftTransfersResourceWithStreamingResponse", + "AsyncSwiftTransfersResourceWithStreamingResponse", "CheckDepositsResource", "AsyncCheckDepositsResource", "CheckDepositsResourceWithRawResponse", diff --git a/src/increase/resources/swift_transfers.py b/src/increase/resources/swift_transfers.py new file mode 100644 index 000000000..1573ac604 --- /dev/null +++ b/src/increase/resources/swift_transfers.py @@ -0,0 +1,714 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from ..types import swift_transfer_list_params, swift_transfer_create_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.swift_transfer import SwiftTransfer + +__all__ = ["SwiftTransfersResource", "AsyncSwiftTransfersResource"] + + +class SwiftTransfersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> SwiftTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return SwiftTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> SwiftTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return SwiftTransfersResourceWithStreamingResponse(self) + + def create( + self, + *, + account_id: str, + account_number: str, + bank_identification_code: str, + creditor_address: swift_transfer_create_params.CreditorAddress, + creditor_name: str, + debtor_address: swift_transfer_create_params.DebtorAddress, + debtor_name: str, + instructed_amount: int, + instructed_currency: Literal["USD"], + source_account_number_id: str, + unstructured_remittance_information: str, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Create a Swift Transfer + + Args: + account_id: The identifier for the account that will send the transfer. + + account_number: The creditor's account number. + + bank_identification_code: The bank identification code (BIC) of the creditor. If it ends with the + three-character branch code, this must be 11 characters long. Otherwise this + must be 8 characters and the branch code will be assumed to be `XXX`. + + creditor_address: The creditor's address. + + creditor_name: The creditor's name. + + debtor_address: The debtor's address. + + debtor_name: The debtor's name. + + instructed_amount: The amount, in minor units of `instructed_currency`, to send to the creditor. + + instructed_currency: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the + instructed amount. + + - `USD` - United States Dollar + + source_account_number_id: The Account Number to include in the transfer as the debtor's account number. + + unstructured_remittance_information: Unstructured remittance information to include in the transfer. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + routing_number: The creditor's bank account routing or transit number. Required in certain + countries. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/swift_transfers", + body=maybe_transform( + { + "account_id": account_id, + "account_number": account_number, + "bank_identification_code": bank_identification_code, + "creditor_address": creditor_address, + "creditor_name": creditor_name, + "debtor_address": debtor_address, + "debtor_name": debtor_name, + "instructed_amount": instructed_amount, + "instructed_currency": instructed_currency, + "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "require_approval": require_approval, + "routing_number": routing_number, + }, + swift_transfer_create_params.SwiftTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + def retrieve( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SwiftTransfer: + """ + Retrieve a Swift Transfer + + Args: + swift_transfer_id: The identifier of the Swift Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return self._get( + f"/swift_transfers/{swift_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SwiftTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + created_at: swift_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: swift_transfer_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[SwiftTransfer]: + """ + List Swift Transfers + + Args: + account_id: Filter Swift Transfers to those that originated from the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/swift_transfers", + page=SyncPage[SwiftTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + swift_transfer_list_params.SwiftTransferListParams, + ), + ), + model=SwiftTransfer, + ) + + def approve( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Approve a Swift Transfer + + Args: + swift_transfer_id: The identifier of the Swift Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return self._post( + f"/swift_transfers/{swift_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + def cancel( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Cancel a pending Swift Transfer + + Args: + swift_transfer_id: The identifier of the pending Swift Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return self._post( + f"/swift_transfers/{swift_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + +class AsyncSwiftTransfersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncSwiftTransfersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncSwiftTransfersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncSwiftTransfersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncSwiftTransfersResourceWithStreamingResponse(self) + + async def create( + self, + *, + account_id: str, + account_number: str, + bank_identification_code: str, + creditor_address: swift_transfer_create_params.CreditorAddress, + creditor_name: str, + debtor_address: swift_transfer_create_params.DebtorAddress, + debtor_name: str, + instructed_amount: int, + instructed_currency: Literal["USD"], + source_account_number_id: str, + unstructured_remittance_information: str, + require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Create a Swift Transfer + + Args: + account_id: The identifier for the account that will send the transfer. + + account_number: The creditor's account number. + + bank_identification_code: The bank identification code (BIC) of the creditor. If it ends with the + three-character branch code, this must be 11 characters long. Otherwise this + must be 8 characters and the branch code will be assumed to be `XXX`. + + creditor_address: The creditor's address. + + creditor_name: The creditor's name. + + debtor_address: The debtor's address. + + debtor_name: The debtor's name. + + instructed_amount: The amount, in minor units of `instructed_currency`, to send to the creditor. + + instructed_currency: The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the + instructed amount. + + - `USD` - United States Dollar + + source_account_number_id: The Account Number to include in the transfer as the debtor's account number. + + unstructured_remittance_information: Unstructured remittance information to include in the transfer. + + require_approval: Whether the transfer requires explicit approval via the dashboard or API. + + routing_number: The creditor's bank account routing or transit number. Required in certain + countries. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/swift_transfers", + body=await async_maybe_transform( + { + "account_id": account_id, + "account_number": account_number, + "bank_identification_code": bank_identification_code, + "creditor_address": creditor_address, + "creditor_name": creditor_name, + "debtor_address": debtor_address, + "debtor_name": debtor_name, + "instructed_amount": instructed_amount, + "instructed_currency": instructed_currency, + "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "require_approval": require_approval, + "routing_number": routing_number, + }, + swift_transfer_create_params.SwiftTransferCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + async def retrieve( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SwiftTransfer: + """ + Retrieve a Swift Transfer + + Args: + swift_transfer_id: The identifier of the Swift Transfer. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return await self._get( + f"/swift_transfers/{swift_transfer_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=SwiftTransfer, + ) + + def list( + self, + *, + account_id: str | Omit = omit, + created_at: swift_transfer_list_params.CreatedAt | Omit = omit, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: swift_transfer_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[SwiftTransfer, AsyncPage[SwiftTransfer]]: + """ + List Swift Transfers + + Args: + account_id: Filter Swift Transfers to those that originated from the specified Account. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/swift_transfers", + page=AsyncPage[SwiftTransfer], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "account_id": account_id, + "created_at": created_at, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + swift_transfer_list_params.SwiftTransferListParams, + ), + ), + model=SwiftTransfer, + ) + + async def approve( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Approve a Swift Transfer + + Args: + swift_transfer_id: The identifier of the Swift Transfer to approve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return await self._post( + f"/swift_transfers/{swift_transfer_id}/approve", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + async def cancel( + self, + swift_transfer_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> SwiftTransfer: + """ + Cancel a pending Swift Transfer + + Args: + swift_transfer_id: The identifier of the pending Swift Transfer to cancel. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not swift_transfer_id: + raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") + return await self._post( + f"/swift_transfers/{swift_transfer_id}/cancel", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=SwiftTransfer, + ) + + +class SwiftTransfersResourceWithRawResponse: + def __init__(self, swift_transfers: SwiftTransfersResource) -> None: + self._swift_transfers = swift_transfers + + self.create = to_raw_response_wrapper( + swift_transfers.create, + ) + self.retrieve = to_raw_response_wrapper( + swift_transfers.retrieve, + ) + self.list = to_raw_response_wrapper( + swift_transfers.list, + ) + self.approve = to_raw_response_wrapper( + swift_transfers.approve, + ) + self.cancel = to_raw_response_wrapper( + swift_transfers.cancel, + ) + + +class AsyncSwiftTransfersResourceWithRawResponse: + def __init__(self, swift_transfers: AsyncSwiftTransfersResource) -> None: + self._swift_transfers = swift_transfers + + self.create = async_to_raw_response_wrapper( + swift_transfers.create, + ) + self.retrieve = async_to_raw_response_wrapper( + swift_transfers.retrieve, + ) + self.list = async_to_raw_response_wrapper( + swift_transfers.list, + ) + self.approve = async_to_raw_response_wrapper( + swift_transfers.approve, + ) + self.cancel = async_to_raw_response_wrapper( + swift_transfers.cancel, + ) + + +class SwiftTransfersResourceWithStreamingResponse: + def __init__(self, swift_transfers: SwiftTransfersResource) -> None: + self._swift_transfers = swift_transfers + + self.create = to_streamed_response_wrapper( + swift_transfers.create, + ) + self.retrieve = to_streamed_response_wrapper( + swift_transfers.retrieve, + ) + self.list = to_streamed_response_wrapper( + swift_transfers.list, + ) + self.approve = to_streamed_response_wrapper( + swift_transfers.approve, + ) + self.cancel = to_streamed_response_wrapper( + swift_transfers.cancel, + ) + + +class AsyncSwiftTransfersResourceWithStreamingResponse: + def __init__(self, swift_transfers: AsyncSwiftTransfersResource) -> None: + self._swift_transfers = swift_transfers + + self.create = async_to_streamed_response_wrapper( + swift_transfers.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + swift_transfers.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + swift_transfers.list, + ) + self.approve = async_to_streamed_response_wrapper( + swift_transfers.approve, + ) + self.cancel = async_to_streamed_response_wrapper( + swift_transfers.cancel, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index c4fc145fa..492df7108 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -25,6 +25,7 @@ from .account_number import AccountNumber as AccountNumber from .balance_lookup import BalanceLookup as BalanceLookup from .check_transfer import CheckTransfer as CheckTransfer +from .swift_transfer import SwiftTransfer as SwiftTransfer from .card_iframe_url import CardIframeURL as CardIframeURL from .card_validation import CardValidation as CardValidation from .fednow_transfer import FednowTransfer as FednowTransfer @@ -93,6 +94,7 @@ from .check_transfer_list_params import CheckTransferListParams as CheckTransferListParams from .intrafi_account_enrollment import IntrafiAccountEnrollment as IntrafiAccountEnrollment from .routing_number_list_params import RoutingNumberListParams as RoutingNumberListParams +from .swift_transfer_list_params import SwiftTransferListParams as SwiftTransferListParams from .card_validation_list_params import CardValidationListParams as CardValidationListParams from .check_deposit_create_params import CheckDepositCreateParams as CheckDepositCreateParams from .fednow_transfer_list_params import FednowTransferListParams as FednowTransferListParams @@ -109,6 +111,7 @@ from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse +from .swift_transfer_create_params import SwiftTransferCreateParams as SwiftTransferCreateParams from .account_statement_list_params import AccountStatementListParams as AccountStatementListParams from .bookkeeping_entry_list_params import BookkeepingEntryListParams as BookkeepingEntryListParams from .card_validation_create_params import CardValidationCreateParams as CardValidationCreateParams diff --git a/src/increase/types/swift_transfer.py b/src/increase/types/swift_transfer.py new file mode 100644 index 000000000..aab32acea --- /dev/null +++ b/src/increase/types/swift_transfer.py @@ -0,0 +1,232 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = [ + "SwiftTransfer", + "CreatedBy", + "CreatedByAPIKey", + "CreatedByOAuthApplication", + "CreatedByUser", + "CreditorAddress", + "DebtorAddress", +] + + +class CreatedByAPIKey(BaseModel): + """If present, details about the API key that created the transfer.""" + + description: Optional[str] = None + """The description set for the API key when it was created.""" + + +class CreatedByOAuthApplication(BaseModel): + """If present, details about the OAuth Application that created the transfer.""" + + name: str + """The name of the OAuth Application.""" + + +class CreatedByUser(BaseModel): + """If present, details about the User that created the transfer.""" + + email: str + """The email address of the User.""" + + +class CreatedBy(BaseModel): + """What object created the transfer, either via the API or the dashboard.""" + + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + + category: Literal["api_key", "oauth_application", "user"] + """The type of object that created this transfer. + + - `api_key` - An API key. Details will be under the `api_key` object. + - `oauth_application` - An OAuth application you connected to Increase. Details + will be under the `oauth_application` object. + - `user` - A User in the Increase dashboard. Details will be under the `user` + object. + """ + + oauth_application: Optional[CreatedByOAuthApplication] = None + """If present, details about the OAuth Application that created the transfer.""" + + user: Optional[CreatedByUser] = None + """If present, details about the User that created the transfer.""" + + +class CreditorAddress(BaseModel): + """The creditor's address.""" + + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + postal_code: Optional[str] = None + """The ZIP or postal code of the address.""" + + state: Optional[str] = None + """The state, province, or region of the address. Required in certain countries.""" + + +class DebtorAddress(BaseModel): + """The debtor's address.""" + + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + postal_code: Optional[str] = None + """The ZIP or postal code of the address.""" + + state: Optional[str] = None + """The state, province, or region of the address. Required in certain countries.""" + + +class SwiftTransfer(BaseModel): + """Swift Transfers send funds internationally.""" + + id: str + """The Swift transfer's identifier.""" + + account_id: str + """The Account to which the transfer belongs.""" + + account_number: str + """The creditor's account number.""" + + amount: int + """The transfer amount in USD cents.""" + + bank_identification_code: str + """The bank identification code (BIC) of the creditor.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was created. + """ + + created_by: CreatedBy + """What object created the transfer, either via the API or the dashboard.""" + + creditor_address: CreditorAddress + """The creditor's address.""" + + creditor_name: str + """The creditor's name.""" + + debtor_address: DebtorAddress + """The debtor's address.""" + + debtor_name: str + """The debtor's name.""" + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + instructed_amount: int + """ + The amount that was instructed to be transferred in minor units of the + `instructed_currency`. + """ + + instructed_currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the + instructed amount. + + - `USD` - United States Dollar + """ + + pending_transaction_id: Optional[str] = None + """The ID for the pending transaction representing the transfer.""" + + routing_number: Optional[str] = None + """The creditor's bank account routing or transit number. + + Required in certain countries. + """ + + source_account_number_id: str + """The Account Number included in the transfer as the debtor's account number.""" + + status: Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "requires_attention", + "pending_initiating", + "initiated", + "rejected", + "returned", + ] + """The lifecycle status of the transfer. + + - `pending_approval` - The transfer is pending approval. + - `canceled` - The transfer has been canceled. + - `pending_reviewing` - The transfer is pending review by Increase. + - `requires_attention` - The transfer requires attention from an Increase + operator. + - `pending_initiating` - The transfer is pending initiation. + - `initiated` - The transfer has been initiated. + - `rejected` - The transfer has been rejected by Increase. + - `returned` - The transfer has been returned. + """ + + transaction_id: Optional[str] = None + """The ID for the transaction funding the transfer. + + This will be populated after the transfer is initiated. + """ + + type: Literal["swift_transfer"] + """A constant representing the object's type. + + For this resource it will always be `swift_transfer`. + """ + + unique_end_to_end_transaction_reference: str + """ + The Unique End-to-end Transaction Reference + ([UETR](https://www.swift.com/payments/what-unique-end-end-transaction-reference-uetr)) + for the transfer. + """ + + unstructured_remittance_information: str + """The unstructured remittance information that was included with the transfer.""" diff --git a/src/increase/types/swift_transfer_create_params.py b/src/increase/types/swift_transfer_create_params.py new file mode 100644 index 000000000..2a37c670d --- /dev/null +++ b/src/increase/types/swift_transfer_create_params.py @@ -0,0 +1,113 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["SwiftTransferCreateParams", "CreditorAddress", "DebtorAddress"] + + +class SwiftTransferCreateParams(TypedDict, total=False): + account_id: Required[str] + """The identifier for the account that will send the transfer.""" + + account_number: Required[str] + """The creditor's account number.""" + + bank_identification_code: Required[str] + """The bank identification code (BIC) of the creditor. + + If it ends with the three-character branch code, this must be 11 characters + long. Otherwise this must be 8 characters and the branch code will be assumed to + be `XXX`. + """ + + creditor_address: Required[CreditorAddress] + """The creditor's address.""" + + creditor_name: Required[str] + """The creditor's name.""" + + debtor_address: Required[DebtorAddress] + """The debtor's address.""" + + debtor_name: Required[str] + """The debtor's name.""" + + instructed_amount: Required[int] + """The amount, in minor units of `instructed_currency`, to send to the creditor.""" + + instructed_currency: Required[Literal["USD"]] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) currency code of the + instructed amount. + + - `USD` - United States Dollar + """ + + source_account_number_id: Required[str] + """The Account Number to include in the transfer as the debtor's account number.""" + + unstructured_remittance_information: Required[str] + """Unstructured remittance information to include in the transfer.""" + + require_approval: bool + """Whether the transfer requires explicit approval via the dashboard or API.""" + + routing_number: str + """The creditor's bank account routing or transit number. + + Required in certain countries. + """ + + +class CreditorAddress(TypedDict, total=False): + """The creditor's address.""" + + city: Required[str] + """The city, district, town, or village of the address.""" + + country: Required[str] + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + postal_code: str + """The ZIP or postal code of the address. Required in certain countries.""" + + state: str + """The state, province, or region of the address. Required in certain countries.""" + + +class DebtorAddress(TypedDict, total=False): + """The debtor's address.""" + + city: Required[str] + """The city, district, town, or village of the address.""" + + country: Required[str] + """ + The two-letter + [ISO 3166-1 alpha-2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) code for + the country of the address. + """ + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + postal_code: str + """The ZIP or postal code of the address. Required in certain countries.""" + + state: str + """The state, province, or region of the address. Required in certain countries.""" diff --git a/src/increase/types/swift_transfer_list_params.py b/src/increase/types/swift_transfer_list_params.py new file mode 100644 index 000000000..15f14bd69 --- /dev/null +++ b/src/increase/types/swift_transfer_list_params.py @@ -0,0 +1,87 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import datetime +from typing_extensions import Literal, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = ["SwiftTransferListParams", "CreatedAt", "Status"] + + +class SwiftTransferListParams(TypedDict, total=False): + account_id: str + """Filter Swift Transfers to those that originated from the specified Account.""" + + created_at: CreatedAt + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +class CreatedAt(TypedDict, total=False): + after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) + timestamp. + """ + + on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or after this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] + """ + Return results on or before this + [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. + """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "requires_attention", + "pending_initiating", + "initiated", + "rejected", + "returned", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_swift_transfers.py b/tests/api_resources/test_swift_transfers.py new file mode 100644 index 000000000..f2e2a35df --- /dev/null +++ b/tests/api_resources/test_swift_transfers.py @@ -0,0 +1,574 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import SwiftTransfer +from increase._utils import parse_datetime +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestSwiftTransfers: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + "line2": "x", + "postal_code": "60314", + "state": "x", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + require_approval=True, + routing_number="x", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.swift_transfers.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.swift_transfers.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.swift_transfers.with_raw_response.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.swift_transfers.with_streaming_response.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + client.swift_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.list() + assert_matches_type(SyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["pending_approval"]}, + ) + assert_matches_type(SyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.swift_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = response.parse() + assert_matches_type(SyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.swift_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = response.parse() + assert_matches_type(SyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_approve(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_raw_response_approve(self, client: Increase) -> None: + response = client.swift_transfers.with_raw_response.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_streaming_response_approve(self, client: Increase) -> None: + with client.swift_transfers.with_streaming_response.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_approve(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + client.swift_transfers.with_raw_response.approve( + "", + ) + + @parametrize + def test_method_cancel(self, client: Increase) -> None: + swift_transfer = client.swift_transfers.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_raw_response_cancel(self, client: Increase) -> None: + response = client.swift_transfers.with_raw_response.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + def test_streaming_response_cancel(self, client: Increase) -> None: + with client.swift_transfers.with_streaming_response.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_cancel(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + client.swift_transfers.with_raw_response.cancel( + "", + ) + + +class TestAsyncSwiftTransfers: + 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: + swift_transfer = await async_client.swift_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + "line2": "x", + "postal_code": "60314", + "state": "x", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "postal_code": "10045", + "state": "NY", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + require_approval=True, + routing_number="x", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.swift_transfers.with_raw_response.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.swift_transfers.with_streaming_response.create( + account_id="account_in71c4amph0vgo2qllky", + account_number="987654321", + bank_identification_code="ECBFDEFFTPP", + creditor_address={ + "city": "Frankfurt", + "country": "DE", + "line1": "Sonnemannstrasse 20", + }, + creditor_name="Ian Crease", + debtor_address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + debtor_name="National Phonograph Company", + instructed_amount=100, + instructed_currency="USD", + source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="New Swift transfer", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.swift_transfers.with_raw_response.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.swift_transfers.with_streaming_response.retrieve( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + await async_client.swift_transfers.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.list() + assert_matches_type(AsyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.list( + account_id="account_id", + created_at={ + "after": parse_datetime("2019-12-27T18:11:19.117Z"), + "before": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), + "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), + }, + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["pending_approval"]}, + ) + assert_matches_type(AsyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.swift_transfers.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = await response.parse() + assert_matches_type(AsyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.swift_transfers.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = await response.parse() + assert_matches_type(AsyncPage[SwiftTransfer], swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_approve(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_raw_response_approve(self, async_client: AsyncIncrease) -> None: + response = await async_client.swift_transfers.with_raw_response.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_approve(self, async_client: AsyncIncrease) -> None: + async with async_client.swift_transfers.with_streaming_response.approve( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_approve(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + await async_client.swift_transfers.with_raw_response.approve( + "", + ) + + @parametrize + async def test_method_cancel(self, async_client: AsyncIncrease) -> None: + swift_transfer = await async_client.swift_transfers.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_raw_response_cancel(self, async_client: AsyncIncrease) -> None: + response = await async_client.swift_transfers.with_raw_response.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + @parametrize + async def test_streaming_response_cancel(self, async_client: AsyncIncrease) -> None: + async with async_client.swift_transfers.with_streaming_response.cancel( + "swift_transfer_29h21xkng03788zwd3fh", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + swift_transfer = await response.parse() + assert_matches_type(SwiftTransfer, swift_transfer, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_cancel(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `swift_transfer_id` but received ''"): + await async_client.swift_transfers.with_raw_response.cancel( + "", + ) From 25a3e2b2a5217eaa813f9a75742c9674d5e9150f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 13 Jan 2026 18:39:17 +0000 Subject: [PATCH 1090/1325] feat(client): add support for binary request streaming --- src/increase/_base_client.py | 145 ++++++++++++++++++++++++--- src/increase/_models.py | 17 +++- src/increase/_types.py | 9 ++ tests/test_client.py | 187 ++++++++++++++++++++++++++++++++++- 4 files changed, 344 insertions(+), 14 deletions(-) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 200e5e8b3..056c1532a 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -9,6 +9,7 @@ import inspect import logging import platform +import warnings import email.utils from types import TracebackType from random import random @@ -51,9 +52,11 @@ ResponseT, AnyMapping, PostParser, + BinaryTypes, RequestFiles, HttpxSendArgs, RequestOptions, + AsyncBinaryTypes, HttpxRequestFiles, ModelBuilderProtocol, not_given, @@ -477,8 +480,19 @@ def _build_request( retries_taken: int = 0, ) -> httpx.Request: if log.isEnabledFor(logging.DEBUG): - log.debug("Request options: %s", model_dump(options, exclude_unset=True)) - + log.debug( + "Request options: %s", + model_dump( + options, + exclude_unset=True, + # Pydantic v1 can't dump every type we support in content, so we exclude it for now. + exclude={ + "content", + } + if PYDANTIC_V1 + else {}, + ), + ) kwargs: dict[str, Any] = {} json_data = options.json_data @@ -532,7 +546,13 @@ def _build_request( is_body_allowed = options.method.lower() != "get" if is_body_allowed: - if isinstance(json_data, bytes): + if options.content is not None and json_data is not None: + raise TypeError("Passing both `content` and `json_data` is not supported") + if options.content is not None and files is not None: + raise TypeError("Passing both `content` and `files` is not supported") + if options.content is not None: + kwargs["content"] = options.content + elif isinstance(json_data, bytes): kwargs["content"] = json_data else: kwargs["json"] = json_data if is_given(json_data) else None @@ -1194,6 +1214,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[False] = False, @@ -1206,6 +1227,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: Literal[True], @@ -1219,6 +1241,7 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool, @@ -1231,13 +1254,25 @@ def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, files: RequestFiles | None = None, stream: bool = False, stream_cls: type[_StreamT] | None = None, ) -> ResponseT | _StreamT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="post", url=path, json_data=body, files=to_httpx_files(files), **options + method="post", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return cast(ResponseT, self.request(cast_to, opts, stream=stream, stream_cls=stream_cls)) @@ -1247,11 +1282,23 @@ def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=to_httpx_files(files), **options + method="patch", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return self.request(cast_to, opts) @@ -1261,11 +1308,23 @@ def put( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="put", url=path, json_data=body, files=to_httpx_files(files), **options + method="put", url=path, json_data=body, content=content, files=to_httpx_files(files), **options ) return self.request(cast_to, opts) @@ -1275,9 +1334,19 @@ def delete( *, cast_to: Type[ResponseT], body: Body | None = None, + content: BinaryTypes | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options) + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) + opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options) return self.request(cast_to, opts) def get_api_list( @@ -1717,6 +1786,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[False] = False, @@ -1729,6 +1799,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: Literal[True], @@ -1742,6 +1813,7 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool, @@ -1754,13 +1826,25 @@ async def post( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, stream: bool = False, stream_cls: type[_AsyncStreamT] | None = None, ) -> ResponseT | _AsyncStreamT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="post", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="post", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts, stream=stream, stream_cls=stream_cls) @@ -1770,11 +1854,28 @@ async def patch( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="patch", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="patch", + url=path, + json_data=body, + content=content, + files=await async_to_httpx_files(files), + **options, ) return await self.request(cast_to, opts) @@ -1784,11 +1885,23 @@ async def put( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, files: RequestFiles | None = None, options: RequestOptions = {}, ) -> ResponseT: + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if files is not None and content is not None: + raise TypeError("Passing both `files` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) opts = FinalRequestOptions.construct( - method="put", url=path, json_data=body, files=await async_to_httpx_files(files), **options + method="put", url=path, json_data=body, content=content, files=await async_to_httpx_files(files), **options ) return await self.request(cast_to, opts) @@ -1798,9 +1911,19 @@ async def delete( *, cast_to: Type[ResponseT], body: Body | None = None, + content: AsyncBinaryTypes | None = None, options: RequestOptions = {}, ) -> ResponseT: - opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, **options) + if body is not None and content is not None: + raise TypeError("Passing both `body` and `content` is not supported") + if isinstance(body, bytes): + warnings.warn( + "Passing raw bytes as `body` is deprecated and will be removed in a future version. " + "Please pass raw bytes via the `content` parameter instead.", + DeprecationWarning, + stacklevel=2, + ) + opts = FinalRequestOptions.construct(method="delete", url=path, json_data=body, content=content, **options) return await self.request(cast_to, opts) def get_api_list( diff --git a/src/increase/_models.py b/src/increase/_models.py index ca9500b2a..29070e055 100644 --- a/src/increase/_models.py +++ b/src/increase/_models.py @@ -3,7 +3,20 @@ import os import inspect import weakref -from typing import TYPE_CHECKING, Any, Type, Union, Generic, TypeVar, Callable, Optional, cast +from typing import ( + IO, + TYPE_CHECKING, + Any, + Type, + Union, + Generic, + TypeVar, + Callable, + Iterable, + Optional, + AsyncIterable, + cast, +) from datetime import date, datetime from typing_extensions import ( List, @@ -787,6 +800,7 @@ class FinalRequestOptionsInput(TypedDict, total=False): timeout: float | Timeout | None files: HttpxRequestFiles | None idempotency_key: str + content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] json_data: Body extra_json: AnyMapping follow_redirects: bool @@ -805,6 +819,7 @@ class FinalRequestOptions(pydantic.BaseModel): post_parser: Union[Callable[[Any], Any], NotGiven] = NotGiven() follow_redirects: Union[bool, None] = None + content: Union[bytes, bytearray, IO[bytes], Iterable[bytes], AsyncIterable[bytes], None] = None # It should be noted that we cannot use `json` here as that would override # a BaseModel method in an incompatible fashion. json_data: Union[Body, None] = None diff --git a/src/increase/_types.py b/src/increase/_types.py index d9b38629d..41865091f 100644 --- a/src/increase/_types.py +++ b/src/increase/_types.py @@ -13,9 +13,11 @@ Mapping, TypeVar, Callable, + Iterable, Iterator, Optional, Sequence, + AsyncIterable, ) from typing_extensions import ( Set, @@ -56,6 +58,13 @@ else: Base64FileInput = Union[IO[bytes], PathLike] FileContent = Union[IO[bytes], bytes, PathLike] # PathLike is not subscriptable in Python 3.8. + + +# Used for sending raw binary data / streaming data in request bodies +# e.g. for file uploads without multipart encoding +BinaryTypes = Union[bytes, bytearray, IO[bytes], Iterable[bytes]] +AsyncBinaryTypes = Union[bytes, bytearray, IO[bytes], AsyncIterable[bytes]] + FileTypes = Union[ # file (or bytes) FileContent, diff --git a/tests/test_client.py b/tests/test_client.py index 300ce881e..ab615e9ca 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -8,10 +8,11 @@ import json import asyncio import inspect +import dataclasses import tracemalloc -from typing import Any, Union, cast +from typing import Any, Union, TypeVar, Callable, Iterable, Iterator, Optional, Coroutine, cast from unittest import mock -from typing_extensions import Literal +from typing_extensions import Literal, AsyncIterator, override import httpx import pytest @@ -36,6 +37,7 @@ from .utils import update_env +T = TypeVar("T") base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") api_key = "My API Key" @@ -50,6 +52,57 @@ def _low_retry_timeout(*_args: Any, **_kwargs: Any) -> float: return 0.1 +def mirror_request_content(request: httpx.Request) -> httpx.Response: + return httpx.Response(200, content=request.content) + + +# note: we can't use the httpx.MockTransport class as it consumes the request +# body itself, which means we can't test that the body is read lazily +class MockTransport(httpx.BaseTransport, httpx.AsyncBaseTransport): + def __init__( + self, + handler: Callable[[httpx.Request], httpx.Response] + | Callable[[httpx.Request], Coroutine[Any, Any, httpx.Response]], + ) -> None: + self.handler = handler + + @override + def handle_request( + self, + request: httpx.Request, + ) -> httpx.Response: + assert not inspect.iscoroutinefunction(self.handler), "handler must not be a coroutine function" + assert inspect.isfunction(self.handler), "handler must be a function" + return self.handler(request) + + @override + async def handle_async_request( + self, + request: httpx.Request, + ) -> httpx.Response: + assert inspect.iscoroutinefunction(self.handler), "handler must be a coroutine function" + return await self.handler(request) + + +@dataclasses.dataclass +class Counter: + value: int = 0 + + +def _make_sync_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> Iterator[T]: + for item in iterable: + if counter: + counter.value += 1 + yield item + + +async def _make_async_iterator(iterable: Iterable[T], counter: Optional[Counter] = None) -> AsyncIterator[T]: + for item in iterable: + if counter: + counter.value += 1 + yield item + + def _get_open_connections(client: Increase | AsyncIncrease) -> int: transport = client._client._transport assert isinstance(transport, httpx.HTTPTransport) or isinstance(transport, httpx.AsyncHTTPTransport) @@ -502,6 +555,70 @@ def test_multipart_repeating_array(self, client: Increase) -> None: b"", ] + @pytest.mark.respx(base_url=base_url) + def test_binary_content_upload(self, respx_mock: MockRouter, client: Increase) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + response = client.post( + "/upload", + content=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + + def test_binary_content_upload_with_iterator(self) -> None: + file_content = b"Hello, this is a test file." + counter = Counter() + iterator = _make_sync_iterator([file_content], counter=counter) + + def mock_handler(request: httpx.Request) -> httpx.Response: + assert counter.value == 0, "the request body should not have been read" + return httpx.Response(200, content=request.read()) + + with Increase( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + http_client=httpx.Client(transport=MockTransport(handler=mock_handler)), + ) as client: + response = client.post( + "/upload", + content=iterator, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + assert counter.value == 1 + + @pytest.mark.respx(base_url=base_url) + def test_binary_content_upload_with_body_is_deprecated(self, respx_mock: MockRouter, client: Increase) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + with pytest.deprecated_call( + match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead." + ): + response = client.post( + "/upload", + body=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + @pytest.mark.respx(base_url=base_url) def test_basic_union_response(self, respx_mock: MockRouter, client: Increase) -> None: class Model1(BaseModel): @@ -1368,6 +1485,72 @@ def test_multipart_repeating_array(self, async_client: AsyncIncrease) -> None: b"", ] + @pytest.mark.respx(base_url=base_url) + async def test_binary_content_upload(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + response = await async_client.post( + "/upload", + content=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + + async def test_binary_content_upload_with_asynciterator(self) -> None: + file_content = b"Hello, this is a test file." + counter = Counter() + iterator = _make_async_iterator([file_content], counter=counter) + + async def mock_handler(request: httpx.Request) -> httpx.Response: + assert counter.value == 0, "the request body should not have been read" + return httpx.Response(200, content=await request.aread()) + + async with AsyncIncrease( + base_url=base_url, + api_key=api_key, + _strict_response_validation=True, + http_client=httpx.AsyncClient(transport=MockTransport(handler=mock_handler)), + ) as client: + response = await client.post( + "/upload", + content=iterator, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + assert counter.value == 1 + + @pytest.mark.respx(base_url=base_url) + async def test_binary_content_upload_with_body_is_deprecated( + self, respx_mock: MockRouter, async_client: AsyncIncrease + ) -> None: + respx_mock.post("/upload").mock(side_effect=mirror_request_content) + + file_content = b"Hello, this is a test file." + + with pytest.deprecated_call( + match="Passing raw bytes as `body` is deprecated and will be removed in a future version. Please pass raw bytes via the `content` parameter instead." + ): + response = await async_client.post( + "/upload", + body=file_content, + cast_to=httpx.Response, + options={"headers": {"Content-Type": "application/octet-stream"}}, + ) + + assert response.status_code == 200 + assert response.request.headers["Content-Type"] == "application/octet-stream" + assert response.content == file_content + @pytest.mark.respx(base_url=base_url) async def test_basic_union_response(self, respx_mock: MockRouter, async_client: AsyncIncrease) -> None: class Model1(BaseModel): From cddf77c6dfe278a096943a229b4544cd361423dd Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 14 Jan 2026 19:10:37 +0000 Subject: [PATCH 1091/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/file.py | 2 ++ src/increase/types/file_list_params.py | 1 + 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index af0e17b5e..4b965774e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7a47821c7d33caac95ba05890682dde6da257dbe86033e4f119aa626c11ae387.yml -openapi_spec_hash: 0ccabc90834936bc2fcdeeee01e77a64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a559a6a1a1f3781fad8db5bcb96c40b69a78b952d659395840accce782098e0c.yml +openapi_spec_hash: 2ae62041468e5cf6fe653d65b1b7a58a config_hash: 8a9bb9e2d5dd0ccc3e78ad59f924fd3c diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 8391769aa..45939cdbb 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -73,6 +73,7 @@ class File(BaseModel): "document_request", "entity_supplemental_document", "export", + "fee_statement", "unusual_activity_report_attachment", "deposit_account_control_agreement", "proof_of_authorization_request_submission", @@ -124,6 +125,7 @@ class File(BaseModel): - `entity_supplemental_document` - A supplemental document associated an an Entity. - `export` - The results of an Export you requested via the dashboard or API. + - `fee_statement` - A fee statement. - `unusual_activity_report_attachment` - An attachment to an Unusual Activity Report. - `deposit_account_control_agreement` - A document granting another entity diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index b87680357..2e6f4332b 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -90,6 +90,7 @@ class CreatedAt(TypedDict, total=False): "document_request", "entity_supplemental_document", "export", + "fee_statement", "unusual_activity_report_attachment", "deposit_account_control_agreement", "proof_of_authorization_request_submission", From 206e3e3b7927a1e63c31b055808d6673290f096a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 16:38:43 +0000 Subject: [PATCH 1092/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 4b965774e..f45b98bf5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a559a6a1a1f3781fad8db5bcb96c40b69a78b952d659395840accce782098e0c.yml openapi_spec_hash: 2ae62041468e5cf6fe653d65b1b7a58a -config_hash: 8a9bb9e2d5dd0ccc3e78ad59f924fd3c +config_hash: 0d242469421d4c22a6010e671c6b2346 From 724cb8f912de923ca072be28c7261f1dbb0f1c34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 01:20:55 +0000 Subject: [PATCH 1093/1325] feat(api): api update --- .stats.yml | 2 +- api.md | 2 +- pyproject.toml | 1 + requirements-dev.lock | 13 +++++++ requirements.lock | 16 +++++++++ src/increase/__init__.py | 2 ++ src/increase/_exceptions.py | 4 +++ src/increase/resources/events.py | 58 ++++++++++++++++++++++++++++++ tests/api_resources/test_events.py | 58 ++++++++++++++++++++++++++++++ 9 files changed, 154 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f45b98bf5..55843fe6f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a559a6a1a1f3781fad8db5bcb96c40b69a78b952d659395840accce782098e0c.yml openapi_spec_hash: 2ae62041468e5cf6fe653d65b1b7a58a -config_hash: 0d242469421d4c22a6010e671c6b2346 +config_hash: 3ccb2793be25ae0b15e05dc9ef5da09c diff --git a/api.md b/api.md index 7646d0760..2a8b62be1 100644 --- a/api.md +++ b/api.md @@ -592,7 +592,7 @@ Methods: Types: ```python -from increase.types import Event +from increase.types import Event, UnwrapWebhookEvent ``` Methods: diff --git a/pyproject.toml b/pyproject.toml index 4e3009c12..e2ee8e0f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,6 +42,7 @@ Repository = "https://github.com/Increase/increase-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] +webhooks = ["standardwebhooks"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index b89977af4..f50a0288a 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -29,6 +29,7 @@ async-timeout==5.0.1 attrs==25.4.0 # via aiohttp # via nox + # via standardwebhooks backports-asyncio-runner==1.2.0 # via pytest-asyncio certifi==2025.11.12 @@ -38,6 +39,8 @@ colorlog==6.10.1 # via nox dependency-groups==1.3.1 # via nox +deprecated==1.3.1 + # via standardwebhooks dirty-equals==0.11 distlib==0.4.0 # via virtualenv @@ -61,6 +64,7 @@ httpx==0.28.1 # via httpx-aiohttp # via increase # via respx + # via standardwebhooks httpx-aiohttp==0.1.9 # via increase humanize==4.13.0 @@ -112,6 +116,7 @@ pytest==8.4.2 pytest-asyncio==1.2.0 pytest-xdist==3.8.0 python-dateutil==2.9.0.post0 + # via standardwebhooks # via time-machine respx==0.22.0 rich==14.2.0 @@ -120,12 +125,18 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via increase +standardwebhooks==1.0.0 + # via increase time-machine==2.19.0 tomli==2.3.0 # via dependency-groups # via mypy # via nox # via pytest +types-deprecated==1.3.1.20251101 + # via standardwebhooks +types-python-dateutil==2.9.0.20251115 + # via standardwebhooks typing-extensions==4.15.0 # via aiosignal # via anyio @@ -143,6 +154,8 @@ typing-inspection==0.4.2 # via pydantic virtualenv==20.35.4 # via nox +wrapt==2.0.1 + # via deprecated yarl==1.22.0 # via aiohttp zipp==3.23.0 diff --git a/requirements.lock b/requirements.lock index db5859e44..46f62c067 100644 --- a/requirements.lock +++ b/requirements.lock @@ -26,9 +26,12 @@ async-timeout==5.0.1 # via aiohttp attrs==25.4.0 # via aiohttp + # via standardwebhooks certifi==2025.11.12 # via httpcore # via httpx +deprecated==1.3.1 + # via standardwebhooks distro==1.9.0 # via increase exceptiongroup==1.3.1 @@ -43,6 +46,7 @@ httpcore==1.0.9 httpx==0.28.1 # via httpx-aiohttp # via increase + # via standardwebhooks httpx-aiohttp==0.1.9 # via increase idna==3.11 @@ -59,8 +63,18 @@ pydantic==2.12.5 # via increase pydantic-core==2.41.5 # via pydantic +python-dateutil==2.9.0.post0 + # via standardwebhooks +six==1.17.0 + # via python-dateutil sniffio==1.3.1 # via increase +standardwebhooks==1.0.0 + # via increase +types-deprecated==1.3.1.20251101 + # via standardwebhooks +types-python-dateutil==2.9.0.20251115 + # via standardwebhooks typing-extensions==4.15.0 # via aiosignal # via anyio @@ -72,5 +86,7 @@ typing-extensions==4.15.0 # via typing-inspection typing-inspection==0.4.2 # via pydantic +wrapt==2.0.1 + # via deprecated yarl==1.22.0 # via aiohttp diff --git a/src/increase/__init__.py b/src/increase/__init__.py index 740cd3665..55ed1eb5d 100644 --- a/src/increase/__init__.py +++ b/src/increase/__init__.py @@ -44,6 +44,7 @@ InvalidParametersError, EnvironmentMismatchError, UnprocessableEntityError, + APIWebhookValidationError, APIResponseValidationError, InsufficientPermissionsError, IdempotencyKeyAlreadyUsedError, @@ -69,6 +70,7 @@ "APITimeoutError", "APIConnectionError", "APIResponseValidationError", + "APIWebhookValidationError", "BadRequestError", "AuthenticationError", "PermissionDeniedError", diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index a330649bd..cc8bcda03 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -69,6 +69,10 @@ def __init__(self, response: httpx.Response, body: object | None, *, message: st self.status_code = response.status_code +class APIWebhookValidationError(APIError): + pass + + class APIStatusError(APIError): """Raised when an API response has a status code of 4xx or 5xx.""" diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 0e6be4fbe..d5f571eac 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -2,12 +2,16 @@ from __future__ import annotations +import json +from typing import Mapping, cast + import httpx from ..types import event_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform from .._compat import cached_property +from .._models import construct_type from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( to_raw_response_wrapper, @@ -16,8 +20,10 @@ async_to_streamed_response_wrapper, ) from ..pagination import SyncPage, AsyncPage +from .._exceptions import IncreaseError from ..types.event import Event from .._base_client import AsyncPaginator, make_request_options +from ..types.unwrap_webhook_event import UnwrapWebhookEvent __all__ = ["EventsResource", "AsyncEventsResource"] @@ -133,6 +139,32 @@ def list( model=Event, ) + def unwrap(self, payload: str, *, headers: Mapping[str, str], key: str | bytes | None = None) -> UnwrapWebhookEvent: + try: + from standardwebhooks import Webhook + except ImportError as exc: + raise IncreaseError("You need to install `increase[webhooks]` to use this method") from exc + + if key is None: + key = self._client.webhook_secret + if key is None: + raise ValueError( + "Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument" + ) + + if not isinstance(headers, dict): + headers = dict(headers) + + Webhook(key).verify(payload, headers) + + return cast( + UnwrapWebhookEvent, + construct_type( + type_=UnwrapWebhookEvent, + value=json.loads(payload), + ), + ) + class AsyncEventsResource(AsyncAPIResource): @cached_property @@ -245,6 +277,32 @@ def list( model=Event, ) + def unwrap(self, payload: str, *, headers: Mapping[str, str], key: str | bytes | None = None) -> UnwrapWebhookEvent: + try: + from standardwebhooks import Webhook + except ImportError as exc: + raise IncreaseError("You need to install `increase[webhooks]` to use this method") from exc + + if key is None: + key = self._client.webhook_secret + if key is None: + raise ValueError( + "Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument" + ) + + if not isinstance(headers, dict): + headers = dict(headers) + + Webhook(key).verify(payload, headers) + + return cast( + UnwrapWebhookEvent, + construct_type( + type_=UnwrapWebhookEvent, + value=json.loads(payload), + ), + ) + class EventsResourceWithRawResponse: def __init__(self, events: EventsResource) -> None: diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 101cba4be..3793ea83f 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -4,8 +4,10 @@ import os from typing import Any, cast +from datetime import datetime, timezone import pytest +import standardwebhooks from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type @@ -98,6 +100,34 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + def test_method_unwrap(self, client: Increase) -> None: + key = b"secret" + hook = standardwebhooks.Webhook(key) + + data = """{}""" + msg_id = "1" + timestamp = datetime.now(tz=timezone.utc) + sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data) + headers = { + "webhook-id": msg_id, + "webhook-timestamp": str(int(timestamp.timestamp())), + "webhook-signature": sig, + } + + try: + _ = client.events.unwrap(data, headers=headers, key=key) + except standardwebhooks.WebhookVerificationError as e: + raise AssertionError("Failed to unwrap valid webhook") from e + + bad_headers = [ + {**headers, "webhook-signature": hook.sign(msg_id=msg_id, timestamp=timestamp, data="xxx")}, + {**headers, "webhook-id": "bad"}, + {**headers, "webhook-timestamp": "0"}, + ] + for bad_header in bad_headers: + with pytest.raises(standardwebhooks.WebhookVerificationError): + _ = client.events.unwrap(data, headers=bad_header, key=key) + class TestAsyncEvents: parametrize = pytest.mark.parametrize( @@ -182,3 +212,31 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[Event], event, path=["response"]) assert cast(Any, response.is_closed) is True + + def test_method_unwrap(self, client: Increase) -> None: + key = b"secret" + hook = standardwebhooks.Webhook(key) + + data = """{}""" + msg_id = "1" + timestamp = datetime.now(tz=timezone.utc) + sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data) + headers = { + "webhook-id": msg_id, + "webhook-timestamp": str(int(timestamp.timestamp())), + "webhook-signature": sig, + } + + try: + _ = client.events.unwrap(data, headers=headers, key=key) + except standardwebhooks.WebhookVerificationError as e: + raise AssertionError("Failed to unwrap valid webhook") from e + + bad_headers = [ + {**headers, "webhook-signature": hook.sign(msg_id=msg_id, timestamp=timestamp, data="xxx")}, + {**headers, "webhook-id": "bad"}, + {**headers, "webhook-timestamp": "0"}, + ] + for bad_header in bad_headers: + with pytest.raises(standardwebhooks.WebhookVerificationError): + _ = client.events.unwrap(data, headers=bad_header, key=key) From 9a08b61859259069945fb78b40da065a7d01e250 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 17:20:00 +0000 Subject: [PATCH 1094/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 55843fe6f..47f8c5047 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a559a6a1a1f3781fad8db5bcb96c40b69a78b952d659395840accce782098e0c.yml openapi_spec_hash: 2ae62041468e5cf6fe653d65b1b7a58a -config_hash: 3ccb2793be25ae0b15e05dc9ef5da09c +config_hash: 27e44ed36b9c5617b580ead7231a594a From a919f8cda9b29380221dc1af2f0d0e614ef3c9b1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 16 Jan 2026 18:35:43 +0000 Subject: [PATCH 1095/1325] chore(internal): update `actions/checkout` version --- .github/workflows/ci.yml | 6 +++--- .github/workflows/publish-pypi.yml | 2 +- .github/workflows/release-doctor.yml | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e5bc9245f..b1aada1ee 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rye run: | @@ -44,7 +44,7 @@ jobs: id-token: write runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rye run: | @@ -81,7 +81,7 @@ jobs: runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} if: github.event_name == 'push' || github.event.pull_request.head.repo.fork steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rye run: | diff --git a/.github/workflows/publish-pypi.yml b/.github/workflows/publish-pypi.yml index 10c23f798..6140ad043 100644 --- a/.github/workflows/publish-pypi.yml +++ b/.github/workflows/publish-pypi.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Install Rye run: | diff --git a/.github/workflows/release-doctor.yml b/.github/workflows/release-doctor.yml index 6ef88fffb..ecb8ea851 100644 --- a/.github/workflows/release-doctor.yml +++ b/.github/workflows/release-doctor.yml @@ -12,7 +12,7 @@ jobs: if: github.repository == 'Increase/increase-python' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch' || startsWith(github.head_ref, 'release-please') || github.head_ref == 'next') steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - name: Check release environment run: | From 055d963039ca5cdee5d1feb9c749c15b3fbb8a92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 20 Jan 2026 23:56:18 +0000 Subject: [PATCH 1096/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 47f8c5047..d6535e996 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a559a6a1a1f3781fad8db5bcb96c40b69a78b952d659395840accce782098e0c.yml -openapi_spec_hash: 2ae62041468e5cf6fe653d65b1b7a58a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eee80cbe3a2fffb5dcd24ddddd45ee10e1e927251bceb71e136a1f948fbac1f3.yml +openapi_spec_hash: 4edce356e3d758a5b084e97875bd18f2 config_hash: 27e44ed36b9c5617b580ead7231a594a From 557e7d7a6fe0c50f8a586ce1678c51e1b87da1e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 21 Jan 2026 15:07:41 +0000 Subject: [PATCH 1097/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/event_subscriptions.py | 8 ++++++++ src/increase/types/check_transfer.py | 17 +---------------- src/increase/types/event.py | 4 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 4 ++++ .../types/event_subscription_create_params.py | 4 ++++ 7 files changed, 25 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index d6535e996..30af6c775 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-eee80cbe3a2fffb5dcd24ddddd45ee10e1e927251bceb71e136a1f948fbac1f3.yml -openapi_spec_hash: 4edce356e3d758a5b084e97875bd18f2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6726a464abac2e26549c692dba99ba448d4e8c8761df6b395ad50b348aa25a26.yml +openapi_spec_hash: 275356a13559aed985c8c5c67b819d7d config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index a732bbfce..c5b856b90 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -130,6 +130,8 @@ def create( "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", @@ -292,6 +294,8 @@ def create( created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. - `program.created` - Occurs whenever a Program is created. - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of @@ -624,6 +628,8 @@ async def create( "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", @@ -786,6 +792,8 @@ async def create( created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. - `program.created` - Occurs whenever a Program is created. - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 8a192cfb2..7943ae4d4 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -349,21 +349,6 @@ class SubmissionSubmittedAddress(BaseModel): class Submission(BaseModel): """After the transfer is submitted, this will contain supplemental details.""" - address_correction_action: Literal["none", "standardization", "standardization_with_address_change", "error"] - """ - Per USPS requirements, Increase will standardize the address to USPS standards - and check it against the USPS National Change of Address (NCOA) database before - mailing it. This indicates what modifications, if any, were made to the address - before printing and mailing the check. - - - `none` - No address correction took place. - - `standardization` - The address was standardized. - - `standardization_with_address_change` - The address was first standardized and - then changed because the recipient moved. - - `error` - An error occurred while correcting the address. This typically means - the USPS could not find that address. The address was not changed. - """ - submitted_address: SubmissionSubmittedAddress """The address we submitted to the printer. @@ -371,7 +356,7 @@ class Submission(BaseModel): """ submitted_at: datetime - """When this check transfer was submitted to our check printer.""" + """When this check was submitted to our check printer.""" if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 906307e02..d38bc0f84 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -104,6 +104,8 @@ class Event(BaseModel): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", @@ -248,6 +250,8 @@ class Event(BaseModel): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. - `program.created` - Occurs whenever a Program is created. - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index d26640c14..2b7f7a73a 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -114,6 +114,8 @@ class EventListParams(TypedDict, total=False): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 488fc5a44..fa0949949 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -117,6 +117,8 @@ class EventSubscription(BaseModel): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", @@ -261,6 +263,8 @@ class EventSubscription(BaseModel): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. - `program.created` - Occurs whenever a Program is created. - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 46a68ffe5..92e59e8a4 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -98,6 +98,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "physical_card.updated", "physical_card_profile.created", "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", "program.created", "program.updated", "proof_of_authorization_request.created", @@ -241,6 +243,8 @@ class EventSubscriptionCreateParams(TypedDict, total=False): created. - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. - `program.created` - Occurs whenever a Program is created. - `program.updated` - Occurs whenever a Program is updated. - `proof_of_authorization_request.created` - Occurs whenever a Proof of From 6ec828c9988bc13af285ade7939c553223634234 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 22 Jan 2026 20:37:39 +0000 Subject: [PATCH 1098/1325] feat(api): api update --- .stats.yml | 4 ++-- .../simulations/inbound_check_deposits.py | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 30af6c775..d6295fc7b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6726a464abac2e26549c692dba99ba448d4e8c8761df6b395ad50b348aa25a26.yml -openapi_spec_hash: 275356a13559aed985c8c5c67b819d7d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4df3552a635fafa2af8caa70f7daed96996b4263da92fb96e03cbf3c1b4931b4.yml +openapi_spec_hash: 77a141ca0b0c00f8117cea15374a734d config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index 3eb460566..f91e761dc 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -62,10 +62,10 @@ def create( This imitates someone depositing a check at their bank that was issued from your account. It may or - may not be associated with a Check Transfer. Increase will evaluate the Check - Deposit as we would in production and either create a Transaction or a Declined - Transaction as a result. You can inspect the resulting Inbound Check Deposit - object to see the result. + may not be associated with a Check Transfer. Increase will evaluate the Inbound + Check Deposit as we would in production and either create a Transaction or a + Declined Transaction as a result. You can inspect the resulting Inbound Check + Deposit object to see the result. Args: account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. @@ -155,10 +155,10 @@ async def create( This imitates someone depositing a check at their bank that was issued from your account. It may or - may not be associated with a Check Transfer. Increase will evaluate the Check - Deposit as we would in production and either create a Transaction or a Declined - Transaction as a result. You can inspect the resulting Inbound Check Deposit - object to see the result. + may not be associated with a Check Transfer. Increase will evaluate the Inbound + Check Deposit as we would in production and either create a Transaction or a + Declined Transaction as a result. You can inspect the resulting Inbound Check + Deposit object to see the result. Args: account_number_id: The identifier of the Account Number the Inbound Check Deposit will be against. From 46a499e172f326d160d0418ea161387aaf7abb3b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 05:43:57 +0000 Subject: [PATCH 1099/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_transfer.py | 28 ++++++++++++++++++++-------- 2 files changed, 22 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index d6295fc7b..458c6d830 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4df3552a635fafa2af8caa70f7daed96996b4263da92fb96e03cbf3c1b4931b4.yml -openapi_spec_hash: 77a141ca0b0c00f8117cea15374a734d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc66158bcd1307d07051dcfd43d73dad380a7d8eb637620b21ff4a59e6073b68.yml +openapi_spec_hash: add50aa92e44e568b1efa8dba7bdb2d5 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index 7943ae4d4..f9894a05b 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -114,20 +114,23 @@ class Mailing(BaseModel): If the check has been mailed by Increase, this will contain details of the shipment. """ - image_id: Optional[str] = None - """ - The ID of the file corresponding to an image of the check that was mailed, if - available. - """ - mailed_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which the check was mailed. """ - tracking_number: Optional[str] = None - """The tracking number of the shipment, if available for the shipping method.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] class PhysicalCheckMailingAddress(BaseModel): @@ -349,6 +352,12 @@ class SubmissionSubmittedAddress(BaseModel): class Submission(BaseModel): """After the transfer is submitted, this will contain supplemental details.""" + preview_file_id: Optional[str] = None + """ + The ID of the file corresponding to an image of the check that was mailed, if + available. + """ + submitted_address: SubmissionSubmittedAddress """The address we submitted to the printer. @@ -358,6 +367,9 @@ class Submission(BaseModel): submitted_at: datetime """When this check was submitted to our check printer.""" + tracking_number: Optional[str] = None + """The tracking number for the check shipment.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. From 5e136042ca1209d0e7a8e1e3077b7e40ef3d088e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:03:05 +0000 Subject: [PATCH 1100/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/digital_wallet_token.py | 15 ++++++++++++++- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 458c6d830..123549fcd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc66158bcd1307d07051dcfd43d73dad380a7d8eb637620b21ff4a59e6073b68.yml -openapi_spec_hash: add50aa92e44e568b1efa8dba7bdb2d5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-df015666c8d57cf91d4239bffeb549736581af5653e0ec2cd94357c434975e31.yml +openapi_spec_hash: fceca44f4bd5f5f8fdbbaa6c80fc0410 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/digital_wallet_token.py b/src/increase/types/digital_wallet_token.py index 7fd051f3d..83fb5ed2f 100644 --- a/src/increase/types/digital_wallet_token.py +++ b/src/increase/types/digital_wallet_token.py @@ -6,7 +6,7 @@ from .._models import BaseModel -__all__ = ["DigitalWalletToken", "Cardholder", "Device", "Update"] +__all__ = ["DigitalWalletToken", "Cardholder", "Device", "DynamicPrimaryAccountNumber", "Update"] class Cardholder(BaseModel): @@ -55,6 +55,16 @@ class Device(BaseModel): """Name of the device, for example "My Work Phone".""" +class DynamicPrimaryAccountNumber(BaseModel): + """The redacted Dynamic Primary Account Number.""" + + first6: str + """The first 6 digits of the token's Dynamic Primary Account Number.""" + + last4: str + """The last 4 digits of the token's Dynamic Primary Account Number.""" + + class Update(BaseModel): status: Literal["active", "inactive", "suspended", "deactivated"] """The status the update changed this Digital Wallet Token to. @@ -96,6 +106,9 @@ class DigitalWalletToken(BaseModel): device: Device """The device that was used to create the Digital Wallet Token.""" + dynamic_primary_account_number: Optional[DynamicPrimaryAccountNumber] = None + """The redacted Dynamic Primary Account Number.""" + status: Literal["active", "inactive", "suspended", "deactivated"] """This indicates if payments can be made with the Digital Wallet Token. From fd8c068a2d1384ff1f971fa1bd4590d8b1f9b132 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 18:41:28 +0000 Subject: [PATCH 1101/1325] chore(internal): codegen related update --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b1aada1ee..459c12817 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,7 +63,7 @@ jobs: - name: Get GitHub OIDC Token if: github.repository == 'stainless-sdks/increase-python' id: github-oidc - uses: actions/github-script@v6 + uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); From 1ced5d42feeb8bf47d54c80053afb2bb15b43e9b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 23 Jan 2026 20:05:20 +0000 Subject: [PATCH 1102/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/__init__.py | 1 + src/increase/types/unwrap_webhook_event.py | 301 +++++++++++++++++++++ tests/api_resources/test_events.py | 4 +- 4 files changed, 306 insertions(+), 4 deletions(-) create mode 100644 src/increase/types/unwrap_webhook_event.py diff --git a/.stats.yml b/.stats.yml index 123549fcd..aad7cba8f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-df015666c8d57cf91d4239bffeb549736581af5653e0ec2cd94357c434975e31.yml -openapi_spec_hash: fceca44f4bd5f5f8fdbbaa6c80fc0410 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a3093fde00ba57a88035a89fca1627e3343e5c6cba2854ee6ebf8bac9640489.yml +openapi_spec_hash: 547e0e84b0d09880a8305ddac57cc44a config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 492df7108..2c8576668 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -62,6 +62,7 @@ from .entity_update_params import EntityUpdateParams as EntityUpdateParams from .export_create_params import ExportCreateParams as ExportCreateParams from .inbound_ach_transfer import InboundACHTransfer as InboundACHTransfer +from .unwrap_webhook_event import UnwrapWebhookEvent as UnwrapWebhookEvent from .account_create_params import AccountCreateParams as AccountCreateParams from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet diff --git a/src/increase/types/unwrap_webhook_event.py b/src/increase/types/unwrap_webhook_event.py new file mode 100644 index 000000000..d500622fa --- /dev/null +++ b/src/increase/types/unwrap_webhook_event.py @@ -0,0 +1,301 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["UnwrapWebhookEvent"] + + +class UnwrapWebhookEvent(BaseModel): + """Events are records of things that happened to objects at Increase. + + Events are accessible via the List Events endpoint and can be delivered to your application via webhooks. For more information, see our [webhooks guide](https://increase.com/documentation/webhooks). + """ + + id: str + """The Event identifier.""" + + associated_object_id: str + """The identifier of the object that generated this Event.""" + + associated_object_type: str + """The type of the object that generated this Event.""" + + category: Literal[ + "account.created", + "account.updated", + "account_number.created", + "account_number.updated", + "account_statement.created", + "account_transfer.created", + "account_transfer.updated", + "ach_prenotification.created", + "ach_prenotification.updated", + "ach_transfer.created", + "ach_transfer.updated", + "bookkeeping_account.created", + "bookkeeping_account.updated", + "bookkeeping_entry_set.updated", + "card.created", + "card.updated", + "card_payment.created", + "card_payment.updated", + "card_profile.created", + "card_profile.updated", + "card_dispute.created", + "card_dispute.updated", + "check_deposit.created", + "check_deposit.updated", + "check_transfer.created", + "check_transfer.updated", + "declined_transaction.created", + "digital_card_profile.created", + "digital_card_profile.updated", + "digital_wallet_token.created", + "digital_wallet_token.updated", + "document.created", + "entity.created", + "entity.updated", + "event_subscription.created", + "event_subscription.updated", + "export.created", + "export.updated", + "external_account.created", + "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", + "file.created", + "group.updated", + "group.heartbeat", + "inbound_ach_transfer.created", + "inbound_ach_transfer.updated", + "inbound_ach_transfer_return.created", + "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", + "inbound_wire_drawdown_request.created", + "inbound_wire_transfer.created", + "inbound_wire_transfer.updated", + "intrafi_account_enrollment.created", + "intrafi_account_enrollment.updated", + "intrafi_exclusion.created", + "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", + "lockbox.created", + "lockbox.updated", + "oauth_connection.created", + "oauth_connection.deactivated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", + "pending_transaction.created", + "pending_transaction.updated", + "physical_card.created", + "physical_card.updated", + "physical_card_profile.created", + "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", + "program.created", + "program.updated", + "proof_of_authorization_request.created", + "proof_of_authorization_request.updated", + "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", + "real_time_decision.digital_wallet_token_requested", + "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", + "real_time_payments_transfer.created", + "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", + "wire_transfer.created", + "wire_transfer.updated", + ] + """The category of the Event. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `account.created` - Occurs whenever an Account is created. + - `account.updated` - Occurs whenever an Account is updated. + - `account_number.created` - Occurs whenever an Account Number is created. + - `account_number.updated` - Occurs whenever an Account Number is updated. + - `account_statement.created` - Occurs whenever an Account Statement is created. + - `account_transfer.created` - Occurs whenever an Account Transfer is created. + - `account_transfer.updated` - Occurs whenever an Account Transfer is updated. + - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is + created. + - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is + updated. + - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. + - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is + created. + - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is + updated. + - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is + created. + - `card.created` - Occurs whenever a Card is created. + - `card.updated` - Occurs whenever a Card is updated. + - `card_payment.created` - Occurs whenever a Card Payment is created. + - `card_payment.updated` - Occurs whenever a Card Payment is updated. + - `card_profile.created` - Occurs whenever a Card Profile is created. + - `card_profile.updated` - Occurs whenever a Card Profile is updated. + - `card_dispute.created` - Occurs whenever a Card Dispute is created. + - `card_dispute.updated` - Occurs whenever a Card Dispute is updated. + - `check_deposit.created` - Occurs whenever a Check Deposit is created. + - `check_deposit.updated` - Occurs whenever a Check Deposit is updated. + - `check_transfer.created` - Occurs whenever a Check Transfer is created. + - `check_transfer.updated` - Occurs whenever a Check Transfer is updated. + - `declined_transaction.created` - Occurs whenever a Declined Transaction is + created. + - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is + created. + - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is + updated. + - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is + created. + - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is + updated. + - `document.created` - Occurs whenever a Document is created. + - `entity.created` - Occurs whenever an Entity is created. + - `entity.updated` - Occurs whenever an Entity is updated. + - `event_subscription.created` - Occurs whenever an Event Subscription is + created. + - `event_subscription.updated` - Occurs whenever an Event Subscription is + updated. + - `export.created` - Occurs whenever an Export is created. + - `export.updated` - Occurs whenever an Export is updated. + - `external_account.created` - Occurs whenever an External Account is created. + - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. + - `file.created` - Occurs whenever a File is created. + - `group.updated` - Occurs whenever a Group is updated. + - `group.heartbeat` - Increase may send webhooks with this category to see if a + webhook endpoint is working properly. + - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is + created. + - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is + updated. + - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH + Transfer Return is created. + - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH + Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. + - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire + Drawdown Request is created. + - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is + created. + - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is + updated. + - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account + Enrollment is created. + - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account + Enrollment is updated. + - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. + - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. + - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. + - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is + deactivated. + - `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 + updated. + - `physical_card.created` - Occurs whenever a Physical Card is created. + - `physical_card.updated` - Occurs whenever a Physical Card is updated. + - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is + created. + - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is + updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. + - `proof_of_authorization_request.created` - Occurs whenever a Proof of + Authorization Request is created. + - `proof_of_authorization_request.updated` - Occurs whenever a Proof of + Authorization Request is updated. + - `real_time_decision.card_authorization_requested` - Occurs whenever a + Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. + - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a + Real-Time Decision is created in response to a digital wallet provisioning + attempt. + - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever + a Real-Time Decision is created in response to a digital wallet requiring + two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. + - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments + Transfer is created. + - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments + Transfer is updated. + - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time + 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. + - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is + updated. + - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. + - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. + """ + + created_at: datetime + """The time the Event was created.""" + + type: Literal["event"] + """A constant representing the object's type. + + For this resource it will always be `event`. + """ diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 3793ea83f..30f99545f 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -104,7 +104,7 @@ def test_method_unwrap(self, client: Increase) -> None: key = b"secret" hook = standardwebhooks.Webhook(key) - data = """{}""" + data = """{"id":"event_001dzz0r20rzr4zrhrr1364hy80","associated_object_id":"account_in71c4amph0vgo2qllky","associated_object_type":"account","category":"account.created","created_at":"2020-01-31T23:59:59Z","type":"event"}""" msg_id = "1" timestamp = datetime.now(tz=timezone.utc) sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data) @@ -217,7 +217,7 @@ def test_method_unwrap(self, client: Increase) -> None: key = b"secret" hook = standardwebhooks.Webhook(key) - data = """{}""" + data = """{"id":"event_001dzz0r20rzr4zrhrr1364hy80","associated_object_id":"account_in71c4amph0vgo2qllky","associated_object_type":"account","category":"account.created","created_at":"2020-01-31T23:59:59Z","type":"event"}""" msg_id = "1" timestamp = datetime.now(tz=timezone.utc) sig = hook.sign(msg_id=msg_id, timestamp=timestamp, data=data) From d67ee10d75f43042f138eb66d34139a593d5a2ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 19:53:14 +0000 Subject: [PATCH 1103/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index aad7cba8f..79423d31f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a3093fde00ba57a88035a89fca1627e3343e5c6cba2854ee6ebf8bac9640489.yml -openapi_spec_hash: 547e0e84b0d09880a8305ddac57cc44a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8c14214fe620b72e4667dc96bab3be38311397f63ee477fed5138ba3a61d101b.yml +openapi_spec_hash: 0bc956c12e8c8bb14c1002fb4618a214 config_hash: 27e44ed36b9c5617b580ead7231a594a From 18cc6be286f7630a888e2455b8eef096843a67a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 26 Jan 2026 23:58:47 +0000 Subject: [PATCH 1104/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/inbound_check_deposits.py | 4 ++++ src/increase/types/inbound_check_deposit.py | 2 ++ src/increase/types/inbound_check_deposit_return_params.py | 2 ++ 4 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 79423d31f..88866e5d5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8c14214fe620b72e4667dc96bab3be38311397f63ee477fed5138ba3a61d101b.yml -openapi_spec_hash: 0bc956c12e8c8bb14c1002fb4618a214 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-742384c2f763b7fb4e6534ac57539f4f1854d9bd126ea173f3caeffdf1642462.yml +openapi_spec_hash: 49897b127960069cd3fe917475ad4b5b config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 4337bcd62..0a924f241 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -194,6 +194,7 @@ def return_( "duplicate_presentment", "endorsement_missing", "endorsement_irregular", + "refer_to_maker", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -216,6 +217,7 @@ def return_( - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. - `endorsement_irregular` - The check was not endorsed by the payee. + - `refer_to_maker` - The maker of the check requested its return. extra_headers: Send extra headers @@ -417,6 +419,7 @@ async def return_( "duplicate_presentment", "endorsement_missing", "endorsement_irregular", + "refer_to_maker", ], # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -439,6 +442,7 @@ async def return_( - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. - `endorsement_irregular` - The check was not endorsed by the payee. + - `refer_to_maker` - The maker of the check requested its return. extra_headers: Send extra headers diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index 0e715e1a3..d77515925 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -46,6 +46,7 @@ class DepositReturn(BaseModel): "duplicate_presentment", "endorsement_missing", "endorsement_irregular", + "refer_to_maker", ] """The reason the deposit was returned. @@ -54,6 +55,7 @@ class DepositReturn(BaseModel): - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. - `endorsement_irregular` - The check was not endorsed by the payee. + - `refer_to_maker` - The maker of the check requested its return. """ returned_at: datetime diff --git a/src/increase/types/inbound_check_deposit_return_params.py b/src/increase/types/inbound_check_deposit_return_params.py index 0ca8f79f8..b47aaf81b 100644 --- a/src/increase/types/inbound_check_deposit_return_params.py +++ b/src/increase/types/inbound_check_deposit_return_params.py @@ -15,6 +15,7 @@ class InboundCheckDepositReturnParams(TypedDict, total=False): "duplicate_presentment", "endorsement_missing", "endorsement_irregular", + "refer_to_maker", ] ] """The reason to return the Inbound Check Deposit. @@ -24,4 +25,5 @@ class InboundCheckDepositReturnParams(TypedDict, total=False): - `duplicate_presentment` - The check was a duplicate presentment. - `endorsement_missing` - The check was not endorsed. - `endorsement_irregular` - The check was not endorsed by the payee. + - `refer_to_maker` - The maker of the check requested its return. """ From 4de5bd8f7cb889b0c504d92b0a5a9d240ace5f49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 13:41:31 +0000 Subject: [PATCH 1105/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/transaction.py | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 88866e5d5..137c59756 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-742384c2f763b7fb4e6534ac57539f4f1854d9bd126ea173f3caeffdf1642462.yml -openapi_spec_hash: 49897b127960069cd3fe917475ad4b5b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a68a396e3cad9ebb243cb823e58ccd61bf7eff388039ba3dd3a09ae72efc92.yml +openapi_spec_hash: 4079f070e677e7b39205cfbe8c5d7637 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 05c14c2b5..347a910e3 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -3412,6 +3412,7 @@ class SourceInternalSource(BaseModel): "error", "error_correction", "fees", + "general_ledger_transfer", "interest", "negative_balance_forgiveness", "sample_funds", @@ -3434,6 +3435,7 @@ class SourceInternalSource(BaseModel): - `error` - Error - `error_correction` - Error correction - `fees` - Fees + - `general_ledger_transfer` - General ledger transfer - `interest` - Interest - `negative_balance_forgiveness` - Negative balance forgiveness - `sample_funds` - Sample funds From bef42fc2207fe9188d062311fc0007ef9fad20b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 27 Jan 2026 22:50:15 +0000 Subject: [PATCH 1106/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 85 ++++++++++++++++++++++ src/increase/types/declined_transaction.py | 17 +++++ src/increase/types/pending_transaction.py | 17 +++++ src/increase/types/real_time_decision.py | 34 +++++++++ src/increase/types/transaction.py | 17 +++++ 6 files changed, 172 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 137c59756..fd48d4fba 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e0a68a396e3cad9ebb243cb823e58ccd61bf7eff388039ba3dd3a09ae72efc92.yml -openapi_spec_hash: 4079f070e677e7b39205cfbe8c5d7637 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml +openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index ad45d6e3a..f82260f8a 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -33,6 +33,7 @@ "ElementCardAuthorizationVerification", "ElementCardAuthorizationVerificationCardVerificationCode", "ElementCardAuthorizationVerificationCardholderAddress", + "ElementCardAuthorizationVerificationCardholderName", "ElementCardAuthorizationExpiration", "ElementCardBalanceInquiry", "ElementCardBalanceInquiryAdditionalAmounts", @@ -53,6 +54,7 @@ "ElementCardBalanceInquiryVerification", "ElementCardBalanceInquiryVerificationCardVerificationCode", "ElementCardBalanceInquiryVerificationCardholderAddress", + "ElementCardBalanceInquiryVerificationCardholderName", "ElementCardDecline", "ElementCardDeclineAdditionalAmounts", "ElementCardDeclineAdditionalAmountsClinic", @@ -72,6 +74,7 @@ "ElementCardDeclineVerification", "ElementCardDeclineVerificationCardVerificationCode", "ElementCardDeclineVerificationCardholderAddress", + "ElementCardDeclineVerificationCardholderName", "ElementCardFinancial", "ElementCardFinancialAdditionalAmounts", "ElementCardFinancialAdditionalAmountsClinic", @@ -91,6 +94,7 @@ "ElementCardFinancialVerification", "ElementCardFinancialVerificationCardVerificationCode", "ElementCardFinancialVerificationCardholderAddress", + "ElementCardFinancialVerificationCardholderName", "ElementCardFuelConfirmation", "ElementCardFuelConfirmationNetworkIdentifiers", "ElementCardIncrement", @@ -150,6 +154,7 @@ "ElementCardValidationVerification", "ElementCardValidationVerificationCardVerificationCode", "ElementCardValidationVerificationCardholderAddress", + "ElementCardValidationVerificationCardholderName", "ElementOther", "State", ] @@ -781,6 +786,19 @@ class ElementCardAuthorizationVerificationCardholderAddress(BaseModel): """ +class ElementCardAuthorizationVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class ElementCardAuthorizationVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -796,6 +814,9 @@ class ElementCardAuthorizationVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[ElementCardAuthorizationVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class ElementCardAuthorization(BaseModel): """A Card Authorization object. @@ -1490,6 +1511,19 @@ class ElementCardBalanceInquiryVerificationCardholderAddress(BaseModel): """ +class ElementCardBalanceInquiryVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class ElementCardBalanceInquiryVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -1505,6 +1539,9 @@ class ElementCardBalanceInquiryVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[ElementCardBalanceInquiryVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class ElementCardBalanceInquiry(BaseModel): """A Card Balance Inquiry object. @@ -2070,6 +2107,19 @@ class ElementCardDeclineVerificationCardholderAddress(BaseModel): """ +class ElementCardDeclineVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class ElementCardDeclineVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -2085,6 +2135,9 @@ class ElementCardDeclineVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[ElementCardDeclineVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class ElementCardDecline(BaseModel): """A Card Decline object. @@ -2806,6 +2859,19 @@ class ElementCardFinancialVerificationCardholderAddress(BaseModel): """ +class ElementCardFinancialVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class ElementCardFinancialVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -2821,6 +2887,9 @@ class ElementCardFinancialVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[ElementCardFinancialVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class ElementCardFinancial(BaseModel): """A Card Financial object. @@ -5271,6 +5340,19 @@ class ElementCardValidationVerificationCardholderAddress(BaseModel): """ +class ElementCardValidationVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class ElementCardValidationVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -5286,6 +5368,9 @@ class ElementCardValidationVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[ElementCardValidationVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class ElementCardValidation(BaseModel): """An Inbound Card Validation object. diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index e37adcfa9..04143eaef 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -31,6 +31,7 @@ "SourceCardDeclineVerification", "SourceCardDeclineVerificationCardVerificationCode", "SourceCardDeclineVerificationCardholderAddress", + "SourceCardDeclineVerificationCardholderName", "SourceCheckDecline", "SourceCheckDepositRejection", "SourceInboundFednowTransferDecline", @@ -584,6 +585,19 @@ class SourceCardDeclineVerificationCardholderAddress(BaseModel): """ +class SourceCardDeclineVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class SourceCardDeclineVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -599,6 +613,9 @@ class SourceCardDeclineVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[SourceCardDeclineVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class SourceCardDecline(BaseModel): """A Card Decline object. diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index aba8ee0eb..1f20a4535 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -32,6 +32,7 @@ "SourceCardAuthorizationVerification", "SourceCardAuthorizationVerificationCardVerificationCode", "SourceCardAuthorizationVerificationCardholderAddress", + "SourceCardAuthorizationVerificationCardholderName", "SourceCardPushTransferInstruction", "SourceCheckDepositInstruction", "SourceCheckTransferInstruction", @@ -546,6 +547,19 @@ class SourceCardAuthorizationVerificationCardholderAddress(BaseModel): """ +class SourceCardAuthorizationVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class SourceCardAuthorizationVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -561,6 +575,9 @@ class SourceCardAuthorizationVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[SourceCardAuthorizationVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class SourceCardAuthorization(BaseModel): """A Card Authorization object. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 5d891ca4d..af9fcf654 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -36,6 +36,7 @@ "CardAuthorizationVerification", "CardAuthorizationVerificationCardVerificationCode", "CardAuthorizationVerificationCardholderAddress", + "CardAuthorizationVerificationCardholderName", "CardBalanceInquiry", "CardBalanceInquiryAdditionalAmounts", "CardBalanceInquiryAdditionalAmountsClinic", @@ -56,6 +57,7 @@ "CardBalanceInquiryVerification", "CardBalanceInquiryVerificationCardVerificationCode", "CardBalanceInquiryVerificationCardholderAddress", + "CardBalanceInquiryVerificationCardholderName", "DigitalWalletAuthentication", "DigitalWalletToken", "DigitalWalletTokenDevice", @@ -638,6 +640,19 @@ class CardAuthorizationVerificationCardholderAddress(BaseModel): """ +class CardAuthorizationVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class CardAuthorizationVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -653,6 +668,9 @@ class CardAuthorizationVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[CardAuthorizationVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class CardAuthorization(BaseModel): """Fields related to a card authorization.""" @@ -1310,6 +1328,19 @@ class CardBalanceInquiryVerificationCardholderAddress(BaseModel): """ +class CardBalanceInquiryVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class CardBalanceInquiryVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -1325,6 +1356,9 @@ class CardBalanceInquiryVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[CardBalanceInquiryVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class CardBalanceInquiry(BaseModel): """Fields related to a card balance inquiry.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 347a910e3..bdf234fde 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -39,6 +39,7 @@ "SourceCardFinancialVerification", "SourceCardFinancialVerificationCardVerificationCode", "SourceCardFinancialVerificationCardholderAddress", + "SourceCardFinancialVerificationCardholderName", "SourceCardPushTransferAcceptance", "SourceCardRefund", "SourceCardRefundCashback", @@ -1071,6 +1072,19 @@ class SourceCardFinancialVerificationCardholderAddress(BaseModel): """ +class SourceCardFinancialVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + class SourceCardFinancialVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" @@ -1086,6 +1100,9 @@ class SourceCardFinancialVerification(BaseModel): we verified it against. """ + cardholder_name: Optional[SourceCardFinancialVerificationCardholderName] = None + """Cardholder name provided in the authorization request.""" + class SourceCardFinancial(BaseModel): """A Card Financial object. From 432fa521537b36f5d6c09ed94a988c4cabd2627a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 23:22:36 +0000 Subject: [PATCH 1107/1325] feat(api): api update --- .stats.yml | 4 +-- api.md | 2 +- src/increase/resources/card_disputes.py | 17 +++++++++- src/increase/types/__init__.py | 1 + src/increase/types/card_dispute.py | 16 ++++++++++ .../types/card_dispute_withdraw_params.py | 12 +++++++ tests/api_resources/test_card_disputes.py | 32 ++++++++++++++----- 7 files changed, 72 insertions(+), 12 deletions(-) create mode 100644 src/increase/types/card_dispute_withdraw_params.py diff --git a/.stats.yml b/.stats.yml index fd48d4fba..87e086700 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-92af5c57fac9c88bad16079e7b437371720d00c368fd4eea5987f94b25855fcb.yml -openapi_spec_hash: 7831d7cdab2d8972f5193916c617c9a2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a822d0695f48967e594a88eef888b826cd51b62959bd4b3d0163b7d010bab969.yml +openapi_spec_hash: 95ea277ed84c04aefd25bcb63ae4e2e5 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/api.md b/api.md index 2a8b62be1..f0337a3ec 100644 --- a/api.md +++ b/api.md @@ -104,7 +104,7 @@ Methods: - client.card_disputes.retrieve(card_dispute_id) -> CardDispute - client.card_disputes.list(\*\*params) -> SyncPage[CardDispute] - client.card_disputes.submit_user_submission(card_dispute_id, \*\*params) -> CardDispute -- client.card_disputes.withdraw(card_dispute_id) -> CardDispute +- client.card_disputes.withdraw(card_dispute_id, \*\*params) -> CardDispute # PhysicalCards diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index f5aea9266..bfdbc27e1 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -7,7 +7,12 @@ import httpx -from ..types import card_dispute_list_params, card_dispute_create_params, card_dispute_submit_user_submission_params +from ..types import ( + card_dispute_list_params, + card_dispute_create_params, + card_dispute_withdraw_params, + card_dispute_submit_user_submission_params, +) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -293,6 +298,7 @@ def withdraw( self, card_dispute_id: str, *, + explanation: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -307,6 +313,8 @@ def withdraw( Args: card_dispute_id: The identifier of the Card Dispute to withdraw. + explanation: The explanation for withdrawing the Card Dispute. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -321,6 +329,7 @@ def withdraw( raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return self._post( f"/card_disputes/{card_dispute_id}/withdraw", + body=maybe_transform({"explanation": explanation}, card_dispute_withdraw_params.CardDisputeWithdrawParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -600,6 +609,7 @@ async def withdraw( self, card_dispute_id: str, *, + explanation: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -614,6 +624,8 @@ async def withdraw( Args: card_dispute_id: The identifier of the Card Dispute to withdraw. + explanation: The explanation for withdrawing the Card Dispute. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -628,6 +640,9 @@ async def withdraw( raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return await self._post( f"/card_disputes/{card_dispute_id}/withdraw", + body=await async_maybe_transform( + {"explanation": explanation}, card_dispute_withdraw_params.CardDisputeWithdrawParams + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 2c8576668..dfaf2928c 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -106,6 +106,7 @@ from .account_number_create_params import AccountNumberCreateParams as AccountNumberCreateParams from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams +from .card_dispute_withdraw_params import CardDisputeWithdrawParams as CardDisputeWithdrawParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index adc6f294b..b042c5caa 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -105,6 +105,7 @@ "VisaUserSubmissionUserPrearbitration", "VisaUserSubmissionUserPrearbitrationCategoryChange", "Win", + "Withdrawal", ] @@ -2627,6 +2628,15 @@ class Win(BaseModel): """ +class Withdrawal(BaseModel): + """ + If the Card Dispute has been withdrawn, this will contain details of the withdrawal. + """ + + explanation: Optional[str] = None + """The explanation for the withdrawal of the Card Dispute.""" + + class CardDispute(BaseModel): """ If unauthorized activity occurs on a card, you can create a Card Dispute and we'll work with the card networks to return the funds if appropriate. @@ -2722,3 +2732,9 @@ class CardDispute(BaseModel): If the Card Dispute's status is `won`, this will contain details of the won dispute. """ + + withdrawal: Optional[Withdrawal] = None + """ + If the Card Dispute has been withdrawn, this will contain details of the + withdrawal. + """ diff --git a/src/increase/types/card_dispute_withdraw_params.py b/src/increase/types/card_dispute_withdraw_params.py new file mode 100644 index 000000000..ac79a2e8e --- /dev/null +++ b/src/increase/types/card_dispute_withdraw_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import TypedDict + +__all__ = ["CardDisputeWithdrawParams"] + + +class CardDisputeWithdrawParams(TypedDict, total=False): + explanation: str + """The explanation for withdrawing the Card Dispute.""" diff --git a/tests/api_resources/test_card_disputes.py b/tests/api_resources/test_card_disputes.py index 0ce895086..8557c6742 100644 --- a/tests/api_resources/test_card_disputes.py +++ b/tests/api_resources/test_card_disputes.py @@ -698,14 +698,22 @@ def test_path_params_submit_user_submission(self, client: Increase) -> None: @parametrize def test_method_withdraw(self, client: Increase) -> None: card_dispute = client.card_disputes.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + def test_method_withdraw_with_all_params(self, client: Increase) -> None: + card_dispute = client.card_disputes.withdraw( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + explanation="The explanation for withdrawing the Card Dispute.", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize def test_raw_response_withdraw(self, client: Increase) -> None: response = client.card_disputes.with_raw_response.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", ) assert response.is_closed is True @@ -716,7 +724,7 @@ def test_raw_response_withdraw(self, client: Increase) -> None: @parametrize def test_streaming_response_withdraw(self, client: Increase) -> None: with client.card_disputes.with_streaming_response.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -730,7 +738,7 @@ def test_streaming_response_withdraw(self, client: Increase) -> None: def test_path_params_withdraw(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): client.card_disputes.with_raw_response.withdraw( - "", + card_dispute_id="", ) @@ -1416,14 +1424,22 @@ async def test_path_params_submit_user_submission(self, async_client: AsyncIncre @parametrize async def test_method_withdraw(self, async_client: AsyncIncrease) -> None: card_dispute = await async_client.card_disputes.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + ) + assert_matches_type(CardDispute, card_dispute, path=["response"]) + + @parametrize + async def test_method_withdraw_with_all_params(self, async_client: AsyncIncrease) -> None: + card_dispute = await async_client.card_disputes.withdraw( + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", + explanation="The explanation for withdrawing the Card Dispute.", ) assert_matches_type(CardDispute, card_dispute, path=["response"]) @parametrize async def test_raw_response_withdraw(self, async_client: AsyncIncrease) -> None: response = await async_client.card_disputes.with_raw_response.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", ) assert response.is_closed is True @@ -1434,7 +1450,7 @@ async def test_raw_response_withdraw(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_withdraw(self, async_client: AsyncIncrease) -> None: async with async_client.card_disputes.with_streaming_response.withdraw( - "card_dispute_h9sc95nbl1cgltpp7men", + card_dispute_id="card_dispute_h9sc95nbl1cgltpp7men", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -1448,5 +1464,5 @@ async def test_streaming_response_withdraw(self, async_client: AsyncIncrease) -> async def test_path_params_withdraw(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_dispute_id` but received ''"): await async_client.card_disputes.with_raw_response.withdraw( - "", + card_dispute_id="", ) From db4d7c240e65e7f8fa532e3c935b9bdd05e54f56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 29 Jan 2026 17:01:37 +0000 Subject: [PATCH 1108/1325] feat(client): add custom JSON encoder for extended type support --- src/increase/_base_client.py | 7 +- src/increase/_compat.py | 6 +- src/increase/_utils/_json.py | 35 ++++++++++ tests/test_utils/test_json.py | 126 ++++++++++++++++++++++++++++++++++ 4 files changed, 169 insertions(+), 5 deletions(-) create mode 100644 src/increase/_utils/_json.py create mode 100644 tests/test_utils/test_json.py diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index 056c1532a..aaf20fcf0 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -86,6 +86,7 @@ APIConnectionError, APIResponseValidationError, ) +from ._utils._json import openapi_dumps log: logging.Logger = logging.getLogger(__name__) @@ -554,8 +555,10 @@ def _build_request( kwargs["content"] = options.content elif isinstance(json_data, bytes): kwargs["content"] = json_data - else: - kwargs["json"] = json_data if is_given(json_data) else None + elif not files: + # Don't set content when JSON is sent as multipart/form-data, + # since httpx's content param overrides other body arguments + kwargs["content"] = openapi_dumps(json_data) if is_given(json_data) and json_data is not None else None kwargs["files"] = files else: headers.pop("Content-Type", None) diff --git a/src/increase/_compat.py b/src/increase/_compat.py index bdef67f04..786ff42ad 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -139,6 +139,7 @@ def model_dump( exclude_defaults: bool = False, warnings: bool = True, mode: Literal["json", "python"] = "python", + by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): return model.model_dump( @@ -148,13 +149,12 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, + by_alias=by_alias, ) return cast( "dict[str, Any]", model.dict( # pyright: ignore[reportDeprecated, reportUnnecessaryCast] - exclude=exclude, - exclude_unset=exclude_unset, - exclude_defaults=exclude_defaults, + exclude=exclude, exclude_unset=exclude_unset, exclude_defaults=exclude_defaults, by_alias=bool(by_alias) ), ) diff --git a/src/increase/_utils/_json.py b/src/increase/_utils/_json.py new file mode 100644 index 000000000..60584214a --- /dev/null +++ b/src/increase/_utils/_json.py @@ -0,0 +1,35 @@ +import json +from typing import Any +from datetime import datetime +from typing_extensions import override + +import pydantic + +from .._compat import model_dump + + +def openapi_dumps(obj: Any) -> bytes: + """ + Serialize an object to UTF-8 encoded JSON bytes. + + Extends the standard json.dumps with support for additional types + commonly used in the SDK, such as `datetime`, `pydantic.BaseModel`, etc. + """ + return json.dumps( + obj, + cls=_CustomEncoder, + # Uses the same defaults as httpx's JSON serialization + ensure_ascii=False, + separators=(",", ":"), + allow_nan=False, + ).encode() + + +class _CustomEncoder(json.JSONEncoder): + @override + def default(self, o: Any) -> Any: + if isinstance(o, datetime): + return o.isoformat() + if isinstance(o, pydantic.BaseModel): + return model_dump(o, exclude_unset=True, mode="json", by_alias=True) + return super().default(o) diff --git a/tests/test_utils/test_json.py b/tests/test_utils/test_json.py new file mode 100644 index 000000000..30acb42bc --- /dev/null +++ b/tests/test_utils/test_json.py @@ -0,0 +1,126 @@ +from __future__ import annotations + +import datetime +from typing import Union + +import pydantic + +from increase import _compat +from increase._utils._json import openapi_dumps + + +class TestOpenapiDumps: + def test_basic(self) -> None: + data = {"key": "value", "number": 42} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"key":"value","number":42}' + + def test_datetime_serialization(self) -> None: + dt = datetime.datetime(2023, 1, 1, 12, 0, 0) + data = {"datetime": dt} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"datetime":"2023-01-01T12:00:00"}' + + def test_pydantic_model_serialization(self) -> None: + class User(pydantic.BaseModel): + first_name: str + last_name: str + age: int + + model_instance = User(first_name="John", last_name="Kramer", age=83) + data = {"model": model_instance} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"first_name":"John","last_name":"Kramer","age":83}}' + + def test_pydantic_model_with_default_values(self) -> None: + class User(pydantic.BaseModel): + name: str + role: str = "user" + active: bool = True + score: int = 0 + + model_instance = User(name="Alice") + data = {"model": model_instance} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"name":"Alice"}}' + + def test_pydantic_model_with_default_values_overridden(self) -> None: + class User(pydantic.BaseModel): + name: str + role: str = "user" + active: bool = True + + model_instance = User(name="Bob", role="admin", active=False) + data = {"model": model_instance} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"name":"Bob","role":"admin","active":false}}' + + def test_pydantic_model_with_alias(self) -> None: + class User(pydantic.BaseModel): + first_name: str = pydantic.Field(alias="firstName") + last_name: str = pydantic.Field(alias="lastName") + + model_instance = User(firstName="John", lastName="Doe") + data = {"model": model_instance} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"firstName":"John","lastName":"Doe"}}' + + def test_pydantic_model_with_alias_and_default(self) -> None: + class User(pydantic.BaseModel): + user_name: str = pydantic.Field(alias="userName") + user_role: str = pydantic.Field(default="member", alias="userRole") + is_active: bool = pydantic.Field(default=True, alias="isActive") + + model_instance = User(userName="charlie") + data = {"model": model_instance} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"userName":"charlie"}}' + + model_with_overrides = User(userName="diana", userRole="admin", isActive=False) + data = {"model": model_with_overrides} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"userName":"diana","userRole":"admin","isActive":false}}' + + def test_pydantic_model_with_nested_models_and_defaults(self) -> None: + class Address(pydantic.BaseModel): + street: str + city: str = "Unknown" + + class User(pydantic.BaseModel): + name: str + address: Address + verified: bool = False + + if _compat.PYDANTIC_V1: + # to handle forward references in Pydantic v1 + User.update_forward_refs(**locals()) # type: ignore[reportDeprecated] + + address = Address(street="123 Main St") + user = User(name="Diana", address=address) + data = {"user": user} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"user":{"name":"Diana","address":{"street":"123 Main St"}}}' + + address_with_city = Address(street="456 Oak Ave", city="Boston") + user_verified = User(name="Eve", address=address_with_city, verified=True) + data = {"user": user_verified} + json_bytes = openapi_dumps(data) + assert ( + json_bytes == b'{"user":{"name":"Eve","address":{"street":"456 Oak Ave","city":"Boston"},"verified":true}}' + ) + + def test_pydantic_model_with_optional_fields(self) -> None: + class User(pydantic.BaseModel): + name: str + email: Union[str, None] + phone: Union[str, None] + + model_with_none = User(name="Eve", email=None, phone=None) + data = {"model": model_with_none} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"name":"Eve","email":null,"phone":null}}' + + model_with_values = User(name="Frank", email="frank@example.com", phone=None) + data = {"model": model_with_values} + json_bytes = openapi_dumps(data) + assert json_bytes == b'{"model":{"name":"Frank","email":"frank@example.com","phone":null}}' From 41181b31454dc69878dee797f2e97964963877f5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 03:48:20 +0000 Subject: [PATCH 1109/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/accounts.py | 24 ++------------------- src/increase/types/account_update_params.py | 6 ------ tests/api_resources/test_accounts.py | 2 -- 4 files changed, 4 insertions(+), 32 deletions(-) diff --git a/.stats.yml b/.stats.yml index 87e086700..91752aeff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a822d0695f48967e594a88eef888b826cd51b62959bd4b3d0163b7d010bab969.yml -openapi_spec_hash: 95ea277ed84c04aefd25bcb63ae4e2e5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3309070d0c282e00842afa3021c80774f8e1f3a4517959927adfd9ffaa81c94c.yml +openapi_spec_hash: 57927271c019ee8ddd428afa8a57baaf config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 080ab2bf6..b073dff18 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -145,7 +145,6 @@ def update( self, account_id: str, *, - credit_limit: int | Omit = omit, name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -161,9 +160,6 @@ def update( Args: account_id: The identifier of the Account to update. - credit_limit: The new credit limit of the Account, if and only if the Account is a loan - account. - name: The new name of the Account. extra_headers: Send extra headers @@ -180,13 +176,7 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._patch( f"/accounts/{account_id}", - body=maybe_transform( - { - "credit_limit": credit_limit, - "name": name, - }, - account_update_params.AccountUpdateParams, - ), + body=maybe_transform({"name": name}, account_update_params.AccountUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -474,7 +464,6 @@ async def update( self, account_id: str, *, - credit_limit: int | Omit = omit, name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -490,9 +479,6 @@ async def update( Args: account_id: The identifier of the Account to update. - credit_limit: The new credit limit of the Account, if and only if the Account is a loan - account. - name: The new name of the Account. extra_headers: Send extra headers @@ -509,13 +495,7 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._patch( f"/accounts/{account_id}", - body=await async_maybe_transform( - { - "credit_limit": credit_limit, - "name": name, - }, - account_update_params.AccountUpdateParams, - ), + body=await async_maybe_transform({"name": name}, account_update_params.AccountUpdateParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py index 32eaaba0f..86ec914d0 100644 --- a/src/increase/types/account_update_params.py +++ b/src/increase/types/account_update_params.py @@ -8,11 +8,5 @@ class AccountUpdateParams(TypedDict, total=False): - credit_limit: int - """ - The new credit limit of the Account, if and only if the Account is a loan - account. - """ - name: str """The new name of the Account.""" diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index d6edc5ab9..e9884378c 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -112,7 +112,6 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account = client.accounts.update( account_id="account_in71c4amph0vgo2qllky", - credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -372,7 +371,6 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( account_id="account_in71c4amph0vgo2qllky", - credit_limit=0, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) From dbddef1159bc8c8627b5ed849bbb27749c8da5f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 04:51:08 +0000 Subject: [PATCH 1110/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/accounts.py | 47 ++++++++++++++++++- .../resources/simulations/programs.py | 8 ++++ src/increase/types/account.py | 41 +++++++++++++++- src/increase/types/account_create_params.py | 47 ++++++++++++++++++- src/increase/types/account_statement.py | 37 ++++++++------- src/increase/types/account_update_params.py | 14 +++++- src/increase/types/balance_lookup.py | 38 ++++++++------- src/increase/types/program.py | 28 +++++------ .../simulations/program_create_params.py | 3 ++ .../simulations/test_programs.py | 2 + tests/api_resources/test_accounts.py | 20 +++++++- 12 files changed, 231 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 91752aeff..df82cbc8f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-3309070d0c282e00842afa3021c80774f8e1f3a4517959927adfd9ffaa81c94c.yml -openapi_spec_hash: 57927271c019ee8ddd428afa8a57baaf +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-994727afca8b769c05b3531b0e560cfc71b7d2c45a49b54e09bbf73d0dbcaa1f.yml +openapi_spec_hash: bb1c55d7e08fb038a7383976bba226d1 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index b073dff18..7fe998692 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -4,6 +4,7 @@ from typing import Union from datetime import datetime +from typing_extensions import Literal import httpx @@ -51,7 +52,9 @@ def create( *, name: str, entity_id: str | Omit = omit, + funding: Literal["loan", "deposits"] | Omit = omit, informational_entity_id: str | Omit = omit, + loan: account_create_params.Loan | Omit = omit, program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -69,9 +72,17 @@ def create( entity_id: The identifier for the Entity that will own the Account. + funding: Whether the Account is funded by a loan or by deposits. + + - `loan` - An account funded by a loan. Before opening a loan account, contact + support@increase.com to set up a loan program. + - `deposits` - An account funded by deposits. + informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated with its activity. This is generally the beneficiary of the funds. + loan: The loan details for the account. + program_id: The identifier for the Program that this Account falls under. Required if you operate more than one Program. @@ -91,7 +102,9 @@ def create( { "name": name, "entity_id": entity_id, + "funding": funding, "informational_entity_id": informational_entity_id, + "loan": loan, "program_id": program_id, }, account_create_params.AccountCreateParams, @@ -145,6 +158,7 @@ def update( self, account_id: str, *, + loan: account_update_params.Loan | Omit = omit, name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -160,6 +174,8 @@ def update( Args: account_id: The identifier of the Account to update. + loan: The loan details for the account. + name: The new name of the Account. extra_headers: Send extra headers @@ -176,7 +192,13 @@ def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._patch( f"/accounts/{account_id}", - body=maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=maybe_transform( + { + "loan": loan, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -370,7 +392,9 @@ async def create( *, name: str, entity_id: str | Omit = omit, + funding: Literal["loan", "deposits"] | Omit = omit, informational_entity_id: str | Omit = omit, + loan: account_create_params.Loan | Omit = omit, program_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -388,9 +412,17 @@ async def create( entity_id: The identifier for the Entity that will own the Account. + funding: Whether the Account is funded by a loan or by deposits. + + - `loan` - An account funded by a loan. Before opening a loan account, contact + support@increase.com to set up a loan program. + - `deposits` - An account funded by deposits. + informational_entity_id: The identifier of an Entity that, while not owning the Account, is associated with its activity. This is generally the beneficiary of the funds. + loan: The loan details for the account. + program_id: The identifier for the Program that this Account falls under. Required if you operate more than one Program. @@ -410,7 +442,9 @@ async def create( { "name": name, "entity_id": entity_id, + "funding": funding, "informational_entity_id": informational_entity_id, + "loan": loan, "program_id": program_id, }, account_create_params.AccountCreateParams, @@ -464,6 +498,7 @@ async def update( self, account_id: str, *, + loan: account_update_params.Loan | Omit = omit, name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -479,6 +514,8 @@ async def update( Args: account_id: The identifier of the Account to update. + loan: The loan details for the account. + name: The new name of the Account. extra_headers: Send extra headers @@ -495,7 +532,13 @@ async def update( raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._patch( f"/accounts/{account_id}", - body=await async_maybe_transform({"name": name}, account_update_params.AccountUpdateParams), + body=await async_maybe_transform( + { + "loan": loan, + "name": name, + }, + account_update_params.AccountUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 23c617954..2200fd8e1 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -56,6 +56,7 @@ def create( "twin_city_bank", ] | Omit = omit, + lending_maximum_extendable_credit: int | Omit = omit, reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -84,6 +85,8 @@ def create( - `grasshopper_bank` - Grasshopper Bank - `twin_city_bank` - Twin City Bank + lending_maximum_extendable_credit: The maximum extendable credit of the program being added. + reserve_account_id: The identifier of the Account the Program should be added to is for. extra_headers: Send extra headers @@ -102,6 +105,7 @@ def create( { "name": name, "bank": bank, + "lending_maximum_extendable_credit": lending_maximum_extendable_credit, "reserve_account_id": reserve_account_id, }, program_create_params.ProgramCreateParams, @@ -150,6 +154,7 @@ async def create( "twin_city_bank", ] | Omit = omit, + lending_maximum_extendable_credit: int | Omit = omit, reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -178,6 +183,8 @@ async def create( - `grasshopper_bank` - Grasshopper Bank - `twin_city_bank` - Twin City Bank + lending_maximum_extendable_credit: The maximum extendable credit of the program being added. + reserve_account_id: The identifier of the Account the Program should be added to is for. extra_headers: Send extra headers @@ -196,6 +203,7 @@ async def create( { "name": name, "bank": bank, + "lending_maximum_extendable_credit": lending_maximum_extendable_credit, "reserve_account_id": reserve_account_id, }, program_create_params.ProgramCreateParams, diff --git a/src/increase/types/account.py b/src/increase/types/account.py index a9d98010f..59690c717 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -8,7 +8,35 @@ from .._models import BaseModel -__all__ = ["Account"] +__all__ = ["Account", "Loan"] + + +class Loan(BaseModel): + """The Account's loan-related information, if the Account is a loan account.""" + + credit_limit: int + """The maximum amount of money that can be borrowed on the Account.""" + + grace_period_days: int + """ + The number of days after the statement date that the Account can be past due + before being considered delinquent. + """ + + maturity_date: Optional[date] = None + """The date on which the loan matures.""" + + statement_day_of_month: int + """The day of the month on which the loan statement is generated.""" + + statement_payment_type: Literal["balance", "interest_until_maturity"] + """The type of payment for the loan. + + - `balance` - The borrower must pay the full balance of the loan at the end of + the statement period. + - `interest_until_maturity` - The borrower must pay the accrued interest at the + end of the statement period. + """ class Account(BaseModel): @@ -59,6 +87,14 @@ class Account(BaseModel): entity_id: str """The identifier for the Entity the Account belongs to.""" + funding: Optional[Literal["loan", "deposits"]] = None + """Whether the Account is funded by a loan or by deposits. + + - `loan` - An account funded by a loan. Before opening a loan account, contact + support@increase.com to set up a loan program. + - `deposits` - An account funded by deposits. + """ + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. @@ -92,6 +128,9 @@ class Account(BaseModel): "0.01". """ + loan: Optional[Loan] = None + """The Account's loan-related information, if the Account is a loan account.""" + name: str """The name you choose for the Account.""" diff --git a/src/increase/types/account_create_params.py b/src/increase/types/account_create_params.py index 068dc2b51..705b76ebd 100644 --- a/src/increase/types/account_create_params.py +++ b/src/increase/types/account_create_params.py @@ -2,9 +2,13 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing import Union +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict -__all__ = ["AccountCreateParams"] +from .._utils import PropertyInfo + +__all__ = ["AccountCreateParams", "Loan"] class AccountCreateParams(TypedDict, total=False): @@ -14,14 +18,53 @@ class AccountCreateParams(TypedDict, total=False): entity_id: str """The identifier for the Entity that will own the Account.""" + funding: Literal["loan", "deposits"] + """Whether the Account is funded by a loan or by deposits. + + - `loan` - An account funded by a loan. Before opening a loan account, contact + support@increase.com to set up a loan program. + - `deposits` - An account funded by deposits. + """ + informational_entity_id: str """ The identifier of an Entity that, while not owning the Account, is associated with its activity. This is generally the beneficiary of the funds. """ + loan: Loan + """The loan details for the account.""" + program_id: str """The identifier for the Program that this Account falls under. Required if you operate more than one Program. """ + + +class Loan(TypedDict, total=False): + """The loan details for the account.""" + + credit_limit: Required[int] + """The maximum amount of money that can be drawn from the Account.""" + + grace_period_days: Required[int] + """ + The number of days after the statement date that the Account can be past due + before being considered delinquent. + """ + + statement_day_of_month: Required[int] + """The day of the month on which the loan statement is generated.""" + + statement_payment_type: Required[Literal["balance", "interest_until_maturity"]] + """The type of statement payment for the account. + + - `balance` - The borrower must pay the full balance of the loan at the end of + the statement period. + - `interest_until_maturity` - The borrower must pay the accrued interest at the + end of the statement period. + """ + + maturity_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The date on which the loan matures.""" diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py index f43fc0ea0..75fc6f3d1 100644 --- a/src/increase/types/account_statement.py +++ b/src/increase/types/account_statement.py @@ -1,14 +1,28 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict +from typing import Optional from datetime import datetime from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel -__all__ = ["AccountStatement"] +__all__ = ["AccountStatement", "Loan"] + + +class Loan(BaseModel): + """The loan balances.""" + + due_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the loan + payment is due. + """ + + due_balance: int + """The total amount due on the loan.""" + + past_due_balance: int + """The amount past due on the loan.""" class AccountStatement(BaseModel): @@ -35,6 +49,9 @@ class AccountStatement(BaseModel): file_id: str """The identifier of the File containing a PDF of the statement.""" + loan: Optional[Loan] = None + """The loan balances.""" + starting_balance: int """The Account's balance at the start of its statement period.""" @@ -55,15 +72,3 @@ class AccountStatement(BaseModel): For this resource it will always be `account_statement`. """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/account_update_params.py b/src/increase/types/account_update_params.py index 86ec914d0..6ce69dac3 100644 --- a/src/increase/types/account_update_params.py +++ b/src/increase/types/account_update_params.py @@ -2,11 +2,21 @@ from __future__ import annotations -from typing_extensions import TypedDict +from typing_extensions import Required, TypedDict -__all__ = ["AccountUpdateParams"] +__all__ = ["AccountUpdateParams", "Loan"] class AccountUpdateParams(TypedDict, total=False): + loan: Loan + """The loan details for the account.""" + name: str """The new name of the Account.""" + + +class Loan(TypedDict, total=False): + """The loan details for the account.""" + + credit_limit: Required[int] + """The maximum amount of money that can be drawn from the Account.""" diff --git a/src/increase/types/balance_lookup.py b/src/increase/types/balance_lookup.py index f8e1ee75b..53ca19549 100644 --- a/src/increase/types/balance_lookup.py +++ b/src/increase/types/balance_lookup.py @@ -1,13 +1,28 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict +from typing import Optional +from datetime import datetime from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel -__all__ = ["BalanceLookup"] +__all__ = ["BalanceLookup", "Loan"] + + +class Loan(BaseModel): + """The loan balances for the Account.""" + + due_at: Optional[datetime] = None + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the loan + payment is due. + """ + + due_balance: int + """The total amount due on the loan.""" + + past_due_balance: int + """The amount past due on the loan.""" class BalanceLookup(BaseModel): @@ -30,20 +45,11 @@ class BalanceLookup(BaseModel): on the Account. """ + loan: Optional[Loan] = None + """The loan balances for the Account.""" + type: Literal["balance_lookup"] """A constant representing the object's type. For this resource it will always be `balance_lookup`. """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/program.py b/src/increase/types/program.py index bc0b15eea..a85380686 100644 --- a/src/increase/types/program.py +++ b/src/increase/types/program.py @@ -1,14 +1,19 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import Optional from datetime import datetime from typing_extensions import Literal -from pydantic import Field as FieldInfo - from .._models import BaseModel -__all__ = ["Program"] +__all__ = ["Program", "Lending"] + + +class Lending(BaseModel): + """The lending details for the program.""" + + maximum_extendable_credit: int + """The maximum extendable credit of the program.""" class Program(BaseModel): @@ -47,6 +52,9 @@ class Program(BaseModel): represented as "0.01". """ + lending: Optional[Lending] = None + """The lending details for the program.""" + name: str """The name of the Program.""" @@ -61,15 +69,3 @@ class Program(BaseModel): The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Program was last updated. """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py index 7153e2292..24da056c6 100644 --- a/src/increase/types/simulations/program_create_params.py +++ b/src/increase/types/simulations/program_create_params.py @@ -29,5 +29,8 @@ class ProgramCreateParams(TypedDict, total=False): - `twin_city_bank` - Twin City Bank """ + lending_maximum_extendable_credit: int + """The maximum extendable credit of the program being added.""" + reserve_account_id: str """The identifier of the Account the Program should be added to is for.""" diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index 1439c6bcf..f4c3ce477 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -29,6 +29,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: program = client.simulations.programs.create( name="For Benefit Of", bank="blue_ridge_bank", + lending_maximum_extendable_credit=0, reserve_account_id="reserve_account_id", ) assert_matches_type(Program, program, path=["response"]) @@ -75,6 +76,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) program = await async_client.simulations.programs.create( name="For Benefit Of", bank="blue_ridge_bank", + lending_maximum_extendable_credit=0, reserve_account_id="reserve_account_id", ) assert_matches_type(Program, program, path=["response"]) diff --git a/tests/api_resources/test_accounts.py b/tests/api_resources/test_accounts.py index e9884378c..d208450c5 100644 --- a/tests/api_resources/test_accounts.py +++ b/tests/api_resources/test_accounts.py @@ -13,7 +13,7 @@ Account, BalanceLookup, ) -from increase._utils import parse_datetime +from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -34,7 +34,15 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account = client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", + funding="loan", informational_entity_id="informational_entity_id", + loan={ + "credit_limit": 0, + "grace_period_days": 0, + "statement_day_of_month": 1, + "statement_payment_type": "balance", + "maturity_date": parse_date("2019-12-27"), + }, program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Account, account, path=["response"]) @@ -112,6 +120,7 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: account = client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + loan={"credit_limit": 0}, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) @@ -293,7 +302,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account = await async_client.accounts.create( name="New Account!", entity_id="entity_n8y8tnk2p9339ti393yi", + funding="loan", informational_entity_id="informational_entity_id", + loan={ + "credit_limit": 0, + "grace_period_days": 0, + "statement_day_of_month": 1, + "statement_payment_type": "balance", + "maturity_date": parse_date("2019-12-27"), + }, program_id="program_i2v2os4mwza1oetokh9i", ) assert_matches_type(Account, account, path=["response"]) @@ -371,6 +388,7 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: account = await async_client.accounts.update( account_id="account_in71c4amph0vgo2qllky", + loan={"credit_limit": 0}, name="My renamed account", ) assert_matches_type(Account, account, path=["response"]) From ae8eb63441d2c6720219a6222fe3559dce4456b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 14:44:35 +0000 Subject: [PATCH 1111/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/intrafi_exclusions.py | 22 ++++++++++++------- src/increase/types/intrafi_exclusion.py | 2 +- .../types/intrafi_exclusion_create_params.py | 12 +++++++--- .../api_resources/test_intrafi_exclusions.py | 12 +++++----- 5 files changed, 32 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index df82cbc8f..258e4a3f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-994727afca8b769c05b3531b0e560cfc71b7d2c45a49b54e09bbf73d0dbcaa1f.yml -openapi_spec_hash: bb1c55d7e08fb038a7383976bba226d1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-46a90f99726aa861d06ec56fb73592b4dcb4499d5a765d1a10dfc9619446306f.yml +openapi_spec_hash: 8406b96c39c72de064a810c393c00554 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 53e2563c4..344323023 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -45,8 +45,8 @@ def with_streaming_response(self) -> IntrafiExclusionsResourceWithStreamingRespo def create( self, *, - bank_name: str, entity_id: str, + fdic_certificate_number: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -59,10 +59,13 @@ def create( Create an IntraFi Exclusion Args: - bank_name: The name of the financial institution to be excluded. - entity_id: The identifier of the Entity whose deposits will be excluded. + fdic_certificate_number: The FDIC certificate number of the financial institution to be excluded. An FDIC + certificate number uniquely identifies a financial institution, and is different + than a routing number. To find one, we recommend searching by Bank Name using + the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -77,8 +80,8 @@ def create( "/intrafi_exclusions", body=maybe_transform( { - "bank_name": bank_name, "entity_id": entity_id, + "fdic_certificate_number": fdic_certificate_number, }, intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), @@ -258,8 +261,8 @@ def with_streaming_response(self) -> AsyncIntrafiExclusionsResourceWithStreaming async def create( self, *, - bank_name: str, entity_id: str, + fdic_certificate_number: str, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -272,10 +275,13 @@ async def create( Create an IntraFi Exclusion Args: - bank_name: The name of the financial institution to be excluded. - entity_id: The identifier of the Entity whose deposits will be excluded. + fdic_certificate_number: The FDIC certificate number of the financial institution to be excluded. An FDIC + certificate number uniquely identifies a financial institution, and is different + than a routing number. To find one, we recommend searching by Bank Name using + the [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind). + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -290,8 +296,8 @@ async def create( "/intrafi_exclusions", body=await async_maybe_transform( { - "bank_name": bank_name, "entity_id": entity_id, + "fdic_certificate_number": fdic_certificate_number, }, intrafi_exclusion_create_params.IntrafiExclusionCreateParams, ), diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py index 6e99025ba..3c444c97b 100644 --- a/src/increase/types/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -17,7 +17,7 @@ class IntrafiExclusion(BaseModel): id: str """The identifier of this exclusion request.""" - bank_name: str + bank_name: Optional[str] = None """The name of the excluded institution.""" created_at: datetime diff --git a/src/increase/types/intrafi_exclusion_create_params.py b/src/increase/types/intrafi_exclusion_create_params.py index 1a0c78dc3..62926b177 100644 --- a/src/increase/types/intrafi_exclusion_create_params.py +++ b/src/increase/types/intrafi_exclusion_create_params.py @@ -8,8 +8,14 @@ class IntrafiExclusionCreateParams(TypedDict, total=False): - bank_name: Required[str] - """The name of the financial institution to be excluded.""" - entity_id: Required[str] """The identifier of the Entity whose deposits will be excluded.""" + + fdic_certificate_number: Required[str] + """The FDIC certificate number of the financial institution to be excluded. + + An FDIC certificate number uniquely identifies a financial institution, and is + different than a routing number. To find one, we recommend searching by Bank + Name using the + [FDIC's bankfind tool](https://banks.data.fdic.gov/bankfind-suite/bankfind). + """ diff --git a/tests/api_resources/test_intrafi_exclusions.py b/tests/api_resources/test_intrafi_exclusions.py index b3564fc62..ba9928995 100644 --- a/tests/api_resources/test_intrafi_exclusions.py +++ b/tests/api_resources/test_intrafi_exclusions.py @@ -21,16 +21,16 @@ class TestIntrafiExclusions: @parametrize def test_method_create(self, client: Increase) -> None: intrafi_exclusion = client.intrafi_exclusions.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.intrafi_exclusions.with_raw_response.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) assert response.is_closed is True @@ -41,8 +41,8 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.intrafi_exclusions.with_streaming_response.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -172,16 +172,16 @@ class TestAsyncIntrafiExclusions: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: intrafi_exclusion = await async_client.intrafi_exclusions.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) assert_matches_type(IntrafiExclusion, intrafi_exclusion, path=["response"]) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.intrafi_exclusions.with_raw_response.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) assert response.is_closed is True @@ -192,8 +192,8 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.intrafi_exclusions.with_streaming_response.create( - bank_name="Example Bank", entity_id="entity_n8y8tnk2p9339ti393yi", + fdic_certificate_number="314159", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From ff5088c8addeae8d04cd0b87d3a6be76e77adb0f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 16:43:31 +0000 Subject: [PATCH 1112/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 258e4a3f9..0cc36c41d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-46a90f99726aa861d06ec56fb73592b4dcb4499d5a765d1a10dfc9619446306f.yml -openapi_spec_hash: 8406b96c39c72de064a810c393c00554 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfc57f9c5bccf2918dfb5fc56fb6b6fd1eadd851f037b6873ba4e2442d5c8126.yml +openapi_spec_hash: 7e54b69798d6a1487474ed229a83c6fc config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/account.py b/src/increase/types/account.py index 59690c717..dfb6e00a3 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -87,7 +87,7 @@ class Account(BaseModel): entity_id: str """The identifier for the Entity the Account belongs to.""" - funding: Optional[Literal["loan", "deposits"]] = None + funding: Literal["loan", "deposits"] """Whether the Account is funded by a loan or by deposits. - `loan` - An account funded by a loan. Before opening a loan account, contact From dc0707df35dea2a1378fb8733de33fc2fbb5fc5e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 30 Jan 2026 17:44:08 +0000 Subject: [PATCH 1113/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/intrafi_exclusion.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 0cc36c41d..c516d75f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cfc57f9c5bccf2918dfb5fc56fb6b6fd1eadd851f037b6873ba4e2442d5c8126.yml -openapi_spec_hash: 7e54b69798d6a1487474ed229a83c6fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8152ea97ddd6f87a1bc6102d458a3fd3711ca468f6a62cd3be0f6e464376b3e6.yml +openapi_spec_hash: 03c6b4e530600d03fab9344887dc4639 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/intrafi_exclusion.py b/src/increase/types/intrafi_exclusion.py index 3c444c97b..bca24828e 100644 --- a/src/increase/types/intrafi_exclusion.py +++ b/src/increase/types/intrafi_exclusion.py @@ -46,12 +46,14 @@ class IntrafiExclusion(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ - status: Literal["pending", "completed", "archived"] + status: Literal["pending", "completed", "archived", "ineligible"] """The status of the exclusion request. - `pending` - The exclusion is being added to the IntraFi network. - `completed` - The exclusion has been added to the IntraFi network. - `archived` - The exclusion has been removed from the IntraFi network. + - `ineligible` - The exclusion wasn't eligible to be added to the IntraFi + network. """ submitted_at: Optional[datetime] = None From 043b887a478e3aae1c148f098ba80f528c626430 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 31 Jan 2026 22:11:32 +0000 Subject: [PATCH 1114/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export_create_params.py | 9 ++++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index c516d75f5..eaede9eae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8152ea97ddd6f87a1bc6102d458a3fd3711ca468f6a62cd3be0f6e464376b3e6.yml -openapi_spec_hash: 03c6b4e530600d03fab9344887dc4639 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-42d3718c22feafafc0c3b9952574f79ed506e2fe6a3b336743d2cc3442d3455c.yml +openapi_spec_hash: 5ce48171c112d3c6addb850db1c9535d config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 47ce43b19..3629d363b 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -230,13 +230,13 @@ class BalanceCsv(TypedDict, total=False): """ account_id: str - """Filter exported Transactions to the specified Account.""" + """Filter exported Balances to the specified Account.""" created_at: BalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" program_id: str - """Filter exported Transactions to the specified Program.""" + """Filter exported Balances to the specified Program.""" class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): @@ -274,7 +274,10 @@ class BookkeepingAccountBalanceCsv(TypedDict, total=False): """ bookkeeping_account_id: str - """Filter exported Transactions to the specified Bookkeeping Account.""" + """ + Filter exported Bookkeeping Account Balances to the specified Bookkeeping + Account. + """ created_at: BookkeepingAccountBalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" From 61c6c18daed6c9992538f5a24d824f5c94abb103 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:22:58 +0000 Subject: [PATCH 1115/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export_create_params.py | 3 --- tests/api_resources/test_exports.py | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index eaede9eae..8254caf98 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-42d3718c22feafafc0c3b9952574f79ed506e2fe6a3b336743d2cc3442d3455c.yml -openapi_spec_hash: 5ce48171c112d3c6addb850db1c9535d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-678bc51903293a8f061efcb7c431360a3e7b87ca7c5a3cf7ea8ea8f07926633d.yml +openapi_spec_hash: 5131d1a4954d2ff8790761438bb889fc config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 3629d363b..475c7bcfb 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -358,9 +358,6 @@ class TransactionCsv(TypedDict, total=False): created_at: TransactionCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" - program_id: str - """Filter exported Transactions to the specified Program.""" - class VendorCsv(TypedDict, total=False): """Options for the created export. diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 9ecc5044c..e0b78657a 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -77,7 +77,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - "program_id": "program_id", }, vendor_csv={}, ) @@ -251,7 +250,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - "program_id": "program_id", }, vendor_csv={}, ) From 06bbac14d699e402a61cade9bb842e74563d47b3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 19:45:36 +0000 Subject: [PATCH 1116/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export_create_params.py | 21 ++------------------- tests/api_resources/test_exports.py | 4 ++-- 3 files changed, 6 insertions(+), 23 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8254caf98..59c0dc719 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-678bc51903293a8f061efcb7c431360a3e7b87ca7c5a3cf7ea8ea8f07926633d.yml -openapi_spec_hash: 5131d1a4954d2ff8790761438bb889fc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9dec0094dc893c97344611be679e9ba11d0e4405538c4ac163633b48b4d3755d.yml +openapi_spec_hash: 00bca190205d5763c023911b5f013db3 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 475c7bcfb..d43f4aa31 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import List, Union +from typing import Union from datetime import date, datetime from typing_extensions import Literal, Required, Annotated, TypedDict @@ -19,7 +19,6 @@ "BookkeepingAccountBalanceCsv", "BookkeepingAccountBalanceCsvCreatedAt", "EntityCsv", - "EntityCsvStatus", "FundingInstructions", "TransactionCsv", "TransactionCsvCreatedAt", @@ -283,29 +282,13 @@ class BookkeepingAccountBalanceCsv(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" -_EntityCsvStatusReservedKeywords = TypedDict( - "_EntityCsvStatusReservedKeywords", - { - "in": List[Literal["active", "archived", "disabled"]], - }, - total=False, -) - - -class EntityCsvStatus(_EntityCsvStatusReservedKeywords, total=False): - """Entity statuses to filter by.""" - - pass - - class EntityCsv(TypedDict, total=False): """Options for the created export. Required if `category` is equal to `entity_csv`. """ - status: EntityCsvStatus - """Entity statuses to filter by.""" + pass class FundingInstructions(TypedDict, total=False): diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index e0b78657a..0ee75a4bb 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -67,7 +67,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - entity_csv={"status": {"in": ["active"]}}, + entity_csv={}, funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", @@ -240,7 +240,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, - entity_csv={"status": {"in": ["active"]}}, + entity_csv={}, funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ "account_id": "account_in71c4amph0vgo2qllky", From e13f87e34277aebb27232b89e91f713e0c950e8d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 23:35:14 +0000 Subject: [PATCH 1117/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export_create_params.py | 3 --- tests/api_resources/test_exports.py | 2 -- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index 59c0dc719..3faa67478 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9dec0094dc893c97344611be679e9ba11d0e4405538c4ac163633b48b4d3755d.yml -openapi_spec_hash: 00bca190205d5763c023911b5f013db3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c4cfc1e3f7a08dfe8be37b73f7da951caaff66d967512d5dd15956b908cda488.yml +openapi_spec_hash: 458dc62dd9bc06b1a103e010feca1d9f config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index d43f4aa31..e046384e0 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -234,9 +234,6 @@ class BalanceCsv(TypedDict, total=False): created_at: BalanceCsvCreatedAt """Filter results by time range on the `created_at` attribute.""" - program_id: str - """Filter exported Balances to the specified Program.""" - class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 0ee75a4bb..f08797f7b 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -56,7 +56,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - "program_id": "program_id", }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", @@ -229,7 +228,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, - "program_id": "program_id", }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", From b5bfb4a0c98a21ad7654e58d78fd641d4fe5fd42 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Feb 2026 23:51:38 +0000 Subject: [PATCH 1118/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/event_subscriptions.py | 36 +++++++++ src/increase/types/event.py | 18 +++++ src/increase/types/event_list_params.py | 6 ++ src/increase/types/event_subscription.py | 18 +++++ .../types/event_subscription_create_params.py | 18 +++++ src/increase/types/pending_transaction.py | 70 +++++++++++++++++ .../types/pending_transaction_list_params.py | 2 + src/increase/types/transaction.py | 76 +++++++++++++++++++ src/increase/types/transaction_list_params.py | 2 + src/increase/types/unwrap_webhook_event.py | 18 +++++ 11 files changed, 266 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3faa67478..9898e88b1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c4cfc1e3f7a08dfe8be37b73f7da951caaff66d967512d5dd15956b908cda488.yml -openapi_spec_hash: 458dc62dd9bc06b1a103e010feca1d9f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6bf08c859f0104ec8755cac5a5a9e5d106ed3906d49979d9702070bc71384bca.yml +openapi_spec_hash: 2b9cb4a269763fc4e2ea6ad1e8e59283 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index c5b856b90..a34185037 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -61,6 +61,12 @@ def create( "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -190,6 +196,18 @@ def create( updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is @@ -559,6 +577,12 @@ async def create( "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -688,6 +712,18 @@ async def create( updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is diff --git a/src/increase/types/event.py b/src/increase/types/event.py index d38bc0f84..4e1ae34b6 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -35,6 +35,12 @@ class Event(BaseModel): "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -146,6 +152,18 @@ class Event(BaseModel): updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index 2b7f7a73a..bc0e7ba34 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -45,6 +45,12 @@ class EventListParams(TypedDict, total=False): "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index fa0949949..ec91a17bf 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -48,6 +48,12 @@ class EventSubscription(BaseModel): "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -159,6 +165,18 @@ class EventSubscription(BaseModel): updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 92e59e8a4..87ddce5a8 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -29,6 +29,12 @@ class EventSubscriptionCreateParams(TypedDict, total=False): "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -139,6 +145,18 @@ class EventSubscriptionCreateParams(TypedDict, total=False): updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 1f20a4535..32f8aebdc 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -13,6 +13,8 @@ "Source", "SourceAccountTransferInstruction", "SourceACHTransferInstruction", + "SourceBlockchainOfframpTransferIntention", + "SourceBlockchainOnrampTransferInstruction", "SourceCardAuthorization", "SourceCardAuthorizationAdditionalAmounts", "SourceCardAuthorizationAdditionalAmountsClinic", @@ -107,6 +109,52 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class SourceBlockchainOfframpTransferIntention(BaseModel): + """A Blockchain Off-Ramp Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_intention`. + """ + + source_blockchain_address_id: str + """The identifier of the Blockchain Address the funds were received at.""" + + transfer_id: str + """ + The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class SourceBlockchainOnrampTransferInstruction(BaseModel): + """A Blockchain On-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `blockchain_onramp_transfer_instruction`. + """ + + amount: int + """The transfer amount in USD cents.""" + + destination_blockchain_address: str + """The blockchain address the funds are being sent to.""" + + transfer_id: str + """ + The identifier of the Blockchain On-Ramp Transfer that led to this Pending + Transaction. + """ + + class SourceCardAuthorizationAdditionalAmountsClinic(BaseModel): """The part of this transaction amount that was for clinic-related services.""" @@ -1084,6 +1132,20 @@ class Source(BaseModel): equal to `ach_transfer_instruction`. """ + blockchain_offramp_transfer_intention: Optional[SourceBlockchainOfframpTransferIntention] = None + """A Blockchain Off-Ramp Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_offramp_transfer_intention`. + """ + + blockchain_onramp_transfer_instruction: Optional[SourceBlockchainOnrampTransferInstruction] = None + """A Blockchain On-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_onramp_transfer_instruction`. + """ + card_authorization: Optional[SourceCardAuthorization] = None """A Card Authorization object. @@ -1113,6 +1175,8 @@ class Source(BaseModel): "inbound_wire_transfer_reversal", "swift_transfer_instruction", "card_push_transfer_instruction", + "blockchain_onramp_transfer_instruction", + "blockchain_offramp_transfer_intention", "other", ] """The type of the resource. @@ -1147,6 +1211,12 @@ class Source(BaseModel): under the `swift_transfer_instruction` object. - `card_push_transfer_instruction` - Card Push Transfer Instruction: details will be under the `card_push_transfer_instruction` object. + - `blockchain_onramp_transfer_instruction` - Blockchain On-Ramp Transfer + Instruction: details will be under the + `blockchain_onramp_transfer_instruction` object. + - `blockchain_offramp_transfer_intention` - Blockchain Off-Ramp Transfer + Intention: details will be under the `blockchain_offramp_transfer_intention` + object. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 49494bc33..7fc848e9d 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -52,6 +52,8 @@ class PendingTransactionListParams(TypedDict, total=False): "inbound_wire_transfer_reversal", "swift_transfer_instruction", "card_push_transfer_instruction", + "blockchain_onramp_transfer_instruction", + "blockchain_offramp_transfer_intention", "other", ] ], diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index bdf234fde..ccdbb1d76 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -16,6 +16,8 @@ "SourceACHTransferIntention", "SourceACHTransferRejection", "SourceACHTransferReturn", + "SourceBlockchainOfframpTransferSettlement", + "SourceBlockchainOnrampTransferIntention", "SourceCardDisputeAcceptance", "SourceCardDisputeFinancial", "SourceCardDisputeFinancialVisa", @@ -496,6 +498,58 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class SourceBlockchainOfframpTransferSettlement(BaseModel): + """A Blockchain Off-Ramp Transfer Settlement object. + + This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_settlement`. + """ + + source_blockchain_address_id: str + """The identifier of the Blockchain Address the funds were received at.""" + + transfer_id: str + """ + The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class SourceBlockchainOnrampTransferIntention(BaseModel): + """A Blockchain On-Ramp Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is equal to `blockchain_onramp_transfer_intention`. + """ + + destination_blockchain_address: str + """The blockchain address the funds were sent to.""" + + transfer_id: str + """The identifier of the Blockchain On-Ramp Transfer that led to this Transaction.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + class SourceCardDisputeAcceptance(BaseModel): """A Legacy Card Dispute Acceptance object. @@ -3665,6 +3719,20 @@ class Source(BaseModel): after the transfer is initiated, but can occur much later. """ + blockchain_offramp_transfer_settlement: Optional[SourceBlockchainOfframpTransferSettlement] = None + """A Blockchain Off-Ramp Transfer Settlement object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_offramp_transfer_settlement`. + """ + + blockchain_onramp_transfer_intention: Optional[SourceBlockchainOnrampTransferIntention] = None + """A Blockchain On-Ramp Transfer Intention object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_onramp_transfer_intention`. + """ + card_dispute_acceptance: Optional[SourceCardDisputeAcceptance] = None """A Legacy Card Dispute Acceptance object. @@ -3775,6 +3843,8 @@ class Source(BaseModel): "swift_transfer_return", "card_push_transfer_acceptance", "account_revenue_payment", + "blockchain_onramp_transfer_intention", + "blockchain_offramp_transfer_settlement", "other", ] """The type of the resource. @@ -3854,6 +3924,12 @@ class Source(BaseModel): be under the `card_push_transfer_acceptance` object. - `account_revenue_payment` - Account Revenue Payment: details will be under the `account_revenue_payment` object. + - `blockchain_onramp_transfer_intention` - Blockchain On-Ramp Transfer + Intention: details will be under the `blockchain_onramp_transfer_intention` + object. + - `blockchain_offramp_transfer_settlement` - Blockchain Off-Ramp Transfer + Settlement: details will be under the `blockchain_offramp_transfer_settlement` + object. - `other` - The Transaction was made for an undocumented or deprecated reason. """ diff --git a/src/increase/types/transaction_list_params.py b/src/increase/types/transaction_list_params.py index 4af4a7d26..25c686b9e 100644 --- a/src/increase/types/transaction_list_params.py +++ b/src/increase/types/transaction_list_params.py @@ -75,6 +75,8 @@ class TransactionListParams(TypedDict, total=False): "swift_transfer_return", "card_push_transfer_acceptance", "account_revenue_payment", + "blockchain_onramp_transfer_intention", + "blockchain_offramp_transfer_settlement", "other", ] ], diff --git a/src/increase/types/unwrap_webhook_event.py b/src/increase/types/unwrap_webhook_event.py index d500622fa..536c8303f 100644 --- a/src/increase/types/unwrap_webhook_event.py +++ b/src/increase/types/unwrap_webhook_event.py @@ -35,6 +35,12 @@ class UnwrapWebhookEvent(BaseModel): "ach_prenotification.updated", "ach_transfer.created", "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", "bookkeeping_account.created", "bookkeeping_account.updated", "bookkeeping_entry_set.updated", @@ -146,6 +152,18 @@ class UnwrapWebhookEvent(BaseModel): updated. - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is created. - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is From 9e5c233a44d18df0e0156d35a302966ffd6bc2be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 01:44:07 +0000 Subject: [PATCH 1119/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_update_params.py | 3 +++ tests/api_resources/test_entities.py | 2 ++ 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9898e88b1..bca38611b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6bf08c859f0104ec8755cac5a5a9e5d106ed3906d49979d9702070bc71384bca.yml -openapi_spec_hash: 2b9cb4a269763fc4e2ea6ad1e8e59283 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c18d1cc6647fe78b98198587dc0a75915f8969e685e51293c850f31a99155b0c.yml +openapi_spec_hash: dda07d9d09014cc8f613dfa79f2d5833 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 8c09fb431..195c1f07f 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -133,6 +133,9 @@ class Corporation(TypedDict, total=False): name: str """The legal name of the corporation.""" + tax_identifier: str + """The Employer Identification Number (EIN) for the corporation.""" + class GovernmentAuthorityAddress(TypedDict, total=False): """The entity's physical address. diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index f51067d0a..36f511ec2 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -367,6 +367,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "incorporation_state": "x", "industry_code": "x", "name": "x", + "tax_identifier": "x", }, details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ @@ -1304,6 +1305,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "incorporation_state": "x", "industry_code": "x", "name": "x", + "tax_identifier": "x", }, details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ From a0ba4d2e96aa73ff94c0e1e9e8b3de7e59dbcca9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 01:49:36 +0000 Subject: [PATCH 1120/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/export.py | 293 ++++++++++++++++++++++++++++++++++- 2 files changed, 293 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index bca38611b..e3254b405 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c18d1cc6647fe78b98198587dc0a75915f8969e685e51293c850f31a99155b0c.yml -openapi_spec_hash: dda07d9d09014cc8f613dfa79f2d5833 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a4372a99448790d2873ec14d7e280c9cd745b2b910d7f4e4eb73fc278a4d6f2e.yml +openapi_spec_hash: 157ad870f28ecf52ef31b087e3f86ec1 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 4ec5c7719..98b2d7b91 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -1,12 +1,223 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. from typing import Optional -from datetime import datetime +from datetime import date, datetime from typing_extensions import Literal from .._models import BaseModel -__all__ = ["Export"] +__all__ = [ + "Export", + "AccountStatementBai2", + "AccountStatementOfx", + "AccountStatementOfxCreatedAt", + "AccountVerificationLetter", + "BalanceCsv", + "BalanceCsvCreatedAt", + "BookkeepingAccountBalanceCsv", + "BookkeepingAccountBalanceCsvCreatedAt", + "DashboardTableCsv", + "EntityCsv", + "Form1099Int", + "Form1099Misc", + "FundingInstructions", + "TransactionCsv", + "TransactionCsvCreatedAt", + "VendorCsv", +] + + +class AccountStatementBai2(BaseModel): + """Details of the account statement BAI2 export. + + This field will be present when the `category` is equal to `account_statement_bai2`. + """ + + account_id: Optional[str] = None + """Filter results by Account.""" + + effective_date: Optional[date] = None + """The date for which to retrieve the balance.""" + + program_id: Optional[str] = None + """Filter results by Program.""" + + +class AccountStatementOfxCreatedAt(BaseModel): + """Filter transactions by their created date.""" + + after: Optional[datetime] = None + """Filter results to transactions created after this time.""" + + before: Optional[datetime] = None + """Filter results to transactions created before this time.""" + + +class AccountStatementOfx(BaseModel): + """Details of the account statement OFX export. + + This field will be present when the `category` is equal to `account_statement_ofx`. + """ + + account_id: str + """The Account to create a statement for.""" + + created_at: Optional[AccountStatementOfxCreatedAt] = None + """Filter transactions by their created date.""" + + +class AccountVerificationLetter(BaseModel): + """Details of the account verification letter export. + + This field will be present when the `category` is equal to `account_verification_letter`. + """ + + account_number_id: str + """The Account Number to create a letter for.""" + + balance_date: Optional[date] = None + """The date of the balance to include in the letter.""" + + +class BalanceCsvCreatedAt(BaseModel): + """Filter balances by their created date.""" + + after: Optional[datetime] = None + """Filter balances created after this time.""" + + before: Optional[datetime] = None + """Filter balances created before this time.""" + + +class BalanceCsv(BaseModel): + """Details of the balance CSV export. + + This field will be present when the `category` is equal to `balance_csv`. + """ + + account_id: Optional[str] = None + """Filter results by Account.""" + + created_at: Optional[BalanceCsvCreatedAt] = None + """Filter balances by their created date.""" + + +class BookkeepingAccountBalanceCsvCreatedAt(BaseModel): + """Filter balances by their created date.""" + + after: Optional[datetime] = None + """Filter balances created after this time.""" + + before: Optional[datetime] = None + """Filter balances created before this time.""" + + +class BookkeepingAccountBalanceCsv(BaseModel): + """Details of the bookkeeping account balance CSV export. + + This field will be present when the `category` is equal to `bookkeeping_account_balance_csv`. + """ + + bookkeeping_account_id: Optional[str] = None + """Filter results by Bookkeeping Account.""" + + created_at: Optional[BookkeepingAccountBalanceCsvCreatedAt] = None + """Filter balances by their created date.""" + + +class DashboardTableCsv(BaseModel): + """Details of the dashboard table CSV export. + + This field will be present when the `category` is equal to `dashboard_table_csv`. + """ + + pass + + +class EntityCsv(BaseModel): + """Details of the entity CSV export. + + This field will be present when the `category` is equal to `entity_csv`. + """ + + pass + + +class Form1099Int(BaseModel): + """Details of the Form 1099-INT export. + + This field will be present when the `category` is equal to `form_1099_int`. + """ + + account_id: str + """The Account the tax form is for.""" + + corrected: bool + """Whether the tax form is a corrected form.""" + + description: str + """A description of the tax form.""" + + year: int + """The tax year for the tax form.""" + + +class Form1099Misc(BaseModel): + """Details of the Form 1099-MISC export. + + This field will be present when the `category` is equal to `form_1099_misc`. + """ + + account_id: str + """The Account the tax form is for.""" + + corrected: bool + """Whether the tax form is a corrected form.""" + + year: int + """The tax year for the tax form.""" + + +class FundingInstructions(BaseModel): + """Details of the funding instructions export. + + This field will be present when the `category` is equal to `funding_instructions`. + """ + + account_number_id: str + """The Account Number to create funding instructions for.""" + + +class TransactionCsvCreatedAt(BaseModel): + """Filter transactions by their created date.""" + + after: Optional[datetime] = None + """Filter transactions created after this time.""" + + before: Optional[datetime] = None + """Filter transactions created before this time.""" + + +class TransactionCsv(BaseModel): + """Details of the transaction CSV export. + + This field will be present when the `category` is equal to `transaction_csv`. + """ + + account_id: Optional[str] = None + """Filter results by Account.""" + + created_at: Optional[TransactionCsvCreatedAt] = None + """Filter transactions by their created date.""" + + +class VendorCsv(BaseModel): + """Details of the vendor CSV export. + + This field will be present when the `category` is equal to `vendor_csv`. + """ + + pass class Export(BaseModel): @@ -18,6 +229,40 @@ class Export(BaseModel): id: str """The Export identifier.""" + account_statement_bai2: Optional[AccountStatementBai2] = None + """Details of the account statement BAI2 export. + + This field will be present when the `category` is equal to + `account_statement_bai2`. + """ + + account_statement_ofx: Optional[AccountStatementOfx] = None + """Details of the account statement OFX export. + + This field will be present when the `category` is equal to + `account_statement_ofx`. + """ + + account_verification_letter: Optional[AccountVerificationLetter] = None + """Details of the account verification letter export. + + This field will be present when the `category` is equal to + `account_verification_letter`. + """ + + balance_csv: Optional[BalanceCsv] = None + """Details of the balance CSV export. + + This field will be present when the `category` is equal to `balance_csv`. + """ + + bookkeeping_account_balance_csv: Optional[BookkeepingAccountBalanceCsv] = None + """Details of the bookkeeping account balance CSV export. + + This field will be present when the `category` is equal to + `bookkeeping_account_balance_csv`. + """ + category: Literal[ "account_statement_ofx", "account_statement_bai2", @@ -60,6 +305,19 @@ class Export(BaseModel): created_at: datetime """The time the Export was created.""" + dashboard_table_csv: Optional[DashboardTableCsv] = None + """Details of the dashboard table CSV export. + + This field will be present when the `category` is equal to + `dashboard_table_csv`. + """ + + entity_csv: Optional[EntityCsv] = None + """Details of the entity CSV export. + + This field will be present when the `category` is equal to `entity_csv`. + """ + file_download_url: Optional[str] = None """A URL at which the Export's file can be downloaded. @@ -72,6 +330,25 @@ class Export(BaseModel): This will be present when the Export's status transitions to `complete`. """ + form_1099_int: Optional[Form1099Int] = None + """Details of the Form 1099-INT export. + + This field will be present when the `category` is equal to `form_1099_int`. + """ + + form_1099_misc: Optional[Form1099Misc] = None + """Details of the Form 1099-MISC export. + + This field will be present when the `category` is equal to `form_1099_misc`. + """ + + funding_instructions: Optional[FundingInstructions] = None + """Details of the funding instructions export. + + This field will be present when the `category` is equal to + `funding_instructions`. + """ + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. @@ -89,8 +366,20 @@ class Export(BaseModel): resolve the issue. """ + transaction_csv: Optional[TransactionCsv] = None + """Details of the transaction CSV export. + + This field will be present when the `category` is equal to `transaction_csv`. + """ + type: Literal["export"] """A constant representing the object's type. For this resource it will always be `export`. """ + + vendor_csv: Optional[VendorCsv] = None + """Details of the vendor CSV export. + + This field will be present when the `category` is equal to `vendor_csv`. + """ From 0a36f3be8c3e21c5170072492ffb4f363a5c376a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 16:49:32 +0000 Subject: [PATCH 1121/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index e3254b405..f022366ab 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a4372a99448790d2873ec14d7e280c9cd745b2b910d7f4e4eb73fc278a4d6f2e.yml -openapi_spec_hash: 157ad870f28ecf52ef31b087e3f86ec1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e4964214d12e5148412669194fb43b6ee50ed76c5208a954c9bec8033a9a760b.yml +openapi_spec_hash: 85c9b7ba095f62dc6b5ffad9d3d8ed72 config_hash: 27e44ed36b9c5617b580ead7231a594a From ba19827d5c1c1af7ff0fa4cc9137678d9c20fb1e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Feb 2026 23:33:59 +0000 Subject: [PATCH 1122/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export.py | 29 +++++++++++++++++------------ 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index f022366ab..13631853a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e4964214d12e5148412669194fb43b6ee50ed76c5208a954c9bec8033a9a760b.yml -openapi_spec_hash: 85c9b7ba095f62dc6b5ffad9d3d8ed72 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a089f62e0825b943563fb885786306e446f8e35f777c55c024e57447194aabf.yml +openapi_spec_hash: 2d2faf76bfb1b2a3b8dac458f95abe08 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 98b2d7b91..ac4bffe5c 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -21,6 +21,7 @@ "Form1099Int", "Form1099Misc", "FundingInstructions", + "Result", "TransactionCsv", "TransactionCsvCreatedAt", "VendorCsv", @@ -188,6 +189,16 @@ class FundingInstructions(BaseModel): """The Account Number to create funding instructions for.""" +class Result(BaseModel): + """The result of the Export. + + This will be present when the Export's status transitions to `complete`. + """ + + file_id: str + """The File containing the contents of the Export.""" + + class TransactionCsvCreatedAt(BaseModel): """Filter transactions by their created date.""" @@ -318,18 +329,6 @@ class Export(BaseModel): This field will be present when the `category` is equal to `entity_csv`. """ - file_download_url: Optional[str] = None - """A URL at which the Export's file can be downloaded. - - This will be present when the Export's status transitions to `complete`. - """ - - file_id: Optional[str] = None - """The File containing the contents of the Export. - - This will be present when the Export's status transitions to `complete`. - """ - form_1099_int: Optional[Form1099Int] = None """Details of the Form 1099-INT export. @@ -357,6 +356,12 @@ class Export(BaseModel): [idempotency](https://increase.com/documentation/idempotency-keys). """ + result: Optional[Result] = None + """The result of the Export. + + This will be present when the Export's status transitions to `complete`. + """ + status: Literal["pending", "complete", "failed"] """The status of the Export. From 92e68af1d0a61b14b81d6de1af20cec344c24cb2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 01:18:58 +0000 Subject: [PATCH 1123/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/exports.py | 82 +++++++++++++++++++++++- src/increase/types/export_list_params.py | 80 ++++++++++++++--------- tests/api_resources/test_exports.py | 8 ++- 4 files changed, 138 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 13631853a..e7c0e8ddd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6a089f62e0825b943563fb885786306e446f8e35f777c55c024e57447194aabf.yml -openapi_spec_hash: 2d2faf76bfb1b2a3b8dac458f95abe08 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50d1961c2f7a9b49b1176da26978fbdf0acc1150d731540dcbeeea795ad63fd5.yml +openapi_spec_hash: c8fee0479195a45721851f5f640e5087 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index f58378da1..3af1cd013 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -196,9 +196,25 @@ def retrieve( def list( self, *, - category: export_list_params.Category | Omit = omit, + category: Literal[ + "account_statement_ofx", + "account_statement_bai2", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", + "dashboard_table_csv", + "account_verification_letter", + "funding_instructions", + "form_1099_int", + "form_1099_misc", + ] + | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, cursor: str | Omit = omit, + form_1099_int: export_list_params.Form1099Int | Omit = omit, + form_1099_misc: export_list_params.Form1099Misc | Omit = omit, idempotency_key: str | Omit = omit, limit: int | Omit = omit, status: export_list_params.Status | Omit = omit, @@ -213,6 +229,27 @@ def list( List Exports Args: + category: Filter Exports for those with the specified category. + + - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of + transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. + - `transaction_csv` - Export a CSV of all transactions for a given time range. + - `balance_csv` - Export a CSV of account balances for the dates in a given + range. + - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account + balances for the dates in a given range. + - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. + - `dashboard_table_csv` - Certain dashboard tables are available as CSV exports. + This export cannot be created via the API. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -244,6 +281,8 @@ def list( "category": category, "created_at": created_at, "cursor": cursor, + "form_1099_int": form_1099_int, + "form_1099_misc": form_1099_misc, "idempotency_key": idempotency_key, "limit": limit, "status": status, @@ -427,9 +466,25 @@ async def retrieve( def list( self, *, - category: export_list_params.Category | Omit = omit, + category: Literal[ + "account_statement_ofx", + "account_statement_bai2", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", + "dashboard_table_csv", + "account_verification_letter", + "funding_instructions", + "form_1099_int", + "form_1099_misc", + ] + | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, cursor: str | Omit = omit, + form_1099_int: export_list_params.Form1099Int | Omit = omit, + form_1099_misc: export_list_params.Form1099Misc | Omit = omit, idempotency_key: str | Omit = omit, limit: int | Omit = omit, status: export_list_params.Status | Omit = omit, @@ -444,6 +499,27 @@ def list( List Exports Args: + category: Filter Exports for those with the specified category. + + - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of + transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. + - `transaction_csv` - Export a CSV of all transactions for a given time range. + - `balance_csv` - Export a CSV of account balances for the dates in a given + range. + - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account + balances for the dates in a given range. + - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. + - `dashboard_table_csv` - Certain dashboard tables are available as CSV exports. + This export cannot be created via the API. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + cursor: Return the page of entries after this one. idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for @@ -475,6 +551,8 @@ def list( "category": category, "created_at": created_at, "cursor": cursor, + "form_1099_int": form_1099_int, + "form_1099_misc": form_1099_misc, "idempotency_key": idempotency_key, "limit": limit, "status": status, diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index 3ba2c1ea6..89ad7d728 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -8,17 +8,55 @@ from .._utils import PropertyInfo -__all__ = ["ExportListParams", "Category", "CreatedAt", "Status"] +__all__ = ["ExportListParams", "CreatedAt", "Form1099Int", "Form1099Misc", "Status"] class ExportListParams(TypedDict, total=False): - category: Category + category: Literal[ + "account_statement_ofx", + "account_statement_bai2", + "transaction_csv", + "balance_csv", + "bookkeeping_account_balance_csv", + "entity_csv", + "vendor_csv", + "dashboard_table_csv", + "account_verification_letter", + "funding_instructions", + "form_1099_int", + "form_1099_misc", + ] + """Filter Exports for those with the specified category. + + - `account_statement_ofx` - Export an Open Financial Exchange (OFX) file of + transactions and balances for a given time range and Account. + - `account_statement_bai2` - Export a BAI2 file of transactions and balances for + a given date and optional Account. + - `transaction_csv` - Export a CSV of all transactions for a given time range. + - `balance_csv` - Export a CSV of account balances for the dates in a given + range. + - `bookkeeping_account_balance_csv` - Export a CSV of bookkeeping account + balances for the dates in a given range. + - `entity_csv` - Export a CSV of entities with a given status. + - `vendor_csv` - Export a CSV of vendors added to the third-party risk + management dashboard. + - `dashboard_table_csv` - Certain dashboard tables are available as CSV exports. + This export cannot be created via the API. + - `account_verification_letter` - A PDF of an account verification letter. + - `funding_instructions` - A PDF of funding instructions. + - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. + - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + """ created_at: CreatedAt cursor: str """Return the page of entries after this one.""" + form_1099_int: Form1099Int + + form_1099_misc: Form1099Misc + idempotency_key: str """ Filter records to the one with the specified `idempotency_key` you chose for @@ -36,34 +74,6 @@ class ExportListParams(TypedDict, total=False): status: Status -_CategoryReservedKeywords = TypedDict( - "_CategoryReservedKeywords", - { - "in": List[ - Literal[ - "account_statement_ofx", - "account_statement_bai2", - "transaction_csv", - "balance_csv", - "bookkeeping_account_balance_csv", - "entity_csv", - "vendor_csv", - "dashboard_table_csv", - "account_verification_letter", - "funding_instructions", - "form_1099_int", - "form_1099_misc", - ] - ], - }, - total=False, -) - - -class Category(_CategoryReservedKeywords, total=False): - pass - - class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """ @@ -90,6 +100,16 @@ class CreatedAt(TypedDict, total=False): """ +class Form1099Int(TypedDict, total=False): + account_id: str + """Filter Form 1099-INT Exports to those for the specified Account.""" + + +class Form1099Misc(TypedDict, total=False): + account_id: str + """Filter Form 1099-MISC Exports to those for the specified Account.""" + + _StatusReservedKeywords = TypedDict( "_StatusReservedKeywords", { diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index f08797f7b..47606c797 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -151,7 +151,7 @@ def test_method_list(self, client: Increase) -> None: @parametrize def test_method_list_with_all_params(self, client: Increase) -> None: export = client.exports.list( - category={"in": ["account_statement_ofx"]}, + category="account_statement_ofx", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -159,6 +159,8 @@ def test_method_list_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, cursor="cursor", + form_1099_int={"account_id": "account_id"}, + form_1099_misc={"account_id": "account_id"}, idempotency_key="x", limit=1, status={"in": ["pending"]}, @@ -323,7 +325,7 @@ async def test_method_list(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: export = await async_client.exports.list( - category={"in": ["account_statement_ofx"]}, + category="account_statement_ofx", created_at={ "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), @@ -331,6 +333,8 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, cursor="cursor", + form_1099_int={"account_id": "account_id"}, + form_1099_misc={"account_id": "account_id"}, idempotency_key="x", limit=1, status={"in": ["pending"]}, From 48d0e1fc98dc63b03b9807d466c50f2fb6236b8b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Feb 2026 02:10:28 +0000 Subject: [PATCH 1124/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/entities.py | 4 ++-- src/increase/types/entity_create_params.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7c0e8ddd..f68c40558 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-50d1961c2f7a9b49b1176da26978fbdf0acc1150d731540dcbeeea795ad63fd5.yml -openapi_spec_hash: c8fee0479195a45721851f5f640e5087 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-43f9f952601cef2893cb1f66276d2f820ddaa8f3f628f2787bce991dbae6b079.yml +openapi_spec_hash: dde142c551d19b01bfde45f2616cb7d7 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 016f4d84d..b3f441dc7 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -106,7 +106,7 @@ def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. - risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + risk_rating: An assessment of the entity's potential risk of involvement in financial crimes, such as money laundering. supplemental_documents: Additional documentation associated with the entity. @@ -759,7 +759,7 @@ async def create( `social_security_number` or `individual_taxpayer_identification_number` identification methods. - risk_rating: An assessment of the entity’s potential risk of involvement in financial crimes, + risk_rating: An assessment of the entity's potential risk of involvement in financial crimes, such as money laundering. supplemental_documents: Additional documentation associated with the entity. diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index df2c33a90..ff277ef78 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -99,7 +99,7 @@ class EntityCreateParams(TypedDict, total=False): risk_rating: RiskRating """ - An assessment of the entity’s potential risk of involvement in financial crimes, + An assessment of the entity's potential risk of involvement in financial crimes, such as money laundering. """ @@ -821,7 +821,7 @@ class NaturalPerson(TypedDict, total=False): class RiskRating(TypedDict, total=False): """ - An assessment of the entity’s potential risk of involvement in financial crimes, such as money laundering. + An assessment of the entity's potential risk of involvement in financial crimes, such as money laundering. """ rated_at: Required[Annotated[Union[str, datetime], PropertyInfo(format="iso8601")]] From 73ed140afb4755bddeeaee268503a653cfa8e68e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 20:08:21 +0000 Subject: [PATCH 1125/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/pending_transaction.py | 39 +++++++++++++++++++ .../types/pending_transaction_list_params.py | 1 + 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index f68c40558..ce6e1039b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-43f9f952601cef2893cb1f66276d2f820ddaa8f3f628f2787bce991dbae6b079.yml -openapi_spec_hash: dde142c551d19b01bfde45f2616cb7d7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aad9dbf54c66e9aa31deefc9ea241e0c1c2155207f61d606e94478bb5d650c38.yml +openapi_spec_hash: f5e641b92f8a3feaefad8bdbc278db77 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 32f8aebdc..89727386c 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -13,6 +13,7 @@ "Source", "SourceAccountTransferInstruction", "SourceACHTransferInstruction", + "SourceBlockchainOfframpTransferInstruction", "SourceBlockchainOfframpTransferIntention", "SourceBlockchainOnrampTransferInstruction", "SourceCardAuthorization", @@ -109,6 +110,33 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class SourceBlockchainOfframpTransferInstruction(BaseModel): + """A Blockchain Off-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_instruction`. + """ + + source_blockchain_address_id: str + """The identifier of the Blockchain Address the funds were received at.""" + + transfer_id: str + """ + The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + class SourceBlockchainOfframpTransferIntention(BaseModel): """A Blockchain Off-Ramp Transfer Intention object. @@ -1132,6 +1160,13 @@ class Source(BaseModel): equal to `ach_transfer_instruction`. """ + blockchain_offramp_transfer_instruction: Optional[SourceBlockchainOfframpTransferInstruction] = None + """A Blockchain Off-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_offramp_transfer_instruction`. + """ + blockchain_offramp_transfer_intention: Optional[SourceBlockchainOfframpTransferIntention] = None """A Blockchain Off-Ramp Transfer Intention object. @@ -1176,6 +1211,7 @@ class Source(BaseModel): "swift_transfer_instruction", "card_push_transfer_instruction", "blockchain_onramp_transfer_instruction", + "blockchain_offramp_transfer_instruction", "blockchain_offramp_transfer_intention", "other", ] @@ -1214,6 +1250,9 @@ class Source(BaseModel): - `blockchain_onramp_transfer_instruction` - Blockchain On-Ramp Transfer Instruction: details will be under the `blockchain_onramp_transfer_instruction` object. + - `blockchain_offramp_transfer_instruction` - Blockchain Off-Ramp Transfer + Instruction: details will be under the + `blockchain_offramp_transfer_instruction` object. - `blockchain_offramp_transfer_intention` - Blockchain Off-Ramp Transfer Intention: details will be under the `blockchain_offramp_transfer_intention` object. diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index 7fc848e9d..cf56fdd61 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -53,6 +53,7 @@ class PendingTransactionListParams(TypedDict, total=False): "swift_transfer_instruction", "card_push_transfer_instruction", "blockchain_onramp_transfer_instruction", + "blockchain_offramp_transfer_instruction", "blockchain_offramp_transfer_intention", "other", ] From 7cc7b906dc1346b88e3a5ece62fc76b062002ead Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Feb 2026 21:40:24 +0000 Subject: [PATCH 1126/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/pending_transaction.py | 39 ------------------- .../types/pending_transaction_list_params.py | 1 - 3 files changed, 2 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index ce6e1039b..1b4f11d2d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aad9dbf54c66e9aa31deefc9ea241e0c1c2155207f61d606e94478bb5d650c38.yml -openapi_spec_hash: f5e641b92f8a3feaefad8bdbc278db77 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a466a501f72055942acea051bd2b1c735b70d65f3dd2710c5484e6125c8b640d.yml +openapi_spec_hash: d68789006ab658b380a02da2f03599b4 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 89727386c..942996b93 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -14,7 +14,6 @@ "SourceAccountTransferInstruction", "SourceACHTransferInstruction", "SourceBlockchainOfframpTransferInstruction", - "SourceBlockchainOfframpTransferIntention", "SourceBlockchainOnrampTransferInstruction", "SourceCardAuthorization", "SourceCardAuthorizationAdditionalAmounts", @@ -137,33 +136,6 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] -class SourceBlockchainOfframpTransferIntention(BaseModel): - """A Blockchain Off-Ramp Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is equal to `blockchain_offramp_transfer_intention`. - """ - - source_blockchain_address_id: str - """The identifier of the Blockchain Address the funds were received at.""" - - transfer_id: str - """ - The identifier of the Blockchain Off-Ramp Transfer that led to this Transaction. - """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] - - class SourceBlockchainOnrampTransferInstruction(BaseModel): """A Blockchain On-Ramp Transfer Instruction object. @@ -1167,13 +1139,6 @@ class Source(BaseModel): equal to `blockchain_offramp_transfer_instruction`. """ - blockchain_offramp_transfer_intention: Optional[SourceBlockchainOfframpTransferIntention] = None - """A Blockchain Off-Ramp Transfer Intention object. - - This field will be present in the JSON response if and only if `category` is - equal to `blockchain_offramp_transfer_intention`. - """ - blockchain_onramp_transfer_instruction: Optional[SourceBlockchainOnrampTransferInstruction] = None """A Blockchain On-Ramp Transfer Instruction object. @@ -1212,7 +1177,6 @@ class Source(BaseModel): "card_push_transfer_instruction", "blockchain_onramp_transfer_instruction", "blockchain_offramp_transfer_instruction", - "blockchain_offramp_transfer_intention", "other", ] """The type of the resource. @@ -1253,9 +1217,6 @@ class Source(BaseModel): - `blockchain_offramp_transfer_instruction` - Blockchain Off-Ramp Transfer Instruction: details will be under the `blockchain_offramp_transfer_instruction` object. - - `blockchain_offramp_transfer_intention` - Blockchain Off-Ramp Transfer - Intention: details will be under the `blockchain_offramp_transfer_intention` - object. - `other` - The Pending Transaction was made for an undocumented or deprecated reason. """ diff --git a/src/increase/types/pending_transaction_list_params.py b/src/increase/types/pending_transaction_list_params.py index cf56fdd61..64ffeb23c 100644 --- a/src/increase/types/pending_transaction_list_params.py +++ b/src/increase/types/pending_transaction_list_params.py @@ -54,7 +54,6 @@ class PendingTransactionListParams(TypedDict, total=False): "card_push_transfer_instruction", "blockchain_onramp_transfer_instruction", "blockchain_offramp_transfer_instruction", - "blockchain_offramp_transfer_intention", "other", ] ], From 317b88341a43b2f7f73fb77855cd6205d579263a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 05:59:49 +0000 Subject: [PATCH 1127/1325] feat(api): api update --- .stats.yml | 4 ++-- .../resources/simulations/programs.py | 24 ++----------------- .../simulations/program_create_params.py | 11 +-------- .../simulations/test_programs.py | 4 ++-- 4 files changed, 7 insertions(+), 36 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1b4f11d2d..622833585 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a466a501f72055942acea051bd2b1c735b70d65f3dd2710c5484e6125c8b640d.yml -openapi_spec_hash: d68789006ab658b380a02da2f03599b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b85fc3d079fefa2ba0b1601db0bac8ca23c0ddb9c5ffe03e6727d666080d7585.yml +openapi_spec_hash: e1cf9b81380c14c64dfe9d74be4fff97 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/simulations/programs.py b/src/increase/resources/simulations/programs.py index 2200fd8e1..abf50b7f7 100644 --- a/src/increase/resources/simulations/programs.py +++ b/src/increase/resources/simulations/programs.py @@ -47,15 +47,7 @@ def create( self, *, name: str, - bank: Literal[ - "blue_ridge_bank", - "core_bank", - "first_internet_bank", - "global_innovations_bank", - "grasshopper_bank", - "twin_city_bank", - ] - | Omit = omit, + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank", "twin_city_bank"] | Omit = omit, lending_maximum_extendable_credit: int | Omit = omit, reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -78,10 +70,8 @@ def create( bank: The bank for the program's accounts, defaults to First Internet Bank. - - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank - `twin_city_bank` - Twin City Bank @@ -145,15 +135,7 @@ async def create( self, *, name: str, - bank: Literal[ - "blue_ridge_bank", - "core_bank", - "first_internet_bank", - "global_innovations_bank", - "grasshopper_bank", - "twin_city_bank", - ] - | Omit = omit, + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank", "twin_city_bank"] | Omit = omit, lending_maximum_extendable_credit: int | Omit = omit, reserve_account_id: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -176,10 +158,8 @@ async def create( bank: The bank for the program's accounts, defaults to First Internet Bank. - - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank - `twin_city_bank` - Twin City Bank diff --git a/src/increase/types/simulations/program_create_params.py b/src/increase/types/simulations/program_create_params.py index 24da056c6..0985e9ca9 100644 --- a/src/increase/types/simulations/program_create_params.py +++ b/src/increase/types/simulations/program_create_params.py @@ -11,20 +11,11 @@ class ProgramCreateParams(TypedDict, total=False): name: Required[str] """The name of the program being added.""" - bank: Literal[ - "blue_ridge_bank", - "core_bank", - "first_internet_bank", - "global_innovations_bank", - "grasshopper_bank", - "twin_city_bank", - ] + bank: Literal["core_bank", "first_internet_bank", "grasshopper_bank", "twin_city_bank"] """The bank for the program's accounts, defaults to First Internet Bank. - - `blue_ridge_bank` - Blue Ridge Bank, N.A. - `core_bank` - Core Bank - `first_internet_bank` - First Internet Bank of Indiana - - `global_innovations_bank` - Global Innovations Bank - `grasshopper_bank` - Grasshopper Bank - `twin_city_bank` - Twin City Bank """ diff --git a/tests/api_resources/simulations/test_programs.py b/tests/api_resources/simulations/test_programs.py index f4c3ce477..72c010c9e 100644 --- a/tests/api_resources/simulations/test_programs.py +++ b/tests/api_resources/simulations/test_programs.py @@ -28,7 +28,7 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: program = client.simulations.programs.create( name="For Benefit Of", - bank="blue_ridge_bank", + bank="core_bank", lending_maximum_extendable_credit=0, reserve_account_id="reserve_account_id", ) @@ -75,7 +75,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: program = await async_client.simulations.programs.create( name="For Benefit Of", - bank="blue_ridge_bank", + bank="core_bank", lending_maximum_extendable_credit=0, reserve_account_id="reserve_account_id", ) From 6ab871fa28be25ba62d41dc24f4ad5b071ece43d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Feb 2026 19:19:04 +0000 Subject: [PATCH 1128/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/ach_prenotifications.py | 42 ++++++++++----- src/increase/resources/ach_transfers.py | 52 +++++++++++++------ src/increase/types/ach_prenotification.py | 22 +++++--- .../ach_prenotification_create_params.py | 22 +++++--- src/increase/types/ach_transfer.py | 22 +++++--- .../types/ach_transfer_create_params.py | 29 +++++++---- 7 files changed, 136 insertions(+), 57 deletions(-) diff --git a/.stats.yml b/.stats.yml index 622833585..625e421df 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b85fc3d079fefa2ba0b1601db0bac8ca23c0ddb9c5ffe03e6727d666080d7585.yml -openapi_spec_hash: e1cf9b81380c14c64dfe9d74be4fff97 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cff24fe63c8cb06a46048b355f873c22def0798a38de892671d379e58d98bc03.yml +openapi_spec_hash: 4f7ae65440fefa73441023480d6ac9a4 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 7d2af5fe1..04c6bbdd5 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -110,12 +110,21 @@ def create( individual_name: The name of therecipient. This value is informational and not verified by the recipient's bank. - standard_entry_class_code: The Standard Entry Class (SEC) code to use for the ACH Prenotification. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + standard_entry_class_code: The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the ACH Prenotification. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. extra_headers: Send extra headers @@ -336,12 +345,21 @@ async def create( individual_name: The name of therecipient. This value is informational and not verified by the recipient's bank. - standard_entry_class_code: The Standard Entry Class (SEC) code to use for the ACH Prenotification. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + standard_entry_class_code: The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the ACH Prenotification. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. extra_headers: Send extra headers diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index d07b5534a..04b4d624b 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -108,8 +108,9 @@ def create( company_discretionary_data: The data you choose to associate with the transfer. This is included in the transfer data sent to the receiving bank. - company_entry_description: A description of the transfer. This is included in the transfer data sent to the - receiving bank. + company_entry_description: A description of the transfer, included in the transfer data sent to the + receiving bank. Standardized formatting may be required, for example `PAYROLL` + for payroll-related Prearranged Payments and Deposits (PPD) credit transfers. company_name: The name by which the recipient knows you. This is included in the transfer data sent to the receiving bank. @@ -145,12 +146,21 @@ def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. - standard_entry_class_code: The Standard Entry Class (SEC) code to use for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + standard_entry_class_code: The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. transaction_timing: The timing of the transaction. @@ -475,8 +485,9 @@ async def create( company_discretionary_data: The data you choose to associate with the transfer. This is included in the transfer data sent to the receiving bank. - company_entry_description: A description of the transfer. This is included in the transfer data sent to the - receiving bank. + company_entry_description: A description of the transfer, included in the transfer data sent to the + receiving bank. Standardized formatting may be required, for example `PAYROLL` + for payroll-related Prearranged Payments and Deposits (PPD) credit transfers. company_name: The name by which the recipient knows you. This is included in the transfer data sent to the receiving bank. @@ -512,12 +523,21 @@ async def create( routing_number: The American Bankers' Association (ABA) Routing Transit Number (RTN) for the destination account. - standard_entry_class_code: The Standard Entry Class (SEC) code to use for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + standard_entry_class_code: The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. transaction_timing: The timing of the transaction. diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py index 19afbc81b..54f4028f8 100644 --- a/src/increase/types/ach_prenotification.py +++ b/src/increase/types/ach_prenotification.py @@ -404,12 +404,22 @@ class ACHPrenotification(BaseModel): "internet_initiated", ] ] = None - """The Standard Entry Class (SEC) code to use for the ACH Prenotification. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + """ + The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the ACH Prenotification. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. """ status: Literal["pending_submitting", "requires_attention", "returned", "submitted"] diff --git a/src/increase/types/ach_prenotification_create_params.py b/src/increase/types/ach_prenotification_create_params.py index d3b02fd90..9a2e83e89 100644 --- a/src/increase/types/ach_prenotification_create_params.py +++ b/src/increase/types/ach_prenotification_create_params.py @@ -67,10 +67,20 @@ class ACHPrenotificationCreateParams(TypedDict, total=False): "prearranged_payments_and_deposit", "internet_initiated", ] - """The Standard Entry Class (SEC) code to use for the ACH Prenotification. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + """ + The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the ACH Prenotification. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. """ diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 0639334bb..10e97bc34 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -848,12 +848,22 @@ class ACHTransfer(BaseModel): "prearranged_payments_and_deposit", "internet_initiated", ] - """The Standard Entry Class (SEC) code to use for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + """ + The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. """ statement_descriptor: str diff --git a/src/increase/types/ach_transfer_create_params.py b/src/increase/types/ach_transfer_create_params.py index ecb07fbbe..2b795a738 100644 --- a/src/increase/types/ach_transfer_create_params.py +++ b/src/increase/types/ach_transfer_create_params.py @@ -64,9 +64,10 @@ class ACHTransferCreateParams(TypedDict, total=False): """ company_entry_description: str - """A description of the transfer. - - This is included in the transfer data sent to the receiving bank. + """ + A description of the transfer, included in the transfer data sent to the + receiving bank. Standardized formatting may be required, for example `PAYROLL` + for payroll-related Prearranged Payments and Deposits (PPD) credit transfers. """ company_name: str @@ -132,12 +133,22 @@ class ACHTransferCreateParams(TypedDict, total=False): "prearranged_payments_and_deposit", "internet_initiated", ] - """The Standard Entry Class (SEC) code to use for the transfer. - - - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD). - - `corporate_trade_exchange` - Corporate Trade Exchange (CTX). - - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD). - - `internet_initiated` - Internet Initiated (WEB). + """ + The + [Standard Entry Class (SEC) code](/documentation/ach-standard-entry-class-codes) + to use for the transfer. + + - `corporate_credit_or_debit` - Corporate Credit and Debit (CCD) is used for + business-to-business payments. + - `corporate_trade_exchange` - Corporate Trade Exchange (CTX) allows for + including extensive remittance information with business-to-business payments. + - `prearranged_payments_and_deposit` - Prearranged Payments and Deposits (PPD) + is used for credits or debits originated by an organization to a consumer, + such as payroll direct deposits. + - `internet_initiated` - Internet Initiated (WEB) is used for consumer payments + initiated or authorized via the Internet. Debits can only be initiated by + non-consumers to debit a consumer’s account. Credits can only be used for + consumer to consumer transactions. """ transaction_timing: Literal["synchronous", "asynchronous"] From c09f6c2f884c1b2dc8b475277b83cecb11435588 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 01:32:09 +0000 Subject: [PATCH 1129/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/account_transfer.py | 6 +- src/increase/types/ach_transfer.py | 6 +- src/increase/types/card_dispute.py | 50 ++-- src/increase/types/card_payment.py | 104 ++++---- src/increase/types/card_push_transfer.py | 6 +- src/increase/types/card_validation.py | 6 +- src/increase/types/check_transfer.py | 6 +- src/increase/types/declined_transaction.py | 28 +- src/increase/types/fednow_transfer.py | 6 +- src/increase/types/pending_transaction.py | 86 +++--- .../types/real_time_payments_transfer.py | 6 +- src/increase/types/swift_transfer.py | 6 +- src/increase/types/transaction.py | 252 +++++++++--------- src/increase/types/wire_transfer.py | 6 +- 15 files changed, 289 insertions(+), 289 deletions(-) diff --git a/.stats.yml b/.stats.yml index 625e421df..d4eadd590 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cff24fe63c8cb06a46048b355f873c22def0798a38de892671d379e58d98bc03.yml -openapi_spec_hash: 4f7ae65440fefa73441023480d6ac9a4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-845aba046473ba39ae898570153537fb31dd6f8cb260dd8478a14fd4275ca97f.yml +openapi_spec_hash: 8afbe65f9d6614f0960f141ae0de0c39 config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/account_transfer.py b/src/increase/types/account_transfer.py index 22ba640bd..13b58f2e5 100644 --- a/src/increase/types/account_transfer.py +++ b/src/increase/types/account_transfer.py @@ -79,9 +79,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -92,6 +89,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index 10e97bc34..bce4e8f4d 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -164,9 +164,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -177,6 +174,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/card_dispute.py b/src/increase/types/card_dispute.py index b042c5caa..146616e14 100644 --- a/src/increase/types/card_dispute.py +++ b/src/increase/types/card_dispute.py @@ -802,6 +802,15 @@ class VisaNetworkEvent(BaseModel): Network Event: details will be under the `user_withdrawal_submitted` object. """ + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Visa Card Dispute Network Event was created. + """ + + dispute_financial_transaction_id: Optional[str] = None + """The dispute financial transaction that resulted from the network event, if any.""" + chargeback_accepted: Optional[VisaNetworkEventChargebackAccepted] = None """A Card Dispute Chargeback Accepted Visa Network Event object. @@ -829,15 +838,6 @@ class VisaNetworkEvent(BaseModel): has timed out in the user's favor. """ - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Visa Card Dispute Network Event was created. - """ - - dispute_financial_transaction_id: Optional[str] = None - """The dispute financial transaction that resulted from the network event, if any.""" - merchant_prearbitration_decline_submitted: Optional[VisaNetworkEventMerchantPrearbitrationDeclineSubmitted] = None """ A Card Dispute Merchant Pre-Arbitration Decline Submitted Visa Network Event @@ -2523,14 +2523,6 @@ class VisaUserSubmission(BaseModel): Submission: details will be under the `user_prearbitration` object. """ - chargeback: Optional[VisaUserSubmissionChargeback] = None - """A Visa Card Dispute Chargeback User Submission Chargeback Details object. - - This field will be present in the JSON response if and only if `category` is - equal to `chargeback`. Contains the details specific to a Visa chargeback User - Submission for a Card Dispute. - """ - created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which @@ -2555,14 +2547,6 @@ class VisaUserSubmission(BaseModel): Visa Card Dispute. """ - merchant_prearbitration_decline: Optional[VisaUserSubmissionMerchantPrearbitrationDecline] = None - """A Visa Card Dispute Merchant Pre-Arbitration Decline User Submission object. - - This field will be present in the JSON response if and only if `category` is - equal to `merchant_prearbitration_decline`. Contains the details specific to a - merchant prearbitration decline Visa Card Dispute User Submission. - """ - status: Literal["abandoned", "accepted", "further_information_requested", "pending_reviewing"] """The status of the Visa Card Dispute User Submission. @@ -2579,6 +2563,22 @@ class VisaUserSubmission(BaseModel): the Visa Card Dispute User Submission was updated. """ + chargeback: Optional[VisaUserSubmissionChargeback] = None + """A Visa Card Dispute Chargeback User Submission Chargeback Details object. + + This field will be present in the JSON response if and only if `category` is + equal to `chargeback`. Contains the details specific to a Visa chargeback User + Submission for a Card Dispute. + """ + + merchant_prearbitration_decline: Optional[VisaUserSubmissionMerchantPrearbitrationDecline] = None + """A Visa Card Dispute Merchant Pre-Arbitration Decline User Submission object. + + This field will be present in the JSON response if and only if `category` is + equal to `merchant_prearbitration_decline`. Contains the details specific to a + merchant prearbitration decline Visa Card Dispute User Submission. + """ + user_prearbitration: Optional[VisaUserSubmissionUserPrearbitration] = None """A Visa Card Dispute User-Initiated Pre-Arbitration User Submission object. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f82260f8a..b7ad53da9 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -5510,6 +5510,58 @@ class ElementOther(BaseModel): class Element(BaseModel): + category: Literal[ + "card_authorization", + "card_authentication", + "card_balance_inquiry", + "card_validation", + "card_decline", + "card_reversal", + "card_authorization_expiration", + "card_increment", + "card_settlement", + "card_refund", + "card_fuel_confirmation", + "card_financial", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `card_authorization` - Card Authorization: details will be under the + `card_authorization` object. + - `card_authentication` - Card Authentication: details will be under the + `card_authentication` object. + - `card_balance_inquiry` - Card Balance Inquiry: details will be under the + `card_balance_inquiry` object. + - `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. + - `card_reversal` - Card Reversal: details will be under the `card_reversal` + object. + - `card_authorization_expiration` - Card Authorization Expiration: details will + be under the `card_authorization_expiration` object. + - `card_increment` - Card Increment: details will be under the `card_increment` + object. + - `card_settlement` - Card Settlement: details will be under the + `card_settlement` object. + - `card_refund` - Card Refund: details will be under the `card_refund` object. + - `card_fuel_confirmation` - Card Fuel Confirmation: details will be under the + `card_fuel_confirmation` object. + - `card_financial` - Card Financial: details will be under the `card_financial` + object. + - `other` - Unknown card payment element. + """ + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the card payment element was created. + """ + card_authentication: Optional[ElementCardAuthentication] = None """A Card Authentication object. @@ -5609,58 +5661,6 @@ class Element(BaseModel): Verification Value are valid. """ - category: Literal[ - "card_authorization", - "card_authentication", - "card_balance_inquiry", - "card_validation", - "card_decline", - "card_reversal", - "card_authorization_expiration", - "card_increment", - "card_settlement", - "card_refund", - "card_fuel_confirmation", - "card_financial", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `card_authorization` - Card Authorization: details will be under the - `card_authorization` object. - - `card_authentication` - Card Authentication: details will be under the - `card_authentication` object. - - `card_balance_inquiry` - Card Balance Inquiry: details will be under the - `card_balance_inquiry` object. - - `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. - - `card_reversal` - Card Reversal: details will be under the `card_reversal` - object. - - `card_authorization_expiration` - Card Authorization Expiration: details will - be under the `card_authorization_expiration` object. - - `card_increment` - Card Increment: details will be under the `card_increment` - object. - - `card_settlement` - Card Settlement: details will be under the - `card_settlement` object. - - `card_refund` - Card Refund: details will be under the `card_refund` object. - - `card_fuel_confirmation` - Card Fuel Confirmation: details will be under the - `card_fuel_confirmation` object. - - `card_financial` - Card Financial: details will be under the `card_financial` - object. - - `other` - Unknown card payment element. - """ - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the card payment element was created. - """ - other: Optional[ElementOther] = None """ If the category of this Transaction source is equal to `other`, this field will diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index f4965f0ae..e0506b2c1 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -112,9 +112,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -125,6 +122,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 3d8f45370..8c27a071f 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -122,9 +122,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the validation, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -135,6 +132,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index f9894a05b..de76a0375 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -89,9 +89,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -102,6 +99,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 04143eaef..9f6d8a3b5 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -1225,20 +1225,6 @@ class Source(BaseModel): This is an object giving more details on the network-level event that caused the Declined Transaction. For example, for a card transaction this lists the merchant's industry and location. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future. """ - ach_decline: Optional[SourceACHDecline] = None - """An ACH Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_decline`. - """ - - card_decline: Optional[SourceCardDecline] = None - """A Card Decline object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_decline`. - """ - category: Literal[ "ach_decline", "card_decline", @@ -1272,6 +1258,20 @@ class Source(BaseModel): reason. """ + ach_decline: Optional[SourceACHDecline] = None + """An ACH Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_decline`. + """ + + card_decline: Optional[SourceCardDecline] = None + """A Card Decline object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_decline`. + """ + check_decline: Optional[SourceCheckDecline] = None """A Check Decline object. diff --git a/src/increase/types/fednow_transfer.py b/src/increase/types/fednow_transfer.py index 03bf44291..15274ed46 100644 --- a/src/increase/types/fednow_transfer.py +++ b/src/increase/types/fednow_transfer.py @@ -51,9 +51,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -64,6 +61,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 942996b93..0dab63a04 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -1118,49 +1118,6 @@ class Source(BaseModel): This is an object giving more details on the network-level event that caused the Pending Transaction. For example, for a card transaction this lists the merchant's industry and location. """ - account_transfer_instruction: Optional[SourceAccountTransferInstruction] = None - """An Account Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `account_transfer_instruction`. - """ - - ach_transfer_instruction: Optional[SourceACHTransferInstruction] = None - """An ACH Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `ach_transfer_instruction`. - """ - - blockchain_offramp_transfer_instruction: Optional[SourceBlockchainOfframpTransferInstruction] = None - """A Blockchain Off-Ramp Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `blockchain_offramp_transfer_instruction`. - """ - - blockchain_onramp_transfer_instruction: Optional[SourceBlockchainOnrampTransferInstruction] = None - """A Blockchain On-Ramp Transfer Instruction object. - - This field will be present in the JSON response if and only if `category` is - equal to `blockchain_onramp_transfer_instruction`. - """ - - card_authorization: Optional[SourceCardAuthorization] = None - """A Card Authorization object. - - This field will be present in the JSON response if and only if `category` is - equal to `card_authorization`. Card Authorizations are temporary holds placed on - 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", @@ -1221,6 +1178,49 @@ class Source(BaseModel): reason. """ + account_transfer_instruction: Optional[SourceAccountTransferInstruction] = None + """An Account Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `account_transfer_instruction`. + """ + + ach_transfer_instruction: Optional[SourceACHTransferInstruction] = None + """An ACH Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `ach_transfer_instruction`. + """ + + blockchain_offramp_transfer_instruction: Optional[SourceBlockchainOfframpTransferInstruction] = None + """A Blockchain Off-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_offramp_transfer_instruction`. + """ + + blockchain_onramp_transfer_instruction: Optional[SourceBlockchainOnrampTransferInstruction] = None + """A Blockchain On-Ramp Transfer Instruction object. + + This field will be present in the JSON response if and only if `category` is + equal to `blockchain_onramp_transfer_instruction`. + """ + + card_authorization: Optional[SourceCardAuthorization] = None + """A Card Authorization object. + + This field will be present in the JSON response if and only if `category` is + equal to `card_authorization`. Card Authorizations are temporary holds placed on + 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`. + """ + check_deposit_instruction: Optional[SourceCheckDepositInstruction] = None """A Check Deposit Instruction object. diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 127baf9d6..8b7f02d34 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -91,9 +91,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -104,6 +101,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/swift_transfer.py b/src/increase/types/swift_transfer.py index aab32acea..5344a4452 100644 --- a/src/increase/types/swift_transfer.py +++ b/src/increase/types/swift_transfer.py @@ -41,9 +41,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -54,6 +51,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ccdbb1d76..73790f79c 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -3673,6 +3673,132 @@ class Source(BaseModel): This is an object giving more details on the network-level event that caused the Transaction. Note that for backwards compatibility reasons, additional undocumented keys may appear in this object. These should be treated as deprecated and will be removed in the future. """ + category: Literal[ + "account_transfer_intention", + "ach_transfer_intention", + "ach_transfer_rejection", + "ach_transfer_return", + "cashback_payment", + "card_dispute_acceptance", + "card_dispute_financial", + "card_dispute_loss", + "card_refund", + "card_settlement", + "card_financial", + "card_revenue_payment", + "check_deposit_acceptance", + "check_deposit_return", + "fednow_transfer_acknowledgement", + "check_transfer_deposit", + "fee_payment", + "inbound_ach_transfer", + "inbound_ach_transfer_return_intention", + "inbound_check_deposit_return_intention", + "inbound_check_adjustment", + "inbound_fednow_transfer_confirmation", + "inbound_real_time_payments_transfer_confirmation", + "inbound_wire_reversal", + "inbound_wire_transfer", + "inbound_wire_transfer_reversal", + "interest_payment", + "internal_source", + "real_time_payments_transfer_acknowledgement", + "sample_funds", + "wire_transfer_intention", + "swift_transfer_intention", + "swift_transfer_return", + "card_push_transfer_acceptance", + "account_revenue_payment", + "blockchain_onramp_transfer_intention", + "blockchain_offramp_transfer_settlement", + "other", + ] + """The type of the resource. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `account_transfer_intention` - Account Transfer Intention: details will be + under the `account_transfer_intention` object. + - `ach_transfer_intention` - ACH Transfer Intention: details will be under the + `ach_transfer_intention` object. + - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the + `ach_transfer_rejection` object. + - `ach_transfer_return` - ACH Transfer Return: details will be under the + `ach_transfer_return` object. + - `cashback_payment` - Cashback Payment: details will be under the + `cashback_payment` object. + - `card_dispute_acceptance` - Legacy Card Dispute Acceptance: details will be + under the `card_dispute_acceptance` object. + - `card_dispute_financial` - Card Dispute Financial: details will be under the + `card_dispute_financial` object. + - `card_dispute_loss` - Legacy Card Dispute Loss: details will be under the + `card_dispute_loss` object. + - `card_refund` - Card Refund: details will be under the `card_refund` object. + - `card_settlement` - Card Settlement: details will be under the + `card_settlement` object. + - `card_financial` - Card Financial: details will be under the `card_financial` + object. + - `card_revenue_payment` - Card Revenue Payment: details will be under the + `card_revenue_payment` object. + - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under + the `check_deposit_acceptance` object. + - `check_deposit_return` - Check Deposit Return: details will be under the + `check_deposit_return` object. + - `fednow_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details + will be under the `fednow_transfer_acknowledgement` object. + - `check_transfer_deposit` - Check Transfer Deposit: details will be under the + `check_transfer_deposit` object. + - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. + - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under + the `inbound_ach_transfer` object. + - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return + Intention: details will be under the `inbound_ach_transfer_return_intention` + object. + - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return + Intention: details will be under the `inbound_check_deposit_return_intention` + object. + - `inbound_check_adjustment` - Inbound Check Adjustment: details will be under + the `inbound_check_adjustment` object. + - `inbound_fednow_transfer_confirmation` - Inbound FedNow Transfer Confirmation: + details will be under the `inbound_fednow_transfer_confirmation` object. + - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time + Payments Transfer Confirmation: details will be under the + `inbound_real_time_payments_transfer_confirmation` object. + - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the + `inbound_wire_reversal` object. + - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be + under the `inbound_wire_transfer` object. + - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention: + details will be under the `inbound_wire_transfer_reversal` object. + - `interest_payment` - Interest Payment: details will be under the + `interest_payment` object. + - `internal_source` - Internal Source: details will be under the + `internal_source` object. + - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer + Acknowledgement: details will be under the + `real_time_payments_transfer_acknowledgement` object. + - `sample_funds` - Sample Funds: details will be under the `sample_funds` + object. + - `wire_transfer_intention` - Wire Transfer Intention: details will be under the + `wire_transfer_intention` object. + - `swift_transfer_intention` - Swift Transfer Intention: details will be under + the `swift_transfer_intention` object. + - `swift_transfer_return` - Swift Transfer Return: details will be under the + `swift_transfer_return` object. + - `card_push_transfer_acceptance` - Card Push Transfer Acceptance: details will + be under the `card_push_transfer_acceptance` object. + - `account_revenue_payment` - Account Revenue Payment: details will be under the + `account_revenue_payment` object. + - `blockchain_onramp_transfer_intention` - Blockchain On-Ramp Transfer + Intention: details will be under the `blockchain_onramp_transfer_intention` + object. + - `blockchain_offramp_transfer_settlement` - Blockchain Off-Ramp Transfer + Settlement: details will be under the `blockchain_offramp_transfer_settlement` + object. + - `other` - The Transaction was made for an undocumented or deprecated reason. + """ + account_revenue_payment: Optional[SourceAccountRevenuePayment] = None """An Account Revenue Payment object. @@ -3807,132 +3933,6 @@ class Source(BaseModel): month's transactions. """ - category: Literal[ - "account_transfer_intention", - "ach_transfer_intention", - "ach_transfer_rejection", - "ach_transfer_return", - "cashback_payment", - "card_dispute_acceptance", - "card_dispute_financial", - "card_dispute_loss", - "card_refund", - "card_settlement", - "card_financial", - "card_revenue_payment", - "check_deposit_acceptance", - "check_deposit_return", - "fednow_transfer_acknowledgement", - "check_transfer_deposit", - "fee_payment", - "inbound_ach_transfer", - "inbound_ach_transfer_return_intention", - "inbound_check_deposit_return_intention", - "inbound_check_adjustment", - "inbound_fednow_transfer_confirmation", - "inbound_real_time_payments_transfer_confirmation", - "inbound_wire_reversal", - "inbound_wire_transfer", - "inbound_wire_transfer_reversal", - "interest_payment", - "internal_source", - "real_time_payments_transfer_acknowledgement", - "sample_funds", - "wire_transfer_intention", - "swift_transfer_intention", - "swift_transfer_return", - "card_push_transfer_acceptance", - "account_revenue_payment", - "blockchain_onramp_transfer_intention", - "blockchain_offramp_transfer_settlement", - "other", - ] - """The type of the resource. - - We may add additional possible values for this enum over time; your application - should be able to handle such additions gracefully. - - - `account_transfer_intention` - Account Transfer Intention: details will be - under the `account_transfer_intention` object. - - `ach_transfer_intention` - ACH Transfer Intention: details will be under the - `ach_transfer_intention` object. - - `ach_transfer_rejection` - ACH Transfer Rejection: details will be under the - `ach_transfer_rejection` object. - - `ach_transfer_return` - ACH Transfer Return: details will be under the - `ach_transfer_return` object. - - `cashback_payment` - Cashback Payment: details will be under the - `cashback_payment` object. - - `card_dispute_acceptance` - Legacy Card Dispute Acceptance: details will be - under the `card_dispute_acceptance` object. - - `card_dispute_financial` - Card Dispute Financial: details will be under the - `card_dispute_financial` object. - - `card_dispute_loss` - Legacy Card Dispute Loss: details will be under the - `card_dispute_loss` object. - - `card_refund` - Card Refund: details will be under the `card_refund` object. - - `card_settlement` - Card Settlement: details will be under the - `card_settlement` object. - - `card_financial` - Card Financial: details will be under the `card_financial` - object. - - `card_revenue_payment` - Card Revenue Payment: details will be under the - `card_revenue_payment` object. - - `check_deposit_acceptance` - Check Deposit Acceptance: details will be under - the `check_deposit_acceptance` object. - - `check_deposit_return` - Check Deposit Return: details will be under the - `check_deposit_return` object. - - `fednow_transfer_acknowledgement` - FedNow Transfer Acknowledgement: details - will be under the `fednow_transfer_acknowledgement` object. - - `check_transfer_deposit` - Check Transfer Deposit: details will be under the - `check_transfer_deposit` object. - - `fee_payment` - Fee Payment: details will be under the `fee_payment` object. - - `inbound_ach_transfer` - Inbound ACH Transfer Intention: details will be under - the `inbound_ach_transfer` object. - - `inbound_ach_transfer_return_intention` - Inbound ACH Transfer Return - Intention: details will be under the `inbound_ach_transfer_return_intention` - object. - - `inbound_check_deposit_return_intention` - Inbound Check Deposit Return - Intention: details will be under the `inbound_check_deposit_return_intention` - object. - - `inbound_check_adjustment` - Inbound Check Adjustment: details will be under - the `inbound_check_adjustment` object. - - `inbound_fednow_transfer_confirmation` - Inbound FedNow Transfer Confirmation: - details will be under the `inbound_fednow_transfer_confirmation` object. - - `inbound_real_time_payments_transfer_confirmation` - Inbound Real-Time - Payments Transfer Confirmation: details will be under the - `inbound_real_time_payments_transfer_confirmation` object. - - `inbound_wire_reversal` - Inbound Wire Reversal: details will be under the - `inbound_wire_reversal` object. - - `inbound_wire_transfer` - Inbound Wire Transfer Intention: details will be - under the `inbound_wire_transfer` object. - - `inbound_wire_transfer_reversal` - Inbound Wire Transfer Reversal Intention: - details will be under the `inbound_wire_transfer_reversal` object. - - `interest_payment` - Interest Payment: details will be under the - `interest_payment` object. - - `internal_source` - Internal Source: details will be under the - `internal_source` object. - - `real_time_payments_transfer_acknowledgement` - Real-Time Payments Transfer - Acknowledgement: details will be under the - `real_time_payments_transfer_acknowledgement` object. - - `sample_funds` - Sample Funds: details will be under the `sample_funds` - object. - - `wire_transfer_intention` - Wire Transfer Intention: details will be under the - `wire_transfer_intention` object. - - `swift_transfer_intention` - Swift Transfer Intention: details will be under - the `swift_transfer_intention` object. - - `swift_transfer_return` - Swift Transfer Return: details will be under the - `swift_transfer_return` object. - - `card_push_transfer_acceptance` - Card Push Transfer Acceptance: details will - be under the `card_push_transfer_acceptance` object. - - `account_revenue_payment` - Account Revenue Payment: details will be under the - `account_revenue_payment` object. - - `blockchain_onramp_transfer_intention` - Blockchain On-Ramp Transfer - Intention: details will be under the `blockchain_onramp_transfer_intention` - object. - - `blockchain_offramp_transfer_settlement` - Blockchain Off-Ramp Transfer - Settlement: details will be under the `blockchain_offramp_transfer_settlement` - object. - - `other` - The Transaction was made for an undocumented or deprecated reason. - """ - check_deposit_acceptance: Optional[SourceCheckDepositAcceptance] = None """A Check Deposit Acceptance object. diff --git a/src/increase/types/wire_transfer.py b/src/increase/types/wire_transfer.py index ec289f225..7f13befab 100644 --- a/src/increase/types/wire_transfer.py +++ b/src/increase/types/wire_transfer.py @@ -90,9 +90,6 @@ class CreatedByUser(BaseModel): class CreatedBy(BaseModel): """What object created the transfer, either via the API or the dashboard.""" - api_key: Optional[CreatedByAPIKey] = None - """If present, details about the API key that created the transfer.""" - category: Literal["api_key", "oauth_application", "user"] """The type of object that created this transfer. @@ -103,6 +100,9 @@ class CreatedBy(BaseModel): object. """ + api_key: Optional[CreatedByAPIKey] = None + """If present, details about the API key that created the transfer.""" + oauth_application: Optional[CreatedByOAuthApplication] = None """If present, details about the OAuth Application that created the transfer.""" From abeeadee8a07fea2f1fafec3d0fb24eb648066a7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 02:06:58 +0000 Subject: [PATCH 1130/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4eadd590..81a2f2355 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-845aba046473ba39ae898570153537fb31dd6f8cb260dd8478a14fd4275ca97f.yml -openapi_spec_hash: 8afbe65f9d6614f0960f141ae0de0c39 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f8d314503b180fd687439339078cfb52aece501f8733653d3efdb965373add0.yml +openapi_spec_hash: ced54b80faed28bc8d99bf1584ea129c config_hash: 27e44ed36b9c5617b580ead7231a594a From 2f8f3d0575386b54ce96d2bb53d88f270d9ad835 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 02:28:22 +0000 Subject: [PATCH 1131/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/digital_card_profile.py | 16 +++++++++++++++- src/increase/types/entity.py | 12 ++++++++++++ src/increase/types/export.py | 16 +++++++++++++++- src/increase/types/inbound_ach_transfer.py | 16 +++++++++++++++- src/increase/types/lockbox.py | 16 +++++++++++++++- 6 files changed, 74 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 81a2f2355..c1766b302 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6f8d314503b180fd687439339078cfb52aece501f8733653d3efdb965373add0.yml -openapi_spec_hash: ced54b80faed28bc8d99bf1584ea129c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-875c81df98fc0021d5b684278df406d97756b6b35de0dc6080b2b203296b50cb.yml +openapi_spec_hash: b820a82f312bdc6dc2270a8aa94d4d3f config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py index 9c5a9a596..1bb47d09e 100644 --- a/src/increase/types/digital_card_profile.py +++ b/src/increase/types/digital_card_profile.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["DigitalCardProfile", "TextColor"] @@ -86,3 +88,15 @@ class DigitalCardProfile(BaseModel): For this resource it will always be `digital_card_profile`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 3670d6329..84eb64aa9 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -810,3 +810,15 @@ class Entity(BaseModel): For this resource it will always be `entity`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/export.py b/src/increase/types/export.py index ac4bffe5c..d5c900725 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -388,3 +390,15 @@ class Export(BaseModel): This field will be present when the `category` is equal to `vendor_csv`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index bce55afef..9663dedcc 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date, datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = [ @@ -583,3 +585,15 @@ class InboundACHTransfer(BaseModel): For this resource it will always be `inbound_ach_transfer`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/lockbox.py b/src/increase/types/lockbox.py index 283784228..76a76c374 100644 --- a/src/increase/types/lockbox.py +++ b/src/increase/types/lockbox.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["Lockbox", "Address"] @@ -91,3 +93,15 @@ class Lockbox(BaseModel): For this resource it will always be `lockbox`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From b39462891c382dfd24f1b6c1119f248104f4ef0c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 02:56:48 +0000 Subject: [PATCH 1132/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c1766b302..337db8200 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-875c81df98fc0021d5b684278df406d97756b6b35de0dc6080b2b203296b50cb.yml -openapi_spec_hash: b820a82f312bdc6dc2270a8aa94d4d3f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-96e762baf33149f74aea5ea416aa9c636d16f4646b22d139aa4326c4a86d1d19.yml +openapi_spec_hash: e1855fb0fad48e346d04e970a44db563 config_hash: 27e44ed36b9c5617b580ead7231a594a From 4d2aed67c4094d4b9e36402f141ce085d883ae92 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 03:45:07 +0000 Subject: [PATCH 1133/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 337db8200..00efb20df 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-96e762baf33149f74aea5ea416aa9c636d16f4646b22d139aa4326c4a86d1d19.yml -openapi_spec_hash: e1855fb0fad48e346d04e970a44db563 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a4aeb17e7efa501dbb3e6e94cd1182e70fd328179628e5ee5c407df0bc96c13a.yml +openapi_spec_hash: 1cea7fff3dc7f3a20f075d3decd6947a config_hash: 27e44ed36b9c5617b580ead7231a594a From 2a36007478f39ead5e4d625cee6223316c11b340 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 04:44:07 +0000 Subject: [PATCH 1134/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 00efb20df..6564a92d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a4aeb17e7efa501dbb3e6e94cd1182e70fd328179628e5ee5c407df0bc96c13a.yml -openapi_spec_hash: 1cea7fff3dc7f3a20f075d3decd6947a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b4d99cc14d9c7c669d4d60bc717f7726dfae7a62c24d7577f802c4013dbde3cc.yml +openapi_spec_hash: b65456c06bde26a81cfa8577db6bcc9a config_hash: 27e44ed36b9c5617b580ead7231a594a From ef4f320a1d55699e99a52cc1831b599203049e9d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 17:23:41 +0000 Subject: [PATCH 1135/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6564a92d6..861025f66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b4d99cc14d9c7c669d4d60bc717f7726dfae7a62c24d7577f802c4013dbde3cc.yml -openapi_spec_hash: b65456c06bde26a81cfa8577db6bcc9a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47a765c648e09d62e18e8cb188365bf3c27e64a2b1044e0c621938fc4e703b8e.yml +openapi_spec_hash: 8f335669a93958024498c4f5d02ffbfb config_hash: 27e44ed36b9c5617b580ead7231a594a From fc3838cece8fa847c29506af86be096a794f0bd5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Feb 2026 23:27:44 +0000 Subject: [PATCH 1136/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/simulations/ach_transfers.py | 62 ++++++++++--------- src/increase/types/ach_prenotification.py | 31 +++++----- src/increase/types/ach_transfer.py | 31 +++++----- .../simulations/ach_transfer_return_params.py | 31 +++++----- src/increase/types/transaction.py | 31 +++++----- 6 files changed, 104 insertions(+), 86 deletions(-) diff --git a/.stats.yml b/.stats.yml index 861025f66..72d8e8313 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-47a765c648e09d62e18e8cb188365bf3c27e64a2b1044e0c621938fc4e703b8e.yml -openapi_spec_hash: 8f335669a93958024498c4f5d02ffbfb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ef12157473e772a7d34639fb936e204d29f3a3383e02201c969fb3b9b92d8578.yml +openapi_spec_hash: 4d23fee0569197b7fea4f10371c0494e config_hash: 27e44ed36b9c5617b580ead7231a594a diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index b224645f3..e56ffc12f 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -303,24 +303,28 @@ def return_( Defaults to `no_account`. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -328,14 +332,13 @@ def return_( - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -430,8 +433,8 @@ def return_( a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. @@ -862,24 +865,28 @@ async def return_( Defaults to `no_account`. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -887,14 +894,13 @@ async def return_( - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -989,8 +995,8 @@ async def return_( a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. diff --git a/src/increase/types/ach_prenotification.py b/src/increase/types/ach_prenotification.py index 54f4028f8..96ae0d96b 100644 --- a/src/increase/types/ach_prenotification.py +++ b/src/increase/types/ach_prenotification.py @@ -171,24 +171,28 @@ class PrenotificationReturn(BaseModel): """Why the Prenotification was returned. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -196,14 +200,13 @@ class PrenotificationReturn(BaseModel): - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -298,8 +301,8 @@ class PrenotificationReturn(BaseModel): a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index bce4e8f4d..d035a6475 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -443,24 +443,28 @@ class Return(BaseModel): This reason code is sent by the receiving bank back to Increase. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -468,14 +472,13 @@ class Return(BaseModel): - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -570,8 +573,8 @@ class Return(BaseModel): a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. diff --git a/src/increase/types/simulations/ach_transfer_return_params.py b/src/increase/types/simulations/ach_transfer_return_params.py index 164364c6e..fc6bb2cef 100644 --- a/src/increase/types/simulations/ach_transfer_return_params.py +++ b/src/increase/types/simulations/ach_transfer_return_params.py @@ -85,24 +85,28 @@ class ACHTransferReturnParams(TypedDict, total=False): Defaults to `no_account`. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -110,14 +114,13 @@ class ACHTransferReturnParams(TypedDict, total=False): - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -212,8 +215,8 @@ class ACHTransferReturnParams(TypedDict, total=False): a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 73790f79c..11cc6acd0 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -323,24 +323,28 @@ class SourceACHTransferReturn(BaseModel): This reason code is sent by the receiving bank back to Increase. - `insufficient_fund` - Code R01. Insufficient funds in the receiving account. - Sometimes abbreviated to NSF. + Sometimes abbreviated to "NSF." - `no_account` - Code R03. The account does not exist or the receiving bank was unable to locate it. - `account_closed` - Code R02. The account is closed at the receiving bank. - `invalid_account_number_structure` - Code R04. The account number is invalid at the receiving bank. - - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. The account - at the receiving bank was frozen per the Office of Foreign Assets Control. - - `credit_entry_refused_by_receiver` - Code R23. The receiving bank account - refused a credit transfer. + - `account_frozen_entry_returned_per_ofac_instruction` - Code R16. This return + code has two separate meanings. (1) The receiving bank froze the account or + (2) the Office of Foreign Assets Control (OFAC) instructed the receiving bank + to return the entry. + - `credit_entry_refused_by_receiver` - Code R23. The receiving bank refused the + credit transfer. - `unauthorized_debit_to_consumer_account_using_corporate_sec_code` - Code R05. The receiving bank rejected because of an incorrect Standard Entry Class code. + Consumer accounts cannot be debited as `corporate_credit_or_debit` or + `corporate_trade_exchange`. - `corporate_customer_advised_not_authorized` - Code R29. The corporate customer at the receiving bank reversed the transfer. - `payment_stopped` - Code R08. The receiving bank stopped payment on this transfer. - - `non_transaction_account` - Code R20. The receiving bank account does not - perform transfers. + - `non_transaction_account` - Code R20. The account is not eligible for ACH, + such as a savings account with transaction limits. - `uncollected_funds` - Code R09. The receiving bank account does not have enough available balance for the transfer. - `routing_number_check_digit_error` - Code R28. The routing number is @@ -348,14 +352,13 @@ class SourceACHTransferReturn(BaseModel): - `customer_advised_unauthorized_improper_ineligible_or_incomplete` - Code R10. The customer at the receiving bank reversed the transfer. - `amount_field_error` - Code R19. The amount field is incorrect or too large. - - `authorization_revoked_by_customer` - Code R07. The customer at the receiving - institution informed their bank that they have revoked authorization for a - previously authorized transfer. + - `authorization_revoked_by_customer` - Code R07. The customer revoked their + authorization for a previously authorized transfer. - `invalid_ach_routing_number` - Code R13. The routing number is invalid. - `file_record_edit_criteria` - Code R17. The receiving bank is unable to process a field in the transfer. - - `enr_invalid_individual_name` - Code R45. The individual name field was - invalid. + - `enr_invalid_individual_name` - Code R45. A rare return reason. The individual + name field was invalid. - `returned_per_odfi_request` - Code R06. The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. @@ -450,8 +453,8 @@ class SourceACHTransferReturn(BaseModel): a malformed credit entry. - `return_of_improper_debit_entry` - Code R35. A rare return reason. Return of a malformed debit entry. - - `return_of_xck_entry` - Code R33. A rare return reason. Return of a Destroyed - Check ("XKC") entry. + - `return_of_xck_entry` - Code R33. A rare return reason. Return of a destroyed + check ("XCK") entry. - `source_document_presented_for_payment` - Code R37. A rare return reason. The source document related to this ACH, usually an ACH check conversion, was presented to the bank. From b5ac792a4a2c245480266eeb265812f7074d701c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 8 Feb 2026 17:24:43 +0000 Subject: [PATCH 1137/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 72d8e8313..0a6d14a4e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ef12157473e772a7d34639fb936e204d29f3a3383e02201c969fb3b9b92d8578.yml -openapi_spec_hash: 4d23fee0569197b7fea4f10371c0494e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-35c9f1b7930722e6703f77c71a2714e0dc0b2132389773c94b56a925f09cbbd0.yml +openapi_spec_hash: dc7e9f871bdb69e935c89496dddb5392 config_hash: 27e44ed36b9c5617b580ead7231a594a From a2a44651bb4e4b6df08a996867001e3b9fadf9b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Feb 2026 14:39:57 +0000 Subject: [PATCH 1138/1325] chore(internal): bump dependencies --- requirements-dev.lock | 20 ++++++++++---------- requirements.lock | 8 ++++---- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/requirements-dev.lock b/requirements-dev.lock index f50a0288a..e1516c786 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -12,14 +12,14 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via increase aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via increase argcomplete==3.6.3 @@ -32,7 +32,7 @@ attrs==25.4.0 # via standardwebhooks backports-asyncio-runner==1.2.0 # via pytest-asyncio -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx colorlog==6.10.1 @@ -65,7 +65,7 @@ httpx==0.28.1 # via increase # via respx # via standardwebhooks -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via increase humanize==4.13.0 # via nox @@ -73,7 +73,7 @@ idna==3.11 # via anyio # via httpx # via yarl -importlib-metadata==8.7.0 +importlib-metadata==8.7.1 iniconfig==2.1.0 # via pytest markdown-it-py==3.0.0 @@ -86,14 +86,14 @@ multidict==6.7.0 mypy==1.17.0 mypy-extensions==1.1.0 # via mypy -nodeenv==1.9.1 +nodeenv==1.10.0 # via pyright nox==2025.11.12 packaging==25.0 # via dependency-groups # via nox # via pytest -pathspec==0.12.1 +pathspec==1.0.3 # via mypy platformdirs==4.4.0 # via virtualenv @@ -120,7 +120,7 @@ python-dateutil==2.9.0.post0 # via time-machine respx==0.22.0 rich==14.2.0 -ruff==0.14.7 +ruff==0.14.13 six==1.17.0 # via python-dateutil sniffio==1.3.1 @@ -128,7 +128,7 @@ sniffio==1.3.1 standardwebhooks==1.0.0 # via increase time-machine==2.19.0 -tomli==2.3.0 +tomli==2.4.0 # via dependency-groups # via mypy # via nox @@ -152,7 +152,7 @@ typing-extensions==4.15.0 # via virtualenv typing-inspection==0.4.2 # via pydantic -virtualenv==20.35.4 +virtualenv==20.36.1 # via nox wrapt==2.0.1 # via deprecated diff --git a/requirements.lock b/requirements.lock index 46f62c067..48497e0b2 100644 --- a/requirements.lock +++ b/requirements.lock @@ -12,14 +12,14 @@ -e file:. aiohappyeyeballs==2.6.1 # via aiohttp -aiohttp==3.13.2 +aiohttp==3.13.3 # via httpx-aiohttp # via increase aiosignal==1.4.0 # via aiohttp annotated-types==0.7.0 # via pydantic -anyio==4.12.0 +anyio==4.12.1 # via httpx # via increase async-timeout==5.0.1 @@ -27,7 +27,7 @@ async-timeout==5.0.1 attrs==25.4.0 # via aiohttp # via standardwebhooks -certifi==2025.11.12 +certifi==2026.1.4 # via httpcore # via httpx deprecated==1.3.1 @@ -47,7 +47,7 @@ httpx==0.28.1 # via httpx-aiohttp # via increase # via standardwebhooks -httpx-aiohttp==0.1.9 +httpx-aiohttp==0.1.12 # via increase idna==3.11 # via anyio From 0a9dda4b286f854d17e646218be0c39b1e8932b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 01:53:45 +0000 Subject: [PATCH 1139/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 0a6d14a4e..f8d264afe 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-35c9f1b7930722e6703f77c71a2714e0dc0b2132389773c94b56a925f09cbbd0.yml openapi_spec_hash: dc7e9f871bdb69e935c89496dddb5392 -config_hash: 27e44ed36b9c5617b580ead7231a594a +config_hash: 4b562e97b3d8b4cba758a87d4927a76d From 3b4d03cc98790a91a6c9dc3d8812e85067713c98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 07:36:25 +0000 Subject: [PATCH 1140/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_wire_transfer.py | 25 +++++++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index f8d264afe..8bcc4366b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-35c9f1b7930722e6703f77c71a2714e0dc0b2132389773c94b56a925f09cbbd0.yml -openapi_spec_hash: dc7e9f871bdb69e935c89496dddb5392 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-089e28882ee6d2ba5caaf094e99a95593ab5db652954f68fa7ce9c5b5ca76198.yml +openapi_spec_hash: 7cb683d243b088c97c04c3cd5623106a config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/types/inbound_wire_transfer.py b/src/increase/types/inbound_wire_transfer.py index 5c4993263..c7cb18c0f 100644 --- a/src/increase/types/inbound_wire_transfer.py +++ b/src/increase/types/inbound_wire_transfer.py @@ -8,14 +8,25 @@ from .._models import BaseModel -__all__ = ["InboundWireTransfer", "Reversal"] +__all__ = ["InboundWireTransfer", "Acceptance", "Reversal"] -class Reversal(BaseModel): +class Acceptance(BaseModel): + """If the transfer is accepted, this will contain details of the acceptance.""" + + accepted_at: datetime """ - Information about the reversal of the inbound wire transfer if it has been reversed. + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the transfer was accepted. """ + transaction_id: str + """The identifier of the transaction for the accepted transfer.""" + + +class Reversal(BaseModel): + """If the transfer is reversed, this will contain details of the reversal.""" + reason: Literal["duplicate", "creditor_request", "transaction_forbidden"] """The reason for the reversal. @@ -40,6 +51,9 @@ class InboundWireTransfer(BaseModel): id: str """The inbound wire transfer's identifier.""" + acceptance: Optional[Acceptance] = None + """If the transfer is accepted, this will contain details of the acceptance.""" + account_id: str """The Account to which the transfer belongs.""" @@ -102,10 +116,7 @@ class InboundWireTransfer(BaseModel): """The sending bank's identifier for the wire transfer.""" reversal: Optional[Reversal] = None - """ - Information about the reversal of the inbound wire transfer if it has been - reversed. - """ + """If the transfer is reversed, this will contain details of the reversal.""" status: Literal["pending", "accepted", "declined", "reversed"] """The status of the transfer. From 355fc757dc6a4137f9186067eb195adf4e1557b7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 08:55:58 +0000 Subject: [PATCH 1141/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/exports.py | 18 +++++++++++++ src/increase/types/export.py | 30 +++++++++++++++++++++- src/increase/types/export_create_params.py | 30 +++++++++++++++++++++- src/increase/types/export_list_params.py | 2 ++ tests/api_resources/test_exports.py | 8 ++++++ 6 files changed, 88 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8bcc4366b..bdfd829b6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-089e28882ee6d2ba5caaf094e99a95593ab5db652954f68fa7ce9c5b5ca76198.yml -openapi_spec_hash: 7cb683d243b088c97c04c3cd5623106a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aa6f3892142cc2ba55731765b00f760408d264406fc74ece34aafe2fa1a0c64a.yml +openapi_spec_hash: 06d242fe01faa91bebb737697488d7d2 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 3af1cd013..5754564b0 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -57,6 +57,7 @@ def create( "vendor_csv", "account_verification_letter", "funding_instructions", + "voided_check", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, @@ -67,6 +68,7 @@ def create( funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, vendor_csv: export_create_params.VendorCsv | Omit = omit, + voided_check: export_create_params.VoidedCheck | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -95,6 +97,7 @@ def create( management dashboard. - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. + - `voided_check` - A PDF of a voided check. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -121,6 +124,9 @@ def create( vendor_csv: Options for the created export. Required if `category` is equal to `vendor_csv`. + voided_check: Options for the created export. Required if `category` is equal to + `voided_check`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -145,6 +151,7 @@ def create( "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, "vendor_csv": vendor_csv, + "voided_check": voided_check, }, export_create_params.ExportCreateParams, ), @@ -209,6 +216,7 @@ def list( "funding_instructions", "form_1099_int", "form_1099_misc", + "voided_check", ] | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, @@ -249,6 +257,7 @@ def list( - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `voided_check` - A PDF of a voided check. cursor: Return the page of entries after this one. @@ -327,6 +336,7 @@ async def create( "vendor_csv", "account_verification_letter", "funding_instructions", + "voided_check", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, @@ -337,6 +347,7 @@ async def create( funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, vendor_csv: export_create_params.VendorCsv | Omit = omit, + voided_check: export_create_params.VoidedCheck | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -365,6 +376,7 @@ async def create( management dashboard. - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. + - `voided_check` - A PDF of a voided check. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -391,6 +403,9 @@ async def create( vendor_csv: Options for the created export. Required if `category` is equal to `vendor_csv`. + voided_check: Options for the created export. Required if `category` is equal to + `voided_check`. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -415,6 +430,7 @@ async def create( "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, "vendor_csv": vendor_csv, + "voided_check": voided_check, }, export_create_params.ExportCreateParams, ), @@ -479,6 +495,7 @@ def list( "funding_instructions", "form_1099_int", "form_1099_misc", + "voided_check", ] | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, @@ -519,6 +536,7 @@ def list( - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `voided_check` - A PDF of a voided check. cursor: Return the page of entries after this one. diff --git a/src/increase/types/export.py b/src/increase/types/export.py index d5c900725..762d70764 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date, datetime from typing_extensions import Literal @@ -27,6 +27,8 @@ "TransactionCsv", "TransactionCsvCreatedAt", "VendorCsv", + "VoidedCheck", + "VoidedCheckPayer", ] @@ -233,6 +235,24 @@ class VendorCsv(BaseModel): pass +class VoidedCheckPayer(BaseModel): + line: str + """The contents of the line.""" + + +class VoidedCheck(BaseModel): + """Details of the voided check export. + + This field will be present when the `category` is equal to `voided_check`. + """ + + account_number_id: str + """The Account Number for the voided check.""" + + payer: List[VoidedCheckPayer] + """The payer information printed on the check.""" + + class Export(BaseModel): """Exports are generated files. @@ -289,6 +309,7 @@ class Export(BaseModel): "funding_instructions", "form_1099_int", "form_1099_misc", + "voided_check", ] """The category of the Export. @@ -313,6 +334,7 @@ class Export(BaseModel): - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `voided_check` - A PDF of a voided check. """ created_at: datetime @@ -391,6 +413,12 @@ class Export(BaseModel): This field will be present when the `category` is equal to `vendor_csv`. """ + voided_check: Optional[VoidedCheck] = None + """Details of the voided check export. + + This field will be present when the `category` is equal to `voided_check`. + """ + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index e046384e0..e031a09a4 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing import Union +from typing import Union, Iterable from datetime import date, datetime from typing_extensions import Literal, Required, Annotated, TypedDict @@ -23,6 +23,8 @@ "TransactionCsv", "TransactionCsvCreatedAt", "VendorCsv", + "VoidedCheck", + "VoidedCheckPayer", ] @@ -38,6 +40,7 @@ class ExportCreateParams(TypedDict, total=False): "vendor_csv", "account_verification_letter", "funding_instructions", + "voided_check", ] ] """The type of Export to create. @@ -56,6 +59,7 @@ class ExportCreateParams(TypedDict, total=False): management dashboard. - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. + - `voided_check` - A PDF of a voided check. """ account_statement_bai2: AccountStatementBai2 @@ -112,6 +116,12 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `vendor_csv`. """ + voided_check: VoidedCheck + """Options for the created export. + + Required if `category` is equal to `voided_check`. + """ + class AccountStatementBai2(TypedDict, total=False): """Options for the created export. @@ -346,3 +356,21 @@ class VendorCsv(TypedDict, total=False): """ pass + + +class VoidedCheckPayer(TypedDict, total=False): + line: Required[str] + """The contents of the line.""" + + +class VoidedCheck(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `voided_check`. + """ + + account_number_id: Required[str] + """The Account Number for the voided check.""" + + payer: Iterable[VoidedCheckPayer] + """The payer information to be printed on the check.""" diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index 89ad7d728..fe2817a75 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -25,6 +25,7 @@ class ExportListParams(TypedDict, total=False): "funding_instructions", "form_1099_int", "form_1099_misc", + "voided_check", ] """Filter Exports for those with the specified category. @@ -46,6 +47,7 @@ class ExportListParams(TypedDict, total=False): - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `voided_check` - A PDF of a voided check. """ created_at: CreatedAt diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 47606c797..8325f22de 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -78,6 +78,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, }, vendor_csv={}, + voided_check={ + "account_number_id": "account_number_id", + "payer": [{"line": "x"}], + }, ) assert_matches_type(Export, export, path=["response"]) @@ -252,6 +256,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, }, vendor_csv={}, + voided_check={ + "account_number_id": "account_number_id", + "payer": [{"line": "x"}], + }, ) assert_matches_type(Export, export, path=["response"]) From 5598c1e3c401b4a6ec6c193a05e9d7bad4f202be Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Feb 2026 20:06:51 +0000 Subject: [PATCH 1142/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/exports.py | 6 ++++ src/increase/types/export.py | 37 ++++++++++++++++++++++++ src/increase/types/export_list_params.py | 3 ++ 4 files changed, 48 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bdfd829b6..fbae033a4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aa6f3892142cc2ba55731765b00f760408d264406fc74ece34aafe2fa1a0c64a.yml -openapi_spec_hash: 06d242fe01faa91bebb737697488d7d2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e1f7516f9b6e2330afbb9f36fc3721a0c6b43947b8996105fa21d551591a3950.yml +openapi_spec_hash: 782bc3e21cf8b511cf17b2a48600a67e config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 5754564b0..f71932ac2 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -216,6 +216,7 @@ def list( "funding_instructions", "form_1099_int", "form_1099_misc", + "fee_csv", "voided_check", ] | Omit = omit, @@ -257,6 +258,8 @@ def list( - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `fee_csv` - Export a CSV of fees. The time range must not include any fees + that are part of an open fee statement. - `voided_check` - A PDF of a voided check. cursor: Return the page of entries after this one. @@ -495,6 +498,7 @@ def list( "funding_instructions", "form_1099_int", "form_1099_misc", + "fee_csv", "voided_check", ] | Omit = omit, @@ -536,6 +540,8 @@ def list( - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `fee_csv` - Export a CSV of fees. The time range must not include any fees + that are part of an open fee statement. - `voided_check` - A PDF of a voided check. cursor: Return the page of entries after this one. diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 762d70764..9245bab31 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -20,6 +20,8 @@ "BookkeepingAccountBalanceCsvCreatedAt", "DashboardTableCsv", "EntityCsv", + "FeeCsv", + "FeeCsvCreatedAt", "Form1099Int", "Form1099Misc", "FundingInstructions", @@ -148,6 +150,32 @@ class EntityCsv(BaseModel): pass +class FeeCsvCreatedAt(BaseModel): + """Filter fees by their created date. + + The time range must not include any fees that are part of an open fee statement. + """ + + after: Optional[datetime] = None + """Filter fees created after this time.""" + + before: Optional[datetime] = None + """Filter fees created before this time.""" + + +class FeeCsv(BaseModel): + """Details of the fee CSV export. + + This field will be present when the `category` is equal to `fee_csv`. + """ + + created_at: Optional[FeeCsvCreatedAt] = None + """Filter fees by their created date. + + The time range must not include any fees that are part of an open fee statement. + """ + + class Form1099Int(BaseModel): """Details of the Form 1099-INT export. @@ -309,6 +337,7 @@ class Export(BaseModel): "funding_instructions", "form_1099_int", "form_1099_misc", + "fee_csv", "voided_check", ] """The category of the Export. @@ -334,6 +363,8 @@ class Export(BaseModel): - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `fee_csv` - Export a CSV of fees. The time range must not include any fees + that are part of an open fee statement. - `voided_check` - A PDF of a voided check. """ @@ -353,6 +384,12 @@ class Export(BaseModel): This field will be present when the `category` is equal to `entity_csv`. """ + fee_csv: Optional[FeeCsv] = None + """Details of the fee CSV export. + + This field will be present when the `category` is equal to `fee_csv`. + """ + form_1099_int: Optional[Form1099Int] = None """Details of the Form 1099-INT export. diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index fe2817a75..fa126d6a8 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -25,6 +25,7 @@ class ExportListParams(TypedDict, total=False): "funding_instructions", "form_1099_int", "form_1099_misc", + "fee_csv", "voided_check", ] """Filter Exports for those with the specified category. @@ -47,6 +48,8 @@ class ExportListParams(TypedDict, total=False): - `funding_instructions` - A PDF of funding instructions. - `form_1099_int` - A PDF of an Internal Revenue Service Form 1099-INT. - `form_1099_misc` - A PDF of an Internal Revenue Service Form 1099-MISC. + - `fee_csv` - Export a CSV of fees. The time range must not include any fees + that are part of an open fee statement. - `voided_check` - A PDF of a voided check. """ From c2fc24548c16974a724ce624baf1f6c802fbe920 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Feb 2026 14:31:01 +0000 Subject: [PATCH 1143/1325] chore(internal): fix lint error on Python 3.14 --- src/increase/_utils/_compat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/increase/_utils/_compat.py b/src/increase/_utils/_compat.py index dd703233c..2c70b299c 100644 --- a/src/increase/_utils/_compat.py +++ b/src/increase/_utils/_compat.py @@ -26,7 +26,7 @@ def is_union(tp: Optional[Type[Any]]) -> bool: else: import types - return tp is Union or tp is types.UnionType + return tp is Union or tp is types.UnionType # type: ignore[comparison-overlap] def is_typeddict(tp: Type[Any]) -> bool: From 68f88b4ce5d81cac1c0b8b74dc2b50713d273de9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 17:02:52 +0000 Subject: [PATCH 1144/1325] chore: format all `api.md` files --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index e2ee8e0f4..3e66e994a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -70,7 +70,7 @@ format = { chain = [ # run formatting again to fix any inconsistencies when imports are stripped "format:ruff", ]} -"format:docs" = "python scripts/utils/ruffen-docs.py README.md api.md" +"format:docs" = "bash -c 'python scripts/utils/ruffen-docs.py README.md $(find . -type f -name api.md)'" "format:ruff" = "ruff format" "lint" = { chain = [ From 38ad736462694c0155c7058995ead6cc47d7473c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Feb 2026 19:36:21 +0000 Subject: [PATCH 1145/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index fbae033a4..df6a16589 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e1f7516f9b6e2330afbb9f36fc3721a0c6b43947b8996105fa21d551591a3950.yml -openapi_spec_hash: 782bc3e21cf8b511cf17b2a48600a67e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a346156e1c92685f35444b555f4377754561632a4862de4d97138a55e7efb8f4.yml +openapi_spec_hash: 0c7c2f7a5eb38d82f9f0d4bbcd9fa53d config_hash: 4b562e97b3d8b4cba758a87d4927a76d From 283950541e1a3c6c1fcc1c4ea78cfc103e09a08b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 14 Feb 2026 01:12:15 +0000 Subject: [PATCH 1146/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/file_links.py | 4 ++-- src/increase/resources/inbound_mail_items.py | 4 ++-- .../resources/simulations/ach_transfers.py | 8 ++++---- .../resources/simulations/card_increments.py | 4 ++-- .../digital_wallet_token_requests.py | 4 ++-- src/increase/types/account_statement.py | 2 +- src/increase/types/ach_transfer.py | 4 ++-- .../types/bookkeeping_balance_lookup.py | 2 +- src/increase/types/bookkeeping_entry.py | 2 +- src/increase/types/card_payment.py | 20 +++++++++---------- src/increase/types/card_push_transfer.py | 2 +- src/increase/types/digital_card_profile.py | 2 +- src/increase/types/file_link_create_params.py | 2 +- src/increase/types/inbound_ach_transfer.py | 2 +- .../types/inbound_wire_drawdown_request.py | 2 +- src/increase/types/pending_transaction.py | 4 ++-- src/increase/types/physical_card_profile.py | 2 +- .../card_increment_create_params.py | 2 +- src/increase/types/transaction.py | 16 +++++++-------- 20 files changed, 46 insertions(+), 46 deletions(-) diff --git a/.stats.yml b/.stats.yml index df6a16589..9bcba9df2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a346156e1c92685f35444b555f4377754561632a4862de4d97138a55e7efb8f4.yml -openapi_spec_hash: 0c7c2f7a5eb38d82f9f0d4bbcd9fa53d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1127bb6ee64bebab1bbf8ecbd9ec71c0deb5ca8552fd454fa2ec120fd9eac14a.yml +openapi_spec_hash: 9fedc9dc133202e4d39bf7bffe4839d9 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/resources/file_links.py b/src/increase/resources/file_links.py index cb8a8f9e0..f31574997 100644 --- a/src/increase/resources/file_links.py +++ b/src/increase/resources/file_links.py @@ -64,7 +64,7 @@ def create( file_id: The File to create a File Link for. expires_at: The time at which the File Link will expire. The default is 1 hour from the time - of the request. The maxiumum is 1 day from the time of the request. + of the request. The maximum is 1 day from the time of the request. extra_headers: Send extra headers @@ -136,7 +136,7 @@ async def create( file_id: The File to create a File Link for. expires_at: The time at which the File Link will expire. The default is 1 hour from the time - of the request. The maxiumum is 1 day from the time of the request. + of the request. The maximum is 1 day from the time of the request. extra_headers: Send extra headers diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index 7e04c7944..b4b95197a 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -149,7 +149,7 @@ def action( idempotency_key: str | None = None, ) -> InboundMailItem: """ - Action a Inbound Mail Item + Action an Inbound Mail Item Args: inbound_mail_item_id: The identifier of the Inbound Mail Item to action. @@ -309,7 +309,7 @@ async def action( idempotency_key: str | None = None, ) -> InboundMailItem: """ - Action a Inbound Mail Item + Action an Inbound Mail Item Args: inbound_mail_item_id: The identifier of the Inbound Mail Item to action. diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index e56ffc12f..2eda2f5cd 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -61,10 +61,10 @@ def acknowledge( ) -> ACHTransfer: """ Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the - Federal Reserve. This transfer must first have a `status` of `submitted` . In + Federal Reserve. This transfer must first have a `status` of `submitted`. In production, the Federal Reserve generally acknowledges submitted ACH files within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal - Reserve, this endpoint allows you to skip that delay and add the acknowledgment + Reserve, this endpoint allows you to skip that delay and add the acknowledgement subresource to the ACH Transfer. Args: @@ -623,10 +623,10 @@ async def acknowledge( ) -> ACHTransfer: """ Simulates the acknowledgement of an [ACH Transfer](#ach-transfers) by the - Federal Reserve. This transfer must first have a `status` of `submitted` . In + Federal Reserve. This transfer must first have a `status` of `submitted`. In production, the Federal Reserve generally acknowledges submitted ACH files within 30 minutes. Since sandbox ACH Transfers are not submitted to the Federal - Reserve, this endpoint allows you to skip that delay and add the acknowledgment + Reserve, this endpoint allows you to skip that delay and add the acknowledgement subresource to the ACH Transfer. Args: diff --git a/src/increase/resources/simulations/card_increments.py b/src/increase/resources/simulations/card_increments.py index 43b0f87b7..b89372e8c 100644 --- a/src/increase/resources/simulations/card_increments.py +++ b/src/increase/resources/simulations/card_increments.py @@ -63,7 +63,7 @@ def create( Args: amount: The amount of the increment in minor units in the card authorization's currency. - card_payment_id: The identifier of the Card Payment to create a increment on. + card_payment_id: The identifier of the Card Payment to create an increment on. event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time @@ -143,7 +143,7 @@ async def create( Args: amount: The amount of the increment in minor units in the card authorization's currency. - card_payment_id: The identifier of the Card Payment to create a increment on. + card_payment_id: The identifier of the Card Payment to create an increment on. event_subscription_id: The identifier of the Event Subscription to use. If provided, will override the default real time event subscription. Because you can only create one real time diff --git a/src/increase/resources/simulations/digital_wallet_token_requests.py b/src/increase/resources/simulations/digital_wallet_token_requests.py index 9b562ebe6..e7ff2dbb9 100644 --- a/src/increase/resources/simulations/digital_wallet_token_requests.py +++ b/src/increase/resources/simulations/digital_wallet_token_requests.py @@ -54,7 +54,7 @@ def create( idempotency_key: str | None = None, ) -> DigitalWalletTokenRequestCreateResponse: """ - Simulates a user attempting add a [Card](#cards) to a digital wallet such as + Simulates a user attempting to add a [Card](#cards) to a digital wallet such as Apple Pay. Args: @@ -119,7 +119,7 @@ async def create( idempotency_key: str | None = None, ) -> DigitalWalletTokenRequestCreateResponse: """ - Simulates a user attempting add a [Card](#cards) to a digital wallet such as + Simulates a user attempting to add a [Card](#cards) to a digital wallet such as Apple Pay. Args: diff --git a/src/increase/types/account_statement.py b/src/increase/types/account_statement.py index 75fc6f3d1..f1369ef82 100644 --- a/src/increase/types/account_statement.py +++ b/src/increase/types/account_statement.py @@ -44,7 +44,7 @@ class AccountStatement(BaseModel): """ ending_balance: int - """The Account's balance at the start of its statement period.""" + """The Account's balance at the end of its statement period.""" file_id: str """The identifier of the File containing a PDF of the statement.""" diff --git a/src/increase/types/ach_transfer.py b/src/increase/types/ach_transfer.py index d035a6475..5616ebb2f 100644 --- a/src/increase/types/ach_transfer.py +++ b/src/increase/types/ach_transfer.py @@ -660,7 +660,7 @@ class Submission(BaseModel): expected_funds_settlement_at: datetime.datetime """When the transfer is expected to settle in the recipient's account. - Credits may be available sooner, at the receiving banks discretion. The FedACH + Credits may be available sooner, at the receiving bank's discretion. The FedACH schedule is published [here](https://www.frbservices.org/resources/resource-centers/same-day-ach/fedach-processing-schedule.html). """ @@ -805,7 +805,7 @@ class ACHTransfer(BaseModel): individual_name: Optional[str] = None """The name of the transfer recipient. - This value is information and not verified by the recipient's bank. + This value is informational and not verified by the recipient's bank. """ network: Literal["ach"] diff --git a/src/increase/types/bookkeeping_balance_lookup.py b/src/increase/types/bookkeeping_balance_lookup.py index bcd350e84..e41891c38 100644 --- a/src/increase/types/bookkeeping_balance_lookup.py +++ b/src/increase/types/bookkeeping_balance_lookup.py @@ -9,7 +9,7 @@ class BookkeepingBalanceLookup(BaseModel): """ - Represents a request to lookup the balance of an Bookkeeping Account at a given point in time. + Represents a request to lookup the balance of a Bookkeeping Account at a given point in time. """ balance: int diff --git a/src/increase/types/bookkeeping_entry.py b/src/increase/types/bookkeeping_entry.py index 06aed0aaa..5ccd70acb 100644 --- a/src/increase/types/bookkeeping_entry.py +++ b/src/increase/types/bookkeeping_entry.py @@ -30,7 +30,7 @@ class BookkeepingEntry(BaseModel): """When the entry set was created.""" entry_set_id: str - """The identifier for the Account the Entry belongs to.""" + """The identifier for the Entry Set the Entry belongs to.""" type: Literal["bookkeeping_entry"] """A constant representing the object's type. diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index b7ad53da9..e438de8e5 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -821,7 +821,7 @@ class ElementCardAuthorizationVerification(BaseModel): class ElementCardAuthorization(BaseModel): """A Card Authorization object. - This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customer's funds with the intent to later clear a transaction. """ id: str @@ -2894,7 +2894,7 @@ class ElementCardFinancialVerification(BaseModel): class ElementCardFinancial(BaseModel): """A Card Financial object. - This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customers funds with the intent to later clear a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customer's funds with the intent to later clear a transaction. """ id: str @@ -3543,7 +3543,7 @@ class ElementCardRefundCashback(BaseModel): class ElementCardRefundInterchange(BaseModel): - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" amount: str """ @@ -4012,7 +4012,7 @@ class ElementCardRefundPurchaseDetails(BaseModel): class ElementCardRefund(BaseModel): """A Card Refund object. - This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement an acquirer can also refund money directly to a card without relation to a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement, an acquirer can also refund money directly to a card without relation to a transaction. """ id: str @@ -4042,7 +4042,7 @@ class ElementCardRefund(BaseModel): """ interchange: Optional[ElementCardRefundInterchange] = None - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" merchant_acceptor_id: str """ @@ -4762,7 +4762,7 @@ class ElementCardSettlementPurchaseDetails(BaseModel): class ElementCardSettlementSurcharge(BaseModel): """Surcharge amount details, if applicable. - The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). + The amount is positive if the surcharge is added to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ amount: int @@ -4873,7 +4873,7 @@ class ElementCardSettlement(BaseModel): surcharge: Optional[ElementCardSettlementSurcharge] = None """Surcharge amount details, if applicable. - The amount is positive if the surcharge is added to to the overall transaction + The amount is positive if the surcharge is added to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ @@ -5575,7 +5575,7 @@ class Element(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on - a customers funds with the intent to later clear a transaction. + a customer's funds with the intent to later clear a transaction. """ card_authorization_expiration: Optional[ElementCardAuthorizationExpiration] = None @@ -5607,7 +5607,7 @@ class Element(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a - customers funds with the intent to later clear a transaction. + customer's funds with the intent to later clear a transaction. """ card_fuel_confirmation: Optional[ElementCardFuelConfirmation] = None @@ -5631,7 +5631,7 @@ class Element(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While - they are usually connected to a Card Settlement an acquirer can also refund + they are usually connected to a Card Settlement, an acquirer can also refund money directly to a card without relation to a transaction. """ diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index e0506b2c1..2f4c3343b 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -624,7 +624,7 @@ class Submission(BaseModel): submitted_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the transfer was submitted to card network. + the transfer was submitted to the card network. """ trace_number: str diff --git a/src/increase/types/digital_card_profile.py b/src/increase/types/digital_card_profile.py index 1bb47d09e..347f9a6a2 100644 --- a/src/increase/types/digital_card_profile.py +++ b/src/increase/types/digital_card_profile.py @@ -53,7 +53,7 @@ class DigitalCardProfile(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was created. + the Digital Card Profile was created. """ description: str diff --git a/src/increase/types/file_link_create_params.py b/src/increase/types/file_link_create_params.py index 8707daaa8..e41647b08 100644 --- a/src/increase/types/file_link_create_params.py +++ b/src/increase/types/file_link_create_params.py @@ -18,6 +18,6 @@ class FileLinkCreateParams(TypedDict, total=False): expires_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] """The time at which the File Link will expire. - The default is 1 hour from the time of the request. The maxiumum is 1 day from + The default is 1 hour from the time of the request. The maximum is 1 day from the time of the request. """ diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 9663dedcc..266877d86 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -357,7 +357,7 @@ class NotificationOfChange(BaseModel): """The new account number provided in the notification of change.""" updated_routing_number: Optional[str] = None - """The new account number provided in the notification of change.""" + """The new routing number provided in the notification of change.""" class Settlement(BaseModel): diff --git a/src/increase/types/inbound_wire_drawdown_request.py b/src/increase/types/inbound_wire_drawdown_request.py index 25b06446b..b6ffce482 100644 --- a/src/increase/types/inbound_wire_drawdown_request.py +++ b/src/increase/types/inbound_wire_drawdown_request.py @@ -25,7 +25,7 @@ class InboundWireDrawdownRequest(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the inbound wire drawdown requested was created. + the inbound wire drawdown request was created. """ creditor_account_number: str diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 0dab63a04..f89796227 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -630,7 +630,7 @@ class SourceCardAuthorizationVerification(BaseModel): class SourceCardAuthorization(BaseModel): """A Card Authorization object. - This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customers funds with the intent to later clear a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on a customer's funds with the intent to later clear a transaction. """ id: str @@ -1211,7 +1211,7 @@ class Source(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_authorization`. Card Authorizations are temporary holds placed on - a customers funds with the intent to later clear a transaction. + a customer's funds with the intent to later clear a transaction. """ card_push_transfer_instruction: Optional[SourceCardPushTransferInstruction] = None diff --git a/src/increase/types/physical_card_profile.py b/src/increase/types/physical_card_profile.py index e6e35e926..e5c00eba1 100644 --- a/src/increase/types/physical_card_profile.py +++ b/src/increase/types/physical_card_profile.py @@ -38,7 +38,7 @@ class PhysicalCardProfile(BaseModel): created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which - the Card Dispute was created. + the Physical Card Profile was created. """ creator: Literal["increase", "user"] diff --git a/src/increase/types/simulations/card_increment_create_params.py b/src/increase/types/simulations/card_increment_create_params.py index 85f2aafc5..508c252e7 100644 --- a/src/increase/types/simulations/card_increment_create_params.py +++ b/src/increase/types/simulations/card_increment_create_params.py @@ -14,7 +14,7 @@ class CardIncrementCreateParams(TypedDict, total=False): """ card_payment_id: Required[str] - """The identifier of the Card Payment to create a increment on.""" + """The identifier of the Card Payment to create an increment on.""" event_subscription_id: str """The identifier of the Event Subscription to use. diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 11cc6acd0..4017ccdf5 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1164,7 +1164,7 @@ class SourceCardFinancialVerification(BaseModel): class SourceCardFinancial(BaseModel): """A Card Financial object. - This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customers funds with the intent to later clear a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a customer's funds with the intent to later clear a transaction. """ id: str @@ -1402,7 +1402,7 @@ class SourceCardRefundCashback(BaseModel): class SourceCardRefundInterchange(BaseModel): - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" amount: str """ @@ -1871,7 +1871,7 @@ class SourceCardRefundPurchaseDetails(BaseModel): class SourceCardRefund(BaseModel): """A Card Refund object. - This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement an acquirer can also refund money directly to a card without relation to a transaction. + This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While they are usually connected to a Card Settlement, an acquirer can also refund money directly to a card without relation to a transaction. """ id: str @@ -1901,7 +1901,7 @@ class SourceCardRefund(BaseModel): """ interchange: Optional[SourceCardRefundInterchange] = None - """Interchange assessed as a part of this transaciton.""" + """Interchange assessed as a part of this transaction.""" merchant_acceptor_id: str """ @@ -2499,7 +2499,7 @@ class SourceCardSettlementPurchaseDetails(BaseModel): class SourceCardSettlementSurcharge(BaseModel): """Surcharge amount details, if applicable. - The amount is positive if the surcharge is added to to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). + The amount is positive if the surcharge is added to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ amount: int @@ -2610,7 +2610,7 @@ class SourceCardSettlement(BaseModel): surcharge: Optional[SourceCardSettlementSurcharge] = None """Surcharge amount details, if applicable. - The amount is positive if the surcharge is added to to the overall transaction + The amount is positive if the surcharge is added to the overall transaction amount (surcharge), and negative if the surcharge is deducted from the overall transaction amount (discount). """ @@ -3889,7 +3889,7 @@ class Source(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_financial`. Card Financials are temporary holds placed on a - customers funds with the intent to later clear a transaction. + customer's funds with the intent to later clear a transaction. """ card_push_transfer_acceptance: Optional[SourceCardPushTransferAcceptance] = None @@ -3906,7 +3906,7 @@ class Source(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `card_refund`. Card Refunds move money back to the cardholder. While - they are usually connected to a Card Settlement an acquirer can also refund + they are usually connected to a Card Settlement, an acquirer can also refund money directly to a card without relation to a transaction. """ From 1ce6a931bee8988a9dd7192212cdc2b2e98fc1f4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Feb 2026 23:51:02 +0000 Subject: [PATCH 1147/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9bcba9df2..4c9e8f9b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1127bb6ee64bebab1bbf8ecbd9ec71c0deb5ca8552fd454fa2ec120fd9eac14a.yml -openapi_spec_hash: 9fedc9dc133202e4d39bf7bffe4839d9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b27417de2b11e1ed32ccf399f6b52acd599a75ba910d7709028972960e12ba67.yml +openapi_spec_hash: 82ef00d2d4f3a796ba181d2546c424bb config_hash: 4b562e97b3d8b4cba758a87d4927a76d From f4e0689976cc82d07ba62eeb44d242bc7e44c351 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Feb 2026 02:51:26 +0000 Subject: [PATCH 1148/1325] feat(api): api update --- .stats.yml | 4 +- api.md | 2 +- .../resources/simulations/check_deposits.py | 12 +++++- src/increase/types/simulations/__init__.py | 1 + .../check_deposit_submit_params.py | 25 ++++++++++++ .../simulations/test_check_deposits.py | 40 +++++++++++++++---- 6 files changed, 72 insertions(+), 12 deletions(-) create mode 100644 src/increase/types/simulations/check_deposit_submit_params.py diff --git a/.stats.yml b/.stats.yml index 4c9e8f9b3..9cbf59fe9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b27417de2b11e1ed32ccf399f6b52acd599a75ba910d7709028972960e12ba67.yml -openapi_spec_hash: 82ef00d2d4f3a796ba181d2546c424bb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7da80155087dd9d883acaa10229e34ed5a3097f884c77b5f28c4c76a62b82432.yml +openapi_spec_hash: c5050ba45eb587316583060c1efef8a8 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/api.md b/api.md index f0337a3ec..6fbe4ce78 100644 --- a/api.md +++ b/api.md @@ -983,7 +983,7 @@ Methods: - client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit - client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit -- client.simulations.check_deposits.submit(check_deposit_id) -> CheckDeposit +- client.simulations.check_deposits.submit(check_deposit_id, \*\*params) -> CheckDeposit ## InboundMailItems diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index ba4448fb8..62d30df2d 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -4,7 +4,8 @@ import httpx -from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -14,6 +15,7 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options +from ...types.simulations import check_deposit_submit_params from ...types.check_deposit import CheckDeposit __all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] @@ -131,6 +133,7 @@ def submit( self, check_deposit_id: str, *, + scan: check_deposit_submit_params.Scan | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -146,6 +149,8 @@ def submit( Args: check_deposit_id: The identifier of the Check Deposit you wish to submit. + scan: If set, the simulation will use these values for the check's scanned MICR data. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -160,6 +165,7 @@ def submit( raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._post( f"/simulations/check_deposits/{check_deposit_id}/submit", + body=maybe_transform({"scan": scan}, check_deposit_submit_params.CheckDepositSubmitParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -283,6 +289,7 @@ async def submit( self, check_deposit_id: str, *, + scan: check_deposit_submit_params.Scan | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -298,6 +305,8 @@ async def submit( Args: check_deposit_id: The identifier of the Check Deposit you wish to submit. + scan: If set, the simulation will use these values for the check's scanned MICR data. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -312,6 +321,7 @@ async def submit( raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._post( f"/simulations/check_deposits/{check_deposit_id}/submit", + body=await async_maybe_transform({"scan": scan}, check_deposit_submit_params.CheckDepositSubmitParams), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 36672da70..c9c363a73 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -10,6 +10,7 @@ from .ach_transfer_settle_params import ACHTransferSettleParams as ACHTransferSettleParams from .card_dispute_action_params import CardDisputeActionParams as CardDisputeActionParams from .card_reversal_create_params import CardReversalCreateParams as CardReversalCreateParams +from .check_deposit_submit_params import CheckDepositSubmitParams as CheckDepositSubmitParams from .physical_card_create_params import PhysicalCardCreateParams as PhysicalCardCreateParams from .card_increment_create_params import CardIncrementCreateParams as CardIncrementCreateParams from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams diff --git a/src/increase/types/simulations/check_deposit_submit_params.py b/src/increase/types/simulations/check_deposit_submit_params.py new file mode 100644 index 000000000..82abf0a46 --- /dev/null +++ b/src/increase/types/simulations/check_deposit_submit_params.py @@ -0,0 +1,25 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["CheckDepositSubmitParams", "Scan"] + + +class CheckDepositSubmitParams(TypedDict, total=False): + scan: Scan + """If set, the simulation will use these values for the check's scanned MICR data.""" + + +class Scan(TypedDict, total=False): + """If set, the simulation will use these values for the check's scanned MICR data.""" + + account_number: Required[str] + """The account number to be returned in the check deposit's scan data.""" + + routing_number: Required[str] + """The routing number to be returned in the check deposit's scan data.""" + + auxiliary_on_us: str + """The auxiliary on-us data to be returned in the check deposit's scan data.""" diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 3204a3796..7d2eecbd8 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -96,14 +96,26 @@ def test_path_params_return(self, client: Increase) -> None: @parametrize def test_method_submit(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + def test_method_submit_with_all_params(self, client: Increase) -> None: + check_deposit = client.simulations.check_deposits.submit( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + scan={ + "account_number": "x", + "routing_number": "x", + "auxiliary_on_us": "x", + }, ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize def test_raw_response_submit(self, client: Increase) -> None: response = client.simulations.check_deposits.with_raw_response.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -114,7 +126,7 @@ def test_raw_response_submit(self, client: Increase) -> None: @parametrize def test_streaming_response_submit(self, client: Increase) -> None: with client.simulations.check_deposits.with_streaming_response.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -128,7 +140,7 @@ def test_streaming_response_submit(self, client: Increase) -> None: def test_path_params_submit(self, client: Increase) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): client.simulations.check_deposits.with_raw_response.submit( - "", + check_deposit_id="", ) @@ -216,14 +228,26 @@ async def test_path_params_return(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_submit(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + async def test_method_submit_with_all_params(self, async_client: AsyncIncrease) -> None: + check_deposit = await async_client.simulations.check_deposits.submit( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + scan={ + "account_number": "x", + "routing_number": "x", + "auxiliary_on_us": "x", + }, ) assert_matches_type(CheckDeposit, check_deposit, path=["response"]) @parametrize async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: response = await async_client.simulations.check_deposits.with_raw_response.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", ) assert response.is_closed is True @@ -234,7 +258,7 @@ async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: async with async_client.simulations.check_deposits.with_streaming_response.submit( - "check_deposit_f06n9gpg7sxn8t19lfc1", + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -248,5 +272,5 @@ async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> N async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): await async_client.simulations.check_deposits.with_raw_response.submit( - "", + check_deposit_id="", ) From abbc6c88db5bf865d2515435d98a5c6cdbacb0e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Feb 2026 16:38:34 +0000 Subject: [PATCH 1149/1325] chore: update mock server docs --- CONTRIBUTING.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4578ce3ce..cc378bfeb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,7 @@ $ pip install ./path-to-wheel-file.whl Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. ```sh -# you will need npm installed -$ npx prism mock path/to/your/openapi.yml +$ ./scripts/mock ``` ```sh From b30cba35babd3bf63f0a97e19fd6dce0ccb232d3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 03:27:54 +0000 Subject: [PATCH 1150/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 175 +++++++++++++++++++++ src/increase/types/declined_transaction.py | 35 +++++ src/increase/types/pending_transaction.py | 35 +++++ src/increase/types/real_time_decision.py | 70 +++++++++ src/increase/types/transaction.py | 35 +++++ 6 files changed, 352 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9cbf59fe9..8da50141e 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-7da80155087dd9d883acaa10229e34ed5a3097f884c77b5f28c4c76a62b82432.yml -openapi_spec_hash: c5050ba45eb587316583060c1efef8a8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-74ade94ecfd7ae3c09e8eb53591e3a346d7a1a8e4fdcc88468aaf732e550d360.yml +openapi_spec_hash: bd4e4f623f593b9d0b9c139fde8245e4 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index e438de8e5..dd60c2113 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -681,6 +681,41 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class ElementCardAuthorizationNetworkDetails(BaseModel): """Fields specific to the `network`.""" @@ -1406,6 +1441,41 @@ class ElementCardBalanceInquiryNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class ElementCardBalanceInquiryNetworkDetails(BaseModel): """Fields specific to the `network`.""" @@ -2002,6 +2072,41 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class ElementCardDeclineNetworkDetails(BaseModel): """Fields specific to the `network`.""" @@ -2754,6 +2859,41 @@ class ElementCardFinancialNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class ElementCardFinancialNetworkDetails(BaseModel): """Fields specific to the `network`.""" @@ -5235,6 +5375,41 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class ElementCardValidationNetworkDetails(BaseModel): """Fields specific to the `network`.""" diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 9f6d8a3b5..53f230a0d 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -480,6 +480,41 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class SourceCardDeclineNetworkDetails(BaseModel): """Fields specific to the `network`.""" diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index f89796227..56639b148 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -490,6 +490,41 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class SourceCardAuthorizationNetworkDetails(BaseModel): """Fields specific to the `network`.""" diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index af9fcf654..29c5a95ac 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -496,6 +496,41 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class CardAuthorizationNetworkDetails(BaseModel): """Fields specific to the `network`.""" @@ -1223,6 +1258,41 @@ class CardBalanceInquiryNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class CardBalanceInquiryNetworkDetails(BaseModel): """Fields specific to the `network`.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index 4017ccdf5..fabfc1182 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -1024,6 +1024,41 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): - `other` - An unspecific reason for stand-in processing. """ + terminal_entry_capability: Optional[ + Literal[ + "unknown", + "terminal_not_used", + "magnetic_stripe", + "barcode", + "optical_character_recognition", + "chip_or_contactless", + "contactless_only", + "no_capability", + ] + ] = None + """The capability of the terminal being used to read the card. + + Shows whether a terminal can e.g., accept chip cards or if it only supports + magnetic stripe reads. This reflects the highest capability of the terminal — + for example, a terminal that supports both chip and magnetic stripe will be + identified as chip-capable. + + - `unknown` - Unknown + - `terminal_not_used` - No terminal was used for this transaction. + - `magnetic_stripe` - The terminal can only read magnetic stripes and does not + have chip or contactless reading capability. + - `barcode` - The terminal can only read barcodes. + - `optical_character_recognition` - The terminal can only read cards via Optical + Character Recognition. + - `chip_or_contactless` - The terminal supports contact chip cards and can also + read the magnetic stripe. If contact chip is supported, this value is used + regardless of whether contactless is also supported. + - `contactless_only` - The terminal supports contactless reads but does not + support contact chip. Only used when the terminal lacks contact chip + capability. + - `no_capability` - The terminal has no card reading capability. + """ + class SourceCardFinancialNetworkDetails(BaseModel): """Fields specific to the `network`.""" From 8d2ad36ad044ba3a9f8d1657d21b23e51579ec13 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 13:38:05 +0000 Subject: [PATCH 1151/1325] chore(internal): add request options to SSE classes --- src/increase/_response.py | 3 +++ src/increase/_streaming.py | 11 ++++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/increase/_response.py b/src/increase/_response.py index 7fb2fb75a..8e6f5b425 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -152,6 +152,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: ), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -162,6 +163,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=extract_stream_chunk_type(self._stream_cls), response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) @@ -175,6 +177,7 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: cast_to=cast_to, response=self.http_response, client=cast(Any, self._client), + options=self._options, ), ) diff --git a/src/increase/_streaming.py b/src/increase/_streaming.py index 48bbc2c53..93e15346d 100644 --- a/src/increase/_streaming.py +++ b/src/increase/_streaming.py @@ -4,7 +4,7 @@ import json import inspect from types import TracebackType -from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, AsyncIterator, cast +from typing import TYPE_CHECKING, Any, Generic, TypeVar, Iterator, Optional, AsyncIterator, cast from typing_extensions import Self, Protocol, TypeGuard, override, get_origin, runtime_checkable import httpx @@ -13,6 +13,7 @@ if TYPE_CHECKING: from ._client import Increase, AsyncIncrease + from ._models import FinalRequestOptions _T = TypeVar("_T") @@ -22,7 +23,7 @@ class Stream(Generic[_T]): """Provides the core interface to iterate over a synchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEBytesDecoder def __init__( @@ -31,10 +32,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: Increase, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() @@ -85,7 +88,7 @@ class AsyncStream(Generic[_T]): """Provides the core interface to iterate over an asynchronous stream response.""" response: httpx.Response - + _options: Optional[FinalRequestOptions] = None _decoder: SSEDecoder | SSEBytesDecoder def __init__( @@ -94,10 +97,12 @@ def __init__( cast_to: type[_T], response: httpx.Response, client: AsyncIncrease, + options: Optional[FinalRequestOptions] = None, ) -> None: self.response = response self._cast_to = cast_to self._client = client + self._options = options self._decoder = client._make_sse_decoder() self._iterator = self.__stream__() From a05370f6aba0533cba3215417fda7117b0d8b5e8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 14:12:12 +0000 Subject: [PATCH 1152/1325] chore(dependencies): require standardwebhooks 1.0.1 this release includes an important bug fix. --- pyproject.toml | 2 +- requirements-dev.lock | 2 +- requirements.lock | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3e66e994a..ebddc924d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -42,7 +42,7 @@ Repository = "https://github.com/Increase/increase-python" [project.optional-dependencies] aiohttp = ["aiohttp", "httpx_aiohttp>=0.1.9"] -webhooks = ["standardwebhooks"] +webhooks = ["standardwebhooks >= 1.0.1, < 2"] [tool.rye] managed = true diff --git a/requirements-dev.lock b/requirements-dev.lock index e1516c786..9a4f79b84 100644 --- a/requirements-dev.lock +++ b/requirements-dev.lock @@ -125,7 +125,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via increase -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via increase time-machine==2.19.0 tomli==2.4.0 diff --git a/requirements.lock b/requirements.lock index 48497e0b2..a730a50a3 100644 --- a/requirements.lock +++ b/requirements.lock @@ -69,7 +69,7 @@ six==1.17.0 # via python-dateutil sniffio==1.3.1 # via increase -standardwebhooks==1.0.0 +standardwebhooks==1.0.1 # via increase types-deprecated==1.3.1.20251101 # via standardwebhooks From 32108ff3397afef7c1b9a44c607432c19ba240cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 20:07:58 +0000 Subject: [PATCH 1153/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_deposit.py | 3 +++ src/increase/types/declined_transaction.py | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8da50141e..702aef7c1 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-74ade94ecfd7ae3c09e8eb53591e3a346d7a1a8e4fdcc88468aaf732e550d360.yml -openapi_spec_hash: bd4e4f623f593b9d0b9c139fde8245e4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ff40c6e135e905af36aac783b7524ae0d9f13cd1e165ee56da3b244ae76ab94e.yml +openapi_spec_hash: b0c7738dc63f7362a11b27c7369d7441 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 4b84fa963..486422de4 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -114,6 +114,7 @@ class DepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "requested_by_user", + "international", "unknown", ] """Why the check deposit was rejected. @@ -131,6 +132,8 @@ class DepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `requested_by_user` - The check was rejected at the user's request. + - `international` - The check is not a U.S. domestic check and cannot be + processed. - `unknown` - The check was rejected for an unknown reason. """ diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 53f230a0d..ee3ecb44c 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -1064,6 +1064,7 @@ class SourceCheckDepositRejection(BaseModel): "suspected_fraud", "deposit_window_expired", "requested_by_user", + "international", "unknown", ] """Why the check deposit was rejected. @@ -1081,6 +1082,8 @@ class SourceCheckDepositRejection(BaseModel): - `suspected_fraud` - This check is suspected to be fraudulent. - `deposit_window_expired` - This check's deposit window has expired. - `requested_by_user` - The check was rejected at the user's request. + - `international` - The check is not a U.S. domestic check and cannot be + processed. - `unknown` - The check was rejected for an unknown reason. """ From 248101d82c62d4f5039e809002978c0187b2aaea Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 20:32:35 +0000 Subject: [PATCH 1154/1325] chore(internal): make `test_proxy_environment_variables` more resilient --- tests/test_client.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_client.py b/tests/test_client.py index ab615e9ca..158b885f3 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -994,6 +994,8 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultHttpxClient() @@ -1947,6 +1949,8 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") + # Delete in case our environment has this set + monkeypatch.delenv("HTTP_PROXY", raising=False) client = DefaultAsyncHttpxClient() From 085fed7c9c0b6a588fb4f6148d572ee83a7140bc Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Feb 2026 22:31:08 +0000 Subject: [PATCH 1155/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 156 +++++++++++++++++++++++++++++ 2 files changed, 158 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 702aef7c1..7d09a9347 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ff40c6e135e905af36aac783b7524ae0d9f13cd1e165ee56da3b244ae76ab94e.yml -openapi_spec_hash: b0c7738dc63f7362a11b27c7369d7441 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-949ee3a47313a37ba0147670d429c72ff0cfb477f7abe8f1212dc892ed4ad6d2.yml +openapi_spec_hash: b7a3d5406d046298e53103020cec545d config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index dd60c2113..fd372e08a 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -156,6 +156,7 @@ "ElementCardValidationVerificationCardholderAddress", "ElementCardValidationVerificationCardholderName", "ElementOther", + "SchemeFee", "State", ] @@ -5843,6 +5844,158 @@ class Element(BaseModel): """ +class SchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class State(BaseModel): """The summarized state of this card payment.""" @@ -5918,6 +6071,9 @@ class CardPayment(BaseModel): physical_card_id: Optional[str] = None """The Physical Card identifier for this payment.""" + scheme_fees: List[SchemeFee] + """The scheme fees associated with this card payment.""" + state: State """The summarized state of this card payment.""" From 27e75ecac97b5dc4505f083ad0bffe6d15abe46a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 17:50:49 +0000 Subject: [PATCH 1156/1325] chore(internal): make `test_proxy_environment_variables` more resilient to env --- tests/test_client.py | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/tests/test_client.py b/tests/test_client.py index 158b885f3..10dcfaa7a 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -994,8 +994,14 @@ def retry_handler(_request: httpx.Request) -> httpx.Response: def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultHttpxClient() @@ -1949,8 +1955,14 @@ async def test_get_platform(self) -> None: async def test_proxy_environment_variables(self, monkeypatch: pytest.MonkeyPatch) -> None: # Test that the proxy environment variables are set correctly monkeypatch.setenv("HTTPS_PROXY", "https://example.org") - # Delete in case our environment has this set + # Delete in case our environment has any proxy env vars set monkeypatch.delenv("HTTP_PROXY", raising=False) + monkeypatch.delenv("ALL_PROXY", raising=False) + monkeypatch.delenv("NO_PROXY", raising=False) + monkeypatch.delenv("http_proxy", raising=False) + monkeypatch.delenv("https_proxy", raising=False) + monkeypatch.delenv("all_proxy", raising=False) + monkeypatch.delenv("no_proxy", raising=False) client = DefaultAsyncHttpxClient() From 17998d99a73625abdb8de0556d8993825199c232 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 21:17:57 +0000 Subject: [PATCH 1157/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/wire_drawdown_requests.py | 10 ++++++++++ .../types/wire_drawdown_request_create_params.py | 6 ++++++ tests/api_resources/test_wire_drawdown_requests.py | 2 ++ 4 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d09a9347..42c775db0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-949ee3a47313a37ba0147670d429c72ff0cfb477f7abe8f1212dc892ed4ad6d2.yml -openapi_spec_hash: b7a3d5406d046298e53103020cec545d +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a71b48efd87b38f1e7fd01e83a58b902b2c262b2606c4bf8e1ad0d7f562772e.yml +openapi_spec_hash: a159f26827b08d4900b7b354854535c7 config_hash: 4b562e97b3d8b4cba758a87d4927a76d diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index ee73f74d0..76408df82 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -55,6 +55,7 @@ def create( debtor_account_number: str | Omit = omit, debtor_external_account_id: str | Omit = omit, debtor_routing_number: str | Omit = omit, + end_to_end_identification: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -88,6 +89,9 @@ def create( debtor_routing_number: The debtor's routing number. + end_to_end_identification: A free-form reference string set by the sender mirrored back in the subsequent + wire transfer. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -112,6 +116,7 @@ def create( "debtor_account_number": debtor_account_number, "debtor_external_account_id": debtor_external_account_id, "debtor_routing_number": debtor_routing_number, + "end_to_end_identification": end_to_end_identification, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), @@ -253,6 +258,7 @@ async def create( debtor_account_number: str | Omit = omit, debtor_external_account_id: str | Omit = omit, debtor_routing_number: str | Omit = omit, + end_to_end_identification: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -286,6 +292,9 @@ async def create( debtor_routing_number: The debtor's routing number. + end_to_end_identification: A free-form reference string set by the sender mirrored back in the subsequent + wire transfer. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -310,6 +319,7 @@ async def create( "debtor_account_number": debtor_account_number, "debtor_external_account_id": debtor_external_account_id, "debtor_routing_number": debtor_routing_number, + "end_to_end_identification": end_to_end_identification, }, wire_drawdown_request_create_params.WireDrawdownRequestCreateParams, ), diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index aca2bee42..7d9e8e37f 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -42,6 +42,12 @@ class WireDrawdownRequestCreateParams(TypedDict, total=False): debtor_routing_number: str """The debtor's routing number.""" + end_to_end_identification: str + """ + A free-form reference string set by the sender mirrored back in the subsequent + wire transfer. + """ + class CreditorAddress(TypedDict, total=False): """The creditor's address.""" diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index dd4783e33..826ff461a 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -66,6 +66,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: debtor_account_number="987654321", debtor_external_account_id="debtor_external_account_id", debtor_routing_number="101050001", + end_to_end_identification="x", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) @@ -250,6 +251,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) debtor_account_number="987654321", debtor_external_account_id="debtor_external_account_id", debtor_routing_number="101050001", + end_to_end_identification="x", ) assert_matches_type(WireDrawdownRequest, wire_drawdown_request, path=["response"]) From ae553459fc752aee5a781ac58c436625dedefdde Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Feb 2026 22:26:31 +0000 Subject: [PATCH 1158/1325] feat(api): api update --- .stats.yml | 2 +- src/increase/_base_client.py | 2 ++ src/increase/_exceptions.py | 2 ++ src/increase/_response.py | 8 ++++++++ 4 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 42c775db0..b138946e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a71b48efd87b38f1e7fd01e83a58b902b2c262b2606c4bf8e1ad0d7f562772e.yml openapi_spec_hash: a159f26827b08d4900b7b354854535c7 -config_hash: 4b562e97b3d8b4cba758a87d4927a76d +config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index aaf20fcf0..aaf58e5a0 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -1042,6 +1042,7 @@ def request( response.reason_phrase, response.headers, ) + log.debug("idempotent_replayed: %s", response.headers.get("Idempotent-Replayed")) try: response.raise_for_status() @@ -1626,6 +1627,7 @@ async def request( response.reason_phrase, response.headers, ) + log.debug("idempotent_replayed: %s", response.headers.get("Idempotent-Replayed")) try: response.raise_for_status() diff --git a/src/increase/_exceptions.py b/src/increase/_exceptions.py index cc8bcda03..66d395d78 100644 --- a/src/increase/_exceptions.py +++ b/src/increase/_exceptions.py @@ -78,11 +78,13 @@ class APIStatusError(APIError): response: httpx.Response status_code: int + idempotent_replayed: str | None def __init__(self, message: str, *, response: httpx.Response, body: object | None) -> None: super().__init__(message, response.request, body=body) self.response = response self.status_code = response.status_code + self.idempotent_replayed = response.headers.get("Idempotent-Replayed") class APIConnectionError(APIError): diff --git a/src/increase/_response.py b/src/increase/_response.py index 8e6f5b425..b64b589d6 100644 --- a/src/increase/_response.py +++ b/src/increase/_response.py @@ -271,6 +271,10 @@ def _parse(self, *, to: type[_T] | None = None) -> R | _T: class APIResponse(BaseAPIResponse[R]): + @property + def idempotent_replayed(self) -> str | None: + return self.http_response.headers.get("Idempotent-Replayed") # type: ignore[no-any-return] + @overload def parse(self, *, to: type[_T]) -> _T: ... @@ -373,6 +377,10 @@ def iter_lines(self) -> Iterator[str]: class AsyncAPIResponse(BaseAPIResponse[R]): + @property + def idempotent_replayed(self) -> str | None: + return self.http_response.headers.get("Idempotent-Replayed") # type: ignore[no-any-return] + @overload async def parse(self, *, to: type[_T]) -> _T: ... From 7b669eacd23a4835b56968786dce01b1f93d45b6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 17:07:40 +0000 Subject: [PATCH 1159/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/fednow_transfer.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b138946e6..c4189e824 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a71b48efd87b38f1e7fd01e83a58b902b2c262b2606c4bf8e1ad0d7f562772e.yml -openapi_spec_hash: a159f26827b08d4900b7b354854535c7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27bb508e6a503f797a19506901c8f0116f970947741708bcebd38a1399ef7f23.yml +openapi_spec_hash: c92a7ed16b42e192b8201ce5ffe73dc1 config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/types/fednow_transfer.py b/src/increase/types/fednow_transfer.py index 15274ed46..cefd454e1 100644 --- a/src/increase/types/fednow_transfer.py +++ b/src/increase/types/fednow_transfer.py @@ -13,6 +13,7 @@ "CreatedByAPIKey", "CreatedByOAuthApplication", "CreatedByUser", + "CreditorAddress", "Rejection", "Submission", ] @@ -71,6 +72,22 @@ class CreatedBy(BaseModel): """If present, details about the User that created the transfer.""" +class CreditorAddress(BaseModel): + """The creditor's address.""" + + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + line1: Optional[str] = None + """The first line of the address.""" + + postal_code: Optional[str] = None + """The ZIP code of the address.""" + + state: Optional[str] = None + """The address state.""" + + class Rejection(BaseModel): """ If the transfer is rejected by FedNow or the destination financial institution, this will contain supplemental details. @@ -185,6 +202,9 @@ class FednowTransfer(BaseModel): created_by: Optional[CreatedBy] = None """What object created the transfer, either via the API or the dashboard.""" + creditor_address: Optional[CreditorAddress] = None + """The creditor's address.""" + creditor_name: str """The name of the transfer's recipient. From d0bb9107fe19cbd5438d35b8d6e7488975055e98 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 18:36:00 +0000 Subject: [PATCH 1160/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/event_subscription.py | 297 ++++++++++++++++++++++- 2 files changed, 297 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c4189e824..93ad8302b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-27bb508e6a503f797a19506901c8f0116f970947741708bcebd38a1399ef7f23.yml -openapi_spec_hash: c92a7ed16b42e192b8201ce5ffe73dc1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8d8b6be8ba7f7a6d32c2e6e11007f92a20bd754b94346f130b6727838478fe43.yml +openapi_spec_hash: 47feb2b6f0006718f63d6bd2ea4ef417 config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index ec91a17bf..61bed1a1f 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -1,12 +1,299 @@ # 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__ = ["EventSubscription"] +__all__ = ["EventSubscription", "SelectedEventCategory"] + + +class SelectedEventCategory(BaseModel): + event_category: Optional[ + Literal[ + "account.created", + "account.updated", + "account_number.created", + "account_number.updated", + "account_statement.created", + "account_transfer.created", + "account_transfer.updated", + "ach_prenotification.created", + "ach_prenotification.updated", + "ach_transfer.created", + "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", + "bookkeeping_account.created", + "bookkeeping_account.updated", + "bookkeeping_entry_set.updated", + "card.created", + "card.updated", + "card_payment.created", + "card_payment.updated", + "card_profile.created", + "card_profile.updated", + "card_dispute.created", + "card_dispute.updated", + "check_deposit.created", + "check_deposit.updated", + "check_transfer.created", + "check_transfer.updated", + "declined_transaction.created", + "digital_card_profile.created", + "digital_card_profile.updated", + "digital_wallet_token.created", + "digital_wallet_token.updated", + "document.created", + "entity.created", + "entity.updated", + "event_subscription.created", + "event_subscription.updated", + "export.created", + "export.updated", + "external_account.created", + "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", + "file.created", + "group.updated", + "group.heartbeat", + "inbound_ach_transfer.created", + "inbound_ach_transfer.updated", + "inbound_ach_transfer_return.created", + "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", + "inbound_wire_drawdown_request.created", + "inbound_wire_transfer.created", + "inbound_wire_transfer.updated", + "intrafi_account_enrollment.created", + "intrafi_account_enrollment.updated", + "intrafi_exclusion.created", + "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", + "lockbox.created", + "lockbox.updated", + "oauth_connection.created", + "oauth_connection.deactivated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", + "pending_transaction.created", + "pending_transaction.updated", + "physical_card.created", + "physical_card.updated", + "physical_card_profile.created", + "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", + "program.created", + "program.updated", + "proof_of_authorization_request.created", + "proof_of_authorization_request.updated", + "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", + "real_time_decision.digital_wallet_token_requested", + "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", + "real_time_payments_transfer.created", + "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", + "wire_transfer.created", + "wire_transfer.updated", + ] + ] = None + """The category of the Event. + + - `account.created` - Occurs whenever an Account is created. + - `account.updated` - Occurs whenever an Account is updated. + - `account_number.created` - Occurs whenever an Account Number is created. + - `account_number.updated` - Occurs whenever an Account Number is updated. + - `account_statement.created` - Occurs whenever an Account Statement is created. + - `account_transfer.created` - Occurs whenever an Account Transfer is created. + - `account_transfer.updated` - Occurs whenever an Account Transfer is updated. + - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is + created. + - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is + updated. + - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. + - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. + - `blockchain_address.created` - Occurs whenever a Blockchain Address is + created. + - `blockchain_address.updated` - Occurs whenever a Blockchain Address is + updated. + - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp + Transfer is created. + - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp + Transfer is updated. + - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp + Transfer is created. + - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp + Transfer is updated. + - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is + created. + - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is + updated. + - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is + created. + - `card.created` - Occurs whenever a Card is created. + - `card.updated` - Occurs whenever a Card is updated. + - `card_payment.created` - Occurs whenever a Card Payment is created. + - `card_payment.updated` - Occurs whenever a Card Payment is updated. + - `card_profile.created` - Occurs whenever a Card Profile is created. + - `card_profile.updated` - Occurs whenever a Card Profile is updated. + - `card_dispute.created` - Occurs whenever a Card Dispute is created. + - `card_dispute.updated` - Occurs whenever a Card Dispute is updated. + - `check_deposit.created` - Occurs whenever a Check Deposit is created. + - `check_deposit.updated` - Occurs whenever a Check Deposit is updated. + - `check_transfer.created` - Occurs whenever a Check Transfer is created. + - `check_transfer.updated` - Occurs whenever a Check Transfer is updated. + - `declined_transaction.created` - Occurs whenever a Declined Transaction is + created. + - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is + created. + - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is + updated. + - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is + created. + - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is + updated. + - `document.created` - Occurs whenever a Document is created. + - `entity.created` - Occurs whenever an Entity is created. + - `entity.updated` - Occurs whenever an Entity is updated. + - `event_subscription.created` - Occurs whenever an Event Subscription is + created. + - `event_subscription.updated` - Occurs whenever an Event Subscription is + updated. + - `export.created` - Occurs whenever an Export is created. + - `export.updated` - Occurs whenever an Export is updated. + - `external_account.created` - Occurs whenever an External Account is created. + - `external_account.updated` - Occurs whenever an External Account is updated. + - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. + - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. + - `file.created` - Occurs whenever a File is created. + - `group.updated` - Occurs whenever a Group is updated. + - `group.heartbeat` - Increase may send webhooks with this category to see if a + webhook endpoint is working properly. + - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is + created. + - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is + updated. + - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH + Transfer Return is created. + - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH + Transfer Return is updated. + - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is + created. + - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is + updated. + - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer + is created. + - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer + is updated. + - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. + - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. + - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound + Real-Time Payments Transfer is created. + - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound + Real-Time Payments Transfer is updated. + - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire + Drawdown Request is created. + - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is + created. + - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is + updated. + - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account + Enrollment is created. + - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account + Enrollment is updated. + - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. + - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. + - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is + created. + - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is + updated. + - `lockbox.created` - Occurs whenever a Lockbox is created. + - `lockbox.updated` - Occurs whenever a Lockbox is updated. + - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. + - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is + deactivated. + - `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 + updated. + - `physical_card.created` - Occurs whenever a Physical Card is created. + - `physical_card.updated` - Occurs whenever a Physical Card is updated. + - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is + created. + - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is + updated. + - `physical_check.created` - Occurs whenever a Physical Check is created. + - `physical_check.updated` - Occurs whenever a Physical Check is updated. + - `program.created` - Occurs whenever a Program is created. + - `program.updated` - Occurs whenever a Program is updated. + - `proof_of_authorization_request.created` - Occurs whenever a Proof of + Authorization Request is created. + - `proof_of_authorization_request.updated` - Occurs whenever a Proof of + Authorization Request is updated. + - `real_time_decision.card_authorization_requested` - Occurs whenever a + Real-Time Decision is created in response to a card authorization. + - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a + Real-Time Decision is created in response to a card balance inquiry. + - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a + Real-Time Decision is created in response to a digital wallet provisioning + attempt. + - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever + a Real-Time Decision is created in response to a digital wallet requiring + two-factor authentication. + - `real_time_decision.card_authentication_requested` - Occurs whenever a + Real-Time Decision is created in response to 3DS authentication. + - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever + a Real-Time Decision is created in response to 3DS authentication challenges. + - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments + Transfer is created. + - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments + Transfer is updated. + - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time + 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. + - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is + updated. + - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. + - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. + """ class EventSubscription(BaseModel): @@ -35,6 +322,12 @@ class EventSubscription(BaseModel): with this OAuth Connection. """ + selected_event_categories: Optional[List[SelectedEventCategory]] = None + """ + If specified, this subscription will only receive webhooks for Events with the + specified `category`. + """ + selected_event_category: Optional[ Literal[ "account.created", From a051ba84fad18752c99c5978a5c5dc4c98aac987 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 19:24:20 +0000 Subject: [PATCH 1161/1325] feat(api): api update --- .stats.yml | 4 ++-- .../types/real_time_decision_action_params.py | 22 +++++++++++++++++++ .../api_resources/test_real_time_decisions.py | 16 ++++++++++++-- 3 files changed, 38 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 93ad8302b..95e6f14ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8d8b6be8ba7f7a6d32c2e6e11007f92a20bd754b94346f130b6727838478fe43.yml -openapi_spec_hash: 47feb2b6f0006718f63d6bd2ea4ef417 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b847cf729b12480e571ffb4dc688af46c718929fcb1f6e7c57118974f2767295.yml +openapi_spec_hash: e471ddc67ba930c5efe093aa5ca95ae9 config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index decc8849f..2516c9526 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -9,6 +9,7 @@ "RealTimeDecisionActionParams", "CardAuthentication", "CardAuthenticationChallenge", + "CardAuthenticationChallengeSuccess", "CardAuthorization", "CardAuthorizationApproval", "CardAuthorizationApprovalCardholderAddressVerificationResult", @@ -76,6 +77,21 @@ class CardAuthentication(TypedDict, total=False): """ +class CardAuthenticationChallengeSuccess(TypedDict, total=False): + """ + If your application was able to deliver the one-time code, this contains metadata about the delivery. + """ + + email: str + """The email address that was used to deliver the one-time code to the cardholder.""" + + phone: str + """ + The phone number that was used to deliver the one-time code to the cardholder + via SMS. + """ + + class CardAuthenticationChallenge(TypedDict, total=False): """ If the Real-Time Decision relates to 3DS card authentication challenge delivery, this object contains your response. @@ -92,6 +108,12 @@ class CardAuthenticationChallenge(TypedDict, total=False): cardholder. """ + success: CardAuthenticationChallengeSuccess + """ + If your application was able to deliver the one-time code, this contains + metadata about the delivery. + """ + class CardAuthorizationApprovalCardholderAddressVerificationResult(TypedDict, total=False): """Your decisions on whether or not each provided address component is a match. diff --git a/tests/api_resources/test_real_time_decisions.py b/tests/api_resources/test_real_time_decisions.py index 57855613a..c25362743 100644 --- a/tests/api_resources/test_real_time_decisions.py +++ b/tests/api_resources/test_real_time_decisions.py @@ -67,7 +67,13 @@ def test_method_action_with_all_params(self, client: Increase) -> None: real_time_decision = client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, - card_authentication_challenge={"result": "success"}, + card_authentication_challenge={ + "result": "success", + "success": { + "email": "dev@stainless.com", + "phone": "x", + }, + }, card_authorization={ "decision": "approve", "approval": { @@ -187,7 +193,13 @@ async def test_method_action_with_all_params(self, async_client: AsyncIncrease) real_time_decision = await async_client.real_time_decisions.action( real_time_decision_id="real_time_decision_j76n2e810ezcg3zh5qtn", card_authentication={"decision": "approve"}, - card_authentication_challenge={"result": "success"}, + card_authentication_challenge={ + "result": "success", + "success": { + "email": "dev@stainless.com", + "phone": "x", + }, + }, card_authorization={ "decision": "approve", "approval": { From f7316d40caa8bc8814862b972ab88b1c64b845c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 21:18:26 +0000 Subject: [PATCH 1162/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/event_subscription.py | 303 ++--------------------- 2 files changed, 17 insertions(+), 290 deletions(-) diff --git a/.stats.yml b/.stats.yml index 95e6f14ff..e7b826e77 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b847cf729b12480e571ffb4dc688af46c718929fcb1f6e7c57118974f2767295.yml -openapi_spec_hash: e471ddc67ba930c5efe093aa5ca95ae9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-346f14f373a47d45ffb811ed7fd5ebf9c296f340358fed11ad93e0990463c043.yml +openapi_spec_hash: 198a8fc2986ce2db7c1e07022415ec62 config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 61bed1a1f..3663f5c4f 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["EventSubscription", "SelectedEventCategory"] @@ -328,293 +330,6 @@ class EventSubscription(BaseModel): specified `category`. """ - selected_event_category: Optional[ - Literal[ - "account.created", - "account.updated", - "account_number.created", - "account_number.updated", - "account_statement.created", - "account_transfer.created", - "account_transfer.updated", - "ach_prenotification.created", - "ach_prenotification.updated", - "ach_transfer.created", - "ach_transfer.updated", - "blockchain_address.created", - "blockchain_address.updated", - "blockchain_offramp_transfer.created", - "blockchain_offramp_transfer.updated", - "blockchain_onramp_transfer.created", - "blockchain_onramp_transfer.updated", - "bookkeeping_account.created", - "bookkeeping_account.updated", - "bookkeeping_entry_set.updated", - "card.created", - "card.updated", - "card_payment.created", - "card_payment.updated", - "card_profile.created", - "card_profile.updated", - "card_dispute.created", - "card_dispute.updated", - "check_deposit.created", - "check_deposit.updated", - "check_transfer.created", - "check_transfer.updated", - "declined_transaction.created", - "digital_card_profile.created", - "digital_card_profile.updated", - "digital_wallet_token.created", - "digital_wallet_token.updated", - "document.created", - "entity.created", - "entity.updated", - "event_subscription.created", - "event_subscription.updated", - "export.created", - "export.updated", - "external_account.created", - "external_account.updated", - "fednow_transfer.created", - "fednow_transfer.updated", - "file.created", - "group.updated", - "group.heartbeat", - "inbound_ach_transfer.created", - "inbound_ach_transfer.updated", - "inbound_ach_transfer_return.created", - "inbound_ach_transfer_return.updated", - "inbound_check_deposit.created", - "inbound_check_deposit.updated", - "inbound_fednow_transfer.created", - "inbound_fednow_transfer.updated", - "inbound_mail_item.created", - "inbound_mail_item.updated", - "inbound_real_time_payments_transfer.created", - "inbound_real_time_payments_transfer.updated", - "inbound_wire_drawdown_request.created", - "inbound_wire_transfer.created", - "inbound_wire_transfer.updated", - "intrafi_account_enrollment.created", - "intrafi_account_enrollment.updated", - "intrafi_exclusion.created", - "intrafi_exclusion.updated", - "legacy_card_dispute.created", - "legacy_card_dispute.updated", - "lockbox.created", - "lockbox.updated", - "oauth_connection.created", - "oauth_connection.deactivated", - "card_push_transfer.created", - "card_push_transfer.updated", - "card_validation.created", - "card_validation.updated", - "pending_transaction.created", - "pending_transaction.updated", - "physical_card.created", - "physical_card.updated", - "physical_card_profile.created", - "physical_card_profile.updated", - "physical_check.created", - "physical_check.updated", - "program.created", - "program.updated", - "proof_of_authorization_request.created", - "proof_of_authorization_request.updated", - "real_time_decision.card_authorization_requested", - "real_time_decision.card_balance_inquiry_requested", - "real_time_decision.digital_wallet_token_requested", - "real_time_decision.digital_wallet_authentication_requested", - "real_time_decision.card_authentication_requested", - "real_time_decision.card_authentication_challenge_requested", - "real_time_payments_transfer.created", - "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", - "wire_transfer.created", - "wire_transfer.updated", - ] - ] = None - """ - If specified, this subscription will only receive webhooks for Events with the - specified `category`. - - - `account.created` - Occurs whenever an Account is created. - - `account.updated` - Occurs whenever an Account is updated. - - `account_number.created` - Occurs whenever an Account Number is created. - - `account_number.updated` - Occurs whenever an Account Number is updated. - - `account_statement.created` - Occurs whenever an Account Statement is created. - - `account_transfer.created` - Occurs whenever an Account Transfer is created. - - `account_transfer.updated` - Occurs whenever an Account Transfer is updated. - - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is - created. - - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is - updated. - - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. - - `blockchain_address.created` - Occurs whenever a Blockchain Address is - created. - - `blockchain_address.updated` - Occurs whenever a Blockchain Address is - updated. - - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp - Transfer is created. - - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp - Transfer is updated. - - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp - Transfer is created. - - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp - Transfer is updated. - - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is - created. - - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is - updated. - - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is - created. - - `card.created` - Occurs whenever a Card is created. - - `card.updated` - Occurs whenever a Card is updated. - - `card_payment.created` - Occurs whenever a Card Payment is created. - - `card_payment.updated` - Occurs whenever a Card Payment is updated. - - `card_profile.created` - Occurs whenever a Card Profile is created. - - `card_profile.updated` - Occurs whenever a Card Profile is updated. - - `card_dispute.created` - Occurs whenever a Card Dispute is created. - - `card_dispute.updated` - Occurs whenever a Card Dispute is updated. - - `check_deposit.created` - Occurs whenever a Check Deposit is created. - - `check_deposit.updated` - Occurs whenever a Check Deposit is updated. - - `check_transfer.created` - Occurs whenever a Check Transfer is created. - - `check_transfer.updated` - Occurs whenever a Check Transfer is updated. - - `declined_transaction.created` - Occurs whenever a Declined Transaction is - created. - - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is - created. - - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is - updated. - - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is - created. - - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is - updated. - - `document.created` - Occurs whenever a Document is created. - - `entity.created` - Occurs whenever an Entity is created. - - `entity.updated` - Occurs whenever an Entity is updated. - - `event_subscription.created` - Occurs whenever an Event Subscription is - created. - - `event_subscription.updated` - Occurs whenever an Event Subscription is - updated. - - `export.created` - Occurs whenever an Export is created. - - `export.updated` - Occurs whenever an Export is updated. - - `external_account.created` - Occurs whenever an External Account is created. - - `external_account.updated` - Occurs whenever an External Account is updated. - - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. - - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - - `file.created` - Occurs whenever a File is created. - - `group.updated` - Occurs whenever a Group is updated. - - `group.heartbeat` - Increase may send webhooks with this category to see if a - webhook endpoint is working properly. - - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is - created. - - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is - updated. - - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH - Transfer Return is created. - - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH - Transfer Return is updated. - - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is - created. - - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is - updated. - - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer - is created. - - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer - is updated. - - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound - Real-Time Payments Transfer is created. - - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound - Real-Time Payments Transfer is updated. - - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire - Drawdown Request is created. - - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is - created. - - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is - updated. - - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account - Enrollment is created. - - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account - Enrollment is updated. - - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. - - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is - created. - - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is - updated. - - `lockbox.created` - Occurs whenever a Lockbox is created. - - `lockbox.updated` - Occurs whenever a Lockbox is updated. - - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is - deactivated. - - `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 - updated. - - `physical_card.created` - Occurs whenever a Physical Card is created. - - `physical_card.updated` - Occurs whenever a Physical Card is updated. - - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is - created. - - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is - updated. - - `physical_check.created` - Occurs whenever a Physical Check is created. - - `physical_check.updated` - Occurs whenever a Physical Check is updated. - - `program.created` - Occurs whenever a Program is created. - - `program.updated` - Occurs whenever a Program is updated. - - `proof_of_authorization_request.created` - Occurs whenever a Proof of - Authorization Request is created. - - `proof_of_authorization_request.updated` - Occurs whenever a Proof of - Authorization Request is updated. - - `real_time_decision.card_authorization_requested` - Occurs whenever a - Real-Time Decision is created in response to a card authorization. - - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a - Real-Time Decision is created in response to a card balance inquiry. - - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a - Real-Time Decision is created in response to a digital wallet provisioning - attempt. - - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever - a Real-Time Decision is created in response to a digital wallet requiring - two-factor authentication. - - `real_time_decision.card_authentication_requested` - Occurs whenever a - Real-Time Decision is created in response to 3DS authentication. - - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever - a Real-Time Decision is created in response to 3DS authentication challenges. - - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments - Transfer is created. - - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments - Transfer is updated. - - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time - 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. - - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is - updated. - - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. - - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. - """ - status: Literal["active", "disabled", "deleted", "requires_attention"] """This indicates if we'll send notifications to this subscription. @@ -635,3 +350,15 @@ class EventSubscription(BaseModel): url: str """The webhook url where we'll send notifications.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From 2ab5f2aff7b9ba45d50fddff77be63921b0d9448 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 22:06:07 +0000 Subject: [PATCH 1163/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_deposit.py | 35 ++++++++++++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index e7b826e77..8a9805b70 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-346f14f373a47d45ffb811ed7fd5ebf9c296f340358fed11ad93e0990463c043.yml -openapi_spec_hash: 198a8fc2986ce2db7c1e07022415ec62 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fc32a84f69e813f34ad70b65dba1ac56957f3c69361935f50df26caadaae3fce.yml +openapi_spec_hash: 40b5bd3cc33a7002c1a6f36fe97377ef config_hash: b881baa4e0bc537d0caf02152712bd28 diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 486422de4..5cbddc221 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal @@ -11,6 +11,7 @@ __all__ = [ "CheckDeposit", "DepositAcceptance", + "DepositAdjustment", "DepositRejection", "DepositReturn", "DepositSubmission", @@ -78,6 +79,32 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class DepositAdjustment(BaseModel): + adjusted_at: datetime + """The time at which the adjustment was received.""" + + amount: int + """The amount of the adjustment.""" + + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + """The reason for the adjustment. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + """ + + transaction_id: str + """The id of the transaction for the adjustment.""" + + class DepositRejection(BaseModel): """ If your deposit is rejected by Increase, this will contain details as to why it was rejected. @@ -395,6 +422,12 @@ class CheckDeposit(BaseModel): contain details of the parsed check. """ + deposit_adjustments: List[DepositAdjustment] + """ + If the deposit or the return was adjusted by the receiving institution, this + will contain details of the adjustments. + """ + deposit_rejection: Optional[DepositRejection] = None """ If your deposit is rejected by Increase, this will contain details as to why it From e9afb76d9b72b1222afeb8cfabde6a92808b1b02 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 2 Mar 2026 22:30:18 +0000 Subject: [PATCH 1164/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 8 + .../resources/simulations/__init__.py | 14 + .../simulations/card_authentications.py | 501 ++++++++++++++++++ .../resources/simulations/simulations.py | 32 ++ src/increase/types/simulations/__init__.py | 4 + ...uthentication_challenge_attempts_params.py | 12 + .../card_authentication_create_params.py | 50 ++ .../simulations/test_card_authentications.py | 274 ++++++++++ 9 files changed, 899 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/simulations/card_authentications.py create mode 100644 src/increase/types/simulations/card_authentication_challenge_attempts_params.py create mode 100644 src/increase/types/simulations/card_authentication_create_params.py create mode 100644 tests/api_resources/simulations/test_card_authentications.py diff --git a/.stats.yml b/.stats.yml index 8a9805b70..464498e14 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fc32a84f69e813f34ad70b65dba1ac56957f3c69361935f50df26caadaae3fce.yml -openapi_spec_hash: 40b5bd3cc33a7002c1a6f36fe97377ef -config_hash: b881baa4e0bc537d0caf02152712bd28 +configured_endpoints: 235 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e9d1e51ce8416b747bc7ee664bb2c2e2095e2c5e49bad9e3a9c9657f3fed5994.yml +openapi_spec_hash: db0318b3db534a5982ab89666b2e0117 +config_hash: 463c5cf7a7f13cf7db270b287814b56c diff --git a/api.md b/api.md index 6fbe4ce78..137ea1264 100644 --- a/api.md +++ b/api.md @@ -874,6 +874,14 @@ Methods: - client.simulations.card_refunds.create(\*\*params) -> Transaction +## CardAuthentications + +Methods: + +- client.simulations.card_authentications.create(\*\*params) -> CardPayment +- client.simulations.card_authentications.challenge_attempts(card_payment_id, \*\*params) -> CardPayment +- client.simulations.card_authentications.challenges(card_payment_id) -> CardPayment + ## CardDisputes Methods: diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 93e0e270f..972e5b7bd 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -152,6 +152,14 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) +from .card_authentications import ( + CardAuthenticationsResource, + AsyncCardAuthenticationsResource, + CardAuthenticationsResourceWithRawResponse, + AsyncCardAuthenticationsResourceWithRawResponse, + CardAuthenticationsResourceWithStreamingResponse, + AsyncCardAuthenticationsResourceWithStreamingResponse, +) from .pending_transactions import ( PendingTransactionsResource, AsyncPendingTransactionsResource, @@ -318,6 +326,12 @@ "AsyncCardRefundsResourceWithRawResponse", "CardRefundsResourceWithStreamingResponse", "AsyncCardRefundsResourceWithStreamingResponse", + "CardAuthenticationsResource", + "AsyncCardAuthenticationsResource", + "CardAuthenticationsResourceWithRawResponse", + "AsyncCardAuthenticationsResourceWithRawResponse", + "CardAuthenticationsResourceWithStreamingResponse", + "AsyncCardAuthenticationsResourceWithStreamingResponse", "CardDisputesResource", "AsyncCardDisputesResource", "CardDisputesResourceWithRawResponse", diff --git a/src/increase/resources/simulations/card_authentications.py b/src/increase/resources/simulations/card_authentications.py new file mode 100644 index 000000000..432a9b574 --- /dev/null +++ b/src/increase/resources/simulations/card_authentications.py @@ -0,0 +1,501 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal + +import httpx + +from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from ..._utils import maybe_transform, async_maybe_transform +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.simulations import card_authentication_create_params, card_authentication_challenge_attempts_params +from ...types.card_payment import CardPayment + +__all__ = ["CardAuthenticationsResource", "AsyncCardAuthenticationsResource"] + + +class CardAuthenticationsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> CardAuthenticationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return CardAuthenticationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> CardAuthenticationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return CardAuthenticationsResourceWithStreamingResponse(self) + + def create( + self, + *, + card_id: str, + category: Literal["payment_authentication", "non_payment_authentication"] | Omit = omit, + device_channel: Literal["app", "browser", "three_ds_requestor_initiated"] | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_name: str | Omit = omit, + purchase_amount: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates a Card Authentication attempt on a [Card](#cards). + + The attempt always + results in a [Card Payment](#card_payments) being created, either with a status + that allows further action or a terminal failed status. + + Args: + card_id: The identifier of the Card to be authorized. + + category: The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + + device_channel: The device channel of the card authentication attempt. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + + merchant_acceptor_id: The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + + merchant_category_code: The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + + merchant_country: The country the merchant resides in. + + merchant_name: The name of the merchant + + purchase_amount: The purchase amount in cents. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/simulations/card_authentications", + body=maybe_transform( + { + "card_id": card_id, + "category": category, + "device_channel": device_channel, + "merchant_acceptor_id": merchant_acceptor_id, + "merchant_category_code": merchant_category_code, + "merchant_country": merchant_country, + "merchant_name": merchant_name, + "purchase_amount": purchase_amount, + }, + card_authentication_create_params.CardAuthenticationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + def challenge_attempts( + self, + card_payment_id: str, + *, + one_time_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates an attempt at a Card Authentication Challenge. + + This updates the + `card_authentications` object under the [Card Payment](#card_payments). You can + also attempt the challenge by navigating to + https://dashboard.increase.com/card_authentication_simulation/:card_payment_id. + + Args: + card_payment_id: The identifier of the Card Payment to be challenged. + + one_time_code: The one-time code to be validated. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_payment_id: + raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") + return self._post( + f"/simulations/card_authentications/{card_payment_id}/challenge_attempts", + body=maybe_transform( + {"one_time_code": one_time_code}, + card_authentication_challenge_attempts_params.CardAuthenticationChallengeAttemptsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + def challenges( + self, + card_payment_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates starting a Card Authentication Challenge for an existing Card + Authentication. This updates the `card_authentications` object under the + [Card Payment](#card_payments). To attempt the challenge, use the + `/simulations/card_authentications/:card_payment_id/challenge_attempts` endpoint + or navigate to + https://dashboard.increase.com/card_authentication_simulation/:card_payment_id. + + Args: + card_payment_id: The identifier of the Card Payment to be challenged. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_payment_id: + raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") + return self._post( + f"/simulations/card_authentications/{card_payment_id}/challenges", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class AsyncCardAuthenticationsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncCardAuthenticationsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncCardAuthenticationsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncCardAuthenticationsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncCardAuthenticationsResourceWithStreamingResponse(self) + + async def create( + self, + *, + card_id: str, + category: Literal["payment_authentication", "non_payment_authentication"] | Omit = omit, + device_channel: Literal["app", "browser", "three_ds_requestor_initiated"] | Omit = omit, + merchant_acceptor_id: str | Omit = omit, + merchant_category_code: str | Omit = omit, + merchant_country: str | Omit = omit, + merchant_name: str | Omit = omit, + purchase_amount: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates a Card Authentication attempt on a [Card](#cards). + + The attempt always + results in a [Card Payment](#card_payments) being created, either with a status + that allows further action or a terminal failed status. + + Args: + card_id: The identifier of the Card to be authorized. + + category: The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + + device_channel: The device channel of the card authentication attempt. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + + merchant_acceptor_id: The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + + merchant_category_code: The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + + merchant_country: The country the merchant resides in. + + merchant_name: The name of the merchant + + purchase_amount: The purchase amount in cents. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/simulations/card_authentications", + body=await async_maybe_transform( + { + "card_id": card_id, + "category": category, + "device_channel": device_channel, + "merchant_acceptor_id": merchant_acceptor_id, + "merchant_category_code": merchant_category_code, + "merchant_country": merchant_country, + "merchant_name": merchant_name, + "purchase_amount": purchase_amount, + }, + card_authentication_create_params.CardAuthenticationCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + async def challenge_attempts( + self, + card_payment_id: str, + *, + one_time_code: str, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """Simulates an attempt at a Card Authentication Challenge. + + This updates the + `card_authentications` object under the [Card Payment](#card_payments). You can + also attempt the challenge by navigating to + https://dashboard.increase.com/card_authentication_simulation/:card_payment_id. + + Args: + card_payment_id: The identifier of the Card Payment to be challenged. + + one_time_code: The one-time code to be validated. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_payment_id: + raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") + return await self._post( + f"/simulations/card_authentications/{card_payment_id}/challenge_attempts", + body=await async_maybe_transform( + {"one_time_code": one_time_code}, + card_authentication_challenge_attempts_params.CardAuthenticationChallengeAttemptsParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + async def challenges( + self, + card_payment_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CardPayment: + """ + Simulates starting a Card Authentication Challenge for an existing Card + Authentication. This updates the `card_authentications` object under the + [Card Payment](#card_payments). To attempt the challenge, use the + `/simulations/card_authentications/:card_payment_id/challenge_attempts` endpoint + or navigate to + https://dashboard.increase.com/card_authentication_simulation/:card_payment_id. + + Args: + card_payment_id: The identifier of the Card Payment to be challenged. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not card_payment_id: + raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") + return await self._post( + f"/simulations/card_authentications/{card_payment_id}/challenges", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CardPayment, + ) + + +class CardAuthenticationsResourceWithRawResponse: + def __init__(self, card_authentications: CardAuthenticationsResource) -> None: + self._card_authentications = card_authentications + + self.create = to_raw_response_wrapper( + card_authentications.create, + ) + self.challenge_attempts = to_raw_response_wrapper( + card_authentications.challenge_attempts, + ) + self.challenges = to_raw_response_wrapper( + card_authentications.challenges, + ) + + +class AsyncCardAuthenticationsResourceWithRawResponse: + def __init__(self, card_authentications: AsyncCardAuthenticationsResource) -> None: + self._card_authentications = card_authentications + + self.create = async_to_raw_response_wrapper( + card_authentications.create, + ) + self.challenge_attempts = async_to_raw_response_wrapper( + card_authentications.challenge_attempts, + ) + self.challenges = async_to_raw_response_wrapper( + card_authentications.challenges, + ) + + +class CardAuthenticationsResourceWithStreamingResponse: + def __init__(self, card_authentications: CardAuthenticationsResource) -> None: + self._card_authentications = card_authentications + + self.create = to_streamed_response_wrapper( + card_authentications.create, + ) + self.challenge_attempts = to_streamed_response_wrapper( + card_authentications.challenge_attempts, + ) + self.challenges = to_streamed_response_wrapper( + card_authentications.challenges, + ) + + +class AsyncCardAuthenticationsResourceWithStreamingResponse: + def __init__(self, card_authentications: AsyncCardAuthenticationsResource) -> None: + self._card_authentications = card_authentications + + self.create = async_to_streamed_response_wrapper( + card_authentications.create, + ) + self.challenge_attempts = async_to_streamed_response_wrapper( + card_authentications.challenge_attempts, + ) + self.challenges = async_to_streamed_response_wrapper( + card_authentications.challenges, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index e5c83ebc7..3720f6d50 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -148,6 +148,14 @@ CardAuthorizationsResourceWithStreamingResponse, AsyncCardAuthorizationsResourceWithStreamingResponse, ) +from .card_authentications import ( + CardAuthenticationsResource, + AsyncCardAuthenticationsResource, + CardAuthenticationsResourceWithRawResponse, + AsyncCardAuthenticationsResourceWithRawResponse, + CardAuthenticationsResourceWithStreamingResponse, + AsyncCardAuthenticationsResourceWithStreamingResponse, +) from .pending_transactions import ( PendingTransactionsResource, AsyncPendingTransactionsResource, @@ -297,6 +305,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResource: def card_refunds(self) -> CardRefundsResource: return CardRefundsResource(self._client) + @cached_property + def card_authentications(self) -> CardAuthenticationsResource: + return CardAuthenticationsResource(self._client) + @cached_property def card_disputes(self) -> CardDisputesResource: return CardDisputesResource(self._client) @@ -442,6 +454,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResource: def card_refunds(self) -> AsyncCardRefundsResource: return AsyncCardRefundsResource(self._client) + @cached_property + def card_authentications(self) -> AsyncCardAuthenticationsResource: + return AsyncCardAuthenticationsResource(self._client) + @cached_property def card_disputes(self) -> AsyncCardDisputesResource: return AsyncCardDisputesResource(self._client) @@ -590,6 +606,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithRawRespons def card_refunds(self) -> CardRefundsResourceWithRawResponse: return CardRefundsResourceWithRawResponse(self._simulations.card_refunds) + @cached_property + def card_authentications(self) -> CardAuthenticationsResourceWithRawResponse: + return CardAuthenticationsResourceWithRawResponse(self._simulations.card_authentications) + @cached_property def card_disputes(self) -> CardDisputesResourceWithRawResponse: return CardDisputesResourceWithRawResponse(self._simulations.card_disputes) @@ -723,6 +743,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithRawRe def card_refunds(self) -> AsyncCardRefundsResourceWithRawResponse: return AsyncCardRefundsResourceWithRawResponse(self._simulations.card_refunds) + @cached_property + def card_authentications(self) -> AsyncCardAuthenticationsResourceWithRawResponse: + return AsyncCardAuthenticationsResourceWithRawResponse(self._simulations.card_authentications) + @cached_property def card_disputes(self) -> AsyncCardDisputesResourceWithRawResponse: return AsyncCardDisputesResourceWithRawResponse(self._simulations.card_disputes) @@ -856,6 +880,10 @@ def card_fuel_confirmations(self) -> CardFuelConfirmationsResourceWithStreamingR def card_refunds(self) -> CardRefundsResourceWithStreamingResponse: return CardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + @cached_property + def card_authentications(self) -> CardAuthenticationsResourceWithStreamingResponse: + return CardAuthenticationsResourceWithStreamingResponse(self._simulations.card_authentications) + @cached_property def card_disputes(self) -> CardDisputesResourceWithStreamingResponse: return CardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) @@ -991,6 +1019,10 @@ def card_fuel_confirmations(self) -> AsyncCardFuelConfirmationsResourceWithStrea def card_refunds(self) -> AsyncCardRefundsResourceWithStreamingResponse: return AsyncCardRefundsResourceWithStreamingResponse(self._simulations.card_refunds) + @cached_property + def card_authentications(self) -> AsyncCardAuthenticationsResourceWithStreamingResponse: + return AsyncCardAuthenticationsResourceWithStreamingResponse(self._simulations.card_authentications) + @cached_property def card_disputes(self) -> AsyncCardDisputesResourceWithStreamingResponse: return AsyncCardDisputesResourceWithStreamingResponse(self._simulations.card_disputes) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index c9c363a73..4122c3925 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -18,6 +18,7 @@ from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams from .inbound_mail_item_create_params import InboundMailItemCreateParams as InboundMailItemCreateParams from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams +from .card_authentication_create_params import CardAuthenticationCreateParams as CardAuthenticationCreateParams from .card_authorization_create_response import CardAuthorizationCreateResponse as CardAuthorizationCreateResponse from .card_balance_inquiry_create_params import CardBalanceInquiryCreateParams as CardBalanceInquiryCreateParams from .inbound_ach_transfer_create_params import InboundACHTransferCreateParams as InboundACHTransferCreateParams @@ -45,6 +46,9 @@ from .digital_wallet_token_request_create_response import ( DigitalWalletTokenRequestCreateResponse as DigitalWalletTokenRequestCreateResponse, ) +from .card_authentication_challenge_attempts_params import ( + CardAuthenticationChallengeAttemptsParams as CardAuthenticationChallengeAttemptsParams, +) from .ach_transfer_create_notification_of_change_params import ( ACHTransferCreateNotificationOfChangeParams as ACHTransferCreateNotificationOfChangeParams, ) diff --git a/src/increase/types/simulations/card_authentication_challenge_attempts_params.py b/src/increase/types/simulations/card_authentication_challenge_attempts_params.py new file mode 100644 index 000000000..472611c19 --- /dev/null +++ b/src/increase/types/simulations/card_authentication_challenge_attempts_params.py @@ -0,0 +1,12 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["CardAuthenticationChallengeAttemptsParams"] + + +class CardAuthenticationChallengeAttemptsParams(TypedDict, total=False): + one_time_code: Required[str] + """The one-time code to be validated.""" diff --git a/src/increase/types/simulations/card_authentication_create_params.py b/src/increase/types/simulations/card_authentication_create_params.py new file mode 100644 index 000000000..2f559f1cf --- /dev/null +++ b/src/increase/types/simulations/card_authentication_create_params.py @@ -0,0 +1,50 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, Required, TypedDict + +__all__ = ["CardAuthenticationCreateParams"] + + +class CardAuthenticationCreateParams(TypedDict, total=False): + card_id: Required[str] + """The identifier of the Card to be authorized.""" + + category: Literal["payment_authentication", "non_payment_authentication"] + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ + + device_channel: Literal["app", "browser", "three_ds_requestor_initiated"] + """The device channel of the card authentication attempt. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: str + """The name of the merchant""" + + purchase_amount: int + """The purchase amount in cents.""" diff --git a/tests/api_resources/simulations/test_card_authentications.py b/tests/api_resources/simulations/test_card_authentications.py new file mode 100644 index 000000000..6f5aabc2b --- /dev/null +++ b/tests/api_resources/simulations/test_card_authentications.py @@ -0,0 +1,274 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import CardPayment + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestCardAuthentications: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + card_authentication = client.simulations.card_authentications.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + card_authentication = client.simulations.card_authentications.create( + card_id="card_oubs0hwk5rn6knuecxg2", + category="payment_authentication", + device_channel="app", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_country="US", + merchant_name="x", + purchase_amount=1000, + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.simulations.card_authentications.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.simulations.card_authentications.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_challenge_attempts(self, client: Increase) -> None: + card_authentication = client.simulations.card_authentications.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_raw_response_challenge_attempts(self, client: Increase) -> None: + response = client.simulations.card_authentications.with_raw_response.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_streaming_response_challenge_attempts(self, client: Increase) -> None: + with client.simulations.card_authentications.with_streaming_response.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_challenge_attempts(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_payment_id` but received ''"): + client.simulations.card_authentications.with_raw_response.challenge_attempts( + card_payment_id="", + one_time_code="123456", + ) + + @parametrize + def test_method_challenges(self, client: Increase) -> None: + card_authentication = client.simulations.card_authentications.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_raw_response_challenges(self, client: Increase) -> None: + response = client.simulations.card_authentications.with_raw_response.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + def test_streaming_response_challenges(self, client: Increase) -> None: + with client.simulations.card_authentications.with_streaming_response.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_challenges(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_payment_id` but received ''"): + client.simulations.card_authentications.with_raw_response.challenges( + "", + ) + + +class TestAsyncCardAuthentications: + 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: + card_authentication = await async_client.simulations.card_authentications.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + card_authentication = await async_client.simulations.card_authentications.create( + card_id="card_oubs0hwk5rn6knuecxg2", + category="payment_authentication", + device_channel="app", + merchant_acceptor_id="5665270011000168", + merchant_category_code="5734", + merchant_country="US", + merchant_name="x", + purchase_amount=1000, + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authentications.with_raw_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authentications.with_streaming_response.create( + card_id="card_oubs0hwk5rn6knuecxg2", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_challenge_attempts(self, async_client: AsyncIncrease) -> None: + card_authentication = await async_client.simulations.card_authentications.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_raw_response_challenge_attempts(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authentications.with_raw_response.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_streaming_response_challenge_attempts(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authentications.with_streaming_response.challenge_attempts( + card_payment_id="card_payment_nd3k2kacrqjli8482ave", + one_time_code="123456", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_challenge_attempts(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_payment_id` but received ''"): + await async_client.simulations.card_authentications.with_raw_response.challenge_attempts( + card_payment_id="", + one_time_code="123456", + ) + + @parametrize + async def test_method_challenges(self, async_client: AsyncIncrease) -> None: + card_authentication = await async_client.simulations.card_authentications.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_raw_response_challenges(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.card_authentications.with_raw_response.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + @parametrize + async def test_streaming_response_challenges(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.card_authentications.with_streaming_response.challenges( + "card_payment_nd3k2kacrqjli8482ave", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + card_authentication = await response.parse() + assert_matches_type(CardPayment, card_authentication, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_challenges(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `card_payment_id` but received ''"): + await async_client.simulations.card_authentications.with_raw_response.challenges( + "", + ) From a2ce4b56a3439399780a64f95d4947f1573595f7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 01:32:18 +0000 Subject: [PATCH 1165/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/event_subscriptions.py | 579 +----------------- .../types/event_subscription_create_params.py | 264 ++++---- .../api_resources/test_event_subscriptions.py | 4 +- 4 files changed, 152 insertions(+), 699 deletions(-) diff --git a/.stats.yml b/.stats.yml index 464498e14..fd12aef62 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 235 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e9d1e51ce8416b747bc7ee664bb2c2e2095e2c5e49bad9e3a9c9657f3fed5994.yml -openapi_spec_hash: db0318b3db534a5982ab89666b2e0117 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d23465ee6dfaa64549fa617a3dd213d86a1ddbcf0d01e6595dad4dc8a72d3060.yml +openapi_spec_hash: 48b1e64041179b50d44dd4c58cb515d0 config_hash: 463c5cf7a7f13cf7db270b287814b56c diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index a34185037..c7840b0d6 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -2,6 +2,7 @@ from __future__ import annotations +from typing import Iterable from typing_extensions import Literal import httpx @@ -49,118 +50,7 @@ def create( *, url: str, oauth_connection_id: str | Omit = omit, - selected_event_category: Literal[ - "account.created", - "account.updated", - "account_number.created", - "account_number.updated", - "account_statement.created", - "account_transfer.created", - "account_transfer.updated", - "ach_prenotification.created", - "ach_prenotification.updated", - "ach_transfer.created", - "ach_transfer.updated", - "blockchain_address.created", - "blockchain_address.updated", - "blockchain_offramp_transfer.created", - "blockchain_offramp_transfer.updated", - "blockchain_onramp_transfer.created", - "blockchain_onramp_transfer.updated", - "bookkeeping_account.created", - "bookkeeping_account.updated", - "bookkeeping_entry_set.updated", - "card.created", - "card.updated", - "card_payment.created", - "card_payment.updated", - "card_profile.created", - "card_profile.updated", - "card_dispute.created", - "card_dispute.updated", - "check_deposit.created", - "check_deposit.updated", - "check_transfer.created", - "check_transfer.updated", - "declined_transaction.created", - "digital_card_profile.created", - "digital_card_profile.updated", - "digital_wallet_token.created", - "digital_wallet_token.updated", - "document.created", - "entity.created", - "entity.updated", - "event_subscription.created", - "event_subscription.updated", - "export.created", - "export.updated", - "external_account.created", - "external_account.updated", - "fednow_transfer.created", - "fednow_transfer.updated", - "file.created", - "group.updated", - "group.heartbeat", - "inbound_ach_transfer.created", - "inbound_ach_transfer.updated", - "inbound_ach_transfer_return.created", - "inbound_ach_transfer_return.updated", - "inbound_check_deposit.created", - "inbound_check_deposit.updated", - "inbound_fednow_transfer.created", - "inbound_fednow_transfer.updated", - "inbound_mail_item.created", - "inbound_mail_item.updated", - "inbound_real_time_payments_transfer.created", - "inbound_real_time_payments_transfer.updated", - "inbound_wire_drawdown_request.created", - "inbound_wire_transfer.created", - "inbound_wire_transfer.updated", - "intrafi_account_enrollment.created", - "intrafi_account_enrollment.updated", - "intrafi_exclusion.created", - "intrafi_exclusion.updated", - "legacy_card_dispute.created", - "legacy_card_dispute.updated", - "lockbox.created", - "lockbox.updated", - "oauth_connection.created", - "oauth_connection.deactivated", - "card_push_transfer.created", - "card_push_transfer.updated", - "card_validation.created", - "card_validation.updated", - "pending_transaction.created", - "pending_transaction.updated", - "physical_card.created", - "physical_card.updated", - "physical_card_profile.created", - "physical_card_profile.updated", - "physical_check.created", - "physical_check.updated", - "program.created", - "program.updated", - "proof_of_authorization_request.created", - "proof_of_authorization_request.updated", - "real_time_decision.card_authorization_requested", - "real_time_decision.card_balance_inquiry_requested", - "real_time_decision.digital_wallet_token_requested", - "real_time_decision.digital_wallet_authentication_requested", - "real_time_decision.card_authentication_requested", - "real_time_decision.card_authentication_challenge_requested", - "real_time_payments_transfer.created", - "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", - "wire_transfer.created", - "wire_transfer.updated", - ] - | Omit = omit, + selected_event_categories: Iterable[event_subscription_create_params.SelectedEventCategory] | Omit = omit, shared_secret: str | Omit = omit, status: Literal["active", "disabled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -180,177 +70,9 @@ def create( oauth_connection_id: If specified, this subscription will only receive webhooks for Events associated with the specified OAuth Connection. - selected_event_category: If specified, this subscription will only receive webhooks for Events with the - specified `category`. - - - `account.created` - Occurs whenever an Account is created. - - `account.updated` - Occurs whenever an Account is updated. - - `account_number.created` - Occurs whenever an Account Number is created. - - `account_number.updated` - Occurs whenever an Account Number is updated. - - `account_statement.created` - Occurs whenever an Account Statement is created. - - `account_transfer.created` - Occurs whenever an Account Transfer is created. - - `account_transfer.updated` - Occurs whenever an Account Transfer is updated. - - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is - created. - - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is - updated. - - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. - - `blockchain_address.created` - Occurs whenever a Blockchain Address is - created. - - `blockchain_address.updated` - Occurs whenever a Blockchain Address is - updated. - - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp - Transfer is created. - - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp - Transfer is updated. - - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp - Transfer is created. - - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp - Transfer is updated. - - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is - created. - - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is - updated. - - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is - created. - - `card.created` - Occurs whenever a Card is created. - - `card.updated` - Occurs whenever a Card is updated. - - `card_payment.created` - Occurs whenever a Card Payment is created. - - `card_payment.updated` - Occurs whenever a Card Payment is updated. - - `card_profile.created` - Occurs whenever a Card Profile is created. - - `card_profile.updated` - Occurs whenever a Card Profile is updated. - - `card_dispute.created` - Occurs whenever a Card Dispute is created. - - `card_dispute.updated` - Occurs whenever a Card Dispute is updated. - - `check_deposit.created` - Occurs whenever a Check Deposit is created. - - `check_deposit.updated` - Occurs whenever a Check Deposit is updated. - - `check_transfer.created` - Occurs whenever a Check Transfer is created. - - `check_transfer.updated` - Occurs whenever a Check Transfer is updated. - - `declined_transaction.created` - Occurs whenever a Declined Transaction is - created. - - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is - created. - - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is - updated. - - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is - created. - - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is - updated. - - `document.created` - Occurs whenever a Document is created. - - `entity.created` - Occurs whenever an Entity is created. - - `entity.updated` - Occurs whenever an Entity is updated. - - `event_subscription.created` - Occurs whenever an Event Subscription is - created. - - `event_subscription.updated` - Occurs whenever an Event Subscription is - updated. - - `export.created` - Occurs whenever an Export is created. - - `export.updated` - Occurs whenever an Export is updated. - - `external_account.created` - Occurs whenever an External Account is created. - - `external_account.updated` - Occurs whenever an External Account is updated. - - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. - - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - - `file.created` - Occurs whenever a File is created. - - `group.updated` - Occurs whenever a Group is updated. - - `group.heartbeat` - Increase may send webhooks with this category to see if a - webhook endpoint is working properly. - - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is - created. - - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is - updated. - - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH - Transfer Return is created. - - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH - Transfer Return is updated. - - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is - created. - - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is - updated. - - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer - is created. - - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer - is updated. - - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound - Real-Time Payments Transfer is created. - - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound - Real-Time Payments Transfer is updated. - - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire - Drawdown Request is created. - - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is - created. - - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is - updated. - - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account - Enrollment is created. - - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account - Enrollment is updated. - - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. - - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is - created. - - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is - updated. - - `lockbox.created` - Occurs whenever a Lockbox is created. - - `lockbox.updated` - Occurs whenever a Lockbox is updated. - - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is - deactivated. - - `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 - updated. - - `physical_card.created` - Occurs whenever a Physical Card is created. - - `physical_card.updated` - Occurs whenever a Physical Card is updated. - - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is - created. - - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is - updated. - - `physical_check.created` - Occurs whenever a Physical Check is created. - - `physical_check.updated` - Occurs whenever a Physical Check is updated. - - `program.created` - Occurs whenever a Program is created. - - `program.updated` - Occurs whenever a Program is updated. - - `proof_of_authorization_request.created` - Occurs whenever a Proof of - Authorization Request is created. - - `proof_of_authorization_request.updated` - Occurs whenever a Proof of - Authorization Request is updated. - - `real_time_decision.card_authorization_requested` - Occurs whenever a - Real-Time Decision is created in response to a card authorization. - - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a - Real-Time Decision is created in response to a card balance inquiry. - - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a - Real-Time Decision is created in response to a digital wallet provisioning - attempt. - - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever - a Real-Time Decision is created in response to a digital wallet requiring - two-factor authentication. - - `real_time_decision.card_authentication_requested` - Occurs whenever a - Real-Time Decision is created in response to 3DS authentication. - - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever - a Real-Time Decision is created in response to 3DS authentication challenges. - - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments - Transfer is created. - - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments - Transfer is updated. - - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time - 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. - - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is - updated. - - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. - - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. + selected_event_categories: If specified, this subscription will only receive webhooks for Events with the + specified `category`. If specifying a Real-Time Decision event category, only + one Event Category can be specified for the Event Subscription. shared_secret: The key that will be used to sign webhooks. If no value is passed, a random string will be used as default. @@ -377,7 +99,7 @@ def create( { "url": url, "oauth_connection_id": oauth_connection_id, - "selected_event_category": selected_event_category, + "selected_event_categories": selected_event_categories, "shared_secret": shared_secret, "status": status, }, @@ -565,118 +287,7 @@ async def create( *, url: str, oauth_connection_id: str | Omit = omit, - selected_event_category: Literal[ - "account.created", - "account.updated", - "account_number.created", - "account_number.updated", - "account_statement.created", - "account_transfer.created", - "account_transfer.updated", - "ach_prenotification.created", - "ach_prenotification.updated", - "ach_transfer.created", - "ach_transfer.updated", - "blockchain_address.created", - "blockchain_address.updated", - "blockchain_offramp_transfer.created", - "blockchain_offramp_transfer.updated", - "blockchain_onramp_transfer.created", - "blockchain_onramp_transfer.updated", - "bookkeeping_account.created", - "bookkeeping_account.updated", - "bookkeeping_entry_set.updated", - "card.created", - "card.updated", - "card_payment.created", - "card_payment.updated", - "card_profile.created", - "card_profile.updated", - "card_dispute.created", - "card_dispute.updated", - "check_deposit.created", - "check_deposit.updated", - "check_transfer.created", - "check_transfer.updated", - "declined_transaction.created", - "digital_card_profile.created", - "digital_card_profile.updated", - "digital_wallet_token.created", - "digital_wallet_token.updated", - "document.created", - "entity.created", - "entity.updated", - "event_subscription.created", - "event_subscription.updated", - "export.created", - "export.updated", - "external_account.created", - "external_account.updated", - "fednow_transfer.created", - "fednow_transfer.updated", - "file.created", - "group.updated", - "group.heartbeat", - "inbound_ach_transfer.created", - "inbound_ach_transfer.updated", - "inbound_ach_transfer_return.created", - "inbound_ach_transfer_return.updated", - "inbound_check_deposit.created", - "inbound_check_deposit.updated", - "inbound_fednow_transfer.created", - "inbound_fednow_transfer.updated", - "inbound_mail_item.created", - "inbound_mail_item.updated", - "inbound_real_time_payments_transfer.created", - "inbound_real_time_payments_transfer.updated", - "inbound_wire_drawdown_request.created", - "inbound_wire_transfer.created", - "inbound_wire_transfer.updated", - "intrafi_account_enrollment.created", - "intrafi_account_enrollment.updated", - "intrafi_exclusion.created", - "intrafi_exclusion.updated", - "legacy_card_dispute.created", - "legacy_card_dispute.updated", - "lockbox.created", - "lockbox.updated", - "oauth_connection.created", - "oauth_connection.deactivated", - "card_push_transfer.created", - "card_push_transfer.updated", - "card_validation.created", - "card_validation.updated", - "pending_transaction.created", - "pending_transaction.updated", - "physical_card.created", - "physical_card.updated", - "physical_card_profile.created", - "physical_card_profile.updated", - "physical_check.created", - "physical_check.updated", - "program.created", - "program.updated", - "proof_of_authorization_request.created", - "proof_of_authorization_request.updated", - "real_time_decision.card_authorization_requested", - "real_time_decision.card_balance_inquiry_requested", - "real_time_decision.digital_wallet_token_requested", - "real_time_decision.digital_wallet_authentication_requested", - "real_time_decision.card_authentication_requested", - "real_time_decision.card_authentication_challenge_requested", - "real_time_payments_transfer.created", - "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", - "wire_transfer.created", - "wire_transfer.updated", - ] - | Omit = omit, + selected_event_categories: Iterable[event_subscription_create_params.SelectedEventCategory] | Omit = omit, shared_secret: str | Omit = omit, status: Literal["active", "disabled"] | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -696,177 +307,9 @@ async def create( oauth_connection_id: If specified, this subscription will only receive webhooks for Events associated with the specified OAuth Connection. - selected_event_category: If specified, this subscription will only receive webhooks for Events with the - specified `category`. - - - `account.created` - Occurs whenever an Account is created. - - `account.updated` - Occurs whenever an Account is updated. - - `account_number.created` - Occurs whenever an Account Number is created. - - `account_number.updated` - Occurs whenever an Account Number is updated. - - `account_statement.created` - Occurs whenever an Account Statement is created. - - `account_transfer.created` - Occurs whenever an Account Transfer is created. - - `account_transfer.updated` - Occurs whenever an Account Transfer is updated. - - `ach_prenotification.created` - Occurs whenever an ACH Prenotification is - created. - - `ach_prenotification.updated` - Occurs whenever an ACH Prenotification is - updated. - - `ach_transfer.created` - Occurs whenever an ACH Transfer is created. - - `ach_transfer.updated` - Occurs whenever an ACH Transfer is updated. - - `blockchain_address.created` - Occurs whenever a Blockchain Address is - created. - - `blockchain_address.updated` - Occurs whenever a Blockchain Address is - updated. - - `blockchain_offramp_transfer.created` - Occurs whenever a Blockchain Off-Ramp - Transfer is created. - - `blockchain_offramp_transfer.updated` - Occurs whenever a Blockchain Off-Ramp - Transfer is updated. - - `blockchain_onramp_transfer.created` - Occurs whenever a Blockchain On-Ramp - Transfer is created. - - `blockchain_onramp_transfer.updated` - Occurs whenever a Blockchain On-Ramp - Transfer is updated. - - `bookkeeping_account.created` - Occurs whenever a Bookkeeping Account is - created. - - `bookkeeping_account.updated` - Occurs whenever a Bookkeeping Account is - updated. - - `bookkeeping_entry_set.updated` - Occurs whenever a Bookkeeping Entry Set is - created. - - `card.created` - Occurs whenever a Card is created. - - `card.updated` - Occurs whenever a Card is updated. - - `card_payment.created` - Occurs whenever a Card Payment is created. - - `card_payment.updated` - Occurs whenever a Card Payment is updated. - - `card_profile.created` - Occurs whenever a Card Profile is created. - - `card_profile.updated` - Occurs whenever a Card Profile is updated. - - `card_dispute.created` - Occurs whenever a Card Dispute is created. - - `card_dispute.updated` - Occurs whenever a Card Dispute is updated. - - `check_deposit.created` - Occurs whenever a Check Deposit is created. - - `check_deposit.updated` - Occurs whenever a Check Deposit is updated. - - `check_transfer.created` - Occurs whenever a Check Transfer is created. - - `check_transfer.updated` - Occurs whenever a Check Transfer is updated. - - `declined_transaction.created` - Occurs whenever a Declined Transaction is - created. - - `digital_card_profile.created` - Occurs whenever a Digital Card Profile is - created. - - `digital_card_profile.updated` - Occurs whenever a Digital Card Profile is - updated. - - `digital_wallet_token.created` - Occurs whenever a Digital Wallet Token is - created. - - `digital_wallet_token.updated` - Occurs whenever a Digital Wallet Token is - updated. - - `document.created` - Occurs whenever a Document is created. - - `entity.created` - Occurs whenever an Entity is created. - - `entity.updated` - Occurs whenever an Entity is updated. - - `event_subscription.created` - Occurs whenever an Event Subscription is - created. - - `event_subscription.updated` - Occurs whenever an Event Subscription is - updated. - - `export.created` - Occurs whenever an Export is created. - - `export.updated` - Occurs whenever an Export is updated. - - `external_account.created` - Occurs whenever an External Account is created. - - `external_account.updated` - Occurs whenever an External Account is updated. - - `fednow_transfer.created` - Occurs whenever a FedNow Transfer is created. - - `fednow_transfer.updated` - Occurs whenever a FedNow Transfer is updated. - - `file.created` - Occurs whenever a File is created. - - `group.updated` - Occurs whenever a Group is updated. - - `group.heartbeat` - Increase may send webhooks with this category to see if a - webhook endpoint is working properly. - - `inbound_ach_transfer.created` - Occurs whenever an Inbound ACH Transfer is - created. - - `inbound_ach_transfer.updated` - Occurs whenever an Inbound ACH Transfer is - updated. - - `inbound_ach_transfer_return.created` - Occurs whenever an Inbound ACH - Transfer Return is created. - - `inbound_ach_transfer_return.updated` - Occurs whenever an Inbound ACH - Transfer Return is updated. - - `inbound_check_deposit.created` - Occurs whenever an Inbound Check Deposit is - created. - - `inbound_check_deposit.updated` - Occurs whenever an Inbound Check Deposit is - updated. - - `inbound_fednow_transfer.created` - Occurs whenever an Inbound FedNow Transfer - is created. - - `inbound_fednow_transfer.updated` - Occurs whenever an Inbound FedNow Transfer - is updated. - - `inbound_mail_item.created` - Occurs whenever an Inbound Mail Item is created. - - `inbound_mail_item.updated` - Occurs whenever an Inbound Mail Item is updated. - - `inbound_real_time_payments_transfer.created` - Occurs whenever an Inbound - Real-Time Payments Transfer is created. - - `inbound_real_time_payments_transfer.updated` - Occurs whenever an Inbound - Real-Time Payments Transfer is updated. - - `inbound_wire_drawdown_request.created` - Occurs whenever an Inbound Wire - Drawdown Request is created. - - `inbound_wire_transfer.created` - Occurs whenever an Inbound Wire Transfer is - created. - - `inbound_wire_transfer.updated` - Occurs whenever an Inbound Wire Transfer is - updated. - - `intrafi_account_enrollment.created` - Occurs whenever an IntraFi Account - Enrollment is created. - - `intrafi_account_enrollment.updated` - Occurs whenever an IntraFi Account - Enrollment is updated. - - `intrafi_exclusion.created` - Occurs whenever an IntraFi Exclusion is created. - - `intrafi_exclusion.updated` - Occurs whenever an IntraFi Exclusion is updated. - - `legacy_card_dispute.created` - Occurs whenever a Legacy Card Dispute is - created. - - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is - updated. - - `lockbox.created` - Occurs whenever a Lockbox is created. - - `lockbox.updated` - Occurs whenever a Lockbox is updated. - - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. - - `oauth_connection.deactivated` - Occurs whenever an OAuth Connection is - deactivated. - - `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 - updated. - - `physical_card.created` - Occurs whenever a Physical Card is created. - - `physical_card.updated` - Occurs whenever a Physical Card is updated. - - `physical_card_profile.created` - Occurs whenever a Physical Card Profile is - created. - - `physical_card_profile.updated` - Occurs whenever a Physical Card Profile is - updated. - - `physical_check.created` - Occurs whenever a Physical Check is created. - - `physical_check.updated` - Occurs whenever a Physical Check is updated. - - `program.created` - Occurs whenever a Program is created. - - `program.updated` - Occurs whenever a Program is updated. - - `proof_of_authorization_request.created` - Occurs whenever a Proof of - Authorization Request is created. - - `proof_of_authorization_request.updated` - Occurs whenever a Proof of - Authorization Request is updated. - - `real_time_decision.card_authorization_requested` - Occurs whenever a - Real-Time Decision is created in response to a card authorization. - - `real_time_decision.card_balance_inquiry_requested` - Occurs whenever a - Real-Time Decision is created in response to a card balance inquiry. - - `real_time_decision.digital_wallet_token_requested` - Occurs whenever a - Real-Time Decision is created in response to a digital wallet provisioning - attempt. - - `real_time_decision.digital_wallet_authentication_requested` - Occurs whenever - a Real-Time Decision is created in response to a digital wallet requiring - two-factor authentication. - - `real_time_decision.card_authentication_requested` - Occurs whenever a - Real-Time Decision is created in response to 3DS authentication. - - `real_time_decision.card_authentication_challenge_requested` - Occurs whenever - a Real-Time Decision is created in response to 3DS authentication challenges. - - `real_time_payments_transfer.created` - Occurs whenever a Real-Time Payments - Transfer is created. - - `real_time_payments_transfer.updated` - Occurs whenever a Real-Time Payments - Transfer is updated. - - `real_time_payments_request_for_payment.created` - Occurs whenever a Real-Time - 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. - - `wire_drawdown_request.updated` - Occurs whenever a Wire Drawdown Request is - updated. - - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. - - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. + selected_event_categories: If specified, this subscription will only receive webhooks for Events with the + specified `category`. If specifying a Real-Time Decision event category, only + one Event Category can be specified for the Event Subscription. shared_secret: The key that will be used to sign webhooks. If no value is passed, a random string will be used as default. @@ -893,7 +336,7 @@ async def create( { "url": url, "oauth_connection_id": oauth_connection_id, - "selected_event_category": selected_event_category, + "selected_event_categories": selected_event_categories, "shared_secret": shared_secret, "status": status, }, diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 87ddce5a8..c683d54e3 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -2,9 +2,10 @@ from __future__ import annotations +from typing import Iterable from typing_extensions import Literal, Required, TypedDict -__all__ = ["EventSubscriptionCreateParams"] +__all__ = ["EventSubscriptionCreateParams", "SelectedEventCategory"] class EventSubscriptionCreateParams(TypedDict, total=False): @@ -17,120 +18,143 @@ class EventSubscriptionCreateParams(TypedDict, total=False): with the specified OAuth Connection. """ - selected_event_category: Literal[ - "account.created", - "account.updated", - "account_number.created", - "account_number.updated", - "account_statement.created", - "account_transfer.created", - "account_transfer.updated", - "ach_prenotification.created", - "ach_prenotification.updated", - "ach_transfer.created", - "ach_transfer.updated", - "blockchain_address.created", - "blockchain_address.updated", - "blockchain_offramp_transfer.created", - "blockchain_offramp_transfer.updated", - "blockchain_onramp_transfer.created", - "blockchain_onramp_transfer.updated", - "bookkeeping_account.created", - "bookkeeping_account.updated", - "bookkeeping_entry_set.updated", - "card.created", - "card.updated", - "card_payment.created", - "card_payment.updated", - "card_profile.created", - "card_profile.updated", - "card_dispute.created", - "card_dispute.updated", - "check_deposit.created", - "check_deposit.updated", - "check_transfer.created", - "check_transfer.updated", - "declined_transaction.created", - "digital_card_profile.created", - "digital_card_profile.updated", - "digital_wallet_token.created", - "digital_wallet_token.updated", - "document.created", - "entity.created", - "entity.updated", - "event_subscription.created", - "event_subscription.updated", - "export.created", - "export.updated", - "external_account.created", - "external_account.updated", - "fednow_transfer.created", - "fednow_transfer.updated", - "file.created", - "group.updated", - "group.heartbeat", - "inbound_ach_transfer.created", - "inbound_ach_transfer.updated", - "inbound_ach_transfer_return.created", - "inbound_ach_transfer_return.updated", - "inbound_check_deposit.created", - "inbound_check_deposit.updated", - "inbound_fednow_transfer.created", - "inbound_fednow_transfer.updated", - "inbound_mail_item.created", - "inbound_mail_item.updated", - "inbound_real_time_payments_transfer.created", - "inbound_real_time_payments_transfer.updated", - "inbound_wire_drawdown_request.created", - "inbound_wire_transfer.created", - "inbound_wire_transfer.updated", - "intrafi_account_enrollment.created", - "intrafi_account_enrollment.updated", - "intrafi_exclusion.created", - "intrafi_exclusion.updated", - "legacy_card_dispute.created", - "legacy_card_dispute.updated", - "lockbox.created", - "lockbox.updated", - "oauth_connection.created", - "oauth_connection.deactivated", - "card_push_transfer.created", - "card_push_transfer.updated", - "card_validation.created", - "card_validation.updated", - "pending_transaction.created", - "pending_transaction.updated", - "physical_card.created", - "physical_card.updated", - "physical_card_profile.created", - "physical_card_profile.updated", - "physical_check.created", - "physical_check.updated", - "program.created", - "program.updated", - "proof_of_authorization_request.created", - "proof_of_authorization_request.updated", - "real_time_decision.card_authorization_requested", - "real_time_decision.card_balance_inquiry_requested", - "real_time_decision.digital_wallet_token_requested", - "real_time_decision.digital_wallet_authentication_requested", - "real_time_decision.card_authentication_requested", - "real_time_decision.card_authentication_challenge_requested", - "real_time_payments_transfer.created", - "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", - "wire_transfer.created", - "wire_transfer.updated", - ] + selected_event_categories: Iterable[SelectedEventCategory] """ If specified, this subscription will only receive webhooks for Events with the - specified `category`. + specified `category`. If specifying a Real-Time Decision event category, only + one Event Category can be specified for the Event Subscription. + """ + + shared_secret: str + """The key that will be used to sign webhooks. + + If no value is passed, a random string will be used as default. + """ + + status: Literal["active", "disabled"] + """The status of the event subscription. Defaults to `active` if not specified. + + - `active` - The subscription is active and Events will be delivered normally. + - `disabled` - The subscription is temporarily disabled and Events will not be + delivered. + """ + + +class SelectedEventCategory(TypedDict, total=False): + event_category: Required[ + Literal[ + "account.created", + "account.updated", + "account_number.created", + "account_number.updated", + "account_statement.created", + "account_transfer.created", + "account_transfer.updated", + "ach_prenotification.created", + "ach_prenotification.updated", + "ach_transfer.created", + "ach_transfer.updated", + "blockchain_address.created", + "blockchain_address.updated", + "blockchain_offramp_transfer.created", + "blockchain_offramp_transfer.updated", + "blockchain_onramp_transfer.created", + "blockchain_onramp_transfer.updated", + "bookkeeping_account.created", + "bookkeeping_account.updated", + "bookkeeping_entry_set.updated", + "card.created", + "card.updated", + "card_payment.created", + "card_payment.updated", + "card_profile.created", + "card_profile.updated", + "card_dispute.created", + "card_dispute.updated", + "check_deposit.created", + "check_deposit.updated", + "check_transfer.created", + "check_transfer.updated", + "declined_transaction.created", + "digital_card_profile.created", + "digital_card_profile.updated", + "digital_wallet_token.created", + "digital_wallet_token.updated", + "document.created", + "entity.created", + "entity.updated", + "event_subscription.created", + "event_subscription.updated", + "export.created", + "export.updated", + "external_account.created", + "external_account.updated", + "fednow_transfer.created", + "fednow_transfer.updated", + "file.created", + "group.updated", + "group.heartbeat", + "inbound_ach_transfer.created", + "inbound_ach_transfer.updated", + "inbound_ach_transfer_return.created", + "inbound_ach_transfer_return.updated", + "inbound_check_deposit.created", + "inbound_check_deposit.updated", + "inbound_fednow_transfer.created", + "inbound_fednow_transfer.updated", + "inbound_mail_item.created", + "inbound_mail_item.updated", + "inbound_real_time_payments_transfer.created", + "inbound_real_time_payments_transfer.updated", + "inbound_wire_drawdown_request.created", + "inbound_wire_transfer.created", + "inbound_wire_transfer.updated", + "intrafi_account_enrollment.created", + "intrafi_account_enrollment.updated", + "intrafi_exclusion.created", + "intrafi_exclusion.updated", + "legacy_card_dispute.created", + "legacy_card_dispute.updated", + "lockbox.created", + "lockbox.updated", + "oauth_connection.created", + "oauth_connection.deactivated", + "card_push_transfer.created", + "card_push_transfer.updated", + "card_validation.created", + "card_validation.updated", + "pending_transaction.created", + "pending_transaction.updated", + "physical_card.created", + "physical_card.updated", + "physical_card_profile.created", + "physical_card_profile.updated", + "physical_check.created", + "physical_check.updated", + "program.created", + "program.updated", + "proof_of_authorization_request.created", + "proof_of_authorization_request.updated", + "real_time_decision.card_authorization_requested", + "real_time_decision.card_balance_inquiry_requested", + "real_time_decision.digital_wallet_token_requested", + "real_time_decision.digital_wallet_authentication_requested", + "real_time_decision.card_authentication_requested", + "real_time_decision.card_authentication_challenge_requested", + "real_time_payments_transfer.created", + "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", + "wire_transfer.created", + "wire_transfer.updated", + ] + ] + """The category of the Event to subscribe to. - `account.created` - Occurs whenever an Account is created. - `account.updated` - Occurs whenever an Account is updated. @@ -301,17 +325,3 @@ class EventSubscriptionCreateParams(TypedDict, total=False): - `wire_transfer.created` - Occurs whenever a Wire Transfer is created. - `wire_transfer.updated` - Occurs whenever a Wire Transfer is updated. """ - - shared_secret: str - """The key that will be used to sign webhooks. - - If no value is passed, a random string will be used as default. - """ - - status: Literal["active", "disabled"] - """The status of the event subscription. Defaults to `active` if not specified. - - - `active` - The subscription is active and Events will be delivered normally. - - `disabled` - The subscription is temporarily disabled and Events will not be - delivered. - """ diff --git a/tests/api_resources/test_event_subscriptions.py b/tests/api_resources/test_event_subscriptions.py index f8577e2cf..2962c9c00 100644 --- a/tests/api_resources/test_event_subscriptions.py +++ b/tests/api_resources/test_event_subscriptions.py @@ -32,7 +32,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: event_subscription = client.event_subscriptions.create( url="https://website.com/webhooks", oauth_connection_id="x", - selected_event_category="account.created", + selected_event_categories=[{"event_category": "account.created"}], shared_secret="x", status="active", ) @@ -198,7 +198,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) event_subscription = await async_client.event_subscriptions.create( url="https://website.com/webhooks", oauth_connection_id="x", - selected_event_category="account.created", + selected_event_categories=[{"event_category": "account.created"}], shared_secret="x", status="active", ) From 1fd79117f3d8b120f3bb2339c2a4f582c69ba6a0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 02:15:05 +0000 Subject: [PATCH 1166/1325] chore(internal): codegen related update --- tests/api_resources/test_events.py | 44 +++++++++++++++++++++++------- 1 file changed, 34 insertions(+), 10 deletions(-) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 30f99545f..1dae1d93a 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -100,9 +100,20 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True - def test_method_unwrap(self, client: Increase) -> None: - key = b"secret" - hook = standardwebhooks.Webhook(key) + @pytest.mark.parametrize( + "client_opt,method_opt", + [ + ("whsec_c2VjcmV0Cg==", None), + ("wrong", b"secret\n"), + ("wrong", "whsec_c2VjcmV0Cg=="), + (None, b"secret\n"), + (None, "whsec_c2VjcmV0Cg=="), + ], + ) + def test_method_unwrap(self, client: Increase, client_opt: str | None, method_opt: str | bytes | None) -> None: + hook = standardwebhooks.Webhook(b"secret\n") + + client = client.with_options(webhook_secret=client_opt) data = """{"id":"event_001dzz0r20rzr4zrhrr1364hy80","associated_object_id":"account_in71c4amph0vgo2qllky","associated_object_type":"account","category":"account.created","created_at":"2020-01-31T23:59:59Z","type":"event"}""" msg_id = "1" @@ -115,7 +126,7 @@ def test_method_unwrap(self, client: Increase) -> None: } try: - _ = client.events.unwrap(data, headers=headers, key=key) + _ = client.events.unwrap(data, headers=headers, key=method_opt) except standardwebhooks.WebhookVerificationError as e: raise AssertionError("Failed to unwrap valid webhook") from e @@ -126,7 +137,7 @@ def test_method_unwrap(self, client: Increase) -> None: ] for bad_header in bad_headers: with pytest.raises(standardwebhooks.WebhookVerificationError): - _ = client.events.unwrap(data, headers=bad_header, key=key) + _ = client.events.unwrap(data, headers=bad_header, key=method_opt) class TestAsyncEvents: @@ -213,9 +224,22 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert cast(Any, response.is_closed) is True - def test_method_unwrap(self, client: Increase) -> None: - key = b"secret" - hook = standardwebhooks.Webhook(key) + @pytest.mark.parametrize( + "client_opt,method_opt", + [ + ("whsec_c2VjcmV0Cg==", None), + ("wrong", b"secret\n"), + ("wrong", "whsec_c2VjcmV0Cg=="), + (None, b"secret\n"), + (None, "whsec_c2VjcmV0Cg=="), + ], + ) + def test_method_unwrap( + self, async_client: Increase, client_opt: str | None, method_opt: str | bytes | None + ) -> None: + hook = standardwebhooks.Webhook(b"secret\n") + + async_client = async_client.with_options(webhook_secret=client_opt) data = """{"id":"event_001dzz0r20rzr4zrhrr1364hy80","associated_object_id":"account_in71c4amph0vgo2qllky","associated_object_type":"account","category":"account.created","created_at":"2020-01-31T23:59:59Z","type":"event"}""" msg_id = "1" @@ -228,7 +252,7 @@ def test_method_unwrap(self, client: Increase) -> None: } try: - _ = client.events.unwrap(data, headers=headers, key=key) + _ = async_client.events.unwrap(data, headers=headers, key=method_opt) except standardwebhooks.WebhookVerificationError as e: raise AssertionError("Failed to unwrap valid webhook") from e @@ -239,4 +263,4 @@ def test_method_unwrap(self, client: Increase) -> None: ] for bad_header in bad_headers: with pytest.raises(standardwebhooks.WebhookVerificationError): - _ = client.events.unwrap(data, headers=bad_header, key=key) + _ = async_client.events.unwrap(data, headers=bad_header, key=method_opt) From 8db8c98dc4b5cd63df4c6e65f945c8cf95788742 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 02:18:49 +0000 Subject: [PATCH 1167/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 3 - src/increase/resources/entities.py | 337 ------------------ src/increase/types/__init__.py | 3 - src/increase/types/entity_confirm_params.py | 19 - .../types/entity_update_address_params.py | 40 --- .../entity_update_industry_code_params.py | 17 - tests/api_resources/test_entities.py | 328 ----------------- 8 files changed, 4 insertions(+), 751 deletions(-) delete mode 100644 src/increase/types/entity_confirm_params.py delete mode 100644 src/increase/types/entity_update_address_params.py delete mode 100644 src/increase/types/entity_update_industry_code_params.py diff --git a/.stats.yml b/.stats.yml index fd12aef62..67156bd51 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 235 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d23465ee6dfaa64549fa617a3dd213d86a1ddbcf0d01e6595dad4dc8a72d3060.yml -openapi_spec_hash: 48b1e64041179b50d44dd4c58cb515d0 -config_hash: 463c5cf7a7f13cf7db270b287814b56c +configured_endpoints: 232 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0bdf7012f2b877d17a7dc56e14a67bd22ffee9acdff8627800cc91f5f6487d74.yml +openapi_spec_hash: db9f6935a1a74bee62d494e30122259b +config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/api.md b/api.md index 137ea1264..12df4517f 100644 --- a/api.md +++ b/api.md @@ -502,11 +502,8 @@ Methods: - client.entities.list(\*\*params) -> SyncPage[Entity] - client.entities.archive(entity_id) -> Entity - client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity -- client.entities.confirm(entity_id, \*\*params) -> Entity - client.entities.create_beneficial_owner(entity_id, \*\*params) -> Entity -- client.entities.update_address(entity_id, \*\*params) -> Entity - client.entities.update_beneficial_owner_address(entity_id, \*\*params) -> Entity -- client.entities.update_industry_code(entity_id, \*\*params) -> Entity # SupplementalDocuments diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index b3f441dc7..19c079d72 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -12,9 +12,6 @@ entity_list_params, entity_create_params, entity_update_params, - entity_confirm_params, - entity_update_address_params, - entity_update_industry_code_params, entity_create_beneficial_owner_params, entity_archive_beneficial_owner_params, entity_update_beneficial_owner_address_params, @@ -432,55 +429,6 @@ def archive_beneficial_owner( cast_to=Entity, ) - def confirm( - self, - entity_id: str, - *, - confirmed_at: Union[str, datetime] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Depending on your program, you may be required to re-confirm an Entity's details - on a recurring basis. After making any required updates, call this endpoint to - record that your user confirmed their details. - - Args: - entity_id: The identifier of the Entity to confirm the details of. - - confirmed_at: When your user confirmed the Entity's details. If not provided, the current time - will be used. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/confirm", - body=maybe_transform({"confirmed_at": confirmed_at}, entity_confirm_params.EntityConfirmParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - def create_beneficial_owner( self, entity_id: str, @@ -531,53 +479,6 @@ def create_beneficial_owner( cast_to=Entity, ) - def update_address( - self, - entity_id: str, - *, - address: entity_update_address_params.Address, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update a Natural Person or Corporation's address - - Args: - entity_id: The identifier of the Entity whose address is being updated. - - address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's - are disallowed. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/update_address", - body=maybe_transform({"address": address}, entity_update_address_params.EntityUpdateAddressParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - def update_beneficial_owner_address( self, entity_id: str, @@ -636,58 +537,6 @@ def update_beneficial_owner_address( cast_to=Entity, ) - def update_industry_code( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/update_industry_code", - body=maybe_transform( - {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class AsyncEntitiesResource(AsyncAPIResource): @cached_property @@ -1085,55 +934,6 @@ async def archive_beneficial_owner( cast_to=Entity, ) - async def confirm( - self, - entity_id: str, - *, - confirmed_at: Union[str, datetime] | Omit = omit, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Depending on your program, you may be required to re-confirm an Entity's details - on a recurring basis. After making any required updates, call this endpoint to - record that your user confirmed their details. - - Args: - entity_id: The identifier of the Entity to confirm the details of. - - confirmed_at: When your user confirmed the Entity's details. If not provided, the current time - will be used. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/confirm", - body=await async_maybe_transform({"confirmed_at": confirmed_at}, entity_confirm_params.EntityConfirmParams), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - async def create_beneficial_owner( self, entity_id: str, @@ -1184,55 +984,6 @@ async def create_beneficial_owner( cast_to=Entity, ) - async def update_address( - self, - entity_id: str, - *, - address: entity_update_address_params.Address, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update a Natural Person or Corporation's address - - Args: - entity_id: The identifier of the Entity whose address is being updated. - - address: The entity's physical address. Mail receiving locations like PO Boxes and PMB's - are disallowed. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/update_address", - body=await async_maybe_transform( - {"address": address}, entity_update_address_params.EntityUpdateAddressParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - async def update_beneficial_owner_address( self, entity_id: str, @@ -1291,58 +1042,6 @@ async def update_beneficial_owner_address( cast_to=Entity, ) - async def update_industry_code( - self, - entity_id: str, - *, - industry_code: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the industry code for a corporate Entity - - Args: - entity_id: The identifier of the Entity to update. This endpoint only accepts `corporation` - entities. - - industry_code: The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/update_industry_code", - body=await async_maybe_transform( - {"industry_code": industry_code}, entity_update_industry_code_params.EntityUpdateIndustryCodeParams - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class EntitiesResourceWithRawResponse: def __init__(self, entities: EntitiesResource) -> None: @@ -1366,21 +1065,12 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive_beneficial_owner = to_raw_response_wrapper( entities.archive_beneficial_owner, ) - self.confirm = to_raw_response_wrapper( - entities.confirm, - ) self.create_beneficial_owner = to_raw_response_wrapper( entities.create_beneficial_owner, ) - self.update_address = to_raw_response_wrapper( - entities.update_address, - ) self.update_beneficial_owner_address = to_raw_response_wrapper( entities.update_beneficial_owner_address, ) - self.update_industry_code = to_raw_response_wrapper( - entities.update_industry_code, - ) class AsyncEntitiesResourceWithRawResponse: @@ -1405,21 +1095,12 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive_beneficial_owner = async_to_raw_response_wrapper( entities.archive_beneficial_owner, ) - self.confirm = async_to_raw_response_wrapper( - entities.confirm, - ) self.create_beneficial_owner = async_to_raw_response_wrapper( entities.create_beneficial_owner, ) - self.update_address = async_to_raw_response_wrapper( - entities.update_address, - ) self.update_beneficial_owner_address = async_to_raw_response_wrapper( entities.update_beneficial_owner_address, ) - self.update_industry_code = async_to_raw_response_wrapper( - entities.update_industry_code, - ) class EntitiesResourceWithStreamingResponse: @@ -1444,21 +1125,12 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive_beneficial_owner = to_streamed_response_wrapper( entities.archive_beneficial_owner, ) - self.confirm = to_streamed_response_wrapper( - entities.confirm, - ) self.create_beneficial_owner = to_streamed_response_wrapper( entities.create_beneficial_owner, ) - self.update_address = to_streamed_response_wrapper( - entities.update_address, - ) self.update_beneficial_owner_address = to_streamed_response_wrapper( entities.update_beneficial_owner_address, ) - self.update_industry_code = to_streamed_response_wrapper( - entities.update_industry_code, - ) class AsyncEntitiesResourceWithStreamingResponse: @@ -1483,18 +1155,9 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive_beneficial_owner = async_to_streamed_response_wrapper( entities.archive_beneficial_owner, ) - self.confirm = async_to_streamed_response_wrapper( - entities.confirm, - ) self.create_beneficial_owner = async_to_streamed_response_wrapper( entities.create_beneficial_owner, ) - self.update_address = async_to_streamed_response_wrapper( - entities.update_address, - ) self.update_beneficial_owner_address = async_to_streamed_response_wrapper( entities.update_beneficial_owner_address, ) - self.update_industry_code = async_to_streamed_response_wrapper( - entities.update_industry_code, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index dfaf2928c..3088a44b0 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -66,7 +66,6 @@ from .account_create_params import AccountCreateParams as AccountCreateParams from .account_update_params import AccountUpdateParams as AccountUpdateParams from .bookkeeping_entry_set import BookkeepingEntrySet as BookkeepingEntrySet -from .entity_confirm_params import EntityConfirmParams as EntityConfirmParams from .inbound_check_deposit import InboundCheckDeposit as InboundCheckDeposit from .inbound_wire_transfer import InboundWireTransfer as InboundWireTransfer from .lockbox_create_params import LockboxCreateParams as LockboxCreateParams @@ -109,7 +108,6 @@ from .card_dispute_withdraw_params import CardDisputeWithdrawParams as CardDisputeWithdrawParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument -from .entity_update_address_params import EntityUpdateAddressParams as EntityUpdateAddressParams from .external_account_list_params import ExternalAccountListParams as ExternalAccountListParams from .oauth_connection_list_params import OAuthConnectionListParams as OAuthConnectionListParams from .routing_number_list_response import RoutingNumberListResponse as RoutingNumberListResponse @@ -155,7 +153,6 @@ from .bookkeeping_account_balance_params import BookkeepingAccountBalanceParams as BookkeepingAccountBalanceParams from .check_transfer_stop_payment_params import CheckTransferStopPaymentParams as CheckTransferStopPaymentParams from .digital_card_profile_create_params import DigitalCardProfileCreateParams as DigitalCardProfileCreateParams -from .entity_update_industry_code_params import EntityUpdateIndustryCodeParams as EntityUpdateIndustryCodeParams from .physical_card_profile_clone_params import PhysicalCardProfileCloneParams as PhysicalCardProfileCloneParams from .bookkeeping_entry_set_create_params import BookkeepingEntrySetCreateParams as BookkeepingEntrySetCreateParams from .inbound_ach_transfer_decline_params import InboundACHTransferDeclineParams as InboundACHTransferDeclineParams diff --git a/src/increase/types/entity_confirm_params.py b/src/increase/types/entity_confirm_params.py deleted file mode 100644 index cf9a0dfc8..000000000 --- a/src/increase/types/entity_confirm_params.py +++ /dev/null @@ -1,19 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import Union -from datetime import datetime -from typing_extensions import Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = ["EntityConfirmParams"] - - -class EntityConfirmParams(TypedDict, total=False): - confirmed_at: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """When your user confirmed the Entity's details. - - If not provided, the current time will be used. - """ diff --git a/src/increase/types/entity_update_address_params.py b/src/increase/types/entity_update_address_params.py deleted file mode 100644 index c5fac648b..000000000 --- a/src/increase/types/entity_update_address_params.py +++ /dev/null @@ -1,40 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EntityUpdateAddressParams", "Address"] - - -class EntityUpdateAddressParams(TypedDict, total=False): - address: Required[Address] - """The entity's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - -class Address(TypedDict, total=False): - """The entity's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - city: Required[str] - """The city of the address.""" - - line1: Required[str] - """The first line of the address. This is usually the street number and street.""" - - state: Required[str] - """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. - """ - - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" diff --git a/src/increase/types/entity_update_industry_code_params.py b/src/increase/types/entity_update_industry_code_params.py deleted file mode 100644 index 7843d7137..000000000 --- a/src/increase/types/entity_update_industry_code_params.py +++ /dev/null @@ -1,17 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EntityUpdateIndustryCodeParams"] - - -class EntityUpdateIndustryCodeParams(TypedDict, total=False): - industry_code: Required[str] - """ - The North American Industry Classification System (NAICS) code for the - corporation's primary line of business. This is a number, like `5132` for - `Software Publishers`. A full list of classification codes is available - [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). - """ diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 36f511ec2..96e4f3ea4 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -563,52 +563,6 @@ def test_path_params_archive_beneficial_owner(self, client: Increase) -> None: beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) - @parametrize - def test_method_confirm(self, client: Increase) -> None: - entity = client.entities.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_confirm_with_all_params(self, client: Increase) -> None: - entity = client.entities.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_confirm(self, client: Increase) -> None: - response = client.entities.with_raw_response.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_confirm(self, client: Increase) -> None: - with client.entities.with_streaming_response.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_confirm(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.confirm( - entity_id="", - ) - @parametrize def test_method_create_beneficial_owner(self, client: Increase) -> None: entity = client.entities.create_beneficial_owner( @@ -757,82 +711,6 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: }, ) - @parametrize - def test_method_update_address(self, client: Increase) -> None: - entity = client.entities.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_update_address_with_all_params(self, client: Increase) -> None: - entity = client.entities.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - "line2": "Unit 2", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_update_address(self, client: Increase) -> None: - response = client.entities.with_raw_response.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_update_address(self, client: Increase) -> None: - with client.entities.with_streaming_response.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update_address(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.update_address( - entity_id="", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - @parametrize def test_method_update_beneficial_owner_address(self, client: Increase) -> None: entity = client.entities.update_beneficial_owner_address( @@ -911,48 +789,6 @@ def test_path_params_update_beneficial_owner_address(self, client: Increase) -> beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) - @parametrize - def test_method_update_industry_code(self, client: Increase) -> None: - entity = client.entities.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_update_industry_code(self, client: Increase) -> None: - response = client.entities.with_raw_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_update_industry_code(self, client: Increase) -> None: - with client.entities.with_streaming_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update_industry_code(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.update_industry_code( - entity_id="", - industry_code="5132", - ) - class TestAsyncEntities: parametrize = pytest.mark.parametrize( @@ -1501,52 +1337,6 @@ async def test_path_params_archive_beneficial_owner(self, async_client: AsyncInc beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) - @parametrize - async def test_method_confirm(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_confirm_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_confirm(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_confirm(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.confirm( - entity_id="entity_n8y8tnk2p9339ti393yi", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_confirm(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.confirm( - entity_id="", - ) - @parametrize async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.create_beneficial_owner( @@ -1695,82 +1485,6 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr }, ) - @parametrize - async def test_method_update_address(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_update_address_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - "line2": "Unit 2", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_update_address(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_update_address(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.update_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update_address(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.update_address( - entity_id="", - address={ - "city": "New York", - "line1": "33 Liberty Street", - "state": "NY", - "zip": "10045", - }, - ) - @parametrize async def test_method_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.update_beneficial_owner_address( @@ -1848,45 +1562,3 @@ async def test_path_params_update_beneficial_owner_address(self, async_client: A }, beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", ) - - @parametrize - async def test_method_update_industry_code(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_update_industry_code(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_update_industry_code(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.update_industry_code( - entity_id="entity_n8y8tnk2p9339ti393yi", - industry_code="5132", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update_industry_code(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.update_industry_code( - entity_id="", - industry_code="5132", - ) From d81de8c7f57702dede47da0b65862e63ba473bd9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 05:46:01 +0000 Subject: [PATCH 1168/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 67156bd51..bd165e39c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-0bdf7012f2b877d17a7dc56e14a67bd22ffee9acdff8627800cc91f5f6487d74.yml -openapi_spec_hash: db9f6935a1a74bee62d494e30122259b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a76bb95dd4266308c0e772481f487ebd92b62b738a74a9d20cfd3343afea15eb.yml +openapi_spec_hash: f26bb4c5e7e19cd85a58302c4c8745f5 config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index fd372e08a..05319f6c5 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -221,6 +221,12 @@ class ElementCardAuthentication(BaseModel): card_payment_id: str """The ID of the Card Payment this transaction belongs to.""" + cardholder_email: Optional[str] = None + """The email address of the cardholder.""" + + cardholder_name: Optional[str] = None + """The name of the cardholder.""" + category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None """The category of the card authentication attempt. From 6f546b11fc8e1ec1316787a369e14afdde1a5060 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 05:53:12 +0000 Subject: [PATCH 1169/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/card_payment.py | 42 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index bd165e39c..07ec80cbf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a76bb95dd4266308c0e772481f487ebd92b62b738a74a9d20cfd3343afea15eb.yml -openapi_spec_hash: f26bb4c5e7e19cd85a58302c4c8745f5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc2859c7f6f2b4f9338210cf63f9c769c5ee05c677973ae0181f8e0f442806cd.yml +openapi_spec_hash: 2fe8fbbcca41e6ff2873d9787333bd0f config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 05319f6c5..67e935253 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -215,6 +215,48 @@ class ElementCardAuthentication(BaseModel): id: str """The Card Authentication identifier.""" + billing_address_city: Optional[str] = None + """ + The city of the cardholder billing address associated with the card used for + this purchase. + """ + + billing_address_country: Optional[str] = None + """ + The country of the cardholder billing address associated with the card used for + this purchase. + """ + + billing_address_line1: Optional[str] = None + """ + The first line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_line2: Optional[str] = None + """ + The second line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_line3: Optional[str] = None + """ + The third line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_postal_code: Optional[str] = None + """ + The postal code of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_state: Optional[str] = None + """ + The US state of the cardholder billing address associated with the card used for + this purchase. + """ + card_id: str """The identifier of the Card.""" From 812ed2cf9a0fdb05cd4d7559acfa4cea52e3f49a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 06:05:52 +0000 Subject: [PATCH 1170/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/card_payment.py | 51 +++++++++++++++++++++++++----- 2 files changed, 45 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index 07ec80cbf..330830ea7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-cc2859c7f6f2b4f9338210cf63f9c769c5ee05c677973ae0181f8e0f442806cd.yml -openapi_spec_hash: 2fe8fbbcca41e6ff2873d9787333bd0f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8746787e90b2f68dce823f8a9de7d73df21a9a57fbb2b9169b32704eeba38794.yml +openapi_spec_hash: caca59ae4602cbbcbda07baf1a0165b4 config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 67e935253..a40954545 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -14,6 +14,8 @@ "ElementCardAuthentication", "ElementCardAuthenticationChallenge", "ElementCardAuthenticationChallengeAttempt", + "ElementCardAuthenticationDeviceChannel", + "ElementCardAuthenticationDeviceChannelBrowser", "ElementCardAuthorization", "ElementCardAuthorizationAdditionalAmounts", "ElementCardAuthorizationAdditionalAmountsClinic", @@ -206,6 +208,45 @@ class ElementCardAuthenticationChallenge(BaseModel): """ +class ElementCardAuthenticationDeviceChannelBrowser(BaseModel): + """Fields specific to the browser device channel.""" + + accept_header: Optional[str] = None + """The accept header from the cardholder's browser.""" + + ip_address: Optional[str] = None + """The IP address of the cardholder's browser.""" + + javascript_enabled: Optional[Literal["enabled", "disabled"]] = None + """Whether JavaScript is enabled in the cardholder's browser. + + - `enabled` - JavaScript is enabled in the cardholder's browser. + - `disabled` - JavaScript is not enabled in the cardholder's browser. + """ + + language: Optional[str] = None + """The language of the cardholder's browser.""" + + user_agent: Optional[str] = None + """The user agent of the cardholder's browser.""" + + +class ElementCardAuthenticationDeviceChannel(BaseModel): + """The device channel of the card authentication attempt.""" + + browser: Optional[ElementCardAuthenticationDeviceChannelBrowser] = None + """Fields specific to the browser device channel.""" + + category: Literal["app", "browser", "three_ds_requestor_initiated"] + """The category of the device channel. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + """ + + class ElementCardAuthentication(BaseModel): """A Card Authentication object. @@ -306,14 +347,8 @@ class ElementCardAuthentication(BaseModel): - `webhook_timed_out` - The webhook timed out. """ - device_channel: Optional[Literal["app", "browser", "three_ds_requestor_initiated"]] = None - """The device channel of the card authentication attempt. - - - `app` - The authentication attempt was made from an app. - - `browser` - The authentication attempt was made from a browser. - - `three_ds_requestor_initiated` - The authentication attempt was initiated by - the 3DS Requestor. - """ + device_channel: ElementCardAuthenticationDeviceChannel + """The device channel of the card authentication attempt.""" merchant_acceptor_id: str """ From 99ac818bdbf6b82e68de29880f1ee083d9fe1827 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 3 Mar 2026 15:44:31 +0000 Subject: [PATCH 1171/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 3 ++- src/increase/types/entity_create_params.py | 3 ++- src/increase/types/entity_update_params.py | 3 ++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index 330830ea7..e70311539 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8746787e90b2f68dce823f8a9de7d73df21a9a57fbb2b9169b32704eeba38794.yml -openapi_spec_hash: caca59ae4602cbbcbda07baf1a0165b4 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a72ddcd1864b9ba3aecab707aaaa5a3269d034eb70222d6909e4fe768da46dc2.yml +openapi_spec_hash: 99aa469f8a1c21a5418f1fcf41f9475b config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 84eb64aa9..ce6cdddeb 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -463,13 +463,14 @@ class ThirdPartyVerification(BaseModel): reference: str """The reference identifier for the third party verification.""" - vendor: Literal["alloy", "middesk", "oscilar", "persona"] + vendor: Literal["alloy", "middesk", "oscilar", "persona", "taktile"] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. - `persona` - Persona. See https://withpersona.com for more information. + - `taktile` - Taktile. See https://taktile.com for more information. """ diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index ff277ef78..ba1b5a308 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -866,13 +866,14 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy", "middesk", "oscilar", "persona"]] + vendor: Required[Literal["alloy", "middesk", "oscilar", "persona", "taktile"]] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. - `persona` - Persona. See https://withpersona.com for more information. + - `taktile` - Taktile. See https://taktile.com for more information. """ diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 195c1f07f..38ebb27f8 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -247,13 +247,14 @@ class ThirdPartyVerification(TypedDict, total=False): reference: Required[str] """The reference identifier for the third party verification.""" - vendor: Required[Literal["alloy", "middesk", "oscilar", "persona"]] + vendor: Required[Literal["alloy", "middesk", "oscilar", "persona", "taktile"]] """The vendor that was used to perform the verification. - `alloy` - Alloy. See https://alloy.com for more information. - `middesk` - Middesk. See https://middesk.com for more information. - `oscilar` - Oscilar. See https://oscilar.com for more information. - `persona` - Persona. See https://withpersona.com for more information. + - `taktile` - Taktile. See https://taktile.com for more information. """ From 8506e64c81787c5425982ad69314a6b81f5a1eec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 4 Mar 2026 23:38:17 +0000 Subject: [PATCH 1172/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 20 +++++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index e70311539..88642e07a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a72ddcd1864b9ba3aecab707aaaa5a3269d034eb70222d6909e4fe768da46dc2.yml -openapi_spec_hash: 99aa469f8a1c21a5418f1fcf41f9475b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-56234b020a54052fccd4039cb771fbc9065afc95cf2b15d559c4a91d4e745ca1.yml +openapi_spec_hash: 1254ab532c5dd4c23fb035149006f802 config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index ce6cdddeb..e096d30c1 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -150,14 +150,20 @@ class CorporationBeneficialOwner(BaseModel): individual: CorporationBeneficialOwnerIndividual """Personal details for the beneficial owner.""" - prong: Literal["ownership", "control"] - """Why this person is considered a beneficial owner of the entity. + prongs: List[Literal["ownership", "control"]] + """Why this person is considered a beneficial owner of the entity.""" - - `ownership` - A person with 25% or greater direct or indirect ownership of the - entity. - - `control` - A person who manages, directs, or has significant control of the - entity. - """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] class Corporation(BaseModel): From b36e352ab205b648ddcb7b7c0fec4f2367b746f2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 02:10:17 +0000 Subject: [PATCH 1173/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 88642e07a..d1f0847b3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-56234b020a54052fccd4039cb771fbc9065afc95cf2b15d559c4a91d4e745ca1.yml -openapi_spec_hash: 1254ab532c5dd4c23fb035149006f802 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2277bacfbbf3570574b1c8abe74936d197944101f1e66238be7baf8e3303e52d.yml +openapi_spec_hash: f9004c6a75fbf5b4984080b8f8dd184c config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index e096d30c1..4d4ff37db 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -141,7 +141,7 @@ class CorporationBeneficialOwnerIndividual(BaseModel): class CorporationBeneficialOwner(BaseModel): - beneficial_owner_id: str + id: str """The identifier of this beneficial owner.""" company_title: Optional[str] = None From 48d7f1e864eed44bef45363b399e478db590cd08 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 07:13:12 +0000 Subject: [PATCH 1174/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/resources/wire_transfers.py | 4 +++ .../types/wire_transfer_list_params.py | 33 +++++++++++++++++-- tests/api_resources/test_wire_transfers.py | 2 ++ 4 files changed, 38 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index d1f0847b3..a42ce1f9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2277bacfbbf3570574b1c8abe74936d197944101f1e66238be7baf8e3303e52d.yml -openapi_spec_hash: f9004c6a75fbf5b4984080b8f8dd184c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-910400a5c3fcab85b95bf574472b6356767c24d4f76eb296bcba4b7db309710c.yml +openapi_spec_hash: c8b1cebba3d13a5c050c1296b93e2bdb config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index 080468288..c2a5a72f4 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -177,6 +177,7 @@ def list( external_account_id: str | Omit = omit, idempotency_key: str | Omit = omit, limit: int | Omit = omit, + status: wire_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -226,6 +227,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_transfer_list_params.WireTransferListParams, ), @@ -473,6 +475,7 @@ def list( external_account_id: str | Omit = omit, idempotency_key: str | Omit = omit, limit: int | Omit = omit, + status: wire_transfer_list_params.Status | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -522,6 +525,7 @@ def list( "external_account_id": external_account_id, "idempotency_key": idempotency_key, "limit": limit, + "status": status, }, wire_transfer_list_params.WireTransferListParams, ), diff --git a/src/increase/types/wire_transfer_list_params.py b/src/increase/types/wire_transfer_list_params.py index ae2166da1..ed7cfdca9 100644 --- a/src/increase/types/wire_transfer_list_params.py +++ b/src/increase/types/wire_transfer_list_params.py @@ -2,13 +2,13 @@ from __future__ import annotations -from typing import Union +from typing import List, Union from datetime import datetime -from typing_extensions import Annotated, TypedDict +from typing_extensions import Literal, Annotated, TypedDict from .._utils import PropertyInfo -__all__ = ["WireTransferListParams", "CreatedAt"] +__all__ = ["WireTransferListParams", "CreatedAt", "Status"] class WireTransferListParams(TypedDict, total=False): @@ -37,6 +37,8 @@ class WireTransferListParams(TypedDict, total=False): The default (and maximum) is 100 objects. """ + status: Status + class CreatedAt(TypedDict, total=False): after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] @@ -62,3 +64,28 @@ class CreatedAt(TypedDict, total=False): Return results on or before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. """ + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[ + Literal[ + "pending_approval", + "canceled", + "pending_reviewing", + "rejected", + "requires_attention", + "pending_creating", + "reversed", + "submitted", + "complete", + ] + ], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/test_wire_transfers.py b/tests/api_resources/test_wire_transfers.py index e68b36452..77b147967 100644 --- a/tests/api_resources/test_wire_transfers.py +++ b/tests/api_resources/test_wire_transfers.py @@ -159,6 +159,7 @@ def test_method_list_with_all_params(self, client: Increase) -> None: external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(SyncPage[WireTransfer], wire_transfer, path=["response"]) @@ -404,6 +405,7 @@ async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> external_account_id="external_account_id", idempotency_key="x", limit=1, + status={"in": ["pending_approval"]}, ) assert_matches_type(AsyncPage[WireTransfer], wire_transfer, path=["response"]) From 83bf85a065dbec283fa37239ecd40132edd76fc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 13:05:22 +0000 Subject: [PATCH 1175/1325] chore(internal): codegen related update --- scripts/mock | 13 ++++++- .../types/check_transfer_create_params.py | 14 +++----- .../entity_create_beneficial_owner_params.py | 16 +++------ src/increase/types/entity_create_params.py | 36 +++++-------------- .../types/real_time_decision_action_params.py | 8 ++--- 5 files changed, 30 insertions(+), 57 deletions(-) diff --git a/scripts/mock b/scripts/mock index 0b28f6ea2..bcf3b392b 100755 --- a/scripts/mock +++ b/scripts/mock @@ -21,11 +21,22 @@ echo "==> Starting mock server with URL ${URL}" # Run prism mock on the given spec if [ "$1" == "--daemon" ]; then + # Pre-install the package so the download doesn't eat into the startup timeout + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & - # Wait for server to come online + # Wait for server to come online (max 30s) echo -n "Waiting for server" + attempts=0 while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + attempts=$((attempts + 1)) + if [ "$attempts" -ge 300 ]; then + echo + echo "Timed out waiting for Prism server to start" + cat .prism.log + exit 1 + fi echo -n "." sleep 0.1 done diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index a93f1da43..e812775d2 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import Dict, Union, Iterable +from typing import Union, Iterable from datetime import date -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -156,7 +156,7 @@ class PhysicalCheckReturnAddress(TypedDict, total=False): """ -class PhysicalCheckTyped(TypedDict, total=False): +class PhysicalCheck(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """Details relating to the physical check that Increase will print and mail. This is required if `fulfillment_method` is equal to `physical_check`. It must not be included if any other `fulfillment_method` is provided. @@ -222,10 +222,7 @@ class PhysicalCheckTyped(TypedDict, total=False): """ -PhysicalCheck: TypeAlias = Union[PhysicalCheckTyped, Dict[str, object]] - - -class ThirdPartyTyped(TypedDict, total=False): +class ThirdParty(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """Details relating to the custom fulfillment you will perform. This is required if `fulfillment_method` is equal to `third_party`. It must not be included if any other `fulfillment_method` is provided. @@ -238,6 +235,3 @@ class ThirdPartyTyped(TypedDict, total=False): this is omitted, Increase will be unable to validate the payer name when the check is deposited. """ - - -ThirdParty: TypeAlias = Union[ThirdPartyTyped, Dict[str, object]] diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py index 627979061..e3091081e 100644 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ b/src/increase/types/entity_create_beneficial_owner_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import Dict, List, Union +from typing import List, Union from datetime import date -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -122,7 +122,7 @@ class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): +class BeneficialOwnerIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -169,11 +169,6 @@ class BeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): """ -BeneficialOwnerIndividualIdentification: TypeAlias = Union[ - BeneficialOwnerIndividualIdentificationTyped, Dict[str, object] -] - - class BeneficialOwnerIndividual(TypedDict, total=False): """Personal details for the beneficial owner.""" @@ -201,7 +196,7 @@ class BeneficialOwnerIndividual(TypedDict, total=False): """ -class BeneficialOwnerTyped(TypedDict, total=False): +class BeneficialOwner(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """ The identifying details of anyone controlling or owning 25% or more of the corporation. """ @@ -218,6 +213,3 @@ class BeneficialOwnerTyped(TypedDict, total=False): company_title: str """This person's role or title within the entity.""" - - -BeneficialOwner: TypeAlias = Union[BeneficialOwnerTyped, Dict[str, object]] diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index ba1b5a308..a8f9bb97e 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -2,9 +2,9 @@ from __future__ import annotations -from typing import Dict, List, Union, Iterable +from typing import List, Union, Iterable from datetime import date, datetime -from typing_extensions import Literal, Required, Annotated, TypeAlias, TypedDict +from typing_extensions import Literal, Required, Annotated, TypedDict from .._utils import PropertyInfo @@ -245,7 +245,7 @@ class CorporationBeneficialOwnerIndividualIdentificationPassport(TypedDict, tota """The identifier of the File containing the passport.""" -class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=False): +class CorporationBeneficialOwnerIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -292,11 +292,6 @@ class CorporationBeneficialOwnerIndividualIdentificationTyped(TypedDict, total=F """ -CorporationBeneficialOwnerIndividualIdentification: TypeAlias = Union[ - CorporationBeneficialOwnerIndividualIdentificationTyped, Dict[str, object] -] - - class CorporationBeneficialOwnerIndividual(TypedDict, total=False): """Personal details for the beneficial owner.""" @@ -324,7 +319,7 @@ class CorporationBeneficialOwnerIndividual(TypedDict, total=False): """ -class CorporationBeneficialOwnerTyped(TypedDict, total=False): +class CorporationBeneficialOwner(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] individual: Required[CorporationBeneficialOwnerIndividual] """Personal details for the beneficial owner.""" @@ -339,9 +334,6 @@ class CorporationBeneficialOwnerTyped(TypedDict, total=False): """This person's role or title within the entity.""" -CorporationBeneficialOwner: TypeAlias = Union[CorporationBeneficialOwnerTyped, Dict[str, object]] - - class Corporation(TypedDict, total=False): """Details of the corporation entity to create. @@ -563,7 +555,7 @@ class JointIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class JointIndividualIdentificationTyped(TypedDict, total=False): +class JointIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -610,9 +602,6 @@ class JointIndividualIdentificationTyped(TypedDict, total=False): """ -JointIndividualIdentification: TypeAlias = Union[JointIndividualIdentificationTyped, Dict[str, object]] - - class JointIndividual(TypedDict, total=False): address: Required[JointIndividualAddress] """The individual's physical address. @@ -739,7 +728,7 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class NaturalPersonIdentificationTyped(TypedDict, total=False): +class NaturalPersonIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -786,9 +775,6 @@ class NaturalPersonIdentificationTyped(TypedDict, total=False): """ -NaturalPersonIdentification: TypeAlias = Union[NaturalPersonIdentificationTyped, Dict[str, object]] - - class NaturalPerson(TypedDict, total=False): """Details of the natural person entity to create. @@ -993,7 +979,7 @@ class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False): +class TrustTrusteeIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -1040,9 +1026,6 @@ class TrustTrusteeIndividualIdentificationTyped(TypedDict, total=False): """ -TrustTrusteeIndividualIdentification: TypeAlias = Union[TrustTrusteeIndividualIdentificationTyped, Dict[str, object]] - - class TrustTrusteeIndividual(TypedDict, total=False): """Details of the individual trustee. @@ -1179,7 +1162,7 @@ class TrustGrantorIdentificationPassport(TypedDict, total=False): """The identifier of the File containing the passport.""" -class TrustGrantorIdentificationTyped(TypedDict, total=False): +class TrustGrantorIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """A means of verifying the person's identity.""" method: Required[ @@ -1226,9 +1209,6 @@ class TrustGrantorIdentificationTyped(TypedDict, total=False): """ -TrustGrantorIdentification: TypeAlias = Union[TrustGrantorIdentificationTyped, Dict[str, object]] - - class TrustGrantor(TypedDict, total=False): """The grantor of the trust. Required if `category` is equal to `revocable`.""" diff --git a/src/increase/types/real_time_decision_action_params.py b/src/increase/types/real_time_decision_action_params.py index 2516c9526..5e9eeb31d 100644 --- a/src/increase/types/real_time_decision_action_params.py +++ b/src/increase/types/real_time_decision_action_params.py @@ -2,8 +2,7 @@ from __future__ import annotations -from typing import Dict, Union -from typing_extensions import Literal, Required, TypeAlias, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = [ "RealTimeDecisionActionParams", @@ -198,7 +197,7 @@ class CardAuthorizationDecline(TypedDict, total=False): """ -class CardAuthorizationTyped(TypedDict, total=False): +class CardAuthorization(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """ If the Real-Time Decision relates to a card authorization attempt, this object contains your response to the authorization. """ @@ -225,9 +224,6 @@ class CardAuthorizationTyped(TypedDict, total=False): """ -CardAuthorization: TypeAlias = Union[CardAuthorizationTyped, Dict[str, object]] - - class CardBalanceInquiryApproval(TypedDict, total=False): """ If your application approves the balance inquiry, this contains metadata about your decision to approve. From 6fd3e1d01c96d76ed09c720c494804426d2f0341 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 19:55:24 +0000 Subject: [PATCH 1176/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index a42ce1f9a..165ec440d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-910400a5c3fcab85b95bf574472b6356767c24d4f76eb296bcba4b7db309710c.yml -openapi_spec_hash: c8b1cebba3d13a5c050c1296b93e2bdb +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-985e738d362cc4d7dce557163d9e57b9a3a254718d862bdeb2758b6c265584b9.yml +openapi_spec_hash: aa0b0b7eb6ca282b6e607dcc0408fafe config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a40954545..062b1377b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -368,6 +368,12 @@ class ElementCardAuthentication(BaseModel): merchant_name: str """The name of the merchant.""" + prior_card_authentication_id: Optional[str] = None + """ + The ID of a prior Card Authentication that the requestor used to authenticate + this cardholder for a previous transaction. + """ + purchase_amount: Optional[int] = None """The purchase amount in minor units.""" From 75afa50b471d79f07ee6cd4b70350a53229969ac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 20:08:12 +0000 Subject: [PATCH 1177/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 64 ++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 165ec440d..71f54a569 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-985e738d362cc4d7dce557163d9e57b9a3a254718d862bdeb2758b6c265584b9.yml -openapi_spec_hash: aa0b0b7eb6ca282b6e607dcc0408fafe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8bcd1f04377ee8ae354a1cb3b1c214232c8b448a93c98502ea92b696bf0757bf.yml +openapi_spec_hash: c338b176720c2dc69dd3f7db351ea8a5 config_hash: d15ecbf4dc8a7a0ef99397d11b557444 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 062b1377b..bc3405b6e 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -389,6 +389,70 @@ class ElementCardAuthentication(BaseModel): authentication attempt. """ + requestor_authentication_indicator: Optional[ + Literal[ + "payment_transaction", + "recurring_transaction", + "installment_transaction", + "add_card", + "maintain_card", + "emv_token_cardholder_verification", + "billing_agreement", + ] + ] = None + """ + The 3DS requestor authentication indicator describes why the authentication + attempt is performed, such as for a recurring transaction. + + - `payment_transaction` - The authentication is for a payment transaction. + - `recurring_transaction` - The authentication is for a recurring transaction. + - `installment_transaction` - The authentication is for an installment + transaction. + - `add_card` - The authentication is for adding a card. + - `maintain_card` - The authentication is for maintaining a card. + - `emv_token_cardholder_verification` - The authentication is for EMV token + cardholder verification. + - `billing_agreement` - The authentication is for a billing agreement. + """ + + requestor_challenge_indicator: Optional[ + Literal[ + "no_preference", + "no_challenge_requested", + "challenge_requested_3ds_requestor_preference", + "challenge_requested_mandate", + "no_challenge_requested_transactional_risk_analysis_already_performed", + "no_challenge_requested_data_share_only", + "no_challenge_requested_strong_consumer_authentication_already_performed", + "no_challenge_requested_utilize_whitelist_exemption_if_no_challenge_required", + "challenge_requested_whitelist_prompt_requested_if_challenge_required", + ] + ] = None + """Indicates whether a challenge is requested for this transaction. + + - `no_preference` - No preference. + - `no_challenge_requested` - No challenge requested. + - `challenge_requested_3ds_requestor_preference` - Challenge requested, 3DS + Requestor preference. + - `challenge_requested_mandate` - Challenge requested, mandate. + - `no_challenge_requested_transactional_risk_analysis_already_performed` - No + challenge requested, transactional risk analysis already performed. + - `no_challenge_requested_data_share_only` - No challenge requested, data share + only. + - `no_challenge_requested_strong_consumer_authentication_already_performed` - No + challenge requested, strong consumer authentication already performed. + - `no_challenge_requested_utilize_whitelist_exemption_if_no_challenge_required` - + No challenge requested, utilize whitelist exemption if no challenge required. + - `challenge_requested_whitelist_prompt_requested_if_challenge_required` - + Challenge requested, whitelist prompt requested if challenge required. + """ + + requestor_name: str + """The name of the 3DS requestor.""" + + requestor_url: str + """The URL of the 3DS requestor.""" + status: Literal[ "denied", "authenticated_with_challenge", From 855163ce9fd43a4a34cd7df7e5f079e60e69edd0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 21:13:47 +0000 Subject: [PATCH 1178/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + .../resources/simulations/check_deposits.py | 164 +++++++++++++++++- src/increase/types/simulations/__init__.py | 1 + .../check_deposit_adjustment_params.py | 35 ++++ .../simulations/test_check_deposits.py | 94 ++++++++++ 6 files changed, 298 insertions(+), 5 deletions(-) create mode 100644 src/increase/types/simulations/check_deposit_adjustment_params.py diff --git a/.stats.yml b/.stats.yml index 71f54a569..93d127a29 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 232 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8bcd1f04377ee8ae354a1cb3b1c214232c8b448a93c98502ea92b696bf0757bf.yml -openapi_spec_hash: c338b176720c2dc69dd3f7db351ea8a5 -config_hash: d15ecbf4dc8a7a0ef99397d11b557444 +configured_endpoints: 233 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ed184e346fa8c739f7de410b940df9f160681dd818eed4ec1e48b40451007d0.yml +openapi_spec_hash: 0bc3978204acc7949c98e1d098bf5e1c +config_hash: ca482105d83c23b2986f1c9c441c4343 diff --git a/api.md b/api.md index 12df4517f..d0500a9fb 100644 --- a/api.md +++ b/api.md @@ -986,6 +986,7 @@ Methods: Methods: +- client.simulations.check_deposits.adjustment(check_deposit_id, \*\*params) -> CheckDeposit - client.simulations.check_deposits.reject(check_deposit_id) -> CheckDeposit - client.simulations.check*deposits.return*(check_deposit_id) -> CheckDeposit - client.simulations.check_deposits.submit(check_deposit_id, \*\*params) -> CheckDeposit diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 62d30df2d..1fa37c646 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given @@ -15,7 +17,7 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import check_deposit_submit_params +from ...types.simulations import check_deposit_submit_params, check_deposit_adjustment_params from ...types.check_deposit import CheckDeposit __all__ = ["CheckDepositsResource", "AsyncCheckDepositsResource"] @@ -41,6 +43,80 @@ def with_streaming_response(self) -> CheckDepositsResourceWithStreamingResponse: """ return CheckDepositsResourceWithStreamingResponse(self) + def adjustment( + self, + check_deposit_id: str, + *, + amount: int | Omit = omit, + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CheckDeposit: + """ + Simulates the creation of a + [Check Deposit Adjustment](#check-deposit-adjustments) on a + [Check Deposit](#check-deposits). This Check Deposit must first have a `status` + of `submitted`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to adjust. + + amount: The adjustment amount in the minor unit of the Check Deposit's currency (e.g., + cents). A negative amount means that the funds are being clawed back by the + other bank and is a debit to your account. Defaults to the negative of the Check + Deposit amount. + + reason: The reason for the adjustment. Defaults to `non_conforming_item`, which is often + used for a low quality image that the recipient wasn't able to handle. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not check_deposit_id: + raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") + return self._post( + f"/simulations/check_deposits/{check_deposit_id}/adjustment", + body=maybe_transform( + { + "amount": amount, + "reason": reason, + }, + check_deposit_adjustment_params.CheckDepositAdjustmentParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CheckDeposit, + ) + def reject( self, check_deposit_id: str, @@ -197,6 +273,80 @@ def with_streaming_response(self) -> AsyncCheckDepositsResourceWithStreamingResp """ return AsyncCheckDepositsResourceWithStreamingResponse(self) + async def adjustment( + self, + check_deposit_id: str, + *, + amount: int | Omit = omit, + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> CheckDeposit: + """ + Simulates the creation of a + [Check Deposit Adjustment](#check-deposit-adjustments) on a + [Check Deposit](#check-deposits). This Check Deposit must first have a `status` + of `submitted`. + + Args: + check_deposit_id: The identifier of the Check Deposit you wish to adjust. + + amount: The adjustment amount in the minor unit of the Check Deposit's currency (e.g., + cents). A negative amount means that the funds are being clawed back by the + other bank and is a debit to your account. Defaults to the negative of the Check + Deposit amount. + + reason: The reason for the adjustment. Defaults to `non_conforming_item`, which is often + used for a low quality image that the recipient wasn't able to handle. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not check_deposit_id: + raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") + return await self._post( + f"/simulations/check_deposits/{check_deposit_id}/adjustment", + body=await async_maybe_transform( + { + "amount": amount, + "reason": reason, + }, + check_deposit_adjustment_params.CheckDepositAdjustmentParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=CheckDeposit, + ) + async def reject( self, check_deposit_id: str, @@ -337,6 +487,9 @@ class CheckDepositsResourceWithRawResponse: def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits + self.adjustment = to_raw_response_wrapper( + check_deposits.adjustment, + ) self.reject = to_raw_response_wrapper( check_deposits.reject, ) @@ -352,6 +505,9 @@ class AsyncCheckDepositsResourceWithRawResponse: def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits + self.adjustment = async_to_raw_response_wrapper( + check_deposits.adjustment, + ) self.reject = async_to_raw_response_wrapper( check_deposits.reject, ) @@ -367,6 +523,9 @@ class CheckDepositsResourceWithStreamingResponse: def __init__(self, check_deposits: CheckDepositsResource) -> None: self._check_deposits = check_deposits + self.adjustment = to_streamed_response_wrapper( + check_deposits.adjustment, + ) self.reject = to_streamed_response_wrapper( check_deposits.reject, ) @@ -382,6 +541,9 @@ class AsyncCheckDepositsResourceWithStreamingResponse: def __init__(self, check_deposits: AsyncCheckDepositsResource) -> None: self._check_deposits = check_deposits + self.adjustment = async_to_streamed_response_wrapper( + check_deposits.adjustment, + ) self.reject = async_to_streamed_response_wrapper( check_deposits.reject, ) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index 4122c3925..b953b3b8d 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -16,6 +16,7 @@ from .card_settlement_create_params import CardSettlementCreateParams as CardSettlementCreateParams from .interest_payment_create_params import InterestPaymentCreateParams as InterestPaymentCreateParams from .account_statement_create_params import AccountStatementCreateParams as AccountStatementCreateParams +from .check_deposit_adjustment_params import CheckDepositAdjustmentParams as CheckDepositAdjustmentParams from .inbound_mail_item_create_params import InboundMailItemCreateParams as InboundMailItemCreateParams from .card_authorization_create_params import CardAuthorizationCreateParams as CardAuthorizationCreateParams from .card_authentication_create_params import CardAuthenticationCreateParams as CardAuthenticationCreateParams diff --git a/src/increase/types/simulations/check_deposit_adjustment_params.py b/src/increase/types/simulations/check_deposit_adjustment_params.py new file mode 100644 index 000000000..7627917c0 --- /dev/null +++ b/src/increase/types/simulations/check_deposit_adjustment_params.py @@ -0,0 +1,35 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["CheckDepositAdjustmentParams"] + + +class CheckDepositAdjustmentParams(TypedDict, total=False): + amount: int + """ + The adjustment amount in the minor unit of the Check Deposit's currency (e.g., + cents). A negative amount means that the funds are being clawed back by the + other bank and is a debit to your account. Defaults to the negative of the Check + Deposit amount. + """ + + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + """The reason for the adjustment. + + Defaults to `non_conforming_item`, which is often used for a low quality image + that the recipient wasn't able to handle. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + """ diff --git a/tests/api_resources/simulations/test_check_deposits.py b/tests/api_resources/simulations/test_check_deposits.py index 7d2eecbd8..9d422a43a 100644 --- a/tests/api_resources/simulations/test_check_deposits.py +++ b/tests/api_resources/simulations/test_check_deposits.py @@ -17,6 +17,53 @@ class TestCheckDeposits: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_adjustment(self, client: Increase) -> None: + check_deposit = client.simulations.check_deposits.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + def test_method_adjustment_with_all_params(self, client: Increase) -> None: + check_deposit = client.simulations.check_deposits.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + amount=-1000000000, + reason="late_return", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + def test_raw_response_adjustment(self, client: Increase) -> None: + response = client.simulations.check_deposits.with_raw_response.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + check_deposit = response.parse() + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_adjustment(self, client: Increase) -> None: + with client.simulations.check_deposits.with_streaming_response.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + check_deposit = response.parse() + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_adjustment(self, client: Increase) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): + client.simulations.check_deposits.with_raw_response.adjustment( + check_deposit_id="", + ) + @parametrize def test_method_reject(self, client: Increase) -> None: check_deposit = client.simulations.check_deposits.reject( @@ -149,6 +196,53 @@ class TestAsyncCheckDeposits: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @parametrize + async def test_method_adjustment(self, async_client: AsyncIncrease) -> None: + check_deposit = await async_client.simulations.check_deposits.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + async def test_method_adjustment_with_all_params(self, async_client: AsyncIncrease) -> None: + check_deposit = await async_client.simulations.check_deposits.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + amount=-1000000000, + reason="late_return", + ) + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_adjustment(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.check_deposits.with_raw_response.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + check_deposit = await response.parse() + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_adjustment(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.check_deposits.with_streaming_response.adjustment( + check_deposit_id="check_deposit_f06n9gpg7sxn8t19lfc1", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + check_deposit = await response.parse() + assert_matches_type(CheckDeposit, check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_adjustment(self, async_client: AsyncIncrease) -> None: + with pytest.raises(ValueError, match=r"Expected a non-empty value for `check_deposit_id` but received ''"): + await async_client.simulations.check_deposits.with_raw_response.adjustment( + check_deposit_id="", + ) + @parametrize async def test_method_reject(self, async_client: AsyncIncrease) -> None: check_deposit = await async_client.simulations.check_deposits.reject( From b10a7cb802421b0a1aa7fa9890154fd50935c387 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 21:43:48 +0000 Subject: [PATCH 1179/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + .../simulations/inbound_check_deposits.py | 158 +++++++++++++++++- src/increase/types/simulations/__init__.py | 3 + ...inbound_check_deposit_adjustment_params.py | 30 ++++ .../test_inbound_check_deposits.py | 98 +++++++++++ 6 files changed, 293 insertions(+), 5 deletions(-) create mode 100644 src/increase/types/simulations/inbound_check_deposit_adjustment_params.py diff --git a/.stats.yml b/.stats.yml index 93d127a29..73242f912 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 233 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ed184e346fa8c739f7de410b940df9f160681dd818eed4ec1e48b40451007d0.yml -openapi_spec_hash: 0bc3978204acc7949c98e1d098bf5e1c -config_hash: ca482105d83c23b2986f1c9c441c4343 +configured_endpoints: 234 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e4cf84ebe7ee8dbfbaa709d310fb62f12631f4b69f7aa73be2a88f149c726dc3.yml +openapi_spec_hash: 123949338534df87debdfbd846fc40b1 +config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/api.md b/api.md index d0500a9fb..89352d53a 100644 --- a/api.md +++ b/api.md @@ -963,6 +963,7 @@ Methods: Methods: - client.simulations.inbound_check_deposits.create(\*\*params) -> InboundCheckDeposit +- client.simulations.inbound_check_deposits.adjustment(inbound_check_deposit_id, \*\*params) -> InboundCheckDeposit ## RealTimePaymentsTransfers diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index f91e761dc..cf30df066 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -17,7 +17,7 @@ async_to_streamed_response_wrapper, ) from ..._base_client import make_request_options -from ...types.simulations import inbound_check_deposit_create_params +from ...types.simulations import inbound_check_deposit_create_params, inbound_check_deposit_adjustment_params from ...types.inbound_check_deposit import InboundCheckDeposit __all__ = ["InboundCheckDepositsResource", "AsyncInboundCheckDepositsResource"] @@ -115,6 +115,78 @@ def create( cast_to=InboundCheckDeposit, ) + def adjustment( + self, + inbound_check_deposit_id: str, + *, + amount: int | Omit = omit, + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """Simulates an adjustment on an Inbound Check Deposit. + + The Inbound Check Deposit + must have a `status` of `accepted`. + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to adjust. + + amount: The adjustment amount in cents. Defaults to the amount of the Inbound Check + Deposit. + + reason: The reason for the adjustment. Defaults to `wrong_payee_credit`. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return self._post( + f"/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + body=maybe_transform( + { + "amount": amount, + "reason": reason, + }, + inbound_check_deposit_adjustment_params.InboundCheckDepositAdjustmentParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class AsyncInboundCheckDepositsResource(AsyncAPIResource): @cached_property @@ -208,6 +280,78 @@ async def create( cast_to=InboundCheckDeposit, ) + async def adjustment( + self, + inbound_check_deposit_id: str, + *, + amount: int | Omit = omit, + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> InboundCheckDeposit: + """Simulates an adjustment on an Inbound Check Deposit. + + The Inbound Check Deposit + must have a `status` of `accepted`. + + Args: + inbound_check_deposit_id: The identifier of the Inbound Check Deposit to adjust. + + amount: The adjustment amount in cents. Defaults to the amount of the Inbound Check + Deposit. + + reason: The reason for the adjustment. Defaults to `wrong_payee_credit`. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not inbound_check_deposit_id: + raise ValueError( + f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" + ) + return await self._post( + f"/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + body=await async_maybe_transform( + { + "amount": amount, + "reason": reason, + }, + inbound_check_deposit_adjustment_params.InboundCheckDepositAdjustmentParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=InboundCheckDeposit, + ) + class InboundCheckDepositsResourceWithRawResponse: def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None: @@ -216,6 +360,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.create = to_raw_response_wrapper( inbound_check_deposits.create, ) + self.adjustment = to_raw_response_wrapper( + inbound_check_deposits.adjustment, + ) class AsyncInboundCheckDepositsResourceWithRawResponse: @@ -225,6 +372,9 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.create = async_to_raw_response_wrapper( inbound_check_deposits.create, ) + self.adjustment = async_to_raw_response_wrapper( + inbound_check_deposits.adjustment, + ) class InboundCheckDepositsResourceWithStreamingResponse: @@ -234,6 +384,9 @@ def __init__(self, inbound_check_deposits: InboundCheckDepositsResource) -> None self.create = to_streamed_response_wrapper( inbound_check_deposits.create, ) + self.adjustment = to_streamed_response_wrapper( + inbound_check_deposits.adjustment, + ) class AsyncInboundCheckDepositsResourceWithStreamingResponse: @@ -243,3 +396,6 @@ def __init__(self, inbound_check_deposits: AsyncInboundCheckDepositsResource) -> self.create = async_to_streamed_response_wrapper( inbound_check_deposits.create, ) + self.adjustment = async_to_streamed_response_wrapper( + inbound_check_deposits.adjustment, + ) diff --git a/src/increase/types/simulations/__init__.py b/src/increase/types/simulations/__init__.py index b953b3b8d..17ec3a35e 100644 --- a/src/increase/types/simulations/__init__.py +++ b/src/increase/types/simulations/__init__.py @@ -32,6 +32,9 @@ from .physical_card_advance_shipment_params import ( PhysicalCardAdvanceShipmentParams as PhysicalCardAdvanceShipmentParams, ) +from .inbound_check_deposit_adjustment_params import ( + InboundCheckDepositAdjustmentParams as InboundCheckDepositAdjustmentParams, +) from .digital_wallet_token_request_create_params import ( DigitalWalletTokenRequestCreateParams as DigitalWalletTokenRequestCreateParams, ) diff --git a/src/increase/types/simulations/inbound_check_deposit_adjustment_params.py b/src/increase/types/simulations/inbound_check_deposit_adjustment_params.py new file mode 100644 index 000000000..80357357e --- /dev/null +++ b/src/increase/types/simulations/inbound_check_deposit_adjustment_params.py @@ -0,0 +1,30 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Literal, TypedDict + +__all__ = ["InboundCheckDepositAdjustmentParams"] + + +class InboundCheckDepositAdjustmentParams(TypedDict, total=False): + amount: int + """The adjustment amount in cents. + + Defaults to the amount of the Inbound Check Deposit. + """ + + reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + """The reason for the adjustment. Defaults to `wrong_payee_credit`. + + - `late_return` - The return was initiated too late and the receiving + institution has responded with a Late Return Claim. + - `wrong_payee_credit` - The check was deposited to the wrong payee and the + depositing institution has reimbursed the funds with a Wrong Payee Credit. + - `adjusted_amount` - The check was deposited with a different amount than what + was written on the check. + - `non_conforming_item` - The recipient was not able to process the check. This + usually happens for e.g., low quality images. + - `paid` - The check has already been deposited elsewhere and so this is a + duplicate. + """ diff --git a/tests/api_resources/simulations/test_inbound_check_deposits.py b/tests/api_resources/simulations/test_inbound_check_deposits.py index eef5ded60..44a6f16a6 100644 --- a/tests/api_resources/simulations/test_inbound_check_deposits.py +++ b/tests/api_resources/simulations/test_inbound_check_deposits.py @@ -64,6 +64,55 @@ def test_streaming_response_create(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_adjustment(self, client: Increase) -> None: + inbound_check_deposit = client.simulations.inbound_check_deposits.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_method_adjustment_with_all_params(self, client: Increase) -> None: + inbound_check_deposit = client.simulations.inbound_check_deposits.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + amount=1000, + reason="late_return", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_raw_response_adjustment(self, client: Increase) -> None: + response = client.simulations.inbound_check_deposits.with_raw_response.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + def test_streaming_response_adjustment(self, client: Increase) -> None: + with client.simulations.inbound_check_deposits.with_streaming_response.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_adjustment(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + client.simulations.inbound_check_deposits.with_raw_response.adjustment( + inbound_check_deposit_id="", + ) + class TestAsyncInboundCheckDeposits: parametrize = pytest.mark.parametrize( @@ -116,3 +165,52 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_adjustment(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.simulations.inbound_check_deposits.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_method_adjustment_with_all_params(self, async_client: AsyncIncrease) -> None: + inbound_check_deposit = await async_client.simulations.inbound_check_deposits.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + amount=1000, + reason="late_return", + ) + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_raw_response_adjustment(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.inbound_check_deposits.with_raw_response.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + @parametrize + async def test_streaming_response_adjustment(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.inbound_check_deposits.with_streaming_response.adjustment( + inbound_check_deposit_id="inbound_check_deposit_zoshvqybq0cjjm31mra", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + inbound_check_deposit = await response.parse() + assert_matches_type(InboundCheckDeposit, inbound_check_deposit, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_adjustment(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `inbound_check_deposit_id` but received ''" + ): + await async_client.simulations.inbound_check_deposits.with_raw_response.adjustment( + inbound_check_deposit_id="", + ) From e0e7b7c399eed43567348e6a7b77712793d7a0b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:03:46 +0000 Subject: [PATCH 1180/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 109 +++++++++++++++++++++++++++++ 2 files changed, 111 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 73242f912..dd629af04 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e4cf84ebe7ee8dbfbaa709d310fb62f12631f4b69f7aa73be2a88f149c726dc3.yml -openapi_spec_hash: 123949338534df87debdfbd846fc40b1 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ad5e7687261a6a66ca0b94fed6765c7f703e809a4ad1ea2697f13125b2a4149.yml +openapi_spec_hash: d0109b057a653545ee169947b9aa76b2 config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index bc3405b6e..3d5548295 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -16,6 +16,7 @@ "ElementCardAuthenticationChallengeAttempt", "ElementCardAuthenticationDeviceChannel", "ElementCardAuthenticationDeviceChannelBrowser", + "ElementCardAuthenticationDeviceChannelMerchantInitiated", "ElementCardAuthorization", "ElementCardAuthorizationAdditionalAmounts", "ElementCardAuthorizationAdditionalAmountsClinic", @@ -231,6 +232,54 @@ class ElementCardAuthenticationDeviceChannelBrowser(BaseModel): """The user agent of the cardholder's browser.""" +class ElementCardAuthenticationDeviceChannelMerchantInitiated(BaseModel): + """Fields specific to merchant initiated transactions.""" + + indicator: Literal[ + "recurring_transaction", + "installment_transaction", + "add_card", + "maintain_card_information", + "account_verification", + "split_delayed_shipment", + "top_up", + "mail_order", + "telephone_order", + "whitelist_status_check", + "other_payment", + "billing_agreement", + "device_binding_status_check", + "card_security_code_status_check", + "delayed_shipment", + "split_payment", + "fido_credential_deletion", + "fido_credential_registration", + "decoupled_authentication_fallback", + ] + """The merchant initiated indicator for the transaction. + + - `recurring_transaction` - Recurring transaction. + - `installment_transaction` - Installment transaction. + - `add_card` - Add card. + - `maintain_card_information` - Maintain card information. + - `account_verification` - Account verification. + - `split_delayed_shipment` - Split or delayed shipment. + - `top_up` - Top up. + - `mail_order` - Mail order. + - `telephone_order` - Telephone order. + - `whitelist_status_check` - Whitelist status check. + - `other_payment` - Other payment. + - `billing_agreement` - Billing agreement. + - `device_binding_status_check` - Device binding status check. + - `card_security_code_status_check` - Card security code status check. + - `delayed_shipment` - Delayed shipment. + - `split_payment` - Split payment. + - `fido_credential_deletion` - FIDO credential deletion. + - `fido_credential_registration` - FIDO credential registration. + - `decoupled_authentication_fallback` - Decoupled authentication fallback. + """ + + class ElementCardAuthenticationDeviceChannel(BaseModel): """The device channel of the card authentication attempt.""" @@ -246,6 +295,9 @@ class ElementCardAuthenticationDeviceChannel(BaseModel): the 3DS Requestor. """ + merchant_initiated: Optional[ElementCardAuthenticationDeviceChannelMerchantInitiated] = None + """Fields specific to merchant initiated transactions.""" + class ElementCardAuthentication(BaseModel): """A Card Authentication object. @@ -256,6 +308,12 @@ class ElementCardAuthentication(BaseModel): id: str """The Card Authentication identifier.""" + access_control_server_transaction_id: str + """ + A unique identifier assigned by the Access Control Server (us) for this + transaction. + """ + billing_address_city: Optional[str] = None """ The city of the cardholder billing address associated with the card used for @@ -350,6 +408,12 @@ class ElementCardAuthentication(BaseModel): device_channel: ElementCardAuthenticationDeviceChannel """The device channel of the card authentication attempt.""" + directory_server_transaction_id: str + """ + A unique identifier assigned by the Directory Server (the card network) for this + transaction. + """ + merchant_acceptor_id: str """ The merchant identifier (commonly abbreviated as MID) of the merchant the card @@ -453,6 +517,27 @@ class ElementCardAuthentication(BaseModel): requestor_url: str """The URL of the 3DS requestor.""" + shipping_address_city: Optional[str] = None + """The city of the shipping address associated with this purchase.""" + + shipping_address_country: Optional[str] = None + """The country of the shipping address associated with this purchase.""" + + shipping_address_line1: Optional[str] = None + """The first line of the shipping address associated with this purchase.""" + + shipping_address_line2: Optional[str] = None + """The second line of the shipping address associated with this purchase.""" + + shipping_address_line3: Optional[str] = None + """The third line of the shipping address associated with this purchase.""" + + shipping_address_postal_code: Optional[str] = None + """The postal code of the shipping address associated with this purchase.""" + + shipping_address_state: Optional[str] = None + """The US state of the shipping address associated with this purchase.""" + status: Literal[ "denied", "authenticated_with_challenge", @@ -481,6 +566,30 @@ class ElementCardAuthentication(BaseModel): threshold. """ + three_d_secure_server_transaction_id: str + """ + A unique identifier assigned by the 3DS Server initiating the authentication + attempt for this transaction. + """ + + transaction_type: Optional[ + Literal[ + "goods_service_purchase", + "check_acceptance", + "account_funding", + "quasi_cash_transaction", + "prepaid_activation_and_load", + ] + ] = None + """The type of transaction being authenticated. + + - `goods_service_purchase` - Purchase of goods or services. + - `check_acceptance` - Check acceptance. + - `account_funding` - Account funding. + - `quasi_cash_transaction` - Quasi-cash transaction. + - `prepaid_activation_and_load` - Prepaid activation and load. + """ + type: Literal["card_authentication"] """A constant representing the object's type. From 42711379a10f94c4877983310d48bb827d498548 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 5 Mar 2026 22:19:25 +0000 Subject: [PATCH 1181/1325] feat(api): api update --- .stats.yml | 4 +- .../simulations/card_authorizations.py | 14 +++++-- .../simulations/card_balance_inquiries.py | 14 +++++-- src/increase/types/card_payment.py | 42 +++++++++++++------ src/increase/types/declined_transaction.py | 14 +++++-- src/increase/types/pending_transaction.py | 7 +++- src/increase/types/real_time_decision.py | 14 +++++-- .../card_authorization_create_params.py | 14 +++++-- .../card_balance_inquiry_create_params.py | 14 +++++-- src/increase/types/transaction.py | 7 +++- 10 files changed, 102 insertions(+), 42 deletions(-) diff --git a/.stats.yml b/.stats.yml index dd629af04..507678f12 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5ad5e7687261a6a66ca0b94fed6765c7f703e809a4ad1ea2697f13125b2a4149.yml -openapi_spec_hash: d0109b057a653545ee169947b9aa76b2 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-561b73fd99114001dc2e93ee7371e33969398e7bc5b7e78dd1b3e8eea8e254ff.yml +openapi_spec_hash: 3b0ba693d170e8b422ba9255cdc96853 config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/src/increase/resources/simulations/card_authorizations.py b/src/increase/resources/simulations/card_authorizations.py index c570372c4..6c281fdeb 100644 --- a/src/increase/resources/simulations/card_authorizations.py +++ b/src/increase/resources/simulations/card_authorizations.py @@ -67,6 +67,7 @@ def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -133,10 +134,12 @@ def create( - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card @@ -267,6 +270,7 @@ async def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -333,10 +337,12 @@ async def create( - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card diff --git a/src/increase/resources/simulations/card_balance_inquiries.py b/src/increase/resources/simulations/card_balance_inquiries.py index adfd37367..a7541cb66 100644 --- a/src/increase/resources/simulations/card_balance_inquiries.py +++ b/src/increase/resources/simulations/card_balance_inquiries.py @@ -66,6 +66,7 @@ def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -121,10 +122,12 @@ def create( - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card @@ -249,6 +252,7 @@ async def create( "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -304,10 +308,12 @@ async def create( - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 3d5548295..f8f5e75c3 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -913,6 +913,7 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -927,8 +928,10 @@ class ElementCardAuthorizationNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -1673,6 +1676,7 @@ class ElementCardBalanceInquiryNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -1687,8 +1691,10 @@ class ElementCardBalanceInquiryNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -2304,6 +2310,7 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -2318,8 +2325,10 @@ class ElementCardDeclineNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -2728,6 +2737,7 @@ class ElementCardDecline(BaseModel): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -2753,10 +2763,12 @@ class ElementCardDecline(BaseModel): - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card @@ -3091,6 +3103,7 @@ class ElementCardFinancialNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -3105,8 +3118,10 @@ class ElementCardFinancialNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -5607,6 +5622,7 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -5621,8 +5637,10 @@ class ElementCardValidationNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index ee3ecb44c..3652619a3 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -449,6 +449,7 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -463,8 +464,10 @@ class SourceCardDeclineNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -873,6 +876,7 @@ class SourceCardDecline(BaseModel): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -898,10 +902,12 @@ class SourceCardDecline(BaseModel): - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 56639b148..9eba210fc 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -459,6 +459,7 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -473,8 +474,10 @@ class SourceCardAuthorizationNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 29c5a95ac..e6f3d3fc9 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -465,6 +465,7 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -479,8 +480,10 @@ class CardAuthorizationNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason @@ -1227,6 +1230,7 @@ class CardBalanceInquiryNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -1241,8 +1245,10 @@ class CardBalanceInquiryNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason diff --git a/src/increase/types/simulations/card_authorization_create_params.py b/src/increase/types/simulations/card_authorization_create_params.py index e66950f04..b65f4c06a 100644 --- a/src/increase/types/simulations/card_authorization_create_params.py +++ b/src/increase/types/simulations/card_authorization_create_params.py @@ -44,6 +44,7 @@ class CardAuthorizationCreateParams(TypedDict, total=False): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -71,10 +72,12 @@ class CardAuthorizationCreateParams(TypedDict, total=False): - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card @@ -150,6 +153,7 @@ class NetworkDetailsVisa(TypedDict, total=False): stand_in_processing_reason: Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -160,8 +164,10 @@ class NetworkDetailsVisa(TypedDict, total=False): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason diff --git a/src/increase/types/simulations/card_balance_inquiry_create_params.py b/src/increase/types/simulations/card_balance_inquiry_create_params.py index 8ce3cf2b3..7c58c264e 100644 --- a/src/increase/types/simulations/card_balance_inquiry_create_params.py +++ b/src/increase/types/simulations/card_balance_inquiry_create_params.py @@ -32,6 +32,7 @@ class CardBalanceInquiryCreateParams(TypedDict, total=False): "declined_by_stand_in_processing", "invalid_physical_card", "missing_original_authorization", + "invalid_cryptogram", "failed_3ds_authentication", "suspected_card_testing", "suspected_fraud", @@ -59,10 +60,12 @@ class CardBalanceInquiryCreateParams(TypedDict, total=False): - `webhook_timed_out` - Your application webhook did not respond without the required timeout. - `declined_by_stand_in_processing` - Declined by stand-in processing. - - `invalid_physical_card` - The card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The card read had an invalid CVV or dCVV. - `missing_original_authorization` - The original card authorization for this incremental authorization does not exist. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `failed_3ds_authentication` - The transaction was declined because the 3DS authentication failed. - `suspected_card_testing` - The transaction was suspected to be used by a card @@ -132,6 +135,7 @@ class NetworkDetailsVisa(TypedDict, total=False): stand_in_processing_reason: Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -142,8 +146,10 @@ class NetworkDetailsVisa(TypedDict, total=False): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index fabfc1182..b0c8301c9 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -993,6 +993,7 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): Literal[ "issuer_error", "invalid_physical_card", + "invalid_cryptogram", "invalid_cardholder_authentication_verification_value", "internal_visa_error", "merchant_transaction_advisory_service_authentication_required", @@ -1007,8 +1008,10 @@ class SourceCardFinancialNetworkDetailsVisa(BaseModel): - `issuer_error` - Increase failed to process the authorization in a timely manner. - - `invalid_physical_card` - The physical card read had an invalid CVV, dCVV, or - authorization request cryptogram. + - `invalid_physical_card` - The physical card read had an invalid CVV or dCVV. + - `invalid_cryptogram` - The card's authorization request cryptogram was + invalid. The cryptogram can be from a physical card or a Digital Wallet Token + purchase. - `invalid_cardholder_authentication_verification_value` - The 3DS cardholder authentication verification value was invalid. - `internal_visa_error` - An internal Visa error occurred. Visa uses this reason From 6f936ffdb8616cd80ebff59b63f378b8616a19e6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 03:28:34 +0000 Subject: [PATCH 1182/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/real_time_decision.py | 308 ++++++++++++++++++++++- 2 files changed, 309 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 507678f12..c9fd3761c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-561b73fd99114001dc2e93ee7371e33969398e7bc5b7e78dd1b3e8eea8e254ff.yml -openapi_spec_hash: 3b0ba693d170e8b422ba9255cdc96853 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-946ad9479adebd282fe6122c780bc4d062ff9ce0e8794c74bd1ec4aa330aab04.yml +openapi_spec_hash: eb1f88706f7c87c9f72903c7a7c96026 config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index e6f3d3fc9..9dd0cdee2 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -11,6 +11,9 @@ __all__ = [ "RealTimeDecision", "CardAuthentication", + "CardAuthenticationDeviceChannel", + "CardAuthenticationDeviceChannelBrowser", + "CardAuthenticationDeviceChannelMerchantInitiated", "CardAuthenticationChallenge", "CardAuthorization", "CardAuthorizationAdditionalAmounts", @@ -64,14 +67,166 @@ ] +class CardAuthenticationDeviceChannelBrowser(BaseModel): + """Fields specific to the browser device channel.""" + + accept_header: Optional[str] = None + """The accept header from the cardholder's browser.""" + + ip_address: Optional[str] = None + """The IP address of the cardholder's browser.""" + + javascript_enabled: Optional[Literal["enabled", "disabled"]] = None + """Whether JavaScript is enabled in the cardholder's browser. + + - `enabled` - JavaScript is enabled in the cardholder's browser. + - `disabled` - JavaScript is not enabled in the cardholder's browser. + """ + + language: Optional[str] = None + """The language of the cardholder's browser.""" + + user_agent: Optional[str] = None + """The user agent of the cardholder's browser.""" + + +class CardAuthenticationDeviceChannelMerchantInitiated(BaseModel): + """Fields specific to merchant initiated transactions.""" + + indicator: Literal[ + "recurring_transaction", + "installment_transaction", + "add_card", + "maintain_card_information", + "account_verification", + "split_delayed_shipment", + "top_up", + "mail_order", + "telephone_order", + "whitelist_status_check", + "other_payment", + "billing_agreement", + "device_binding_status_check", + "card_security_code_status_check", + "delayed_shipment", + "split_payment", + "fido_credential_deletion", + "fido_credential_registration", + "decoupled_authentication_fallback", + ] + """The merchant initiated indicator for the transaction. + + - `recurring_transaction` - Recurring transaction. + - `installment_transaction` - Installment transaction. + - `add_card` - Add card. + - `maintain_card_information` - Maintain card information. + - `account_verification` - Account verification. + - `split_delayed_shipment` - Split or delayed shipment. + - `top_up` - Top up. + - `mail_order` - Mail order. + - `telephone_order` - Telephone order. + - `whitelist_status_check` - Whitelist status check. + - `other_payment` - Other payment. + - `billing_agreement` - Billing agreement. + - `device_binding_status_check` - Device binding status check. + - `card_security_code_status_check` - Card security code status check. + - `delayed_shipment` - Delayed shipment. + - `split_payment` - Split payment. + - `fido_credential_deletion` - FIDO credential deletion. + - `fido_credential_registration` - FIDO credential registration. + - `decoupled_authentication_fallback` - Decoupled authentication fallback. + """ + + +class CardAuthenticationDeviceChannel(BaseModel): + """The device channel of the card authentication attempt.""" + + browser: Optional[CardAuthenticationDeviceChannelBrowser] = None + """Fields specific to the browser device channel.""" + + category: Literal["app", "browser", "three_ds_requestor_initiated"] + """The category of the device channel. + + - `app` - The authentication attempt was made from an app. + - `browser` - The authentication attempt was made from a browser. + - `three_ds_requestor_initiated` - The authentication attempt was initiated by + the 3DS Requestor. + """ + + merchant_initiated: Optional[CardAuthenticationDeviceChannelMerchantInitiated] = None + """Fields specific to merchant initiated transactions.""" + + class CardAuthentication(BaseModel): """Fields related to a 3DS authentication attempt.""" + access_control_server_transaction_id: str + """ + A unique identifier assigned by the Access Control Server (us) for this + transaction. + """ + account_id: str """The identifier of the Account the card belongs to.""" + billing_address_city: Optional[str] = None + """ + The city of the cardholder billing address associated with the card used for + this purchase. + """ + + billing_address_country: Optional[str] = None + """ + The country of the cardholder billing address associated with the card used for + this purchase. + """ + + billing_address_line1: Optional[str] = None + """ + The first line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_line2: Optional[str] = None + """ + The second line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_line3: Optional[str] = None + """ + The third line of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_postal_code: Optional[str] = None + """ + The postal code of the cardholder billing address associated with the card used + for this purchase. + """ + + billing_address_state: Optional[str] = None + """ + The US state of the cardholder billing address associated with the card used for + this purchase. + """ + card_id: str - """The identifier of the Card that is being tokenized.""" + """The identifier of the Card.""" + + cardholder_email: Optional[str] = None + """The email address of the cardholder.""" + + cardholder_name: Optional[str] = None + """The name of the cardholder.""" + + category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ decision: Optional[Literal["approve", "challenge", "deny"]] = None """Whether or not the authentication attempt was approved. @@ -82,6 +237,157 @@ class CardAuthentication(BaseModel): - `deny` - Deny the authentication attempt. """ + device_channel: CardAuthenticationDeviceChannel + """The device channel of the card authentication attempt.""" + + directory_server_transaction_id: str + """ + A unique identifier assigned by the Directory Server (the card network) for this + transaction. + """ + + merchant_acceptor_id: str + """ + The merchant identifier (commonly abbreviated as MID) of the merchant the card + is transacting with. + """ + + merchant_category_code: str + """ + The Merchant Category Code (commonly abbreviated as MCC) of the merchant the + card is transacting with. + """ + + merchant_country: str + """The country the merchant resides in.""" + + merchant_name: str + """The name of the merchant.""" + + prior_card_authentication_id: Optional[str] = None + """ + The ID of a prior Card Authentication that the requestor used to authenticate + this cardholder for a previous transaction. + """ + + purchase_amount: Optional[int] = None + """The purchase amount in minor units.""" + + purchase_currency: Optional[str] = None + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + authentication attempt's purchase currency. + """ + + requestor_authentication_indicator: Optional[ + Literal[ + "payment_transaction", + "recurring_transaction", + "installment_transaction", + "add_card", + "maintain_card", + "emv_token_cardholder_verification", + "billing_agreement", + ] + ] = None + """ + The 3DS requestor authentication indicator describes why the authentication + attempt is performed, such as for a recurring transaction. + + - `payment_transaction` - The authentication is for a payment transaction. + - `recurring_transaction` - The authentication is for a recurring transaction. + - `installment_transaction` - The authentication is for an installment + transaction. + - `add_card` - The authentication is for adding a card. + - `maintain_card` - The authentication is for maintaining a card. + - `emv_token_cardholder_verification` - The authentication is for EMV token + cardholder verification. + - `billing_agreement` - The authentication is for a billing agreement. + """ + + requestor_challenge_indicator: Optional[ + Literal[ + "no_preference", + "no_challenge_requested", + "challenge_requested_3ds_requestor_preference", + "challenge_requested_mandate", + "no_challenge_requested_transactional_risk_analysis_already_performed", + "no_challenge_requested_data_share_only", + "no_challenge_requested_strong_consumer_authentication_already_performed", + "no_challenge_requested_utilize_whitelist_exemption_if_no_challenge_required", + "challenge_requested_whitelist_prompt_requested_if_challenge_required", + ] + ] = None + """Indicates whether a challenge is requested for this transaction. + + - `no_preference` - No preference. + - `no_challenge_requested` - No challenge requested. + - `challenge_requested_3ds_requestor_preference` - Challenge requested, 3DS + Requestor preference. + - `challenge_requested_mandate` - Challenge requested, mandate. + - `no_challenge_requested_transactional_risk_analysis_already_performed` - No + challenge requested, transactional risk analysis already performed. + - `no_challenge_requested_data_share_only` - No challenge requested, data share + only. + - `no_challenge_requested_strong_consumer_authentication_already_performed` - No + challenge requested, strong consumer authentication already performed. + - `no_challenge_requested_utilize_whitelist_exemption_if_no_challenge_required` - + No challenge requested, utilize whitelist exemption if no challenge required. + - `challenge_requested_whitelist_prompt_requested_if_challenge_required` - + Challenge requested, whitelist prompt requested if challenge required. + """ + + requestor_name: str + """The name of the 3DS requestor.""" + + requestor_url: str + """The URL of the 3DS requestor.""" + + shipping_address_city: Optional[str] = None + """The city of the shipping address associated with this purchase.""" + + shipping_address_country: Optional[str] = None + """The country of the shipping address associated with this purchase.""" + + shipping_address_line1: Optional[str] = None + """The first line of the shipping address associated with this purchase.""" + + shipping_address_line2: Optional[str] = None + """The second line of the shipping address associated with this purchase.""" + + shipping_address_line3: Optional[str] = None + """The third line of the shipping address associated with this purchase.""" + + shipping_address_postal_code: Optional[str] = None + """The postal code of the shipping address associated with this purchase.""" + + shipping_address_state: Optional[str] = None + """The US state of the shipping address associated with this purchase.""" + + three_d_secure_server_transaction_id: str + """ + A unique identifier assigned by the 3DS Server initiating the authentication + attempt for this transaction. + """ + + transaction_type: Optional[ + Literal[ + "goods_service_purchase", + "check_acceptance", + "account_funding", + "quasi_cash_transaction", + "prepaid_activation_and_load", + ] + ] = None + """The type of transaction being authenticated. + + - `goods_service_purchase` - Purchase of goods or services. + - `check_acceptance` - Check acceptance. + - `account_funding` - Account funding. + - `quasi_cash_transaction` - Quasi-cash transaction. + - `prepaid_activation_and_load` - Prepaid activation and load. + """ + upcoming_card_payment_id: str """The identifier of the Card Payment this authentication attempt will belong to. From 6b1c3f84968b20434c9f15cbe2bca29ceace0013 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 6 Mar 2026 22:46:07 +0000 Subject: [PATCH 1183/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 ++++++ src/increase/types/real_time_decision.py | 6 ++++++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c9fd3761c..d3efbb574 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-946ad9479adebd282fe6122c780bc4d062ff9ce0e8794c74bd1ec4aa330aab04.yml -openapi_spec_hash: eb1f88706f7c87c9f72903c7a7c96026 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd0c83cac837fbe98857fa997663b0d0469344a7564bd4fe506e6c71d1d6af73.yml +openapi_spec_hash: 2352f37602105b164533038199b21804 config_hash: 890ca5fa6b8209d4eaac90550c7dc62c diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index f8f5e75c3..de29add58 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -441,6 +441,12 @@ class ElementCardAuthentication(BaseModel): purchase_amount: Optional[int] = None """The purchase amount in minor units.""" + purchase_amount_cardholder_estimated: Optional[int] = None + """ + The purchase amount in the cardholder's currency (i.e., USD) estimated using + daily conversion rates from the card network. + """ + purchase_currency: Optional[str] = None """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 9dd0cdee2..64c11f9b0 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -273,6 +273,12 @@ class CardAuthentication(BaseModel): purchase_amount: Optional[int] = None """The purchase amount in minor units.""" + purchase_amount_cardholder_estimated: Optional[int] = None + """ + The purchase amount in the cardholder's currency (i.e., USD) estimated using + daily conversion rates from the card network. + """ + purchase_currency: Optional[str] = None """ The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the From 38ea784b5554a674ff6a04e5a9cea5ac307839af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 7 Mar 2026 15:06:15 +0000 Subject: [PATCH 1184/1325] chore(internal): codegen related update --- .github/workflows/ci.yml | 8 ++++++-- tests/api_resources/test_files.py | 16 ++++++++-------- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 459c12817..084a05eda 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -61,14 +61,18 @@ jobs: run: rye build - name: Get GitHub OIDC Token - if: github.repository == 'stainless-sdks/increase-python' + if: |- + github.repository == 'stainless-sdks/increase-python' && + !startsWith(github.ref, 'refs/heads/stl/') id: github-oidc uses: actions/github-script@v8 with: script: core.setOutput('github_token', await core.getIDToken()); - name: Upload tarball - if: github.repository == 'stainless-sdks/increase-python' + if: |- + github.repository == 'stainless-sdks/increase-python' && + !startsWith(github.ref, 'refs/heads/stl/') env: URL: https://pkg.stainless.com/s AUTH: ${{ steps.github-oidc.outputs.github_token }} diff --git a/tests/api_resources/test_files.py b/tests/api_resources/test_files.py index e36671d6d..172094476 100644 --- a/tests/api_resources/test_files.py +++ b/tests/api_resources/test_files.py @@ -22,7 +22,7 @@ class TestFiles: @parametrize def test_method_create(self, client: Increase) -> None: file = client.files.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) assert_matches_type(File, file, path=["response"]) @@ -30,7 +30,7 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: file = client.files.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", description="x", ) @@ -39,7 +39,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.files.with_raw_response.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) @@ -51,7 +51,7 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.files.with_streaming_response.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) as response: assert not response.is_closed @@ -150,7 +150,7 @@ class TestAsyncFiles: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: file = await async_client.files.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) assert_matches_type(File, file, path=["response"]) @@ -158,7 +158,7 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: file = await async_client.files.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", description="x", ) @@ -167,7 +167,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.files.with_raw_response.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) @@ -179,7 +179,7 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.files.with_streaming_response.create( - file=b"raw file contents", + file=b"Example data", purpose="check_image_front", ) as response: assert not response.is_closed From d6922443674c5b91dfd8aacb8babb4e9d1f799ad Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 8 Mar 2026 00:08:13 +0000 Subject: [PATCH 1185/1325] feat(api): api update --- .stats.yml | 2 +- src/increase/resources/events.py | 10 ++++++---- tests/api_resources/test_events.py | 4 ++-- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/.stats.yml b/.stats.yml index d3efbb574..e4ce02b9a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd0c83cac837fbe98857fa997663b0d0469344a7564bd4fe506e6c71d1d6af73.yml openapi_spec_hash: 2352f37602105b164533038199b21804 -config_hash: 890ca5fa6b8209d4eaac90550c7dc62c +config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index d5f571eac..7638252be 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -146,11 +146,12 @@ def unwrap(self, payload: str, *, headers: Mapping[str, str], key: str | bytes | raise IncreaseError("You need to install `increase[webhooks]` to use this method") from exc if key is None: - key = self._client.webhook_secret - if key is None: + raw_key = self._client.webhook_secret + if raw_key is None: raise ValueError( "Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument" ) + key = raw_key.encode("utf-8") if not isinstance(headers, dict): headers = dict(headers) @@ -284,11 +285,12 @@ def unwrap(self, payload: str, *, headers: Mapping[str, str], key: str | bytes | raise IncreaseError("You need to install `increase[webhooks]` to use this method") from exc if key is None: - key = self._client.webhook_secret - if key is None: + raw_key = self._client.webhook_secret + if raw_key is None: raise ValueError( "Cannot verify a webhook without a key on either the client's webhook_secret or passed in as an argument" ) + key = raw_key.encode("utf-8") if not isinstance(headers, dict): headers = dict(headers) diff --git a/tests/api_resources/test_events.py b/tests/api_resources/test_events.py index 1dae1d93a..55aacb27c 100644 --- a/tests/api_resources/test_events.py +++ b/tests/api_resources/test_events.py @@ -103,7 +103,7 @@ def test_streaming_response_list(self, client: Increase) -> None: @pytest.mark.parametrize( "client_opt,method_opt", [ - ("whsec_c2VjcmV0Cg==", None), + ("secret\n", None), ("wrong", b"secret\n"), ("wrong", "whsec_c2VjcmV0Cg=="), (None, b"secret\n"), @@ -227,7 +227,7 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @pytest.mark.parametrize( "client_opt,method_opt", [ - ("whsec_c2VjcmV0Cg==", None), + ("secret\n", None), ("wrong", b"secret\n"), ("wrong", "whsec_c2VjcmV0Cg=="), (None, b"secret\n"), From 4bbf417294a77dd2d8ead14d603b3a8c9b6f9dec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sun, 8 Mar 2026 00:51:14 +0000 Subject: [PATCH 1186/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2b0c6a48f..a7230d955 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.423.0" + ".": "0.424.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ebddc924d..257e70f08 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.423.0" +version = "0.424.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 1a1e8d6a1..136fa3d00 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.423.0" # x-release-please-version +__version__ = "0.424.0" # x-release-please-version From be8d736d69bbc0e8438b8413882d84406c6a74c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:34:24 +0000 Subject: [PATCH 1187/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 8 ++++---- src/increase/types/real_time_decision.py | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.stats.yml b/.stats.yml index e4ce02b9a..b00a35aad 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-dd0c83cac837fbe98857fa997663b0d0469344a7564bd4fe506e6c71d1d6af73.yml -openapi_spec_hash: 2352f37602105b164533038199b21804 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6157ec57275bc58dca42adf9d0b661f6dcfd725df7593dc453833dfcdcf33a8b.yml +openapi_spec_hash: 0a80ae7882f3d72a333b80efe58ff5ea config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index de29add58..c5d170378 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -414,22 +414,22 @@ class ElementCardAuthentication(BaseModel): transaction. """ - merchant_acceptor_id: str + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. """ - merchant_category_code: str + merchant_category_code: Optional[str] = None """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. """ - merchant_country: str + merchant_country: Optional[str] = None """The country the merchant resides in.""" - merchant_name: str + merchant_name: Optional[str] = None """The name of the merchant.""" prior_card_authentication_id: Optional[str] = None diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 64c11f9b0..98af485b7 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -246,22 +246,22 @@ class CardAuthentication(BaseModel): transaction. """ - merchant_acceptor_id: str + merchant_acceptor_id: Optional[str] = None """ The merchant identifier (commonly abbreviated as MID) of the merchant the card is transacting with. """ - merchant_category_code: str + merchant_category_code: Optional[str] = None """ The Merchant Category Code (commonly abbreviated as MCC) of the merchant the card is transacting with. """ - merchant_country: str + merchant_country: Optional[str] = None """The country the merchant resides in.""" - merchant_name: str + merchant_name: Optional[str] = None """The name of the merchant.""" prior_card_authentication_id: Optional[str] = None From e71ae09b7046f8dc38d3467b0872b88aca0658b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:37:21 +0000 Subject: [PATCH 1188/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7230d955..92be4f76e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.424.0" + ".": "0.425.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 257e70f08..adaac381f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.424.0" +version = "0.425.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 136fa3d00..37ad28524 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.424.0" # x-release-please-version +__version__ = "0.425.0" # x-release-please-version From a194247296c0a1a9c03f7a397ce7cd4c844c407d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:00:06 +0000 Subject: [PATCH 1189/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 2 +- src/increase/types/real_time_decision.py | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index b00a35aad..aa5bad044 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6157ec57275bc58dca42adf9d0b661f6dcfd725df7593dc453833dfcdcf33a8b.yml -openapi_spec_hash: 0a80ae7882f3d72a333b80efe58ff5ea +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d73ee438cf15ca739d3ac64cc009b613f9e17ed76a31f8cc95f1a9968196bde1.yml +openapi_spec_hash: 933ce5facdc1d8a41ed063d925846de3 config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index c5d170378..bd077a266 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -432,7 +432,7 @@ class ElementCardAuthentication(BaseModel): merchant_name: Optional[str] = None """The name of the merchant.""" - prior_card_authentication_id: Optional[str] = None + prior_authenticated_card_payment_id: Optional[str] = None """ The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 98af485b7..ca552fbc9 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -264,7 +264,7 @@ class CardAuthentication(BaseModel): merchant_name: Optional[str] = None """The name of the merchant.""" - prior_card_authentication_id: Optional[str] = None + prior_authenticated_card_payment_id: Optional[str] = None """ The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. From 9f87d3c66c106b7c82d9a9b07cea17a5666c0019 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 21:03:13 +0000 Subject: [PATCH 1190/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 92be4f76e..304196ece 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.425.0" + ".": "0.426.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index adaac381f..d6c51e58c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.425.0" +version = "0.426.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 37ad28524..569add881 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.425.0" # x-release-please-version +__version__ = "0.426.0" # x-release-please-version From 1ac5ec822a8def77b6fff48ad431b5e965711a74 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:29:07 +0000 Subject: [PATCH 1191/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 108 ++++++++++++++--------- src/increase/types/real_time_decision.py | 108 ++++++++++++++--------- 3 files changed, 136 insertions(+), 84 deletions(-) diff --git a/.stats.yml b/.stats.yml index aa5bad044..40873533c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d73ee438cf15ca739d3ac64cc009b613f9e17ed76a31f8cc95f1a9968196bde1.yml -openapi_spec_hash: 933ce5facdc1d8a41ed063d925846de3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b42ffa447aa14da70d972676b1d5ad0c2720ff4e33a483037b2b1bb51190a69f.yml +openapi_spec_hash: f2a5c5e804880a8e8d13f5f32ca264a1 config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index bd077a266..22ce6f1db 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -17,6 +17,9 @@ "ElementCardAuthenticationDeviceChannel", "ElementCardAuthenticationDeviceChannelBrowser", "ElementCardAuthenticationDeviceChannelMerchantInitiated", + "ElementCardAuthenticationMessageCategory", + "ElementCardAuthenticationMessageCategoryNonPayment", + "ElementCardAuthenticationMessageCategoryPayment", "ElementCardAuthorization", "ElementCardAuthorizationAdditionalAmounts", "ElementCardAuthorizationAdditionalAmountsClinic", @@ -299,6 +302,67 @@ class ElementCardAuthenticationDeviceChannel(BaseModel): """Fields specific to merchant initiated transactions.""" +class ElementCardAuthenticationMessageCategoryNonPayment(BaseModel): + """Fields specific to non-payment authentication attempts.""" + + pass + + +class ElementCardAuthenticationMessageCategoryPayment(BaseModel): + """Fields specific to payment authentication attempts.""" + + purchase_amount: int + """The purchase amount in minor units.""" + + purchase_amount_cardholder_estimated: Optional[int] = None + """ + The purchase amount in the cardholder's currency (i.e., USD) estimated using + daily conversion rates from the card network. + """ + + purchase_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + authentication attempt's purchase currency. + """ + + transaction_type: Optional[ + Literal[ + "goods_service_purchase", + "check_acceptance", + "account_funding", + "quasi_cash_transaction", + "prepaid_activation_and_load", + ] + ] = None + """The type of transaction being authenticated. + + - `goods_service_purchase` - Purchase of goods or services. + - `check_acceptance` - Check acceptance. + - `account_funding` - Account funding. + - `quasi_cash_transaction` - Quasi-cash transaction. + - `prepaid_activation_and_load` - Prepaid activation and load. + """ + + +class ElementCardAuthenticationMessageCategory(BaseModel): + """The message category of the card authentication attempt.""" + + category: Literal["payment_authentication", "non_payment_authentication"] + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ + + non_payment: Optional[ElementCardAuthenticationMessageCategoryNonPayment] = None + """Fields specific to non-payment authentication attempts.""" + + payment: Optional[ElementCardAuthenticationMessageCategoryPayment] = None + """Fields specific to payment authentication attempts.""" + + class ElementCardAuthentication(BaseModel): """A Card Authentication object. @@ -368,14 +432,6 @@ class ElementCardAuthentication(BaseModel): cardholder_name: Optional[str] = None """The name of the cardholder.""" - category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None - """The category of the card authentication attempt. - - - `payment_authentication` - The authentication attempt is for a payment. - - `non_payment_authentication` - The authentication attempt is not for a - payment. - """ - challenge: Optional[ElementCardAuthenticationChallenge] = None """Details about the challenge, if one was requested.""" @@ -432,27 +488,15 @@ class ElementCardAuthentication(BaseModel): merchant_name: Optional[str] = None """The name of the merchant.""" + message_category: ElementCardAuthenticationMessageCategory + """The message category of the card authentication attempt.""" + prior_authenticated_card_payment_id: Optional[str] = None """ The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. """ - purchase_amount: Optional[int] = None - """The purchase amount in minor units.""" - - purchase_amount_cardholder_estimated: Optional[int] = None - """ - The purchase amount in the cardholder's currency (i.e., USD) estimated using - daily conversion rates from the card network. - """ - - purchase_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - authentication attempt's purchase currency. - """ - real_time_decision_id: Optional[str] = None """ The identifier of the Real-Time Decision sent to approve or decline this @@ -578,24 +622,6 @@ class ElementCardAuthentication(BaseModel): attempt for this transaction. """ - transaction_type: Optional[ - Literal[ - "goods_service_purchase", - "check_acceptance", - "account_funding", - "quasi_cash_transaction", - "prepaid_activation_and_load", - ] - ] = None - """The type of transaction being authenticated. - - - `goods_service_purchase` - Purchase of goods or services. - - `check_acceptance` - Check acceptance. - - `account_funding` - Account funding. - - `quasi_cash_transaction` - Quasi-cash transaction. - - `prepaid_activation_and_load` - Prepaid activation and load. - """ - type: Literal["card_authentication"] """A constant representing the object's type. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index ca552fbc9..59b05d2bf 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -14,6 +14,9 @@ "CardAuthenticationDeviceChannel", "CardAuthenticationDeviceChannelBrowser", "CardAuthenticationDeviceChannelMerchantInitiated", + "CardAuthenticationMessageCategory", + "CardAuthenticationMessageCategoryNonPayment", + "CardAuthenticationMessageCategoryPayment", "CardAuthenticationChallenge", "CardAuthorization", "CardAuthorizationAdditionalAmounts", @@ -157,6 +160,67 @@ class CardAuthenticationDeviceChannel(BaseModel): """Fields specific to merchant initiated transactions.""" +class CardAuthenticationMessageCategoryNonPayment(BaseModel): + """Fields specific to non-payment authentication attempts.""" + + pass + + +class CardAuthenticationMessageCategoryPayment(BaseModel): + """Fields specific to payment authentication attempts.""" + + purchase_amount: int + """The purchase amount in minor units.""" + + purchase_amount_cardholder_estimated: Optional[int] = None + """ + The purchase amount in the cardholder's currency (i.e., USD) estimated using + daily conversion rates from the card network. + """ + + purchase_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + authentication attempt's purchase currency. + """ + + transaction_type: Optional[ + Literal[ + "goods_service_purchase", + "check_acceptance", + "account_funding", + "quasi_cash_transaction", + "prepaid_activation_and_load", + ] + ] = None + """The type of transaction being authenticated. + + - `goods_service_purchase` - Purchase of goods or services. + - `check_acceptance` - Check acceptance. + - `account_funding` - Account funding. + - `quasi_cash_transaction` - Quasi-cash transaction. + - `prepaid_activation_and_load` - Prepaid activation and load. + """ + + +class CardAuthenticationMessageCategory(BaseModel): + """The message category of the card authentication attempt.""" + + category: Literal["payment_authentication", "non_payment_authentication"] + """The category of the card authentication attempt. + + - `payment_authentication` - The authentication attempt is for a payment. + - `non_payment_authentication` - The authentication attempt is not for a + payment. + """ + + non_payment: Optional[CardAuthenticationMessageCategoryNonPayment] = None + """Fields specific to non-payment authentication attempts.""" + + payment: Optional[CardAuthenticationMessageCategoryPayment] = None + """Fields specific to payment authentication attempts.""" + + class CardAuthentication(BaseModel): """Fields related to a 3DS authentication attempt.""" @@ -220,14 +284,6 @@ class CardAuthentication(BaseModel): cardholder_name: Optional[str] = None """The name of the cardholder.""" - category: Optional[Literal["payment_authentication", "non_payment_authentication"]] = None - """The category of the card authentication attempt. - - - `payment_authentication` - The authentication attempt is for a payment. - - `non_payment_authentication` - The authentication attempt is not for a - payment. - """ - decision: Optional[Literal["approve", "challenge", "deny"]] = None """Whether or not the authentication attempt was approved. @@ -264,27 +320,15 @@ class CardAuthentication(BaseModel): merchant_name: Optional[str] = None """The name of the merchant.""" + message_category: CardAuthenticationMessageCategory + """The message category of the card authentication attempt.""" + prior_authenticated_card_payment_id: Optional[str] = None """ The ID of a prior Card Authentication that the requestor used to authenticate this cardholder for a previous transaction. """ - purchase_amount: Optional[int] = None - """The purchase amount in minor units.""" - - purchase_amount_cardholder_estimated: Optional[int] = None - """ - The purchase amount in the cardholder's currency (i.e., USD) estimated using - daily conversion rates from the card network. - """ - - purchase_currency: Optional[str] = None - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - authentication attempt's purchase currency. - """ - requestor_authentication_indicator: Optional[ Literal[ "payment_transaction", @@ -376,24 +420,6 @@ class CardAuthentication(BaseModel): attempt for this transaction. """ - transaction_type: Optional[ - Literal[ - "goods_service_purchase", - "check_acceptance", - "account_funding", - "quasi_cash_transaction", - "prepaid_activation_and_load", - ] - ] = None - """The type of transaction being authenticated. - - - `goods_service_purchase` - Purchase of goods or services. - - `check_acceptance` - Check acceptance. - - `account_funding` - Account funding. - - `quasi_cash_transaction` - Quasi-cash transaction. - - `prepaid_activation_and_load` - Prepaid activation and load. - """ - upcoming_card_payment_id: str """The identifier of the Card Payment this authentication attempt will belong to. From d26f2689b32fe8e4e2a48ba16cc4c4243f0b8035 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 9 Mar 2026 22:32:01 +0000 Subject: [PATCH 1192/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 304196ece..35197252e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.426.0" + ".": "0.427.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d6c51e58c..1d3d70e9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.426.0" +version = "0.427.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 569add881..2a0086a33 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.426.0" # x-release-please-version +__version__ = "0.427.0" # x-release-please-version From 10fbe530bcc96653cabcb3ccb8f24a104fb21ca5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 04:02:38 +0000 Subject: [PATCH 1193/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 40873533c..51c8f0566 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 234 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b42ffa447aa14da70d972676b1d5ad0c2720ff4e33a483037b2b1bb51190a69f.yml -openapi_spec_hash: f2a5c5e804880a8e8d13f5f32ca264a1 +openapi_spec_hash: 0972cc54434c6c67218be04ab1ea1fc5 config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 From 741399e8b822305126906e6a5d3e04cf4eef325f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 22:49:44 +0000 Subject: [PATCH 1194/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 13 + src/increase/_client.py | 38 +++ src/increase/resources/__init__.py | 14 + src/increase/resources/beneficial_owners.py | 306 ++++++++++++++++++ src/increase/types/__init__.py | 2 + .../types/beneficial_owner_list_params.py | 32 ++ src/increase/types/entity.py | 109 +------ src/increase/types/entity_beneficial_owner.py | 125 +++++++ tests/api_resources/test_beneficial_owners.py | 187 +++++++++++ 10 files changed, 723 insertions(+), 111 deletions(-) create mode 100644 src/increase/resources/beneficial_owners.py create mode 100644 src/increase/types/beneficial_owner_list_params.py create mode 100644 src/increase/types/entity_beneficial_owner.py create mode 100644 tests/api_resources/test_beneficial_owners.py diff --git a/.stats.yml b/.stats.yml index 51c8f0566..9d5bfb4e6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 234 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b42ffa447aa14da70d972676b1d5ad0c2720ff4e33a483037b2b1bb51190a69f.yml -openapi_spec_hash: 0972cc54434c6c67218be04ab1ea1fc5 -config_hash: b7ec7f54fa76c1f8bde7a548710a1d38 +configured_endpoints: 236 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f46fe8b546ee1a4ad24918ef0803f48e6586e061d5445ae1aeb6abc7b8cf64a3.yml +openapi_spec_hash: 440b743a615d5ecc832affd6c3154809 +config_hash: dda988c5565c2f15cc708122984d7691 diff --git a/api.md b/api.md index 89352d53a..19a492711 100644 --- a/api.md +++ b/api.md @@ -505,6 +505,19 @@ Methods: - client.entities.create_beneficial_owner(entity_id, \*\*params) -> Entity - client.entities.update_beneficial_owner_address(entity_id, \*\*params) -> Entity +# BeneficialOwners + +Types: + +```python +from increase.types import EntityBeneficialOwner +``` + +Methods: + +- client.beneficial_owners.retrieve(entity_beneficial_owner_id) -> EntityBeneficialOwner +- client.beneficial_owners.list(\*\*params) -> SyncPage[EntityBeneficialOwner] + # SupplementalDocuments Types: diff --git a/src/increase/_client.py b/src/increase/_client.py index 78729401b..e6b53fe20 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -64,6 +64,7 @@ fednow_transfers, intrafi_balances, account_transfers, + beneficial_owners, external_accounts, oauth_connections, account_statements, @@ -121,6 +122,7 @@ from .resources.fednow_transfers import FednowTransfersResource, AsyncFednowTransfersResource from .resources.intrafi_balances import IntrafiBalancesResource, AsyncIntrafiBalancesResource from .resources.account_transfers import AccountTransfersResource, AsyncAccountTransfersResource + from .resources.beneficial_owners import BeneficialOwnersResource, AsyncBeneficialOwnersResource from .resources.external_accounts import ExternalAccountsResource, AsyncExternalAccountsResource from .resources.oauth_connections import OAuthConnectionsResource, AsyncOAuthConnectionsResource from .resources.account_statements import AccountStatementsResource, AsyncAccountStatementsResource @@ -478,6 +480,12 @@ def entities(self) -> EntitiesResource: return EntitiesResource(self) + @cached_property + def beneficial_owners(self) -> BeneficialOwnersResource: + from .resources.beneficial_owners import BeneficialOwnersResource + + return BeneficialOwnersResource(self) + @cached_property def supplemental_documents(self) -> SupplementalDocumentsResource: from .resources.supplemental_documents import SupplementalDocumentsResource @@ -1071,6 +1079,12 @@ def entities(self) -> AsyncEntitiesResource: return AsyncEntitiesResource(self) + @cached_property + def beneficial_owners(self) -> AsyncBeneficialOwnersResource: + from .resources.beneficial_owners import AsyncBeneficialOwnersResource + + return AsyncBeneficialOwnersResource(self) + @cached_property def supplemental_documents(self) -> AsyncSupplementalDocumentsResource: from .resources.supplemental_documents import AsyncSupplementalDocumentsResource @@ -1591,6 +1605,12 @@ def entities(self) -> entities.EntitiesResourceWithRawResponse: return EntitiesResourceWithRawResponse(self._client.entities) + @cached_property + def beneficial_owners(self) -> beneficial_owners.BeneficialOwnersResourceWithRawResponse: + from .resources.beneficial_owners import BeneficialOwnersResourceWithRawResponse + + return BeneficialOwnersResourceWithRawResponse(self._client.beneficial_owners) + @cached_property def supplemental_documents(self) -> supplemental_documents.SupplementalDocumentsResourceWithRawResponse: from .resources.supplemental_documents import SupplementalDocumentsResourceWithRawResponse @@ -1954,6 +1974,12 @@ def entities(self) -> entities.AsyncEntitiesResourceWithRawResponse: return AsyncEntitiesResourceWithRawResponse(self._client.entities) + @cached_property + def beneficial_owners(self) -> beneficial_owners.AsyncBeneficialOwnersResourceWithRawResponse: + from .resources.beneficial_owners import AsyncBeneficialOwnersResourceWithRawResponse + + return AsyncBeneficialOwnersResourceWithRawResponse(self._client.beneficial_owners) + @cached_property def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocumentsResourceWithRawResponse: from .resources.supplemental_documents import AsyncSupplementalDocumentsResourceWithRawResponse @@ -2317,6 +2343,12 @@ def entities(self) -> entities.EntitiesResourceWithStreamingResponse: return EntitiesResourceWithStreamingResponse(self._client.entities) + @cached_property + def beneficial_owners(self) -> beneficial_owners.BeneficialOwnersResourceWithStreamingResponse: + from .resources.beneficial_owners import BeneficialOwnersResourceWithStreamingResponse + + return BeneficialOwnersResourceWithStreamingResponse(self._client.beneficial_owners) + @cached_property def supplemental_documents(self) -> supplemental_documents.SupplementalDocumentsResourceWithStreamingResponse: from .resources.supplemental_documents import SupplementalDocumentsResourceWithStreamingResponse @@ -2686,6 +2718,12 @@ def entities(self) -> entities.AsyncEntitiesResourceWithStreamingResponse: return AsyncEntitiesResourceWithStreamingResponse(self._client.entities) + @cached_property + def beneficial_owners(self) -> beneficial_owners.AsyncBeneficialOwnersResourceWithStreamingResponse: + from .resources.beneficial_owners import AsyncBeneficialOwnersResourceWithStreamingResponse + + return AsyncBeneficialOwnersResourceWithStreamingResponse(self._client.beneficial_owners) + @cached_property def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocumentsResourceWithStreamingResponse: from .resources.supplemental_documents import AsyncSupplementalDocumentsResourceWithStreamingResponse diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index 7cc7c62cf..d62d8ae48 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -224,6 +224,14 @@ AccountTransfersResourceWithStreamingResponse, AsyncAccountTransfersResourceWithStreamingResponse, ) +from .beneficial_owners import ( + BeneficialOwnersResource, + AsyncBeneficialOwnersResource, + BeneficialOwnersResourceWithRawResponse, + AsyncBeneficialOwnersResourceWithRawResponse, + BeneficialOwnersResourceWithStreamingResponse, + AsyncBeneficialOwnersResourceWithStreamingResponse, +) from .external_accounts import ( ExternalAccountsResource, AsyncExternalAccountsResource, @@ -662,6 +670,12 @@ "AsyncEntitiesResourceWithRawResponse", "EntitiesResourceWithStreamingResponse", "AsyncEntitiesResourceWithStreamingResponse", + "BeneficialOwnersResource", + "AsyncBeneficialOwnersResource", + "BeneficialOwnersResourceWithRawResponse", + "AsyncBeneficialOwnersResourceWithRawResponse", + "BeneficialOwnersResourceWithStreamingResponse", + "AsyncBeneficialOwnersResourceWithStreamingResponse", "SupplementalDocumentsResource", "AsyncSupplementalDocumentsResource", "SupplementalDocumentsResourceWithRawResponse", diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py new file mode 100644 index 000000000..37f6eb07c --- /dev/null +++ b/src/increase/resources/beneficial_owners.py @@ -0,0 +1,306 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import beneficial_owner_list_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity_beneficial_owner import EntityBeneficialOwner + +__all__ = ["BeneficialOwnersResource", "AsyncBeneficialOwnersResource"] + + +class BeneficialOwnersResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> BeneficialOwnersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return BeneficialOwnersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> BeneficialOwnersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return BeneficialOwnersResourceWithStreamingResponse(self) + + def retrieve( + self, + entity_beneficial_owner_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EntityBeneficialOwner: + """ + Retrieve a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return self._get( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EntityBeneficialOwner, + ) + + def list( + self, + *, + entity_id: str, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[EntityBeneficialOwner]: + """ + List Beneficial Owners + + Args: + entity_id: The identifier of the Entity to list beneficial owners for. Only `corporation` + entities have beneficial owners. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/entity_beneficial_owners", + page=SyncPage[EntityBeneficialOwner], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "entity_id": entity_id, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + beneficial_owner_list_params.BeneficialOwnerListParams, + ), + ), + model=EntityBeneficialOwner, + ) + + +class AsyncBeneficialOwnersResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncBeneficialOwnersResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncBeneficialOwnersResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncBeneficialOwnersResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncBeneficialOwnersResourceWithStreamingResponse(self) + + async def retrieve( + self, + entity_beneficial_owner_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EntityBeneficialOwner: + """ + Retrieve a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to retrieve. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return await self._get( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EntityBeneficialOwner, + ) + + def list( + self, + *, + entity_id: str, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[EntityBeneficialOwner, AsyncPage[EntityBeneficialOwner]]: + """ + List Beneficial Owners + + Args: + entity_id: The identifier of the Entity to list beneficial owners for. Only `corporation` + entities have beneficial owners. + + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/entity_beneficial_owners", + page=AsyncPage[EntityBeneficialOwner], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "entity_id": entity_id, + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + }, + beneficial_owner_list_params.BeneficialOwnerListParams, + ), + ), + model=EntityBeneficialOwner, + ) + + +class BeneficialOwnersResourceWithRawResponse: + def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: + self._beneficial_owners = beneficial_owners + + self.retrieve = to_raw_response_wrapper( + beneficial_owners.retrieve, + ) + self.list = to_raw_response_wrapper( + beneficial_owners.list, + ) + + +class AsyncBeneficialOwnersResourceWithRawResponse: + def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: + self._beneficial_owners = beneficial_owners + + self.retrieve = async_to_raw_response_wrapper( + beneficial_owners.retrieve, + ) + self.list = async_to_raw_response_wrapper( + beneficial_owners.list, + ) + + +class BeneficialOwnersResourceWithStreamingResponse: + def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: + self._beneficial_owners = beneficial_owners + + self.retrieve = to_streamed_response_wrapper( + beneficial_owners.retrieve, + ) + self.list = to_streamed_response_wrapper( + beneficial_owners.list, + ) + + +class AsyncBeneficialOwnersResourceWithStreamingResponse: + def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: + self._beneficial_owners = beneficial_owners + + self.retrieve = async_to_streamed_response_wrapper( + beneficial_owners.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + beneficial_owners.list, + ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 3088a44b0..8fa2797be 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -76,6 +76,7 @@ from .card_token_list_params import CardTokenListParams as CardTokenListParams from .card_update_pin_params import CardUpdatePinParams as CardUpdatePinParams from .card_token_capabilities import CardTokenCapabilities as CardTokenCapabilities +from .entity_beneficial_owner import EntityBeneficialOwner as EntityBeneficialOwner from .file_link_create_params import FileLinkCreateParams as FileLinkCreateParams from .inbound_fednow_transfer import InboundFednowTransfer as InboundFednowTransfer from .transaction_list_params import TransactionListParams as TransactionListParams @@ -105,6 +106,7 @@ from .account_number_create_params import AccountNumberCreateParams as AccountNumberCreateParams from .account_number_update_params import AccountNumberUpdateParams as AccountNumberUpdateParams from .account_transfer_list_params import AccountTransferListParams as AccountTransferListParams +from .beneficial_owner_list_params import BeneficialOwnerListParams as BeneficialOwnerListParams from .card_dispute_withdraw_params import CardDisputeWithdrawParams as CardDisputeWithdrawParams from .check_transfer_create_params import CheckTransferCreateParams as CheckTransferCreateParams from .entity_supplemental_document import EntitySupplementalDocument as EntitySupplementalDocument diff --git a/src/increase/types/beneficial_owner_list_params.py b/src/increase/types/beneficial_owner_list_params.py new file mode 100644 index 000000000..362677638 --- /dev/null +++ b/src/increase/types/beneficial_owner_list_params.py @@ -0,0 +1,32 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["BeneficialOwnerListParams"] + + +class BeneficialOwnerListParams(TypedDict, total=False): + entity_id: Required[str] + """The identifier of the Entity to list beneficial owners for. + + Only `corporation` entities have beneficial owners. + """ + + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 4d4ff37db..6d02ce993 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -7,16 +7,13 @@ from pydantic import Field as FieldInfo from .._models import BaseModel +from .entity_beneficial_owner import EntityBeneficialOwner from .entity_supplemental_document import EntitySupplementalDocument __all__ = [ "Entity", "Corporation", "CorporationAddress", - "CorporationBeneficialOwner", - "CorporationBeneficialOwnerIndividual", - "CorporationBeneficialOwnerIndividualAddress", - "CorporationBeneficialOwnerIndividualIdentification", "GovernmentAuthority", "GovernmentAuthorityAddress", "GovernmentAuthorityAuthorizedPerson", @@ -64,108 +61,6 @@ class CorporationAddress(BaseModel): """The ZIP code of the address.""" -class CorporationBeneficialOwnerIndividualAddress(BaseModel): - """The person's address.""" - - city: Optional[str] = None - """The city, district, town, or village of the address.""" - - country: str - """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" - - line1: str - """The first line of the address.""" - - line2: Optional[str] = None - """The second line of the address.""" - - state: Optional[str] = None - """ - The two-letter United States Postal Service (USPS) abbreviation for the US - state, province, or region of the address. - """ - - zip: Optional[str] = None - """The ZIP or postal code of the address.""" - - -class CorporationBeneficialOwnerIndividualIdentification(BaseModel): - """A means of verifying the person's identity.""" - - method: Literal[ - "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" - ] - """A method that can be used to verify the individual's identity. - - - `social_security_number` - A social security number. - - `individual_taxpayer_identification_number` - An individual taxpayer - identification number (ITIN). - - `passport` - A passport number. - - `drivers_license` - A driver's license number. - - `other` - Another identifying document. - """ - - number_last4: str - """ - The last 4 digits of the identification number that can be used to verify the - individual's identity. - """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] - - -class CorporationBeneficialOwnerIndividual(BaseModel): - """Personal details for the beneficial owner.""" - - address: CorporationBeneficialOwnerIndividualAddress - """The person's address.""" - - date_of_birth: date - """The person's date of birth in YYYY-MM-DD format.""" - - identification: CorporationBeneficialOwnerIndividualIdentification - """A means of verifying the person's identity.""" - - name: str - """The person's legal name.""" - - -class CorporationBeneficialOwner(BaseModel): - id: str - """The identifier of this beneficial owner.""" - - company_title: Optional[str] = None - """This person's role or title within the entity.""" - - individual: CorporationBeneficialOwnerIndividual - """Personal details for the beneficial owner.""" - - prongs: List[Literal["ownership", "control"]] - """Why this person is considered a beneficial owner of the entity.""" - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] - - class Corporation(BaseModel): """Details of the corporation entity. @@ -175,7 +70,7 @@ class Corporation(BaseModel): address: CorporationAddress """The corporation's address.""" - beneficial_owners: List[CorporationBeneficialOwner] + beneficial_owners: List[EntityBeneficialOwner] """ The identifying details of anyone controlling or owning 25% or more of the corporation. diff --git a/src/increase/types/entity_beneficial_owner.py b/src/increase/types/entity_beneficial_owner.py new file mode 100644 index 000000000..86907ad5c --- /dev/null +++ b/src/increase/types/entity_beneficial_owner.py @@ -0,0 +1,125 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import TYPE_CHECKING, Dict, List, Optional +from datetime import date, datetime +from typing_extensions import Literal + +from pydantic import Field as FieldInfo + +from .._models import BaseModel + +__all__ = ["EntityBeneficialOwner", "Individual", "IndividualAddress", "IndividualIdentification"] + + +class IndividualAddress(BaseModel): + """The person's address.""" + + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + state: Optional[str] = None + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. + """ + + zip: Optional[str] = None + """The ZIP or postal code of the address.""" + + +class IndividualIdentification(BaseModel): + """A means of verifying the person's identity.""" + + method: Literal[ + "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" + ] + """A method that can be used to verify the individual's identity. + + - `social_security_number` - A social security number. + - `individual_taxpayer_identification_number` - An individual taxpayer + identification number (ITIN). + - `passport` - A passport number. + - `drivers_license` - A driver's license number. + - `other` - Another identifying document. + """ + + number_last4: str + """ + The last 4 digits of the identification number that can be used to verify the + individual's identity. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class Individual(BaseModel): + """Personal details for the beneficial owner.""" + + address: IndividualAddress + """The person's address.""" + + date_of_birth: date + """The person's date of birth in YYYY-MM-DD format.""" + + identification: IndividualIdentification + """A means of verifying the person's identity.""" + + name: str + """The person's legal name.""" + + +class EntityBeneficialOwner(BaseModel): + id: str + """The identifier of this beneficial owner.""" + + company_title: Optional[str] = None + """This person's role or title within the entity.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the + Beneficial Owner was created. + """ + + individual: Individual + """Personal details for the beneficial owner.""" + + prongs: List[Literal["ownership", "control"]] + """Why this person is considered a beneficial owner of the entity.""" + + type: Literal["entity_beneficial_owner"] + """A constant representing the object's type. + + For this resource it will always be `entity_beneficial_owner`. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py new file mode 100644 index 000000000..3edaf0632 --- /dev/null +++ b/tests/api_resources/test_beneficial_owners.py @@ -0,0 +1,187 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import EntityBeneficialOwner +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestBeneficialOwners: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.beneficial_owners.with_raw_response.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.beneficial_owners.with_streaming_response.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + client.beneficial_owners.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.list( + entity_id="entity_id", + ) + assert_matches_type(SyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.list( + entity_id="entity_id", + cursor="cursor", + idempotency_key="x", + limit=1, + ) + assert_matches_type(SyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.beneficial_owners.with_raw_response.list( + entity_id="entity_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(SyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.beneficial_owners.with_streaming_response.list( + entity_id="entity_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(SyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + +class TestAsyncBeneficialOwners: + 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: + beneficial_owner = await async_client.beneficial_owners.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.beneficial_owners.with_raw_response.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.beneficial_owners.with_streaming_response.retrieve( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + await async_client.beneficial_owners.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.list( + entity_id="entity_id", + ) + assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.list( + entity_id="entity_id", + cursor="cursor", + idempotency_key="x", + limit=1, + ) + assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.beneficial_owners.with_raw_response.list( + entity_id="entity_id", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = await response.parse() + assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.beneficial_owners.with_streaming_response.list( + entity_id="entity_id", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True From e832430e40df48e78e967968a0a39833cff08e20 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 22:52:45 +0000 Subject: [PATCH 1195/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 35197252e..1e57fdcd3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.427.0" + ".": "0.428.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1d3d70e9b..f122fca62 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.427.0" +version = "0.428.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2a0086a33..0a300c97a 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.427.0" # x-release-please-version +__version__ = "0.428.0" # x-release-please-version From 825f49ad0a07d3ccb7631b181661615ca22d45af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 23:56:50 +0000 Subject: [PATCH 1196/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/simulations/card_tokens.py | 8 + .../simulations/card_token_create_params.py | 144 +++++++++++++++++- .../simulations/test_card_tokens.py | 8 + 4 files changed, 161 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9d5bfb4e6..aefb489f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f46fe8b546ee1a4ad24918ef0803f48e6586e061d5445ae1aeb6abc7b8cf64a3.yml -openapi_spec_hash: 440b743a615d5ecc832affd6c3154809 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4699565aad7b519933c0f8789762574139b2ca7ad57c008b747eebe6a3f91eec.yml +openapi_spec_hash: 3c7cf6b8f8d59763cbdac549682f61c3 config_hash: dda988c5565c2f15cc708122984d7691 diff --git a/src/increase/resources/simulations/card_tokens.py b/src/increase/resources/simulations/card_tokens.py index 3b1febad3..758640cdc 100644 --- a/src/increase/resources/simulations/card_tokens.py +++ b/src/increase/resources/simulations/card_tokens.py @@ -50,6 +50,7 @@ def create( capabilities: Iterable[card_token_create_params.Capability] | Omit = omit, expiration: Union[str, date] | Omit = omit, last4: str | Omit = omit, + outcome: card_token_create_params.Outcome | Omit = omit, prefix: str | Omit = omit, primary_account_number_length: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -70,6 +71,8 @@ def create( last4: The last 4 digits of the card number. + outcome: The outcome to simulate for card push transfers using this token. + prefix: The prefix of the card number, usually the first 8 digits. primary_account_number_length: The total length of the card number, including prefix and last4. @@ -91,6 +94,7 @@ def create( "capabilities": capabilities, "expiration": expiration, "last4": last4, + "outcome": outcome, "prefix": prefix, "primary_account_number_length": primary_account_number_length, }, @@ -133,6 +137,7 @@ async def create( capabilities: Iterable[card_token_create_params.Capability] | Omit = omit, expiration: Union[str, date] | Omit = omit, last4: str | Omit = omit, + outcome: card_token_create_params.Outcome | Omit = omit, prefix: str | Omit = omit, primary_account_number_length: int | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -153,6 +158,8 @@ async def create( last4: The last 4 digits of the card number. + outcome: The outcome to simulate for card push transfers using this token. + prefix: The prefix of the card number, usually the first 8 digits. primary_account_number_length: The total length of the card number, including prefix and last4. @@ -174,6 +181,7 @@ async def create( "capabilities": capabilities, "expiration": expiration, "last4": last4, + "outcome": outcome, "prefix": prefix, "primary_account_number_length": primary_account_number_length, }, diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py index f1272e9a6..9cd6986db 100644 --- a/src/increase/types/simulations/card_token_create_params.py +++ b/src/increase/types/simulations/card_token_create_params.py @@ -8,7 +8,7 @@ from ..._utils import PropertyInfo -__all__ = ["CardTokenCreateParams", "Capability"] +__all__ = ["CardTokenCreateParams", "Capability", "Outcome", "OutcomeDecline"] class CardTokenCreateParams(TypedDict, total=False): @@ -21,6 +21,9 @@ class CardTokenCreateParams(TypedDict, total=False): last4: str """The last 4 digits of the card number.""" + outcome: Outcome + """The outcome to simulate for card push transfers using this token.""" + prefix: str """The prefix of the card number, usually the first 8 digits.""" @@ -49,3 +52,142 @@ class Capability(TypedDict, total=False): - `visa` - Visa and Interlink - `mastercard` - Mastercard and Maestro """ + + +class OutcomeDecline(TypedDict, total=False): + """If the result is declined, the details of the decline.""" + + reason: Literal[ + "do_not_honor", + "activity_count_limit_exceeded", + "refer_to_card_issuer", + "refer_to_card_issuer_special_condition", + "invalid_merchant", + "pick_up_card", + "error", + "pick_up_card_special", + "invalid_transaction", + "invalid_amount", + "invalid_account_number", + "no_such_issuer", + "re_enter_transaction", + "no_credit_account", + "pick_up_card_lost", + "pick_up_card_stolen", + "closed_account", + "insufficient_funds", + "no_checking_account", + "no_savings_account", + "expired_card", + "transaction_not_permitted_to_cardholder", + "transaction_not_allowed_at_terminal", + "suspected_fraud", + "activity_amount_limit_exceeded", + "restricted_card", + "security_violation", + "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_first_use", + "credit_issuer_unavailable", + "negative_card_verification_value_results", + "issuer_unavailable", + "financial_institution_cannot_be_found", + "transaction_cannot_be_completed", + "duplicate_transaction", + "system_malfunction", + "additional_customer_authentication_required", + "surcharge_amount_not_permitted", + "decline_for_cvv2_failure", + "stop_payment_order", + "revocation_of_authorization_order", + "revocation_of_all_authorizations_order", + ] + """The reason for the decline. + + - `do_not_honor` - The card issuer has declined the transaction without + providing a specific reason. + - `activity_count_limit_exceeded` - The number of transactions for the card has + exceeded the limit set by the issuer. + - `refer_to_card_issuer` - The card issuer requires the cardholder to contact + them for further information regarding the transaction. + - `refer_to_card_issuer_special_condition` - The card issuer requires the + cardholder to contact them due to a special condition related to the + transaction. + - `invalid_merchant` - The merchant is not valid for this transaction. + - `pick_up_card` - The card should be retained by the terminal. + - `error` - An error occurred during processing of the transaction. + - `pick_up_card_special` - The card should be retained by the terminal due to a + special condition. + - `invalid_transaction` - The transaction is invalid and cannot be processed. + - `invalid_amount` - The amount of the transaction is invalid. + - `invalid_account_number` - The account number provided is invalid. + - `no_such_issuer` - The issuer of the card could not be found. + - `re_enter_transaction` - The transaction should be re-entered for processing. + - `no_credit_account` - There is no credit account associated with the card. + - `pick_up_card_lost` - The card should be retained by the terminal because it + has been reported lost. + - `pick_up_card_stolen` - The card should be retained by the terminal because it + has been reported stolen. + - `closed_account` - The account associated with the card has been closed. + - `insufficient_funds` - There are insufficient funds in the account to complete + the transaction. + - `no_checking_account` - There is no checking account associated with the card. + - `no_savings_account` - There is no savings account associated with the card. + - `expired_card` - The card has expired and cannot be used for transactions. + - `transaction_not_permitted_to_cardholder` - The transaction is not permitted + for this cardholder. + - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this + terminal. + - `suspected_fraud` - The transaction has been flagged as suspected fraud and + cannot be processed. + - `activity_amount_limit_exceeded` - The amount of activity on the card has + exceeded the limit set by the issuer. + - `restricted_card` - The card has restrictions that prevent it from being used + for this transaction. + - `security_violation` - A security violation has occurred, preventing the + transaction from being processed. + - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The + transaction does not meet the anti-money laundering requirements set by the + issuer. + - `blocked_first_use` - The first use of the card has been blocked by the + issuer. + - `credit_issuer_unavailable` - The credit issuer is currently unavailable to + process the transaction. + - `negative_card_verification_value_results` - The card verification value (CVV) + results were negative, indicating a potential issue with the card. + - `issuer_unavailable` - The issuer of the card is currently unavailable to + process the transaction. + - `financial_institution_cannot_be_found` - The financial institution associated + with the card could not be found. + - `transaction_cannot_be_completed` - The transaction cannot be completed due to + an unspecified reason. + - `duplicate_transaction` - The transaction is a duplicate of a previous + transaction and cannot be processed again. + - `system_malfunction` - A system malfunction occurred, preventing the + transaction from being processed. + - `additional_customer_authentication_required` - Additional customer + authentication is required to complete the transaction. + - `surcharge_amount_not_permitted` - The surcharge amount applied to the + transaction is not permitted by the issuer. + - `decline_for_cvv2_failure` - The transaction was declined due to a failure in + verifying the CVV2 code. + - `stop_payment_order` - A stop payment order has been placed on this + transaction. + - `revocation_of_authorization_order` - An order has been placed to revoke + authorization for this transaction. + - `revocation_of_all_authorizations_order` - An order has been placed to revoke + all authorizations for this cardholder. + """ + + +class Outcome(TypedDict, total=False): + """The outcome to simulate for card push transfers using this token.""" + + result: Required[Literal["approve", "decline"]] + """Whether card push transfers or validations will be approved or declined. + + - `approve` - Any card push transfers or validations will be approved. + - `decline` - Any card push transfers or validations will be declined. + """ + + decline: OutcomeDecline + """If the result is declined, the details of the decline.""" diff --git a/tests/api_resources/simulations/test_card_tokens.py b/tests/api_resources/simulations/test_card_tokens.py index 9294cf3e1..0dec7014f 100644 --- a/tests/api_resources/simulations/test_card_tokens.py +++ b/tests/api_resources/simulations/test_card_tokens.py @@ -35,6 +35,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: ], expiration=parse_date("2019-12-27"), last4="1234", + outcome={ + "result": "approve", + "decline": {"reason": "do_not_honor"}, + }, prefix="41234567", primary_account_number_length=16, ) @@ -83,6 +87,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) ], expiration=parse_date("2019-12-27"), last4="1234", + outcome={ + "result": "approve", + "decline": {"reason": "do_not_honor"}, + }, prefix="41234567", primary_account_number_length=16, ) From 9bf792ae213fa9980aed81804323385569d6fbc1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 10 Mar 2026 23:59:51 +0000 Subject: [PATCH 1197/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1e57fdcd3..4ac437f1c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.428.0" + ".": "0.429.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f122fca62..113277585 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.428.0" +version = "0.429.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 0a300c97a..6214cb392 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.428.0" # x-release-please-version +__version__ = "0.429.0" # x-release-please-version From e3c1378a87930468748bd95871b4cde368f661eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 04:04:56 +0000 Subject: [PATCH 1198/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index aefb489f8..61c2836eb 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4699565aad7b519933c0f8789762574139b2ca7ad57c008b747eebe6a3f91eec.yml -openapi_spec_hash: 3c7cf6b8f8d59763cbdac549682f61c3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-010fcebf036b735c59221760be7726699913ed68102323b49939ddd880a12e32.yml +openapi_spec_hash: 92d7bc1bf2f3034735206e358249ba5c config_hash: dda988c5565c2f15cc708122984d7691 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 22ce6f1db..5df6a9eb6 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -197,6 +197,9 @@ class ElementCardAuthenticationChallenge(BaseModel): one_time_code: str """The one-time code used for the Card Authentication Challenge.""" + real_time_decision_id: Optional[str] = None + """The identifier of the Real-Time Decision used to deliver this challenge.""" + verification_method: Literal["text_message", "email", "none_available"] """The method used to verify the Card Authentication Challenge. From 27a32257eae9a1668a12f44ca08f1a28a2e3cbc7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 04:08:04 +0000 Subject: [PATCH 1199/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4ac437f1c..98af54b20 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.429.0" + ".": "0.430.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 113277585..d57e2fa90 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.429.0" +version = "0.430.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6214cb392..f8545a5e0 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.429.0" # x-release-please-version +__version__ = "0.430.0" # x-release-please-version From 8500aede66d42ba4a2e8ac8f0e664769f9a926eb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 19:29:06 +0000 Subject: [PATCH 1200/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/beneficial_owners.py | 116 +++++++++++++++++- src/increase/types/__init__.py | 1 + .../types/beneficial_owner_update_params.py | 43 +++++++ tests/api_resources/test_beneficial_owners.py | 110 +++++++++++++++++ 6 files changed, 273 insertions(+), 6 deletions(-) create mode 100644 src/increase/types/beneficial_owner_update_params.py diff --git a/.stats.yml b/.stats.yml index 61c2836eb..ec36c3af0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-010fcebf036b735c59221760be7726699913ed68102323b49939ddd880a12e32.yml -openapi_spec_hash: 92d7bc1bf2f3034735206e358249ba5c -config_hash: dda988c5565c2f15cc708122984d7691 +configured_endpoints: 237 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-defae23482710e9c09a4a09f19b5de303c58f4b3ffd937c6dfafacb4124f4378.yml +openapi_spec_hash: f1404bbd3ac5cbd9cfb952f3c65bb406 +config_hash: 896b006f9647a513eda3b228cf17c199 diff --git a/api.md b/api.md index 19a492711..6a8ad2a2a 100644 --- a/api.md +++ b/api.md @@ -516,6 +516,7 @@ from increase.types import EntityBeneficialOwner Methods: - client.beneficial_owners.retrieve(entity_beneficial_owner_id) -> EntityBeneficialOwner +- client.beneficial_owners.update(entity_beneficial_owner_id, \*\*params) -> EntityBeneficialOwner - client.beneficial_owners.list(\*\*params) -> SyncPage[EntityBeneficialOwner] # SupplementalDocuments diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index 37f6eb07c..8bed8ef83 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -4,9 +4,9 @@ import httpx -from ..types import beneficial_owner_list_params +from ..types import beneficial_owner_list_params, beneficial_owner_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -79,6 +79,55 @@ def retrieve( cast_to=EntityBeneficialOwner, ) + def update( + self, + entity_beneficial_owner_id: str, + *, + address: beneficial_owner_update_params.Address | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Update a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to update. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return self._patch( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + body=maybe_transform({"address": address}, beneficial_owner_update_params.BeneficialOwnerUpdateParams), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + def list( self, *, @@ -197,6 +246,57 @@ async def retrieve( cast_to=EntityBeneficialOwner, ) + async def update( + self, + entity_beneficial_owner_id: str, + *, + address: beneficial_owner_update_params.Address | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Update a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to update. + + address: The individual's physical address. Mail receiving locations like PO Boxes and + PMB's are disallowed. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return await self._patch( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + body=await async_maybe_transform( + {"address": address}, beneficial_owner_update_params.BeneficialOwnerUpdateParams + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + def list( self, *, @@ -265,6 +365,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self.retrieve = to_raw_response_wrapper( beneficial_owners.retrieve, ) + self.update = to_raw_response_wrapper( + beneficial_owners.update, + ) self.list = to_raw_response_wrapper( beneficial_owners.list, ) @@ -277,6 +380,9 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self.retrieve = async_to_raw_response_wrapper( beneficial_owners.retrieve, ) + self.update = async_to_raw_response_wrapper( + beneficial_owners.update, + ) self.list = async_to_raw_response_wrapper( beneficial_owners.list, ) @@ -289,6 +395,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self.retrieve = to_streamed_response_wrapper( beneficial_owners.retrieve, ) + self.update = to_streamed_response_wrapper( + beneficial_owners.update, + ) self.list = to_streamed_response_wrapper( beneficial_owners.list, ) @@ -301,6 +410,9 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self.retrieve = async_to_streamed_response_wrapper( beneficial_owners.retrieve, ) + self.update = async_to_streamed_response_wrapper( + beneficial_owners.update, + ) self.list = async_to_streamed_response_wrapper( beneficial_owners.list, ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 8fa2797be..654a67726 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -123,6 +123,7 @@ from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams +from .beneficial_owner_update_params import BeneficialOwnerUpdateParams as BeneficialOwnerUpdateParams from .card_push_transfer_list_params import CardPushTransferListParams as CardPushTransferListParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams from .external_account_create_params import ExternalAccountCreateParams as ExternalAccountCreateParams diff --git a/src/increase/types/beneficial_owner_update_params.py b/src/increase/types/beneficial_owner_update_params.py new file mode 100644 index 000000000..62ebcd51a --- /dev/null +++ b/src/increase/types/beneficial_owner_update_params.py @@ -0,0 +1,43 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["BeneficialOwnerUpdateParams", "Address"] + + +class BeneficialOwnerUpdateParams(TypedDict, total=False): + address: Address + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + + +class Address(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + + city: Required[str] + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. + """ + + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index 3edaf0632..e1c3bbcb5 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -58,6 +58,61 @@ def test_path_params_retrieve(self, client: Increase) -> None: "", ) + @parametrize + def test_method_update(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_method_update_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_update(self, client: Increase) -> None: + response = client.beneficial_owners.with_raw_response.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_update(self, client: Increase) -> None: + with client.beneficial_owners.with_streaming_response.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_update(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + client.beneficial_owners.with_raw_response.update( + entity_beneficial_owner_id="", + ) + @parametrize def test_method_list(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.list( @@ -145,6 +200,61 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: "", ) + @parametrize + async def test_method_update(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + address={ + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "Unit 2", + "state": "NY", + "zip": "10045", + }, + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: + response = await async_client.beneficial_owners.with_raw_response.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: + async with async_client.beneficial_owners.with_streaming_response.update( + entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_update(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + await async_client.beneficial_owners.with_raw_response.update( + entity_beneficial_owner_id="", + ) + @parametrize async def test_method_list(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.list( From 7aa36230b06d51ac86862452be975aabbe948ce5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 19:32:10 +0000 Subject: [PATCH 1201/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 98af54b20..32ac2e3af 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.430.0" + ".": "0.431.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index d57e2fa90..55f910931 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.430.0" +version = "0.431.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f8545a5e0..5159786e5 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.430.0" # x-release-please-version +__version__ = "0.431.0" # x-release-please-version From f4a7c33b02137feb81631db582a89eaaf7bd95c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:42:04 +0000 Subject: [PATCH 1202/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/beneficial_owners.py | 34 ++++- .../types/beneficial_owner_update_params.py | 139 +++++++++++++++++- tests/api_resources/test_beneficial_owners.py | 47 ++++++ 4 files changed, 218 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index ec36c3af0..47e153f66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 237 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-defae23482710e9c09a4a09f19b5de303c58f4b3ffd937c6dfafacb4124f4378.yml -openapi_spec_hash: f1404bbd3ac5cbd9cfb952f3c65bb406 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aceacff825bf677100a4d4554b2b3dad7ba442bbe26bc7f18b4153c54c3624e8.yml +openapi_spec_hash: 7fa7a382bd4d1db423b5345a8535d23b config_hash: 896b006f9647a513eda3b228cf17c199 diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index 8bed8ef83..231fe2970 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -84,6 +84,8 @@ def update( entity_beneficial_owner_id: str, *, address: beneficial_owner_update_params.Address | Omit = omit, + confirmed_no_us_tax_id: bool | Omit = omit, + identification: beneficial_owner_update_params.Identification | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -101,6 +103,13 @@ def update( address: The individual's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. + confirmed_no_us_tax_id: The identification method for an individual can only be a passport, driver's + license, or other document if you've confirmed the individual does not have a US + tax id (either a Social Security Number or Individual Taxpayer Identification + Number). + + identification: A means of verifying the person's identity. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -117,7 +126,14 @@ def update( ) return self._patch( f"/entity_beneficial_owners/{entity_beneficial_owner_id}", - body=maybe_transform({"address": address}, beneficial_owner_update_params.BeneficialOwnerUpdateParams), + body=maybe_transform( + { + "address": address, + "confirmed_no_us_tax_id": confirmed_no_us_tax_id, + "identification": identification, + }, + beneficial_owner_update_params.BeneficialOwnerUpdateParams, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -251,6 +267,8 @@ async def update( entity_beneficial_owner_id: str, *, address: beneficial_owner_update_params.Address | Omit = omit, + confirmed_no_us_tax_id: bool | Omit = omit, + identification: beneficial_owner_update_params.Identification | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -268,6 +286,13 @@ async def update( address: The individual's physical address. Mail receiving locations like PO Boxes and PMB's are disallowed. + confirmed_no_us_tax_id: The identification method for an individual can only be a passport, driver's + license, or other document if you've confirmed the individual does not have a US + tax id (either a Social Security Number or Individual Taxpayer Identification + Number). + + identification: A means of verifying the person's identity. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -285,7 +310,12 @@ async def update( return await self._patch( f"/entity_beneficial_owners/{entity_beneficial_owner_id}", body=await async_maybe_transform( - {"address": address}, beneficial_owner_update_params.BeneficialOwnerUpdateParams + { + "address": address, + "confirmed_no_us_tax_id": confirmed_no_us_tax_id, + "identification": identification, + }, + beneficial_owner_update_params.BeneficialOwnerUpdateParams, ), options=make_request_options( extra_headers=extra_headers, diff --git a/src/increase/types/beneficial_owner_update_params.py b/src/increase/types/beneficial_owner_update_params.py index 62ebcd51a..8fcdd5947 100644 --- a/src/increase/types/beneficial_owner_update_params.py +++ b/src/increase/types/beneficial_owner_update_params.py @@ -2,9 +2,20 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing import Union +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict -__all__ = ["BeneficialOwnerUpdateParams", "Address"] +from .._utils import PropertyInfo + +__all__ = [ + "BeneficialOwnerUpdateParams", + "Address", + "Identification", + "IdentificationDriversLicense", + "IdentificationOther", + "IdentificationPassport", +] class BeneficialOwnerUpdateParams(TypedDict, total=False): @@ -14,6 +25,17 @@ class BeneficialOwnerUpdateParams(TypedDict, total=False): Mail receiving locations like PO Boxes and PMB's are disallowed. """ + confirmed_no_us_tax_id: bool + """ + The identification method for an individual can only be a passport, driver's + license, or other document if you've confirmed the individual does not have a US + tax id (either a Social Security Number or Individual Taxpayer Identification + Number). + """ + + identification: Identification + """A means of verifying the person's identity.""" + class Address(TypedDict, total=False): """The individual's physical address. @@ -41,3 +63,116 @@ class Address(TypedDict, total=False): zip: str """The ZIP or postal code of the address. Required in certain countries.""" + + +class IdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The driver's license's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the front of the driver's license.""" + + state: Required[str] + """The state that issued the provided driver's license.""" + + back_file_id: str + """The identifier of the File containing the back of the driver's license.""" + + +class IdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + + country: Required[str] + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ + + description: Required[str] + """A description of the document submitted.""" + + file_id: Required[str] + """The identifier of the File containing the front of the document.""" + + back_file_id: str + """The identifier of the File containing the back of the document. + + Not every document has a reverse side. + """ + + expiration_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The document's expiration date in YYYY-MM-DD format.""" + + +class IdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + + country: Required[str] + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ + + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The passport's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the passport.""" + + +class Identification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] + """A means of verifying the person's identity.""" + + method: Required[ + Literal[ + "social_security_number", + "individual_taxpayer_identification_number", + "passport", + "drivers_license", + "other", + ] + ] + """A method that can be used to verify the individual's identity. + + - `social_security_number` - A social security number. + - `individual_taxpayer_identification_number` - An individual taxpayer + identification number (ITIN). + - `passport` - A passport number. + - `drivers_license` - A driver's license number. + - `other` - Another identifying document. + """ + + number: Required[str] + """ + An identification number that can be used to verify the individual's identity, + such as a social security number. + """ + + drivers_license: IdentificationDriversLicense + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + + other: IdentificationOther + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + + passport: IdentificationPassport + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index e1c3bbcb5..332b14f61 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -10,6 +10,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type from increase.types import EntityBeneficialOwner +from increase._utils import parse_date from increase.pagination import SyncPage, AsyncPage base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") @@ -77,6 +78,29 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "state": "NY", "zip": "10045", }, + confirmed_no_us_tax_id=True, + identification={ + "method": "social_security_number", + "number": "xxxx", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @@ -219,6 +243,29 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "state": "NY", "zip": "10045", }, + confirmed_no_us_tax_id=True, + identification={ + "method": "social_security_number", + "number": "xxxx", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) From 83d0b1e7fa1017178b2322877cdd5adba4e9feaf Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 11 Mar 2026 22:45:11 +0000 Subject: [PATCH 1203/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 32ac2e3af..7478ed0a4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.431.0" + ".": "0.432.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 55f910931..e30cede6d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.431.0" +version = "0.432.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5159786e5..177568140 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.431.0" # x-release-please-version +__version__ = "0.432.0" # x-release-please-version From 1caf9e902cba48d60f7cf3d5cb0b290c80186429 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 00:31:24 +0000 Subject: [PATCH 1204/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/beneficial_owners.py | 8 ++++++++ src/increase/types/beneficial_owner_update_params.py | 3 +++ tests/api_resources/test_beneficial_owners.py | 2 ++ 4 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 47e153f66..84bf4fe96 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 237 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-aceacff825bf677100a4d4554b2b3dad7ba442bbe26bc7f18b4153c54c3624e8.yml -openapi_spec_hash: 7fa7a382bd4d1db423b5345a8535d23b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a8ae6b4ff6276a68a103dca4c701c77d409afe3f08ef8435adb3527e1385ce7.yml +openapi_spec_hash: d56da3ae77306aec4c8530fba0dfe053 config_hash: 896b006f9647a513eda3b228cf17c199 diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index 231fe2970..b07ff2d35 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -86,6 +86,7 @@ def update( address: beneficial_owner_update_params.Address | Omit = omit, confirmed_no_us_tax_id: bool | Omit = omit, identification: beneficial_owner_update_params.Identification | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -110,6 +111,8 @@ def update( identification: A means of verifying the person's identity. + name: The individual's legal name. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -131,6 +134,7 @@ def update( "address": address, "confirmed_no_us_tax_id": confirmed_no_us_tax_id, "identification": identification, + "name": name, }, beneficial_owner_update_params.BeneficialOwnerUpdateParams, ), @@ -269,6 +273,7 @@ async def update( address: beneficial_owner_update_params.Address | Omit = omit, confirmed_no_us_tax_id: bool | Omit = omit, identification: beneficial_owner_update_params.Identification | Omit = omit, + name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -293,6 +298,8 @@ async def update( identification: A means of verifying the person's identity. + name: The individual's legal name. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -314,6 +321,7 @@ async def update( "address": address, "confirmed_no_us_tax_id": confirmed_no_us_tax_id, "identification": identification, + "name": name, }, beneficial_owner_update_params.BeneficialOwnerUpdateParams, ), diff --git a/src/increase/types/beneficial_owner_update_params.py b/src/increase/types/beneficial_owner_update_params.py index 8fcdd5947..5312d8745 100644 --- a/src/increase/types/beneficial_owner_update_params.py +++ b/src/increase/types/beneficial_owner_update_params.py @@ -36,6 +36,9 @@ class BeneficialOwnerUpdateParams(TypedDict, total=False): identification: Identification """A means of verifying the person's identity.""" + name: str + """The individual's legal name.""" + class Address(TypedDict, total=False): """The individual's physical address. diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index 332b14f61..bc5d7ce58 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -101,6 +101,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "file_id": "file_id", }, }, + name="x", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @@ -266,6 +267,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "file_id": "file_id", }, }, + name="x", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) From 8f681a88a699135513f1587ebe09ff6ffca9566d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 00:34:19 +0000 Subject: [PATCH 1205/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7478ed0a4..1fc30e855 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.432.0" + ".": "0.433.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e30cede6d..190622430 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.432.0" +version = "0.433.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 177568140..ddf98129d 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.432.0" # x-release-please-version +__version__ = "0.433.0" # x-release-please-version From ddc76ef2528f40419f53ff969afeaeff49f99696 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 00:56:54 +0000 Subject: [PATCH 1206/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/beneficial_owners.py | 100 ++++++++++++++++++ tests/api_resources/test_beneficial_owners.py | 80 ++++++++++++++ 4 files changed, 185 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 84bf4fe96..2c77a37fa 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 237 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1a8ae6b4ff6276a68a103dca4c701c77d409afe3f08ef8435adb3527e1385ce7.yml -openapi_spec_hash: d56da3ae77306aec4c8530fba0dfe053 -config_hash: 896b006f9647a513eda3b228cf17c199 +configured_endpoints: 238 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ce680832c1cad08fe72f9d4b9df37379affbe88f539448d991039474dce6674.yml +openapi_spec_hash: 5d9c89c10f5987dc5596134d1f2c1668 +config_hash: e75db3094e90d5e48a2077b010b620f0 diff --git a/api.md b/api.md index 6a8ad2a2a..f0601bac8 100644 --- a/api.md +++ b/api.md @@ -518,6 +518,7 @@ Methods: - client.beneficial_owners.retrieve(entity_beneficial_owner_id) -> EntityBeneficialOwner - client.beneficial_owners.update(entity_beneficial_owner_id, \*\*params) -> EntityBeneficialOwner - client.beneficial_owners.list(\*\*params) -> SyncPage[EntityBeneficialOwner] +- client.beneficial_owners.archive(entity_beneficial_owner_id) -> EntityBeneficialOwner # SupplementalDocuments diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index b07ff2d35..0ad56c1c6 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -208,6 +208,50 @@ def list( model=EntityBeneficialOwner, ) + def archive( + self, + entity_beneficial_owner_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Archive a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to archive. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return self._post( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + class AsyncBeneficialOwnersResource(AsyncAPIResource): @cached_property @@ -395,6 +439,50 @@ def list( model=EntityBeneficialOwner, ) + async def archive( + self, + entity_beneficial_owner_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Archive a Beneficial Owner + + Args: + entity_beneficial_owner_id: The identifier of the Beneficial Owner to archive. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_beneficial_owner_id: + raise ValueError( + f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" + ) + return await self._post( + f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + class BeneficialOwnersResourceWithRawResponse: def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: @@ -409,6 +497,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self.list = to_raw_response_wrapper( beneficial_owners.list, ) + self.archive = to_raw_response_wrapper( + beneficial_owners.archive, + ) class AsyncBeneficialOwnersResourceWithRawResponse: @@ -424,6 +515,9 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self.list = async_to_raw_response_wrapper( beneficial_owners.list, ) + self.archive = async_to_raw_response_wrapper( + beneficial_owners.archive, + ) class BeneficialOwnersResourceWithStreamingResponse: @@ -439,6 +533,9 @@ def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self.list = to_streamed_response_wrapper( beneficial_owners.list, ) + self.archive = to_streamed_response_wrapper( + beneficial_owners.archive, + ) class AsyncBeneficialOwnersResourceWithStreamingResponse: @@ -454,3 +551,6 @@ def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self.list = async_to_streamed_response_wrapper( beneficial_owners.list, ) + self.archive = async_to_streamed_response_wrapper( + beneficial_owners.archive, + ) diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index bc5d7ce58..4e58345cd 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -179,6 +179,46 @@ def test_streaming_response_list(self, client: Increase) -> None: assert cast(Any, response.is_closed) is True + @parametrize + def test_method_archive(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_archive(self, client: Increase) -> None: + response = client.beneficial_owners.with_raw_response.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_archive(self, client: Increase) -> None: + with client.beneficial_owners.with_streaming_response.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_archive(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + client.beneficial_owners.with_raw_response.archive( + "", + ) + class TestAsyncBeneficialOwners: parametrize = pytest.mark.parametrize( @@ -344,3 +384,43 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non assert_matches_type(AsyncPage[EntityBeneficialOwner], beneficial_owner, path=["response"]) assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_archive(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: + response = await async_client.beneficial_owners.with_raw_response.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: + async with async_client.beneficial_owners.with_streaming_response.archive( + "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_beneficial_owner_id` but received ''" + ): + await async_client.beneficial_owners.with_raw_response.archive( + "", + ) From 25597256959e1672c74f9d1baa55510b6fa4ad9e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 00:59:46 +0000 Subject: [PATCH 1207/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 1fc30e855..a59deb77e 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.433.0" + ".": "0.434.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 190622430..1551af291 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.433.0" +version = "0.434.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ddf98129d..98c0006a2 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.433.0" # x-release-please-version +__version__ = "0.434.0" # x-release-please-version From 6adbe92a862406d431b9d2561beddd06fd0c2c36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 02:43:23 +0000 Subject: [PATCH 1208/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 2 - src/increase/resources/entities.py | 244 ------------------ src/increase/types/__init__.py | 6 - .../entity_archive_beneficial_owner_params.py | 15 -- ..._update_beneficial_owner_address_params.py | 49 ---- tests/api_resources/test_entities.py | 240 ----------------- 7 files changed, 4 insertions(+), 560 deletions(-) delete mode 100644 src/increase/types/entity_archive_beneficial_owner_params.py delete mode 100644 src/increase/types/entity_update_beneficial_owner_address_params.py diff --git a/.stats.yml b/.stats.yml index 2c77a37fa..3bab826d6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 238 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1ce680832c1cad08fe72f9d4b9df37379affbe88f539448d991039474dce6674.yml -openapi_spec_hash: 5d9c89c10f5987dc5596134d1f2c1668 -config_hash: e75db3094e90d5e48a2077b010b620f0 +configured_endpoints: 236 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c289d5d6e979a7ac26b8475a36fb0f4fc74528eb5f5efc20848411443a6608cb.yml +openapi_spec_hash: eeda9bd525ea98d52a27642bd26c4b89 +config_hash: e73b1147c039cb3d6a2c56ae5926bca8 diff --git a/api.md b/api.md index f0601bac8..59ec1baca 100644 --- a/api.md +++ b/api.md @@ -501,9 +501,7 @@ Methods: - client.entities.update(entity_id, \*\*params) -> Entity - client.entities.list(\*\*params) -> SyncPage[Entity] - client.entities.archive(entity_id) -> Entity -- client.entities.archive_beneficial_owner(entity_id, \*\*params) -> Entity - client.entities.create_beneficial_owner(entity_id, \*\*params) -> Entity -- client.entities.update_beneficial_owner_address(entity_id, \*\*params) -> Entity # BeneficialOwners diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 19c079d72..3d535c6f4 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -13,8 +13,6 @@ entity_create_params, entity_update_params, entity_create_beneficial_owner_params, - entity_archive_beneficial_owner_params, - entity_update_beneficial_owner_address_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform @@ -378,57 +376,6 @@ def archive( cast_to=Entity, ) - def archive_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner that is being - archived. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/archive_beneficial_owner", - body=maybe_transform( - {"beneficial_owner_id": beneficial_owner_id}, - entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - def create_beneficial_owner( self, entity_id: str, @@ -479,64 +426,6 @@ def create_beneficial_owner( cast_to=Entity, ) - def update_beneficial_owner_address( - self, - entity_id: str, - *, - address: entity_update_beneficial_owner_address_params.Address, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner whose address - is being updated. - - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/update_beneficial_owner_address", - body=maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - }, - entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class AsyncEntitiesResource(AsyncAPIResource): @cached_property @@ -883,57 +772,6 @@ async def archive( cast_to=Entity, ) - async def archive_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Archive a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner that is being - archived. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/archive_beneficial_owner", - body=await async_maybe_transform( - {"beneficial_owner_id": beneficial_owner_id}, - entity_archive_beneficial_owner_params.EntityArchiveBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - async def create_beneficial_owner( self, entity_id: str, @@ -984,64 +822,6 @@ async def create_beneficial_owner( cast_to=Entity, ) - async def update_beneficial_owner_address( - self, - entity_id: str, - *, - address: entity_update_beneficial_owner_address_params.Address, - beneficial_owner_id: str, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Update the address for a beneficial owner belonging to a corporate Entity - - Args: - entity_id: The identifier of the Entity associated with the Beneficial Owner whose address - is being updated. - - address: The individual's physical address. Mail receiving locations like PO Boxes and - PMB's are disallowed. - - beneficial_owner_id: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/update_beneficial_owner_address", - body=await async_maybe_transform( - { - "address": address, - "beneficial_owner_id": beneficial_owner_id, - }, - entity_update_beneficial_owner_address_params.EntityUpdateBeneficialOwnerAddressParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class EntitiesResourceWithRawResponse: def __init__(self, entities: EntitiesResource) -> None: @@ -1062,15 +842,9 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive = to_raw_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = to_raw_response_wrapper( - entities.archive_beneficial_owner, - ) self.create_beneficial_owner = to_raw_response_wrapper( entities.create_beneficial_owner, ) - self.update_beneficial_owner_address = to_raw_response_wrapper( - entities.update_beneficial_owner_address, - ) class AsyncEntitiesResourceWithRawResponse: @@ -1092,15 +866,9 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive = async_to_raw_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = async_to_raw_response_wrapper( - entities.archive_beneficial_owner, - ) self.create_beneficial_owner = async_to_raw_response_wrapper( entities.create_beneficial_owner, ) - self.update_beneficial_owner_address = async_to_raw_response_wrapper( - entities.update_beneficial_owner_address, - ) class EntitiesResourceWithStreamingResponse: @@ -1122,15 +890,9 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive = to_streamed_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = to_streamed_response_wrapper( - entities.archive_beneficial_owner, - ) self.create_beneficial_owner = to_streamed_response_wrapper( entities.create_beneficial_owner, ) - self.update_beneficial_owner_address = to_streamed_response_wrapper( - entities.update_beneficial_owner_address, - ) class AsyncEntitiesResourceWithStreamingResponse: @@ -1152,12 +914,6 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive = async_to_streamed_response_wrapper( entities.archive, ) - self.archive_beneficial_owner = async_to_streamed_response_wrapper( - entities.archive_beneficial_owner, - ) self.create_beneficial_owner = async_to_streamed_response_wrapper( entities.create_beneficial_owner, ) - self.update_beneficial_owner_address = async_to_streamed_response_wrapper( - entities.update_beneficial_owner_address, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 654a67726..8543aee38 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -170,9 +170,6 @@ from .entity_create_beneficial_owner_params import ( EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, ) -from .entity_archive_beneficial_owner_params import ( - EntityArchiveBeneficialOwnerParams as EntityArchiveBeneficialOwnerParams, -) from .intrafi_account_enrollment_list_params import ( IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, ) @@ -194,9 +191,6 @@ from .inbound_ach_transfer_transfer_return_params import ( InboundACHTransferTransferReturnParams as InboundACHTransferTransferReturnParams, ) -from .entity_update_beneficial_owner_address_params import ( - EntityUpdateBeneficialOwnerAddressParams as EntityUpdateBeneficialOwnerAddressParams, -) from .inbound_real_time_payments_transfer_list_params import ( InboundRealTimePaymentsTransferListParams as InboundRealTimePaymentsTransferListParams, ) diff --git a/src/increase/types/entity_archive_beneficial_owner_params.py b/src/increase/types/entity_archive_beneficial_owner_params.py deleted file mode 100644 index d430cf7e4..000000000 --- a/src/increase/types/entity_archive_beneficial_owner_params.py +++ /dev/null @@ -1,15 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EntityArchiveBeneficialOwnerParams"] - - -class EntityArchiveBeneficialOwnerParams(TypedDict, total=False): - beneficial_owner_id: Required[str] - """ - The identifying details of anyone controlling or owning 25% or more of the - corporation. - """ diff --git a/src/increase/types/entity_update_beneficial_owner_address_params.py b/src/increase/types/entity_update_beneficial_owner_address_params.py deleted file mode 100644 index 5848cc86c..000000000 --- a/src/increase/types/entity_update_beneficial_owner_address_params.py +++ /dev/null @@ -1,49 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing_extensions import Required, TypedDict - -__all__ = ["EntityUpdateBeneficialOwnerAddressParams", "Address"] - - -class EntityUpdateBeneficialOwnerAddressParams(TypedDict, total=False): - address: Required[Address] - """The individual's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - beneficial_owner_id: Required[str] - """ - The identifying details of anyone controlling or owning 25% or more of the - corporation. - """ - - -class Address(TypedDict, total=False): - """The individual's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - city: Required[str] - """The city, district, town, or village of the address.""" - - country: Required[str] - """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" - - line1: Required[str] - """The first line of the address. This is usually the street number and street.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" - - state: str - """ - The two-letter United States Postal Service (USPS) abbreviation for the US - state, province, or region of the address. Required in certain countries. - """ - - zip: str - """The ZIP or postal code of the address. Required in certain countries.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 96e4f3ea4..d26d50469 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -521,48 +521,6 @@ def test_path_params_archive(self, client: Increase) -> None: "", ) - @parametrize - def test_method_archive_beneficial_owner(self, client: Increase) -> None: - entity = client.entities.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_archive_beneficial_owner(self, client: Increase) -> None: - response = client.entities.with_raw_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_archive_beneficial_owner(self, client: Increase) -> None: - with client.entities.with_streaming_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_archive_beneficial_owner(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.archive_beneficial_owner( - entity_id="", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - @parametrize def test_method_create_beneficial_owner(self, client: Increase) -> None: entity = client.entities.create_beneficial_owner( @@ -711,84 +669,6 @@ def test_path_params_create_beneficial_owner(self, client: Increase) -> None: }, ) - @parametrize - def test_method_update_beneficial_owner_address(self, client: Increase) -> None: - entity = client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_update_beneficial_owner_address_with_all_params(self, client: Increase) -> None: - entity = client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_update_beneficial_owner_address(self, client: Increase) -> None: - response = client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_update_beneficial_owner_address(self, client: Increase) -> None: - with client.entities.with_streaming_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_update_beneficial_owner_address(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - class TestAsyncEntities: parametrize = pytest.mark.parametrize( @@ -1295,48 +1175,6 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: "", ) - @parametrize - async def test_method_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.archive_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_archive_beneficial_owner(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.archive_beneficial_owner( - entity_id="", - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - @parametrize async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: entity = await async_client.entities.create_beneficial_owner( @@ -1484,81 +1322,3 @@ async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncr "prongs": ["control"], }, ) - - @parametrize - async def test_method_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_update_beneficial_owner_address_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - "line2": "Unit 2", - "state": "NY", - "zip": "10045", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.update_beneficial_owner_address( - entity_id="entity_n8y8tnk2p9339ti393yi", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_update_beneficial_owner_address(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.update_beneficial_owner_address( - entity_id="", - address={ - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", - ) From 54ad13d7f8984afa43b41ebb3925e0ac3260c1c3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 02:48:44 +0000 Subject: [PATCH 1209/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_beneficial_owner.py | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3bab826d6..06f5ab863 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c289d5d6e979a7ac26b8475a36fb0f4fc74528eb5f5efc20848411443a6608cb.yml -openapi_spec_hash: eeda9bd525ea98d52a27642bd26c4b89 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a342683774b79b3ee013a195d77a651ea053be4ec6a314e92ab08b62f62517b.yml +openapi_spec_hash: 2c87b069a3c3e1c647251016452c0b28 config_hash: e73b1147c039cb3d6a2c56ae5926bca8 diff --git a/src/increase/types/entity_beneficial_owner.py b/src/increase/types/entity_beneficial_owner.py index 86907ad5c..1fc813c18 100644 --- a/src/increase/types/entity_beneficial_owner.py +++ b/src/increase/types/entity_beneficial_owner.py @@ -88,6 +88,10 @@ class Individual(BaseModel): class EntityBeneficialOwner(BaseModel): + """ + Beneficial owners are the individuals who control or own 25% or more of a `corporation` entity. Beneficial owners are always people, and never organizations. Generally, you will need to submit between 1 and 5 beneficial owners for every `corporation` entity. You should update and archive beneficial owners for a corporation entity as their details change. + """ + id: str """The identifier of this beneficial owner.""" From caf69821c3206e22348c6427d1f8ad93e760c8ec Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 11:44:08 +0000 Subject: [PATCH 1210/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/files.py | 6 +++++ src/increase/types/check_transfer.py | 18 ++++++++++---- .../types/check_transfer_create_params.py | 24 ++++++++++++++++--- src/increase/types/file.py | 3 +++ src/increase/types/file_create_params.py | 3 +++ src/increase/types/file_list_params.py | 1 + tests/api_resources/test_check_transfers.py | 10 ++++++-- 8 files changed, 57 insertions(+), 12 deletions(-) diff --git a/.stats.yml b/.stats.yml index 06f5ab863..c29f1d485 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5a342683774b79b3ee013a195d77a651ea053be4ec6a314e92ab08b62f62517b.yml -openapi_spec_hash: 2c87b069a3c3e1c647251016452c0b28 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d9e8a8a1909ef7c96fe28293ab07720938ce09be84687c57e3cf95890a78205.yml +openapi_spec_hash: 4b3867a81a8429bf6ab119f910e72865 config_hash: e73b1147c039cb3d6a2c56ae5926bca8 diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index d86cd1f58..c45ef807b 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -56,6 +56,7 @@ def create( "mailed_check_image", "check_attachment", "check_voucher_image", + "check_signature", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -102,6 +103,8 @@ def create( - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. + - `check_signature` - A signature image to be printed on a check. This must be a + 1320x120 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan @@ -289,6 +292,7 @@ async def create( "mailed_check_image", "check_attachment", "check_voucher_image", + "check_signature", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -335,6 +339,8 @@ async def create( - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. + - `check_signature` - A signature image to be printed on a check. This must be a + 1320x120 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan diff --git a/src/increase/types/check_transfer.py b/src/increase/types/check_transfer.py index de76a0375..9e31266d5 100644 --- a/src/increase/types/check_transfer.py +++ b/src/increase/types/check_transfer.py @@ -21,6 +21,7 @@ "PhysicalCheckMailingAddress", "PhysicalCheckPayer", "PhysicalCheckReturnAddress", + "PhysicalCheckSignature", "PhysicalCheckTrackingUpdate", "StopPaymentRequest", "Submission", @@ -194,6 +195,16 @@ class PhysicalCheckReturnAddress(BaseModel): """The state of the check's destination.""" +class PhysicalCheckSignature(BaseModel): + """The signature that will appear on the check.""" + + image_file_id: Optional[str] = None + """The ID of a File containing a PNG of the signature.""" + + text: Optional[str] = None + """The text that will appear as the signature on the check in cursive font.""" + + class PhysicalCheckTrackingUpdate(BaseModel): category: Literal["in_transit", "processed_for_delivery", "delivered", "delivery_issue", "returned_to_sender"] """The type of tracking event. @@ -258,11 +269,8 @@ class PhysicalCheck(BaseModel): - `fedex_overnight` - FedEx Overnight """ - signature_text: Optional[str] = None - """The text that will appear as the signature on the check in cursive font. - - If blank, the check will be printed with 'No signature required'. - """ + signature: PhysicalCheckSignature + """The signature that will appear on the check.""" tracking_updates: List[PhysicalCheckTrackingUpdate] """Tracking updates relating to the physical check's delivery.""" diff --git a/src/increase/types/check_transfer_create_params.py b/src/increase/types/check_transfer_create_params.py index e812775d2..183996766 100644 --- a/src/increase/types/check_transfer_create_params.py +++ b/src/increase/types/check_transfer_create_params.py @@ -14,6 +14,7 @@ "PhysicalCheckMailingAddress", "PhysicalCheckPayer", "PhysicalCheckReturnAddress", + "PhysicalCheckSignature", "ThirdParty", ] @@ -156,6 +157,22 @@ class PhysicalCheckReturnAddress(TypedDict, total=False): """ +class PhysicalCheckSignature(TypedDict, total=False): + """The signature that will appear on the check. + + If not provided, the check will be printed with 'No Signature Required'. At most one of `text` and `image_file_id` may be provided. + """ + + image_file_id: str + """The ID of a File containing a PNG of the signature. + + This must have `purpose: check_signature` and be a 1320x120 pixel PNG. + """ + + text: str + """The text that will appear as the signature on the check in cursive font.""" + + class PhysicalCheck(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """Details relating to the physical check that Increase will print and mail. @@ -215,10 +232,11 @@ class PhysicalCheck(TypedDict, total=False, extra_items=object): # type: ignore - `fedex_overnight` - FedEx Overnight """ - signature_text: str - """The text that will appear as the signature on the check in cursive font. + signature: PhysicalCheckSignature + """The signature that will appear on the check. - If not provided, the check will be printed with 'No signature required'. + If not provided, the check will be printed with 'No Signature Required'. At most + one of `text` and `image_file_id` may be provided. """ diff --git a/src/increase/types/file.py b/src/increase/types/file.py index 45939cdbb..3cf091ae3 100644 --- a/src/increase/types/file.py +++ b/src/increase/types/file.py @@ -56,6 +56,7 @@ class File(BaseModel): "mailed_check_image", "check_attachment", "check_voucher_image", + "check_signature", "inbound_mail_item", "form_1099_int", "form_1099_misc", @@ -101,6 +102,8 @@ class File(BaseModel): - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. + - `check_signature` - A signature image to be printed on a check. This must be a + 1320x120 pixel PNG. - `inbound_mail_item` - A scanned mail item sent to Increase. - `form_1099_int` - IRS Form 1099-INT. - `form_1099_misc` - IRS Form 1099-MISC. diff --git a/src/increase/types/file_create_params.py b/src/increase/types/file_create_params.py index a2ea75d87..069840ff4 100644 --- a/src/increase/types/file_create_params.py +++ b/src/increase/types/file_create_params.py @@ -26,6 +26,7 @@ class FileCreateParams(TypedDict, total=False): "mailed_check_image", "check_attachment", "check_voucher_image", + "check_signature", "form_ss_4", "identity_document", "loan_application_supplemental_document", @@ -54,6 +55,8 @@ class FileCreateParams(TypedDict, total=False): - `check_voucher_image` - An image to be used as the check voucher image, which is printed in the middle of the trifold area of a check. This must be a 2550x1100 pixel PNG. + - `check_signature` - A signature image to be printed on a check. This must be a + 1320x120 pixel PNG. - `form_ss_4` - IRS Form SS-4. - `identity_document` - An image of a government-issued ID. - `loan_application_supplemental_document` - A supplemental document for a Loan diff --git a/src/increase/types/file_list_params.py b/src/increase/types/file_list_params.py index 2e6f4332b..6376de639 100644 --- a/src/increase/types/file_list_params.py +++ b/src/increase/types/file_list_params.py @@ -73,6 +73,7 @@ class CreatedAt(TypedDict, total=False): "mailed_check_image", "check_attachment", "check_voucher_image", + "check_signature", "inbound_mail_item", "form_1099_int", "form_1099_misc", diff --git a/tests/api_resources/test_check_transfers.py b/tests/api_resources/test_check_transfers.py index c3d6def2c..fa0afb17e 100644 --- a/tests/api_resources/test_check_transfers.py +++ b/tests/api_resources/test_check_transfers.py @@ -66,7 +66,10 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "phone": "x", }, "shipping_method": "usps_first_class", - "signature_text": "Ian Crease", + "signature": { + "image_file_id": "image_file_id", + "text": "Ian Crease", + }, }, require_approval=True, third_party={"recipient_name": "x"}, @@ -357,7 +360,10 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "phone": "x", }, "shipping_method": "usps_first_class", - "signature_text": "Ian Crease", + "signature": { + "image_file_id": "image_file_id", + "text": "Ian Crease", + }, }, require_approval=True, third_party={"recipient_name": "x"}, From f8ab597c7d89d7e10384a02b402e831cdf1f3c15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 11:47:24 +0000 Subject: [PATCH 1211/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a59deb77e..d260e00dd 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.434.0" + ".": "0.435.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1551af291..c0463bc1e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.434.0" +version = "0.435.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 98c0006a2..c5b629559 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.434.0" # x-release-please-version +__version__ = "0.435.0" # x-release-please-version From b6492e7694364c8704185b4c2b5a42c7ec0a581d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:19:22 +0000 Subject: [PATCH 1212/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 + src/increase/resources/beneficial_owners.py | 137 +++++++++- src/increase/types/__init__.py | 1 + .../types/beneficial_owner_create_params.py | 205 +++++++++++++++ src/increase/types/entity_beneficial_owner.py | 8 + tests/api_resources/test_beneficial_owners.py | 238 +++++++++++++++++- 7 files changed, 592 insertions(+), 6 deletions(-) create mode 100644 src/increase/types/beneficial_owner_create_params.py diff --git a/.stats.yml b/.stats.yml index c29f1d485..3528901cc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4d9e8a8a1909ef7c96fe28293ab07720938ce09be84687c57e3cf95890a78205.yml -openapi_spec_hash: 4b3867a81a8429bf6ab119f910e72865 -config_hash: e73b1147c039cb3d6a2c56ae5926bca8 +configured_endpoints: 237 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c11248a841117464c3d87ee8069761f8fdf1a235557bbc885bcfa13de4107c4.yml +openapi_spec_hash: 6bcd6b02eaff96080fc9f57fd5942502 +config_hash: 81fdd83e44056d1f623e280bc106245d diff --git a/api.md b/api.md index 59ec1baca..b0a9f92ee 100644 --- a/api.md +++ b/api.md @@ -513,6 +513,7 @@ from increase.types import EntityBeneficialOwner Methods: +- client.beneficial_owners.create(\*\*params) -> EntityBeneficialOwner - client.beneficial_owners.retrieve(entity_beneficial_owner_id) -> EntityBeneficialOwner - client.beneficial_owners.update(entity_beneficial_owner_id, \*\*params) -> EntityBeneficialOwner - client.beneficial_owners.list(\*\*params) -> SyncPage[EntityBeneficialOwner] diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index 0ad56c1c6..c5117b765 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -2,9 +2,12 @@ from __future__ import annotations +from typing import List +from typing_extensions import Literal + import httpx -from ..types import beneficial_owner_list_params, beneficial_owner_update_params +from ..types import beneficial_owner_list_params, beneficial_owner_create_params, beneficial_owner_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -42,6 +45,66 @@ def with_streaming_response(self) -> BeneficialOwnersResourceWithStreamingRespon """ return BeneficialOwnersResourceWithStreamingResponse(self) + def create( + self, + *, + entity_id: str, + individual: beneficial_owner_create_params.Individual, + prongs: List[Literal["ownership", "control"]], + company_title: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Create a beneficial owner + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + individual: Personal details for the beneficial owner. + + prongs: Why this person is considered a beneficial owner of the entity. At least one + option is required, if a person is both a control person and owner, submit an + array containing both. + + company_title: This person's role or title within the entity. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/entity_beneficial_owners", + body=maybe_transform( + { + "entity_id": entity_id, + "individual": individual, + "prongs": prongs, + "company_title": company_title, + }, + beneficial_owner_create_params.BeneficialOwnerCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + def retrieve( self, entity_beneficial_owner_id: str, @@ -273,6 +336,66 @@ def with_streaming_response(self) -> AsyncBeneficialOwnersResourceWithStreamingR """ return AsyncBeneficialOwnersResourceWithStreamingResponse(self) + async def create( + self, + *, + entity_id: str, + individual: beneficial_owner_create_params.Individual, + prongs: List[Literal["ownership", "control"]], + company_title: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityBeneficialOwner: + """ + Create a beneficial owner + + Args: + entity_id: The identifier of the Entity to associate with the new Beneficial Owner. + + individual: Personal details for the beneficial owner. + + prongs: Why this person is considered a beneficial owner of the entity. At least one + option is required, if a person is both a control person and owner, submit an + array containing both. + + company_title: This person's role or title within the entity. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/entity_beneficial_owners", + body=await async_maybe_transform( + { + "entity_id": entity_id, + "individual": individual, + "prongs": prongs, + "company_title": company_title, + }, + beneficial_owner_create_params.BeneficialOwnerCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityBeneficialOwner, + ) + async def retrieve( self, entity_beneficial_owner_id: str, @@ -488,6 +611,9 @@ class BeneficialOwnersResourceWithRawResponse: def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self._beneficial_owners = beneficial_owners + self.create = to_raw_response_wrapper( + beneficial_owners.create, + ) self.retrieve = to_raw_response_wrapper( beneficial_owners.retrieve, ) @@ -506,6 +632,9 @@ class AsyncBeneficialOwnersResourceWithRawResponse: def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self._beneficial_owners = beneficial_owners + self.create = async_to_raw_response_wrapper( + beneficial_owners.create, + ) self.retrieve = async_to_raw_response_wrapper( beneficial_owners.retrieve, ) @@ -524,6 +653,9 @@ class BeneficialOwnersResourceWithStreamingResponse: def __init__(self, beneficial_owners: BeneficialOwnersResource) -> None: self._beneficial_owners = beneficial_owners + self.create = to_streamed_response_wrapper( + beneficial_owners.create, + ) self.retrieve = to_streamed_response_wrapper( beneficial_owners.retrieve, ) @@ -542,6 +674,9 @@ class AsyncBeneficialOwnersResourceWithStreamingResponse: def __init__(self, beneficial_owners: AsyncBeneficialOwnersResource) -> None: self._beneficial_owners = beneficial_owners + self.create = async_to_streamed_response_wrapper( + beneficial_owners.create, + ) self.retrieve = async_to_streamed_response_wrapper( beneficial_owners.retrieve, ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 8543aee38..18bb99f0b 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -123,6 +123,7 @@ from .intrafi_exclusion_list_params import IntrafiExclusionListParams as IntrafiExclusionListParams from .oauth_application_list_params import OAuthApplicationListParams as OAuthApplicationListParams from .account_transfer_create_params import AccountTransferCreateParams as AccountTransferCreateParams +from .beneficial_owner_create_params import BeneficialOwnerCreateParams as BeneficialOwnerCreateParams from .beneficial_owner_update_params import BeneficialOwnerUpdateParams as BeneficialOwnerUpdateParams from .card_push_transfer_list_params import CardPushTransferListParams as CardPushTransferListParams from .event_subscription_list_params import EventSubscriptionListParams as EventSubscriptionListParams diff --git a/src/increase/types/beneficial_owner_create_params.py b/src/increase/types/beneficial_owner_create_params.py new file mode 100644 index 000000000..36ed82d9f --- /dev/null +++ b/src/increase/types/beneficial_owner_create_params.py @@ -0,0 +1,205 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List, Union +from datetime import date +from typing_extensions import Literal, Required, Annotated, TypedDict + +from .._utils import PropertyInfo + +__all__ = [ + "BeneficialOwnerCreateParams", + "Individual", + "IndividualAddress", + "IndividualIdentification", + "IndividualIdentificationDriversLicense", + "IndividualIdentificationOther", + "IndividualIdentificationPassport", +] + + +class BeneficialOwnerCreateParams(TypedDict, total=False): + entity_id: Required[str] + """The identifier of the Entity to associate with the new Beneficial Owner.""" + + individual: Required[Individual] + """Personal details for the beneficial owner.""" + + prongs: Required[List[Literal["ownership", "control"]]] + """Why this person is considered a beneficial owner of the entity. + + At least one option is required, if a person is both a control person and owner, + submit an array containing both. + """ + + company_title: str + """This person's role or title within the entity.""" + + +class IndividualAddress(TypedDict, total=False): + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + + city: Required[str] + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" + + line1: Required[str] + """The first line of the address. This is usually the street number and street.""" + + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. + """ + + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" + + +class IndividualIdentificationDriversLicense(TypedDict, total=False): + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The driver's license's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the front of the driver's license.""" + + state: Required[str] + """The state that issued the provided driver's license.""" + + back_file_id: str + """The identifier of the File containing the back of the driver's license.""" + + +class IndividualIdentificationOther(TypedDict, total=False): + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + + country: Required[str] + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ + + description: Required[str] + """A description of the document submitted.""" + + file_id: Required[str] + """The identifier of the File containing the front of the document.""" + + back_file_id: str + """The identifier of the File containing the back of the document. + + Not every document has a reverse side. + """ + + expiration_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """The document's expiration date in YYYY-MM-DD format.""" + + +class IndividualIdentificationPassport(TypedDict, total=False): + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + + country: Required[str] + """ + The two-character ISO 3166-1 code representing the country that issued the + document (e.g., `US`). + """ + + expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The passport's expiration date in YYYY-MM-DD format.""" + + file_id: Required[str] + """The identifier of the File containing the passport.""" + + +class IndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] + """A means of verifying the person's identity.""" + + method: Required[ + Literal[ + "social_security_number", + "individual_taxpayer_identification_number", + "passport", + "drivers_license", + "other", + ] + ] + """A method that can be used to verify the individual's identity. + + - `social_security_number` - A social security number. + - `individual_taxpayer_identification_number` - An individual taxpayer + identification number (ITIN). + - `passport` - A passport number. + - `drivers_license` - A driver's license number. + - `other` - Another identifying document. + """ + + number: Required[str] + """ + An identification number that can be used to verify the individual's identity, + such as a social security number. + """ + + drivers_license: IndividualIdentificationDriversLicense + """Information about the United States driver's license used for identification. + + Required if `method` is equal to `drivers_license`. + """ + + other: IndividualIdentificationOther + """Information about the identification document provided. + + Required if `method` is equal to `other`. + """ + + passport: IndividualIdentificationPassport + """Information about the passport used for identification. + + Required if `method` is equal to `passport`. + """ + + +class Individual(TypedDict, total=False): + """Personal details for the beneficial owner.""" + + address: Required[IndividualAddress] + """The individual's physical address. + + Mail receiving locations like PO Boxes and PMB's are disallowed. + """ + + date_of_birth: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] + """The person's date of birth in YYYY-MM-DD format.""" + + identification: Required[IndividualIdentification] + """A means of verifying the person's identity.""" + + name: Required[str] + """The person's legal name.""" + + confirmed_no_us_tax_id: bool + """ + The identification method for an individual can only be a passport, driver's + license, or other document if you've confirmed the individual does not have a US + tax id (either a Social Security Number or Individual Taxpayer Identification + Number). + """ diff --git a/src/increase/types/entity_beneficial_owner.py b/src/increase/types/entity_beneficial_owner.py index 1fc813c18..d16d5cf1b 100644 --- a/src/increase/types/entity_beneficial_owner.py +++ b/src/increase/types/entity_beneficial_owner.py @@ -104,6 +104,14 @@ class EntityBeneficialOwner(BaseModel): Beneficial Owner was created. """ + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + individual: Individual """Personal details for the beneficial owner.""" diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index 4e58345cd..7ab7279d0 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -9,7 +9,9 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import EntityBeneficialOwner +from increase.types import ( + EntityBeneficialOwner, +) from increase._utils import parse_date from increase.pagination import SyncPage, AsyncPage @@ -19,6 +21,123 @@ class TestBeneficialOwners: parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + @parametrize + def test_method_create(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + beneficial_owner = client.beneficial_owners.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + "confirmed_no_us_tax_id": True, + }, + prongs=["control"], + company_title="CEO", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.beneficial_owners.with_raw_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.beneficial_owners.with_streaming_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize def test_method_retrieve(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.retrieve( @@ -225,6 +344,123 @@ class TestAsyncBeneficialOwners: "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] ) + @parametrize + async def test_method_create(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + beneficial_owner = await async_client.beneficial_owners.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + "line2": "x", + "state": "NY", + "zip": "10045", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + "drivers_license": { + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + "state": "x", + "back_file_id": "back_file_id", + }, + "other": { + "country": "x", + "description": "x", + "file_id": "file_id", + "back_file_id": "back_file_id", + "expiration_date": parse_date("2019-12-27"), + }, + "passport": { + "country": "x", + "expiration_date": parse_date("2019-12-27"), + "file_id": "file_id", + }, + }, + "name": "Ian Crease", + "confirmed_no_us_tax_id": True, + }, + prongs=["control"], + company_title="CEO", + ) + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.beneficial_owners.with_raw_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.beneficial_owners.with_streaming_response.create( + entity_id="entity_n8y8tnk2p9339ti393yi", + individual={ + "address": { + "city": "New York", + "country": "US", + "line1": "33 Liberty Street", + }, + "date_of_birth": parse_date("1970-01-31"), + "identification": { + "method": "social_security_number", + "number": "078051120", + }, + "name": "Ian Crease", + }, + prongs=["control"], + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + beneficial_owner = await response.parse() + assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) + + assert cast(Any, response.is_closed) is True + @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.retrieve( From d107fce91ace616700d4c227609a661c3e7fefe9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:28:06 +0000 Subject: [PATCH 1213/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 1 - src/increase/resources/entities.py | 119 +------ src/increase/types/__init__.py | 3 - .../entity_create_beneficial_owner_params.py | 215 ------------- tests/api_resources/test_entities.py | 300 +----------------- 6 files changed, 6 insertions(+), 640 deletions(-) delete mode 100644 src/increase/types/entity_create_beneficial_owner_params.py diff --git a/.stats.yml b/.stats.yml index 3528901cc..89d1fa6cf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 237 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2c11248a841117464c3d87ee8069761f8fdf1a235557bbc885bcfa13de4107c4.yml -openapi_spec_hash: 6bcd6b02eaff96080fc9f57fd5942502 -config_hash: 81fdd83e44056d1f623e280bc106245d +configured_endpoints: 236 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c95dd79214af830e2e7fb34ab05f98bde9213311d5e2d59f9a816a8e0369b85.yml +openapi_spec_hash: ec66c2961a8b90e06ea57f934d8d75db +config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/api.md b/api.md index b0a9f92ee..0d68ea18f 100644 --- a/api.md +++ b/api.md @@ -501,7 +501,6 @@ Methods: - client.entities.update(entity_id, \*\*params) -> Entity - client.entities.list(\*\*params) -> SyncPage[Entity] - client.entities.archive(entity_id) -> Entity -- client.entities.create_beneficial_owner(entity_id, \*\*params) -> Entity # BeneficialOwners diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index 3d535c6f4..b5b0808c3 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -8,12 +8,7 @@ import httpx -from ..types import ( - entity_list_params, - entity_create_params, - entity_update_params, - entity_create_beneficial_owner_params, -) +from ..types import entity_list_params, entity_create_params, entity_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given from .._utils import maybe_transform, async_maybe_transform from .._compat import cached_property @@ -376,56 +371,6 @@ def archive( cast_to=Entity, ) - def create_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return self._post( - f"/entities/{entity_id}/create_beneficial_owner", - body=maybe_transform( - {"beneficial_owner": beneficial_owner}, - entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class AsyncEntitiesResource(AsyncAPIResource): @cached_property @@ -772,56 +717,6 @@ async def archive( cast_to=Entity, ) - async def create_beneficial_owner( - self, - entity_id: str, - *, - beneficial_owner: entity_create_beneficial_owner_params.BeneficialOwner, - # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. - # The extra values given here take precedence over values defined on the client or passed to this method. - extra_headers: Headers | None = None, - extra_query: Query | None = None, - extra_body: Body | None = None, - timeout: float | httpx.Timeout | None | NotGiven = not_given, - idempotency_key: str | None = None, - ) -> Entity: - """ - Create a beneficial owner for a corporate Entity - - Args: - entity_id: The identifier of the Entity to associate with the new Beneficial Owner. - - beneficial_owner: The identifying details of anyone controlling or owning 25% or more of the - corporation. - - extra_headers: Send extra headers - - extra_query: Add additional query parameters to the request - - extra_body: Add additional JSON properties to the request - - timeout: Override the client-level default timeout for this request, in seconds - - idempotency_key: Specify a custom idempotency key for this request - """ - if not entity_id: - raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") - return await self._post( - f"/entities/{entity_id}/create_beneficial_owner", - body=await async_maybe_transform( - {"beneficial_owner": beneficial_owner}, - entity_create_beneficial_owner_params.EntityCreateBeneficialOwnerParams, - ), - options=make_request_options( - extra_headers=extra_headers, - extra_query=extra_query, - extra_body=extra_body, - timeout=timeout, - idempotency_key=idempotency_key, - ), - cast_to=Entity, - ) - class EntitiesResourceWithRawResponse: def __init__(self, entities: EntitiesResource) -> None: @@ -842,9 +737,6 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive = to_raw_response_wrapper( entities.archive, ) - self.create_beneficial_owner = to_raw_response_wrapper( - entities.create_beneficial_owner, - ) class AsyncEntitiesResourceWithRawResponse: @@ -866,9 +758,6 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive = async_to_raw_response_wrapper( entities.archive, ) - self.create_beneficial_owner = async_to_raw_response_wrapper( - entities.create_beneficial_owner, - ) class EntitiesResourceWithStreamingResponse: @@ -890,9 +779,6 @@ def __init__(self, entities: EntitiesResource) -> None: self.archive = to_streamed_response_wrapper( entities.archive, ) - self.create_beneficial_owner = to_streamed_response_wrapper( - entities.create_beneficial_owner, - ) class AsyncEntitiesResourceWithStreamingResponse: @@ -914,6 +800,3 @@ def __init__(self, entities: AsyncEntitiesResource) -> None: self.archive = async_to_streamed_response_wrapper( entities.archive, ) - self.create_beneficial_owner = async_to_streamed_response_wrapper( - entities.create_beneficial_owner, - ) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 18bb99f0b..994a8c3d4 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -168,9 +168,6 @@ from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams from .inbound_wire_transfer_reverse_params import InboundWireTransferReverseParams as InboundWireTransferReverseParams -from .entity_create_beneficial_owner_params import ( - EntityCreateBeneficialOwnerParams as EntityCreateBeneficialOwnerParams, -) from .intrafi_account_enrollment_list_params import ( IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, ) diff --git a/src/increase/types/entity_create_beneficial_owner_params.py b/src/increase/types/entity_create_beneficial_owner_params.py deleted file mode 100644 index e3091081e..000000000 --- a/src/increase/types/entity_create_beneficial_owner_params.py +++ /dev/null @@ -1,215 +0,0 @@ -# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. - -from __future__ import annotations - -from typing import List, Union -from datetime import date -from typing_extensions import Literal, Required, Annotated, TypedDict - -from .._utils import PropertyInfo - -__all__ = [ - "EntityCreateBeneficialOwnerParams", - "BeneficialOwner", - "BeneficialOwnerIndividual", - "BeneficialOwnerIndividualAddress", - "BeneficialOwnerIndividualIdentification", - "BeneficialOwnerIndividualIdentificationDriversLicense", - "BeneficialOwnerIndividualIdentificationOther", - "BeneficialOwnerIndividualIdentificationPassport", -] - - -class EntityCreateBeneficialOwnerParams(TypedDict, total=False): - beneficial_owner: Required[BeneficialOwner] - """ - The identifying details of anyone controlling or owning 25% or more of the - corporation. - """ - - -class BeneficialOwnerIndividualAddress(TypedDict, total=False): - """The individual's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - city: Required[str] - """The city, district, town, or village of the address.""" - - country: Required[str] - """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" - - line1: Required[str] - """The first line of the address. This is usually the street number and street.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" - - state: str - """ - The two-letter United States Postal Service (USPS) abbreviation for the US - state, province, or region of the address. Required in certain countries. - """ - - zip: str - """The ZIP or postal code of the address. Required in certain countries.""" - - -class BeneficialOwnerIndividualIdentificationDriversLicense(TypedDict, total=False): - """Information about the United States driver's license used for identification. - - Required if `method` is equal to `drivers_license`. - """ - - expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] - """The driver's license's expiration date in YYYY-MM-DD format.""" - - file_id: Required[str] - """The identifier of the File containing the front of the driver's license.""" - - state: Required[str] - """The state that issued the provided driver's license.""" - - back_file_id: str - """The identifier of the File containing the back of the driver's license.""" - - -class BeneficialOwnerIndividualIdentificationOther(TypedDict, total=False): - """Information about the identification document provided. - - Required if `method` is equal to `other`. - """ - - country: Required[str] - """ - The two-character ISO 3166-1 code representing the country that issued the - document (e.g., `US`). - """ - - description: Required[str] - """A description of the document submitted.""" - - file_id: Required[str] - """The identifier of the File containing the front of the document.""" - - back_file_id: str - """The identifier of the File containing the back of the document. - - Not every document has a reverse side. - """ - - expiration_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] - """The document's expiration date in YYYY-MM-DD format.""" - - -class BeneficialOwnerIndividualIdentificationPassport(TypedDict, total=False): - """Information about the passport used for identification. - - Required if `method` is equal to `passport`. - """ - - country: Required[str] - """ - The two-character ISO 3166-1 code representing the country that issued the - document (e.g., `US`). - """ - - expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] - """The passport's expiration date in YYYY-MM-DD format.""" - - file_id: Required[str] - """The identifier of the File containing the passport.""" - - -class BeneficialOwnerIndividualIdentification(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] - """A means of verifying the person's identity.""" - - method: Required[ - Literal[ - "social_security_number", - "individual_taxpayer_identification_number", - "passport", - "drivers_license", - "other", - ] - ] - """A method that can be used to verify the individual's identity. - - - `social_security_number` - A social security number. - - `individual_taxpayer_identification_number` - An individual taxpayer - identification number (ITIN). - - `passport` - A passport number. - - `drivers_license` - A driver's license number. - - `other` - Another identifying document. - """ - - number: Required[str] - """ - An identification number that can be used to verify the individual's identity, - such as a social security number. - """ - - drivers_license: BeneficialOwnerIndividualIdentificationDriversLicense - """Information about the United States driver's license used for identification. - - Required if `method` is equal to `drivers_license`. - """ - - other: BeneficialOwnerIndividualIdentificationOther - """Information about the identification document provided. - - Required if `method` is equal to `other`. - """ - - passport: BeneficialOwnerIndividualIdentificationPassport - """Information about the passport used for identification. - - Required if `method` is equal to `passport`. - """ - - -class BeneficialOwnerIndividual(TypedDict, total=False): - """Personal details for the beneficial owner.""" - - address: Required[BeneficialOwnerIndividualAddress] - """The individual's physical address. - - Mail receiving locations like PO Boxes and PMB's are disallowed. - """ - - date_of_birth: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] - """The person's date of birth in YYYY-MM-DD format.""" - - identification: Required[BeneficialOwnerIndividualIdentification] - """A means of verifying the person's identity.""" - - name: Required[str] - """The person's legal name.""" - - confirmed_no_us_tax_id: bool - """ - The identification method for an individual can only be a passport, driver's - license, or other document if you've confirmed the individual does not have a US - tax id (either a Social Security Number or Individual Taxpayer Identification - Number). - """ - - -class BeneficialOwner(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] - """ - The identifying details of anyone controlling or owning 25% or more of the corporation. - """ - - individual: Required[BeneficialOwnerIndividual] - """Personal details for the beneficial owner.""" - - prongs: Required[List[Literal["ownership", "control"]]] - """Why this person is considered a beneficial owner of the entity. - - At least one option is required, if a person is both a control person and owner, - submit an array containing both. - """ - - company_title: str - """This person's role or title within the entity.""" diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index d26d50469..e71fa5618 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -9,9 +9,7 @@ from increase import Increase, AsyncIncrease from tests.utils import assert_matches_type -from increase.types import ( - Entity, -) +from increase.types import Entity from increase._utils import parse_date, parse_datetime from increase.pagination import SyncPage, AsyncPage @@ -521,154 +519,6 @@ def test_path_params_archive(self, client: Increase) -> None: "", ) - @parametrize - def test_method_create_beneficial_owner(self, client: Increase) -> None: - entity = client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_method_create_beneficial_owner_with_all_params(self, client: Increase) -> None: - entity = client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - "confirmed_no_us_tax_id": True, - }, - "prongs": ["control"], - "company_title": "CEO", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_raw_response_create_beneficial_owner(self, client: Increase) -> None: - response = client.entities.with_raw_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - def test_streaming_response_create_beneficial_owner(self, client: Increase) -> None: - with client.entities.with_streaming_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - def test_path_params_create_beneficial_owner(self, client: Increase) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - client.entities.with_raw_response.create_beneficial_owner( - entity_id="", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - class TestAsyncEntities: parametrize = pytest.mark.parametrize( @@ -1174,151 +1024,3 @@ async def test_path_params_archive(self, async_client: AsyncIncrease) -> None: await async_client.entities.with_raw_response.archive( "", ) - - @parametrize - async def test_method_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_method_create_beneficial_owner_with_all_params(self, async_client: AsyncIncrease) -> None: - entity = await async_client.entities.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - "line2": "x", - "state": "NY", - "zip": "10045", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - "drivers_license": { - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - "state": "x", - "back_file_id": "back_file_id", - }, - "other": { - "country": "x", - "description": "x", - "file_id": "file_id", - "back_file_id": "back_file_id", - "expiration_date": parse_date("2019-12-27"), - }, - "passport": { - "country": "x", - "expiration_date": parse_date("2019-12-27"), - "file_id": "file_id", - }, - }, - "name": "Ian Crease", - "confirmed_no_us_tax_id": True, - }, - "prongs": ["control"], - "company_title": "CEO", - }, - ) - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_raw_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - response = await async_client.entities.with_raw_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) - - assert response.is_closed is True - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - @parametrize - async def test_streaming_response_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - async with async_client.entities.with_streaming_response.create_beneficial_owner( - entity_id="entity_n8y8tnk2p9339ti393yi", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) as response: - assert not response.is_closed - assert response.http_request.headers.get("X-Stainless-Lang") == "python" - - entity = await response.parse() - assert_matches_type(Entity, entity, path=["response"]) - - assert cast(Any, response.is_closed) is True - - @parametrize - async def test_path_params_create_beneficial_owner(self, async_client: AsyncIncrease) -> None: - with pytest.raises(ValueError, match=r"Expected a non-empty value for `entity_id` but received ''"): - await async_client.entities.with_raw_response.create_beneficial_owner( - entity_id="", - beneficial_owner={ - "individual": { - "address": { - "city": "New York", - "country": "US", - "line1": "33 Liberty Street", - }, - "date_of_birth": parse_date("1970-01-31"), - "identification": { - "method": "social_security_number", - "number": "078051120", - }, - "name": "Ian Crease", - }, - "prongs": ["control"], - }, - ) From 4f680cefa2a9b14e1926e703276d0154e33f1042 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 16:31:01 +0000 Subject: [PATCH 1214/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d260e00dd..878ea368c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.435.0" + ".": "0.436.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c0463bc1e..02c598303 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.435.0" +version = "0.436.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c5b629559..80b671821 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.435.0" # x-release-please-version +__version__ = "0.436.0" # x-release-please-version From 616a22126f738c0e4bb9a7cbd69e09d4ff58c1f8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 17:05:33 +0000 Subject: [PATCH 1215/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/entity.py | 109 +++++++++++++++++- src/increase/types/entity_beneficial_owner.py | 12 -- 3 files changed, 109 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index 89d1fa6cf..8db47988d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c95dd79214af830e2e7fb34ab05f98bde9213311d5e2d59f9a816a8e0369b85.yml -openapi_spec_hash: ec66c2961a8b90e06ea57f934d8d75db +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6cc15216773be06ef5899a9f805480d69ba2e610a3746bb638c7773baa10c407.yml +openapi_spec_hash: c24d9a85acb17d73e8d6434d7c907d40 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 6d02ce993..4d4ff37db 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -7,13 +7,16 @@ from pydantic import Field as FieldInfo from .._models import BaseModel -from .entity_beneficial_owner import EntityBeneficialOwner from .entity_supplemental_document import EntitySupplementalDocument __all__ = [ "Entity", "Corporation", "CorporationAddress", + "CorporationBeneficialOwner", + "CorporationBeneficialOwnerIndividual", + "CorporationBeneficialOwnerIndividualAddress", + "CorporationBeneficialOwnerIndividualIdentification", "GovernmentAuthority", "GovernmentAuthorityAddress", "GovernmentAuthorityAuthorizedPerson", @@ -61,6 +64,108 @@ class CorporationAddress(BaseModel): """The ZIP code of the address.""" +class CorporationBeneficialOwnerIndividualAddress(BaseModel): + """The person's address.""" + + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" + + line1: str + """The first line of the address.""" + + line2: Optional[str] = None + """The second line of the address.""" + + state: Optional[str] = None + """ + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. + """ + + zip: Optional[str] = None + """The ZIP or postal code of the address.""" + + +class CorporationBeneficialOwnerIndividualIdentification(BaseModel): + """A means of verifying the person's identity.""" + + method: Literal[ + "social_security_number", "individual_taxpayer_identification_number", "passport", "drivers_license", "other" + ] + """A method that can be used to verify the individual's identity. + + - `social_security_number` - A social security number. + - `individual_taxpayer_identification_number` - An individual taxpayer + identification number (ITIN). + - `passport` - A passport number. + - `drivers_license` - A driver's license number. + - `other` - Another identifying document. + """ + + number_last4: str + """ + The last 4 digits of the identification number that can be used to verify the + individual's identity. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + +class CorporationBeneficialOwnerIndividual(BaseModel): + """Personal details for the beneficial owner.""" + + address: CorporationBeneficialOwnerIndividualAddress + """The person's address.""" + + date_of_birth: date + """The person's date of birth in YYYY-MM-DD format.""" + + identification: CorporationBeneficialOwnerIndividualIdentification + """A means of verifying the person's identity.""" + + name: str + """The person's legal name.""" + + +class CorporationBeneficialOwner(BaseModel): + id: str + """The identifier of this beneficial owner.""" + + company_title: Optional[str] = None + """This person's role or title within the entity.""" + + individual: CorporationBeneficialOwnerIndividual + """Personal details for the beneficial owner.""" + + prongs: List[Literal["ownership", "control"]] + """Why this person is considered a beneficial owner of the entity.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + + class Corporation(BaseModel): """Details of the corporation entity. @@ -70,7 +175,7 @@ class Corporation(BaseModel): address: CorporationAddress """The corporation's address.""" - beneficial_owners: List[EntityBeneficialOwner] + beneficial_owners: List[CorporationBeneficialOwner] """ The identifying details of anyone controlling or owning 25% or more of the corporation. diff --git a/src/increase/types/entity_beneficial_owner.py b/src/increase/types/entity_beneficial_owner.py index d16d5cf1b..6d16c7369 100644 --- a/src/increase/types/entity_beneficial_owner.py +++ b/src/increase/types/entity_beneficial_owner.py @@ -123,15 +123,3 @@ class EntityBeneficialOwner(BaseModel): For this resource it will always be `entity_beneficial_owner`. """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] From 9a173080abb47113eaa2570299d5db0d6ca21371 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 17:36:13 +0000 Subject: [PATCH 1216/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 878ea368c..3de0600fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.436.0" + ".": "0.437.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 02c598303..42e0f2869 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.436.0" +version = "0.437.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 80b671821..55b342eb8 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.436.0" # x-release-please-version +__version__ = "0.437.0" # x-release-please-version From 06a2429c1cf96a73f49fdc4762b4eae0428a7d06 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 17:55:45 +0000 Subject: [PATCH 1217/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_beneficial_owner.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8db47988d..9fd9919ff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6cc15216773be06ef5899a9f805480d69ba2e610a3746bb638c7773baa10c407.yml -openapi_spec_hash: c24d9a85acb17d73e8d6434d7c907d40 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2aab30efad14c2af42a235cff57e4f530dcc7f223df00093d9d171186d5f2c5e.yml +openapi_spec_hash: 08496939ae1bdbbe2aee358b693020f8 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/entity_beneficial_owner.py b/src/increase/types/entity_beneficial_owner.py index 6d16c7369..8352e148c 100644 --- a/src/increase/types/entity_beneficial_owner.py +++ b/src/increase/types/entity_beneficial_owner.py @@ -104,6 +104,9 @@ class EntityBeneficialOwner(BaseModel): Beneficial Owner was created. """ + entity_id: str + """The identifier of the Entity to which this beneficial owner belongs.""" + idempotency_key: Optional[str] = None """The idempotency key you chose for this object. From fdad15a3c43170d27349bae898f6277ab41d1f13 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 17:58:55 +0000 Subject: [PATCH 1218/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3de0600fe..3c933c245 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.437.0" + ".": "0.438.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 42e0f2869..6e0acaccc 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.437.0" +version = "0.438.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 55b342eb8..aecb17d40 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.437.0" # x-release-please-version +__version__ = "0.438.0" # x-release-please-version From 0daf3ae37b63bba4ec995678b9f74a768d089147 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 19:59:07 +0000 Subject: [PATCH 1219/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_push_transfer.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9fd9919ff..47042c860 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2aab30efad14c2af42a235cff57e4f530dcc7f223df00093d9d171186d5f2c5e.yml -openapi_spec_hash: 08496939ae1bdbbe2aee358b693020f8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-842d7a1e6cff968c70110dc90a9e51da05e2f781e902d6f5ca71940e4b9688e1.yml +openapi_spec_hash: c3aabecf5bb2135391d6b8faef4ac1b3 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 2f4c3343b..aa1297dd2 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -698,6 +698,9 @@ class CardPushTransfer(BaseModel): approved, this will contain details of the cancellation. """ + card_token_id: str + """The ID of the Card Token that was used to validate the card.""" + created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which From 7213051b9cd4d7c442148c241d9d3d0ba5a1f3c1 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 20:02:05 +0000 Subject: [PATCH 1220/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3c933c245..2e06584a9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.438.0" + ".": "0.439.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6e0acaccc..6e5b54362 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.438.0" +version = "0.439.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index aecb17d40..6212429fb 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.438.0" # x-release-please-version +__version__ = "0.439.0" # x-release-please-version From af93f99ea9d85842b7cb3c07ef45b1449348a17b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 23:03:33 +0000 Subject: [PATCH 1221/1325] feat(api): api update --- .stats.yml | 4 +- tests/api_resources/test_beneficial_owners.py | 40 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/.stats.yml b/.stats.yml index 47042c860..61f8a56f6 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-842d7a1e6cff968c70110dc90a9e51da05e2f781e902d6f5ca71940e4b9688e1.yml -openapi_spec_hash: c3aabecf5bb2135391d6b8faef4ac1b3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2d7155feee87cb1c64ae2b6f31d769c46725b615f1622558f998f2a637cfb57c.yml +openapi_spec_hash: c3117360164f38ece4a984800813813c config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/tests/api_resources/test_beneficial_owners.py b/tests/api_resources/test_beneficial_owners.py index 7ab7279d0..f41b5c45f 100644 --- a/tests/api_resources/test_beneficial_owners.py +++ b/tests/api_resources/test_beneficial_owners.py @@ -141,14 +141,14 @@ def test_streaming_response_create(self, client: Increase) -> None: @parametrize def test_method_retrieve(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize def test_raw_response_retrieve(self, client: Increase) -> None: response = client.beneficial_owners.with_raw_response.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -159,7 +159,7 @@ def test_raw_response_retrieve(self, client: Increase) -> None: @parametrize def test_streaming_response_retrieve(self, client: Increase) -> None: with client.beneficial_owners.with_streaming_response.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -181,14 +181,14 @@ def test_path_params_retrieve(self, client: Increase) -> None: @parametrize def test_method_update(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize def test_method_update_with_all_params(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", address={ "city": "New York", "country": "US", @@ -227,7 +227,7 @@ def test_method_update_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_update(self, client: Increase) -> None: response = client.beneficial_owners.with_raw_response.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -238,7 +238,7 @@ def test_raw_response_update(self, client: Increase) -> None: @parametrize def test_streaming_response_update(self, client: Increase) -> None: with client.beneficial_owners.with_streaming_response.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -301,14 +301,14 @@ def test_streaming_response_list(self, client: Increase) -> None: @parametrize def test_method_archive(self, client: Increase) -> None: beneficial_owner = client.beneficial_owners.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize def test_raw_response_archive(self, client: Increase) -> None: response = client.beneficial_owners.with_raw_response.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -319,7 +319,7 @@ def test_raw_response_archive(self, client: Increase) -> None: @parametrize def test_streaming_response_archive(self, client: Increase) -> None: with client.beneficial_owners.with_streaming_response.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -464,14 +464,14 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N @parametrize async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: response = await async_client.beneficial_owners.with_raw_response.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -482,7 +482,7 @@ async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: async with async_client.beneficial_owners.with_streaming_response.retrieve( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -504,14 +504,14 @@ async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_update(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", address={ "city": "New York", "country": "US", @@ -550,7 +550,7 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: response = await async_client.beneficial_owners.with_raw_response.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -561,7 +561,7 @@ async def test_raw_response_update(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_update(self, async_client: AsyncIncrease) -> None: async with async_client.beneficial_owners.with_streaming_response.update( - entity_beneficial_owner_id="entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + entity_beneficial_owner_id="entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -624,14 +624,14 @@ async def test_streaming_response_list(self, async_client: AsyncIncrease) -> Non @parametrize async def test_method_archive(self, async_client: AsyncIncrease) -> None: beneficial_owner = await async_client.beneficial_owners.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert_matches_type(EntityBeneficialOwner, beneficial_owner, path=["response"]) @parametrize async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: response = await async_client.beneficial_owners.with_raw_response.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) assert response.is_closed is True @@ -642,7 +642,7 @@ async def test_raw_response_archive(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_archive(self, async_client: AsyncIncrease) -> None: async with async_client.beneficial_owners.with_streaming_response.archive( - "entity_setup_beneficial_owner_submission_vgkyk7dj5eb4sfhdbkx7", + "entity_beneficial_owner_vozma8szzu1sxezp5zq6", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 4f2fe12488f4d0f3286f2b80c640f8d858f60a2c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 12 Mar 2026 23:06:41 +0000 Subject: [PATCH 1222/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 2e06584a9..c15669fda 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.439.0" + ".": "0.440.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6e5b54362..233887529 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.439.0" +version = "0.440.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6212429fb..3b399ee85 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.439.0" # x-release-please-version +__version__ = "0.440.0" # x-release-please-version From 15ca0b7bd53848da4a1a82577bcf00012ab1627b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:54:21 +0000 Subject: [PATCH 1223/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/intrafi_balance.py | 34 +++++++++++++++++++++------ 2 files changed, 29 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 61f8a56f6..3edafa840 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2d7155feee87cb1c64ae2b6f31d769c46725b615f1622558f998f2a637cfb57c.yml -openapi_spec_hash: c3117360164f38ece4a984800813813c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a9671050881b7d7579bd118589b25ed43dccb69677f5ab8576df6f70de9a0dc.yml +openapi_spec_hash: b72da714aeef1e6652e6cc595ef65f94 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/intrafi_balance.py b/src/increase/types/intrafi_balance.py index 590110197..bab736f39 100644 --- a/src/increase/types/intrafi_balance.py +++ b/src/increase/types/intrafi_balance.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import List, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import date from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["IntrafiBalance", "Balance", "BalanceBankLocation"] @@ -20,9 +22,6 @@ class BalanceBankLocation(BaseModel): class Balance(BaseModel): - id: str - """The identifier of this balance.""" - balance: int """The balance, in minor units of `currency`, held with this bank.""" @@ -39,15 +38,24 @@ class Balance(BaseModel): identify the institution. """ + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class IntrafiBalance(BaseModel): """ When using IntraFi, each account's balance over the standard FDIC insurance amount is swept to various other institutions. Funds are rebalanced across banks as needed once per business day. """ - id: str - """The identifier of this balance.""" - balances: List[Balance] """Each entry represents a balance held at a different bank. @@ -77,3 +85,15 @@ class IntrafiBalance(BaseModel): For this resource it will always be `intrafi_balance`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From 3ef32215bf33c51f4fcefafd2b7f8d7282ec9214 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 00:57:20 +0000 Subject: [PATCH 1224/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c15669fda..e817625b2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.440.0" + ".": "0.441.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 233887529..266965767 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.440.0" +version = "0.441.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3b399ee85..92535b142 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.440.0" # x-release-please-version +__version__ = "0.441.0" # x-release-please-version From 4c1e8b2de4689cf413804ed950992f8fe90e63a4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:15:38 +0000 Subject: [PATCH 1225/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 6 +++--- src/increase/types/real_time_decision.py | 6 +++--- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3edafa840..3f376ee16 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a9671050881b7d7579bd118589b25ed43dccb69677f5ab8576df6f70de9a0dc.yml -openapi_spec_hash: b72da714aeef1e6652e6cc595ef65f94 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fae765b6b1b34f9c649fec11885e4d0e5b8b1cab0baf0f440dfd5eba040e7047.yml +openapi_spec_hash: 9900b1c763a43261e0288896379541fe config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 5df6a9eb6..a27880957 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -375,7 +375,7 @@ class ElementCardAuthentication(BaseModel): id: str """The Card Authentication identifier.""" - access_control_server_transaction_id: str + access_control_server_transaction_identifier: str """ A unique identifier assigned by the Access Control Server (us) for this transaction. @@ -467,7 +467,7 @@ class ElementCardAuthentication(BaseModel): device_channel: ElementCardAuthenticationDeviceChannel """The device channel of the card authentication attempt.""" - directory_server_transaction_id: str + directory_server_transaction_identifier: str """ A unique identifier assigned by the Directory Server (the card network) for this transaction. @@ -619,7 +619,7 @@ class ElementCardAuthentication(BaseModel): threshold. """ - three_d_secure_server_transaction_id: str + three_d_secure_server_transaction_identifier: str """ A unique identifier assigned by the 3DS Server initiating the authentication attempt for this transaction. diff --git a/src/increase/types/real_time_decision.py b/src/increase/types/real_time_decision.py index 59b05d2bf..316ac348d 100644 --- a/src/increase/types/real_time_decision.py +++ b/src/increase/types/real_time_decision.py @@ -224,7 +224,7 @@ class CardAuthenticationMessageCategory(BaseModel): class CardAuthentication(BaseModel): """Fields related to a 3DS authentication attempt.""" - access_control_server_transaction_id: str + access_control_server_transaction_identifier: str """ A unique identifier assigned by the Access Control Server (us) for this transaction. @@ -296,7 +296,7 @@ class CardAuthentication(BaseModel): device_channel: CardAuthenticationDeviceChannel """The device channel of the card authentication attempt.""" - directory_server_transaction_id: str + directory_server_transaction_identifier: str """ A unique identifier assigned by the Directory Server (the card network) for this transaction. @@ -414,7 +414,7 @@ class CardAuthentication(BaseModel): shipping_address_state: Optional[str] = None """The US state of the shipping address associated with this purchase.""" - three_d_secure_server_transaction_id: str + three_d_secure_server_transaction_identifier: str """ A unique identifier assigned by the 3DS Server initiating the authentication attempt for this transaction. From c32c86f8a244ab07cb68b87621414aaf53b21a36 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 18:18:36 +0000 Subject: [PATCH 1226/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e817625b2..585712c6f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.441.0" + ".": "0.442.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 266965767..feecb30a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.441.0" +version = "0.442.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 92535b142..eed4834e4 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.441.0" # x-release-please-version +__version__ = "0.442.0" # x-release-please-version From aa94910cab10addd434e06808b8094da234c0950 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 19:01:03 +0000 Subject: [PATCH 1227/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3f376ee16..7415bfa22 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-fae765b6b1b34f9c649fec11885e4d0e5b8b1cab0baf0f440dfd5eba040e7047.yml -openapi_spec_hash: 9900b1c763a43261e0288896379541fe +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-456b3255914e823b9e463f97ff81124dfabefae6f102e0f295bf33b7cfb1b780.yml +openapi_spec_hash: ccbeda7ba9b61f9a8c2f9f4cf7a65dce config_hash: 25d7d7aa4882db6189b4b53e8e249e80 From df818b59c794b1311487701c0212c6661cf1c417 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:12:42 +0000 Subject: [PATCH 1228/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/entity.py | 100 ++++++++++++++++++++++++++++++++++- 2 files changed, 101 insertions(+), 3 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7415bfa22..62f093dcf 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-456b3255914e823b9e463f97ff81124dfabefae6f102e0f295bf33b7cfb1b780.yml -openapi_spec_hash: ccbeda7ba9b61f9a8c2f9f4cf7a65dce +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5ad75c7a80acd1cb3ff0483fa0b5b2eb9d73287f107f53a8fb3a3a0b6a32ed8.yml +openapi_spec_hash: da73faf476df3eddcf0ac51c38dd1b17 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 4d4ff37db..288deb140 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -39,6 +39,12 @@ "TrustTrusteeIndividual", "TrustTrusteeIndividualAddress", "TrustTrusteeIndividualIdentification", + "Validation", + "ValidationIssue", + "ValidationIssueBeneficialOwnerAddress", + "ValidationIssueBeneficialOwnerIdentity", + "ValidationIssueEntityAddress", + "ValidationIssueEntityTaxIdentifier", ] @@ -703,10 +709,99 @@ class Trust(BaseModel): """The trustees of the trust.""" +class ValidationIssueBeneficialOwnerAddress(BaseModel): + """Details when the issue is with a beneficial owner's address.""" + + beneficial_owner_id: str + """The ID of the beneficial owner.""" + + reason: Literal["mailbox_address"] + """The reason the address is invalid. + + - `mailbox_address` - The address is a mailbox or other non-physical address. + """ + + +class ValidationIssueBeneficialOwnerIdentity(BaseModel): + """Details when the issue is with a beneficial owner's identity verification.""" + + beneficial_owner_id: str + """The ID of the beneficial owner.""" + + +class ValidationIssueEntityAddress(BaseModel): + """Details when the issue is with the entity's address.""" + + reason: Literal["mailbox_address"] + """The reason the address is invalid. + + - `mailbox_address` - The address is a mailbox or other non-physical address. + """ + + +class ValidationIssueEntityTaxIdentifier(BaseModel): + """Details when the issue is with the entity's tax ID.""" + + pass + + +class ValidationIssue(BaseModel): + beneficial_owner_address: Optional[ValidationIssueBeneficialOwnerAddress] = None + """Details when the issue is with a beneficial owner's address.""" + + beneficial_owner_identity: Optional[ValidationIssueBeneficialOwnerIdentity] = None + """Details when the issue is with a beneficial owner's identity verification.""" + + category: Literal[ + "entity_tax_identifier", "entity_address", "beneficial_owner_identity", "beneficial_owner_address" + ] + """The type of issue. + + We may add additional possible values for this enum over time; your application + should be able to handle such additions gracefully. + + - `entity_tax_identifier` - The entity's tax identifier could not be validated. + Update the tax ID with the + [update an entity API](/documentation/api/entities#update-an-entity.corporation.tax_identifier). + - `entity_address` - The entity's address could not be validated. Update the + address with the + [update an entity API](/documentation/api/entities#update-an-entity.corporation.address). + - `beneficial_owner_identity` - A beneficial owner's identity could not be + verified. Update the identification with the + [update a beneficial owner API](/documentation/api/beneficial-owners#update-a-beneficial-owner). + - `beneficial_owner_address` - A beneficial owner's address could not be + validated. Update the address with the + [update a beneficial owner API](/documentation/api/beneficial-owners#update-a-beneficial-owner). + """ + + entity_address: Optional[ValidationIssueEntityAddress] = None + """Details when the issue is with the entity's address.""" + + entity_tax_identifier: Optional[ValidationIssueEntityTaxIdentifier] = None + """Details when the issue is with the entity's tax ID.""" + + +class Validation(BaseModel): + """The validation results for the entity.""" + + issues: List[ValidationIssue] + """The list of issues that need to be addressed.""" + + status: Literal["pending", "valid", "invalid"] + """The validation status for the entity. + + If the status is `invalid`, the `issues` array will be populated. + + - `pending` - The submitted data is being validated. + - `valid` - The submitted data is valid. + - `invalid` - Additional information is required to validate the data. + """ + + class Entity(BaseModel): """Entities are the legal entities that own accounts. - They can be people, corporations, partnerships, government authorities, or trusts. + They can be people, corporations, partnerships, government authorities, or trusts. To learn more, see [Entities](/documentation/entities). """ id: str @@ -818,6 +913,9 @@ class Entity(BaseModel): For this resource it will always be `entity`. """ + validation: Optional[Validation] = None + """The validation results for the entity.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. From 7a178016619eb5cd36903ad3652c99be98f7cd24 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 13 Mar 2026 23:15:44 +0000 Subject: [PATCH 1229/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 585712c6f..c483112c6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.442.0" + ".": "0.443.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index feecb30a5..3bc399aa6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.442.0" +version = "0.443.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index eed4834e4..5699c3e75 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.442.0" # x-release-please-version +__version__ = "0.443.0" # x-release-please-version From 13d04e960d0ac48d9bcf231ae8c25c312983d3a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 00:08:19 +0000 Subject: [PATCH 1230/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_push_transfer.py | 7 +++++++ src/increase/types/card_validation.py | 7 +++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 62f093dcf..c0c45d4b9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-d5ad75c7a80acd1cb3ff0483fa0b5b2eb9d73287f107f53a8fb3a3a0b6a32ed8.yml -openapi_spec_hash: da73faf476df3eddcf0ac51c38dd1b17 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-81da26cfd6540bc5195c268095b26df132373e932997f224d19247a36e1a1183.yml +openapi_spec_hash: 7b9bbc35378f2fc47629810923bd0017 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index aa1297dd2..ce3de14dd 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -765,6 +765,13 @@ class CardPushTransfer(BaseModel): recipient_name: str """The name of the funds recipient.""" + route: Literal["visa", "mastercard"] + """The card network route used for the transfer. + + - `visa` - Visa and Interlink + - `mastercard` - Mastercard and Maestro + """ + sender_address_city: str """The city of the sender.""" diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 8c27a071f..3f73ba769 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -381,6 +381,13 @@ class CardValidation(BaseModel): merchant_state: str """The U.S. state where the merchant (typically your business) is located.""" + route: Literal["visa", "mastercard"] + """The card network route used for the validation. + + - `visa` - Visa and Interlink + - `mastercard` - Mastercard and Maestro + """ + status: Literal["requires_attention", "pending_submission", "submitted", "complete", "declined"] """The lifecycle status of the validation. From 315607732795b1d47d2b993234b2a9dd40092084 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 00:11:14 +0000 Subject: [PATCH 1231/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c483112c6..3a1207b62 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.443.0" + ".": "0.444.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3bc399aa6..2d356b571 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.443.0" +version = "0.444.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5699c3e75..560dda0fa 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.443.0" # x-release-please-version +__version__ = "0.444.0" # x-release-please-version From 6e3265767923d9f147770b4c0c176242ac8c84b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 04:25:57 +0000 Subject: [PATCH 1232/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity.py | 10 ++++++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index c0c45d4b9..c2ad6972f 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-81da26cfd6540bc5195c268095b26df132373e932997f224d19247a36e1a1183.yml -openapi_spec_hash: 7b9bbc35378f2fc47629810923bd0017 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f8f6ba45132556b8cd3b7aec8578241638d4774e41ac769df78731d919c1825f.yml +openapi_spec_hash: 9c80a378f9fb89d648f47596aef948d9 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 288deb140..dbf235a7a 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -782,7 +782,10 @@ class ValidationIssue(BaseModel): class Validation(BaseModel): - """The validation results for the entity.""" + """The validation results for the entity. + + Learn more about [validations](/documentation/entity-validation). + """ issues: List[ValidationIssue] """The list of issues that need to be addressed.""" @@ -914,7 +917,10 @@ class Entity(BaseModel): """ validation: Optional[Validation] = None - """The validation results for the entity.""" + """The validation results for the entity. + + Learn more about [validations](/documentation/entity-validation). + """ if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a From fe09dcbb476a4122c0f499a4fa940cc0ad054025 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 10:41:03 +0000 Subject: [PATCH 1233/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3a1207b62..e34e55c0b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.444.0" + ".": "0.445.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2d356b571..ab8b7bdab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.444.0" +version = "0.445.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 560dda0fa..4da0c26c5 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.444.0" # x-release-please-version +__version__ = "0.445.0" # x-release-please-version From 939d0605122e7bd34b07d10d3b53cacb5eab85b0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 16:37:42 +0000 Subject: [PATCH 1234/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index c2ad6972f..eef567c92 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f8f6ba45132556b8cd3b7aec8578241638d4774e41ac769df78731d919c1825f.yml -openapi_spec_hash: 9c80a378f9fb89d648f47596aef948d9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c964c697b9545e26471dd5e8c9b83f7efe803561637c072efd8706dfe3f1839.yml +openapi_spec_hash: a8e4426f491b10f93457a6cd517d948e config_hash: 25d7d7aa4882db6189b4b53e8e249e80 From de5404126d2bb295fc6d8524687ad89929d21ddb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:38:51 +0000 Subject: [PATCH 1235/1325] fix(pydantic): do not pass `by_alias` unless set --- src/increase/_compat.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/increase/_compat.py b/src/increase/_compat.py index 786ff42ad..e6690a4f2 100644 --- a/src/increase/_compat.py +++ b/src/increase/_compat.py @@ -2,7 +2,7 @@ from typing import TYPE_CHECKING, Any, Union, Generic, TypeVar, Callable, cast, overload from datetime import date, datetime -from typing_extensions import Self, Literal +from typing_extensions import Self, Literal, TypedDict import pydantic from pydantic.fields import FieldInfo @@ -131,6 +131,10 @@ def model_json(model: pydantic.BaseModel, *, indent: int | None = None) -> str: return model.model_dump_json(indent=indent) +class _ModelDumpKwargs(TypedDict, total=False): + by_alias: bool + + def model_dump( model: pydantic.BaseModel, *, @@ -142,6 +146,9 @@ def model_dump( by_alias: bool | None = None, ) -> dict[str, Any]: if (not PYDANTIC_V1) or hasattr(model, "model_dump"): + kwargs: _ModelDumpKwargs = {} + if by_alias is not None: + kwargs["by_alias"] = by_alias return model.model_dump( mode=mode, exclude=exclude, @@ -149,7 +156,7 @@ def model_dump( exclude_defaults=exclude_defaults, # warnings are not supported in Pydantic v1 warnings=True if PYDANTIC_V1 else warnings, - by_alias=by_alias, + **kwargs, ) return cast( "dict[str, Any]", From 704e0258df103b3fb7e84b13f15445040ceed014 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:42:16 +0000 Subject: [PATCH 1236/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e34e55c0b..6261f8bb9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.445.0" + ".": "0.445.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ab8b7bdab..9f31224a3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.445.0" +version = "0.445.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 4da0c26c5..42a93d355 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.445.0" # x-release-please-version +__version__ = "0.445.1" # x-release-please-version From b32f529ddd9298a9b24110df42c11e7a908311e3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:08:52 +0000 Subject: [PATCH 1237/1325] fix(deps): bump minimum typing-extensions version --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 9f31224a3..44c92062e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -11,7 +11,7 @@ authors = [ dependencies = [ "httpx>=0.23.0, <1", "pydantic>=1.9.0, <3", - "typing-extensions>=4.10, <5", + "typing-extensions>=4.14, <5", "anyio>=3.5.0, <5", "distro>=1.7.0, <2", "sniffio", From c5c399d63d01d04cab1fda1b63ec135caa241bd7 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:12:10 +0000 Subject: [PATCH 1238/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6261f8bb9..11b781d13 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.445.1" + ".": "0.445.2" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 44c92062e..02c05c8a2 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.445.1" +version = "0.445.2" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 42a93d355..19011eb52 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.445.1" # x-release-please-version +__version__ = "0.445.2" # x-release-please-version From ce10a9338c18b26883ac7dc35ad677b5f46a5a4b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 19:59:04 +0000 Subject: [PATCH 1239/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_push_transfer.py | 3 +++ src/increase/types/card_validation.py | 3 +++ src/increase/types/simulations/card_token_create_params.py | 3 +++ 4 files changed, 11 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index eef567c92..77a706123 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5c964c697b9545e26471dd5e8c9b83f7efe803561637c072efd8706dfe3f1839.yml -openapi_spec_hash: a8e4426f491b10f93457a6cd517d948e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-36f56ec639c447a9374b42b2dc9e278844c838d51b88c4f128e7e46662a75a81.yml +openapi_spec_hash: 7c15b5db4bf14fd71f7220a445ae2ada config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index ce3de14dd..1d83db9aa 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -170,6 +170,7 @@ class Decline(BaseModel): "expired_card", "transaction_not_permitted_to_cardholder", "transaction_not_allowed_at_terminal", + "transaction_not_supported_or_blocked_by_issuer", "suspected_fraud", "activity_amount_limit_exceeded", "restricted_card", @@ -226,6 +227,8 @@ class Decline(BaseModel): for this cardholder. - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this terminal. + - `transaction_not_supported_or_blocked_by_issuer` - The transaction is not + supported or has been blocked by the issuer. - `suspected_fraud` - The transaction has been flagged as suspected fraud and cannot be processed. - `activity_amount_limit_exceeded` - The amount of activity on the card has diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 3f73ba769..5e4af80db 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -180,6 +180,7 @@ class Decline(BaseModel): "expired_card", "transaction_not_permitted_to_cardholder", "transaction_not_allowed_at_terminal", + "transaction_not_supported_or_blocked_by_issuer", "suspected_fraud", "activity_amount_limit_exceeded", "restricted_card", @@ -236,6 +237,8 @@ class Decline(BaseModel): for this cardholder. - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this terminal. + - `transaction_not_supported_or_blocked_by_issuer` - The transaction is not + supported or has been blocked by the issuer. - `suspected_fraud` - The transaction has been flagged as suspected fraud and cannot be processed. - `activity_amount_limit_exceeded` - The amount of activity on the card has diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py index 9cd6986db..b73aea03e 100644 --- a/src/increase/types/simulations/card_token_create_params.py +++ b/src/increase/types/simulations/card_token_create_params.py @@ -81,6 +81,7 @@ class OutcomeDecline(TypedDict, total=False): "expired_card", "transaction_not_permitted_to_cardholder", "transaction_not_allowed_at_terminal", + "transaction_not_supported_or_blocked_by_issuer", "suspected_fraud", "activity_amount_limit_exceeded", "restricted_card", @@ -137,6 +138,8 @@ class OutcomeDecline(TypedDict, total=False): for this cardholder. - `transaction_not_allowed_at_terminal` - The transaction is not allowed at this terminal. + - `transaction_not_supported_or_blocked_by_issuer` - The transaction is not + supported or has been blocked by the issuer. - `suspected_fraud` - The transaction has been flagged as suspected fraud and cannot be processed. - `activity_amount_limit_exceeded` - The amount of activity on the card has From 46985befa0eab66bb175da2acbda18432bc720cb Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:02:12 +0000 Subject: [PATCH 1240/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 11b781d13..d5f4d2ce5 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.445.2" + ".": "0.446.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 02c05c8a2..8cfa26cde 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.445.2" +version = "0.446.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 19011eb52..049b4b7f2 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.445.2" # x-release-please-version +__version__ = "0.446.0" # x-release-please-version From 26ade44b80a6d76ff6d2a1fdaf98ec1456e4d3e2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 20:51:48 +0000 Subject: [PATCH 1241/1325] chore(internal): tweak CI branches --- .github/workflows/ci.yml | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 084a05eda..b2b4443f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,14 @@ name: CI on: push: - branches-ignore: - - 'generated' - - 'codegen/**' - - 'integrated/**' - - 'stl-preview-head/**' - - 'stl-preview-base/**' + branches: + - '**' + - '!integrated/**' + - '!stl-preview-head/**' + - '!stl-preview-base/**' + - '!generated' + - '!codegen/**' + - 'codegen/stl/**' pull_request: branches-ignore: - 'stl-preview-head/**' From 02e5a4f213f4cc0ab7d1d8426ac727c7fde42eac Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 17 Mar 2026 19:51:32 +0000 Subject: [PATCH 1242/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 77a706123..9e9fcd4fd 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-36f56ec639c447a9374b42b2dc9e278844c838d51b88c4f128e7e46662a75a81.yml -openapi_spec_hash: 7c15b5db4bf14fd71f7220a445ae2ada +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-58c8e720561e1df665b4f5bf35a4dedba1dba3f01d20f8ef5f662d093c432f4d.yml +openapi_spec_hash: 75dfc5fb4c8d03524aa1bc5587835039 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 From e53aed786b1f850e8d7996804391521c98889570 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:43:23 +0000 Subject: [PATCH 1243/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_push_transfer.py | 2 ++ src/increase/types/card_validation.py | 2 ++ src/increase/types/simulations/card_token_create_params.py | 2 ++ 4 files changed, 8 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 9e9fcd4fd..b2955447b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-58c8e720561e1df665b4f5bf35a4dedba1dba3f01d20f8ef5f662d093c432f4d.yml -openapi_spec_hash: 75dfc5fb4c8d03524aa1bc5587835039 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-732196e2e3b5f785aafd5a7035f8683adc6060fe483a24787e3b6085f99d1cfe.yml +openapi_spec_hash: c929ecc168017a4a2d8343384a0a33f8 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 1d83db9aa..4740484f4 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -176,6 +176,7 @@ class Decline(BaseModel): "restricted_card", "security_violation", "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_by_cardholder", "blocked_first_use", "credit_issuer_unavailable", "negative_card_verification_value_results", @@ -240,6 +241,7 @@ class Decline(BaseModel): - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The transaction does not meet the anti-money laundering requirements set by the issuer. + - `blocked_by_cardholder` - The transaction was blocked by the cardholder. - `blocked_first_use` - The first use of the card has been blocked by the issuer. - `credit_issuer_unavailable` - The credit issuer is currently unavailable to diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 5e4af80db..5d18b9b5a 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -186,6 +186,7 @@ class Decline(BaseModel): "restricted_card", "security_violation", "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_by_cardholder", "blocked_first_use", "credit_issuer_unavailable", "negative_card_verification_value_results", @@ -250,6 +251,7 @@ class Decline(BaseModel): - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The transaction does not meet the anti-money laundering requirements set by the issuer. + - `blocked_by_cardholder` - The transaction was blocked by the cardholder. - `blocked_first_use` - The first use of the card has been blocked by the issuer. - `credit_issuer_unavailable` - The credit issuer is currently unavailable to diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py index b73aea03e..3184796f1 100644 --- a/src/increase/types/simulations/card_token_create_params.py +++ b/src/increase/types/simulations/card_token_create_params.py @@ -87,6 +87,7 @@ class OutcomeDecline(TypedDict, total=False): "restricted_card", "security_violation", "transaction_does_not_fulfill_anti_money_laundering_requirement", + "blocked_by_cardholder", "blocked_first_use", "credit_issuer_unavailable", "negative_card_verification_value_results", @@ -151,6 +152,7 @@ class OutcomeDecline(TypedDict, total=False): - `transaction_does_not_fulfill_anti_money_laundering_requirement` - The transaction does not meet the anti-money laundering requirements set by the issuer. + - `blocked_by_cardholder` - The transaction was blocked by the cardholder. - `blocked_first_use` - The first use of the card has been blocked by the issuer. - `credit_issuer_unavailable` - The credit issuer is currently unavailable to From 12b311c911badc7bca5fa4a5d73c8a5a9261af29 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 03:46:12 +0000 Subject: [PATCH 1244/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d5f4d2ce5..0510f41f2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.446.0" + ".": "0.447.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8cfa26cde..942366ebd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.446.0" +version = "0.447.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 049b4b7f2..9c33aa9dd 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.446.0" # x-release-please-version +__version__ = "0.447.0" # x-release-please-version From 65c392e34b575a9bc8320462275315ff66ff3d7d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 04:35:37 +0000 Subject: [PATCH 1245/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_push_transfer.py | 63 +++++++++++++++++++ src/increase/types/card_validation.py | 63 +++++++++++++++++++ .../simulations/card_token_create_params.py | 63 +++++++++++++++++++ 4 files changed, 191 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index b2955447b..5a0f7c11c 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-732196e2e3b5f785aafd5a7035f8683adc6060fe483a24787e3b6085f99d1cfe.yml -openapi_spec_hash: c929ecc168017a4a2d8343384a0a33f8 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1bab7be736382985590e568f2b01d1a195c0228b8f2c6599d73335510113e41a.yml +openapi_spec_hash: 222819fc58fce5959c13e13b507239bc config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index 4740484f4..b63ca9c49 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -191,6 +191,29 @@ class Decline(BaseModel): "stop_payment_order", "revocation_of_authorization_order", "revocation_of_all_authorizations_order", + "unable_to_locate_record", + "file_is_temporarily_unavailable", + "incorrect_pin", + "allowable_number_of_pin_entry_tries_exceeded", + "unable_to_locate_previous_message", + "data_inconsistent_with_original_message", + "pin_error_found", + "cannot_verify_pin", + "verification_data_failed", + "surcharge_amount_not_supported_by_debit_network_issuer", + "cash_service_not_available", + "cashback_request_exceeds_issuer_limit", + "transaction_amount_exceeds_pre_authorized_approval_amount", + "invalid_biller_information", + "pin_change_request_declined", + "unsafe_pin", + "transaction_does_not_qualify_for_visa_pin", + "offline_declined", + "unable_to_go_online", + "valid_account_but_amount_not_supported", + "invalid_use_of_merchant_category_code_correct_and_reattempt", + "forward_to_issuer", + "card_authentication_failed", ] """The reason why the transfer was declined. @@ -270,6 +293,46 @@ class Decline(BaseModel): authorization for this transaction. - `revocation_of_all_authorizations_order` - An order has been placed to revoke all authorizations for this cardholder. + - `unable_to_locate_record` - The record associated with the transaction could + not be located. + - `file_is_temporarily_unavailable` - The file needed for the transaction is + temporarily unavailable. + - `incorrect_pin` - The PIN entered for the transaction is incorrect. + - `allowable_number_of_pin_entry_tries_exceeded` - The allowable number of PIN + entry tries has been exceeded. + - `unable_to_locate_previous_message` - The previous message associated with the + transaction could not be located. + - `data_inconsistent_with_original_message` - The data in the transaction is + inconsistent with the original message. + - `pin_error_found` - An error was found with the PIN associated with the + transaction. + - `cannot_verify_pin` - The PIN associated with the transaction could not be + verified. + - `verification_data_failed` - The verification data associated with the + transaction has failed. + - `surcharge_amount_not_supported_by_debit_network_issuer` - The surcharge + amount is not supported by the debit network issuer. + - `cash_service_not_available` - Cash service is not available for this + transaction. + - `cashback_request_exceeds_issuer_limit` - The cashback request exceeds the + issuer limit. + - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction + amount exceeds the pre-authorized approval amount. + - `invalid_biller_information` - The biller information provided is invalid. + - `pin_change_request_declined` - The PIN change request has been declined. + - `unsafe_pin` - The PIN provided is considered unsafe. + - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify + for Visa PIN processing. + - `offline_declined` - The transaction was declined offline. + - `unable_to_go_online` - The terminal was unable to go online to process the + transaction. + - `valid_account_but_amount_not_supported` - The account is valid but the + transaction amount is not supported. + - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant + category code was used incorrectly; correct it and reattempt the transaction. + - `forward_to_issuer` - The transaction should be forwarded to the issuer for + processing. + - `card_authentication_failed` - The card authentication process has failed. """ diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 5d18b9b5a..10278c3ec 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -201,6 +201,29 @@ class Decline(BaseModel): "stop_payment_order", "revocation_of_authorization_order", "revocation_of_all_authorizations_order", + "unable_to_locate_record", + "file_is_temporarily_unavailable", + "incorrect_pin", + "allowable_number_of_pin_entry_tries_exceeded", + "unable_to_locate_previous_message", + "data_inconsistent_with_original_message", + "pin_error_found", + "cannot_verify_pin", + "verification_data_failed", + "surcharge_amount_not_supported_by_debit_network_issuer", + "cash_service_not_available", + "cashback_request_exceeds_issuer_limit", + "transaction_amount_exceeds_pre_authorized_approval_amount", + "invalid_biller_information", + "pin_change_request_declined", + "unsafe_pin", + "transaction_does_not_qualify_for_visa_pin", + "offline_declined", + "unable_to_go_online", + "valid_account_but_amount_not_supported", + "invalid_use_of_merchant_category_code_correct_and_reattempt", + "forward_to_issuer", + "card_authentication_failed", ] """The reason why the validation was declined. @@ -280,6 +303,46 @@ class Decline(BaseModel): authorization for this transaction. - `revocation_of_all_authorizations_order` - An order has been placed to revoke all authorizations for this cardholder. + - `unable_to_locate_record` - The record associated with the transaction could + not be located. + - `file_is_temporarily_unavailable` - The file needed for the transaction is + temporarily unavailable. + - `incorrect_pin` - The PIN entered for the transaction is incorrect. + - `allowable_number_of_pin_entry_tries_exceeded` - The allowable number of PIN + entry tries has been exceeded. + - `unable_to_locate_previous_message` - The previous message associated with the + transaction could not be located. + - `data_inconsistent_with_original_message` - The data in the transaction is + inconsistent with the original message. + - `pin_error_found` - An error was found with the PIN associated with the + transaction. + - `cannot_verify_pin` - The PIN associated with the transaction could not be + verified. + - `verification_data_failed` - The verification data associated with the + transaction has failed. + - `surcharge_amount_not_supported_by_debit_network_issuer` - The surcharge + amount is not supported by the debit network issuer. + - `cash_service_not_available` - Cash service is not available for this + transaction. + - `cashback_request_exceeds_issuer_limit` - The cashback request exceeds the + issuer limit. + - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction + amount exceeds the pre-authorized approval amount. + - `invalid_biller_information` - The biller information provided is invalid. + - `pin_change_request_declined` - The PIN change request has been declined. + - `unsafe_pin` - The PIN provided is considered unsafe. + - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify + for Visa PIN processing. + - `offline_declined` - The transaction was declined offline. + - `unable_to_go_online` - The terminal was unable to go online to process the + transaction. + - `valid_account_but_amount_not_supported` - The account is valid but the + transaction amount is not supported. + - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant + category code was used incorrectly; correct it and reattempt the transaction. + - `forward_to_issuer` - The transaction should be forwarded to the issuer for + processing. + - `card_authentication_failed` - The card authentication process has failed. """ diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py index 3184796f1..a496bd012 100644 --- a/src/increase/types/simulations/card_token_create_params.py +++ b/src/increase/types/simulations/card_token_create_params.py @@ -102,6 +102,29 @@ class OutcomeDecline(TypedDict, total=False): "stop_payment_order", "revocation_of_authorization_order", "revocation_of_all_authorizations_order", + "unable_to_locate_record", + "file_is_temporarily_unavailable", + "incorrect_pin", + "allowable_number_of_pin_entry_tries_exceeded", + "unable_to_locate_previous_message", + "data_inconsistent_with_original_message", + "pin_error_found", + "cannot_verify_pin", + "verification_data_failed", + "surcharge_amount_not_supported_by_debit_network_issuer", + "cash_service_not_available", + "cashback_request_exceeds_issuer_limit", + "transaction_amount_exceeds_pre_authorized_approval_amount", + "invalid_biller_information", + "pin_change_request_declined", + "unsafe_pin", + "transaction_does_not_qualify_for_visa_pin", + "offline_declined", + "unable_to_go_online", + "valid_account_but_amount_not_supported", + "invalid_use_of_merchant_category_code_correct_and_reattempt", + "forward_to_issuer", + "card_authentication_failed", ] """The reason for the decline. @@ -181,6 +204,46 @@ class OutcomeDecline(TypedDict, total=False): authorization for this transaction. - `revocation_of_all_authorizations_order` - An order has been placed to revoke all authorizations for this cardholder. + - `unable_to_locate_record` - The record associated with the transaction could + not be located. + - `file_is_temporarily_unavailable` - The file needed for the transaction is + temporarily unavailable. + - `incorrect_pin` - The PIN entered for the transaction is incorrect. + - `allowable_number_of_pin_entry_tries_exceeded` - The allowable number of PIN + entry tries has been exceeded. + - `unable_to_locate_previous_message` - The previous message associated with the + transaction could not be located. + - `data_inconsistent_with_original_message` - The data in the transaction is + inconsistent with the original message. + - `pin_error_found` - An error was found with the PIN associated with the + transaction. + - `cannot_verify_pin` - The PIN associated with the transaction could not be + verified. + - `verification_data_failed` - The verification data associated with the + transaction has failed. + - `surcharge_amount_not_supported_by_debit_network_issuer` - The surcharge + amount is not supported by the debit network issuer. + - `cash_service_not_available` - Cash service is not available for this + transaction. + - `cashback_request_exceeds_issuer_limit` - The cashback request exceeds the + issuer limit. + - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction + amount exceeds the pre-authorized approval amount. + - `invalid_biller_information` - The biller information provided is invalid. + - `pin_change_request_declined` - The PIN change request has been declined. + - `unsafe_pin` - The PIN provided is considered unsafe. + - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify + for Visa PIN processing. + - `offline_declined` - The transaction was declined offline. + - `unable_to_go_online` - The terminal was unable to go online to process the + transaction. + - `valid_account_but_amount_not_supported` - The account is valid but the + transaction amount is not supported. + - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant + category code was used incorrectly; correct it and reattempt the transaction. + - `forward_to_issuer` - The transaction should be forwarded to the issuer for + processing. + - `card_authentication_failed` - The card authentication process has failed. """ From 500f4f99ecc8183289cbdc69f88d057e599d9339 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 04:38:31 +0000 Subject: [PATCH 1246/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 0510f41f2..8358f5fe2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.447.0" + ".": "0.448.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 942366ebd..125b6cf5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.447.0" +version = "0.448.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 9c33aa9dd..b8ffcaa57 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.447.0" # x-release-please-version +__version__ = "0.448.0" # x-release-please-version From ee601ad7f1160cf77c8e24933575a36dd5f259aa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 04:51:31 +0000 Subject: [PATCH 1247/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_push_transfer.py | 12 ------------ src/increase/types/card_validation.py | 12 ------------ .../types/simulations/card_token_create_params.py | 12 ------------ 4 files changed, 2 insertions(+), 38 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5a0f7c11c..d4fff91f9 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1bab7be736382985590e568f2b01d1a195c0228b8f2c6599d73335510113e41a.yml -openapi_spec_hash: 222819fc58fce5959c13e13b507239bc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5444aa15ed771b293975e4ea457bbf96f3fd4268dab9cef1d64fc18efbba3718.yml +openapi_spec_hash: 94be74f7b294a338dd47d95721bb52ae config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_push_transfer.py b/src/increase/types/card_push_transfer.py index b63ca9c49..3b11c2c29 100644 --- a/src/increase/types/card_push_transfer.py +++ b/src/increase/types/card_push_transfer.py @@ -196,7 +196,6 @@ class Decline(BaseModel): "incorrect_pin", "allowable_number_of_pin_entry_tries_exceeded", "unable_to_locate_previous_message", - "data_inconsistent_with_original_message", "pin_error_found", "cannot_verify_pin", "verification_data_failed", @@ -204,15 +203,11 @@ class Decline(BaseModel): "cash_service_not_available", "cashback_request_exceeds_issuer_limit", "transaction_amount_exceeds_pre_authorized_approval_amount", - "invalid_biller_information", - "pin_change_request_declined", - "unsafe_pin", "transaction_does_not_qualify_for_visa_pin", "offline_declined", "unable_to_go_online", "valid_account_but_amount_not_supported", "invalid_use_of_merchant_category_code_correct_and_reattempt", - "forward_to_issuer", "card_authentication_failed", ] """The reason why the transfer was declined. @@ -302,8 +297,6 @@ class Decline(BaseModel): entry tries has been exceeded. - `unable_to_locate_previous_message` - The previous message associated with the transaction could not be located. - - `data_inconsistent_with_original_message` - The data in the transaction is - inconsistent with the original message. - `pin_error_found` - An error was found with the PIN associated with the transaction. - `cannot_verify_pin` - The PIN associated with the transaction could not be @@ -318,9 +311,6 @@ class Decline(BaseModel): issuer limit. - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction amount exceeds the pre-authorized approval amount. - - `invalid_biller_information` - The biller information provided is invalid. - - `pin_change_request_declined` - The PIN change request has been declined. - - `unsafe_pin` - The PIN provided is considered unsafe. - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify for Visa PIN processing. - `offline_declined` - The transaction was declined offline. @@ -330,8 +320,6 @@ class Decline(BaseModel): transaction amount is not supported. - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant category code was used incorrectly; correct it and reattempt the transaction. - - `forward_to_issuer` - The transaction should be forwarded to the issuer for - processing. - `card_authentication_failed` - The card authentication process has failed. """ diff --git a/src/increase/types/card_validation.py b/src/increase/types/card_validation.py index 10278c3ec..fd0450c01 100644 --- a/src/increase/types/card_validation.py +++ b/src/increase/types/card_validation.py @@ -206,7 +206,6 @@ class Decline(BaseModel): "incorrect_pin", "allowable_number_of_pin_entry_tries_exceeded", "unable_to_locate_previous_message", - "data_inconsistent_with_original_message", "pin_error_found", "cannot_verify_pin", "verification_data_failed", @@ -214,15 +213,11 @@ class Decline(BaseModel): "cash_service_not_available", "cashback_request_exceeds_issuer_limit", "transaction_amount_exceeds_pre_authorized_approval_amount", - "invalid_biller_information", - "pin_change_request_declined", - "unsafe_pin", "transaction_does_not_qualify_for_visa_pin", "offline_declined", "unable_to_go_online", "valid_account_but_amount_not_supported", "invalid_use_of_merchant_category_code_correct_and_reattempt", - "forward_to_issuer", "card_authentication_failed", ] """The reason why the validation was declined. @@ -312,8 +307,6 @@ class Decline(BaseModel): entry tries has been exceeded. - `unable_to_locate_previous_message` - The previous message associated with the transaction could not be located. - - `data_inconsistent_with_original_message` - The data in the transaction is - inconsistent with the original message. - `pin_error_found` - An error was found with the PIN associated with the transaction. - `cannot_verify_pin` - The PIN associated with the transaction could not be @@ -328,9 +321,6 @@ class Decline(BaseModel): issuer limit. - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction amount exceeds the pre-authorized approval amount. - - `invalid_biller_information` - The biller information provided is invalid. - - `pin_change_request_declined` - The PIN change request has been declined. - - `unsafe_pin` - The PIN provided is considered unsafe. - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify for Visa PIN processing. - `offline_declined` - The transaction was declined offline. @@ -340,8 +330,6 @@ class Decline(BaseModel): transaction amount is not supported. - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant category code was used incorrectly; correct it and reattempt the transaction. - - `forward_to_issuer` - The transaction should be forwarded to the issuer for - processing. - `card_authentication_failed` - The card authentication process has failed. """ diff --git a/src/increase/types/simulations/card_token_create_params.py b/src/increase/types/simulations/card_token_create_params.py index a496bd012..d9b752bcd 100644 --- a/src/increase/types/simulations/card_token_create_params.py +++ b/src/increase/types/simulations/card_token_create_params.py @@ -107,7 +107,6 @@ class OutcomeDecline(TypedDict, total=False): "incorrect_pin", "allowable_number_of_pin_entry_tries_exceeded", "unable_to_locate_previous_message", - "data_inconsistent_with_original_message", "pin_error_found", "cannot_verify_pin", "verification_data_failed", @@ -115,15 +114,11 @@ class OutcomeDecline(TypedDict, total=False): "cash_service_not_available", "cashback_request_exceeds_issuer_limit", "transaction_amount_exceeds_pre_authorized_approval_amount", - "invalid_biller_information", - "pin_change_request_declined", - "unsafe_pin", "transaction_does_not_qualify_for_visa_pin", "offline_declined", "unable_to_go_online", "valid_account_but_amount_not_supported", "invalid_use_of_merchant_category_code_correct_and_reattempt", - "forward_to_issuer", "card_authentication_failed", ] """The reason for the decline. @@ -213,8 +208,6 @@ class OutcomeDecline(TypedDict, total=False): entry tries has been exceeded. - `unable_to_locate_previous_message` - The previous message associated with the transaction could not be located. - - `data_inconsistent_with_original_message` - The data in the transaction is - inconsistent with the original message. - `pin_error_found` - An error was found with the PIN associated with the transaction. - `cannot_verify_pin` - The PIN associated with the transaction could not be @@ -229,9 +222,6 @@ class OutcomeDecline(TypedDict, total=False): issuer limit. - `transaction_amount_exceeds_pre_authorized_approval_amount` - The transaction amount exceeds the pre-authorized approval amount. - - `invalid_biller_information` - The biller information provided is invalid. - - `pin_change_request_declined` - The PIN change request has been declined. - - `unsafe_pin` - The PIN provided is considered unsafe. - `transaction_does_not_qualify_for_visa_pin` - The transaction does not qualify for Visa PIN processing. - `offline_declined` - The transaction was declined offline. @@ -241,8 +231,6 @@ class OutcomeDecline(TypedDict, total=False): transaction amount is not supported. - `invalid_use_of_merchant_category_code_correct_and_reattempt` - The merchant category code was used incorrectly; correct it and reattempt the transaction. - - `forward_to_issuer` - The transaction should be forwarded to the issuer for - processing. - `card_authentication_failed` - The card authentication process has failed. """ From 85c49dafea524abc5c32db8ba09241a5b5a88c91 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 18 Mar 2026 04:54:20 +0000 Subject: [PATCH 1248/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 8358f5fe2..285be38ef 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.448.0" + ".": "0.449.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 125b6cf5d..632896cd4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.448.0" +version = "0.449.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index b8ffcaa57..6cebf7219 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.448.0" # x-release-please-version +__version__ = "0.449.0" # x-release-please-version From 030d0c512e17988175a84f576a1eb19117142684 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:29:54 +0000 Subject: [PATCH 1249/1325] feat(api): api update --- .stats.yml | 4 ++-- .../resources/wire_drawdown_requests.py | 22 +++++++++++++++++++ src/increase/types/wire_drawdown_request.py | 16 +++++++++++++- .../wire_drawdown_request_create_params.py | 13 ++++++++++- .../test_wire_drawdown_requests.py | 2 ++ 5 files changed, 53 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index d4fff91f9..8e3e051f7 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-5444aa15ed771b293975e4ea457bbf96f3fd4268dab9cef1d64fc18efbba3718.yml -openapi_spec_hash: 94be74f7b294a338dd47d95721bb52ae +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f3d22401feb4671870673cb67688b163ee7f26acb6d2f89dcf79b26b0675523f.yml +openapi_spec_hash: 4d6dbce33f5de203d92df4c20a957665 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index 76408df82..a05d7ad2b 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -2,6 +2,8 @@ from __future__ import annotations +from typing_extensions import Literal + import httpx from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params @@ -52,6 +54,7 @@ def create( debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, unstructured_remittance_information: str, + charge_bearer: Literal["shared", "debtor", "creditor", "service_level"] | Omit = omit, debtor_account_number: str | Omit = omit, debtor_external_account_id: str | Omit = omit, debtor_routing_number: str | Omit = omit, @@ -82,6 +85,14 @@ def create( unstructured_remittance_information: Remittance information the debtor will see as part of the request. + charge_bearer: Determines who bears the cost of the drawdown request. Defaults to `shared` if + not specified. + + - `shared` - Charges are shared between the debtor and creditor. + - `debtor` - Charges are borne by the debtor. + - `creditor` - Charges are borne by the creditor. + - `service_level` - Charges are determined by the service level. + debtor_account_number: The debtor's account number. debtor_external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is @@ -113,6 +124,7 @@ def create( "debtor_address": debtor_address, "debtor_name": debtor_name, "unstructured_remittance_information": unstructured_remittance_information, + "charge_bearer": charge_bearer, "debtor_account_number": debtor_account_number, "debtor_external_account_id": debtor_external_account_id, "debtor_routing_number": debtor_routing_number, @@ -255,6 +267,7 @@ async def create( debtor_address: wire_drawdown_request_create_params.DebtorAddress, debtor_name: str, unstructured_remittance_information: str, + charge_bearer: Literal["shared", "debtor", "creditor", "service_level"] | Omit = omit, debtor_account_number: str | Omit = omit, debtor_external_account_id: str | Omit = omit, debtor_routing_number: str | Omit = omit, @@ -285,6 +298,14 @@ async def create( unstructured_remittance_information: Remittance information the debtor will see as part of the request. + charge_bearer: Determines who bears the cost of the drawdown request. Defaults to `shared` if + not specified. + + - `shared` - Charges are shared between the debtor and creditor. + - `debtor` - Charges are borne by the debtor. + - `creditor` - Charges are borne by the creditor. + - `service_level` - Charges are determined by the service level. + debtor_account_number: The debtor's account number. debtor_external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is @@ -316,6 +337,7 @@ async def create( "debtor_address": debtor_address, "debtor_name": debtor_name, "unstructured_remittance_information": unstructured_remittance_information, + "charge_bearer": charge_bearer, "debtor_account_number": debtor_account_number, "debtor_external_account_id": debtor_external_account_id, "debtor_routing_number": debtor_routing_number, diff --git a/src/increase/types/wire_drawdown_request.py b/src/increase/types/wire_drawdown_request.py index e797756b6..2084c934c 100644 --- a/src/increase/types/wire_drawdown_request.py +++ b/src/increase/types/wire_drawdown_request.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["WireDrawdownRequest", "CreditorAddress", "DebtorAddress", "Submission"] @@ -163,3 +165,15 @@ class WireDrawdownRequest(BaseModel): unstructured_remittance_information: str """Remittance information the debtor will see as part of the drawdown request.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/wire_drawdown_request_create_params.py b/src/increase/types/wire_drawdown_request_create_params.py index 7d9e8e37f..41a38f0c5 100644 --- a/src/increase/types/wire_drawdown_request_create_params.py +++ b/src/increase/types/wire_drawdown_request_create_params.py @@ -2,7 +2,7 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict +from typing_extensions import Literal, Required, TypedDict __all__ = ["WireDrawdownRequestCreateParams", "CreditorAddress", "DebtorAddress"] @@ -29,6 +29,17 @@ class WireDrawdownRequestCreateParams(TypedDict, total=False): unstructured_remittance_information: Required[str] """Remittance information the debtor will see as part of the request.""" + charge_bearer: Literal["shared", "debtor", "creditor", "service_level"] + """Determines who bears the cost of the drawdown request. + + Defaults to `shared` if not specified. + + - `shared` - Charges are shared between the debtor and creditor. + - `debtor` - Charges are borne by the debtor. + - `creditor` - Charges are borne by the creditor. + - `service_level` - Charges are determined by the service level. + """ + debtor_account_number: str """The debtor's account number.""" diff --git a/tests/api_resources/test_wire_drawdown_requests.py b/tests/api_resources/test_wire_drawdown_requests.py index 826ff461a..62a036793 100644 --- a/tests/api_resources/test_wire_drawdown_requests.py +++ b/tests/api_resources/test_wire_drawdown_requests.py @@ -63,6 +63,7 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, debtor_name="Ian Crease", unstructured_remittance_information="Invoice 29582", + charge_bearer="shared", debtor_account_number="987654321", debtor_external_account_id="debtor_external_account_id", debtor_routing_number="101050001", @@ -248,6 +249,7 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, debtor_name="Ian Crease", unstructured_remittance_information="Invoice 29582", + charge_bearer="shared", debtor_account_number="987654321", debtor_external_account_id="debtor_external_account_id", debtor_routing_number="101050001", From 2e74829b46a39822f0853f27868ba232d04ee74b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 01:32:54 +0000 Subject: [PATCH 1250/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 285be38ef..39ba1f879 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.449.0" + ".": "0.450.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 632896cd4..e363c8dba 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.449.0" +version = "0.450.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6cebf7219..ea6a8848a 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.449.0" # x-release-please-version +__version__ = "0.450.0" # x-release-please-version From 065f5a4ed97d68f106437cdb5e69c9699dba1954 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:43:28 +0000 Subject: [PATCH 1251/1325] fix: sanitize endpoint path params --- src/increase/_utils/__init__.py | 1 + src/increase/_utils/_path.py | 127 ++++++++++++++++++ src/increase/resources/account_numbers.py | 10 +- src/increase/resources/account_statements.py | 6 +- src/increase/resources/account_transfers.py | 14 +- src/increase/resources/accounts.py | 18 +-- .../resources/ach_prenotifications.py | 10 +- src/increase/resources/ach_transfers.py | 14 +- src/increase/resources/beneficial_owners.py | 32 ++++- .../resources/bookkeeping_accounts.py | 18 ++- src/increase/resources/bookkeeping_entries.py | 6 +- .../resources/bookkeeping_entry_sets.py | 10 +- src/increase/resources/card_disputes.py | 14 +- src/increase/resources/card_payments.py | 6 +- .../resources/card_purchase_supplements.py | 12 +- src/increase/resources/card_push_transfers.py | 22 ++- src/increase/resources/card_tokens.py | 10 +- src/increase/resources/card_validations.py | 6 +- src/increase/resources/cards.py | 22 +-- src/increase/resources/check_deposits.py | 6 +- src/increase/resources/check_transfers.py | 18 +-- .../resources/declined_transactions.py | 10 +- .../resources/digital_card_profiles.py | 30 ++++- .../resources/digital_wallet_tokens.py | 10 +- src/increase/resources/entities.py | 14 +- src/increase/resources/event_subscriptions.py | 10 +- src/increase/resources/events.py | 6 +- src/increase/resources/exports.py | 6 +- src/increase/resources/external_accounts.py | 10 +- src/increase/resources/fednow_transfers.py | 14 +- src/increase/resources/files.py | 6 +- .../resources/inbound_ach_transfers.py | 40 ++++-- .../resources/inbound_check_deposits.py | 30 ++++- .../resources/inbound_fednow_transfers.py | 12 +- src/increase/resources/inbound_mail_items.py | 14 +- .../inbound_real_time_payments_transfers.py | 12 +- .../inbound_wire_drawdown_requests.py | 12 +- .../resources/inbound_wire_transfers.py | 20 ++- .../resources/intrafi_account_enrollments.py | 22 ++- src/increase/resources/intrafi_balances.py | 5 +- src/increase/resources/intrafi_exclusions.py | 14 +- src/increase/resources/lockboxes.py | 10 +- src/increase/resources/oauth_applications.py | 6 +- src/increase/resources/oauth_connections.py | 6 +- .../resources/pending_transactions.py | 18 ++- .../resources/physical_card_profiles.py | 30 ++++- src/increase/resources/physical_cards.py | 10 +- src/increase/resources/programs.py | 6 +- src/increase/resources/real_time_decisions.py | 14 +- .../resources/real_time_payments_transfers.py | 32 ++++- .../simulations/account_transfers.py | 9 +- .../resources/simulations/ach_transfers.py | 28 ++-- .../simulations/card_authentications.py | 20 ++- .../resources/simulations/card_disputes.py | 6 +- .../resources/simulations/check_deposits.py | 22 +-- .../resources/simulations/check_transfers.py | 5 +- .../simulations/inbound_check_deposits.py | 12 +- .../simulations/pending_transactions.py | 11 +- .../resources/simulations/physical_cards.py | 18 ++- .../real_time_payments_transfers.py | 12 +- .../simulations/wire_drawdown_requests.py | 21 ++- .../resources/simulations/wire_transfers.py | 9 +- src/increase/resources/swift_transfers.py | 14 +- src/increase/resources/transactions.py | 6 +- .../resources/wire_drawdown_requests.py | 10 +- src/increase/resources/wire_transfers.py | 14 +- tests/test_utils/test_path.py | 89 ++++++++++++ 67 files changed, 805 insertions(+), 312 deletions(-) create mode 100644 src/increase/_utils/_path.py create mode 100644 tests/test_utils/test_path.py diff --git a/src/increase/_utils/__init__.py b/src/increase/_utils/__init__.py index dc64e29a1..10cb66d2d 100644 --- a/src/increase/_utils/__init__.py +++ b/src/increase/_utils/__init__.py @@ -1,3 +1,4 @@ +from ._path import path_template as path_template from ._sync import asyncify as asyncify from ._proxy import LazyProxy as LazyProxy from ._utils import ( diff --git a/src/increase/_utils/_path.py b/src/increase/_utils/_path.py new file mode 100644 index 000000000..4d6e1e4cb --- /dev/null +++ b/src/increase/_utils/_path.py @@ -0,0 +1,127 @@ +from __future__ import annotations + +import re +from typing import ( + Any, + Mapping, + Callable, +) +from urllib.parse import quote + +# Matches '.' or '..' where each dot is either literal or percent-encoded (%2e / %2E). +_DOT_SEGMENT_RE = re.compile(r"^(?:\.|%2[eE]){1,2}$") + +_PLACEHOLDER_RE = re.compile(r"\{(\w+)\}") + + +def _quote_path_segment_part(value: str) -> str: + """Percent-encode `value` for use in a URI path segment. + + Considers characters not in `pchar` set from RFC 3986 §3.3 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.3 + """ + # quote() already treats unreserved characters (letters, digits, and -._~) + # as safe, so we only need to add sub-delims, ':', and '@'. + # Notably, unlike the default `safe` for quote(), / is unsafe and must be quoted. + return quote(value, safe="!$&'()*+,;=:@") + + +def _quote_query_part(value: str) -> str: + """Percent-encode `value` for use in a URI query string. + + Considers &, = and characters not in `query` set from RFC 3986 §3.4 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.4 + """ + return quote(value, safe="!$'()*+,;:@/?") + + +def _quote_fragment_part(value: str) -> str: + """Percent-encode `value` for use in a URI fragment. + + Considers characters not in `fragment` set from RFC 3986 §3.5 to be unsafe. + https://datatracker.ietf.org/doc/html/rfc3986#section-3.5 + """ + return quote(value, safe="!$&'()*+,;=:@/?") + + +def _interpolate( + template: str, + values: Mapping[str, Any], + quoter: Callable[[str], str], +) -> str: + """Replace {name} placeholders in `template`, quoting each value with `quoter`. + + Placeholder names are looked up in `values`. + + Raises: + KeyError: If a placeholder is not found in `values`. + """ + # re.split with a capturing group returns alternating + # [text, name, text, name, ..., text] elements. + parts = _PLACEHOLDER_RE.split(template) + + for i in range(1, len(parts), 2): + name = parts[i] + if name not in values: + raise KeyError(f"a value for placeholder {{{name}}} was not provided") + val = values[name] + if val is None: + parts[i] = "null" + elif isinstance(val, bool): + parts[i] = "true" if val else "false" + else: + parts[i] = quoter(str(values[name])) + + return "".join(parts) + + +def path_template(template: str, /, **kwargs: Any) -> str: + """Interpolate {name} placeholders in `template` from keyword arguments. + + Args: + template: The template string containing {name} placeholders. + **kwargs: Keyword arguments to interpolate into the template. + + Returns: + The template with placeholders interpolated and percent-encoded. + + Safe characters for percent-encoding are dependent on the URI component. + Placeholders in path and fragment portions are percent-encoded where the `segment` + and `fragment` sets from RFC 3986 respectively are considered safe. + Placeholders in the query portion are percent-encoded where the `query` set from + RFC 3986 §3.3 is considered safe except for = and & characters. + + Raises: + KeyError: If a placeholder is not found in `kwargs`. + ValueError: If resulting path contains /./ or /../ segments (including percent-encoded dot-segments). + """ + # Split the template into path, query, and fragment portions. + fragment_template: str | None = None + query_template: str | None = None + + rest = template + if "#" in rest: + rest, fragment_template = rest.split("#", 1) + if "?" in rest: + rest, query_template = rest.split("?", 1) + path_template = rest + + # Interpolate each portion with the appropriate quoting rules. + path_result = _interpolate(path_template, kwargs, _quote_path_segment_part) + + # Reject dot-segments (. and ..) in the final assembled path. The check + # runs after interpolation so that adjacent placeholders or a mix of static + # text and placeholders that together form a dot-segment are caught. + # Also reject percent-encoded dot-segments to protect against incorrectly + # implemented normalization in servers/proxies. + for segment in path_result.split("/"): + if _DOT_SEGMENT_RE.match(segment): + raise ValueError(f"Constructed path {path_result!r} contains dot-segment {segment!r} which is not allowed") + + result = path_result + if query_template is not None: + result += "?" + _interpolate(query_template, kwargs, _quote_query_part) + if fragment_template is not None: + result += "#" + _interpolate(fragment_template, kwargs, _quote_fragment_part) + + return result diff --git a/src/increase/resources/account_numbers.py b/src/increase/resources/account_numbers.py index fa2474e34..73d8fb9db 100644 --- a/src/increase/resources/account_numbers.py +++ b/src/increase/resources/account_numbers.py @@ -8,7 +8,7 @@ from ..types import account_number_list_params, account_number_create_params, account_number_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -131,7 +131,7 @@ def retrieve( if not account_number_id: raise ValueError(f"Expected a non-empty value for `account_number_id` but received {account_number_id!r}") return self._get( - f"/account_numbers/{account_number_id}", + path_template("/account_numbers/{account_number_id}", account_number_id=account_number_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -186,7 +186,7 @@ def update( if not account_number_id: raise ValueError(f"Expected a non-empty value for `account_number_id` but received {account_number_id!r}") return self._patch( - f"/account_numbers/{account_number_id}", + path_template("/account_numbers/{account_number_id}", account_number_id=account_number_id), body=maybe_transform( { "inbound_ach": inbound_ach, @@ -379,7 +379,7 @@ async def retrieve( if not account_number_id: raise ValueError(f"Expected a non-empty value for `account_number_id` but received {account_number_id!r}") return await self._get( - f"/account_numbers/{account_number_id}", + path_template("/account_numbers/{account_number_id}", account_number_id=account_number_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -434,7 +434,7 @@ async def update( if not account_number_id: raise ValueError(f"Expected a non-empty value for `account_number_id` but received {account_number_id!r}") return await self._patch( - f"/account_numbers/{account_number_id}", + path_template("/account_numbers/{account_number_id}", account_number_id=account_number_id), body=await async_maybe_transform( { "inbound_ach": inbound_ach, diff --git a/src/increase/resources/account_statements.py b/src/increase/resources/account_statements.py index 879016421..5812d40f2 100644 --- a/src/increase/resources/account_statements.py +++ b/src/increase/resources/account_statements.py @@ -6,7 +6,7 @@ from ..types import account_statement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,7 @@ def retrieve( f"Expected a non-empty value for `account_statement_id` but received {account_statement_id!r}" ) return self._get( - f"/account_statements/{account_statement_id}", + path_template("/account_statements/{account_statement_id}", account_statement_id=account_statement_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -184,7 +184,7 @@ async def retrieve( f"Expected a non-empty value for `account_statement_id` but received {account_statement_id!r}" ) return await self._get( - f"/account_statements/{account_statement_id}", + path_template("/account_statements/{account_statement_id}", account_statement_id=account_statement_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/account_transfers.py b/src/increase/resources/account_transfers.py index 6aa93303e..df0901fcf 100644 --- a/src/increase/resources/account_transfers.py +++ b/src/increase/resources/account_transfers.py @@ -6,7 +6,7 @@ from ..types import account_transfer_list_params, account_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -138,7 +138,7 @@ def retrieve( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return self._get( - f"/account_transfers/{account_transfer_id}", + path_template("/account_transfers/{account_transfer_id}", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -239,7 +239,7 @@ def approve( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return self._post( - f"/account_transfers/{account_transfer_id}/approve", + path_template("/account_transfers/{account_transfer_id}/approve", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -283,7 +283,7 @@ def cancel( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return self._post( - f"/account_transfers/{account_transfer_id}/cancel", + path_template("/account_transfers/{account_transfer_id}/cancel", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -411,7 +411,7 @@ async def retrieve( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return await self._get( - f"/account_transfers/{account_transfer_id}", + path_template("/account_transfers/{account_transfer_id}", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -512,7 +512,7 @@ async def approve( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return await self._post( - f"/account_transfers/{account_transfer_id}/approve", + path_template("/account_transfers/{account_transfer_id}/approve", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -556,7 +556,7 @@ async def cancel( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return await self._post( - f"/account_transfers/{account_transfer_id}/cancel", + path_template("/account_transfers/{account_transfer_id}/cancel", account_transfer_id=account_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/accounts.py b/src/increase/resources/accounts.py index 7fe998692..8d72838a7 100644 --- a/src/increase/resources/accounts.py +++ b/src/increase/resources/accounts.py @@ -10,7 +10,7 @@ from ..types import account_list_params, account_create_params, account_update_params, account_balance_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -147,7 +147,7 @@ def retrieve( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get( - f"/accounts/{account_id}", + path_template("/accounts/{account_id}", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -191,7 +191,7 @@ def update( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._patch( - f"/accounts/{account_id}", + path_template("/accounts/{account_id}", account_id=account_id), body=maybe_transform( { "loan": loan, @@ -312,7 +312,7 @@ def balance( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get( - f"/accounts/{account_id}/balance", + path_template("/accounts/{account_id}/balance", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -355,7 +355,7 @@ def close( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._post( - f"/accounts/{account_id}/close", + path_template("/accounts/{account_id}/close", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -487,7 +487,7 @@ async def retrieve( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._get( - f"/accounts/{account_id}", + path_template("/accounts/{account_id}", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -531,7 +531,7 @@ async def update( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._patch( - f"/accounts/{account_id}", + path_template("/accounts/{account_id}", account_id=account_id), body=await async_maybe_transform( { "loan": loan, @@ -652,7 +652,7 @@ async def balance( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._get( - f"/accounts/{account_id}/balance", + path_template("/accounts/{account_id}/balance", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -695,7 +695,7 @@ async def close( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._post( - f"/accounts/{account_id}/close", + path_template("/accounts/{account_id}/close", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/ach_prenotifications.py b/src/increase/resources/ach_prenotifications.py index 04c6bbdd5..519363f54 100644 --- a/src/increase/resources/ach_prenotifications.py +++ b/src/increase/resources/ach_prenotifications.py @@ -10,7 +10,7 @@ from ..types import ach_prenotification_list_params, ach_prenotification_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -196,7 +196,9 @@ def retrieve( f"Expected a non-empty value for `ach_prenotification_id` but received {ach_prenotification_id!r}" ) return self._get( - f"/ach_prenotifications/{ach_prenotification_id}", + path_template( + "/ach_prenotifications/{ach_prenotification_id}", ach_prenotification_id=ach_prenotification_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -431,7 +433,9 @@ async def retrieve( f"Expected a non-empty value for `ach_prenotification_id` but received {ach_prenotification_id!r}" ) return await self._get( - f"/ach_prenotifications/{ach_prenotification_id}", + path_template( + "/ach_prenotifications/{ach_prenotification_id}", ach_prenotification_id=ach_prenotification_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/ach_transfers.py b/src/increase/resources/ach_transfers.py index 04b4d624b..a8611e0e9 100644 --- a/src/increase/resources/ach_transfers.py +++ b/src/increase/resources/ach_transfers.py @@ -8,7 +8,7 @@ from ..types import ach_transfer_list_params, ach_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -242,7 +242,7 @@ def retrieve( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._get( - f"/ach_transfers/{ach_transfer_id}", + path_template("/ach_transfers/{ach_transfer_id}", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -347,7 +347,7 @@ def approve( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/ach_transfers/{ach_transfer_id}/approve", + path_template("/ach_transfers/{ach_transfer_id}/approve", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -389,7 +389,7 @@ def cancel( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/ach_transfers/{ach_transfer_id}/cancel", + path_template("/ach_transfers/{ach_transfer_id}/cancel", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -619,7 +619,7 @@ async def retrieve( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._get( - f"/ach_transfers/{ach_transfer_id}", + path_template("/ach_transfers/{ach_transfer_id}", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -724,7 +724,7 @@ async def approve( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/ach_transfers/{ach_transfer_id}/approve", + path_template("/ach_transfers/{ach_transfer_id}/approve", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -766,7 +766,7 @@ async def cancel( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/ach_transfers/{ach_transfer_id}/cancel", + path_template("/ach_transfers/{ach_transfer_id}/cancel", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/beneficial_owners.py b/src/increase/resources/beneficial_owners.py index c5117b765..f7142ea39 100644 --- a/src/increase/resources/beneficial_owners.py +++ b/src/increase/resources/beneficial_owners.py @@ -9,7 +9,7 @@ from ..types import beneficial_owner_list_params, beneficial_owner_create_params, beneficial_owner_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -135,7 +135,10 @@ def retrieve( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return self._get( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -191,7 +194,10 @@ def update( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return self._patch( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), body=maybe_transform( { "address": address, @@ -304,7 +310,10 @@ def archive( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return self._post( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -426,7 +435,10 @@ async def retrieve( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return await self._get( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -482,7 +494,10 @@ async def update( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return await self._patch( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), body=await async_maybe_transform( { "address": address, @@ -595,7 +610,10 @@ async def archive( f"Expected a non-empty value for `entity_beneficial_owner_id` but received {entity_beneficial_owner_id!r}" ) return await self._post( - f"/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + path_template( + "/entity_beneficial_owners/{entity_beneficial_owner_id}/archive", + entity_beneficial_owner_id=entity_beneficial_owner_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/bookkeeping_accounts.py b/src/increase/resources/bookkeeping_accounts.py index 238915094..3221f85ce 100644 --- a/src/increase/resources/bookkeeping_accounts.py +++ b/src/increase/resources/bookkeeping_accounts.py @@ -15,7 +15,7 @@ bookkeeping_account_balance_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -149,7 +149,9 @@ def update( f"Expected a non-empty value for `bookkeeping_account_id` but received {bookkeeping_account_id!r}" ) return self._patch( - f"/bookkeeping_accounts/{bookkeeping_account_id}", + path_template( + "/bookkeeping_accounts/{bookkeeping_account_id}", bookkeeping_account_id=bookkeeping_account_id + ), body=maybe_transform({"name": name}, bookkeeping_account_update_params.BookkeepingAccountUpdateParams), options=make_request_options( extra_headers=extra_headers, @@ -249,7 +251,9 @@ def balance( f"Expected a non-empty value for `bookkeeping_account_id` but received {bookkeeping_account_id!r}" ) return self._get( - f"/bookkeeping_accounts/{bookkeeping_account_id}/balance", + path_template( + "/bookkeeping_accounts/{bookkeeping_account_id}/balance", bookkeeping_account_id=bookkeeping_account_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -380,7 +384,9 @@ async def update( f"Expected a non-empty value for `bookkeeping_account_id` but received {bookkeeping_account_id!r}" ) return await self._patch( - f"/bookkeeping_accounts/{bookkeeping_account_id}", + path_template( + "/bookkeeping_accounts/{bookkeeping_account_id}", bookkeeping_account_id=bookkeeping_account_id + ), body=await async_maybe_transform( {"name": name}, bookkeeping_account_update_params.BookkeepingAccountUpdateParams ), @@ -482,7 +488,9 @@ async def balance( f"Expected a non-empty value for `bookkeeping_account_id` but received {bookkeeping_account_id!r}" ) return await self._get( - f"/bookkeeping_accounts/{bookkeeping_account_id}/balance", + path_template( + "/bookkeeping_accounts/{bookkeeping_account_id}/balance", bookkeeping_account_id=bookkeeping_account_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/bookkeeping_entries.py b/src/increase/resources/bookkeeping_entries.py index 56be104f3..906f6f9dd 100644 --- a/src/increase/resources/bookkeeping_entries.py +++ b/src/increase/resources/bookkeeping_entries.py @@ -6,7 +6,7 @@ from ..types import bookkeeping_entry_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,7 @@ def retrieve( f"Expected a non-empty value for `bookkeeping_entry_id` but received {bookkeeping_entry_id!r}" ) return self._get( - f"/bookkeeping_entries/{bookkeeping_entry_id}", + path_template("/bookkeeping_entries/{bookkeeping_entry_id}", bookkeeping_entry_id=bookkeeping_entry_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -182,7 +182,7 @@ async def retrieve( f"Expected a non-empty value for `bookkeeping_entry_id` but received {bookkeeping_entry_id!r}" ) return await self._get( - f"/bookkeeping_entries/{bookkeeping_entry_id}", + path_template("/bookkeeping_entries/{bookkeeping_entry_id}", bookkeeping_entry_id=bookkeeping_entry_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/bookkeeping_entry_sets.py b/src/increase/resources/bookkeeping_entry_sets.py index c437c6185..ad50df6a3 100644 --- a/src/increase/resources/bookkeeping_entry_sets.py +++ b/src/increase/resources/bookkeeping_entry_sets.py @@ -9,7 +9,7 @@ from ..types import bookkeeping_entry_set_list_params, bookkeeping_entry_set_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -130,7 +130,9 @@ def retrieve( f"Expected a non-empty value for `bookkeeping_entry_set_id` but received {bookkeeping_entry_set_id!r}" ) return self._get( - f"/bookkeeping_entry_sets/{bookkeeping_entry_set_id}", + path_template( + "/bookkeeping_entry_sets/{bookkeeping_entry_set_id}", bookkeeping_entry_set_id=bookkeeping_entry_set_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -302,7 +304,9 @@ async def retrieve( f"Expected a non-empty value for `bookkeeping_entry_set_id` but received {bookkeeping_entry_set_id!r}" ) return await self._get( - f"/bookkeeping_entry_sets/{bookkeeping_entry_set_id}", + path_template( + "/bookkeeping_entry_sets/{bookkeeping_entry_set_id}", bookkeeping_entry_set_id=bookkeeping_entry_set_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/card_disputes.py b/src/increase/resources/card_disputes.py index bfdbc27e1..7e661452b 100644 --- a/src/increase/resources/card_disputes.py +++ b/src/increase/resources/card_disputes.py @@ -14,7 +14,7 @@ card_dispute_submit_user_submission_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -153,7 +153,7 @@ def retrieve( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return self._get( - f"/card_disputes/{card_dispute_id}", + path_template("/card_disputes/{card_dispute_id}", card_dispute_id=card_dispute_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -273,7 +273,7 @@ def submit_user_submission( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return self._post( - f"/card_disputes/{card_dispute_id}/submit_user_submission", + path_template("/card_disputes/{card_dispute_id}/submit_user_submission", card_dispute_id=card_dispute_id), body=maybe_transform( { "network": network, @@ -328,7 +328,7 @@ def withdraw( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return self._post( - f"/card_disputes/{card_dispute_id}/withdraw", + path_template("/card_disputes/{card_dispute_id}/withdraw", card_dispute_id=card_dispute_id), body=maybe_transform({"explanation": explanation}, card_dispute_withdraw_params.CardDisputeWithdrawParams), options=make_request_options( extra_headers=extra_headers, @@ -464,7 +464,7 @@ async def retrieve( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return await self._get( - f"/card_disputes/{card_dispute_id}", + path_template("/card_disputes/{card_dispute_id}", card_dispute_id=card_dispute_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -584,7 +584,7 @@ async def submit_user_submission( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return await self._post( - f"/card_disputes/{card_dispute_id}/submit_user_submission", + path_template("/card_disputes/{card_dispute_id}/submit_user_submission", card_dispute_id=card_dispute_id), body=await async_maybe_transform( { "network": network, @@ -639,7 +639,7 @@ async def withdraw( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return await self._post( - f"/card_disputes/{card_dispute_id}/withdraw", + path_template("/card_disputes/{card_dispute_id}/withdraw", card_dispute_id=card_dispute_id), body=await async_maybe_transform( {"explanation": explanation}, card_dispute_withdraw_params.CardDisputeWithdrawParams ), diff --git a/src/increase/resources/card_payments.py b/src/increase/resources/card_payments.py index c314d0e6c..bfcfb162b 100644 --- a/src/increase/resources/card_payments.py +++ b/src/increase/resources/card_payments.py @@ -6,7 +6,7 @@ from ..types import card_payment_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -70,7 +70,7 @@ def retrieve( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return self._get( - f"/card_payments/{card_payment_id}", + path_template("/card_payments/{card_payment_id}", card_payment_id=card_payment_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -184,7 +184,7 @@ async def retrieve( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return await self._get( - f"/card_payments/{card_payment_id}", + path_template("/card_payments/{card_payment_id}", card_payment_id=card_payment_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/card_purchase_supplements.py b/src/increase/resources/card_purchase_supplements.py index c768f0946..a2d954b80 100644 --- a/src/increase/resources/card_purchase_supplements.py +++ b/src/increase/resources/card_purchase_supplements.py @@ -6,7 +6,7 @@ from ..types import card_purchase_supplement_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,10 @@ def retrieve( f"Expected a non-empty value for `card_purchase_supplement_id` but received {card_purchase_supplement_id!r}" ) return self._get( - f"/card_purchase_supplements/{card_purchase_supplement_id}", + path_template( + "/card_purchase_supplements/{card_purchase_supplement_id}", + card_purchase_supplement_id=card_purchase_supplement_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -185,7 +188,10 @@ async def retrieve( f"Expected a non-empty value for `card_purchase_supplement_id` but received {card_purchase_supplement_id!r}" ) return await self._get( - f"/card_purchase_supplements/{card_purchase_supplement_id}", + path_template( + "/card_purchase_supplements/{card_purchase_supplement_id}", + card_purchase_supplement_id=card_purchase_supplement_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index b72363fce..be5273de6 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -8,7 +8,7 @@ from ..types import card_push_transfer_list_params, card_push_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -225,7 +225,7 @@ def retrieve( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return self._get( - f"/card_push_transfers/{card_push_transfer_id}", + path_template("/card_push_transfers/{card_push_transfer_id}", card_push_transfer_id=card_push_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -328,7 +328,9 @@ def approve( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return self._post( - f"/card_push_transfers/{card_push_transfer_id}/approve", + path_template( + "/card_push_transfers/{card_push_transfer_id}/approve", card_push_transfer_id=card_push_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -372,7 +374,9 @@ def cancel( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return self._post( - f"/card_push_transfers/{card_push_transfer_id}/cancel", + path_template( + "/card_push_transfers/{card_push_transfer_id}/cancel", card_push_transfer_id=card_push_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -585,7 +589,7 @@ async def retrieve( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return await self._get( - f"/card_push_transfers/{card_push_transfer_id}", + path_template("/card_push_transfers/{card_push_transfer_id}", card_push_transfer_id=card_push_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -688,7 +692,9 @@ async def approve( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return await self._post( - f"/card_push_transfers/{card_push_transfer_id}/approve", + path_template( + "/card_push_transfers/{card_push_transfer_id}/approve", card_push_transfer_id=card_push_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -732,7 +738,9 @@ async def cancel( f"Expected a non-empty value for `card_push_transfer_id` but received {card_push_transfer_id!r}" ) return await self._post( - f"/card_push_transfers/{card_push_transfer_id}/cancel", + path_template( + "/card_push_transfers/{card_push_transfer_id}/cancel", card_push_transfer_id=card_push_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/card_tokens.py b/src/increase/resources/card_tokens.py index c00023910..4ff453b5e 100644 --- a/src/increase/resources/card_tokens.py +++ b/src/increase/resources/card_tokens.py @@ -6,7 +6,7 @@ from ..types import card_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -71,7 +71,7 @@ def retrieve( if not card_token_id: raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") return self._get( - f"/card_tokens/{card_token_id}", + path_template("/card_tokens/{card_token_id}", card_token_id=card_token_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -158,7 +158,7 @@ def capabilities( if not card_token_id: raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") return self._get( - f"/card_tokens/{card_token_id}/capabilities", + path_template("/card_tokens/{card_token_id}/capabilities", card_token_id=card_token_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -214,7 +214,7 @@ async def retrieve( if not card_token_id: raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") return await self._get( - f"/card_tokens/{card_token_id}", + path_template("/card_tokens/{card_token_id}", card_token_id=card_token_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -301,7 +301,7 @@ async def capabilities( if not card_token_id: raise ValueError(f"Expected a non-empty value for `card_token_id` but received {card_token_id!r}") return await self._get( - f"/card_tokens/{card_token_id}/capabilities", + path_template("/card_tokens/{card_token_id}/capabilities", card_token_id=card_token_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/card_validations.py b/src/increase/resources/card_validations.py index e24a34ac7..81841f677 100644 --- a/src/increase/resources/card_validations.py +++ b/src/increase/resources/card_validations.py @@ -6,7 +6,7 @@ from ..types import card_validation_list_params, card_validation_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -163,7 +163,7 @@ def retrieve( if not card_validation_id: raise ValueError(f"Expected a non-empty value for `card_validation_id` but received {card_validation_id!r}") return self._get( - f"/card_validations/{card_validation_id}", + path_template("/card_validations/{card_validation_id}", card_validation_id=card_validation_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -375,7 +375,7 @@ async def retrieve( if not card_validation_id: raise ValueError(f"Expected a non-empty value for `card_validation_id` but received {card_validation_id!r}") return await self._get( - f"/card_validations/{card_validation_id}", + path_template("/card_validations/{card_validation_id}", card_validation_id=card_validation_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index f5dae7300..572153c3c 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -14,7 +14,7 @@ card_create_details_iframe_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -147,7 +147,7 @@ def retrieve( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return self._get( - f"/cards/{card_id}", + path_template("/cards/{card_id}", card_id=card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -207,7 +207,7 @@ def update( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return self._patch( - f"/cards/{card_id}", + path_template("/cards/{card_id}", card_id=card_id), body=maybe_transform( { "billing_address": billing_address, @@ -329,7 +329,7 @@ def create_details_iframe( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return self._post( - f"/cards/{card_id}/create_details_iframe", + path_template("/cards/{card_id}/create_details_iframe", card_id=card_id), body=maybe_transform( {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams ), @@ -372,7 +372,7 @@ def details( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return self._get( - f"/cards/{card_id}/details", + path_template("/cards/{card_id}/details", card_id=card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -413,7 +413,7 @@ def update_pin( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return self._post( - f"/cards/{card_id}/update_pin", + path_template("/cards/{card_id}/update_pin", card_id=card_id), body=maybe_transform({"pin": pin}, card_update_pin_params.CardUpdatePinParams), options=make_request_options( extra_headers=extra_headers, @@ -541,7 +541,7 @@ async def retrieve( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return await self._get( - f"/cards/{card_id}", + path_template("/cards/{card_id}", card_id=card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -601,7 +601,7 @@ async def update( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return await self._patch( - f"/cards/{card_id}", + path_template("/cards/{card_id}", card_id=card_id), body=await async_maybe_transform( { "billing_address": billing_address, @@ -723,7 +723,7 @@ async def create_details_iframe( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return await self._post( - f"/cards/{card_id}/create_details_iframe", + path_template("/cards/{card_id}/create_details_iframe", card_id=card_id), body=await async_maybe_transform( {"physical_card_id": physical_card_id}, card_create_details_iframe_params.CardCreateDetailsIframeParams ), @@ -766,7 +766,7 @@ async def details( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return await self._get( - f"/cards/{card_id}/details", + path_template("/cards/{card_id}/details", card_id=card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -807,7 +807,7 @@ async def update_pin( if not card_id: raise ValueError(f"Expected a non-empty value for `card_id` but received {card_id!r}") return await self._post( - f"/cards/{card_id}/update_pin", + path_template("/cards/{card_id}/update_pin", card_id=card_id), body=await async_maybe_transform({"pin": pin}, card_update_pin_params.CardUpdatePinParams), options=make_request_options( extra_headers=extra_headers, diff --git a/src/increase/resources/check_deposits.py b/src/increase/resources/check_deposits.py index 2683f91aa..4dcfad110 100644 --- a/src/increase/resources/check_deposits.py +++ b/src/increase/resources/check_deposits.py @@ -6,7 +6,7 @@ from ..types import check_deposit_list_params, check_deposit_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -132,7 +132,7 @@ def retrieve( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._get( - f"/check_deposits/{check_deposit_id}", + path_template("/check_deposits/{check_deposit_id}", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -311,7 +311,7 @@ async def retrieve( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._get( - f"/check_deposits/{check_deposit_id}", + path_template("/check_deposits/{check_deposit_id}", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/check_transfers.py b/src/increase/resources/check_transfers.py index d7773c3c6..4a72d6549 100644 --- a/src/increase/resources/check_transfers.py +++ b/src/increase/resources/check_transfers.py @@ -10,7 +10,7 @@ from ..types import check_transfer_list_params, check_transfer_create_params, check_transfer_stop_payment_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -179,7 +179,7 @@ def retrieve( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return self._get( - f"/check_transfers/{check_transfer_id}", + path_template("/check_transfers/{check_transfer_id}", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -280,7 +280,7 @@ def approve( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return self._post( - f"/check_transfers/{check_transfer_id}/approve", + path_template("/check_transfers/{check_transfer_id}/approve", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -324,7 +324,7 @@ def cancel( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return self._post( - f"/check_transfers/{check_transfer_id}/cancel", + path_template("/check_transfers/{check_transfer_id}/cancel", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -375,7 +375,7 @@ def stop_payment( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return self._post( - f"/check_transfers/{check_transfer_id}/stop_payment", + path_template("/check_transfers/{check_transfer_id}/stop_payment", check_transfer_id=check_transfer_id), body=maybe_transform({"reason": reason}, check_transfer_stop_payment_params.CheckTransferStopPaymentParams), options=make_request_options( extra_headers=extra_headers, @@ -541,7 +541,7 @@ async def retrieve( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return await self._get( - f"/check_transfers/{check_transfer_id}", + path_template("/check_transfers/{check_transfer_id}", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -642,7 +642,7 @@ async def approve( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return await self._post( - f"/check_transfers/{check_transfer_id}/approve", + path_template("/check_transfers/{check_transfer_id}/approve", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -686,7 +686,7 @@ async def cancel( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return await self._post( - f"/check_transfers/{check_transfer_id}/cancel", + path_template("/check_transfers/{check_transfer_id}/cancel", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -737,7 +737,7 @@ async def stop_payment( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return await self._post( - f"/check_transfers/{check_transfer_id}/stop_payment", + path_template("/check_transfers/{check_transfer_id}/stop_payment", check_transfer_id=check_transfer_id), body=await async_maybe_transform( {"reason": reason}, check_transfer_stop_payment_params.CheckTransferStopPaymentParams ), diff --git a/src/increase/resources/declined_transactions.py b/src/increase/resources/declined_transactions.py index 17f7eab97..ca3f93ff4 100644 --- a/src/increase/resources/declined_transactions.py +++ b/src/increase/resources/declined_transactions.py @@ -6,7 +6,7 @@ from ..types import declined_transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,9 @@ def retrieve( f"Expected a non-empty value for `declined_transaction_id` but received {declined_transaction_id!r}" ) return self._get( - f"/declined_transactions/{declined_transaction_id}", + path_template( + "/declined_transactions/{declined_transaction_id}", declined_transaction_id=declined_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -190,7 +192,9 @@ async def retrieve( f"Expected a non-empty value for `declined_transaction_id` but received {declined_transaction_id!r}" ) return await self._get( - f"/declined_transactions/{declined_transaction_id}", + path_template( + "/declined_transactions/{declined_transaction_id}", declined_transaction_id=declined_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/digital_card_profiles.py b/src/increase/resources/digital_card_profiles.py index 84cbd1292..5af05d847 100644 --- a/src/increase/resources/digital_card_profiles.py +++ b/src/increase/resources/digital_card_profiles.py @@ -10,7 +10,7 @@ digital_card_profile_create_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -154,7 +154,9 @@ def retrieve( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return self._get( - f"/digital_card_profiles/{digital_card_profile_id}", + path_template( + "/digital_card_profiles/{digital_card_profile_id}", digital_card_profile_id=digital_card_profile_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -251,7 +253,10 @@ def archive( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return self._post( - f"/digital_card_profiles/{digital_card_profile_id}/archive", + path_template( + "/digital_card_profiles/{digital_card_profile_id}/archive", + digital_card_profile_id=digital_card_profile_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -322,7 +327,10 @@ def clone( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return self._post( - f"/digital_card_profiles/{digital_card_profile_id}/clone", + path_template( + "/digital_card_profiles/{digital_card_profile_id}/clone", + digital_card_profile_id=digital_card_profile_id, + ), body=maybe_transform( { "app_icon_file_id": app_icon_file_id, @@ -476,7 +484,9 @@ async def retrieve( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return await self._get( - f"/digital_card_profiles/{digital_card_profile_id}", + path_template( + "/digital_card_profiles/{digital_card_profile_id}", digital_card_profile_id=digital_card_profile_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -573,7 +583,10 @@ async def archive( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return await self._post( - f"/digital_card_profiles/{digital_card_profile_id}/archive", + path_template( + "/digital_card_profiles/{digital_card_profile_id}/archive", + digital_card_profile_id=digital_card_profile_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -644,7 +657,10 @@ async def clone( f"Expected a non-empty value for `digital_card_profile_id` but received {digital_card_profile_id!r}" ) return await self._post( - f"/digital_card_profiles/{digital_card_profile_id}/clone", + path_template( + "/digital_card_profiles/{digital_card_profile_id}/clone", + digital_card_profile_id=digital_card_profile_id, + ), body=await async_maybe_transform( { "app_icon_file_id": app_icon_file_id, diff --git a/src/increase/resources/digital_wallet_tokens.py b/src/increase/resources/digital_wallet_tokens.py index f41d35b7f..bcdd713ec 100644 --- a/src/increase/resources/digital_wallet_tokens.py +++ b/src/increase/resources/digital_wallet_tokens.py @@ -6,7 +6,7 @@ from ..types import digital_wallet_token_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,9 @@ def retrieve( f"Expected a non-empty value for `digital_wallet_token_id` but received {digital_wallet_token_id!r}" ) return self._get( - f"/digital_wallet_tokens/{digital_wallet_token_id}", + path_template( + "/digital_wallet_tokens/{digital_wallet_token_id}", digital_wallet_token_id=digital_wallet_token_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -184,7 +186,9 @@ async def retrieve( f"Expected a non-empty value for `digital_wallet_token_id` but received {digital_wallet_token_id!r}" ) return await self._get( - f"/digital_wallet_tokens/{digital_wallet_token_id}", + path_template( + "/digital_wallet_tokens/{digital_wallet_token_id}", digital_wallet_token_id=digital_wallet_token_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/entities.py b/src/increase/resources/entities.py index b5b0808c3..e567b03e2 100644 --- a/src/increase/resources/entities.py +++ b/src/increase/resources/entities.py @@ -10,7 +10,7 @@ from ..types import entity_list_params, entity_create_params, entity_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -177,7 +177,7 @@ def retrieve( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._get( - f"/entities/{entity_id}", + path_template("/entities/{entity_id}", entity_id=entity_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -245,7 +245,7 @@ def update( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._patch( - f"/entities/{entity_id}", + path_template("/entities/{entity_id}", entity_id=entity_id), body=maybe_transform( { "corporation": corporation, @@ -360,7 +360,7 @@ def archive( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return self._post( - f"/entities/{entity_id}/archive", + path_template("/entities/{entity_id}/archive", entity_id=entity_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -523,7 +523,7 @@ async def retrieve( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._get( - f"/entities/{entity_id}", + path_template("/entities/{entity_id}", entity_id=entity_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -591,7 +591,7 @@ async def update( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._patch( - f"/entities/{entity_id}", + path_template("/entities/{entity_id}", entity_id=entity_id), body=await async_maybe_transform( { "corporation": corporation, @@ -706,7 +706,7 @@ async def archive( if not entity_id: raise ValueError(f"Expected a non-empty value for `entity_id` but received {entity_id!r}") return await self._post( - f"/entities/{entity_id}/archive", + path_template("/entities/{entity_id}/archive", entity_id=entity_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/event_subscriptions.py b/src/increase/resources/event_subscriptions.py index c7840b0d6..f226c6336 100644 --- a/src/increase/resources/event_subscriptions.py +++ b/src/increase/resources/event_subscriptions.py @@ -9,7 +9,7 @@ from ..types import event_subscription_list_params, event_subscription_create_params, event_subscription_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -145,7 +145,7 @@ def retrieve( f"Expected a non-empty value for `event_subscription_id` but received {event_subscription_id!r}" ) return self._get( - f"/event_subscriptions/{event_subscription_id}", + path_template("/event_subscriptions/{event_subscription_id}", event_subscription_id=event_subscription_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -194,7 +194,7 @@ def update( f"Expected a non-empty value for `event_subscription_id` but received {event_subscription_id!r}" ) return self._patch( - f"/event_subscriptions/{event_subscription_id}", + path_template("/event_subscriptions/{event_subscription_id}", event_subscription_id=event_subscription_id), body=maybe_transform({"status": status}, event_subscription_update_params.EventSubscriptionUpdateParams), options=make_request_options( extra_headers=extra_headers, @@ -382,7 +382,7 @@ async def retrieve( f"Expected a non-empty value for `event_subscription_id` but received {event_subscription_id!r}" ) return await self._get( - f"/event_subscriptions/{event_subscription_id}", + path_template("/event_subscriptions/{event_subscription_id}", event_subscription_id=event_subscription_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -431,7 +431,7 @@ async def update( f"Expected a non-empty value for `event_subscription_id` but received {event_subscription_id!r}" ) return await self._patch( - f"/event_subscriptions/{event_subscription_id}", + path_template("/event_subscriptions/{event_subscription_id}", event_subscription_id=event_subscription_id), body=await async_maybe_transform( {"status": status}, event_subscription_update_params.EventSubscriptionUpdateParams ), diff --git a/src/increase/resources/events.py b/src/increase/resources/events.py index 7638252be..c70270154 100644 --- a/src/increase/resources/events.py +++ b/src/increase/resources/events.py @@ -9,7 +9,7 @@ from ..types import event_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._models import construct_type from .._resource import SyncAPIResource, AsyncAPIResource @@ -76,7 +76,7 @@ def retrieve( if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") return self._get( - f"/events/{event_id}", + path_template("/events/{event_id}", event_id=event_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -215,7 +215,7 @@ async def retrieve( if not event_id: raise ValueError(f"Expected a non-empty value for `event_id` but received {event_id!r}") return await self._get( - f"/events/{event_id}", + path_template("/events/{event_id}", event_id=event_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index f71932ac2..9c2fc2acd 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -8,7 +8,7 @@ from ..types import export_list_params, export_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -193,7 +193,7 @@ def retrieve( if not export_id: raise ValueError(f"Expected a non-empty value for `export_id` but received {export_id!r}") return self._get( - f"/exports/{export_id}", + path_template("/exports/{export_id}", export_id=export_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -475,7 +475,7 @@ async def retrieve( if not export_id: raise ValueError(f"Expected a non-empty value for `export_id` but received {export_id!r}") return await self._get( - f"/exports/{export_id}", + path_template("/exports/{export_id}", export_id=export_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/external_accounts.py b/src/increase/resources/external_accounts.py index f1ec6f568..82626cf7a 100644 --- a/src/increase/resources/external_accounts.py +++ b/src/increase/resources/external_accounts.py @@ -8,7 +8,7 @@ from ..types import external_account_list_params, external_account_create_params, external_account_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -146,7 +146,7 @@ def retrieve( f"Expected a non-empty value for `external_account_id` but received {external_account_id!r}" ) return self._get( - f"/external_accounts/{external_account_id}", + path_template("/external_accounts/{external_account_id}", external_account_id=external_account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -210,7 +210,7 @@ def update( f"Expected a non-empty value for `external_account_id` but received {external_account_id!r}" ) return self._patch( - f"/external_accounts/{external_account_id}", + path_template("/external_accounts/{external_account_id}", external_account_id=external_account_id), body=maybe_transform( { "account_holder": account_holder, @@ -414,7 +414,7 @@ async def retrieve( f"Expected a non-empty value for `external_account_id` but received {external_account_id!r}" ) return await self._get( - f"/external_accounts/{external_account_id}", + path_template("/external_accounts/{external_account_id}", external_account_id=external_account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -478,7 +478,7 @@ async def update( f"Expected a non-empty value for `external_account_id` but received {external_account_id!r}" ) return await self._patch( - f"/external_accounts/{external_account_id}", + path_template("/external_accounts/{external_account_id}", external_account_id=external_account_id), body=await async_maybe_transform( { "account_holder": account_holder, diff --git a/src/increase/resources/fednow_transfers.py b/src/increase/resources/fednow_transfers.py index 1ae25dc75..d29106d64 100644 --- a/src/increase/resources/fednow_transfers.py +++ b/src/increase/resources/fednow_transfers.py @@ -6,7 +6,7 @@ from ..types import fednow_transfer_list_params, fednow_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -161,7 +161,7 @@ def retrieve( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return self._get( - f"/fednow_transfers/{fednow_transfer_id}", + path_template("/fednow_transfers/{fednow_transfer_id}", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -266,7 +266,7 @@ def approve( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return self._post( - f"/fednow_transfers/{fednow_transfer_id}/approve", + path_template("/fednow_transfers/{fednow_transfer_id}/approve", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -308,7 +308,7 @@ def cancel( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return self._post( - f"/fednow_transfers/{fednow_transfer_id}/cancel", + path_template("/fednow_transfers/{fednow_transfer_id}/cancel", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -459,7 +459,7 @@ async def retrieve( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return await self._get( - f"/fednow_transfers/{fednow_transfer_id}", + path_template("/fednow_transfers/{fednow_transfer_id}", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -564,7 +564,7 @@ async def approve( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return await self._post( - f"/fednow_transfers/{fednow_transfer_id}/approve", + path_template("/fednow_transfers/{fednow_transfer_id}/approve", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -606,7 +606,7 @@ async def cancel( if not fednow_transfer_id: raise ValueError(f"Expected a non-empty value for `fednow_transfer_id` but received {fednow_transfer_id!r}") return await self._post( - f"/fednow_transfers/{fednow_transfer_id}/cancel", + path_template("/fednow_transfers/{fednow_transfer_id}/cancel", fednow_transfer_id=fednow_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/files.py b/src/increase/resources/files.py index c45ef807b..8ea95babc 100644 --- a/src/increase/resources/files.py +++ b/src/increase/resources/files.py @@ -9,7 +9,7 @@ from ..types import file_list_params, file_create_params from .._types import Body, Omit, Query, Headers, NotGiven, FileTypes, omit, not_given -from .._utils import extract_files, maybe_transform, deepcopy_minimal, async_maybe_transform +from .._utils import extract_files, path_template, maybe_transform, deepcopy_minimal, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -194,7 +194,7 @@ def retrieve( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return self._get( - f"/files/{file_id}", + path_template("/files/{file_id}", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -430,7 +430,7 @@ async def retrieve( if not file_id: raise ValueError(f"Expected a non-empty value for `file_id` but received {file_id!r}") return await self._get( - f"/files/{file_id}", + path_template("/files/{file_id}", file_id=file_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 465202ce1..3b0f05f1e 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -13,7 +13,7 @@ inbound_ach_transfer_create_notification_of_change_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -79,7 +79,9 @@ def retrieve( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._get( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}", inbound_ach_transfer_id=inbound_ach_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -186,7 +188,10 @@ def create_notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=maybe_transform( { "updated_account_number": updated_account_number, @@ -277,7 +282,10 @@ def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=maybe_transform( {"reason": reason}, inbound_ach_transfer_decline_params.InboundACHTransferDeclineParams ), @@ -359,7 +367,10 @@ def transfer_return( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/transfer_return", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/transfer_return", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=maybe_transform( {"reason": reason}, inbound_ach_transfer_transfer_return_params.InboundACHTransferTransferReturnParams ), @@ -424,7 +435,9 @@ async def retrieve( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._get( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}", inbound_ach_transfer_id=inbound_ach_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -531,7 +544,10 @@ async def create_notification_of_change( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/create_notification_of_change", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=await async_maybe_transform( { "updated_account_number": updated_account_number, @@ -622,7 +638,10 @@ async def decline( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/decline", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=await async_maybe_transform( {"reason": reason}, inbound_ach_transfer_decline_params.InboundACHTransferDeclineParams ), @@ -704,7 +723,10 @@ async def transfer_return( f"Expected a non-empty value for `inbound_ach_transfer_id` but received {inbound_ach_transfer_id!r}" ) return await self._post( - f"/inbound_ach_transfers/{inbound_ach_transfer_id}/transfer_return", + path_template( + "/inbound_ach_transfers/{inbound_ach_transfer_id}/transfer_return", + inbound_ach_transfer_id=inbound_ach_transfer_id, + ), body=await async_maybe_transform( {"reason": reason}, inbound_ach_transfer_transfer_return_params.InboundACHTransferTransferReturnParams ), diff --git a/src/increase/resources/inbound_check_deposits.py b/src/increase/resources/inbound_check_deposits.py index 0a924f241..d70fccad5 100644 --- a/src/increase/resources/inbound_check_deposits.py +++ b/src/increase/resources/inbound_check_deposits.py @@ -8,7 +8,7 @@ from ..types import inbound_check_deposit_list_params, inbound_check_deposit_return_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -74,7 +74,9 @@ def retrieve( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return self._get( - f"/inbound_check_deposits/{inbound_check_deposit_id}", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}", inbound_check_deposit_id=inbound_check_deposit_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -173,7 +175,10 @@ def decline( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/decline", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}/decline", + inbound_check_deposit_id=inbound_check_deposit_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -234,7 +239,10 @@ def return_( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}/return", + inbound_check_deposit_id=inbound_check_deposit_id, + ), body=maybe_transform( {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams ), @@ -299,7 +307,9 @@ async def retrieve( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return await self._get( - f"/inbound_check_deposits/{inbound_check_deposit_id}", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}", inbound_check_deposit_id=inbound_check_deposit_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -398,7 +408,10 @@ async def decline( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return await self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/decline", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}/decline", + inbound_check_deposit_id=inbound_check_deposit_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -459,7 +472,10 @@ async def return_( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return await self._post( - f"/inbound_check_deposits/{inbound_check_deposit_id}/return", + path_template( + "/inbound_check_deposits/{inbound_check_deposit_id}/return", + inbound_check_deposit_id=inbound_check_deposit_id, + ), body=await async_maybe_transform( {"reason": reason}, inbound_check_deposit_return_params.InboundCheckDepositReturnParams ), diff --git a/src/increase/resources/inbound_fednow_transfers.py b/src/increase/resources/inbound_fednow_transfers.py index 9a314e19f..b4b91e369 100644 --- a/src/increase/resources/inbound_fednow_transfers.py +++ b/src/increase/resources/inbound_fednow_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_fednow_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,10 @@ def retrieve( f"Expected a non-empty value for `inbound_fednow_transfer_id` but received {inbound_fednow_transfer_id!r}" ) return self._get( - f"/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + path_template( + "/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + inbound_fednow_transfer_id=inbound_fednow_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -189,7 +192,10 @@ async def retrieve( f"Expected a non-empty value for `inbound_fednow_transfer_id` but received {inbound_fednow_transfer_id!r}" ) return await self._get( - f"/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + path_template( + "/inbound_fednow_transfers/{inbound_fednow_transfer_id}", + inbound_fednow_transfer_id=inbound_fednow_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/inbound_mail_items.py b/src/increase/resources/inbound_mail_items.py index b4b95197a..8af4e7791 100644 --- a/src/increase/resources/inbound_mail_items.py +++ b/src/increase/resources/inbound_mail_items.py @@ -8,7 +8,7 @@ from ..types import inbound_mail_item_list_params, inbound_mail_item_action_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -74,7 +74,7 @@ def retrieve( f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" ) return self._get( - f"/inbound_mail_items/{inbound_mail_item_id}", + path_template("/inbound_mail_items/{inbound_mail_item_id}", inbound_mail_item_id=inbound_mail_item_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -171,7 +171,9 @@ def action( f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" ) return self._post( - f"/inbound_mail_items/{inbound_mail_item_id}/action", + path_template( + "/inbound_mail_items/{inbound_mail_item_id}/action", inbound_mail_item_id=inbound_mail_item_id + ), body=maybe_transform({"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams), options=make_request_options( extra_headers=extra_headers, @@ -234,7 +236,7 @@ async def retrieve( f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" ) return await self._get( - f"/inbound_mail_items/{inbound_mail_item_id}", + path_template("/inbound_mail_items/{inbound_mail_item_id}", inbound_mail_item_id=inbound_mail_item_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -331,7 +333,9 @@ async def action( f"Expected a non-empty value for `inbound_mail_item_id` but received {inbound_mail_item_id!r}" ) return await self._post( - f"/inbound_mail_items/{inbound_mail_item_id}/action", + path_template( + "/inbound_mail_items/{inbound_mail_item_id}/action", inbound_mail_item_id=inbound_mail_item_id + ), body=await async_maybe_transform( {"checks": checks}, inbound_mail_item_action_params.InboundMailItemActionParams ), diff --git a/src/increase/resources/inbound_real_time_payments_transfers.py b/src/increase/resources/inbound_real_time_payments_transfers.py index 8bbf1d4f8..1e127a215 100755 --- a/src/increase/resources/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/inbound_real_time_payments_transfers.py @@ -6,7 +6,7 @@ from ..types import inbound_real_time_payments_transfer_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,10 @@ def retrieve( f"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received {inbound_real_time_payments_transfer_id!r}" ) return self._get( - f"/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + path_template( + "/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + inbound_real_time_payments_transfer_id=inbound_real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -190,7 +193,10 @@ async def retrieve( f"Expected a non-empty value for `inbound_real_time_payments_transfer_id` but received {inbound_real_time_payments_transfer_id!r}" ) return await self._get( - f"/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + path_template( + "/inbound_real_time_payments_transfers/{inbound_real_time_payments_transfer_id}", + inbound_real_time_payments_transfer_id=inbound_real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/inbound_wire_drawdown_requests.py b/src/increase/resources/inbound_wire_drawdown_requests.py index b1e02507a..31987d38c 100644 --- a/src/increase/resources/inbound_wire_drawdown_requests.py +++ b/src/increase/resources/inbound_wire_drawdown_requests.py @@ -6,7 +6,7 @@ from ..types import inbound_wire_drawdown_request_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,10 @@ def retrieve( f"Expected a non-empty value for `inbound_wire_drawdown_request_id` but received {inbound_wire_drawdown_request_id!r}" ) return self._get( - f"/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", + path_template( + "/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", + inbound_wire_drawdown_request_id=inbound_wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -178,7 +181,10 @@ async def retrieve( f"Expected a non-empty value for `inbound_wire_drawdown_request_id` but received {inbound_wire_drawdown_request_id!r}" ) return await self._get( - f"/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", + path_template( + "/inbound_wire_drawdown_requests/{inbound_wire_drawdown_request_id}", + inbound_wire_drawdown_request_id=inbound_wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/inbound_wire_transfers.py b/src/increase/resources/inbound_wire_transfers.py index 1cee06f11..cf8b2f641 100644 --- a/src/increase/resources/inbound_wire_transfers.py +++ b/src/increase/resources/inbound_wire_transfers.py @@ -8,7 +8,7 @@ from ..types import inbound_wire_transfer_list_params, inbound_wire_transfer_reverse_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -74,7 +74,9 @@ def retrieve( f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" ) return self._get( - f"/inbound_wire_transfers/{inbound_wire_transfer_id}", + path_template( + "/inbound_wire_transfers/{inbound_wire_transfer_id}", inbound_wire_transfer_id=inbound_wire_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -187,7 +189,10 @@ def reverse( f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" ) return self._post( - f"/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + path_template( + "/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + inbound_wire_transfer_id=inbound_wire_transfer_id, + ), body=maybe_transform( {"reason": reason}, inbound_wire_transfer_reverse_params.InboundWireTransferReverseParams ), @@ -252,7 +257,9 @@ async def retrieve( f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" ) return await self._get( - f"/inbound_wire_transfers/{inbound_wire_transfer_id}", + path_template( + "/inbound_wire_transfers/{inbound_wire_transfer_id}", inbound_wire_transfer_id=inbound_wire_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -365,7 +372,10 @@ async def reverse( f"Expected a non-empty value for `inbound_wire_transfer_id` but received {inbound_wire_transfer_id!r}" ) return await self._post( - f"/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + path_template( + "/inbound_wire_transfers/{inbound_wire_transfer_id}/reverse", + inbound_wire_transfer_id=inbound_wire_transfer_id, + ), body=await async_maybe_transform( {"reason": reason}, inbound_wire_transfer_reverse_params.InboundWireTransferReverseParams ), diff --git a/src/increase/resources/intrafi_account_enrollments.py b/src/increase/resources/intrafi_account_enrollments.py index 0fadbae5e..9eac8ac3a 100644 --- a/src/increase/resources/intrafi_account_enrollments.py +++ b/src/increase/resources/intrafi_account_enrollments.py @@ -6,7 +6,7 @@ from ..types import intrafi_account_enrollment_list_params, intrafi_account_enrollment_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -122,7 +122,10 @@ def retrieve( f"Expected a non-empty value for `intrafi_account_enrollment_id` but received {intrafi_account_enrollment_id!r}" ) return self._get( - f"/intrafi_account_enrollments/{intrafi_account_enrollment_id}", + path_template( + "/intrafi_account_enrollments/{intrafi_account_enrollment_id}", + intrafi_account_enrollment_id=intrafi_account_enrollment_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -223,7 +226,10 @@ def unenroll( f"Expected a non-empty value for `intrafi_account_enrollment_id` but received {intrafi_account_enrollment_id!r}" ) return self._post( - f"/intrafi_account_enrollments/{intrafi_account_enrollment_id}/unenroll", + path_template( + "/intrafi_account_enrollments/{intrafi_account_enrollment_id}/unenroll", + intrafi_account_enrollment_id=intrafi_account_enrollment_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -335,7 +341,10 @@ async def retrieve( f"Expected a non-empty value for `intrafi_account_enrollment_id` but received {intrafi_account_enrollment_id!r}" ) return await self._get( - f"/intrafi_account_enrollments/{intrafi_account_enrollment_id}", + path_template( + "/intrafi_account_enrollments/{intrafi_account_enrollment_id}", + intrafi_account_enrollment_id=intrafi_account_enrollment_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -436,7 +445,10 @@ async def unenroll( f"Expected a non-empty value for `intrafi_account_enrollment_id` but received {intrafi_account_enrollment_id!r}" ) return await self._post( - f"/intrafi_account_enrollments/{intrafi_account_enrollment_id}/unenroll", + path_template( + "/intrafi_account_enrollments/{intrafi_account_enrollment_id}/unenroll", + intrafi_account_enrollment_id=intrafi_account_enrollment_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/intrafi_balances.py b/src/increase/resources/intrafi_balances.py index c911a5756..9b9a92647 100644 --- a/src/increase/resources/intrafi_balances.py +++ b/src/increase/resources/intrafi_balances.py @@ -5,6 +5,7 @@ import httpx from .._types import Body, Query, Headers, NotGiven, not_given +from .._utils import path_template from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -70,7 +71,7 @@ def intrafi_balance( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return self._get( - f"/accounts/{account_id}/intrafi_balance", + path_template("/accounts/{account_id}/intrafi_balance", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -129,7 +130,7 @@ async def intrafi_balance( if not account_id: raise ValueError(f"Expected a non-empty value for `account_id` but received {account_id!r}") return await self._get( - f"/accounts/{account_id}/intrafi_balance", + path_template("/accounts/{account_id}/intrafi_balance", account_id=account_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/intrafi_exclusions.py b/src/increase/resources/intrafi_exclusions.py index 344323023..84a64c6fe 100644 --- a/src/increase/resources/intrafi_exclusions.py +++ b/src/increase/resources/intrafi_exclusions.py @@ -6,7 +6,7 @@ from ..types import intrafi_exclusion_list_params, intrafi_exclusion_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -125,7 +125,7 @@ def retrieve( f"Expected a non-empty value for `intrafi_exclusion_id` but received {intrafi_exclusion_id!r}" ) return self._get( - f"/intrafi_exclusions/{intrafi_exclusion_id}", + path_template("/intrafi_exclusions/{intrafi_exclusion_id}", intrafi_exclusion_id=intrafi_exclusion_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -226,7 +226,9 @@ def archive( f"Expected a non-empty value for `intrafi_exclusion_id` but received {intrafi_exclusion_id!r}" ) return self._post( - f"/intrafi_exclusions/{intrafi_exclusion_id}/archive", + path_template( + "/intrafi_exclusions/{intrafi_exclusion_id}/archive", intrafi_exclusion_id=intrafi_exclusion_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -341,7 +343,7 @@ async def retrieve( f"Expected a non-empty value for `intrafi_exclusion_id` but received {intrafi_exclusion_id!r}" ) return await self._get( - f"/intrafi_exclusions/{intrafi_exclusion_id}", + path_template("/intrafi_exclusions/{intrafi_exclusion_id}", intrafi_exclusion_id=intrafi_exclusion_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -442,7 +444,9 @@ async def archive( f"Expected a non-empty value for `intrafi_exclusion_id` but received {intrafi_exclusion_id!r}" ) return await self._post( - f"/intrafi_exclusions/{intrafi_exclusion_id}/archive", + path_template( + "/intrafi_exclusions/{intrafi_exclusion_id}/archive", intrafi_exclusion_id=intrafi_exclusion_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/lockboxes.py b/src/increase/resources/lockboxes.py index 276fe76b0..b06fb0e1e 100644 --- a/src/increase/resources/lockboxes.py +++ b/src/increase/resources/lockboxes.py @@ -8,7 +8,7 @@ from ..types import lockbox_list_params, lockbox_create_params, lockbox_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -126,7 +126,7 @@ def retrieve( if not lockbox_id: raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") return self._get( - f"/lockboxes/{lockbox_id}", + path_template("/lockboxes/{lockbox_id}", lockbox_id=lockbox_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -178,7 +178,7 @@ def update( if not lockbox_id: raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") return self._patch( - f"/lockboxes/{lockbox_id}", + path_template("/lockboxes/{lockbox_id}", lockbox_id=lockbox_id), body=maybe_transform( { "check_deposit_behavior": check_deposit_behavior, @@ -361,7 +361,7 @@ async def retrieve( if not lockbox_id: raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") return await self._get( - f"/lockboxes/{lockbox_id}", + path_template("/lockboxes/{lockbox_id}", lockbox_id=lockbox_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -413,7 +413,7 @@ async def update( if not lockbox_id: raise ValueError(f"Expected a non-empty value for `lockbox_id` but received {lockbox_id!r}") return await self._patch( - f"/lockboxes/{lockbox_id}", + path_template("/lockboxes/{lockbox_id}", lockbox_id=lockbox_id), body=await async_maybe_transform( { "check_deposit_behavior": check_deposit_behavior, diff --git a/src/increase/resources/oauth_applications.py b/src/increase/resources/oauth_applications.py index d69d83ab3..e209a6375 100644 --- a/src/increase/resources/oauth_applications.py +++ b/src/increase/resources/oauth_applications.py @@ -6,7 +6,7 @@ from ..types import oauth_application_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,7 @@ def retrieve( f"Expected a non-empty value for `oauth_application_id` but received {oauth_application_id!r}" ) return self._get( - f"/oauth_applications/{oauth_application_id}", + path_template("/oauth_applications/{oauth_application_id}", oauth_application_id=oauth_application_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -182,7 +182,7 @@ async def retrieve( f"Expected a non-empty value for `oauth_application_id` but received {oauth_application_id!r}" ) return await self._get( - f"/oauth_applications/{oauth_application_id}", + path_template("/oauth_applications/{oauth_application_id}", oauth_application_id=oauth_application_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/oauth_connections.py b/src/increase/resources/oauth_connections.py index aa27390ad..ae4bd3208 100644 --- a/src/increase/resources/oauth_connections.py +++ b/src/increase/resources/oauth_connections.py @@ -6,7 +6,7 @@ from ..types import oauth_connection_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -72,7 +72,7 @@ def retrieve( f"Expected a non-empty value for `oauth_connection_id` but received {oauth_connection_id!r}" ) return self._get( - f"/oauth_connections/{oauth_connection_id}", + path_template("/oauth_connections/{oauth_connection_id}", oauth_connection_id=oauth_connection_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -185,7 +185,7 @@ async def retrieve( f"Expected a non-empty value for `oauth_connection_id` but received {oauth_connection_id!r}" ) return await self._get( - f"/oauth_connections/{oauth_connection_id}", + path_template("/oauth_connections/{oauth_connection_id}", oauth_connection_id=oauth_connection_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/pending_transactions.py b/src/increase/resources/pending_transactions.py index fc9aac6db..5eb7e2404 100644 --- a/src/increase/resources/pending_transactions.py +++ b/src/increase/resources/pending_transactions.py @@ -6,7 +6,7 @@ from ..types import pending_transaction_list_params, pending_transaction_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -133,7 +133,9 @@ def retrieve( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return self._get( - f"/pending_transactions/{pending_transaction_id}", + path_template( + "/pending_transactions/{pending_transaction_id}", pending_transaction_id=pending_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -239,7 +241,9 @@ def release( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return self._post( - f"/pending_transactions/{pending_transaction_id}/release", + path_template( + "/pending_transactions/{pending_transaction_id}/release", pending_transaction_id=pending_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -362,7 +366,9 @@ async def retrieve( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return await self._get( - f"/pending_transactions/{pending_transaction_id}", + path_template( + "/pending_transactions/{pending_transaction_id}", pending_transaction_id=pending_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -468,7 +474,9 @@ async def release( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return await self._post( - f"/pending_transactions/{pending_transaction_id}/release", + path_template( + "/pending_transactions/{pending_transaction_id}/release", pending_transaction_id=pending_transaction_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/physical_card_profiles.py b/src/increase/resources/physical_card_profiles.py index 67e2b910e..e0ad95108 100644 --- a/src/increase/resources/physical_card_profiles.py +++ b/src/increase/resources/physical_card_profiles.py @@ -10,7 +10,7 @@ physical_card_profile_create_params, ) from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -143,7 +143,9 @@ def retrieve( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return self._get( - f"/physical_card_profiles/{physical_card_profile_id}", + path_template( + "/physical_card_profiles/{physical_card_profile_id}", physical_card_profile_id=physical_card_profile_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -240,7 +242,10 @@ def archive( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return self._post( - f"/physical_card_profiles/{physical_card_profile_id}/archive", + path_template( + "/physical_card_profiles/{physical_card_profile_id}/archive", + physical_card_profile_id=physical_card_profile_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -303,7 +308,10 @@ def clone( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return self._post( - f"/physical_card_profiles/{physical_card_profile_id}/clone", + path_template( + "/physical_card_profiles/{physical_card_profile_id}/clone", + physical_card_profile_id=physical_card_profile_id, + ), body=maybe_transform( { "carrier_image_file_id": carrier_image_file_id, @@ -443,7 +451,9 @@ async def retrieve( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return await self._get( - f"/physical_card_profiles/{physical_card_profile_id}", + path_template( + "/physical_card_profiles/{physical_card_profile_id}", physical_card_profile_id=physical_card_profile_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -540,7 +550,10 @@ async def archive( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return await self._post( - f"/physical_card_profiles/{physical_card_profile_id}/archive", + path_template( + "/physical_card_profiles/{physical_card_profile_id}/archive", + physical_card_profile_id=physical_card_profile_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -603,7 +616,10 @@ async def clone( f"Expected a non-empty value for `physical_card_profile_id` but received {physical_card_profile_id!r}" ) return await self._post( - f"/physical_card_profiles/{physical_card_profile_id}/clone", + path_template( + "/physical_card_profiles/{physical_card_profile_id}/clone", + physical_card_profile_id=physical_card_profile_id, + ), body=await async_maybe_transform( { "carrier_image_file_id": carrier_image_file_id, diff --git a/src/increase/resources/physical_cards.py b/src/increase/resources/physical_cards.py index 818ed4baf..bb6cd8b7d 100644 --- a/src/increase/resources/physical_cards.py +++ b/src/increase/resources/physical_cards.py @@ -8,7 +8,7 @@ from ..types import physical_card_list_params, physical_card_create_params, physical_card_update_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -131,7 +131,7 @@ def retrieve( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._get( - f"/physical_cards/{physical_card_id}", + path_template("/physical_cards/{physical_card_id}", physical_card_id=physical_card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -176,7 +176,7 @@ def update( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._patch( - f"/physical_cards/{physical_card_id}", + path_template("/physical_cards/{physical_card_id}", physical_card_id=physical_card_id), body=maybe_transform({"status": status}, physical_card_update_params.PhysicalCardUpdateParams), options=make_request_options( extra_headers=extra_headers, @@ -357,7 +357,7 @@ async def retrieve( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._get( - f"/physical_cards/{physical_card_id}", + path_template("/physical_cards/{physical_card_id}", physical_card_id=physical_card_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -402,7 +402,7 @@ async def update( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._patch( - f"/physical_cards/{physical_card_id}", + path_template("/physical_cards/{physical_card_id}", physical_card_id=physical_card_id), body=await async_maybe_transform({"status": status}, physical_card_update_params.PhysicalCardUpdateParams), options=make_request_options( extra_headers=extra_headers, diff --git a/src/increase/resources/programs.py b/src/increase/resources/programs.py index 9130af3fc..c23857191 100644 --- a/src/increase/resources/programs.py +++ b/src/increase/resources/programs.py @@ -6,7 +6,7 @@ from ..types import program_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -70,7 +70,7 @@ def retrieve( if not program_id: raise ValueError(f"Expected a non-empty value for `program_id` but received {program_id!r}") return self._get( - f"/programs/{program_id}", + path_template("/programs/{program_id}", program_id=program_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -174,7 +174,7 @@ async def retrieve( if not program_id: raise ValueError(f"Expected a non-empty value for `program_id` but received {program_id!r}") return await self._get( - f"/programs/{program_id}", + path_template("/programs/{program_id}", program_id=program_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/real_time_decisions.py b/src/increase/resources/real_time_decisions.py index 4099e3c2e..d89ee7339 100644 --- a/src/increase/resources/real_time_decisions.py +++ b/src/increase/resources/real_time_decisions.py @@ -6,7 +6,7 @@ from ..types import real_time_decision_action_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -71,7 +71,7 @@ def retrieve( f"Expected a non-empty value for `real_time_decision_id` but received {real_time_decision_id!r}" ) return self._get( - f"/real_time_decisions/{real_time_decision_id}", + path_template("/real_time_decisions/{real_time_decision_id}", real_time_decision_id=real_time_decision_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -135,7 +135,9 @@ def action( f"Expected a non-empty value for `real_time_decision_id` but received {real_time_decision_id!r}" ) return self._post( - f"/real_time_decisions/{real_time_decision_id}/action", + path_template( + "/real_time_decisions/{real_time_decision_id}/action", real_time_decision_id=real_time_decision_id + ), body=maybe_transform( { "card_authentication": card_authentication, @@ -208,7 +210,7 @@ async def retrieve( f"Expected a non-empty value for `real_time_decision_id` but received {real_time_decision_id!r}" ) return await self._get( - f"/real_time_decisions/{real_time_decision_id}", + path_template("/real_time_decisions/{real_time_decision_id}", real_time_decision_id=real_time_decision_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -272,7 +274,9 @@ async def action( f"Expected a non-empty value for `real_time_decision_id` but received {real_time_decision_id!r}" ) return await self._post( - f"/real_time_decisions/{real_time_decision_id}/action", + path_template( + "/real_time_decisions/{real_time_decision_id}/action", real_time_decision_id=real_time_decision_id + ), body=await async_maybe_transform( { "card_authentication": card_authentication, diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 40605dc8e..39b31d296 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -6,7 +6,7 @@ from ..types import real_time_payments_transfer_list_params, real_time_payments_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -165,7 +165,10 @@ def retrieve( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return self._get( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -273,7 +276,10 @@ def approve( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return self._post( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -317,7 +323,10 @@ def cancel( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return self._post( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -472,7 +481,10 @@ async def retrieve( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return await self._get( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -580,7 +592,10 @@ async def approve( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return await self._post( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}/approve", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -624,7 +639,10 @@ async def cancel( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return await self._post( - f"/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + path_template( + "/real_time_payments_transfers/{real_time_payments_transfer_id}/cancel", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/account_transfers.py b/src/increase/resources/simulations/account_transfers.py index 14ff9974d..969c1b7ca 100644 --- a/src/increase/resources/simulations/account_transfers.py +++ b/src/increase/resources/simulations/account_transfers.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -75,7 +76,9 @@ def complete( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return self._post( - f"/simulations/account_transfers/{account_transfer_id}/complete", + path_template( + "/simulations/account_transfers/{account_transfer_id}/complete", account_transfer_id=account_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -143,7 +146,9 @@ async def complete( f"Expected a non-empty value for `account_transfer_id` but received {account_transfer_id!r}" ) return await self._post( - f"/simulations/account_transfers/{account_transfer_id}/complete", + path_template( + "/simulations/account_transfers/{account_transfer_id}/complete", account_transfer_id=account_transfer_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/ach_transfers.py b/src/increase/resources/simulations/ach_transfers.py index 2eda2f5cd..1d9712bd5 100644 --- a/src/increase/resources/simulations/ach_transfers.py +++ b/src/increase/resources/simulations/ach_transfers.py @@ -7,7 +7,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -83,7 +83,7 @@ def acknowledge( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", + path_template("/simulations/ach_transfers/{ach_transfer_id}/acknowledge", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -188,7 +188,10 @@ def create_notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + path_template( + "/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + ach_transfer_id=ach_transfer_id, + ), body=maybe_transform( { "change_code": change_code, @@ -466,7 +469,7 @@ def return_( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/return", + path_template("/simulations/ach_transfers/{ach_transfer_id}/return", ach_transfer_id=ach_transfer_id), body=maybe_transform({"reason": reason}, ach_transfer_return_params.ACHTransferReturnParams), options=make_request_options( extra_headers=extra_headers, @@ -526,7 +529,7 @@ def settle( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/settle", + path_template("/simulations/ach_transfers/{ach_transfer_id}/settle", ach_transfer_id=ach_transfer_id), body=maybe_transform( {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, ach_transfer_settle_params.ACHTransferSettleParams, @@ -577,7 +580,7 @@ def submit( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/submit", + path_template("/simulations/ach_transfers/{ach_transfer_id}/submit", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -645,7 +648,7 @@ async def acknowledge( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/acknowledge", + path_template("/simulations/ach_transfers/{ach_transfer_id}/acknowledge", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -750,7 +753,10 @@ async def create_notification_of_change( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + path_template( + "/simulations/ach_transfers/{ach_transfer_id}/create_notification_of_change", + ach_transfer_id=ach_transfer_id, + ), body=await async_maybe_transform( { "change_code": change_code, @@ -1028,7 +1034,7 @@ async def return_( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/return", + path_template("/simulations/ach_transfers/{ach_transfer_id}/return", ach_transfer_id=ach_transfer_id), body=await async_maybe_transform({"reason": reason}, ach_transfer_return_params.ACHTransferReturnParams), options=make_request_options( extra_headers=extra_headers, @@ -1088,7 +1094,7 @@ async def settle( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/settle", + path_template("/simulations/ach_transfers/{ach_transfer_id}/settle", ach_transfer_id=ach_transfer_id), body=await async_maybe_transform( {"inbound_funds_hold_behavior": inbound_funds_hold_behavior}, ach_transfer_settle_params.ACHTransferSettleParams, @@ -1139,7 +1145,7 @@ async def submit( if not ach_transfer_id: raise ValueError(f"Expected a non-empty value for `ach_transfer_id` but received {ach_transfer_id!r}") return await self._post( - f"/simulations/ach_transfers/{ach_transfer_id}/submit", + path_template("/simulations/ach_transfers/{ach_transfer_id}/submit", ach_transfer_id=ach_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/card_authentications.py b/src/increase/resources/simulations/card_authentications.py index 432a9b574..bbc362b79 100644 --- a/src/increase/resources/simulations/card_authentications.py +++ b/src/increase/resources/simulations/card_authentications.py @@ -7,7 +7,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -169,7 +169,10 @@ def challenge_attempts( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return self._post( - f"/simulations/card_authentications/{card_payment_id}/challenge_attempts", + path_template( + "/simulations/card_authentications/{card_payment_id}/challenge_attempts", + card_payment_id=card_payment_id, + ), body=maybe_transform( {"one_time_code": one_time_code}, card_authentication_challenge_attempts_params.CardAuthenticationChallengeAttemptsParams, @@ -220,7 +223,9 @@ def challenges( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return self._post( - f"/simulations/card_authentications/{card_payment_id}/challenges", + path_template( + "/simulations/card_authentications/{card_payment_id}/challenges", card_payment_id=card_payment_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -378,7 +383,10 @@ async def challenge_attempts( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return await self._post( - f"/simulations/card_authentications/{card_payment_id}/challenge_attempts", + path_template( + "/simulations/card_authentications/{card_payment_id}/challenge_attempts", + card_payment_id=card_payment_id, + ), body=await async_maybe_transform( {"one_time_code": one_time_code}, card_authentication_challenge_attempts_params.CardAuthenticationChallengeAttemptsParams, @@ -429,7 +437,9 @@ async def challenges( if not card_payment_id: raise ValueError(f"Expected a non-empty value for `card_payment_id` but received {card_payment_id!r}") return await self._post( - f"/simulations/card_authentications/{card_payment_id}/challenges", + path_template( + "/simulations/card_authentications/{card_payment_id}/challenges", card_payment_id=card_payment_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/card_disputes.py b/src/increase/resources/simulations/card_disputes.py index a0fc9cb87..e4c09ed56 100644 --- a/src/increase/resources/simulations/card_disputes.py +++ b/src/increase/resources/simulations/card_disputes.py @@ -7,7 +7,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -87,7 +87,7 @@ def action( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return self._post( - f"/simulations/card_disputes/{card_dispute_id}/action", + path_template("/simulations/card_disputes/{card_dispute_id}/action", card_dispute_id=card_dispute_id), body=maybe_transform( { "network": network, @@ -170,7 +170,7 @@ async def action( if not card_dispute_id: raise ValueError(f"Expected a non-empty value for `card_dispute_id` but received {card_dispute_id!r}") return await self._post( - f"/simulations/card_disputes/{card_dispute_id}/action", + path_template("/simulations/card_disputes/{card_dispute_id}/action", card_dispute_id=card_dispute_id), body=await async_maybe_transform( { "network": network, diff --git a/src/increase/resources/simulations/check_deposits.py b/src/increase/resources/simulations/check_deposits.py index 1fa37c646..f323e52cf 100644 --- a/src/increase/resources/simulations/check_deposits.py +++ b/src/increase/resources/simulations/check_deposits.py @@ -7,7 +7,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -99,7 +99,9 @@ def adjustment( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._post( - f"/simulations/check_deposits/{check_deposit_id}/adjustment", + path_template( + "/simulations/check_deposits/{check_deposit_id}/adjustment", check_deposit_id=check_deposit_id + ), body=maybe_transform( { "amount": amount, @@ -150,7 +152,7 @@ def reject( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._post( - f"/simulations/check_deposits/{check_deposit_id}/reject", + path_template("/simulations/check_deposits/{check_deposit_id}/reject", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -194,7 +196,7 @@ def return_( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._post( - f"/simulations/check_deposits/{check_deposit_id}/return", + path_template("/simulations/check_deposits/{check_deposit_id}/return", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -240,7 +242,7 @@ def submit( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return self._post( - f"/simulations/check_deposits/{check_deposit_id}/submit", + path_template("/simulations/check_deposits/{check_deposit_id}/submit", check_deposit_id=check_deposit_id), body=maybe_transform({"scan": scan}, check_deposit_submit_params.CheckDepositSubmitParams), options=make_request_options( extra_headers=extra_headers, @@ -329,7 +331,9 @@ async def adjustment( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._post( - f"/simulations/check_deposits/{check_deposit_id}/adjustment", + path_template( + "/simulations/check_deposits/{check_deposit_id}/adjustment", check_deposit_id=check_deposit_id + ), body=await async_maybe_transform( { "amount": amount, @@ -380,7 +384,7 @@ async def reject( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._post( - f"/simulations/check_deposits/{check_deposit_id}/reject", + path_template("/simulations/check_deposits/{check_deposit_id}/reject", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -424,7 +428,7 @@ async def return_( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._post( - f"/simulations/check_deposits/{check_deposit_id}/return", + path_template("/simulations/check_deposits/{check_deposit_id}/return", check_deposit_id=check_deposit_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -470,7 +474,7 @@ async def submit( if not check_deposit_id: raise ValueError(f"Expected a non-empty value for `check_deposit_id` but received {check_deposit_id!r}") return await self._post( - f"/simulations/check_deposits/{check_deposit_id}/submit", + path_template("/simulations/check_deposits/{check_deposit_id}/submit", check_deposit_id=check_deposit_id), body=await async_maybe_transform({"scan": scan}, check_deposit_submit_params.CheckDepositSubmitParams), options=make_request_options( extra_headers=extra_headers, diff --git a/src/increase/resources/simulations/check_transfers.py b/src/increase/resources/simulations/check_transfers.py index a326ff168..e0f4e0e80 100644 --- a/src/increase/resources/simulations/check_transfers.py +++ b/src/increase/resources/simulations/check_transfers.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -73,7 +74,7 @@ def mail( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return self._post( - f"/simulations/check_transfers/{check_transfer_id}/mail", + path_template("/simulations/check_transfers/{check_transfer_id}/mail", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -139,7 +140,7 @@ async def mail( if not check_transfer_id: raise ValueError(f"Expected a non-empty value for `check_transfer_id` but received {check_transfer_id!r}") return await self._post( - f"/simulations/check_transfers/{check_transfer_id}/mail", + path_template("/simulations/check_transfers/{check_transfer_id}/mail", check_transfer_id=check_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/inbound_check_deposits.py b/src/increase/resources/simulations/inbound_check_deposits.py index cf30df066..1b748944e 100644 --- a/src/increase/resources/simulations/inbound_check_deposits.py +++ b/src/increase/resources/simulations/inbound_check_deposits.py @@ -7,7 +7,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -169,7 +169,10 @@ def adjustment( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return self._post( - f"/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + path_template( + "/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + inbound_check_deposit_id=inbound_check_deposit_id, + ), body=maybe_transform( { "amount": amount, @@ -334,7 +337,10 @@ async def adjustment( f"Expected a non-empty value for `inbound_check_deposit_id` but received {inbound_check_deposit_id!r}" ) return await self._post( - f"/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + path_template( + "/simulations/inbound_check_deposits/{inbound_check_deposit_id}/adjustment", + inbound_check_deposit_id=inbound_check_deposit_id, + ), body=await async_maybe_transform( { "amount": amount, diff --git a/src/increase/resources/simulations/pending_transactions.py b/src/increase/resources/simulations/pending_transactions.py index 8d1911943..179c20420 100644 --- a/src/increase/resources/simulations/pending_transactions.py +++ b/src/increase/resources/simulations/pending_transactions.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -74,7 +75,10 @@ def release_inbound_funds_hold( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return self._post( - f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", + path_template( + "/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", + pending_transaction_id=pending_transaction_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -141,7 +145,10 @@ async def release_inbound_funds_hold( f"Expected a non-empty value for `pending_transaction_id` but received {pending_transaction_id!r}" ) return await self._post( - f"/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", + path_template( + "/simulations/pending_transactions/{pending_transaction_id}/release_inbound_funds_hold", + pending_transaction_id=pending_transaction_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/physical_cards.py b/src/increase/resources/simulations/physical_cards.py index e4b4a5cf0..6a2ed3b35 100644 --- a/src/increase/resources/simulations/physical_cards.py +++ b/src/increase/resources/simulations/physical_cards.py @@ -9,7 +9,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -102,7 +102,9 @@ def create( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._post( - f"/simulations/physical_cards/{physical_card_id}/tracking_updates", + path_template( + "/simulations/physical_cards/{physical_card_id}/tracking_updates", physical_card_id=physical_card_id + ), body=maybe_transform( { "category": category, @@ -175,7 +177,9 @@ def advance_shipment( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return self._post( - f"/simulations/physical_cards/{physical_card_id}/advance_shipment", + path_template( + "/simulations/physical_cards/{physical_card_id}/advance_shipment", physical_card_id=physical_card_id + ), body=maybe_transform( {"shipment_status": shipment_status}, physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, @@ -268,7 +272,9 @@ async def create( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._post( - f"/simulations/physical_cards/{physical_card_id}/tracking_updates", + path_template( + "/simulations/physical_cards/{physical_card_id}/tracking_updates", physical_card_id=physical_card_id + ), body=await async_maybe_transform( { "category": category, @@ -341,7 +347,9 @@ async def advance_shipment( if not physical_card_id: raise ValueError(f"Expected a non-empty value for `physical_card_id` but received {physical_card_id!r}") return await self._post( - f"/simulations/physical_cards/{physical_card_id}/advance_shipment", + path_template( + "/simulations/physical_cards/{physical_card_id}/advance_shipment", physical_card_id=physical_card_id + ), body=await async_maybe_transform( {"shipment_status": shipment_status}, physical_card_advance_shipment_params.PhysicalCardAdvanceShipmentParams, diff --git a/src/increase/resources/simulations/real_time_payments_transfers.py b/src/increase/resources/simulations/real_time_payments_transfers.py index 28faff7a0..a093e3042 100644 --- a/src/increase/resources/simulations/real_time_payments_transfers.py +++ b/src/increase/resources/simulations/real_time_payments_transfers.py @@ -5,7 +5,7 @@ import httpx from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from ..._utils import maybe_transform, async_maybe_transform +from ..._utils import path_template, maybe_transform, async_maybe_transform from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -80,7 +80,10 @@ def complete( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return self._post( - f"/simulations/real_time_payments_transfers/{real_time_payments_transfer_id}/complete", + path_template( + "/simulations/real_time_payments_transfers/{real_time_payments_transfer_id}/complete", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), body=maybe_transform( {"rejection": rejection}, real_time_payments_transfer_complete_params.RealTimePaymentsTransferCompleteParams, @@ -155,7 +158,10 @@ async def complete( f"Expected a non-empty value for `real_time_payments_transfer_id` but received {real_time_payments_transfer_id!r}" ) return await self._post( - f"/simulations/real_time_payments_transfers/{real_time_payments_transfer_id}/complete", + path_template( + "/simulations/real_time_payments_transfers/{real_time_payments_transfer_id}/complete", + real_time_payments_transfer_id=real_time_payments_transfer_id, + ), body=await async_maybe_transform( {"rejection": rejection}, real_time_payments_transfer_complete_params.RealTimePaymentsTransferCompleteParams, diff --git a/src/increase/resources/simulations/wire_drawdown_requests.py b/src/increase/resources/simulations/wire_drawdown_requests.py index 2b56cd0de..a3c8cc56b 100644 --- a/src/increase/resources/simulations/wire_drawdown_requests.py +++ b/src/increase/resources/simulations/wire_drawdown_requests.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -72,7 +73,10 @@ def refuse( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return self._post( - f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + path_template( + "/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + wire_drawdown_request_id=wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -116,7 +120,10 @@ def submit( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return self._post( - f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + path_template( + "/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + wire_drawdown_request_id=wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -181,7 +188,10 @@ async def refuse( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return await self._post( - f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + path_template( + "/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/refuse", + wire_drawdown_request_id=wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -225,7 +235,10 @@ async def submit( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return await self._post( - f"/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + path_template( + "/simulations/wire_drawdown_requests/{wire_drawdown_request_id}/submit", + wire_drawdown_request_id=wire_drawdown_request_id, + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/simulations/wire_transfers.py b/src/increase/resources/simulations/wire_transfers.py index 0be0eeaa4..f46dd3675 100644 --- a/src/increase/resources/simulations/wire_transfers.py +++ b/src/increase/resources/simulations/wire_transfers.py @@ -5,6 +5,7 @@ import httpx from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template from ..._compat import cached_property from ..._resource import SyncAPIResource, AsyncAPIResource from ..._response import ( @@ -73,7 +74,7 @@ def reverse( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + path_template("/simulations/wire_transfers/{wire_transfer_id}/reverse", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -117,7 +118,7 @@ def submit( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", + path_template("/simulations/wire_transfers/{wire_transfer_id}/submit", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -183,7 +184,7 @@ async def reverse( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/reverse", + path_template("/simulations/wire_transfers/{wire_transfer_id}/reverse", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -227,7 +228,7 @@ async def submit( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - f"/simulations/wire_transfers/{wire_transfer_id}/submit", + path_template("/simulations/wire_transfers/{wire_transfer_id}/submit", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/swift_transfers.py b/src/increase/resources/swift_transfers.py index 1573ac604..df75020e3 100644 --- a/src/increase/resources/swift_transfers.py +++ b/src/increase/resources/swift_transfers.py @@ -8,7 +8,7 @@ from ..types import swift_transfer_list_params, swift_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -172,7 +172,7 @@ def retrieve( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return self._get( - f"/swift_transfers/{swift_transfer_id}", + path_template("/swift_transfers/{swift_transfer_id}", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -273,7 +273,7 @@ def approve( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return self._post( - f"/swift_transfers/{swift_transfer_id}/approve", + path_template("/swift_transfers/{swift_transfer_id}/approve", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -315,7 +315,7 @@ def cancel( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return self._post( - f"/swift_transfers/{swift_transfer_id}/cancel", + path_template("/swift_transfers/{swift_transfer_id}/cancel", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -475,7 +475,7 @@ async def retrieve( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return await self._get( - f"/swift_transfers/{swift_transfer_id}", + path_template("/swift_transfers/{swift_transfer_id}", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -576,7 +576,7 @@ async def approve( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return await self._post( - f"/swift_transfers/{swift_transfer_id}/approve", + path_template("/swift_transfers/{swift_transfer_id}/approve", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -618,7 +618,7 @@ async def cancel( if not swift_transfer_id: raise ValueError(f"Expected a non-empty value for `swift_transfer_id` but received {swift_transfer_id!r}") return await self._post( - f"/swift_transfers/{swift_transfer_id}/cancel", + path_template("/swift_transfers/{swift_transfer_id}/cancel", swift_transfer_id=swift_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/src/increase/resources/transactions.py b/src/increase/resources/transactions.py index d61dda617..7bbadaf7e 100644 --- a/src/increase/resources/transactions.py +++ b/src/increase/resources/transactions.py @@ -6,7 +6,7 @@ from ..types import transaction_list_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform +from .._utils import path_template, maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -70,7 +70,7 @@ def retrieve( if not transaction_id: raise ValueError(f"Expected a non-empty value for `transaction_id` but received {transaction_id!r}") return self._get( - f"/transactions/{transaction_id}", + path_template("/transactions/{transaction_id}", transaction_id=transaction_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -187,7 +187,7 @@ async def retrieve( if not transaction_id: raise ValueError(f"Expected a non-empty value for `transaction_id` but received {transaction_id!r}") return await self._get( - f"/transactions/{transaction_id}", + path_template("/transactions/{transaction_id}", transaction_id=transaction_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/wire_drawdown_requests.py b/src/increase/resources/wire_drawdown_requests.py index a05d7ad2b..6a3defdc7 100644 --- a/src/increase/resources/wire_drawdown_requests.py +++ b/src/increase/resources/wire_drawdown_requests.py @@ -8,7 +8,7 @@ from ..types import wire_drawdown_request_list_params, wire_drawdown_request_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -172,7 +172,9 @@ def retrieve( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return self._get( - f"/wire_drawdown_requests/{wire_drawdown_request_id}", + path_template( + "/wire_drawdown_requests/{wire_drawdown_request_id}", wire_drawdown_request_id=wire_drawdown_request_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -385,7 +387,9 @@ async def retrieve( f"Expected a non-empty value for `wire_drawdown_request_id` but received {wire_drawdown_request_id!r}" ) return await self._get( - f"/wire_drawdown_requests/{wire_drawdown_request_id}", + path_template( + "/wire_drawdown_requests/{wire_drawdown_request_id}", wire_drawdown_request_id=wire_drawdown_request_id + ), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), diff --git a/src/increase/resources/wire_transfers.py b/src/increase/resources/wire_transfers.py index c2a5a72f4..86a714336 100644 --- a/src/increase/resources/wire_transfers.py +++ b/src/increase/resources/wire_transfers.py @@ -6,7 +6,7 @@ from ..types import wire_transfer_list_params, wire_transfer_create_params from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given -from .._utils import maybe_transform, async_maybe_transform +from .._utils import path_template, maybe_transform, async_maybe_transform from .._compat import cached_property from .._resource import SyncAPIResource, AsyncAPIResource from .._response import ( @@ -161,7 +161,7 @@ def retrieve( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._get( - f"/wire_transfers/{wire_transfer_id}", + path_template("/wire_transfers/{wire_transfer_id}", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -266,7 +266,7 @@ def approve( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - f"/wire_transfers/{wire_transfer_id}/approve", + path_template("/wire_transfers/{wire_transfer_id}/approve", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -308,7 +308,7 @@ def cancel( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return self._post( - f"/wire_transfers/{wire_transfer_id}/cancel", + path_template("/wire_transfers/{wire_transfer_id}/cancel", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -459,7 +459,7 @@ async def retrieve( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._get( - f"/wire_transfers/{wire_transfer_id}", + path_template("/wire_transfers/{wire_transfer_id}", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout ), @@ -564,7 +564,7 @@ async def approve( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - f"/wire_transfers/{wire_transfer_id}/approve", + path_template("/wire_transfers/{wire_transfer_id}/approve", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, @@ -606,7 +606,7 @@ async def cancel( if not wire_transfer_id: raise ValueError(f"Expected a non-empty value for `wire_transfer_id` but received {wire_transfer_id!r}") return await self._post( - f"/wire_transfers/{wire_transfer_id}/cancel", + path_template("/wire_transfers/{wire_transfer_id}/cancel", wire_transfer_id=wire_transfer_id), options=make_request_options( extra_headers=extra_headers, extra_query=extra_query, diff --git a/tests/test_utils/test_path.py b/tests/test_utils/test_path.py new file mode 100644 index 000000000..a98e77c6a --- /dev/null +++ b/tests/test_utils/test_path.py @@ -0,0 +1,89 @@ +from __future__ import annotations + +from typing import Any + +import pytest + +from increase._utils._path import path_template + + +@pytest.mark.parametrize( + "template, kwargs, expected", + [ + ("/v1/{id}", dict(id="abc"), "/v1/abc"), + ("/v1/{a}/{b}", dict(a="x", b="y"), "/v1/x/y"), + ("/v1/{a}{b}/path/{c}?val={d}#{e}", dict(a="x", b="y", c="z", d="u", e="v"), "/v1/xy/path/z?val=u#v"), + ("/{w}/{w}", dict(w="echo"), "/echo/echo"), + ("/v1/static", {}, "/v1/static"), + ("", {}, ""), + ("/v1/?q={n}&count=10", dict(n=42), "/v1/?q=42&count=10"), + ("/v1/{v}", dict(v=None), "/v1/null"), + ("/v1/{v}", dict(v=True), "/v1/true"), + ("/v1/{v}", dict(v=False), "/v1/false"), + ("/v1/{v}", dict(v=".hidden"), "/v1/.hidden"), # dot prefix ok + ("/v1/{v}", dict(v="file.txt"), "/v1/file.txt"), # dot in middle ok + ("/v1/{v}", dict(v="..."), "/v1/..."), # triple dot ok + ("/v1/{a}{b}", dict(a=".", b="txt"), "/v1/.txt"), # dot var combining with adjacent to be ok + ("/items?q={v}#{f}", dict(v=".", f=".."), "/items?q=.#.."), # dots in query/fragment are fine + ( + "/v1/{a}?query={b}", + dict(a="../../other/endpoint", b="a&bad=true"), + "/v1/..%2F..%2Fother%2Fendpoint?query=a%26bad%3Dtrue", + ), + ("/v1/{val}", dict(val="a/b/c"), "/v1/a%2Fb%2Fc"), + ("/v1/{val}", dict(val="a/b/c?query=value"), "/v1/a%2Fb%2Fc%3Fquery=value"), + ("/v1/{val}", dict(val="a/b/c?query=value&bad=true"), "/v1/a%2Fb%2Fc%3Fquery=value&bad=true"), + ("/v1/{val}", dict(val="%20"), "/v1/%2520"), # escapes escape sequences in input + # Query: slash and ? are safe, # is not + ("/items?q={v}", dict(v="a/b"), "/items?q=a/b"), + ("/items?q={v}", dict(v="a?b"), "/items?q=a?b"), + ("/items?q={v}", dict(v="a#b"), "/items?q=a%23b"), + ("/items?q={v}", dict(v="a b"), "/items?q=a%20b"), + # Fragment: slash and ? are safe + ("/docs#{v}", dict(v="a/b"), "/docs#a/b"), + ("/docs#{v}", dict(v="a?b"), "/docs#a?b"), + # Path: slash, ? and # are all encoded + ("/v1/{v}", dict(v="a/b"), "/v1/a%2Fb"), + ("/v1/{v}", dict(v="a?b"), "/v1/a%3Fb"), + ("/v1/{v}", dict(v="a#b"), "/v1/a%23b"), + # same var encoded differently by component + ( + "/v1/{v}?q={v}#{v}", + dict(v="a/b?c#d"), + "/v1/a%2Fb%3Fc%23d?q=a/b?c%23d#a/b?c%23d", + ), + ("/v1/{val}", dict(val="x?admin=true"), "/v1/x%3Fadmin=true"), # query injection + ("/v1/{val}", dict(val="x#admin"), "/v1/x%23admin"), # fragment injection + ], +) +def test_interpolation(template: str, kwargs: dict[str, Any], expected: str) -> None: + assert path_template(template, **kwargs) == expected + + +def test_missing_kwarg_raises_key_error() -> None: + with pytest.raises(KeyError, match="org_id"): + path_template("/v1/{org_id}") + + +@pytest.mark.parametrize( + "template, kwargs", + [ + ("{a}/path", dict(a=".")), + ("{a}/path", dict(a="..")), + ("/v1/{a}", dict(a=".")), + ("/v1/{a}", dict(a="..")), + ("/v1/{a}/path", dict(a=".")), + ("/v1/{a}/path", dict(a="..")), + ("/v1/{a}{b}", dict(a=".", b=".")), # adjacent vars → ".." + ("/v1/{a}.", dict(a=".")), # var + static → ".." + ("/v1/{a}{b}", dict(a="", b=".")), # empty + dot → "." + ("/v1/%2e/{x}", dict(x="ok")), # encoded dot in static text + ("/v1/%2e./{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/.%2E/{x}", dict(x="ok")), # mixed encoded ".." in static + ("/v1/{v}?q=1", dict(v="..")), + ("/v1/{v}#frag", dict(v="..")), + ], +) +def test_dot_segment_rejected(template: str, kwargs: dict[str, Any]) -> None: + with pytest.raises(ValueError, match="dot-segment"): + path_template(template, **kwargs) From 54e5cb3bf6a2eab7649f000786f703ed14743c43 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:47:07 +0000 Subject: [PATCH 1252/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 39ba1f879..b72fe7783 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.450.0" + ".": "0.450.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e363c8dba..6323c4522 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.450.0" +version = "0.450.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ea6a8848a..98a34240b 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.450.0" # x-release-please-version +__version__ = "0.450.1" # x-release-please-version From c896f59b4a67c1e2843f27abaac64e815b8cf627 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:24:23 +0000 Subject: [PATCH 1253/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/fednow_transfers.py | 8 -------- src/increase/types/fednow_transfer_create_params.py | 3 --- tests/api_resources/test_fednow_transfers.py | 8 -------- 4 files changed, 2 insertions(+), 21 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8e3e051f7..e317ba884 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f3d22401feb4671870673cb67688b163ee7f26acb6d2f89dcf79b26b0675523f.yml -openapi_spec_hash: 4d6dbce33f5de203d92df4c20a957665 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a8fb0a78ec74e41f3c1f5d8d455b1496d567948e3a7a3ae375338173ced538e.yml +openapi_spec_hash: 6dbffca55fa0226c3603ee180594bd2b config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/resources/fednow_transfers.py b/src/increase/resources/fednow_transfers.py index d29106d64..23c2ea806 100644 --- a/src/increase/resources/fednow_transfers.py +++ b/src/increase/resources/fednow_transfers.py @@ -45,7 +45,6 @@ def with_streaming_response(self) -> FednowTransfersResourceWithStreamingRespons def create( self, *, - account_id: str, amount: int, creditor_name: str, debtor_name: str, @@ -69,8 +68,6 @@ def create( Create a FedNow Transfer Args: - account_id: The identifier for the account that will send the transfer. - amount: The amount, in minor units, to send to the creditor. creditor_name: The creditor's name. @@ -108,7 +105,6 @@ def create( "/fednow_transfers", body=maybe_transform( { - "account_id": account_id, "amount": amount, "creditor_name": creditor_name, "debtor_name": debtor_name, @@ -343,7 +339,6 @@ def with_streaming_response(self) -> AsyncFednowTransfersResourceWithStreamingRe async def create( self, *, - account_id: str, amount: int, creditor_name: str, debtor_name: str, @@ -367,8 +362,6 @@ async def create( Create a FedNow Transfer Args: - account_id: The identifier for the account that will send the transfer. - amount: The amount, in minor units, to send to the creditor. creditor_name: The creditor's name. @@ -406,7 +399,6 @@ async def create( "/fednow_transfers", body=await async_maybe_transform( { - "account_id": account_id, "amount": amount, "creditor_name": creditor_name, "debtor_name": debtor_name, diff --git a/src/increase/types/fednow_transfer_create_params.py b/src/increase/types/fednow_transfer_create_params.py index 29fa51456..72986a54d 100644 --- a/src/increase/types/fednow_transfer_create_params.py +++ b/src/increase/types/fednow_transfer_create_params.py @@ -8,9 +8,6 @@ class FednowTransferCreateParams(TypedDict, total=False): - account_id: Required[str] - """The identifier for the account that will send the transfer.""" - amount: Required[int] """The amount, in minor units, to send to the creditor.""" diff --git a/tests/api_resources/test_fednow_transfers.py b/tests/api_resources/test_fednow_transfers.py index c13a3ee40..9059977e2 100644 --- a/tests/api_resources/test_fednow_transfers.py +++ b/tests/api_resources/test_fednow_transfers.py @@ -22,7 +22,6 @@ class TestFednowTransfers: @parametrize def test_method_create(self, client: Increase) -> None: fednow_transfer = client.fednow_transfers.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -34,7 +33,6 @@ def test_method_create(self, client: Increase) -> None: @parametrize def test_method_create_with_all_params(self, client: Increase) -> None: fednow_transfer = client.fednow_transfers.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -62,7 +60,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: @parametrize def test_raw_response_create(self, client: Increase) -> None: response = client.fednow_transfers.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -78,7 +75,6 @@ def test_raw_response_create(self, client: Increase) -> None: @parametrize def test_streaming_response_create(self, client: Increase) -> None: with client.fednow_transfers.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -259,7 +255,6 @@ class TestAsyncFednowTransfers: @parametrize async def test_method_create(self, async_client: AsyncIncrease) -> None: fednow_transfer = await async_client.fednow_transfers.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -271,7 +266,6 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: fednow_transfer = await async_client.fednow_transfers.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -299,7 +293,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) @parametrize async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.fednow_transfers.with_raw_response.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", @@ -315,7 +308,6 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: @parametrize async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: async with async_client.fednow_transfers.with_streaming_response.create( - account_id="account_in71c4amph0vgo2qllky", amount=100, creditor_name="Ian Crease", debtor_name="National Phonograph Company", From 92aea9c04540b1b24bce4bd99f799940abdad980 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 16:27:34 +0000 Subject: [PATCH 1254/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b72fe7783..bc54c8a6a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.450.1" + ".": "0.451.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 6323c4522..4f3c2557d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.450.1" +version = "0.451.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 98a34240b..66e496821 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.450.1" # x-release-please-version +__version__ = "0.451.0" # x-release-please-version From 7ed18f707a4136c455eb7ccb088008c7e7d82a77 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 19 Mar 2026 18:59:17 +0000 Subject: [PATCH 1255/1325] refactor(tests): switch from prism to steady --- CONTRIBUTING.md | 2 +- scripts/mock | 26 +++++++++++++------------- scripts/test | 16 ++++++++-------- 3 files changed, 22 insertions(+), 22 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cc378bfeb..e98046a05 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -85,7 +85,7 @@ $ pip install ./path-to-wheel-file.whl ## Running tests -Most tests require you to [set up a mock server](https://github.com/stoplightio/prism) against the OpenAPI spec to run the tests. +Most tests require you to [set up a mock server](https://github.com/dgellow/steady) against the OpenAPI spec to run the tests. ```sh $ ./scripts/mock diff --git a/scripts/mock b/scripts/mock index bcf3b392b..14454c268 100755 --- a/scripts/mock +++ b/scripts/mock @@ -19,34 +19,34 @@ fi echo "==> Starting mock server with URL ${URL}" -# Run prism mock on the given spec +# Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism --version + npm exec --package=@stdy/cli@0.19.3 -- steady --version - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" &> .prism.log & + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" &> .stdy.log & - # Wait for server to come online (max 30s) + # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" attempts=0 - while ! grep -q "✖ fatal\|Prism is listening" ".prism.log" ; do + while ! curl --silent --fail "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1; do + if ! kill -0 $! 2>/dev/null; then + echo + cat .stdy.log + exit 1 + fi attempts=$((attempts + 1)) if [ "$attempts" -ge 300 ]; then echo - echo "Timed out waiting for Prism server to start" - cat .prism.log + echo "Timed out waiting for Steady server to start" + cat .stdy.log exit 1 fi echo -n "." sleep 0.1 done - if grep -q "✖ fatal" ".prism.log"; then - cat .prism.log - exit 1 - fi - echo else - npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock "$URL" + npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index dbeda2d21..79132ddb0 100755 --- a/scripts/test +++ b/scripts/test @@ -9,8 +9,8 @@ GREEN='\033[0;32m' YELLOW='\033[0;33m' NC='\033[0m' # No Color -function prism_is_running() { - curl --silent "http://localhost:4010" >/dev/null 2>&1 +function steady_is_running() { + curl --silent "http://127.0.0.1:4010/_x-steady/health" >/dev/null 2>&1 } kill_server_on_port() { @@ -25,7 +25,7 @@ function is_overriding_api_base_url() { [ -n "$TEST_API_BASE_URL" ] } -if ! is_overriding_api_base_url && ! prism_is_running ; then +if ! is_overriding_api_base_url && ! steady_is_running ; then # When we exit this script, make sure to kill the background mock server process trap 'kill_server_on_port 4010' EXIT @@ -36,19 +36,19 @@ fi if is_overriding_api_base_url ; then echo -e "${GREEN}✔ Running tests against ${TEST_API_BASE_URL}${NC}" echo -elif ! prism_is_running ; then - echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Prism server" +elif ! steady_is_running ; then + echo -e "${RED}ERROR:${NC} The test suite will not run without a mock Steady server" echo -e "running against your OpenAPI spec." echo echo -e "To run the server, pass in the path or url of your OpenAPI" - echo -e "spec to the prism command:" + echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stainless-api/prism-cli@5.15.0 -- prism mock path/to/your.openapi.yml${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots${NC}" echo exit 1 else - echo -e "${GREEN}✔ Mock prism server is running with your OpenAPI spec${NC}" + echo -e "${GREEN}✔ Mock steady server is running with your OpenAPI spec${NC}" echo fi From 68650848ec6ae7405290774abeebfa2acaa8df48 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 17:56:18 +0000 Subject: [PATCH 1256/1325] chore(tests): bump steady to v0.19.4 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 14454c268..fe19534ac 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.3 -- steady --version + npm exec --package=@stdy/cli@0.19.4 -- steady --version - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.3 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 79132ddb0..33df1f641 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.3 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" echo exit 1 From dd1a85fc6000ab79e363ed4efa9383186545a65b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:31:44 +0000 Subject: [PATCH 1257/1325] feat(api): api update --- .stats.yml | 4 +- .../resources/real_time_payments_transfers.py | 50 +++++++++++-------- .../inbound_real_time_payments_transfers.py | 16 +++--- src/increase/types/declined_transaction.py | 18 +++++-- .../inbound_real_time_payments_transfer.py | 22 ++++++-- .../types/real_time_payments_transfer.py | 22 ++++---- ...al_time_payments_transfer_create_params.py | 24 +++++---- ...al_time_payments_transfer_create_params.py | 6 +-- src/increase/types/transaction.py | 20 ++++---- ...st_inbound_real_time_payments_transfers.py | 4 +- .../test_real_time_payments_transfers.py | 28 ++++++----- 11 files changed, 127 insertions(+), 87 deletions(-) diff --git a/.stats.yml b/.stats.yml index e317ba884..06952e266 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-4a8fb0a78ec74e41f3c1f5d8d455b1496d567948e3a7a3ae375338173ced538e.yml -openapi_spec_hash: 6dbffca55fa0226c3603ee180594bd2b +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94bc2ca163218a155dad247a2a8ef93a09f66139dd56c6eabbcadbc0feecae6e.yml +openapi_spec_hash: b83e3838cc2d4729b3f0156e4294dc45 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index 39b31d296..af7ac710e 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -47,13 +47,15 @@ def create( *, amount: int, creditor_name: str, - remittance_information: str, source_account_number_id: str, + unstructured_remittance_information: str, + account_number: str | Omit = omit, debtor_name: str | Omit = omit, destination_account_number: str | Omit = omit, destination_routing_number: str | Omit = omit, external_account_id: str | Omit = omit, require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, ultimate_creditor_name: str | Omit = omit, ultimate_debtor_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -73,24 +75,23 @@ def create( creditor_name: The name of the transfer's recipient. - remittance_information: Unstructured information that will show on the recipient's bank statement. - source_account_number_id: The identifier of the Account Number from which to send the transfer. - debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the - account's entity. + unstructured_remittance_information: Unstructured information that will show on the recipient's bank statement. - destination_account_number: The destination account number. + account_number: The destination account number. - destination_routing_number: The destination American Bankers' Association (ABA) Routing Transit Number - (RTN). + debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the + account's entity. external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is - provided, `destination_account_number` and `destination_routing_number` must be - absent. + provided, `account_number` and `routing_number` must be absent. require_approval: Whether the transfer requires explicit approval via the dashboard or API. + routing_number: The destination American Bankers' Association (ABA) Routing Transit Number + (RTN). + ultimate_creditor_name: The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else. @@ -113,13 +114,15 @@ def create( { "amount": amount, "creditor_name": creditor_name, - "remittance_information": remittance_information, "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "account_number": account_number, "debtor_name": debtor_name, "destination_account_number": destination_account_number, "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, "require_approval": require_approval, + "routing_number": routing_number, "ultimate_creditor_name": ultimate_creditor_name, "ultimate_debtor_name": ultimate_debtor_name, }, @@ -363,13 +366,15 @@ async def create( *, amount: int, creditor_name: str, - remittance_information: str, source_account_number_id: str, + unstructured_remittance_information: str, + account_number: str | Omit = omit, debtor_name: str | Omit = omit, destination_account_number: str | Omit = omit, destination_routing_number: str | Omit = omit, external_account_id: str | Omit = omit, require_approval: bool | Omit = omit, + routing_number: str | Omit = omit, ultimate_creditor_name: str | Omit = omit, ultimate_debtor_name: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. @@ -389,24 +394,23 @@ async def create( creditor_name: The name of the transfer's recipient. - remittance_information: Unstructured information that will show on the recipient's bank statement. - source_account_number_id: The identifier of the Account Number from which to send the transfer. - debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the - account's entity. + unstructured_remittance_information: Unstructured information that will show on the recipient's bank statement. - destination_account_number: The destination account number. + account_number: The destination account number. - destination_routing_number: The destination American Bankers' Association (ABA) Routing Transit Number - (RTN). + debtor_name: The name of the transfer's sender. If not provided, defaults to the name of the + account's entity. external_account_id: The ID of an External Account to initiate a transfer to. If this parameter is - provided, `destination_account_number` and `destination_routing_number` must be - absent. + provided, `account_number` and `routing_number` must be absent. require_approval: Whether the transfer requires explicit approval via the dashboard or API. + routing_number: The destination American Bankers' Association (ABA) Routing Transit Number + (RTN). + ultimate_creditor_name: The name of the ultimate recipient of the transfer. Set this if the creditor is an intermediary receiving the payment for someone else. @@ -429,13 +433,15 @@ async def create( { "amount": amount, "creditor_name": creditor_name, - "remittance_information": remittance_information, "source_account_number_id": source_account_number_id, + "unstructured_remittance_information": unstructured_remittance_information, + "account_number": account_number, "debtor_name": debtor_name, "destination_account_number": destination_account_number, "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, "require_approval": require_approval, + "routing_number": routing_number, "ultimate_creditor_name": ultimate_creditor_name, "ultimate_debtor_name": ultimate_debtor_name, }, diff --git a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py index e518e0c78..91f7ecb5e 100644 --- a/src/increase/resources/simulations/inbound_real_time_payments_transfers.py +++ b/src/increase/resources/simulations/inbound_real_time_payments_transfers.py @@ -49,8 +49,8 @@ def create( debtor_account_number: str | Omit = omit, debtor_name: str | Omit = omit, debtor_routing_number: str | Omit = omit, - remittance_information: str | Omit = omit, request_for_payment_id: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -76,10 +76,10 @@ def create( debtor_routing_number: The routing number of the account that sent the transfer. - remittance_information: Additional information included with the transfer. - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + unstructured_remittance_information: Additional information included with the transfer. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -99,8 +99,8 @@ def create( "debtor_account_number": debtor_account_number, "debtor_name": debtor_name, "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, "request_for_payment_id": request_for_payment_id, + "unstructured_remittance_information": unstructured_remittance_information, }, inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, ), @@ -143,8 +143,8 @@ async def create( debtor_account_number: str | Omit = omit, debtor_name: str | Omit = omit, debtor_routing_number: str | Omit = omit, - remittance_information: str | Omit = omit, request_for_payment_id: str | Omit = omit, + unstructured_remittance_information: str | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. extra_headers: Headers | None = None, @@ -170,10 +170,10 @@ async def create( debtor_routing_number: The routing number of the account that sent the transfer. - remittance_information: Additional information included with the transfer. - request_for_payment_id: The identifier of a pending Request for Payment that this transfer will fulfill. + unstructured_remittance_information: Additional information included with the transfer. + extra_headers: Send extra headers extra_query: Add additional query parameters to the request @@ -193,8 +193,8 @@ async def create( "debtor_account_number": debtor_account_number, "debtor_name": debtor_name, "debtor_routing_number": debtor_routing_number, - "remittance_information": remittance_information, "request_for_payment_id": request_for_payment_id, + "unstructured_remittance_information": unstructured_remittance_information, }, inbound_real_time_payments_transfer_create_params.InboundRealTimePaymentsTransferCreateParams, ), diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index 3652619a3..a6d0ad0d6 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -1205,15 +1205,27 @@ class SourceInboundRealTimePaymentsTransferDecline(BaseModel): Real-Time Payments transfers. """ - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - transaction_identification: str """The Real-Time Payments network identification of the declined transfer.""" transfer_id: str """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + unstructured_remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class SourceOther(BaseModel): """ diff --git a/src/increase/types/inbound_real_time_payments_transfer.py b/src/increase/types/inbound_real_time_payments_transfer.py index 1338408d0..5c3598e3e 100755 --- a/src/increase/types/inbound_real_time_payments_transfer.py +++ b/src/increase/types/inbound_real_time_payments_transfer.py @@ -1,9 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import Optional +from typing import TYPE_CHECKING, Dict, Optional from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["InboundRealTimePaymentsTransfer", "Confirmation", "Decline"] @@ -97,9 +99,6 @@ class InboundRealTimePaymentsTransfer(BaseModel): decline: Optional[Decline] = None """If your transfer is declined, this will contain details of the decline.""" - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - status: Literal["pending_confirming", "timed_out", "confirmed", "declined"] """The lifecycle status of the transfer. @@ -117,3 +116,18 @@ class InboundRealTimePaymentsTransfer(BaseModel): For this resource it will always be `inbound_real_time_payments_transfer`. """ + + unstructured_remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/real_time_payments_transfer.py b/src/increase/types/real_time_payments_transfer.py index 8b7f02d34..ffc991288 100644 --- a/src/increase/types/real_time_payments_transfer.py +++ b/src/increase/types/real_time_payments_transfer.py @@ -232,6 +232,9 @@ class RealTimePaymentsTransfer(BaseModel): account_id: str """The Account from which the transfer was sent.""" + account_number: str + """The destination account number.""" + acknowledgement: Optional[Acknowledgement] = None """ If the transfer is acknowledged by the recipient bank, this will contain @@ -282,15 +285,6 @@ class RealTimePaymentsTransfer(BaseModel): If not provided, defaults to the name of the account's entity. """ - destination_account_number: str - """The destination account number.""" - - destination_routing_number: str - """ - The destination American Bankers' Association (ABA) Routing Transit Number - (RTN). - """ - external_account_id: Optional[str] = None """The identifier of the External Account the transfer was made to, if any.""" @@ -316,8 +310,11 @@ class RealTimePaymentsTransfer(BaseModel): institution, this will contain supplemental details. """ - remittance_information: str - """Unstructured information that will show on the recipient's bank statement.""" + routing_number: str + """ + The destination American Bankers' Association (ABA) Routing Transit Number + (RTN). + """ source_account_number_id: str """The Account Number the recipient will see as having sent the transfer.""" @@ -376,6 +373,9 @@ class RealTimePaymentsTransfer(BaseModel): holder at Increase. """ + unstructured_remittance_information: str + """Unstructured information that will show on the recipient's bank statement.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/src/increase/types/real_time_payments_transfer_create_params.py b/src/increase/types/real_time_payments_transfer_create_params.py index 9d9c61605..39198fd8c 100644 --- a/src/increase/types/real_time_payments_transfer_create_params.py +++ b/src/increase/types/real_time_payments_transfer_create_params.py @@ -17,12 +17,15 @@ class RealTimePaymentsTransferCreateParams(TypedDict, total=False): creditor_name: Required[str] """The name of the transfer's recipient.""" - remittance_information: Required[str] - """Unstructured information that will show on the recipient's bank statement.""" - source_account_number_id: Required[str] """The identifier of the Account Number from which to send the transfer.""" + unstructured_remittance_information: Required[str] + """Unstructured information that will show on the recipient's bank statement.""" + + account_number: str + """The destination account number.""" + debtor_name: str """The name of the transfer's sender. @@ -30,24 +33,25 @@ class RealTimePaymentsTransferCreateParams(TypedDict, total=False): """ destination_account_number: str - """The destination account number.""" destination_routing_number: str - """ - The destination American Bankers' Association (ABA) Routing Transit Number - (RTN). - """ external_account_id: str """The ID of an External Account to initiate a transfer to. - If this parameter is provided, `destination_account_number` and - `destination_routing_number` must be absent. + If this parameter is provided, `account_number` and `routing_number` must be + absent. """ require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" + routing_number: str + """ + The destination American Bankers' Association (ABA) Routing Transit Number + (RTN). + """ + ultimate_creditor_name: str """The name of the ultimate recipient of the transfer. diff --git a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py index 78d9b323e..a8401d960 100644 --- a/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py +++ b/src/increase/types/simulations/inbound_real_time_payments_transfer_create_params.py @@ -26,10 +26,10 @@ class InboundRealTimePaymentsTransferCreateParams(TypedDict, total=False): debtor_routing_number: str """The routing number of the account that sent the transfer.""" - remittance_information: str - """Additional information included with the transfer.""" - request_for_payment_id: str """ The identifier of a pending Request for Payment that this transfer will fulfill. """ + + unstructured_remittance_information: str + """Additional information included with the transfer.""" diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index b0c8301c9..ccdd38e35 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -3249,15 +3249,15 @@ class SourceInboundRealTimePaymentsTransferConfirmation(BaseModel): debtor_routing_number: str """The routing number of the account that sent the transfer.""" - remittance_information: Optional[str] = None - """Additional information included with the transfer.""" - transaction_identification: str """The Real-Time Payments network identification of the transfer.""" transfer_id: str """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + unstructured_remittance_information: Optional[str] = None + """Additional information included with the transfer.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. @@ -3581,21 +3581,21 @@ class SourceRealTimePaymentsTransferAcknowledgement(BaseModel): This field will be present in the JSON response if and only if `category` is equal to `real_time_payments_transfer_acknowledgement`. A Real-Time Payments Transfer Acknowledgement is created when a Real-Time Payments Transfer sent from Increase is acknowledged by the receiving bank. """ + account_number: str + """The destination account number.""" + amount: int """The transfer amount in USD cents.""" - destination_account_number: str - """The destination account number.""" - - destination_routing_number: str + routing_number: str """The American Bankers' Association (ABA) Routing Transit Number (RTN).""" - remittance_information: str - """Unstructured information that will show on the recipient's bank statement.""" - transfer_id: str """The identifier of the Real-Time Payments Transfer that led to this Transaction.""" + unstructured_remittance_information: str + """Unstructured information that will show on the recipient's bank statement.""" + if TYPE_CHECKING: # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a # value to this field, so for compatibility we avoid doing it at runtime. diff --git a/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py b/tests/api_resources/simulations/test_inbound_real_time_payments_transfers.py index 18108d7d2..bc7fb08bc 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 @@ -33,8 +33,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: debtor_account_number="x", debtor_name="x", debtor_routing_number="xxxxxxxxx", - remittance_information="x", request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + unstructured_remittance_information="x", ) assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) @@ -89,8 +89,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) debtor_account_number="x", debtor_name="x", debtor_routing_number="xxxxxxxxx", - remittance_information="x", request_for_payment_id="real_time_payments_request_for_payment_28kcliz1oevcnqyn9qp7", + unstructured_remittance_information="x", ) ) assert_matches_type(InboundRealTimePaymentsTransfer, inbound_real_time_payments_transfer, path=["response"]) diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index 09e20196c..a0e5ad8fe 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -26,8 +26,8 @@ def test_method_create(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -36,13 +36,15 @@ def test_method_create_with_all_params(self, client: Increase) -> None: real_time_payments_transfer = client.real_time_payments_transfers.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + account_number="987654321", debtor_name="x", - destination_account_number="987654321", - destination_routing_number="101050001", + destination_account_number="x", + destination_routing_number="xxxxxxxxx", external_account_id="external_account_id", require_approval=True, + routing_number="101050001", ultimate_creditor_name="x", ultimate_debtor_name="x", ) @@ -53,8 +55,8 @@ def test_raw_response_create(self, client: Increase) -> None: response = client.real_time_payments_transfers.with_raw_response.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) assert response.is_closed is True @@ -67,8 +69,8 @@ def test_streaming_response_create(self, client: Increase) -> None: with client.real_time_payments_transfers.with_streaming_response.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" @@ -252,8 +254,8 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: real_time_payments_transfer = await async_client.real_time_payments_transfers.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) assert_matches_type(RealTimePaymentsTransfer, real_time_payments_transfer, path=["response"]) @@ -262,13 +264,15 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) real_time_payments_transfer = await async_client.real_time_payments_transfers.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", + account_number="987654321", debtor_name="x", - destination_account_number="987654321", - destination_routing_number="101050001", + destination_account_number="x", + destination_routing_number="xxxxxxxxx", external_account_id="external_account_id", require_approval=True, + routing_number="101050001", ultimate_creditor_name="x", ultimate_debtor_name="x", ) @@ -279,8 +283,8 @@ async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: response = await async_client.real_time_payments_transfers.with_raw_response.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) assert response.is_closed is True @@ -293,8 +297,8 @@ async def test_streaming_response_create(self, async_client: AsyncIncrease) -> N async with async_client.real_time_payments_transfers.with_streaming_response.create( amount=100, creditor_name="Ian Crease", - remittance_information="Invoice 29582", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + unstructured_remittance_information="Invoice 29582", ) as response: assert not response.is_closed assert response.http_request.headers.get("X-Stainless-Lang") == "python" From 30947c69bc545770204a5a0a63464e08ab97b191 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 19:34:20 +0000 Subject: [PATCH 1258/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bc54c8a6a..ec76f67f6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.451.0" + ".": "0.452.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 4f3c2557d..bc78aad46 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.451.0" +version = "0.452.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 66e496821..3014cd00b 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.451.0" # x-release-please-version +__version__ = "0.452.0" # x-release-please-version From 1fb304009d78bce11985379c1e1119e9cb1b8025 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 20 Mar 2026 21:48:31 +0000 Subject: [PATCH 1259/1325] chore(tests): bump steady to v0.19.5 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index fe19534ac..0f5e20640 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.4 -- steady --version + npm exec --package=@stdy/cli@0.19.5 -- steady --version - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.4 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 33df1f641..172b3723c 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.4 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" echo exit 1 From 3afa67a89edd5aae86842ca8cbfc52663067d778 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:49:36 +0000 Subject: [PATCH 1260/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/inbound_mail_item_action_params.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 06952e266..95ef4a0f4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-94bc2ca163218a155dad247a2a8ef93a09f66139dd56c6eabbcadbc0feecae6e.yml -openapi_spec_hash: b83e3838cc2d4729b3f0156e4294dc45 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-435a0c3bc8525f4e55189c5a54a7bd4369586c20031d9601ce40e66ba6d70282.yml +openapi_spec_hash: ec1dd937766a1b35a200d9b4787a1013 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/inbound_mail_item_action_params.py b/src/increase/types/inbound_mail_item_action_params.py index ceae076a0..7bf606be1 100644 --- a/src/increase/types/inbound_mail_item_action_params.py +++ b/src/increase/types/inbound_mail_item_action_params.py @@ -13,7 +13,7 @@ class InboundMailItemActionParams(TypedDict, total=False): """The actions to perform on the Inbound Mail Item.""" -class Check(TypedDict, total=False): +class Check(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] action: Required[Literal["deposit", "ignore"]] """The action to perform on the Inbound Mail Item. @@ -21,7 +21,7 @@ class Check(TypedDict, total=False): - `ignore` - The check will be ignored. """ - account: str + account_id: str """The identifier of the Account to deposit the check into. If not provided, the check will be deposited into the Account associated with From 9cc8933bf5b3b41ac3b3c34262ed56af2b73c13e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 15:51:55 +0000 Subject: [PATCH 1261/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ec76f67f6..58cd7a5c4 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.452.0" + ".": "0.453.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index bc78aad46..f93f2eb48 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.452.0" +version = "0.453.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3014cd00b..8cc28b7f1 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.452.0" # x-release-please-version +__version__ = "0.453.0" # x-release-please-version From 6808e0ab3d616c02bd062980640dcb008c12036a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 12:44:13 +0000 Subject: [PATCH 1262/1325] chore(internal): update gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 95ceb189a..3824f4c48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ .prism.log +.stdy.log _dev __pycache__ From 0cb778fa1c1d8694bce95aff10e29aa12491df96 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 15:48:05 +0000 Subject: [PATCH 1263/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 95ef4a0f4..587ee1ff0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-435a0c3bc8525f4e55189c5a54a7bd4369586c20031d9601ce40e66ba6d70282.yml -openapi_spec_hash: ec1dd937766a1b35a200d9b4787a1013 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2179f2572ce8facec3ea3e061a019cabdfd4ca5bb6c31849fde2da1a3bc55e7c.yml +openapi_spec_hash: c40c1dcf47a49fe938c0b96f8b94b0be config_hash: 25d7d7aa4882db6189b4b53e8e249e80 From 927816a59a6d102662b6f93cdc78be4a2757015c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:05:23 +0000 Subject: [PATCH 1264/1325] chore(tests): bump steady to v0.19.6 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 0f5e20640..1983fb9ba 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.5 -- steady --version + npm exec --package=@stdy/cli@0.19.6 -- steady --version - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.5 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 172b3723c..ee1d1e9b4 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.5 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" echo exit 1 From 13d91abaf52d8ea00c09ff302251c8d0ebf5b57f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 18:58:35 +0000 Subject: [PATCH 1265/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_token_capabilities.py | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 587ee1ff0..2817e54f5 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-2179f2572ce8facec3ea3e061a019cabdfd4ca5bb6c31849fde2da1a3bc55e7c.yml -openapi_spec_hash: c40c1dcf47a49fe938c0b96f8b94b0be +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c125ce952e66ce3ea3b9a4d1c5a2449584ec7290497e3b6bba8358960713fb79.yml +openapi_spec_hash: 1ed3f6bc7b08ca891adea5fab74430c9 config_hash: 25d7d7aa4882db6189b4b53e8e249e80 diff --git a/src/increase/types/card_token_capabilities.py b/src/increase/types/card_token_capabilities.py index ca37c383c..78e22dbe7 100644 --- a/src/increase/types/card_token_capabilities.py +++ b/src/increase/types/card_token_capabilities.py @@ -23,6 +23,9 @@ class Route(BaseModel): - `not_supported` - The capability is not supported. """ + issuer_country: str + """The ISO-3166-1 alpha-2 country code of the card's issuing bank.""" + route: Literal["visa", "mastercard"] """The card network route the capabilities apply to. From 5f28fd60999d579e9c6287afd1e3fe75d40bd568 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 19:03:54 +0000 Subject: [PATCH 1266/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 58cd7a5c4..e29156ed6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.453.0" + ".": "0.454.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f93f2eb48..24d7abb4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.453.0" +version = "0.454.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8cc28b7f1..beae46b3e 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.453.0" # x-release-please-version +__version__ = "0.454.0" # x-release-please-version From 1fd15fceda6822c1f3b40dfa6752fbfca040acbe Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 20:02:19 +0000 Subject: [PATCH 1267/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 2817e54f5..2f8970740 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c125ce952e66ce3ea3b9a4d1c5a2449584ec7290497e3b6bba8358960713fb79.yml openapi_spec_hash: 1ed3f6bc7b08ca891adea5fab74430c9 -config_hash: 25d7d7aa4882db6189b4b53e8e249e80 +config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e From 7c623d995d0a2d20bc53bffb497ff8cfc33687e5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 23 Mar 2026 21:39:34 +0000 Subject: [PATCH 1268/1325] codegen metadata --- .stats.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 2f8970740..7d1e0e6c8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c125ce952e66ce3ea3b9a4d1c5a2449584ec7290497e3b6bba8358960713fb79.yml -openapi_spec_hash: 1ed3f6bc7b08ca891adea5fab74430c9 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9087e34382028c4280cc85971d3157d33b0157853d8e71a3801db9856aa1d2c3.yml +openapi_spec_hash: 8a0bfcef9a0f9ec3e3398493de20d98c config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e From 9c40adb31ec6f13f214f6cfe4cc29b176b3f5716 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:22:03 +0000 Subject: [PATCH 1269/1325] chore(ci): skip lint on metadata-only changes Note that we still want to run tests, as these depend on the metadata. --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2b4443f5..8728e0ccb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,7 +19,7 @@ jobs: timeout-minutes: 10 name: lint runs-on: ${{ github.repository == 'stainless-sdks/increase-python' && 'depot-ubuntu-24.04' || 'ubuntu-latest' }} - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') steps: - uses: actions/checkout@v6 @@ -38,7 +38,7 @@ jobs: run: ./scripts/lint build: - if: github.event_name == 'push' || github.event.pull_request.head.repo.fork + if: (github.event_name == 'push' || github.event.pull_request.head.repo.fork) && (github.event_name != 'push' || github.event.head_commit.message != 'codegen metadata') timeout-minutes: 10 name: build permissions: From b802b77f114435d62a0e8757f5d06cac45cd19c8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 15:49:01 +0000 Subject: [PATCH 1270/1325] chore(tests): bump steady to v0.19.7 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 1983fb9ba..5f1bb802b 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.6 -- steady --version + npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.6 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index ee1d1e9b4..3fcc3ef9b 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.6 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" echo exit 1 From 996501540d0b4ac867946b09f1e251a31ef1e99b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 18:32:22 +0000 Subject: [PATCH 1271/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/entity_create_params.py | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7d1e0e6c8..c8c738816 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9087e34382028c4280cc85971d3157d33b0157853d8e71a3801db9856aa1d2c3.yml -openapi_spec_hash: 8a0bfcef9a0f9ec3e3398493de20d98c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b95cd103dded0963ab1ae960b10846a8640c538d12beefb085cfcccd40e4e374.yml +openapi_spec_hash: 4cea779180b9bcdc631ae2cbc3aa9c4c config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index a8f9bb97e..e14f4a70f 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -545,7 +545,7 @@ class JointIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - passport (e.g., `US`). + document (e.g., `US`). """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] @@ -718,7 +718,7 @@ class NaturalPersonIdentificationPassport(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - passport (e.g., `US`). + document (e.g., `US`). """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] @@ -969,7 +969,7 @@ class TrustTrusteeIndividualIdentificationPassport(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - passport (e.g., `US`). + document (e.g., `US`). """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] @@ -1152,7 +1152,7 @@ class TrustGrantorIdentificationPassport(TypedDict, total=False): country: Required[str] """ The two-character ISO 3166-1 code representing the country that issued the - passport (e.g., `US`). + document (e.g., `US`). """ expiration_date: Required[Annotated[Union[str, date], PropertyInfo(format="iso8601")]] From da5e5c3cf7adc8edd39e9858e7ab4d580772605a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 18:34:47 +0000 Subject: [PATCH 1272/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e29156ed6..efc1a4432 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.454.0" + ".": "0.455.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 24d7abb4b..2d81dad59 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.454.0" +version = "0.455.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index beae46b3e..e3604e449 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.454.0" # x-release-please-version +__version__ = "0.455.0" # x-release-please-version From e3e309c490862dc83508d2991eba55657924256d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 22:31:20 +0000 Subject: [PATCH 1273/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/real_time_payments_transfers.py | 8 -------- .../types/real_time_payments_transfer_create_params.py | 4 ---- tests/api_resources/test_real_time_payments_transfers.py | 4 ---- 4 files changed, 2 insertions(+), 18 deletions(-) diff --git a/.stats.yml b/.stats.yml index c8c738816..8967e15ae 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b95cd103dded0963ab1ae960b10846a8640c538d12beefb085cfcccd40e4e374.yml -openapi_spec_hash: 4cea779180b9bcdc631ae2cbc3aa9c4c +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-297d19c04d7384ffc16c672182c0439c3880fc912fbabf20a378d38182cc7420.yml +openapi_spec_hash: 02126c1ab3c22027a0f0aa1ce12cf7f6 config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/resources/real_time_payments_transfers.py b/src/increase/resources/real_time_payments_transfers.py index af7ac710e..e0032105f 100644 --- a/src/increase/resources/real_time_payments_transfers.py +++ b/src/increase/resources/real_time_payments_transfers.py @@ -51,8 +51,6 @@ def create( unstructured_remittance_information: str, account_number: str | Omit = omit, debtor_name: str | Omit = omit, - destination_account_number: str | Omit = omit, - destination_routing_number: str | Omit = omit, external_account_id: str | Omit = omit, require_approval: bool | Omit = omit, routing_number: str | Omit = omit, @@ -118,8 +116,6 @@ def create( "unstructured_remittance_information": unstructured_remittance_information, "account_number": account_number, "debtor_name": debtor_name, - "destination_account_number": destination_account_number, - "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, "require_approval": require_approval, "routing_number": routing_number, @@ -370,8 +366,6 @@ async def create( unstructured_remittance_information: str, account_number: str | Omit = omit, debtor_name: str | Omit = omit, - destination_account_number: str | Omit = omit, - destination_routing_number: str | Omit = omit, external_account_id: str | Omit = omit, require_approval: bool | Omit = omit, routing_number: str | Omit = omit, @@ -437,8 +431,6 @@ async def create( "unstructured_remittance_information": unstructured_remittance_information, "account_number": account_number, "debtor_name": debtor_name, - "destination_account_number": destination_account_number, - "destination_routing_number": destination_routing_number, "external_account_id": external_account_id, "require_approval": require_approval, "routing_number": routing_number, diff --git a/src/increase/types/real_time_payments_transfer_create_params.py b/src/increase/types/real_time_payments_transfer_create_params.py index 39198fd8c..ebf274002 100644 --- a/src/increase/types/real_time_payments_transfer_create_params.py +++ b/src/increase/types/real_time_payments_transfer_create_params.py @@ -32,10 +32,6 @@ class RealTimePaymentsTransferCreateParams(TypedDict, total=False): If not provided, defaults to the name of the account's entity. """ - destination_account_number: str - - destination_routing_number: str - external_account_id: str """The ID of an External Account to initiate a transfer to. diff --git a/tests/api_resources/test_real_time_payments_transfers.py b/tests/api_resources/test_real_time_payments_transfers.py index a0e5ad8fe..3996d9bcf 100644 --- a/tests/api_resources/test_real_time_payments_transfers.py +++ b/tests/api_resources/test_real_time_payments_transfers.py @@ -40,8 +40,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: unstructured_remittance_information="Invoice 29582", account_number="987654321", debtor_name="x", - destination_account_number="x", - destination_routing_number="xxxxxxxxx", external_account_id="external_account_id", require_approval=True, routing_number="101050001", @@ -268,8 +266,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) unstructured_remittance_information="Invoice 29582", account_number="987654321", debtor_name="x", - destination_account_number="x", - destination_routing_number="xxxxxxxxx", external_account_id="external_account_id", require_approval=True, routing_number="101050001", From 55aae2a14578b5be7add8560b27ebd8ae9b2bf54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 22:33:55 +0000 Subject: [PATCH 1274/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index efc1a4432..a45036ef6 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.455.0" + ".": "0.456.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2d81dad59..b4c606165 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.455.0" +version = "0.456.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e3604e449..c041d1cc2 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.455.0" # x-release-please-version +__version__ = "0.456.0" # x-release-please-version From fa60109b8aa03de9707571c69252b477d71caa3a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 23:26:03 +0000 Subject: [PATCH 1275/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/card_push_transfers.py | 56 +++++++++++++++++++ .../types/card_push_transfer_create_params.py | 30 ++++++++++ .../api_resources/test_card_push_transfers.py | 12 ++++ 4 files changed, 100 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8967e15ae..e07655247 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-297d19c04d7384ffc16c672182c0439c3880fc912fbabf20a378d38182cc7420.yml -openapi_spec_hash: 02126c1ab3c22027a0f0aa1ce12cf7f6 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a16a9b919e2ea18d09e373a7ecb0f10d6bb6a34c3c03397b2c7582a0b372c15e.yml +openapi_spec_hash: 7d45d8bb661f1f3e6000c9e0b683fa4e config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/resources/card_push_transfers.py b/src/increase/resources/card_push_transfers.py index be5273de6..3dc28da1b 100644 --- a/src/increase/resources/card_push_transfers.py +++ b/src/increase/resources/card_push_transfers.py @@ -78,6 +78,12 @@ def create( sender_address_state: str, sender_name: str, source_account_number_id: str, + merchant_legal_business_name: str | Omit = omit, + merchant_street_address: str | Omit = omit, + recipient_address_city: str | Omit = omit, + recipient_address_line1: str | Omit = omit, + recipient_address_postal_code: str | Omit = omit, + recipient_address_state: str | Omit = omit, require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -149,6 +155,22 @@ def create( source_account_number_id: The identifier of the Account Number from which to send the transfer. + merchant_legal_business_name: The legal business name of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + + merchant_street_address: The street address of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + + recipient_address_city: The city of the recipient. Required if the card is issued in Canada. + + recipient_address_line1: The first line of the recipient's address. Required if the card is issued in + Canada. + + recipient_address_postal_code: The postal code of the recipient. Required if the card is issued in Canada. + + recipient_address_state: The state or province of the recipient. Required if the card is issued in + Canada. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. extra_headers: Send extra headers @@ -181,6 +203,12 @@ def create( "sender_address_state": sender_address_state, "sender_name": sender_name, "source_account_number_id": source_account_number_id, + "merchant_legal_business_name": merchant_legal_business_name, + "merchant_street_address": merchant_street_address, + "recipient_address_city": recipient_address_city, + "recipient_address_line1": recipient_address_line1, + "recipient_address_postal_code": recipient_address_postal_code, + "recipient_address_state": recipient_address_state, "require_approval": require_approval, }, card_push_transfer_create_params.CardPushTransferCreateParams, @@ -442,6 +470,12 @@ async def create( sender_address_state: str, sender_name: str, source_account_number_id: str, + merchant_legal_business_name: str | Omit = omit, + merchant_street_address: str | Omit = omit, + recipient_address_city: str | Omit = omit, + recipient_address_line1: str | Omit = omit, + recipient_address_postal_code: str | Omit = omit, + recipient_address_state: str | Omit = omit, require_approval: bool | Omit = omit, # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. # The extra values given here take precedence over values defined on the client or passed to this method. @@ -513,6 +547,22 @@ async def create( source_account_number_id: The identifier of the Account Number from which to send the transfer. + merchant_legal_business_name: The legal business name of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + + merchant_street_address: The street address of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + + recipient_address_city: The city of the recipient. Required if the card is issued in Canada. + + recipient_address_line1: The first line of the recipient's address. Required if the card is issued in + Canada. + + recipient_address_postal_code: The postal code of the recipient. Required if the card is issued in Canada. + + recipient_address_state: The state or province of the recipient. Required if the card is issued in + Canada. + require_approval: Whether the transfer requires explicit approval via the dashboard or API. extra_headers: Send extra headers @@ -545,6 +595,12 @@ async def create( "sender_address_state": sender_address_state, "sender_name": sender_name, "source_account_number_id": source_account_number_id, + "merchant_legal_business_name": merchant_legal_business_name, + "merchant_street_address": merchant_street_address, + "recipient_address_city": recipient_address_city, + "recipient_address_line1": recipient_address_line1, + "recipient_address_postal_code": recipient_address_postal_code, + "recipient_address_state": recipient_address_state, "require_approval": require_approval, }, card_push_transfer_create_params.CardPushTransferCreateParams, diff --git a/src/increase/types/card_push_transfer_create_params.py b/src/increase/types/card_push_transfer_create_params.py index 705439db4..ae66703f8 100644 --- a/src/increase/types/card_push_transfer_create_params.py +++ b/src/increase/types/card_push_transfer_create_params.py @@ -111,6 +111,36 @@ class CardPushTransferCreateParams(TypedDict, total=False): source_account_number_id: Required[str] """The identifier of the Account Number from which to send the transfer.""" + merchant_legal_business_name: str + """ + The legal business name of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + """ + + merchant_street_address: str + """ + The street address of the merchant (generally your business) sending the + transfer. Required if the card is issued in Canada. + """ + + recipient_address_city: str + """The city of the recipient. Required if the card is issued in Canada.""" + + recipient_address_line1: str + """The first line of the recipient's address. + + Required if the card is issued in Canada. + """ + + recipient_address_postal_code: str + """The postal code of the recipient. Required if the card is issued in Canada.""" + + recipient_address_state: str + """The state or province of the recipient. + + Required if the card is issued in Canada. + """ + require_approval: bool """Whether the transfer requires explicit approval via the dashboard or API.""" diff --git a/tests/api_resources/test_card_push_transfers.py b/tests/api_resources/test_card_push_transfers.py index c12a8d0d5..a936ec353 100644 --- a/tests/api_resources/test_card_push_transfers.py +++ b/tests/api_resources/test_card_push_transfers.py @@ -66,6 +66,12 @@ def test_method_create_with_all_params(self, client: Increase) -> None: sender_address_state="NY", sender_name="Ian Crease", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + merchant_legal_business_name="x", + merchant_street_address="x", + recipient_address_city="x", + recipient_address_line1="x", + recipient_address_postal_code="x", + recipient_address_state="x", require_approval=True, ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) @@ -339,6 +345,12 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) sender_address_state="NY", sender_name="Ian Crease", source_account_number_id="account_number_v18nkfqm6afpsrvy82b2", + merchant_legal_business_name="x", + merchant_street_address="x", + recipient_address_city="x", + recipient_address_line1="x", + recipient_address_postal_code="x", + recipient_address_state="x", require_approval=True, ) assert_matches_type(CardPushTransfer, card_push_transfer, path=["response"]) From 969e2ae5d0d30ddb9d7e6d8e94a87fe7d83f41da Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 23:28:22 +0000 Subject: [PATCH 1276/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a45036ef6..7fba3a9a3 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.456.0" + ".": "0.457.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index b4c606165..c828efcbd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.456.0" +version = "0.457.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c041d1cc2..c12164cbd 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.456.0" # x-release-please-version +__version__ = "0.457.0" # x-release-please-version From 4b5e6709540577ca9de549a012e51e59fd4d2f41 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 23:33:56 +0000 Subject: [PATCH 1277/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/check_deposit.py | 6 +----- src/increase/types/inbound_check_deposit.py | 8 +------- 3 files changed, 4 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index e07655247..c8871b7f0 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-a16a9b919e2ea18d09e373a7ecb0f10d6bb6a34c3c03397b2c7582a0b372c15e.yml -openapi_spec_hash: 7d45d8bb661f1f3e6000c9e0b683fa4e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d31504be6985a7ded14abd0da36f4272e585f43332b4b844a6950c98ddcd525.yml +openapi_spec_hash: f1a49121780ec8b6678b864ac9b1deca config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/types/check_deposit.py b/src/increase/types/check_deposit.py index 5cbddc221..1eebfc28a 100644 --- a/src/increase/types/check_deposit.py +++ b/src/increase/types/check_deposit.py @@ -86,13 +86,9 @@ class DepositAdjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + reason: Literal["adjusted_amount", "non_conforming_item", "paid"] """The reason for the adjustment. - - `late_return` - The return was initiated too late and the receiving - institution has responded with a Late Return Claim. - - `wrong_payee_credit` - The check was deposited to the wrong payee and the - depositing institution has reimbursed the funds with a Wrong Payee Credit. - `adjusted_amount` - The check was deposited with a different amount than what was written on the check. - `non_conforming_item` - The recipient was not able to process the check. This diff --git a/src/increase/types/inbound_check_deposit.py b/src/increase/types/inbound_check_deposit.py index d77515925..44f9e55fc 100644 --- a/src/increase/types/inbound_check_deposit.py +++ b/src/increase/types/inbound_check_deposit.py @@ -16,19 +16,13 @@ class Adjustment(BaseModel): amount: int """The amount of the adjustment.""" - reason: Literal["late_return", "wrong_payee_credit", "adjusted_amount", "non_conforming_item", "paid"] + reason: Literal["late_return", "wrong_payee_credit"] """The reason for the adjustment. - `late_return` - The return was initiated too late and the receiving institution has responded with a Late Return Claim. - `wrong_payee_credit` - The check was deposited to the wrong payee and the depositing institution has reimbursed the funds with a Wrong Payee Credit. - - `adjusted_amount` - The check was deposited with a different amount than what - was written on the check. - - `non_conforming_item` - The recipient was not able to process the check. This - usually happens for e.g., low quality images. - - `paid` - The check has already been deposited elsewhere and so this is a - duplicate. """ transaction_id: str From 1d616257e52613c6521f48ca48110ec948c3023e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 24 Mar 2026 23:36:21 +0000 Subject: [PATCH 1278/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 7fba3a9a3..d2127382b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.457.0" + ".": "0.458.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c828efcbd..1edc67bd7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.457.0" +version = "0.458.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index c12164cbd..8d41de559 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.457.0" # x-release-please-version +__version__ = "0.458.0" # x-release-please-version From be8f59b6983476e3aabc01cc91f279a21091ef49 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:26:37 +0000 Subject: [PATCH 1279/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/entity.py | 35 ++++++++++++++++++++-- src/increase/types/entity_create_params.py | 33 +++++++++++++++++--- tests/api_resources/test_entities.py | 10 +++++-- 4 files changed, 71 insertions(+), 11 deletions(-) diff --git a/.stats.yml b/.stats.yml index c8871b7f0..5d64e13d4 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-6d31504be6985a7ded14abd0da36f4272e585f43332b4b844a6950c98ddcd525.yml -openapi_spec_hash: f1a49121780ec8b6678b864ac9b1deca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2a6ff4685a5e09babcce1fb8bac1f373d707d5b5aa82aae375d923de890e56e.yml +openapi_spec_hash: 244249a4dfb6c746c161a704764d7630 config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index dbf235a7a..56e4feb68 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -17,6 +17,7 @@ "CorporationBeneficialOwnerIndividual", "CorporationBeneficialOwnerIndividualAddress", "CorporationBeneficialOwnerIndividualIdentification", + "CorporationLegalIdentifier", "GovernmentAuthority", "GovernmentAuthorityAddress", "GovernmentAuthorityAuthorizedPerson", @@ -172,6 +173,22 @@ def __getattr__(self, attr: str) -> object: ... __pydantic_extra__: Dict[str, object] +class CorporationLegalIdentifier(BaseModel): + """The legal identifier of the corporation.""" + + category: Literal["us_employer_identification_number", "other"] + """The category of the legal identifier. + + - `us_employer_identification_number` - The Employer Identification Number (EIN) + for the company. The EIN is a 9-digit number assigned by the IRS. + - `other` - A legal identifier issued by a foreign government, like a tax + identification number or registration number. + """ + + value: str + """The identifier of the legal identifier.""" + + class Corporation(BaseModel): """Details of the corporation entity. @@ -202,15 +219,27 @@ class Corporation(BaseModel): for the corporation. """ + legal_identifier: Optional[CorporationLegalIdentifier] = None + """The legal identifier of the corporation.""" + name: str """The legal name of the corporation.""" - tax_identifier: Optional[str] = None - """The Employer Identification Number (EIN) for the corporation.""" - website: Optional[str] = None """The website of the corporation.""" + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] + class GovernmentAuthorityAddress(BaseModel): """The government authority's address.""" diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index e14f4a70f..5bf41a209 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -19,6 +19,7 @@ "CorporationBeneficialOwnerIndividualIdentificationDriversLicense", "CorporationBeneficialOwnerIndividualIdentificationOther", "CorporationBeneficialOwnerIndividualIdentificationPassport", + "CorporationLegalIdentifier", "GovernmentAuthority", "GovernmentAuthorityAddress", "GovernmentAuthorityAuthorizedPerson", @@ -334,7 +335,28 @@ class CorporationBeneficialOwner(TypedDict, total=False, extra_items=object): # """This person's role or title within the entity.""" -class Corporation(TypedDict, total=False): +class CorporationLegalIdentifier(TypedDict, total=False): + """The legal identifier of the corporation. + + This is usually the Employer Identification Number (EIN). + """ + + value: Required[str] + """The legal identifier.""" + + category: Literal["us_employer_identification_number", "other"] + """The category of the legal identifier. + + If not provided, the default is `us_employer_identification_number`. + + - `us_employer_identification_number` - The Employer Identification Number (EIN) + for the company. The EIN is a 9-digit number assigned by the IRS. + - `other` - A legal identifier issued by a foreign government, like a tax + identification number or registration number. + """ + + +class Corporation(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """Details of the corporation entity to create. Required if `structure` is equal to `corporation`. @@ -353,12 +375,15 @@ class Corporation(TypedDict, total=False): between 1 and 5 people to this list. """ + legal_identifier: Required[CorporationLegalIdentifier] + """The legal identifier of the corporation. + + This is usually the Employer Identification Number (EIN). + """ + name: Required[str] """The legal name of the corporation.""" - tax_identifier: Required[str] - """The Employer Identification Number (EIN) for the corporation.""" - beneficial_ownership_exemption_reason: Literal[ "regulated_financial_institution", "publicly_traded_company", "public_entity", "other" ] diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index e71fa5618..a1f00ca14 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -79,8 +79,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "company_title": "CEO", } ], + "legal_identifier": { + "value": "602214076", + "category": "us_employer_identification_number", + }, "name": "National Phonograph Company", - "tax_identifier": "602214076", "beneficial_ownership_exemption_reason": "regulated_financial_institution", "email": "dev@stainless.com", "incorporation_state": "NY", @@ -585,8 +588,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "company_title": "CEO", } ], + "legal_identifier": { + "value": "602214076", + "category": "us_employer_identification_number", + }, "name": "National Phonograph Company", - "tax_identifier": "602214076", "beneficial_ownership_exemption_reason": "regulated_financial_institution", "email": "dev@stainless.com", "incorporation_state": "NY", From bda8eb9b3d43856d47f2230670b7346ecdbab9a2 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 18:29:03 +0000 Subject: [PATCH 1280/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d2127382b..6c3521308 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.458.0" + ".": "0.459.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1edc67bd7..83dbd02f4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.458.0" +version = "0.459.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8d41de559..6fa6ea1a4 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.458.0" # x-release-please-version +__version__ = "0.459.0" # x-release-please-version From 1ecba7d7da34b8113066b57b4dfcd83c7fcac7c0 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 22:01:39 +0000 Subject: [PATCH 1281/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/entity.py | 119 ++++++++++++--------- src/increase/types/entity_create_params.py | 105 ++++++++++-------- src/increase/types/entity_update_params.py | 42 ++++---- tests/api_resources/test_entities.py | 42 +++++--- 5 files changed, 184 insertions(+), 128 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5d64e13d4..8ba24b693 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e2a6ff4685a5e09babcce1fb8bac1f373d707d5b5aa82aae375d923de890e56e.yml -openapi_spec_hash: 244249a4dfb6c746c161a704764d7630 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b51c9307c5fd4c662426ca9bbdbe00d0721edcb2eb899d4b9a3539aa01623873.yml +openapi_spec_hash: e5767b8639a1573ae70b25be22cc77a3 config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 56e4feb68..2d731254f 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -52,8 +52,11 @@ class CorporationAddress(BaseModel): """The corporation's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -61,14 +64,14 @@ class CorporationAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class CorporationBeneficialOwnerIndividualAddress(BaseModel): @@ -244,8 +247,11 @@ def __getattr__(self, attr: str) -> object: ... class GovernmentAuthorityAddress(BaseModel): """The government authority's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -253,14 +259,14 @@ class GovernmentAuthorityAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class GovernmentAuthorityAuthorizedPerson(BaseModel): @@ -305,8 +311,11 @@ class GovernmentAuthority(BaseModel): class JointIndividualAddress(BaseModel): """The person's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -314,14 +323,14 @@ class JointIndividualAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class JointIndividualIdentification(BaseModel): @@ -389,8 +398,11 @@ class Joint(BaseModel): class NaturalPersonAddress(BaseModel): """The person's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -398,14 +410,14 @@ class NaturalPersonAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class NaturalPersonIdentification(BaseModel): @@ -518,8 +530,11 @@ class ThirdPartyVerification(BaseModel): class TrustAddress(BaseModel): """The trust's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -527,21 +542,24 @@ class TrustAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class TrustGrantorAddress(BaseModel): """The person's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -549,14 +567,14 @@ class TrustGrantorAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class TrustGrantorIdentification(BaseModel): @@ -613,8 +631,11 @@ class TrustGrantor(BaseModel): class TrustTrusteeIndividualAddress(BaseModel): """The person's address.""" - city: str - """The city of the address.""" + city: Optional[str] = None + """The city, district, town, or village of the address.""" + + country: str + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: str """The first line of the address.""" @@ -622,14 +643,14 @@ class TrustTrusteeIndividualAddress(BaseModel): line2: Optional[str] = None """The second line of the address.""" - state: str + state: Optional[str] = None """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. """ - zip: str - """The ZIP code of the address.""" + zip: Optional[str] = None + """The ZIP or postal code of the address.""" class TrustTrusteeIndividualIdentification(BaseModel): diff --git a/src/increase/types/entity_create_params.py b/src/increase/types/entity_create_params.py index 5bf41a209..055e0bb2d 100644 --- a/src/increase/types/entity_create_params.py +++ b/src/increase/types/entity_create_params.py @@ -134,22 +134,25 @@ class CorporationAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class CorporationBeneficialOwnerIndividualAddress(TypedDict, total=False): @@ -496,22 +499,25 @@ class JointIndividualAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class JointIndividualIdentificationDriversLicense(TypedDict, total=False): @@ -669,22 +675,25 @@ class NaturalPersonAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class NaturalPersonIdentificationDriversLicense(TypedDict, total=False): @@ -920,22 +929,25 @@ class TrustTrusteeIndividualAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class TrustTrusteeIndividualIdentificationDriversLicense(TypedDict, total=False): @@ -1103,22 +1115,25 @@ class TrustGrantorAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class TrustGrantorIdentificationDriversLicense(TypedDict, total=False): diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 38ebb27f8..73338c28d 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -80,22 +80,25 @@ class CorporationAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class Corporation(TypedDict, total=False): @@ -185,22 +188,25 @@ class NaturalPersonAddress(TypedDict, total=False): """ city: Required[str] - """The city of the address.""" + """The city, district, town, or village of the address.""" + + country: Required[str] + """The two-letter ISO 3166-1 alpha-2 code for the country of the address.""" line1: Required[str] """The first line of the address. This is usually the street number and street.""" - state: Required[str] + line2: str + """The second line of the address. This might be the floor or room number.""" + + state: str """ - The two-letter United States Postal Service (USPS) abbreviation for the state of - the address. + The two-letter United States Postal Service (USPS) abbreviation for the US + state, province, or region of the address. Required in certain countries. """ - zip: Required[str] - """The ZIP code of the address.""" - - line2: str - """The second line of the address. This might be the floor or room number.""" + zip: str + """The ZIP or postal code of the address. Required in certain countries.""" class NaturalPerson(TypedDict, total=False): diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index a1f00ca14..4ba58df87 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -33,10 +33,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: corporation={ "address": { "city": "New York", + "country": "x", "line1": "33 Liberty Street", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "beneficial_owners": [ { @@ -110,10 +111,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -146,10 +148,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: natural_person={ "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -209,10 +212,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "individual": { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -247,10 +251,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "grantor": { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -359,10 +364,11 @@ def test_method_update_with_all_params(self, client: Increase) -> None: corporation={ "address": { "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "line2": "Unit 2", "state": "NY", "zip": "10045", - "line2": "Unit 2", }, "email": "dev@stainless.com", "incorporation_state": "x", @@ -384,10 +390,11 @@ def test_method_update_with_all_params(self, client: Increase) -> None: natural_person={ "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "name": "x", }, @@ -542,10 +549,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) corporation={ "address": { "city": "New York", + "country": "x", "line1": "33 Liberty Street", + "line2": "x", "state": "NY", "zip": "10045", - "line2": "x", }, "beneficial_owners": [ { @@ -619,10 +627,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -655,10 +664,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) natural_person={ "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -718,10 +728,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "individual": { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -756,10 +767,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "grantor": { "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "date_of_birth": parse_date("2019-12-27"), "identification": { @@ -868,10 +880,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) corporation={ "address": { "city": "New York", + "country": "US", "line1": "33 Liberty Street", + "line2": "Unit 2", "state": "NY", "zip": "10045", - "line2": "Unit 2", }, "email": "dev@stainless.com", "incorporation_state": "x", @@ -893,10 +906,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) natural_person={ "address": { "city": "x", + "country": "x", "line1": "x", + "line2": "x", "state": "x", "zip": "x", - "line2": "x", }, "name": "x", }, From ff859f50eda9135b26782a29df6df17664f52301 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Wed, 25 Mar 2026 22:04:09 +0000 Subject: [PATCH 1282/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6c3521308..a7fe876e2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.459.0" + ".": "0.460.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 83dbd02f4..3521b928c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.459.0" +version = "0.460.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6fa6ea1a4..f93ef3447 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.459.0" # x-release-please-version +__version__ = "0.460.0" # x-release-please-version From 4c1e86285318571a92ebe443e0dc3a6da8bf9d75 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:29:04 +0000 Subject: [PATCH 1283/1325] feat(internal): implement indices array format for query and form serialization --- scripts/mock | 4 ++-- scripts/test | 2 +- src/increase/_qs.py | 5 ++++- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 5f1bb802b..f99ce052a 100755 --- a/scripts/mock +++ b/scripts/mock @@ -24,7 +24,7 @@ if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout npm exec --package=@stdy/cli@0.19.7 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 3fcc3ef9b..26735b24a 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-form-array-format=comma --validator-query-array-format=comma --validator-form-object-format=dots --validator-query-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots${NC}" echo exit 1 diff --git a/src/increase/_qs.py b/src/increase/_qs.py index ada6fd3f7..de8c99bc6 100644 --- a/src/increase/_qs.py +++ b/src/increase/_qs.py @@ -101,7 +101,10 @@ def _stringify_item( items.extend(self._stringify_item(key, item, opts)) return items elif array_format == "indices": - raise NotImplementedError("The array indices format is not supported yet") + items = [] + for i, item in enumerate(value): + items.extend(self._stringify_item(f"{key}[{i}]", item, opts)) + return items elif array_format == "brackets": items = [] key = key + "[]" From d34a0c5bca43d262a5315eb94940e3b5a606552a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 26 Mar 2026 19:31:57 +0000 Subject: [PATCH 1284/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index a7fe876e2..091bee159 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.460.0" + ".": "0.461.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 3521b928c..0a3f940fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.460.0" +version = "0.461.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f93ef3447..e4e01985d 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.460.0" # x-release-please-version +__version__ = "0.461.0" # x-release-please-version From c9ee31c6647588eed90ef4a02e48b1e436ea8774 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 01:56:44 +0000 Subject: [PATCH 1285/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/entity.py | 2 +- src/increase/types/entity_update_params.py | 31 +++++++++++++++++++--- tests/api_resources/test_entities.py | 10 +++++-- 4 files changed, 38 insertions(+), 9 deletions(-) diff --git a/.stats.yml b/.stats.yml index 8ba24b693..46d00e014 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-b51c9307c5fd4c662426ca9bbdbe00d0721edcb2eb899d4b9a3539aa01623873.yml -openapi_spec_hash: e5767b8639a1573ae70b25be22cc77a3 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57310f0e57b0996b79f938ef778b40e54f5b62cefb78c3e6405cefacfa704c66.yml +openapi_spec_hash: c6d65e9ebf76cb81a5395b8ab4251a95 config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e diff --git a/src/increase/types/entity.py b/src/increase/types/entity.py index 2d731254f..7d35c75fb 100644 --- a/src/increase/types/entity.py +++ b/src/increase/types/entity.py @@ -812,7 +812,7 @@ class ValidationIssue(BaseModel): - `entity_tax_identifier` - The entity's tax identifier could not be validated. Update the tax ID with the - [update an entity API](/documentation/api/entities#update-an-entity.corporation.tax_identifier). + [update an entity API](/documentation/api/entities#update-an-entity.corporation.legal_identifier). - `entity_address` - The entity's address could not be validated. Update the address with the [update an entity API](/documentation/api/entities#update-an-entity.corporation.address). diff --git a/src/increase/types/entity_update_params.py b/src/increase/types/entity_update_params.py index 73338c28d..0c2611663 100644 --- a/src/increase/types/entity_update_params.py +++ b/src/increase/types/entity_update_params.py @@ -12,6 +12,7 @@ "EntityUpdateParams", "Corporation", "CorporationAddress", + "CorporationLegalIdentifier", "GovernmentAuthority", "GovernmentAuthorityAddress", "NaturalPerson", @@ -101,7 +102,26 @@ class CorporationAddress(TypedDict, total=False): """The ZIP or postal code of the address. Required in certain countries.""" -class Corporation(TypedDict, total=False): +class CorporationLegalIdentifier(TypedDict, total=False): + """The legal identifier of the corporation. + + This is usually the Employer Identification Number (EIN). + """ + + value: Required[str] + """The identifier of the legal identifier.""" + + category: Literal["us_employer_identification_number", "other"] + """The category of the legal identifier. + + - `us_employer_identification_number` - The Employer Identification Number (EIN) + for the company. The EIN is a 9-digit number assigned by the IRS. + - `other` - A legal identifier issued by a foreign government, like a tax + identification number or registration number. + """ + + +class Corporation(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] """Details of the corporation entity to update. If you specify this parameter and the entity is not a corporation, the request will fail. @@ -133,12 +153,15 @@ class Corporation(TypedDict, total=False): [here](https://increase.com/documentation/data-dictionary#north-american-industry-classification-system-codes). """ + legal_identifier: CorporationLegalIdentifier + """The legal identifier of the corporation. + + This is usually the Employer Identification Number (EIN). + """ + name: str """The legal name of the corporation.""" - tax_identifier: str - """The Employer Identification Number (EIN) for the corporation.""" - class GovernmentAuthorityAddress(TypedDict, total=False): """The entity's physical address. diff --git a/tests/api_resources/test_entities.py b/tests/api_resources/test_entities.py index 4ba58df87..8618c9fa5 100644 --- a/tests/api_resources/test_entities.py +++ b/tests/api_resources/test_entities.py @@ -373,8 +373,11 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "email": "dev@stainless.com", "incorporation_state": "x", "industry_code": "x", + "legal_identifier": { + "value": "x", + "category": "us_employer_identification_number", + }, "name": "x", - "tax_identifier": "x", }, details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ @@ -889,8 +892,11 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "email": "dev@stainless.com", "incorporation_state": "x", "industry_code": "x", + "legal_identifier": { + "value": "x", + "category": "us_employer_identification_number", + }, "name": "x", - "tax_identifier": "x", }, details_confirmed_at=parse_datetime("2019-12-27T18:11:19.117Z"), government_authority={ From 6010576da32cf98ea29c236b2ec2b1f180cdcc5a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 01:59:03 +0000 Subject: [PATCH 1286/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 091bee159..d05d9de1b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.461.0" + ".": "0.462.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 0a3f940fd..883c75513 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.461.0" +version = "0.462.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index e4e01985d..538075a56 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.461.0" # x-release-please-version +__version__ = "0.462.0" # x-release-please-version From 3c54798b6410ee9da8b7d67e2dff70793e3fc56d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 27 Mar 2026 16:51:19 +0000 Subject: [PATCH 1287/1325] codegen metadata --- .stats.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.stats.yml b/.stats.yml index 46d00e014..1c40aac3d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57310f0e57b0996b79f938ef778b40e54f5b62cefb78c3e6405cefacfa704c66.yml openapi_spec_hash: c6d65e9ebf76cb81a5395b8ab4251a95 -config_hash: 0997ade8b52ec04e82d5b0c3b61bb51e +config_hash: 4945e03affdf289484733306e4797f81 From a08a2679bfde425d6df9cb882bb797ed4e27a9c4 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 20:37:59 +0000 Subject: [PATCH 1288/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card_payment.py | 2312 ++++++++++++++++---- src/increase/types/declined_transaction.py | 158 +- src/increase/types/pending_transaction.py | 158 +- src/increase/types/transaction.py | 468 ++++ 5 files changed, 2648 insertions(+), 452 deletions(-) diff --git a/.stats.yml b/.stats.yml index 1c40aac3d..d76d554a2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-57310f0e57b0996b79f938ef778b40e54f5b62cefb78c3e6405cefacfa704c66.yml -openapi_spec_hash: c6d65e9ebf76cb81a5395b8ab4251a95 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1537e933795625528b93b601e286a513458f9aad05160ee018383e6b29986956.yml +openapi_spec_hash: f34d800917618bf012b466c1f88e8eca config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index a27880957..1b37c193b 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -36,6 +36,7 @@ "ElementCardAuthorizationNetworkDetailsPulse", "ElementCardAuthorizationNetworkDetailsVisa", "ElementCardAuthorizationNetworkIdentifiers", + "ElementCardAuthorizationSchemeFee", "ElementCardAuthorizationVerification", "ElementCardAuthorizationVerificationCardVerificationCode", "ElementCardAuthorizationVerificationCardholderAddress", @@ -57,6 +58,7 @@ "ElementCardBalanceInquiryNetworkDetailsPulse", "ElementCardBalanceInquiryNetworkDetailsVisa", "ElementCardBalanceInquiryNetworkIdentifiers", + "ElementCardBalanceInquirySchemeFee", "ElementCardBalanceInquiryVerification", "ElementCardBalanceInquiryVerificationCardVerificationCode", "ElementCardBalanceInquiryVerificationCardholderAddress", @@ -77,6 +79,7 @@ "ElementCardDeclineNetworkDetailsPulse", "ElementCardDeclineNetworkDetailsVisa", "ElementCardDeclineNetworkIdentifiers", + "ElementCardDeclineSchemeFee", "ElementCardDeclineVerification", "ElementCardDeclineVerificationCardVerificationCode", "ElementCardDeclineVerificationCardholderAddress", @@ -97,12 +100,14 @@ "ElementCardFinancialNetworkDetailsPulse", "ElementCardFinancialNetworkDetailsVisa", "ElementCardFinancialNetworkIdentifiers", + "ElementCardFinancialSchemeFee", "ElementCardFinancialVerification", "ElementCardFinancialVerificationCardVerificationCode", "ElementCardFinancialVerificationCardholderAddress", "ElementCardFinancialVerificationCardholderName", "ElementCardFuelConfirmation", "ElementCardFuelConfirmationNetworkIdentifiers", + "ElementCardFuelConfirmationSchemeFee", "ElementCardIncrement", "ElementCardIncrementAdditionalAmounts", "ElementCardIncrementAdditionalAmountsClinic", @@ -116,6 +121,7 @@ "ElementCardIncrementAdditionalAmountsUnknown", "ElementCardIncrementAdditionalAmountsVision", "ElementCardIncrementNetworkIdentifiers", + "ElementCardIncrementSchemeFee", "ElementCardRefund", "ElementCardRefundCashback", "ElementCardRefundInterchange", @@ -127,8 +133,10 @@ "ElementCardRefundPurchaseDetailsTravelAncillary", "ElementCardRefundPurchaseDetailsTravelAncillaryService", "ElementCardRefundPurchaseDetailsTravelTripLeg", + "ElementCardRefundSchemeFee", "ElementCardReversal", "ElementCardReversalNetworkIdentifiers", + "ElementCardReversalSchemeFee", "ElementCardSettlement", "ElementCardSettlementCashback", "ElementCardSettlementInterchange", @@ -140,6 +148,7 @@ "ElementCardSettlementPurchaseDetailsTravelAncillary", "ElementCardSettlementPurchaseDetailsTravelAncillaryService", "ElementCardSettlementPurchaseDetailsTravelTripLeg", + "ElementCardSettlementSchemeFee", "ElementCardSettlementSurcharge", "ElementCardValidation", "ElementCardValidationAdditionalAmounts", @@ -157,12 +166,12 @@ "ElementCardValidationNetworkDetailsPulse", "ElementCardValidationNetworkDetailsVisa", "ElementCardValidationNetworkIdentifiers", + "ElementCardValidationSchemeFee", "ElementCardValidationVerification", "ElementCardValidationVerificationCardVerificationCode", "ElementCardValidationVerificationCardholderAddress", "ElementCardValidationVerificationCardholderName", "ElementOther", - "SchemeFee", "State", ] @@ -1064,6 +1073,158 @@ class ElementCardAuthorizationNetworkIdentifiers(BaseModel): """ +class ElementCardAuthorizationSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class ElementCardAuthorizationVerificationCardVerificationCode(BaseModel): """ Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. @@ -1327,6 +1488,9 @@ class ElementCardAuthorization(BaseModel): transaction. """ + scheme_fees: List[ElementCardAuthorizationSchemeFee] + """The scheme fees associated with this card authorization.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -1827,78 +1991,230 @@ class ElementCardBalanceInquiryNetworkIdentifiers(BaseModel): """ -class ElementCardBalanceInquiryVerificationCardVerificationCode(BaseModel): - """ - Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. - """ - - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - +class ElementCardBalanceInquirySchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" -class ElementCardBalanceInquiryVerificationCardholderAddress(BaseModel): + created_at: datetime """ - Cardholder address provided in the authorization request and the address on file we verified it against. + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. """ - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. + currency: Literal["USD"] """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - "postal_code_match_address_not_checked", - ] - """The address verification result returned to the card network. - - - `not_checked` - No address information was provided in the authorization - request. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match or was not provided. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches or was not provided. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. (deprecated) + - `USD` - US Dollar (USD) """ + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. -class ElementCardBalanceInquiryVerificationCardholderName(BaseModel): - """Cardholder name provided in the authorization request.""" - - provided_first_name: Optional[str] = None - """The first name provided for verification in the authorization request.""" - - provided_last_name: Optional[str] = None - """The last name provided for verification in the authorization request.""" - - provided_middle_name: Optional[str] = None - """The middle name provided for verification in the authorization request.""" - - -class ElementCardBalanceInquiryVerification(BaseModel): + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + +class ElementCardBalanceInquiryVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardBalanceInquiryVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class ElementCardBalanceInquiryVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + +class ElementCardBalanceInquiryVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" card_verification_code: ElementCardBalanceInquiryVerificationCardVerificationCode @@ -2013,6 +2329,9 @@ class ElementCardBalanceInquiry(BaseModel): transaction. """ + scheme_fees: List[ElementCardBalanceInquirySchemeFee] + """The scheme fees associated with this card balance inquiry.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -2461,56 +2780,208 @@ class ElementCardDeclineNetworkIdentifiers(BaseModel): """ -class ElementCardDeclineVerificationCardVerificationCode(BaseModel): - """ - Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. - """ - - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - +class ElementCardDeclineSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" -class ElementCardDeclineVerificationCardholderAddress(BaseModel): + created_at: datetime """ - Cardholder address provided in the authorization request and the address on file we verified it against. + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. """ - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. + currency: Literal["USD"] """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" + - `USD` - US Dollar (USD) + """ - result: Literal[ - "not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - "postal_code_match_address_not_checked", + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", ] - """The address verification result returned to the card network. + """The type of fee being assessed. - - `not_checked` - No address information was provided in the authorization - request. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match or was not provided. - - `postal_code_no_match_address_match` - Postal code does not match, but the + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + +class ElementCardDeclineVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardDeclineVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the street address matches or was not provided. - `match` - Postal code and street address match. - `no_match` - Postal code and street address do not match. @@ -2812,6 +3283,9 @@ class ElementCardDecline(BaseModel): reach out to support@increase.com for more information. """ + scheme_fees: List[ElementCardDeclineSchemeFee] + """The scheme fees associated with this card decline.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -3254,78 +3728,230 @@ class ElementCardFinancialNetworkIdentifiers(BaseModel): """ -class ElementCardFinancialVerificationCardVerificationCode(BaseModel): - """ - Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. - """ - - result: Literal["not_checked", "match", "no_match"] - """The result of verifying the Card Verification Code. - - - `not_checked` - No card verification code was provided in the authorization - request. - - `match` - The card verification code matched the one on file. - - `no_match` - The card verification code did not match the one on file. - """ - +class ElementCardFinancialSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" -class ElementCardFinancialVerificationCardholderAddress(BaseModel): + created_at: datetime """ - Cardholder address provided in the authorization request and the address on file we verified it against. + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. """ - actual_line1: Optional[str] = None - """Line 1 of the address on file for the cardholder.""" - - actual_postal_code: Optional[str] = None - """The postal code of the address on file for the cardholder.""" - - provided_line1: Optional[str] = None - """ - The cardholder address line 1 provided for verification in the authorization - request. + currency: Literal["USD"] """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. - provided_postal_code: Optional[str] = None - """The postal code provided for verification in the authorization request.""" - - result: Literal[ - "not_checked", - "postal_code_match_address_no_match", - "postal_code_no_match_address_match", - "match", - "no_match", - "postal_code_match_address_not_checked", - ] - """The address verification result returned to the card network. - - - `not_checked` - No address information was provided in the authorization - request. - - `postal_code_match_address_no_match` - Postal code matches, but the street - address does not match or was not provided. - - `postal_code_no_match_address_match` - Postal code does not match, but the - street address matches or was not provided. - - `match` - Postal code and street address match. - - `no_match` - Postal code and street address do not match. - - `postal_code_match_address_not_checked` - Postal code matches, but the street - address was not verified. (deprecated) + - `USD` - US Dollar (USD) """ + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. -class ElementCardFinancialVerificationCardholderName(BaseModel): - """Cardholder name provided in the authorization request.""" - - provided_first_name: Optional[str] = None - """The first name provided for verification in the authorization request.""" - - provided_last_name: Optional[str] = None - """The last name provided for verification in the authorization request.""" - - provided_middle_name: Optional[str] = None - """The middle name provided for verification in the authorization request.""" - - -class ElementCardFinancialVerification(BaseModel): + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + +class ElementCardFinancialVerificationCardVerificationCode(BaseModel): + """ + Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. + """ + + result: Literal["not_checked", "match", "no_match"] + """The result of verifying the Card Verification Code. + + - `not_checked` - No card verification code was provided in the authorization + request. + - `match` - The card verification code matched the one on file. + - `no_match` - The card verification code did not match the one on file. + """ + + +class ElementCardFinancialVerificationCardholderAddress(BaseModel): + """ + Cardholder address provided in the authorization request and the address on file we verified it against. + """ + + actual_line1: Optional[str] = None + """Line 1 of the address on file for the cardholder.""" + + actual_postal_code: Optional[str] = None + """The postal code of the address on file for the cardholder.""" + + provided_line1: Optional[str] = None + """ + The cardholder address line 1 provided for verification in the authorization + request. + """ + + provided_postal_code: Optional[str] = None + """The postal code provided for verification in the authorization request.""" + + result: Literal[ + "not_checked", + "postal_code_match_address_no_match", + "postal_code_no_match_address_match", + "match", + "no_match", + "postal_code_match_address_not_checked", + ] + """The address verification result returned to the card network. + + - `not_checked` - No address information was provided in the authorization + request. + - `postal_code_match_address_no_match` - Postal code matches, but the street + address does not match or was not provided. + - `postal_code_no_match_address_match` - Postal code does not match, but the + street address matches or was not provided. + - `match` - Postal code and street address match. + - `no_match` - Postal code and street address do not match. + - `postal_code_match_address_not_checked` - Postal code matches, but the street + address was not verified. (deprecated) + """ + + +class ElementCardFinancialVerificationCardholderName(BaseModel): + """Cardholder name provided in the authorization request.""" + + provided_first_name: Optional[str] = None + """The first name provided for verification in the authorization request.""" + + provided_last_name: Optional[str] = None + """The last name provided for verification in the authorization request.""" + + provided_middle_name: Optional[str] = None + """The middle name provided for verification in the authorization request.""" + + +class ElementCardFinancialVerification(BaseModel): """Fields related to verification of cardholder-provided values.""" card_verification_code: ElementCardFinancialVerificationCardVerificationCode @@ -3508,6 +4134,9 @@ class ElementCardFinancial(BaseModel): transaction. """ + scheme_fees: List[ElementCardFinancialSchemeFee] + """The scheme fees associated with this card financial.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -3568,58 +4197,213 @@ class ElementCardFuelConfirmationNetworkIdentifiers(BaseModel): """ -class ElementCardFuelConfirmation(BaseModel): - """A Card Fuel Confirmation object. +class ElementCardFuelConfirmationSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" - This field will be present in the JSON response if and only if `category` is equal to `card_fuel_confirmation`. Card Fuel Confirmations update the amount of a Card Authorization after a fuel pump transaction is completed. + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. """ - - id: str - """The Card Fuel Confirmation identifier.""" - - card_authorization_id: str - """The identifier for the Card Authorization this updates.""" currency: Literal["USD"] """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - currency. + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. - `USD` - US Dollar (USD) """ - network: Literal["visa", "pulse"] - """The card network used to process this card authorization. - - - `visa` - Visa - - `pulse` - Pulse - """ - - network_identifiers: ElementCardFuelConfirmationNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - pending_transaction_id: Optional[str] = None - """ - The identifier of the Pending Transaction associated with this Card Fuel - Confirmation. - """ - - type: Literal["card_fuel_confirmation"] - """A constant representing the object's type. - - For this resource it will always be `card_fuel_confirmation`. - """ - - updated_authorization_amount: int - """ - The updated authorization amount after this fuel confirmation, in the minor unit - of the transaction's currency. For dollars, for example, this is cents. - """ + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + +class ElementCardFuelConfirmation(BaseModel): + """A Card Fuel Confirmation object. + + This field will be present in the JSON response if and only if `category` is equal to `card_fuel_confirmation`. Card Fuel Confirmations update the amount of a Card Authorization after a fuel pump transaction is completed. + """ + + id: str + """The Card Fuel Confirmation identifier.""" + + card_authorization_id: str + """The identifier for the Card Authorization this updates.""" + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + currency. + + - `USD` - US Dollar (USD) + """ + + network: Literal["visa", "pulse"] + """The card network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + network_identifiers: ElementCardFuelConfirmationNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + pending_transaction_id: Optional[str] = None + """ + The identifier of the Pending Transaction associated with this Card Fuel + Confirmation. + """ + + scheme_fees: List[ElementCardFuelConfirmationSchemeFee] + """The scheme fees associated with this card fuel confirmation.""" + + type: Literal["card_fuel_confirmation"] + """A constant representing the object's type. + + For this resource it will always be `card_fuel_confirmation`. + """ + + updated_authorization_amount: int + """ + The updated authorization amount after this fuel confirmation, in the minor unit + of the transaction's currency. For dollars, for example, this is cents. + """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] # Stub to indicate that arbitrary properties are accepted. # To access properties that are not valid identifiers you can use `getattr`, e.g. @@ -3868,80 +4652,232 @@ class ElementCardIncrementNetworkIdentifiers(BaseModel): """ -class ElementCardIncrement(BaseModel): - """A Card Increment object. - - This field will be present in the JSON response if and only if `category` is equal to `card_increment`. Card Increments increase the pending amount of an authorized transaction. - """ - - id: str - """The Card Increment identifier.""" - - actioner: Literal["user", "increase", "network"] - """ - Whether this authorization was approved by Increase, the card network through - stand-in processing, or the user through a real-time decision. - - - `user` - This object was actioned by the user through a real-time decision. - - `increase` - This object was actioned by Increase without user intervention. - - `network` - This object was actioned by the network, through stand-in - processing. - """ +class ElementCardIncrementSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" - additional_amounts: ElementCardIncrementAdditionalAmounts - """ - Additional amounts associated with the card authorization, such as ATM - surcharges fees. These are usually a subset of the `amount` field and are used - to provide more detailed information about the transaction. + created_at: datetime """ - - amount: int - """The amount of this increment in the minor unit of the transaction's currency. - - For dollars, for example, this is cents. + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. """ - card_authorization_id: str - """The identifier for the Card Authorization this increments.""" - currency: Literal["USD"] """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's - currency. + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. - `USD` - US Dollar (USD) """ - network: Literal["visa", "pulse"] - """The card network used to process this card authorization. - - - `visa` - Visa - - `pulse` - Pulse - """ - - network_identifiers: ElementCardIncrementNetworkIdentifiers - """Network-specific identifiers for a specific request or transaction.""" - - network_risk_score: Optional[int] = None - """The risk score generated by the card network. - - For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where - 99 is the riskiest. - """ - - pending_transaction_id: Optional[str] = None - """The identifier of the Pending Transaction associated with this Card Increment.""" - - presentment_amount: int - """ - The amount of this increment in the minor unit of the transaction's presentment - currency. - """ + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. - presentment_currency: str - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the - transaction's presentment currency. + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + +class ElementCardIncrement(BaseModel): + """A Card Increment object. + + This field will be present in the JSON response if and only if `category` is equal to `card_increment`. Card Increments increase the pending amount of an authorized transaction. + """ + + id: str + """The Card Increment identifier.""" + + actioner: Literal["user", "increase", "network"] + """ + Whether this authorization was approved by Increase, the card network through + stand-in processing, or the user through a real-time decision. + + - `user` - This object was actioned by the user through a real-time decision. + - `increase` - This object was actioned by Increase without user intervention. + - `network` - This object was actioned by the network, through stand-in + processing. + """ + + additional_amounts: ElementCardIncrementAdditionalAmounts + """ + Additional amounts associated with the card authorization, such as ATM + surcharges fees. These are usually a subset of the `amount` field and are used + to provide more detailed information about the transaction. + """ + + amount: int + """The amount of this increment in the minor unit of the transaction's currency. + + For dollars, for example, this is cents. + """ + + card_authorization_id: str + """The identifier for the Card Authorization this increments.""" + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the increment's + currency. + + - `USD` - US Dollar (USD) + """ + + network: Literal["visa", "pulse"] + """The card network used to process this card authorization. + + - `visa` - Visa + - `pulse` - Pulse + """ + + network_identifiers: ElementCardIncrementNetworkIdentifiers + """Network-specific identifiers for a specific request or transaction.""" + + network_risk_score: Optional[int] = None + """The risk score generated by the card network. + + For Visa this is the Visa Advanced Authorization risk score, from 0 to 99, where + 99 is the riskiest. + """ + + pending_transaction_id: Optional[str] = None + """The identifier of the Pending Transaction associated with this Card Increment.""" + + presentment_amount: int + """ + The amount of this increment in the minor unit of the transaction's presentment + currency. + """ + + presentment_currency: str + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the + transaction's presentment currency. """ real_time_decision_id: Optional[str] = None @@ -3950,6 +4886,9 @@ class ElementCardIncrement(BaseModel): incremental authorization. """ + scheme_fees: List[ElementCardIncrementSchemeFee] + """The scheme fees associated with this card increment.""" + type: Literal["card_increment"] """A constant representing the object's type. @@ -4462,6 +5401,158 @@ class ElementCardRefundPurchaseDetails(BaseModel): """Fields specific to travel.""" +class ElementCardRefundSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class ElementCardRefund(BaseModel): """A Card Refund object. @@ -4539,6 +5630,9 @@ class ElementCardRefund(BaseModel): fields. """ + scheme_fees: List[ElementCardRefundSchemeFee] + """The scheme fees associated with this card refund.""" + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -4577,16 +5671,168 @@ class ElementCardReversalNetworkIdentifiers(BaseModel): networks the retrieval reference number includes the trace counter. """ - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class ElementCardReversalSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. """ - transaction_id: Optional[str] = None + variable_rate: Optional[str] = None """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). """ @@ -4688,6 +5934,9 @@ class ElementCardReversal(BaseModel): - `partial_reversal` - The Card Reversal was a partial reversal, for any reason. """ + scheme_fees: List[ElementCardReversalSchemeFee] + """The scheme fees associated with this card reversal.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -5212,6 +6461,158 @@ class ElementCardSettlementPurchaseDetails(BaseModel): """Fields specific to travel.""" +class ElementCardSettlementSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class ElementCardSettlementSurcharge(BaseModel): """Surcharge amount details, if applicable. @@ -5323,6 +6724,9 @@ class ElementCardSettlement(BaseModel): fields. """ + scheme_fees: List[ElementCardSettlementSchemeFee] + """The scheme fees associated with this card settlement.""" + surcharge: Optional[ElementCardSettlementSurcharge] = None """Surcharge amount details, if applicable. @@ -5753,23 +7157,175 @@ class ElementCardValidationNetworkIdentifiers(BaseModel): sent back to the acquirer in an approved response. """ - retrieval_reference_number: Optional[str] = None - """A life-cycle identifier used across e.g., an authorization and a reversal. - - Expected to be unique per acquirer within a window of time. For some card - networks the retrieval reference number includes the trace counter. + retrieval_reference_number: Optional[str] = None + """A life-cycle identifier used across e.g., an authorization and a reversal. + + Expected to be unique per acquirer within a window of time. For some card + networks the retrieval reference number includes the trace counter. + """ + + trace_number: Optional[str] = None + """A counter used to verify an individual authorization. + + Expected to be unique per acquirer within a window of time. + """ + + transaction_id: Optional[str] = None + """ + A globally unique transaction identifier provided by the card network, used + across multiple life-cycle requests. + """ + + +class ElementCardValidationSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None """ - - trace_number: Optional[str] = None - """A counter used to verify an individual authorization. - - Expected to be unique per acquirer within a window of time. + The fixed component of the fee, if applicable, given in major units of the fee + amount. """ - transaction_id: Optional[str] = None + variable_rate: Optional[str] = None """ - A globally unique transaction identifier provided by the card network, used - across multiple life-cycle requests. + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). """ @@ -5964,6 +7520,9 @@ class ElementCardValidation(BaseModel): transaction. """ + scheme_fees: List[ElementCardValidationSchemeFee] + """The scheme fees associated with this card validation.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -6159,158 +7718,6 @@ class Element(BaseModel): """ -class SchemeFee(BaseModel): - amount: str - """The fee amount given as a string containing a decimal number.""" - - created_at: datetime - """ - The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was - created. - """ - - currency: Literal["USD"] - """ - The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee - reimbursement. - - - `USD` - US Dollar (USD) - """ - - fee_type: Literal[ - "visa_international_service_assessment_single_currency", - "visa_international_service_assessment_cross_currency", - "visa_authorization_domestic_point_of_sale", - "visa_authorization_international_point_of_sale", - "visa_authorization_canada_point_of_sale", - "visa_authorization_reversal_point_of_sale", - "visa_authorization_reversal_international_point_of_sale", - "visa_authorization_address_verification_service", - "visa_advanced_authorization", - "visa_message_transmission", - "visa_account_verification_domestic", - "visa_account_verification_international", - "visa_account_verification_canada", - "visa_corporate_acceptance_fee", - "visa_consumer_debit_acceptance_fee", - "visa_business_debit_acceptance_fee", - "visa_purchasing_acceptance_fee", - "visa_purchase_domestic", - "visa_purchase_international", - "visa_credit_purchase_token", - "visa_debit_purchase_token", - "visa_clearing_transmission", - "visa_direct_authorization", - "visa_direct_transaction_domestic", - "visa_service_commercial_credit", - "visa_advertising_service_commercial_credit", - "visa_community_growth_acceleration_program", - "visa_processing_guarantee_commercial_credit", - "pulse_switch_fee", - ] - """The type of fee being assessed. - - - `visa_international_service_assessment_single_currency` - International - Service Assessment (ISA) single-currency is a fee assessed by the card network - for cross-border transactions presented and settled in the same currency. - - `visa_international_service_assessment_cross_currency` - International Service - Assessment (ISA) cross-currency is a fee assessed by the card network for - cross-border transactions presented and settled in different currencies. - - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa - Settlement System processing for POS (Point-Of-Sale) authorization - transactions. Authorization is the process of approving or declining the - transaction amount specified. The fee is assessed to the Issuer. - - `visa_authorization_international_point_of_sale` - Activity and charges for - Visa Settlement System processing for POS (Point-Of-Sale) International - authorization transactions. Authorization is the process of approving or - declining the transaction amount specified. The fee is assessed to the Issuer. - - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa - Settlement System processing for Canada Region POS (Point-of-Sale) - authorization transactions. Authorization is the process of approving or - declining the transaction amount specified. - - `visa_authorization_reversal_point_of_sale` - Activity only for Visa - Settlement System authorization processing of POS (Point-Of-Sale) reversal - transactions. Authorization reversal represents a VSS message that undoes the - complete or partial actions of a previous authorization request. - - `visa_authorization_reversal_international_point_of_sale` - Activity only for - Visa Settlement System authorization processing of POS (Point-Of-Sale) - International reversal transactions. Authorization reversal represents a VSS - message that undoes the complete or partial actions of a previous - authorization request. - - `visa_authorization_address_verification_service` - A per Address Verification - Service (AVS) result fee. Applies to all usable AVS result codes. - - `visa_advanced_authorization` - Advanced Authorization is a fraud detection - tool that monitors and risk evaluates 100 percent of US VisaNet authorizations - in real-time. Activity related to Purchase (includes Signature Authenticated - Visa and PIN Authenticated Visa Debit (PAVD) transactions). - - `visa_message_transmission` - Issuer Transactions Visa represents a charge - based on total actual monthly processing (Visa transactions only) through a - VisaNet Access Point (VAP). Charges are assessed to the processor for each - VisaNet Access Point. - - `visa_account_verification_domestic` - Activity, per inquiry, related to the - domestic Issuer for Account Number Verification. - - `visa_account_verification_international` - Activity, per inquiry, related to - the international Issuer for Account Number Verification. - - `visa_account_verification_canada` - Activity, per inquiry, related to the - US-Canada Issuer for Account Number Verification. - - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to - issuers and is based on the monthly sales volume on Commercial and Government - Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. - - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is - charged to issuers and is based on the monthly sales volume of Consumer Debit - or Prepaid card transactions. The cashback portion of a Debit and Prepaid card - transaction is excluded from the sales volume calculation. - - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged - to issuers and is based on the monthly sales volume on Business Debit, - Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback - portion is included in the sales volume calculation with the exception of a - Debit and Prepaid card transactions. - - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is - charged to issuers and is based on the monthly sales volume on Commercial and - Government Debit, Prepaid, Credit, Charge, or Deferred Debit card - transactions. - - `visa_purchase_domestic` - Activity and fees for the processing of a sales - draft original for a purchase transaction. - - `visa_purchase_international` - Activity and fees for the processing of an - international sales draft original for a purchase transaction. - - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase - Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for - Apple Pay transactions. - - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original - Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay - transactions. - - `visa_clearing_transmission` - A per transaction fee assessed for Base II - financial draft - Issuer. - - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT - Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. - - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct - OCTs for all business application identifiers (BAIs) other than money - transfer-bank initiated (BI). BASE II transactions. - - `visa_service_commercial_credit` - Issuer card service fee for Commercial - Credit cards. - - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee - for Commercial Credit cards. - - `visa_community_growth_acceleration_program` - Issuer Community Growth - Acceleration Program Fee. - - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee - for Commercial Credit cards. - - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network - for processing transactions on its network. - """ - - fixed_component: Optional[str] = None - """ - The fixed component of the fee, if applicable, given in major units of the fee - amount. - """ - - variable_rate: Optional[str] = None - """ - The variable rate component of the fee, if applicable, given as a decimal (e.g., - 0.015 for 1.5%). - """ - - class State(BaseModel): """The summarized state of this card payment.""" @@ -6386,9 +7793,6 @@ class CardPayment(BaseModel): physical_card_id: Optional[str] = None """The Physical Card identifier for this payment.""" - scheme_fees: List[SchemeFee] - """The scheme fees associated with this card payment.""" - state: State """The summarized state of this card payment.""" @@ -6397,3 +7801,15 @@ class CardPayment(BaseModel): For this resource it will always be `card_payment`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index a6d0ad0d6..c0be01eca 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal @@ -28,6 +28,7 @@ "SourceCardDeclineNetworkDetailsPulse", "SourceCardDeclineNetworkDetailsVisa", "SourceCardDeclineNetworkIdentifiers", + "SourceCardDeclineSchemeFee", "SourceCardDeclineVerification", "SourceCardDeclineVerificationCardVerificationCode", "SourceCardDeclineVerificationCardholderAddress", @@ -565,6 +566,158 @@ class SourceCardDeclineNetworkIdentifiers(BaseModel): """ +class SourceCardDeclineSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class SourceCardDeclineVerificationCardVerificationCode(BaseModel): """ Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. @@ -916,6 +1069,9 @@ class SourceCardDecline(BaseModel): reach out to support@increase.com for more information. """ + scheme_fees: List[SourceCardDeclineSchemeFee] + """The scheme fees associated with this card decline.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card diff --git a/src/increase/types/pending_transaction.py b/src/increase/types/pending_transaction.py index 9eba210fc..7c68bde21 100644 --- a/src/increase/types/pending_transaction.py +++ b/src/increase/types/pending_transaction.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal @@ -31,6 +31,7 @@ "SourceCardAuthorizationNetworkDetailsPulse", "SourceCardAuthorizationNetworkDetailsVisa", "SourceCardAuthorizationNetworkIdentifiers", + "SourceCardAuthorizationSchemeFee", "SourceCardAuthorizationVerification", "SourceCardAuthorizationVerificationCardVerificationCode", "SourceCardAuthorizationVerificationCardholderAddress", @@ -575,6 +576,158 @@ class SourceCardAuthorizationNetworkIdentifiers(BaseModel): """ +class SourceCardAuthorizationSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class SourceCardAuthorizationVerificationCardVerificationCode(BaseModel): """ Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. @@ -838,6 +991,9 @@ class SourceCardAuthorization(BaseModel): transaction. """ + scheme_fees: List[SourceCardAuthorizationSchemeFee] + """The scheme fees associated with this card authorization.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card diff --git a/src/increase/types/transaction.py b/src/increase/types/transaction.py index ccdd38e35..b371d94ed 100644 --- a/src/increase/types/transaction.py +++ b/src/increase/types/transaction.py @@ -38,6 +38,7 @@ "SourceCardFinancialNetworkDetailsPulse", "SourceCardFinancialNetworkDetailsVisa", "SourceCardFinancialNetworkIdentifiers", + "SourceCardFinancialSchemeFee", "SourceCardFinancialVerification", "SourceCardFinancialVerificationCardVerificationCode", "SourceCardFinancialVerificationCardholderAddress", @@ -54,6 +55,7 @@ "SourceCardRefundPurchaseDetailsTravelAncillary", "SourceCardRefundPurchaseDetailsTravelAncillaryService", "SourceCardRefundPurchaseDetailsTravelTripLeg", + "SourceCardRefundSchemeFee", "SourceCardRevenuePayment", "SourceCardSettlement", "SourceCardSettlementCashback", @@ -66,6 +68,7 @@ "SourceCardSettlementPurchaseDetailsTravelAncillary", "SourceCardSettlementPurchaseDetailsTravelAncillaryService", "SourceCardSettlementPurchaseDetailsTravelTripLeg", + "SourceCardSettlementSchemeFee", "SourceCardSettlementSurcharge", "SourceCashbackPayment", "SourceCheckDepositAcceptance", @@ -1109,6 +1112,158 @@ class SourceCardFinancialNetworkIdentifiers(BaseModel): """ +class SourceCardFinancialSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class SourceCardFinancialVerificationCardVerificationCode(BaseModel): """ Fields related to verification of the Card Verification Code, a 3-digit code on the back of the card. @@ -1363,6 +1518,9 @@ class SourceCardFinancial(BaseModel): transaction. """ + scheme_fees: List[SourceCardFinancialSchemeFee] + """The scheme fees associated with this card financial.""" + terminal_id: Optional[str] = None """ The terminal identifier (commonly abbreviated as TID) of the terminal the card @@ -1906,6 +2064,158 @@ class SourceCardRefundPurchaseDetails(BaseModel): """Fields specific to travel.""" +class SourceCardRefundSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class SourceCardRefund(BaseModel): """A Card Refund object. @@ -1983,6 +2293,9 @@ class SourceCardRefund(BaseModel): fields. """ + scheme_fees: List[SourceCardRefundSchemeFee] + """The scheme fees associated with this card refund.""" + transaction_id: str """The identifier of the Transaction associated with this Transaction.""" @@ -2534,6 +2847,158 @@ class SourceCardSettlementPurchaseDetails(BaseModel): """Fields specific to travel.""" +class SourceCardSettlementSchemeFee(BaseModel): + amount: str + """The fee amount given as a string containing a decimal number.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the fee was + created. + """ + + currency: Literal["USD"] + """ + The [ISO 4217](https://en.wikipedia.org/wiki/ISO_4217) code for the fee + reimbursement. + + - `USD` - US Dollar (USD) + """ + + fee_type: Literal[ + "visa_international_service_assessment_single_currency", + "visa_international_service_assessment_cross_currency", + "visa_authorization_domestic_point_of_sale", + "visa_authorization_international_point_of_sale", + "visa_authorization_canada_point_of_sale", + "visa_authorization_reversal_point_of_sale", + "visa_authorization_reversal_international_point_of_sale", + "visa_authorization_address_verification_service", + "visa_advanced_authorization", + "visa_message_transmission", + "visa_account_verification_domestic", + "visa_account_verification_international", + "visa_account_verification_canada", + "visa_corporate_acceptance_fee", + "visa_consumer_debit_acceptance_fee", + "visa_business_debit_acceptance_fee", + "visa_purchasing_acceptance_fee", + "visa_purchase_domestic", + "visa_purchase_international", + "visa_credit_purchase_token", + "visa_debit_purchase_token", + "visa_clearing_transmission", + "visa_direct_authorization", + "visa_direct_transaction_domestic", + "visa_service_commercial_credit", + "visa_advertising_service_commercial_credit", + "visa_community_growth_acceleration_program", + "visa_processing_guarantee_commercial_credit", + "pulse_switch_fee", + ] + """The type of fee being assessed. + + - `visa_international_service_assessment_single_currency` - International + Service Assessment (ISA) single-currency is a fee assessed by the card network + for cross-border transactions presented and settled in the same currency. + - `visa_international_service_assessment_cross_currency` - International Service + Assessment (ISA) cross-currency is a fee assessed by the card network for + cross-border transactions presented and settled in different currencies. + - `visa_authorization_domestic_point_of_sale` - Activity and charges for Visa + Settlement System processing for POS (Point-Of-Sale) authorization + transactions. Authorization is the process of approving or declining the + transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_international_point_of_sale` - Activity and charges for + Visa Settlement System processing for POS (Point-Of-Sale) International + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. The fee is assessed to the Issuer. + - `visa_authorization_canada_point_of_sale` - Activity and charges for Visa + Settlement System processing for Canada Region POS (Point-of-Sale) + authorization transactions. Authorization is the process of approving or + declining the transaction amount specified. + - `visa_authorization_reversal_point_of_sale` - Activity only for Visa + Settlement System authorization processing of POS (Point-Of-Sale) reversal + transactions. Authorization reversal represents a VSS message that undoes the + complete or partial actions of a previous authorization request. + - `visa_authorization_reversal_international_point_of_sale` - Activity only for + Visa Settlement System authorization processing of POS (Point-Of-Sale) + International reversal transactions. Authorization reversal represents a VSS + message that undoes the complete or partial actions of a previous + authorization request. + - `visa_authorization_address_verification_service` - A per Address Verification + Service (AVS) result fee. Applies to all usable AVS result codes. + - `visa_advanced_authorization` - Advanced Authorization is a fraud detection + tool that monitors and risk evaluates 100 percent of US VisaNet authorizations + in real-time. Activity related to Purchase (includes Signature Authenticated + Visa and PIN Authenticated Visa Debit (PAVD) transactions). + - `visa_message_transmission` - Issuer Transactions Visa represents a charge + based on total actual monthly processing (Visa transactions only) through a + VisaNet Access Point (VAP). Charges are assessed to the processor for each + VisaNet Access Point. + - `visa_account_verification_domestic` - Activity, per inquiry, related to the + domestic Issuer for Account Number Verification. + - `visa_account_verification_international` - Activity, per inquiry, related to + the international Issuer for Account Number Verification. + - `visa_account_verification_canada` - Activity, per inquiry, related to the + US-Canada Issuer for Account Number Verification. + - `visa_corporate_acceptance_fee` - The Corporate Acceptance Fee is charged to + issuers and is based on the monthly sales volume on Commercial and Government + Debit, Prepaid, Credit, Charge, or Deferred Debit card transactions. + - `visa_consumer_debit_acceptance_fee` - The Consumer Debit Acceptance Fee is + charged to issuers and is based on the monthly sales volume of Consumer Debit + or Prepaid card transactions. The cashback portion of a Debit and Prepaid card + transaction is excluded from the sales volume calculation. + - `visa_business_debit_acceptance_fee` - The Business Acceptance Fee is charged + to issuers and is based on the monthly sales volume on Business Debit, + Prepaid, Credit, Charge, or Deferred Debit card transactions. The cashback + portion is included in the sales volume calculation with the exception of a + Debit and Prepaid card transactions. + - `visa_purchasing_acceptance_fee` - The Purchasing Card Acceptance Fee is + charged to issuers and is based on the monthly sales volume on Commercial and + Government Debit, Prepaid, Credit, Charge, or Deferred Debit card + transactions. + - `visa_purchase_domestic` - Activity and fees for the processing of a sales + draft original for a purchase transaction. + - `visa_purchase_international` - Activity and fees for the processing of an + international sales draft original for a purchase transaction. + - `visa_credit_purchase_token` - Apple Pay Credit Product Token Purchase + Original Transactions. This fee is billed by Visa on behalf of Apple Inc. for + Apple Pay transactions. + - `visa_debit_purchase_token` - Apple Pay Debit Product Token Purchase Original + Transactions. This fee is billed by Visa on behalf of Apple Inc. for Apple Pay + transactions. + - `visa_clearing_transmission` - A per transaction fee assessed for Base II + financial draft - Issuer. + - `visa_direct_authorization` - Issuer charge for Non-Financial OCT/AFT + Authorization 0100 and Declined Financial OCT/AFT 0200 transactions. + - `visa_direct_transaction_domestic` - Data processing charge for Visa Direct + OCTs for all business application identifiers (BAIs) other than money + transfer-bank initiated (BI). BASE II transactions. + - `visa_service_commercial_credit` - Issuer card service fee for Commercial + Credit cards. + - `visa_advertising_service_commercial_credit` - Issuer Advertising Service Fee + for Commercial Credit cards. + - `visa_community_growth_acceleration_program` - Issuer Community Growth + Acceleration Program Fee. + - `visa_processing_guarantee_commercial_credit` - Issuer Processing Guarantee + for Commercial Credit cards. + - `pulse_switch_fee` - Pulse Switch Fee is a fee charged by the Pulse network + for processing transactions on its network. + """ + + fixed_component: Optional[str] = None + """ + The fixed component of the fee, if applicable, given in major units of the fee + amount. + """ + + variable_rate: Optional[str] = None + """ + The variable rate component of the fee, if applicable, given as a decimal (e.g., + 0.015 for 1.5%). + """ + + class SourceCardSettlementSurcharge(BaseModel): """Surcharge amount details, if applicable. @@ -2645,6 +3110,9 @@ class SourceCardSettlement(BaseModel): fields. """ + scheme_fees: List[SourceCardSettlementSchemeFee] + """The scheme fees associated with this card settlement.""" + surcharge: Optional[SourceCardSettlementSurcharge] = None """Surcharge amount details, if applicable. From f14204eeff18d33fb0439c75577f9b95c8e9792c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 20:40:27 +0000 Subject: [PATCH 1289/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d05d9de1b..ce10d673b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.462.0" + ".": "0.463.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 883c75513..e77b9a349 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.462.0" +version = "0.463.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 538075a56..60623d879 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.462.0" # x-release-please-version +__version__ = "0.463.0" # x-release-please-version From eaac6db7b7f23f7f8e1ba04beeda815f7cec6f55 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 22:53:32 +0000 Subject: [PATCH 1290/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/event.py | 4 ++++ src/increase/types/event_list_params.py | 2 ++ src/increase/types/event_subscription.py | 4 ++++ src/increase/types/event_subscription_create_params.py | 4 ++++ src/increase/types/unwrap_webhook_event.py | 4 ++++ 6 files changed, 20 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index d76d554a2..6f4195b57 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-1537e933795625528b93b601e286a513458f9aad05160ee018383e6b29986956.yml -openapi_spec_hash: f34d800917618bf012b466c1f88e8eca +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63d432438e53e7ef1697b512a4f93fbc62faaceba725ccd8d56036206517deec.yml +openapi_spec_hash: 7de476081771994688a1c04508a3ebea config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 4e1ae34b6..28f8be289 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -96,6 +96,8 @@ class Event(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", + "lockbox_address.created", + "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -247,6 +249,8 @@ class Event(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. + - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. + - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index bc0e7ba34..b28d64c5b 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -106,6 +106,8 @@ class EventListParams(TypedDict, total=False): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", + "lockbox_address.created", + "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 3663f5c4f..1456532d3 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -86,6 +86,8 @@ class SelectedEventCategory(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", + "lockbox_address.created", + "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -235,6 +237,8 @@ class SelectedEventCategory(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. + - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. + - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index c683d54e3..5c721a9b6 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -115,6 +115,8 @@ class SelectedEventCategory(TypedDict, total=False): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", + "lockbox_address.created", + "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -264,6 +266,8 @@ class SelectedEventCategory(TypedDict, total=False): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. + - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. + - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/unwrap_webhook_event.py b/src/increase/types/unwrap_webhook_event.py index 536c8303f..432b005c4 100644 --- a/src/increase/types/unwrap_webhook_event.py +++ b/src/increase/types/unwrap_webhook_event.py @@ -96,6 +96,8 @@ class UnwrapWebhookEvent(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", + "lockbox_address.created", + "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -247,6 +249,8 @@ class UnwrapWebhookEvent(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. + - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. + - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. From 558b5febdc0f67625628dfe6264c115bdbec285b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 22:55:57 +0000 Subject: [PATCH 1291/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ce10d673b..120888c9f 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.463.0" + ".": "0.464.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index e77b9a349..7e6aafb85 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.463.0" +version = "0.464.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 60623d879..2369cc91e 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.463.0" # x-release-please-version +__version__ = "0.464.0" # x-release-please-version From 39e8a80eb7bb046faffef7b79812f75dd3ddc44f Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 23:21:48 +0000 Subject: [PATCH 1292/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card_payment.py | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6f4195b57..7b45f5b9b 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-63d432438e53e7ef1697b512a4f93fbc62faaceba725ccd8d56036206517deec.yml -openapi_spec_hash: 7de476081771994688a1c04508a3ebea +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ec66c42c6badee269e15e5f4b9e9881b2ab484d31b4426d5364390794bf72b14.yml +openapi_spec_hash: d8651196e5ffce19bee74f276d900d64 config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/card_payment.py b/src/increase/types/card_payment.py index 1b37c193b..828b95643 100644 --- a/src/increase/types/card_payment.py +++ b/src/increase/types/card_payment.py @@ -7801,15 +7801,3 @@ class CardPayment(BaseModel): For this resource it will always be `card_payment`. """ - - if TYPE_CHECKING: - # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a - # value to this field, so for compatibility we avoid doing it at runtime. - __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] - - # Stub to indicate that arbitrary properties are accepted. - # To access properties that are not valid identifiers you can use `getattr`, e.g. - # `getattr(obj, '$type')` - def __getattr__(self, attr: str) -> object: ... - else: - __pydantic_extra__: Dict[str, object] From b896293c74890dddff76ba2c3defbca282f63c9c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 30 Mar 2026 23:24:09 +0000 Subject: [PATCH 1293/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 120888c9f..e4c7212c2 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.464.0" + ".": "0.465.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 7e6aafb85..ee67ac88a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.464.0" +version = "0.465.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 2369cc91e..7ab2313bb 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.464.0" # x-release-please-version +__version__ = "0.465.0" # x-release-please-version From 52fcda02e6052be36ab98bb20bc91537876d23a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 13:32:26 +0000 Subject: [PATCH 1294/1325] chore(tests): bump steady to v0.20.1 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index f99ce052a..01313f231 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.19.7 -- steady --version + npm exec --package=@stdy/cli@0.20.1 -- steady --version - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.19.7 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 26735b24a..99cebbfe1 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.19.7 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots${NC}" echo exit 1 From 4072807b040822814ae5fc2b121d934a5e33f5fa Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:26:55 +0000 Subject: [PATCH 1295/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/inbound_ach_transfers.py | 8 -------- src/increase/types/declined_transaction.py | 6 +++--- src/increase/types/inbound_ach_transfer.py | 6 +++--- src/increase/types/inbound_ach_transfer_decline_params.py | 4 ---- 5 files changed, 8 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index 7b45f5b9b..6f1916c1a 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-ec66c42c6badee269e15e5f4b9e9881b2ab484d31b4426d5364390794bf72b14.yml -openapi_spec_hash: d8651196e5ffce19bee74f276d900d64 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83b14e7fc19ffc252017eb4d438bfefde36b3a92a235ed669838d2fadcfdf4e8.yml +openapi_spec_hash: 581503d1dea135d37c180f632120c0b5 config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/resources/inbound_ach_transfers.py b/src/increase/resources/inbound_ach_transfers.py index 3b0f05f1e..163a4ed45 100644 --- a/src/increase/resources/inbound_ach_transfers.py +++ b/src/increase/resources/inbound_ach_transfers.py @@ -215,7 +215,6 @@ def decline( *, reason: Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -246,9 +245,6 @@ def decline( - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This @@ -571,7 +567,6 @@ async def decline( *, reason: Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -602,9 +597,6 @@ async def decline( - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This diff --git a/src/increase/types/declined_transaction.py b/src/increase/types/declined_transaction.py index c0be01eca..7b1f5f3f2 100644 --- a/src/increase/types/declined_transaction.py +++ b/src/increase/types/declined_transaction.py @@ -76,9 +76,9 @@ class SourceACHDecline(BaseModel): "entity_not_active", "group_locked", "transaction_not_allowed", + "returned_per_odfi_request", "user_initiated", "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -98,11 +98,11 @@ class SourceACHDecline(BaseModel): - `group_locked` - Your account is inactive. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - Your integration declined this transfer via the API. - - `insufficient_funds` - Your account contains insufficient funds. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. + - `user_initiated` - Your integration declined this transfer via the API. + - `insufficient_funds` - Your account contains insufficient funds. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. - `payment_stopped` - The customer asked for the payment to be stopped. diff --git a/src/increase/types/inbound_ach_transfer.py b/src/increase/types/inbound_ach_transfer.py index 266877d86..37dc2fbe5 100644 --- a/src/increase/types/inbound_ach_transfer.py +++ b/src/increase/types/inbound_ach_transfer.py @@ -73,9 +73,9 @@ class Decline(BaseModel): "entity_not_active", "group_locked", "transaction_not_allowed", + "returned_per_odfi_request", "user_initiated", "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -95,11 +95,11 @@ class Decline(BaseModel): - `group_locked` - Your account is inactive. - `transaction_not_allowed` - The transaction is not allowed per Increase's terms. - - `user_initiated` - Your integration declined this transfer via the API. - - `insufficient_funds` - Your account contains insufficient funds. - `returned_per_odfi_request` - The originating financial institution asked for this transfer to be returned. The receiving bank is complying with the request. + - `user_initiated` - Your integration declined this transfer via the API. + - `insufficient_funds` - Your account contains insufficient funds. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. - `payment_stopped` - The customer asked for the payment to be stopped. diff --git a/src/increase/types/inbound_ach_transfer_decline_params.py b/src/increase/types/inbound_ach_transfer_decline_params.py index 20b70f444..2f248bb54 100644 --- a/src/increase/types/inbound_ach_transfer_decline_params.py +++ b/src/increase/types/inbound_ach_transfer_decline_params.py @@ -10,7 +10,6 @@ class InboundACHTransferDeclineParams(TypedDict, total=False): reason: Literal[ "insufficient_funds", - "returned_per_odfi_request", "authorization_revoked_by_customer", "payment_stopped", "customer_advised_unauthorized_improper_ineligible_or_incomplete", @@ -27,9 +26,6 @@ class InboundACHTransferDeclineParams(TypedDict, total=False): - `insufficient_funds` - The customer's account has insufficient funds. This reason is only allowed for debits. The Nacha return code is R01. - - `returned_per_odfi_request` - The originating financial institution asked for - this transfer to be returned. The receiving bank is complying with the - request. The Nacha return code is R06. - `authorization_revoked_by_customer` - The customer no longer authorizes this transaction. The Nacha return code is R07. - `payment_stopped` - The customer asked for the payment to be stopped. This From e5383e7cf2c0187b0ce97e9ca3b10c052384992e Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 15:29:28 +0000 Subject: [PATCH 1296/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index e4c7212c2..9140438b9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.465.0" + ".": "0.466.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ee67ac88a..c2a8306b6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.465.0" +version = "0.466.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 7ab2313bb..762205697 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.465.0" # x-release-please-version +__version__ = "0.466.0" # x-release-please-version From f27aa6b51a0215e14c2801ea480173f65c1d8bb9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 18:29:38 +0000 Subject: [PATCH 1297/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/event.py | 4 ---- src/increase/types/event_list_params.py | 2 -- src/increase/types/event_subscription.py | 4 ---- src/increase/types/event_subscription_create_params.py | 4 ---- src/increase/types/unwrap_webhook_event.py | 4 ---- 6 files changed, 2 insertions(+), 20 deletions(-) diff --git a/.stats.yml b/.stats.yml index 6f1916c1a..d5a949352 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-83b14e7fc19ffc252017eb4d438bfefde36b3a92a235ed669838d2fadcfdf4e8.yml -openapi_spec_hash: 581503d1dea135d37c180f632120c0b5 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c8283ca199163ab2079f2cafac18348f54e96e9049864f39cd7e89958e80db0d.yml +openapi_spec_hash: a4f32a1c462a8ad1380f6a7a1d7b75ec config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/event.py b/src/increase/types/event.py index 28f8be289..4e1ae34b6 100644 --- a/src/increase/types/event.py +++ b/src/increase/types/event.py @@ -96,8 +96,6 @@ class Event(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", - "lockbox_address.created", - "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -249,8 +247,6 @@ class Event(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. - - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. - - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_list_params.py b/src/increase/types/event_list_params.py index b28d64c5b..bc0e7ba34 100644 --- a/src/increase/types/event_list_params.py +++ b/src/increase/types/event_list_params.py @@ -106,8 +106,6 @@ class EventListParams(TypedDict, total=False): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", - "lockbox_address.created", - "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", diff --git a/src/increase/types/event_subscription.py b/src/increase/types/event_subscription.py index 1456532d3..3663f5c4f 100644 --- a/src/increase/types/event_subscription.py +++ b/src/increase/types/event_subscription.py @@ -86,8 +86,6 @@ class SelectedEventCategory(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", - "lockbox_address.created", - "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -237,8 +235,6 @@ class SelectedEventCategory(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. - - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. - - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/event_subscription_create_params.py b/src/increase/types/event_subscription_create_params.py index 5c721a9b6..c683d54e3 100644 --- a/src/increase/types/event_subscription_create_params.py +++ b/src/increase/types/event_subscription_create_params.py @@ -115,8 +115,6 @@ class SelectedEventCategory(TypedDict, total=False): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", - "lockbox_address.created", - "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -266,8 +264,6 @@ class SelectedEventCategory(TypedDict, total=False): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. - - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. - - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. diff --git a/src/increase/types/unwrap_webhook_event.py b/src/increase/types/unwrap_webhook_event.py index 432b005c4..536c8303f 100644 --- a/src/increase/types/unwrap_webhook_event.py +++ b/src/increase/types/unwrap_webhook_event.py @@ -96,8 +96,6 @@ class UnwrapWebhookEvent(BaseModel): "intrafi_exclusion.updated", "legacy_card_dispute.created", "legacy_card_dispute.updated", - "lockbox_address.created", - "lockbox_address.updated", "lockbox.created", "lockbox.updated", "oauth_connection.created", @@ -249,8 +247,6 @@ class UnwrapWebhookEvent(BaseModel): created. - `legacy_card_dispute.updated` - Occurs whenever a Legacy Card Dispute is updated. - - `lockbox_address.created` - Occurs whenever a Lockbox Address is created. - - `lockbox_address.updated` - Occurs whenever a Lockbox Address is updated. - `lockbox.created` - Occurs whenever a Lockbox is created. - `lockbox.updated` - Occurs whenever a Lockbox is updated. - `oauth_connection.created` - Occurs whenever an OAuth Connection is created. From d6b46ff59781ab6fd55b6320f28f34440015ba34 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 18:33:58 +0000 Subject: [PATCH 1298/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 9140438b9..d6bd4944b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.466.0" + ".": "0.467.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index c2a8306b6..236edb801 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.466.0" +version = "0.467.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 762205697..8cfcf8a57 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.466.0" # x-release-please-version +__version__ = "0.467.0" # x-release-please-version From 89b25c428add43d411f646afe53bcd7f484dc48b Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 31 Mar 2026 19:33:56 +0000 Subject: [PATCH 1299/1325] chore(tests): bump steady to v0.20.2 --- scripts/mock | 6 +++--- scripts/test | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/mock b/scripts/mock index 01313f231..1aea7aabe 100755 --- a/scripts/mock +++ b/scripts/mock @@ -22,9 +22,9 @@ echo "==> Starting mock server with URL ${URL}" # Run steady mock on the given spec if [ "$1" == "--daemon" ]; then # Pre-install the package so the download doesn't eat into the startup timeout - npm exec --package=@stdy/cli@0.20.1 -- steady --version + npm exec --package=@stdy/cli@0.20.2 -- steady --version - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" &> .stdy.log & + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" &> .stdy.log & # Wait for server to come online via health endpoint (max 30s) echo -n "Waiting for server" @@ -48,5 +48,5 @@ if [ "$1" == "--daemon" ]; then echo else - npm exec --package=@stdy/cli@0.20.1 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" + npm exec --package=@stdy/cli@0.20.2 -- steady --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots "$URL" fi diff --git a/scripts/test b/scripts/test index 99cebbfe1..2e29bcf80 100755 --- a/scripts/test +++ b/scripts/test @@ -43,7 +43,7 @@ elif ! steady_is_running ; then echo -e "To run the server, pass in the path or url of your OpenAPI" echo -e "spec to the steady command:" echo - echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.1 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots${NC}" + echo -e " \$ ${YELLOW}npm exec --package=@stdy/cli@0.20.2 -- steady path/to/your.openapi.yml --host 127.0.0.1 -p 4010 --validator-query-array-format=comma --validator-form-array-format=comma --validator-query-object-format=dots --validator-form-object-format=dots${NC}" echo exit 1 From 9fd4012116941de277bfb68ac5e5c0cc75170e32 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:19:09 +0000 Subject: [PATCH 1300/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/group.py | 29 +++++++++++++++-------------- 2 files changed, 17 insertions(+), 16 deletions(-) diff --git a/.stats.yml b/.stats.yml index d5a949352..3e05b57f8 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c8283ca199163ab2079f2cafac18348f54e96e9049864f39cd7e89958e80db0d.yml -openapi_spec_hash: a4f32a1c462a8ad1380f6a7a1d7b75ec +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e3103e9bb8480e11581841c322e0bd0255b64413d401873c96cd00a3e6d6c3f7.yml +openapi_spec_hash: 962e1efe27066cf84b405a6695dd8288 config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/group.py b/src/increase/types/group.py index def782606..38f2fdb34 100644 --- a/src/increase/types/group.py +++ b/src/increase/types/group.py @@ -1,8 +1,11 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. +from typing import TYPE_CHECKING, Dict from datetime import datetime from typing_extensions import Literal +from pydantic import Field as FieldInfo + from .._models import BaseModel __all__ = ["Group"] @@ -17,20 +20,6 @@ class Group(BaseModel): id: str """The Group identifier.""" - ach_debit_status: Literal["disabled", "enabled"] - """If the Group is allowed to create ACH debits. - - - `disabled` - The Group cannot make ACH debits. - - `enabled` - The Group can make ACH debits. - """ - - activation_status: Literal["unactivated", "activated"] - """If the Group is activated or not. - - - `unactivated` - The Group is not activated. - - `activated` - The Group is activated. - """ - created_at: datetime """ The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) time at which the Group @@ -42,3 +31,15 @@ class Group(BaseModel): For this resource it will always be `group`. """ + + if TYPE_CHECKING: + # Some versions of Pydantic <2.8.0 have a bug and don’t allow assigning a + # value to this field, so for compatibility we avoid doing it at runtime. + __pydantic_extra__: Dict[str, object] = FieldInfo(init=False) # pyright: ignore[reportIncompatibleVariableOverride] + + # Stub to indicate that arbitrary properties are accepted. + # To access properties that are not valid identifiers you can use `getattr`, e.g. + # `getattr(obj, '$type')` + def __getattr__(self, attr: str) -> object: ... + else: + __pydantic_extra__: Dict[str, object] From fb817622eab3b1e338d7167e63c9a673972b25b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:21:33 +0000 Subject: [PATCH 1301/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index d6bd4944b..4663cfd4a 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.467.0" + ".": "0.468.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 236edb801..071f67a6f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.467.0" +version = "0.468.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8cfcf8a57..abf42cacd 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.467.0" # x-release-please-version +__version__ = "0.468.0" # x-release-please-version From c2caa2b4aff6f1e7da1c80f28ed5541f84ad3a94 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 00:55:40 +0000 Subject: [PATCH 1302/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/cards.py | 16 ++ src/increase/types/card.py | 160 +++++++++++++++++++- src/increase/types/card_create_params.py | 181 ++++++++++++++++++++++- src/increase/types/card_update_params.py | 177 +++++++++++++++++++++- tests/api_resources/test_cards.py | 88 +++++++++++ 6 files changed, 618 insertions(+), 8 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3e05b57f8..5c2b86552 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-e3103e9bb8480e11581841c322e0bd0255b64413d401873c96cd00a3e6d6c3f7.yml -openapi_spec_hash: 962e1efe27066cf84b405a6695dd8288 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-31046e3fe86098c429a87dc861cf42dae0252314abf90021a804e748f9c16417.yml +openapi_spec_hash: 78fe78704879172326e842c27ee09a3a config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/resources/cards.py b/src/increase/resources/cards.py index 572153c3c..e39ed5225 100644 --- a/src/increase/resources/cards.py +++ b/src/increase/resources/cards.py @@ -56,6 +56,7 @@ def create( self, *, account_id: str, + authorization_controls: card_create_params.AuthorizationControls | Omit = omit, billing_address: card_create_params.BillingAddress | Omit = omit, description: str | Omit = omit, digital_wallet: card_create_params.DigitalWallet | Omit = omit, @@ -74,6 +75,8 @@ def create( Args: account_id: The Account the card should belong to. + authorization_controls: Controls that restrict how this card can be used. + billing_address: The card's billing address. description: The description you choose to give the card. @@ -102,6 +105,7 @@ def create( body=maybe_transform( { "account_id": account_id, + "authorization_controls": authorization_controls, "billing_address": billing_address, "description": description, "digital_wallet": digital_wallet, @@ -158,6 +162,7 @@ def update( self, card_id: str, *, + authorization_controls: card_update_params.AuthorizationControls | Omit = omit, billing_address: card_update_params.BillingAddress | Omit = omit, description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, @@ -177,6 +182,8 @@ def update( Args: card_id: The card identifier. + authorization_controls: Controls that restrict how this card can be used. + billing_address: The card's updated billing address. description: The description you choose to give the card. @@ -210,6 +217,7 @@ def update( path_template("/cards/{card_id}", card_id=card_id), body=maybe_transform( { + "authorization_controls": authorization_controls, "billing_address": billing_address, "description": description, "digital_wallet": digital_wallet, @@ -450,6 +458,7 @@ async def create( self, *, account_id: str, + authorization_controls: card_create_params.AuthorizationControls | Omit = omit, billing_address: card_create_params.BillingAddress | Omit = omit, description: str | Omit = omit, digital_wallet: card_create_params.DigitalWallet | Omit = omit, @@ -468,6 +477,8 @@ async def create( Args: account_id: The Account the card should belong to. + authorization_controls: Controls that restrict how this card can be used. + billing_address: The card's billing address. description: The description you choose to give the card. @@ -496,6 +507,7 @@ async def create( body=await async_maybe_transform( { "account_id": account_id, + "authorization_controls": authorization_controls, "billing_address": billing_address, "description": description, "digital_wallet": digital_wallet, @@ -552,6 +564,7 @@ async def update( self, card_id: str, *, + authorization_controls: card_update_params.AuthorizationControls | Omit = omit, billing_address: card_update_params.BillingAddress | Omit = omit, description: str | Omit = omit, digital_wallet: card_update_params.DigitalWallet | Omit = omit, @@ -571,6 +584,8 @@ async def update( Args: card_id: The card identifier. + authorization_controls: Controls that restrict how this card can be used. + billing_address: The card's updated billing address. description: The description you choose to give the card. @@ -604,6 +619,7 @@ async def update( path_template("/cards/{card_id}", card_id=card_id), body=await async_maybe_transform( { + "authorization_controls": authorization_controls, "billing_address": billing_address, "description": description, "digital_wallet": digital_wallet, diff --git a/src/increase/types/card.py b/src/increase/types/card.py index b3e8186e6..6c72310d3 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -1,6 +1,6 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. -from typing import TYPE_CHECKING, Dict, Optional +from typing import TYPE_CHECKING, Dict, List, Optional from datetime import datetime from typing_extensions import Literal @@ -8,7 +8,160 @@ from .._models import BaseModel -__all__ = ["Card", "BillingAddress", "DigitalWallet"] +__all__ = [ + "Card", + "AuthorizationControls", + "AuthorizationControlsMaximumAuthorizationCount", + "AuthorizationControlsMerchantAcceptorIdentifier", + "AuthorizationControlsMerchantAcceptorIdentifierAllowed", + "AuthorizationControlsMerchantAcceptorIdentifierBlocked", + "AuthorizationControlsMerchantCategoryCode", + "AuthorizationControlsMerchantCategoryCodeAllowed", + "AuthorizationControlsMerchantCategoryCodeBlocked", + "AuthorizationControlsMerchantCountry", + "AuthorizationControlsMerchantCountryAllowed", + "AuthorizationControlsMerchantCountryBlocked", + "AuthorizationControlsSpendingLimit", + "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "BillingAddress", + "DigitalWallet", +] + + +class AuthorizationControlsMaximumAuthorizationCount(BaseModel): + """Limits the number of authorizations that can be approved on this card.""" + + all_time: Optional[int] = None + """ + The maximum number of authorizations that can be approved on this card over its + lifetime. + """ + + +class AuthorizationControlsMerchantAcceptorIdentifierAllowed(BaseModel): + identifier: str + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifierBlocked(BaseModel): + identifier: str + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifier(BaseModel): + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations on this card. + """ + + allowed: Optional[List[AuthorizationControlsMerchantAcceptorIdentifierAllowed]] = None + """The Merchant Acceptor IDs that are allowed for authorizations on this card.""" + + blocked: Optional[List[AuthorizationControlsMerchantAcceptorIdentifierBlocked]] = None + """The Merchant Acceptor IDs that are blocked for authorizations on this card.""" + + +class AuthorizationControlsMerchantCategoryCodeAllowed(BaseModel): + code: str + """The Merchant Category Code (MCC).""" + + +class AuthorizationControlsMerchantCategoryCodeBlocked(BaseModel): + code: str + """The Merchant Category Code (MCC).""" + + +class AuthorizationControlsMerchantCategoryCode(BaseModel): + """ + Restricts which Merchant Category Codes are allowed or blocked for authorizations on this card. + """ + + allowed: Optional[List[AuthorizationControlsMerchantCategoryCodeAllowed]] = None + """The Merchant Category Codes that are allowed for authorizations on this card.""" + + blocked: Optional[List[AuthorizationControlsMerchantCategoryCodeBlocked]] = None + """The Merchant Category Codes that are blocked for authorizations on this card.""" + + +class AuthorizationControlsMerchantCountryAllowed(BaseModel): + country: str + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountryBlocked(BaseModel): + country: str + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountry(BaseModel): + """ + Restricts which merchant countries are allowed or blocked for authorizations on this card. + """ + + allowed: Optional[List[AuthorizationControlsMerchantCountryAllowed]] = None + """The merchant countries that are allowed for authorizations on this card.""" + + blocked: Optional[List[AuthorizationControlsMerchantCountryBlocked]] = None + """The merchant countries that are blocked for authorizations on this card.""" + + +class AuthorizationControlsSpendingLimitMerchantCategoryCode(BaseModel): + code: str + """The Merchant Category Code (MCC).""" + + +class AuthorizationControlsSpendingLimit(BaseModel): + interval: Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"] + """The interval at which the spending limit is enforced. + + - `all_time` - The spending limit applies over the lifetime of the card. + - `per_transaction` - The spending limit applies per transaction. + - `per_day` - The spending limit applies per day. Resets nightly at midnight + UTC. + - `per_week` - The spending limit applies per week. Resets weekly on Mondays at + midnight UTC. + - `per_month` - The spending limit applies per month. Resets on the first of the + month, midnight UTC. + """ + + merchant_category_codes: Optional[List[AuthorizationControlsSpendingLimitMerchantCategoryCode]] = None + """The Merchant Category Codes (MCCs) this spending limit applies to. + + If not set, the limit applies to all transactions. + """ + + settlement_amount: int + """The maximum settlement amount permitted in the given interval.""" + + +class AuthorizationControls(BaseModel): + """Controls that restrict how this card can be used.""" + + maximum_authorization_count: Optional[AuthorizationControlsMaximumAuthorizationCount] = None + """Limits the number of authorizations that can be approved on this card.""" + + merchant_acceptor_identifier: Optional[AuthorizationControlsMerchantAcceptorIdentifier] = None + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations + on this card. + """ + + merchant_category_code: Optional[AuthorizationControlsMerchantCategoryCode] = None + """ + Restricts which Merchant Category Codes are allowed or blocked for + authorizations on this card. + """ + + merchant_country: Optional[AuthorizationControlsMerchantCountry] = None + """ + Restricts which merchant countries are allowed or blocked for authorizations on + this card. + """ + + spending_limits: Optional[List[AuthorizationControlsSpendingLimit]] = None + """Spending limits for this card. + + The most restrictive limit is applied if multiple limits match. + """ class BillingAddress(BaseModel): @@ -66,6 +219,9 @@ class Card(BaseModel): account_id: str """The identifier for the account this card belongs to.""" + authorization_controls: Optional[AuthorizationControls] = None + """Controls that restrict how this card can be used.""" + billing_address: BillingAddress """The Card's billing address.""" diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py index 3a3f24cf3..062d7df03 100644 --- a/src/increase/types/card_create_params.py +++ b/src/increase/types/card_create_params.py @@ -2,15 +2,36 @@ from __future__ import annotations -from typing_extensions import Required, TypedDict - -__all__ = ["CardCreateParams", "BillingAddress", "DigitalWallet"] +from typing import Iterable +from typing_extensions import Literal, Required, TypedDict + +__all__ = [ + "CardCreateParams", + "AuthorizationControls", + "AuthorizationControlsMaximumAuthorizationCount", + "AuthorizationControlsMerchantAcceptorIdentifier", + "AuthorizationControlsMerchantAcceptorIdentifierAllowed", + "AuthorizationControlsMerchantAcceptorIdentifierBlocked", + "AuthorizationControlsMerchantCategoryCode", + "AuthorizationControlsMerchantCategoryCodeAllowed", + "AuthorizationControlsMerchantCategoryCodeBlocked", + "AuthorizationControlsMerchantCountry", + "AuthorizationControlsMerchantCountryAllowed", + "AuthorizationControlsMerchantCountryBlocked", + "AuthorizationControlsSpendingLimit", + "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "BillingAddress", + "DigitalWallet", +] class CardCreateParams(TypedDict, total=False): account_id: Required[str] """The Account the card should belong to.""" + authorization_controls: AuthorizationControls + """Controls that restrict how this card can be used.""" + billing_address: BillingAddress """The card's billing address.""" @@ -34,6 +55,160 @@ class CardCreateParams(TypedDict, total=False): """ +class AuthorizationControlsMaximumAuthorizationCount(TypedDict, total=False): + """Limits the number of authorizations that can be approved on this card.""" + + all_time: Required[int] + """ + The maximum number of authorizations that can be approved on this card over its + lifetime. + """ + + +class AuthorizationControlsMerchantAcceptorIdentifierAllowed(TypedDict, total=False): + identifier: Required[str] + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifierBlocked(TypedDict, total=False): + identifier: Required[str] + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifier(TypedDict, total=False): + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantAcceptorIdentifierAllowed] + """The Merchant Acceptor IDs that are allowed for authorizations on this card. + + Authorizations with Merchant Acceptor IDs not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantAcceptorIdentifierBlocked] + """The Merchant Acceptor IDs that are blocked for authorizations on this card. + + Authorizations with Merchant Acceptor IDs in this list will be declined. + """ + + +class AuthorizationControlsMerchantCategoryCodeAllowed(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsMerchantCategoryCodeBlocked(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsMerchantCategoryCode(TypedDict, total=False): + """ + Restricts which Merchant Category Codes are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantCategoryCodeAllowed] + """The Merchant Category Codes that are allowed for authorizations on this card. + + Authorizations with Merchant Category Codes not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantCategoryCodeBlocked] + """The Merchant Category Codes that are blocked for authorizations on this card. + + Authorizations with Merchant Category Codes in this list will be declined. + """ + + +class AuthorizationControlsMerchantCountryAllowed(TypedDict, total=False): + country: Required[str] + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountryBlocked(TypedDict, total=False): + country: Required[str] + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountry(TypedDict, total=False): + """ + Restricts which merchant countries are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantCountryAllowed] + """The merchant countries that are allowed for authorizations on this card. + + Authorizations with merchant countries not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantCountryBlocked] + """The merchant countries that are blocked for authorizations on this card. + + Authorizations with merchant countries in this list will be declined. + """ + + +class AuthorizationControlsSpendingLimitMerchantCategoryCode(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsSpendingLimit(TypedDict, total=False): + interval: Required[Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"]] + """The interval at which the spending limit is enforced. + + - `all_time` - The spending limit applies over the lifetime of the card. + - `per_transaction` - The spending limit applies per transaction. + - `per_day` - The spending limit applies per day. Resets nightly at midnight + UTC. + - `per_week` - The spending limit applies per week. Resets weekly on Mondays at + midnight UTC. + - `per_month` - The spending limit applies per month. Resets on the first of the + month, midnight UTC. + """ + + settlement_amount: Required[int] + """The maximum settlement amount permitted in the given interval.""" + + merchant_category_codes: Iterable[AuthorizationControlsSpendingLimitMerchantCategoryCode] + """The Merchant Category Codes this spending limit applies to. + + If not set, the limit applies to all transactions. + """ + + +class AuthorizationControls(TypedDict, total=False): + """Controls that restrict how this card can be used.""" + + maximum_authorization_count: AuthorizationControlsMaximumAuthorizationCount + """Limits the number of authorizations that can be approved on this card.""" + + merchant_acceptor_identifier: AuthorizationControlsMerchantAcceptorIdentifier + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations + on this card. + """ + + merchant_category_code: AuthorizationControlsMerchantCategoryCode + """ + Restricts which Merchant Category Codes are allowed or blocked for + authorizations on this card. + """ + + merchant_country: AuthorizationControlsMerchantCountry + """ + Restricts which merchant countries are allowed or blocked for authorizations on + this card. + """ + + spending_limits: Iterable[AuthorizationControlsSpendingLimit] + """Spending limits for this card. + + The most restrictive limit is applied if multiple limits match. + """ + + class BillingAddress(TypedDict, total=False): """The card's billing address.""" diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index 6fb581532..fae5b153e 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -2,12 +2,33 @@ from __future__ import annotations +from typing import Iterable from typing_extensions import Literal, Required, TypedDict -__all__ = ["CardUpdateParams", "BillingAddress", "DigitalWallet"] +__all__ = [ + "CardUpdateParams", + "AuthorizationControls", + "AuthorizationControlsMaximumAuthorizationCount", + "AuthorizationControlsMerchantAcceptorIdentifier", + "AuthorizationControlsMerchantAcceptorIdentifierAllowed", + "AuthorizationControlsMerchantAcceptorIdentifierBlocked", + "AuthorizationControlsMerchantCategoryCode", + "AuthorizationControlsMerchantCategoryCodeAllowed", + "AuthorizationControlsMerchantCategoryCodeBlocked", + "AuthorizationControlsMerchantCountry", + "AuthorizationControlsMerchantCountryAllowed", + "AuthorizationControlsMerchantCountryBlocked", + "AuthorizationControlsSpendingLimit", + "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "BillingAddress", + "DigitalWallet", +] class CardUpdateParams(TypedDict, total=False): + authorization_controls: AuthorizationControls + """Controls that restrict how this card can be used.""" + billing_address: BillingAddress """The card's updated billing address.""" @@ -37,6 +58,160 @@ class CardUpdateParams(TypedDict, total=False): """ +class AuthorizationControlsMaximumAuthorizationCount(TypedDict, total=False): + """Limits the number of authorizations that can be approved on this card.""" + + all_time: Required[int] + """ + The maximum number of authorizations that can be approved on this card over its + lifetime. + """ + + +class AuthorizationControlsMerchantAcceptorIdentifierAllowed(TypedDict, total=False): + identifier: Required[str] + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifierBlocked(TypedDict, total=False): + identifier: Required[str] + """The Merchant Acceptor ID.""" + + +class AuthorizationControlsMerchantAcceptorIdentifier(TypedDict, total=False): + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantAcceptorIdentifierAllowed] + """The Merchant Acceptor IDs that are allowed for authorizations on this card. + + Authorizations with Merchant Acceptor IDs not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantAcceptorIdentifierBlocked] + """The Merchant Acceptor IDs that are blocked for authorizations on this card. + + Authorizations with Merchant Acceptor IDs in this list will be declined. + """ + + +class AuthorizationControlsMerchantCategoryCodeAllowed(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsMerchantCategoryCodeBlocked(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsMerchantCategoryCode(TypedDict, total=False): + """ + Restricts which Merchant Category Codes are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantCategoryCodeAllowed] + """The Merchant Category Codes that are allowed for authorizations on this card. + + Authorizations with Merchant Category Codes not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantCategoryCodeBlocked] + """The Merchant Category Codes that are blocked for authorizations on this card. + + Authorizations with Merchant Category Codes in this list will be declined. + """ + + +class AuthorizationControlsMerchantCountryAllowed(TypedDict, total=False): + country: Required[str] + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountryBlocked(TypedDict, total=False): + country: Required[str] + """The ISO 3166-1 alpha-2 country code.""" + + +class AuthorizationControlsMerchantCountry(TypedDict, total=False): + """ + Restricts which merchant countries are allowed or blocked for authorizations on this card. + """ + + allowed: Iterable[AuthorizationControlsMerchantCountryAllowed] + """The merchant countries that are allowed for authorizations on this card. + + Authorizations with merchant countries not in this list will be declined. + """ + + blocked: Iterable[AuthorizationControlsMerchantCountryBlocked] + """The merchant countries that are blocked for authorizations on this card. + + Authorizations with merchant countries in this list will be declined. + """ + + +class AuthorizationControlsSpendingLimitMerchantCategoryCode(TypedDict, total=False): + code: Required[str] + """The Merchant Category Code.""" + + +class AuthorizationControlsSpendingLimit(TypedDict, total=False): + interval: Required[Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"]] + """The interval at which the spending limit is enforced. + + - `all_time` - The spending limit applies over the lifetime of the card. + - `per_transaction` - The spending limit applies per transaction. + - `per_day` - The spending limit applies per day. Resets nightly at midnight + UTC. + - `per_week` - The spending limit applies per week. Resets weekly on Mondays at + midnight UTC. + - `per_month` - The spending limit applies per month. Resets on the first of the + month, midnight UTC. + """ + + settlement_amount: Required[int] + """The maximum settlement amount permitted in the given interval.""" + + merchant_category_codes: Iterable[AuthorizationControlsSpendingLimitMerchantCategoryCode] + """The Merchant Category Codes this spending limit applies to. + + If not set, the limit applies to all transactions. + """ + + +class AuthorizationControls(TypedDict, total=False): + """Controls that restrict how this card can be used.""" + + maximum_authorization_count: AuthorizationControlsMaximumAuthorizationCount + """Limits the number of authorizations that can be approved on this card.""" + + merchant_acceptor_identifier: AuthorizationControlsMerchantAcceptorIdentifier + """ + Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations + on this card. + """ + + merchant_category_code: AuthorizationControlsMerchantCategoryCode + """ + Restricts which Merchant Category Codes are allowed or blocked for + authorizations on this card. + """ + + merchant_country: AuthorizationControlsMerchantCountry + """ + Restricts which merchant countries are allowed or blocked for authorizations on + this card. + """ + + spending_limits: Iterable[AuthorizationControlsSpendingLimit] + """Spending limits for this card. + + The most restrictive limit is applied if multiple limits match. + """ + + class BillingAddress(TypedDict, total=False): """The card's updated billing address.""" diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index ac1a9a3a4..e0c25e468 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -34,6 +34,28 @@ def test_method_create(self, client: Increase) -> None: def test_method_create_with_all_params(self, client: Increase) -> None: card = client.cards.create( account_id="account_in71c4amph0vgo2qllky", + authorization_controls={ + "maximum_authorization_count": {"all_time": 0}, + "merchant_acceptor_identifier": { + "allowed": [{"identifier": "x"}], + "blocked": [{"identifier": "x"}], + }, + "merchant_category_code": { + "allowed": [{"code": "xxxx"}], + "blocked": [{"code": "xxxx"}], + }, + "merchant_country": { + "allowed": [{"country": "xx"}], + "blocked": [{"country": "xx"}], + }, + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ], + }, billing_address={ "city": "x", "line1": "x", @@ -124,6 +146,28 @@ def test_method_update(self, client: Increase) -> None: def test_method_update_with_all_params(self, client: Increase) -> None: card = client.cards.update( card_id="card_oubs0hwk5rn6knuecxg2", + authorization_controls={ + "maximum_authorization_count": {"all_time": 0}, + "merchant_acceptor_identifier": { + "allowed": [{"identifier": "x"}], + "blocked": [{"identifier": "x"}], + }, + "merchant_category_code": { + "allowed": [{"code": "xxxx"}], + "blocked": [{"code": "xxxx"}], + }, + "merchant_country": { + "allowed": [{"country": "xx"}], + "blocked": [{"country": "xx"}], + }, + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ], + }, billing_address={ "city": "x", "line1": "x", @@ -358,6 +402,28 @@ async def test_method_create(self, async_client: AsyncIncrease) -> None: async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.create( account_id="account_in71c4amph0vgo2qllky", + authorization_controls={ + "maximum_authorization_count": {"all_time": 0}, + "merchant_acceptor_identifier": { + "allowed": [{"identifier": "x"}], + "blocked": [{"identifier": "x"}], + }, + "merchant_category_code": { + "allowed": [{"code": "xxxx"}], + "blocked": [{"code": "xxxx"}], + }, + "merchant_country": { + "allowed": [{"country": "xx"}], + "blocked": [{"country": "xx"}], + }, + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ], + }, billing_address={ "city": "x", "line1": "x", @@ -448,6 +514,28 @@ async def test_method_update(self, async_client: AsyncIncrease) -> None: async def test_method_update_with_all_params(self, async_client: AsyncIncrease) -> None: card = await async_client.cards.update( card_id="card_oubs0hwk5rn6knuecxg2", + authorization_controls={ + "maximum_authorization_count": {"all_time": 0}, + "merchant_acceptor_identifier": { + "allowed": [{"identifier": "x"}], + "blocked": [{"identifier": "x"}], + }, + "merchant_category_code": { + "allowed": [{"code": "xxxx"}], + "blocked": [{"code": "xxxx"}], + }, + "merchant_country": { + "allowed": [{"country": "xx"}], + "blocked": [{"country": "xx"}], + }, + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ], + }, billing_address={ "city": "x", "line1": "x", From 2e428eb8b178e23c55a91c9a0016e00f939deca3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 00:58:01 +0000 Subject: [PATCH 1303/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 4663cfd4a..aaa9928e9 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.468.0" + ".": "0.469.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 071f67a6f..dbc31a662 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.468.0" +version = "0.469.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index abf42cacd..ea3b2586d 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.468.0" # x-release-please-version +__version__ = "0.469.0" # x-release-please-version From 2ae4719d4eb5f601c501dd6a6b2558f03a02ecba Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 22:50:07 +0000 Subject: [PATCH 1304/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/account.py | 12 ------------ 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5c2b86552..f65638cfc 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-31046e3fe86098c429a87dc861cf42dae0252314abf90021a804e748f9c16417.yml -openapi_spec_hash: 78fe78704879172326e842c27ee09a3a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-034ee94321ac334412e7368a7c6acc06d5606e92b09ca6873dd4cbfbb0628cb3.yml +openapi_spec_hash: e842e88e09648392440cf613433dacdc config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/account.py b/src/increase/types/account.py index dfb6e00a3..f5ac3fd2e 100644 --- a/src/increase/types/account.py +++ b/src/increase/types/account.py @@ -109,18 +109,6 @@ class Account(BaseModel): with its activity. """ - interest_accrued: str - """ - The interest accrued but not yet paid, expressed as a string containing a - floating-point value. - """ - - interest_accrued_at: Optional[date] = None - """ - The latest [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date on which - interest was accrued. - """ - interest_rate: str """ The interest rate currently being earned on the account, as a string containing From adfe450b8f8a98150e8f37555a44ef2068675bb6 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 3 Apr 2026 22:52:29 +0000 Subject: [PATCH 1305/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index aaa9928e9..62c7b030b 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.469.0" + ".": "0.470.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index dbc31a662..16fada0de 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.469.0" +version = "0.470.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ea3b2586d..ad2ee121b 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.469.0" # x-release-please-version +__version__ = "0.470.0" # x-release-please-version From 79561df9ba2134fa6136afd1e927007f4f9671b8 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:37:38 +0000 Subject: [PATCH 1306/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card.py | 2 +- src/increase/types/card_create_params.py | 2 +- src/increase/types/card_update_params.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.stats.yml b/.stats.yml index f65638cfc..5fef959d3 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-034ee94321ac334412e7368a7c6acc06d5606e92b09ca6873dd4cbfbb0628cb3.yml -openapi_spec_hash: e842e88e09648392440cf613433dacdc +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c73835a51350d0f42d529d2731b0d4da4487f55b1c98a6e0a322c21b1264f209.yml +openapi_spec_hash: 23561aff9285210e32b4e15e1486a01a config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/card.py b/src/increase/types/card.py index 6c72310d3..f5febcc17 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -160,7 +160,7 @@ class AuthorizationControls(BaseModel): spending_limits: Optional[List[AuthorizationControlsSpendingLimit]] = None """Spending limits for this card. - The most restrictive limit is applied if multiple limits match. + The most restrictive limit applies if multiple limits match. """ diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py index 062d7df03..6850b8061 100644 --- a/src/increase/types/card_create_params.py +++ b/src/increase/types/card_create_params.py @@ -205,7 +205,7 @@ class AuthorizationControls(TypedDict, total=False): spending_limits: Iterable[AuthorizationControlsSpendingLimit] """Spending limits for this card. - The most restrictive limit is applied if multiple limits match. + The most restrictive limit applies if multiple limits match. """ diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index fae5b153e..8c7e904d6 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -208,7 +208,7 @@ class AuthorizationControls(TypedDict, total=False): spending_limits: Iterable[AuthorizationControlsSpendingLimit] """Spending limits for this card. - The most restrictive limit is applied if multiple limits match. + The most restrictive limit applies if multiple limits match. """ From a97379a6cef5162f7a980265dae5b9b0611ce0af Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 4 Apr 2026 00:40:17 +0000 Subject: [PATCH 1307/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 62c7b030b..82f990268 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.470.0" + ".": "0.471.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 16fada0de..20053f519 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.470.0" +version = "0.471.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index ad2ee121b..5aca77c1b 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.470.0" # x-release-please-version +__version__ = "0.471.0" # x-release-please-version From bdd08a74b3c65e8bcc64b9cbaf2cf1f21e562035 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:44:34 +0000 Subject: [PATCH 1308/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/types/card.py | 96 +++++++++++++++------ src/increase/types/card_create_params.py | 96 +++++++++++++++------ src/increase/types/card_update_params.py | 96 +++++++++++++++------ tests/api_resources/test_cards.py | 104 ++++++++++++++++------- 5 files changed, 290 insertions(+), 106 deletions(-) diff --git a/.stats.yml b/.stats.yml index 5fef959d3..59a5dddff 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-c73835a51350d0f42d529d2731b0d4da4487f55b1c98a6e0a322c21b1264f209.yml -openapi_spec_hash: 23561aff9285210e32b4e15e1486a01a +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10b0412eb48b8e2b9720b29cf479448d246a9169c1937177f11a3d2ef80ae7f1.yml +openapi_spec_hash: ed688969255974736f3fbd4e6f30194e config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/card.py b/src/increase/types/card.py index f5febcc17..29b66ce83 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -11,7 +11,6 @@ __all__ = [ "Card", "AuthorizationControls", - "AuthorizationControlsMaximumAuthorizationCount", "AuthorizationControlsMerchantAcceptorIdentifier", "AuthorizationControlsMerchantAcceptorIdentifierAllowed", "AuthorizationControlsMerchantAcceptorIdentifierBlocked", @@ -21,23 +20,17 @@ "AuthorizationControlsMerchantCountry", "AuthorizationControlsMerchantCountryAllowed", "AuthorizationControlsMerchantCountryBlocked", - "AuthorizationControlsSpendingLimit", - "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsage", + "AuthorizationControlsUsageMultiUse", + "AuthorizationControlsUsageMultiUseSpendingLimit", + "AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsageSingleUse", + "AuthorizationControlsUsageSingleUseSettlementAmount", "BillingAddress", "DigitalWallet", ] -class AuthorizationControlsMaximumAuthorizationCount(BaseModel): - """Limits the number of authorizations that can be approved on this card.""" - - all_time: Optional[int] = None - """ - The maximum number of authorizations that can be approved on this card over its - lifetime. - """ - - class AuthorizationControlsMerchantAcceptorIdentifierAllowed(BaseModel): identifier: str """The Merchant Acceptor ID.""" @@ -104,12 +97,12 @@ class AuthorizationControlsMerchantCountry(BaseModel): """The merchant countries that are blocked for authorizations on this card.""" -class AuthorizationControlsSpendingLimitMerchantCategoryCode(BaseModel): +class AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode(BaseModel): code: str """The Merchant Category Code (MCC).""" -class AuthorizationControlsSpendingLimit(BaseModel): +class AuthorizationControlsUsageMultiUseSpendingLimit(BaseModel): interval: Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"] """The interval at which the spending limit is enforced. @@ -123,7 +116,7 @@ class AuthorizationControlsSpendingLimit(BaseModel): month, midnight UTC. """ - merchant_category_codes: Optional[List[AuthorizationControlsSpendingLimitMerchantCategoryCode]] = None + merchant_category_codes: Optional[List[AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode]] = None """The Merchant Category Codes (MCCs) this spending limit applies to. If not set, the limit applies to all transactions. @@ -133,12 +126,70 @@ class AuthorizationControlsSpendingLimit(BaseModel): """The maximum settlement amount permitted in the given interval.""" +class AuthorizationControlsUsageMultiUse(BaseModel): + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + spending_limits: Optional[List[AuthorizationControlsUsageMultiUseSpendingLimit]] = None + """Spending limits for this card. + + The most restrictive limit applies if multiple limits match. + """ + + +class AuthorizationControlsUsageSingleUseSettlementAmount(BaseModel): + """The settlement amount constraint for this single-use card.""" + + comparison: Literal["equals", "less_than_or_equals"] + """The operator used to compare the settlement amount. + + - `equals` - The settlement amount must be exactly the specified value. + - `less_than_or_equals` - The settlement amount must be less than or equal to + the specified value. + """ + + value: int + """The settlement amount value.""" + + +class AuthorizationControlsUsageSingleUse(BaseModel): + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + settlement_amount: AuthorizationControlsUsageSingleUseSettlementAmount + """The settlement amount constraint for this single-use card.""" + + +class AuthorizationControlsUsage(BaseModel): + """Controls how many times this card can be used.""" + + category: Literal["single_use", "multi_use"] + """Whether the card is for a single use or multiple uses. + + - `single_use` - The card can only be used for a single authorization. + - `multi_use` - The card can be used for multiple authorizations. + """ + + multi_use: Optional[AuthorizationControlsUsageMultiUse] = None + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + single_use: Optional[AuthorizationControlsUsageSingleUse] = None + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + class AuthorizationControls(BaseModel): """Controls that restrict how this card can be used.""" - maximum_authorization_count: Optional[AuthorizationControlsMaximumAuthorizationCount] = None - """Limits the number of authorizations that can be approved on this card.""" - merchant_acceptor_identifier: Optional[AuthorizationControlsMerchantAcceptorIdentifier] = None """ Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations @@ -157,11 +208,8 @@ class AuthorizationControls(BaseModel): this card. """ - spending_limits: Optional[List[AuthorizationControlsSpendingLimit]] = None - """Spending limits for this card. - - The most restrictive limit applies if multiple limits match. - """ + usage: Optional[AuthorizationControlsUsage] = None + """Controls how many times this card can be used.""" class BillingAddress(BaseModel): diff --git a/src/increase/types/card_create_params.py b/src/increase/types/card_create_params.py index 6850b8061..be5832eb0 100644 --- a/src/increase/types/card_create_params.py +++ b/src/increase/types/card_create_params.py @@ -8,7 +8,6 @@ __all__ = [ "CardCreateParams", "AuthorizationControls", - "AuthorizationControlsMaximumAuthorizationCount", "AuthorizationControlsMerchantAcceptorIdentifier", "AuthorizationControlsMerchantAcceptorIdentifierAllowed", "AuthorizationControlsMerchantAcceptorIdentifierBlocked", @@ -18,8 +17,12 @@ "AuthorizationControlsMerchantCountry", "AuthorizationControlsMerchantCountryAllowed", "AuthorizationControlsMerchantCountryBlocked", - "AuthorizationControlsSpendingLimit", - "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsage", + "AuthorizationControlsUsageMultiUse", + "AuthorizationControlsUsageMultiUseSpendingLimit", + "AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsageSingleUse", + "AuthorizationControlsUsageSingleUseSettlementAmount", "BillingAddress", "DigitalWallet", ] @@ -55,16 +58,6 @@ class CardCreateParams(TypedDict, total=False): """ -class AuthorizationControlsMaximumAuthorizationCount(TypedDict, total=False): - """Limits the number of authorizations that can be approved on this card.""" - - all_time: Required[int] - """ - The maximum number of authorizations that can be approved on this card over its - lifetime. - """ - - class AuthorizationControlsMerchantAcceptorIdentifierAllowed(TypedDict, total=False): identifier: Required[str] """The Merchant Acceptor ID.""" @@ -149,12 +142,12 @@ class AuthorizationControlsMerchantCountry(TypedDict, total=False): """ -class AuthorizationControlsSpendingLimitMerchantCategoryCode(TypedDict, total=False): +class AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode(TypedDict, total=False): code: Required[str] """The Merchant Category Code.""" -class AuthorizationControlsSpendingLimit(TypedDict, total=False): +class AuthorizationControlsUsageMultiUseSpendingLimit(TypedDict, total=False): interval: Required[Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"]] """The interval at which the spending limit is enforced. @@ -171,19 +164,77 @@ class AuthorizationControlsSpendingLimit(TypedDict, total=False): settlement_amount: Required[int] """The maximum settlement amount permitted in the given interval.""" - merchant_category_codes: Iterable[AuthorizationControlsSpendingLimitMerchantCategoryCode] + merchant_category_codes: Iterable[AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode] """The Merchant Category Codes this spending limit applies to. If not set, the limit applies to all transactions. """ +class AuthorizationControlsUsageMultiUse(TypedDict, total=False): + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + spending_limits: Iterable[AuthorizationControlsUsageMultiUseSpendingLimit] + """Spending limits for this card. + + The most restrictive limit applies if multiple limits match. + """ + + +class AuthorizationControlsUsageSingleUseSettlementAmount(TypedDict, total=False): + """The settlement amount constraint for this single-use card.""" + + comparison: Required[Literal["equals", "less_than_or_equals"]] + """The operator used to compare the settlement amount. + + - `equals` - The settlement amount must be exactly the specified value. + - `less_than_or_equals` - The settlement amount must be less than or equal to + the specified value. + """ + + value: Required[int] + """The settlement amount value.""" + + +class AuthorizationControlsUsageSingleUse(TypedDict, total=False): + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + settlement_amount: Required[AuthorizationControlsUsageSingleUseSettlementAmount] + """The settlement amount constraint for this single-use card.""" + + +class AuthorizationControlsUsage(TypedDict, total=False): + """Controls how many times this card can be used.""" + + category: Required[Literal["single_use", "multi_use"]] + """Whether the card is for a single use or multiple uses. + + - `single_use` - The card can only be used for a single authorization. + - `multi_use` - The card can be used for multiple authorizations. + """ + + multi_use: AuthorizationControlsUsageMultiUse + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + single_use: AuthorizationControlsUsageSingleUse + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + class AuthorizationControls(TypedDict, total=False): """Controls that restrict how this card can be used.""" - maximum_authorization_count: AuthorizationControlsMaximumAuthorizationCount - """Limits the number of authorizations that can be approved on this card.""" - merchant_acceptor_identifier: AuthorizationControlsMerchantAcceptorIdentifier """ Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations @@ -202,11 +253,8 @@ class AuthorizationControls(TypedDict, total=False): this card. """ - spending_limits: Iterable[AuthorizationControlsSpendingLimit] - """Spending limits for this card. - - The most restrictive limit applies if multiple limits match. - """ + usage: AuthorizationControlsUsage + """Controls how many times this card can be used.""" class BillingAddress(TypedDict, total=False): diff --git a/src/increase/types/card_update_params.py b/src/increase/types/card_update_params.py index 8c7e904d6..192fb7086 100644 --- a/src/increase/types/card_update_params.py +++ b/src/increase/types/card_update_params.py @@ -8,7 +8,6 @@ __all__ = [ "CardUpdateParams", "AuthorizationControls", - "AuthorizationControlsMaximumAuthorizationCount", "AuthorizationControlsMerchantAcceptorIdentifier", "AuthorizationControlsMerchantAcceptorIdentifierAllowed", "AuthorizationControlsMerchantAcceptorIdentifierBlocked", @@ -18,8 +17,12 @@ "AuthorizationControlsMerchantCountry", "AuthorizationControlsMerchantCountryAllowed", "AuthorizationControlsMerchantCountryBlocked", - "AuthorizationControlsSpendingLimit", - "AuthorizationControlsSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsage", + "AuthorizationControlsUsageMultiUse", + "AuthorizationControlsUsageMultiUseSpendingLimit", + "AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode", + "AuthorizationControlsUsageSingleUse", + "AuthorizationControlsUsageSingleUseSettlementAmount", "BillingAddress", "DigitalWallet", ] @@ -58,16 +61,6 @@ class CardUpdateParams(TypedDict, total=False): """ -class AuthorizationControlsMaximumAuthorizationCount(TypedDict, total=False): - """Limits the number of authorizations that can be approved on this card.""" - - all_time: Required[int] - """ - The maximum number of authorizations that can be approved on this card over its - lifetime. - """ - - class AuthorizationControlsMerchantAcceptorIdentifierAllowed(TypedDict, total=False): identifier: Required[str] """The Merchant Acceptor ID.""" @@ -152,12 +145,12 @@ class AuthorizationControlsMerchantCountry(TypedDict, total=False): """ -class AuthorizationControlsSpendingLimitMerchantCategoryCode(TypedDict, total=False): +class AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode(TypedDict, total=False): code: Required[str] """The Merchant Category Code.""" -class AuthorizationControlsSpendingLimit(TypedDict, total=False): +class AuthorizationControlsUsageMultiUseSpendingLimit(TypedDict, total=False): interval: Required[Literal["all_time", "per_transaction", "per_day", "per_week", "per_month"]] """The interval at which the spending limit is enforced. @@ -174,19 +167,77 @@ class AuthorizationControlsSpendingLimit(TypedDict, total=False): settlement_amount: Required[int] """The maximum settlement amount permitted in the given interval.""" - merchant_category_codes: Iterable[AuthorizationControlsSpendingLimitMerchantCategoryCode] + merchant_category_codes: Iterable[AuthorizationControlsUsageMultiUseSpendingLimitMerchantCategoryCode] """The Merchant Category Codes this spending limit applies to. If not set, the limit applies to all transactions. """ +class AuthorizationControlsUsageMultiUse(TypedDict, total=False): + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + spending_limits: Iterable[AuthorizationControlsUsageMultiUseSpendingLimit] + """Spending limits for this card. + + The most restrictive limit applies if multiple limits match. + """ + + +class AuthorizationControlsUsageSingleUseSettlementAmount(TypedDict, total=False): + """The settlement amount constraint for this single-use card.""" + + comparison: Required[Literal["equals", "less_than_or_equals"]] + """The operator used to compare the settlement amount. + + - `equals` - The settlement amount must be exactly the specified value. + - `less_than_or_equals` - The settlement amount must be less than or equal to + the specified value. + """ + + value: Required[int] + """The settlement amount value.""" + + +class AuthorizationControlsUsageSingleUse(TypedDict, total=False): + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + settlement_amount: Required[AuthorizationControlsUsageSingleUseSettlementAmount] + """The settlement amount constraint for this single-use card.""" + + +class AuthorizationControlsUsage(TypedDict, total=False): + """Controls how many times this card can be used.""" + + category: Required[Literal["single_use", "multi_use"]] + """Whether the card is for a single use or multiple uses. + + - `single_use` - The card can only be used for a single authorization. + - `multi_use` - The card can be used for multiple authorizations. + """ + + multi_use: AuthorizationControlsUsageMultiUse + """Controls for multi-use cards. + + Required if and only if `category` is `multi_use`. + """ + + single_use: AuthorizationControlsUsageSingleUse + """Controls for single-use cards. + + Required if and only if `category` is `single_use`. + """ + + class AuthorizationControls(TypedDict, total=False): """Controls that restrict how this card can be used.""" - maximum_authorization_count: AuthorizationControlsMaximumAuthorizationCount - """Limits the number of authorizations that can be approved on this card.""" - merchant_acceptor_identifier: AuthorizationControlsMerchantAcceptorIdentifier """ Restricts which Merchant Acceptor IDs are allowed or blocked for authorizations @@ -205,11 +256,8 @@ class AuthorizationControls(TypedDict, total=False): this card. """ - spending_limits: Iterable[AuthorizationControlsSpendingLimit] - """Spending limits for this card. - - The most restrictive limit applies if multiple limits match. - """ + usage: AuthorizationControlsUsage + """Controls how many times this card can be used.""" class BillingAddress(TypedDict, total=False): diff --git a/tests/api_resources/test_cards.py b/tests/api_resources/test_cards.py index e0c25e468..bfa0bf63c 100644 --- a/tests/api_resources/test_cards.py +++ b/tests/api_resources/test_cards.py @@ -35,7 +35,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: card = client.cards.create( account_id="account_in71c4amph0vgo2qllky", authorization_controls={ - "maximum_authorization_count": {"all_time": 0}, "merchant_acceptor_identifier": { "allowed": [{"identifier": "x"}], "blocked": [{"identifier": "x"}], @@ -48,13 +47,24 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "allowed": [{"country": "xx"}], "blocked": [{"country": "xx"}], }, - "spending_limits": [ - { - "interval": "all_time", - "settlement_amount": 0, - "merchant_category_codes": [{"code": "x"}], - } - ], + "usage": { + "category": "single_use", + "multi_use": { + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ] + }, + "single_use": { + "settlement_amount": { + "comparison": "equals", + "value": 0, + } + }, + }, }, billing_address={ "city": "x", @@ -147,7 +157,6 @@ def test_method_update_with_all_params(self, client: Increase) -> None: card = client.cards.update( card_id="card_oubs0hwk5rn6knuecxg2", authorization_controls={ - "maximum_authorization_count": {"all_time": 0}, "merchant_acceptor_identifier": { "allowed": [{"identifier": "x"}], "blocked": [{"identifier": "x"}], @@ -160,13 +169,24 @@ def test_method_update_with_all_params(self, client: Increase) -> None: "allowed": [{"country": "xx"}], "blocked": [{"country": "xx"}], }, - "spending_limits": [ - { - "interval": "all_time", - "settlement_amount": 0, - "merchant_category_codes": [{"code": "x"}], - } - ], + "usage": { + "category": "single_use", + "multi_use": { + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ] + }, + "single_use": { + "settlement_amount": { + "comparison": "equals", + "value": 0, + } + }, + }, }, billing_address={ "city": "x", @@ -403,7 +423,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) card = await async_client.cards.create( account_id="account_in71c4amph0vgo2qllky", authorization_controls={ - "maximum_authorization_count": {"all_time": 0}, "merchant_acceptor_identifier": { "allowed": [{"identifier": "x"}], "blocked": [{"identifier": "x"}], @@ -416,13 +435,24 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "allowed": [{"country": "xx"}], "blocked": [{"country": "xx"}], }, - "spending_limits": [ - { - "interval": "all_time", - "settlement_amount": 0, - "merchant_category_codes": [{"code": "x"}], - } - ], + "usage": { + "category": "single_use", + "multi_use": { + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ] + }, + "single_use": { + "settlement_amount": { + "comparison": "equals", + "value": 0, + } + }, + }, }, billing_address={ "city": "x", @@ -515,7 +545,6 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) card = await async_client.cards.update( card_id="card_oubs0hwk5rn6knuecxg2", authorization_controls={ - "maximum_authorization_count": {"all_time": 0}, "merchant_acceptor_identifier": { "allowed": [{"identifier": "x"}], "blocked": [{"identifier": "x"}], @@ -528,13 +557,24 @@ async def test_method_update_with_all_params(self, async_client: AsyncIncrease) "allowed": [{"country": "xx"}], "blocked": [{"country": "xx"}], }, - "spending_limits": [ - { - "interval": "all_time", - "settlement_amount": 0, - "merchant_category_codes": [{"code": "x"}], - } - ], + "usage": { + "category": "single_use", + "multi_use": { + "spending_limits": [ + { + "interval": "all_time", + "settlement_amount": 0, + "merchant_category_codes": [{"code": "x"}], + } + ] + }, + "single_use": { + "settlement_amount": { + "comparison": "equals", + "value": 0, + } + }, + }, }, billing_address={ "city": "x", From ca861371d1584bb60f255f81706faf1f0d8c2c54 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Mon, 6 Apr 2026 22:46:53 +0000 Subject: [PATCH 1309/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 82f990268..bdceeb244 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.471.0" + ".": "0.472.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 20053f519..1aeced9a5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.471.0" +version = "0.472.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 5aca77c1b..d22cb6b75 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.471.0" # x-release-please-version +__version__ = "0.472.0" # x-release-please-version From 07dd25a13c7f79cfab3386cc4299d96d2c2caa47 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 03:00:23 +0000 Subject: [PATCH 1310/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/card.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.stats.yml b/.stats.yml index 59a5dddff..8e99a7e66 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-10b0412eb48b8e2b9720b29cf479448d246a9169c1937177f11a3d2ef80ae7f1.yml -openapi_spec_hash: ed688969255974736f3fbd4e6f30194e +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-07202bc3c027c441ab8829ab0e32c1547952d4cae1691fe00497ee3b056127d0.yml +openapi_spec_hash: 3c21b26cf5803678876c00c40e88c781 config_hash: 4945e03affdf289484733306e4797f81 diff --git a/src/increase/types/card.py b/src/increase/types/card.py index 29b66ce83..4c412672a 100644 --- a/src/increase/types/card.py +++ b/src/increase/types/card.py @@ -256,9 +256,9 @@ class DigitalWallet(BaseModel): class Card(BaseModel): - """Cards are commercial credit cards. + """Cards may operate on credit, debit or prepaid BINs. - They'll immediately work for online purchases after you create them. All cards maintain a credit limit of 100% of the Account’s available balance at the time of transaction. Funds are deducted from the Account upon transaction settlement. + They’ll immediately work for online purchases after you create them. All cards work on a good funds model, and maintain a maximum limit of 100% of the Account’s available balance at the time of transaction. Funds are deducted from the Account upon transaction settlement. """ id: str From ace63ec208179aa88877dd7ed2e812309ccb3db5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 03:02:41 +0000 Subject: [PATCH 1311/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index bdceeb244..6604dfb4c 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.472.0" + ".": "0.473.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1aeced9a5..56d2878c1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.472.0" +version = "0.473.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index d22cb6b75..6210a1a39 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.472.0" # x-release-please-version +__version__ = "0.473.0" # x-release-please-version From 25b917a8e63b571afda16275f39457db22e8f5a3 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:14:40 +0000 Subject: [PATCH 1312/1325] fix(client): preserve hardcoded query params when merging with user params --- src/increase/_base_client.py | 4 +++ tests/test_client.py | 48 ++++++++++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) diff --git a/src/increase/_base_client.py b/src/increase/_base_client.py index aaf58e5a0..695509fc4 100644 --- a/src/increase/_base_client.py +++ b/src/increase/_base_client.py @@ -540,6 +540,10 @@ def _build_request( files = cast(HttpxRequestFiles, ForceMultipartDict()) prepared_url = self._prepare_url(options.url) + # preserve hard-coded query params from the url + if params and prepared_url.query: + params = {**dict(prepared_url.params.items()), **params} + prepared_url = prepared_url.copy_with(raw_path=prepared_url.raw_path.split(b"?", 1)[0]) if "_" in prepared_url.host: # work around https://github.com/encode/httpx/discussions/2880 kwargs["extensions"] = {"sni_hostname": prepared_url.host.replace("_", "-")} diff --git a/tests/test_client.py b/tests/test_client.py index 10dcfaa7a..0102239e1 100644 --- a/tests/test_client.py +++ b/tests/test_client.py @@ -429,6 +429,30 @@ def test_default_query_option(self) -> None: client.close() + def test_hardcoded_query_params_in_url(self, client: Increase) -> None: + request = client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: Increase) -> None: request = client._build_request( FinalRequestOptions( @@ -1367,6 +1391,30 @@ async def test_default_query_option(self) -> None: await client.close() + async def test_hardcoded_query_params_in_url(self, async_client: AsyncIncrease) -> None: + request = async_client._build_request(FinalRequestOptions(method="get", url="/foo?beta=true")) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/foo?beta=true", + params={"limit": "10", "page": "abc"}, + ) + ) + url = httpx.URL(request.url) + assert dict(url.params) == {"beta": "true", "limit": "10", "page": "abc"} + + request = async_client._build_request( + FinalRequestOptions( + method="get", + url="/files/a%2Fb?beta=true", + params={"limit": "10"}, + ) + ) + assert request.url.raw_path == b"/files/a%2Fb?beta=true&limit=10" + def test_request_extra_json(self, client: Increase) -> None: request = client._build_request( FinalRequestOptions( From 9f08a3291d9c9b9feb1d37257d09d50a8306a626 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Tue, 7 Apr 2026 16:17:22 +0000 Subject: [PATCH 1313/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 6604dfb4c..3f3a2fc48 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.473.0" + ".": "0.473.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 56d2878c1..08327a2aa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.473.0" +version = "0.473.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 6210a1a39..8ccdb40fa 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.473.0" # x-release-please-version +__version__ = "0.473.1" # x-release-please-version From 83ab2740c1e93820c97ae230a67bab6358d8cd15 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:52:45 +0000 Subject: [PATCH 1314/1325] feat(api): api update --- .stats.yml | 8 +- api.md | 21 + src/increase/_client.py | 47 ++ src/increase/resources/__init__.py | 14 + .../resources/entity_onboarding_sessions.py | 540 ++++++++++++++++++ .../resources/simulations/__init__.py | 14 + .../simulations/entity_onboarding_sessions.py | 198 +++++++ .../resources/simulations/simulations.py | 32 ++ src/increase/types/__init__.py | 7 + .../types/entity_onboarding_session.py | 74 +++ ...entity_onboarding_session_create_params.py | 26 + .../entity_onboarding_session_list_params.py | 42 ++ .../test_entity_onboarding_sessions.py | 104 ++++ .../test_entity_onboarding_sessions.py | 343 +++++++++++ 14 files changed, 1466 insertions(+), 4 deletions(-) create mode 100644 src/increase/resources/entity_onboarding_sessions.py create mode 100644 src/increase/resources/simulations/entity_onboarding_sessions.py create mode 100644 src/increase/types/entity_onboarding_session.py create mode 100644 src/increase/types/entity_onboarding_session_create_params.py create mode 100644 src/increase/types/entity_onboarding_session_list_params.py create mode 100644 tests/api_resources/simulations/test_entity_onboarding_sessions.py create mode 100644 tests/api_resources/test_entity_onboarding_sessions.py diff --git a/.stats.yml b/.stats.yml index 8e99a7e66..cc2badb61 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ -configured_endpoints: 236 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-07202bc3c027c441ab8829ab0e32c1547952d4cae1691fe00497ee3b056127d0.yml -openapi_spec_hash: 3c21b26cf5803678876c00c40e88c781 -config_hash: 4945e03affdf289484733306e4797f81 +configured_endpoints: 241 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8bbf0093efa65975131da3735f2adc0ec05432cde8c05e9c9796bc7d553103ae.yml +openapi_spec_hash: 5080ba849a5b100ace3bec9da24d4dc7 +config_hash: d48e9f65bcf642f92610034d6c43f07a diff --git a/api.md b/api.md index 0d68ea18f..a3952130d 100644 --- a/api.md +++ b/api.md @@ -531,6 +531,21 @@ Methods: - client.supplemental_documents.create(\*\*params) -> EntitySupplementalDocument - client.supplemental_documents.list(\*\*params) -> SyncPage[EntitySupplementalDocument] +# EntityOnboardingSessions + +Types: + +```python +from increase.types import EntityOnboardingSession +``` + +Methods: + +- client.entity_onboarding_sessions.create(\*\*params) -> EntityOnboardingSession +- client.entity_onboarding_sessions.retrieve(entity_onboarding_session_id) -> EntityOnboardingSession +- client.entity_onboarding_sessions.list(\*\*params) -> SyncPage[EntityOnboardingSession] +- client.entity_onboarding_sessions.expire(entity_onboarding_session_id) -> EntityOnboardingSession + # Programs Types: @@ -1011,6 +1026,12 @@ Methods: - client.simulations.inbound_mail_items.create(\*\*params) -> InboundMailItem +## EntityOnboardingSessions + +Methods: + +- client.simulations.entity_onboarding_sessions.submit(entity_onboarding_session_id) -> EntityOnboardingSession + ## Programs Methods: diff --git a/src/increase/_client.py b/src/increase/_client.py index e6b53fe20..49280b23e 100644 --- a/src/increase/_client.py +++ b/src/increase/_client.py @@ -90,6 +90,7 @@ wire_drawdown_requests, inbound_fednow_transfers, card_purchase_supplements, + entity_onboarding_sessions, intrafi_account_enrollments, real_time_payments_transfers, inbound_wire_drawdown_requests, @@ -152,6 +153,10 @@ CardPurchaseSupplementsResource, AsyncCardPurchaseSupplementsResource, ) + from .resources.entity_onboarding_sessions import ( + EntityOnboardingSessionsResource, + AsyncEntityOnboardingSessionsResource, + ) from .resources.intrafi_account_enrollments import ( IntrafiAccountEnrollmentsResource, AsyncIntrafiAccountEnrollmentsResource, @@ -492,6 +497,12 @@ def supplemental_documents(self) -> SupplementalDocumentsResource: return SupplementalDocumentsResource(self) + @cached_property + def entity_onboarding_sessions(self) -> EntityOnboardingSessionsResource: + from .resources.entity_onboarding_sessions import EntityOnboardingSessionsResource + + return EntityOnboardingSessionsResource(self) + @cached_property def programs(self) -> ProgramsResource: from .resources.programs import ProgramsResource @@ -1091,6 +1102,12 @@ def supplemental_documents(self) -> AsyncSupplementalDocumentsResource: return AsyncSupplementalDocumentsResource(self) + @cached_property + def entity_onboarding_sessions(self) -> AsyncEntityOnboardingSessionsResource: + from .resources.entity_onboarding_sessions import AsyncEntityOnboardingSessionsResource + + return AsyncEntityOnboardingSessionsResource(self) + @cached_property def programs(self) -> AsyncProgramsResource: from .resources.programs import AsyncProgramsResource @@ -1617,6 +1634,12 @@ def supplemental_documents(self) -> supplemental_documents.SupplementalDocuments return SupplementalDocumentsResourceWithRawResponse(self._client.supplemental_documents) + @cached_property + def entity_onboarding_sessions(self) -> entity_onboarding_sessions.EntityOnboardingSessionsResourceWithRawResponse: + from .resources.entity_onboarding_sessions import EntityOnboardingSessionsResourceWithRawResponse + + return EntityOnboardingSessionsResourceWithRawResponse(self._client.entity_onboarding_sessions) + @cached_property def programs(self) -> programs.ProgramsResourceWithRawResponse: from .resources.programs import ProgramsResourceWithRawResponse @@ -1986,6 +2009,14 @@ def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocu return AsyncSupplementalDocumentsResourceWithRawResponse(self._client.supplemental_documents) + @cached_property + def entity_onboarding_sessions( + self, + ) -> entity_onboarding_sessions.AsyncEntityOnboardingSessionsResourceWithRawResponse: + from .resources.entity_onboarding_sessions import AsyncEntityOnboardingSessionsResourceWithRawResponse + + return AsyncEntityOnboardingSessionsResourceWithRawResponse(self._client.entity_onboarding_sessions) + @cached_property def programs(self) -> programs.AsyncProgramsResourceWithRawResponse: from .resources.programs import AsyncProgramsResourceWithRawResponse @@ -2355,6 +2386,14 @@ def supplemental_documents(self) -> supplemental_documents.SupplementalDocuments return SupplementalDocumentsResourceWithStreamingResponse(self._client.supplemental_documents) + @cached_property + def entity_onboarding_sessions( + self, + ) -> entity_onboarding_sessions.EntityOnboardingSessionsResourceWithStreamingResponse: + from .resources.entity_onboarding_sessions import EntityOnboardingSessionsResourceWithStreamingResponse + + return EntityOnboardingSessionsResourceWithStreamingResponse(self._client.entity_onboarding_sessions) + @cached_property def programs(self) -> programs.ProgramsResourceWithStreamingResponse: from .resources.programs import ProgramsResourceWithStreamingResponse @@ -2730,6 +2769,14 @@ def supplemental_documents(self) -> supplemental_documents.AsyncSupplementalDocu return AsyncSupplementalDocumentsResourceWithStreamingResponse(self._client.supplemental_documents) + @cached_property + def entity_onboarding_sessions( + self, + ) -> entity_onboarding_sessions.AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + from .resources.entity_onboarding_sessions import AsyncEntityOnboardingSessionsResourceWithStreamingResponse + + return AsyncEntityOnboardingSessionsResourceWithStreamingResponse(self._client.entity_onboarding_sessions) + @cached_property def programs(self) -> programs.AsyncProgramsResourceWithStreamingResponse: from .resources.programs import AsyncProgramsResourceWithStreamingResponse diff --git a/src/increase/resources/__init__.py b/src/increase/resources/__init__.py index d62d8ae48..192bfb628 100644 --- a/src/increase/resources/__init__.py +++ b/src/increase/resources/__init__.py @@ -432,6 +432,14 @@ CardPurchaseSupplementsResourceWithStreamingResponse, AsyncCardPurchaseSupplementsResourceWithStreamingResponse, ) +from .entity_onboarding_sessions import ( + EntityOnboardingSessionsResource, + AsyncEntityOnboardingSessionsResource, + EntityOnboardingSessionsResourceWithRawResponse, + AsyncEntityOnboardingSessionsResourceWithRawResponse, + EntityOnboardingSessionsResourceWithStreamingResponse, + AsyncEntityOnboardingSessionsResourceWithStreamingResponse, +) from .intrafi_account_enrollments import ( IntrafiAccountEnrollmentsResource, AsyncIntrafiAccountEnrollmentsResource, @@ -682,6 +690,12 @@ "AsyncSupplementalDocumentsResourceWithRawResponse", "SupplementalDocumentsResourceWithStreamingResponse", "AsyncSupplementalDocumentsResourceWithStreamingResponse", + "EntityOnboardingSessionsResource", + "AsyncEntityOnboardingSessionsResource", + "EntityOnboardingSessionsResourceWithRawResponse", + "AsyncEntityOnboardingSessionsResourceWithRawResponse", + "EntityOnboardingSessionsResourceWithStreamingResponse", + "AsyncEntityOnboardingSessionsResourceWithStreamingResponse", "ProgramsResource", "AsyncProgramsResource", "ProgramsResourceWithRawResponse", diff --git a/src/increase/resources/entity_onboarding_sessions.py b/src/increase/resources/entity_onboarding_sessions.py new file mode 100644 index 000000000..bc315a878 --- /dev/null +++ b/src/increase/resources/entity_onboarding_sessions.py @@ -0,0 +1,540 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..types import entity_onboarding_session_list_params, entity_onboarding_session_create_params +from .._types import Body, Omit, Query, Headers, NotGiven, omit, not_given +from .._utils import path_template, maybe_transform, async_maybe_transform +from .._compat import cached_property +from .._resource import SyncAPIResource, AsyncAPIResource +from .._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..pagination import SyncPage, AsyncPage +from .._base_client import AsyncPaginator, make_request_options +from ..types.entity_onboarding_session import EntityOnboardingSession + +__all__ = ["EntityOnboardingSessionsResource", "AsyncEntityOnboardingSessionsResource"] + + +class EntityOnboardingSessionsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> EntityOnboardingSessionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return EntityOnboardingSessionsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> EntityOnboardingSessionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return EntityOnboardingSessionsResourceWithStreamingResponse(self) + + def create( + self, + *, + program_id: str, + redirect_url: str, + entity_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Create an Entity Onboarding Session + + Args: + program_id: The identifier of the Program the Entity will be onboarded to. + + redirect_url: The URL to redirect the customer to after they complete the onboarding form. The + redirect will include `entity_onboarding_session_id` and `entity_id` query + parameters. + + entity_id: The identifier of an existing Entity to associate with the onboarding session. + If provided, the onboarding form will display any outstanding tasks required to + complete the Entity's onboarding. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return self._post( + "/entity_onboarding_sessions", + body=maybe_transform( + { + "program_id": program_id, + "redirect_url": redirect_url, + "entity_id": entity_id, + }, + entity_onboarding_session_create_params.EntityOnboardingSessionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + def retrieve( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EntityOnboardingSession: + """ + Retrieve an Entity Onboarding Session + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return self._get( + path_template( + "/entity_onboarding_sessions/{entity_onboarding_session_id}", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EntityOnboardingSession, + ) + + def list( + self, + *, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: entity_onboarding_session_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> SyncPage[EntityOnboardingSession]: + """ + List Entity Onboarding Session + + Args: + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/entity_onboarding_sessions", + page=SyncPage[EntityOnboardingSession], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + entity_onboarding_session_list_params.EntityOnboardingSessionListParams, + ), + ), + model=EntityOnboardingSession, + ) + + def expire( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Expire an Entity Onboarding Session + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return self._post( + path_template( + "/entity_onboarding_sessions/{entity_onboarding_session_id}/expire", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + +class AsyncEntityOnboardingSessionsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncEntityOnboardingSessionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncEntityOnboardingSessionsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncEntityOnboardingSessionsResourceWithStreamingResponse(self) + + async def create( + self, + *, + program_id: str, + redirect_url: str, + entity_id: str | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Create an Entity Onboarding Session + + Args: + program_id: The identifier of the Program the Entity will be onboarded to. + + redirect_url: The URL to redirect the customer to after they complete the onboarding form. The + redirect will include `entity_onboarding_session_id` and `entity_id` query + parameters. + + entity_id: The identifier of an existing Entity to associate with the onboarding session. + If provided, the onboarding form will display any outstanding tasks required to + complete the Entity's onboarding. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + return await self._post( + "/entity_onboarding_sessions", + body=await async_maybe_transform( + { + "program_id": program_id, + "redirect_url": redirect_url, + "entity_id": entity_id, + }, + entity_onboarding_session_create_params.EntityOnboardingSessionCreateParams, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + async def retrieve( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> EntityOnboardingSession: + """ + Retrieve an Entity Onboarding Session + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return await self._get( + path_template( + "/entity_onboarding_sessions/{entity_onboarding_session_id}", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout + ), + cast_to=EntityOnboardingSession, + ) + + def list( + self, + *, + cursor: str | Omit = omit, + idempotency_key: str | Omit = omit, + limit: int | Omit = omit, + status: entity_onboarding_session_list_params.Status | Omit = omit, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + ) -> AsyncPaginator[EntityOnboardingSession, AsyncPage[EntityOnboardingSession]]: + """ + List Entity Onboarding Session + + Args: + cursor: Return the page of entries after this one. + + idempotency_key: Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + + limit: Limit the size of the list that is returned. The default (and maximum) is 100 + objects. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + """ + return self._get_api_list( + "/entity_onboarding_sessions", + page=AsyncPage[EntityOnboardingSession], + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + query=maybe_transform( + { + "cursor": cursor, + "idempotency_key": idempotency_key, + "limit": limit, + "status": status, + }, + entity_onboarding_session_list_params.EntityOnboardingSessionListParams, + ), + ), + model=EntityOnboardingSession, + ) + + async def expire( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Expire an Entity Onboarding Session + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session to expire. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return await self._post( + path_template( + "/entity_onboarding_sessions/{entity_onboarding_session_id}/expire", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + +class EntityOnboardingSessionsResourceWithRawResponse: + def __init__(self, entity_onboarding_sessions: EntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.create = to_raw_response_wrapper( + entity_onboarding_sessions.create, + ) + self.retrieve = to_raw_response_wrapper( + entity_onboarding_sessions.retrieve, + ) + self.list = to_raw_response_wrapper( + entity_onboarding_sessions.list, + ) + self.expire = to_raw_response_wrapper( + entity_onboarding_sessions.expire, + ) + + +class AsyncEntityOnboardingSessionsResourceWithRawResponse: + def __init__(self, entity_onboarding_sessions: AsyncEntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.create = async_to_raw_response_wrapper( + entity_onboarding_sessions.create, + ) + self.retrieve = async_to_raw_response_wrapper( + entity_onboarding_sessions.retrieve, + ) + self.list = async_to_raw_response_wrapper( + entity_onboarding_sessions.list, + ) + self.expire = async_to_raw_response_wrapper( + entity_onboarding_sessions.expire, + ) + + +class EntityOnboardingSessionsResourceWithStreamingResponse: + def __init__(self, entity_onboarding_sessions: EntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.create = to_streamed_response_wrapper( + entity_onboarding_sessions.create, + ) + self.retrieve = to_streamed_response_wrapper( + entity_onboarding_sessions.retrieve, + ) + self.list = to_streamed_response_wrapper( + entity_onboarding_sessions.list, + ) + self.expire = to_streamed_response_wrapper( + entity_onboarding_sessions.expire, + ) + + +class AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + def __init__(self, entity_onboarding_sessions: AsyncEntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.create = async_to_streamed_response_wrapper( + entity_onboarding_sessions.create, + ) + self.retrieve = async_to_streamed_response_wrapper( + entity_onboarding_sessions.retrieve, + ) + self.list = async_to_streamed_response_wrapper( + entity_onboarding_sessions.list, + ) + self.expire = async_to_streamed_response_wrapper( + entity_onboarding_sessions.expire, + ) diff --git a/src/increase/resources/simulations/__init__.py b/src/increase/resources/simulations/__init__.py index 972e5b7bd..b3c198a7a 100644 --- a/src/increase/resources/simulations/__init__.py +++ b/src/increase/resources/simulations/__init__.py @@ -224,6 +224,14 @@ InboundFednowTransfersResourceWithStreamingResponse, AsyncInboundFednowTransfersResourceWithStreamingResponse, ) +from .entity_onboarding_sessions import ( + EntityOnboardingSessionsResource, + AsyncEntityOnboardingSessionsResource, + EntityOnboardingSessionsResourceWithRawResponse, + AsyncEntityOnboardingSessionsResourceWithRawResponse, + EntityOnboardingSessionsResourceWithStreamingResponse, + AsyncEntityOnboardingSessionsResourceWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfersResource, AsyncRealTimePaymentsTransfersResource, @@ -434,6 +442,12 @@ "AsyncInboundMailItemsResourceWithRawResponse", "InboundMailItemsResourceWithStreamingResponse", "AsyncInboundMailItemsResourceWithStreamingResponse", + "EntityOnboardingSessionsResource", + "AsyncEntityOnboardingSessionsResource", + "EntityOnboardingSessionsResourceWithRawResponse", + "AsyncEntityOnboardingSessionsResourceWithRawResponse", + "EntityOnboardingSessionsResourceWithStreamingResponse", + "AsyncEntityOnboardingSessionsResourceWithStreamingResponse", "ProgramsResource", "AsyncProgramsResource", "ProgramsResourceWithRawResponse", diff --git a/src/increase/resources/simulations/entity_onboarding_sessions.py b/src/increase/resources/simulations/entity_onboarding_sessions.py new file mode 100644 index 000000000..102b851eb --- /dev/null +++ b/src/increase/resources/simulations/entity_onboarding_sessions.py @@ -0,0 +1,198 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import httpx + +from ..._types import Body, Query, Headers, NotGiven, not_given +from ..._utils import path_template +from ..._compat import cached_property +from ..._resource import SyncAPIResource, AsyncAPIResource +from ..._response import ( + to_raw_response_wrapper, + to_streamed_response_wrapper, + async_to_raw_response_wrapper, + async_to_streamed_response_wrapper, +) +from ..._base_client import make_request_options +from ...types.entity_onboarding_session import EntityOnboardingSession + +__all__ = ["EntityOnboardingSessionsResource", "AsyncEntityOnboardingSessionsResource"] + + +class EntityOnboardingSessionsResource(SyncAPIResource): + @cached_property + def with_raw_response(self) -> EntityOnboardingSessionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return EntityOnboardingSessionsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> EntityOnboardingSessionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return EntityOnboardingSessionsResourceWithStreamingResponse(self) + + def submit( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Simulates the submission of an + [Entity Onboarding Session](#entity-onboarding-sessions). This session must have + a `status` of `active`. After submission, the session will transition to + `expired` and a new Entity will be created. + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return self._post( + path_template( + "/simulations/entity_onboarding_sessions/{entity_onboarding_session_id}/submit", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + +class AsyncEntityOnboardingSessionsResource(AsyncAPIResource): + @cached_property + def with_raw_response(self) -> AsyncEntityOnboardingSessionsResourceWithRawResponse: + """ + This property can be used as a prefix for any HTTP method call to return + the raw response object instead of the parsed content. + + For more information, see https://www.github.com/Increase/increase-python#accessing-raw-response-data-eg-headers + """ + return AsyncEntityOnboardingSessionsResourceWithRawResponse(self) + + @cached_property + def with_streaming_response(self) -> AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + """ + An alternative to `.with_raw_response` that doesn't eagerly read the response body. + + For more information, see https://www.github.com/Increase/increase-python#with_streaming_response + """ + return AsyncEntityOnboardingSessionsResourceWithStreamingResponse(self) + + async def submit( + self, + entity_onboarding_session_id: str, + *, + # Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs. + # The extra values given here take precedence over values defined on the client or passed to this method. + extra_headers: Headers | None = None, + extra_query: Query | None = None, + extra_body: Body | None = None, + timeout: float | httpx.Timeout | None | NotGiven = not_given, + idempotency_key: str | None = None, + ) -> EntityOnboardingSession: + """ + Simulates the submission of an + [Entity Onboarding Session](#entity-onboarding-sessions). This session must have + a `status` of `active`. After submission, the session will transition to + `expired` and a new Entity will be created. + + Args: + entity_onboarding_session_id: The identifier of the Entity Onboarding Session you wish to submit. + + extra_headers: Send extra headers + + extra_query: Add additional query parameters to the request + + extra_body: Add additional JSON properties to the request + + timeout: Override the client-level default timeout for this request, in seconds + + idempotency_key: Specify a custom idempotency key for this request + """ + if not entity_onboarding_session_id: + raise ValueError( + f"Expected a non-empty value for `entity_onboarding_session_id` but received {entity_onboarding_session_id!r}" + ) + return await self._post( + path_template( + "/simulations/entity_onboarding_sessions/{entity_onboarding_session_id}/submit", + entity_onboarding_session_id=entity_onboarding_session_id, + ), + options=make_request_options( + extra_headers=extra_headers, + extra_query=extra_query, + extra_body=extra_body, + timeout=timeout, + idempotency_key=idempotency_key, + ), + cast_to=EntityOnboardingSession, + ) + + +class EntityOnboardingSessionsResourceWithRawResponse: + def __init__(self, entity_onboarding_sessions: EntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.submit = to_raw_response_wrapper( + entity_onboarding_sessions.submit, + ) + + +class AsyncEntityOnboardingSessionsResourceWithRawResponse: + def __init__(self, entity_onboarding_sessions: AsyncEntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.submit = async_to_raw_response_wrapper( + entity_onboarding_sessions.submit, + ) + + +class EntityOnboardingSessionsResourceWithStreamingResponse: + def __init__(self, entity_onboarding_sessions: EntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.submit = to_streamed_response_wrapper( + entity_onboarding_sessions.submit, + ) + + +class AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + def __init__(self, entity_onboarding_sessions: AsyncEntityOnboardingSessionsResource) -> None: + self._entity_onboarding_sessions = entity_onboarding_sessions + + self.submit = async_to_streamed_response_wrapper( + entity_onboarding_sessions.submit, + ) diff --git a/src/increase/resources/simulations/simulations.py b/src/increase/resources/simulations/simulations.py index 3720f6d50..3051441c6 100644 --- a/src/increase/resources/simulations/simulations.py +++ b/src/increase/resources/simulations/simulations.py @@ -220,6 +220,14 @@ InboundFednowTransfersResourceWithStreamingResponse, AsyncInboundFednowTransfersResourceWithStreamingResponse, ) +from .entity_onboarding_sessions import ( + EntityOnboardingSessionsResource, + AsyncEntityOnboardingSessionsResource, + EntityOnboardingSessionsResourceWithRawResponse, + AsyncEntityOnboardingSessionsResourceWithRawResponse, + EntityOnboardingSessionsResourceWithStreamingResponse, + AsyncEntityOnboardingSessionsResourceWithStreamingResponse, +) from .real_time_payments_transfers import ( RealTimePaymentsTransfersResource, AsyncRealTimePaymentsTransfersResource, @@ -377,6 +385,10 @@ def check_deposits(self) -> CheckDepositsResource: def inbound_mail_items(self) -> InboundMailItemsResource: return InboundMailItemsResource(self._client) + @cached_property + def entity_onboarding_sessions(self) -> EntityOnboardingSessionsResource: + return EntityOnboardingSessionsResource(self._client) + @cached_property def programs(self) -> ProgramsResource: return ProgramsResource(self._client) @@ -526,6 +538,10 @@ def check_deposits(self) -> AsyncCheckDepositsResource: def inbound_mail_items(self) -> AsyncInboundMailItemsResource: return AsyncInboundMailItemsResource(self._client) + @cached_property + def entity_onboarding_sessions(self) -> AsyncEntityOnboardingSessionsResource: + return AsyncEntityOnboardingSessionsResource(self._client) + @cached_property def programs(self) -> AsyncProgramsResource: return AsyncProgramsResource(self._client) @@ -680,6 +696,10 @@ def check_deposits(self) -> CheckDepositsResourceWithRawResponse: def inbound_mail_items(self) -> InboundMailItemsResourceWithRawResponse: return InboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property + def entity_onboarding_sessions(self) -> EntityOnboardingSessionsResourceWithRawResponse: + return EntityOnboardingSessionsResourceWithRawResponse(self._simulations.entity_onboarding_sessions) + @cached_property def programs(self) -> ProgramsResourceWithRawResponse: return ProgramsResourceWithRawResponse(self._simulations.programs) @@ -817,6 +837,10 @@ def check_deposits(self) -> AsyncCheckDepositsResourceWithRawResponse: def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithRawResponse: return AsyncInboundMailItemsResourceWithRawResponse(self._simulations.inbound_mail_items) + @cached_property + def entity_onboarding_sessions(self) -> AsyncEntityOnboardingSessionsResourceWithRawResponse: + return AsyncEntityOnboardingSessionsResourceWithRawResponse(self._simulations.entity_onboarding_sessions) + @cached_property def programs(self) -> AsyncProgramsResourceWithRawResponse: return AsyncProgramsResourceWithRawResponse(self._simulations.programs) @@ -956,6 +980,10 @@ def check_deposits(self) -> CheckDepositsResourceWithStreamingResponse: def inbound_mail_items(self) -> InboundMailItemsResourceWithStreamingResponse: return InboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property + def entity_onboarding_sessions(self) -> EntityOnboardingSessionsResourceWithStreamingResponse: + return EntityOnboardingSessionsResourceWithStreamingResponse(self._simulations.entity_onboarding_sessions) + @cached_property def programs(self) -> ProgramsResourceWithStreamingResponse: return ProgramsResourceWithStreamingResponse(self._simulations.programs) @@ -1101,6 +1129,10 @@ def check_deposits(self) -> AsyncCheckDepositsResourceWithStreamingResponse: def inbound_mail_items(self) -> AsyncInboundMailItemsResourceWithStreamingResponse: return AsyncInboundMailItemsResourceWithStreamingResponse(self._simulations.inbound_mail_items) + @cached_property + def entity_onboarding_sessions(self) -> AsyncEntityOnboardingSessionsResourceWithStreamingResponse: + return AsyncEntityOnboardingSessionsResourceWithStreamingResponse(self._simulations.entity_onboarding_sessions) + @cached_property def programs(self) -> AsyncProgramsResourceWithStreamingResponse: return AsyncProgramsResourceWithStreamingResponse(self._simulations.programs) diff --git a/src/increase/types/__init__.py b/src/increase/types/__init__.py index 994a8c3d4..9ff68547c 100644 --- a/src/increase/types/__init__.py +++ b/src/increase/types/__init__.py @@ -85,6 +85,7 @@ from .card_payment_list_params import CardPaymentListParams as CardPaymentListParams from .card_purchase_supplement import CardPurchaseSupplement as CardPurchaseSupplement from .check_deposit_list_params import CheckDepositListParams as CheckDepositListParams +from .entity_onboarding_session import EntityOnboardingSession as EntityOnboardingSession from .oauth_token_create_params import OAuthTokenCreateParams as OAuthTokenCreateParams from .physical_card_list_params import PhysicalCardListParams as PhysicalCardListParams from .wire_transfer_list_params import WireTransferListParams as WireTransferListParams @@ -168,9 +169,15 @@ from .wire_drawdown_request_create_params import WireDrawdownRequestCreateParams as WireDrawdownRequestCreateParams from .card_purchase_supplement_list_params import CardPurchaseSupplementListParams as CardPurchaseSupplementListParams from .inbound_wire_transfer_reverse_params import InboundWireTransferReverseParams as InboundWireTransferReverseParams +from .entity_onboarding_session_list_params import ( + EntityOnboardingSessionListParams as EntityOnboardingSessionListParams, +) from .intrafi_account_enrollment_list_params import ( IntrafiAccountEnrollmentListParams as IntrafiAccountEnrollmentListParams, ) +from .entity_onboarding_session_create_params import ( + EntityOnboardingSessionCreateParams as EntityOnboardingSessionCreateParams, +) from .real_time_payments_transfer_list_params import ( RealTimePaymentsTransferListParams as RealTimePaymentsTransferListParams, ) diff --git a/src/increase/types/entity_onboarding_session.py b/src/increase/types/entity_onboarding_session.py new file mode 100644 index 000000000..97ab25e70 --- /dev/null +++ b/src/increase/types/entity_onboarding_session.py @@ -0,0 +1,74 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from typing import Optional +from datetime import datetime +from typing_extensions import Literal + +from .._models import BaseModel + +__all__ = ["EntityOnboardingSession"] + + +class EntityOnboardingSession(BaseModel): + """ + Entity Onboarding Sessions let your customers onboard themselves by completing Increase-hosted forms. Create a session and redirect your customer to the returned URL. When they're done, they'll be redirected back to your site. This API is used for [hosted onboarding](/documentation/hosted-onboarding). + """ + + id: str + """The Entity Onboarding Session's identifier.""" + + created_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Entity Onboarding Session was created. + """ + + entity_id: Optional[str] = None + """ + The identifier of the Entity associated with this session, if one has been + created or was provided when creating the session. + """ + + expires_at: datetime + """ + The [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) date and time at which + the Entity Onboarding Session will expire. + """ + + idempotency_key: Optional[str] = None + """The idempotency key you chose for this object. + + This value is unique across Increase and is used to ensure that a request is + only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + program_id: str + """The identifier of the Program the Entity will be onboarded to.""" + + redirect_url: str + """The URL to redirect to after the onboarding session is complete. + + Increase will include the query parameters `entity_onboarding_session_id` and + `entity_id` when redirecting. + """ + + session_url: Optional[str] = None + """The URL containing the onboarding form. + + You should share this link with your customer. Only present when the session is + active. + """ + + status: Literal["active", "expired"] + """The status of the onboarding session. + + - `active` - The Entity Onboarding Session is active. + - `expired` - The Entity Onboarding Session has expired. + """ + + type: Literal["entity_onboarding_session"] + """A constant representing the object's type. + + For this resource it will always be `entity_onboarding_session`. + """ diff --git a/src/increase/types/entity_onboarding_session_create_params.py b/src/increase/types/entity_onboarding_session_create_params.py new file mode 100644 index 000000000..6ccf843dd --- /dev/null +++ b/src/increase/types/entity_onboarding_session_create_params.py @@ -0,0 +1,26 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing_extensions import Required, TypedDict + +__all__ = ["EntityOnboardingSessionCreateParams"] + + +class EntityOnboardingSessionCreateParams(TypedDict, total=False): + program_id: Required[str] + """The identifier of the Program the Entity will be onboarded to.""" + + redirect_url: Required[str] + """The URL to redirect the customer to after they complete the onboarding form. + + The redirect will include `entity_onboarding_session_id` and `entity_id` query + parameters. + """ + + entity_id: str + """The identifier of an existing Entity to associate with the onboarding session. + + If provided, the onboarding form will display any outstanding tasks required to + complete the Entity's onboarding. + """ diff --git a/src/increase/types/entity_onboarding_session_list_params.py b/src/increase/types/entity_onboarding_session_list_params.py new file mode 100644 index 000000000..96c5d017a --- /dev/null +++ b/src/increase/types/entity_onboarding_session_list_params.py @@ -0,0 +1,42 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +from typing import List +from typing_extensions import Literal, TypedDict + +__all__ = ["EntityOnboardingSessionListParams", "Status"] + + +class EntityOnboardingSessionListParams(TypedDict, total=False): + cursor: str + """Return the page of entries after this one.""" + + idempotency_key: str + """ + Filter records to the one with the specified `idempotency_key` you chose for + that object. This value is unique across Increase and is used to ensure that a + request is only processed once. Learn more about + [idempotency](https://increase.com/documentation/idempotency-keys). + """ + + limit: int + """Limit the size of the list that is returned. + + The default (and maximum) is 100 objects. + """ + + status: Status + + +_StatusReservedKeywords = TypedDict( + "_StatusReservedKeywords", + { + "in": List[Literal["active", "expired"]], + }, + total=False, +) + + +class Status(_StatusReservedKeywords, total=False): + pass diff --git a/tests/api_resources/simulations/test_entity_onboarding_sessions.py b/tests/api_resources/simulations/test_entity_onboarding_sessions.py new file mode 100644 index 000000000..17cf84265 --- /dev/null +++ b/tests/api_resources/simulations/test_entity_onboarding_sessions.py @@ -0,0 +1,104 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import EntityOnboardingSession + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestEntityOnboardingSessions: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_submit(self, client: Increase) -> None: + entity_onboarding_session = client.simulations.entity_onboarding_sessions.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_raw_response_submit(self, client: Increase) -> None: + response = client.simulations.entity_onboarding_sessions.with_raw_response.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_streaming_response_submit(self, client: Increase) -> None: + with client.simulations.entity_onboarding_sessions.with_streaming_response.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_submit(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + client.simulations.entity_onboarding_sessions.with_raw_response.submit( + "", + ) + + +class TestAsyncEntityOnboardingSessions: + parametrize = pytest.mark.parametrize( + "async_client", [False, True, {"http_client": "aiohttp"}], indirect=True, ids=["loose", "strict", "aiohttp"] + ) + + @parametrize + async def test_method_submit(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.simulations.entity_onboarding_sessions.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_raw_response_submit(self, async_client: AsyncIncrease) -> None: + response = await async_client.simulations.entity_onboarding_sessions.with_raw_response.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_streaming_response_submit(self, async_client: AsyncIncrease) -> None: + async with async_client.simulations.entity_onboarding_sessions.with_streaming_response.submit( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_submit(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + await async_client.simulations.entity_onboarding_sessions.with_raw_response.submit( + "", + ) diff --git a/tests/api_resources/test_entity_onboarding_sessions.py b/tests/api_resources/test_entity_onboarding_sessions.py new file mode 100644 index 000000000..cd90a32e1 --- /dev/null +++ b/tests/api_resources/test_entity_onboarding_sessions.py @@ -0,0 +1,343 @@ +# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. + +from __future__ import annotations + +import os +from typing import Any, cast + +import pytest + +from increase import Increase, AsyncIncrease +from tests.utils import assert_matches_type +from increase.types import ( + EntityOnboardingSession, +) +from increase.pagination import SyncPage, AsyncPage + +base_url = os.environ.get("TEST_API_BASE_URL", "http://127.0.0.1:4010") + + +class TestEntityOnboardingSessions: + parametrize = pytest.mark.parametrize("client", [False, True], indirect=True, ids=["loose", "strict"]) + + @parametrize + def test_method_create(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_method_create_with_all_params(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + entity_id="entity_id", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_raw_response_create(self, client: Increase) -> None: + response = client.entity_onboarding_sessions.with_raw_response.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_streaming_response_create(self, client: Increase) -> None: + with client.entity_onboarding_sessions.with_streaming_response.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_retrieve(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_raw_response_retrieve(self, client: Increase) -> None: + response = client.entity_onboarding_sessions.with_raw_response.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_streaming_response_retrieve(self, client: Increase) -> None: + with client.entity_onboarding_sessions.with_streaming_response.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_retrieve(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + client.entity_onboarding_sessions.with_raw_response.retrieve( + "", + ) + + @parametrize + def test_method_list(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.list() + assert_matches_type(SyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + def test_method_list_with_all_params(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.list( + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["active"]}, + ) + assert_matches_type(SyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + def test_raw_response_list(self, client: Increase) -> None: + response = client.entity_onboarding_sessions.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = response.parse() + assert_matches_type(SyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + def test_streaming_response_list(self, client: Increase) -> None: + with client.entity_onboarding_sessions.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = response.parse() + assert_matches_type(SyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_method_expire(self, client: Increase) -> None: + entity_onboarding_session = client.entity_onboarding_sessions.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_raw_response_expire(self, client: Increase) -> None: + response = client.entity_onboarding_sessions.with_raw_response.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + def test_streaming_response_expire(self, client: Increase) -> None: + with client.entity_onboarding_sessions.with_streaming_response.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + def test_path_params_expire(self, client: Increase) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + client.entity_onboarding_sessions.with_raw_response.expire( + "", + ) + + +class TestAsyncEntityOnboardingSessions: + 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: + entity_onboarding_session = await async_client.entity_onboarding_sessions.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_method_create_with_all_params(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.entity_onboarding_sessions.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + entity_id="entity_id", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_raw_response_create(self, async_client: AsyncIncrease) -> None: + response = await async_client.entity_onboarding_sessions.with_raw_response.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_streaming_response_create(self, async_client: AsyncIncrease) -> None: + async with async_client.entity_onboarding_sessions.with_streaming_response.create( + program_id="program_i2v2os4mwza1oetokh9i", + redirect_url="https://example.com/onboarding/session", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_retrieve(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.entity_onboarding_sessions.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_raw_response_retrieve(self, async_client: AsyncIncrease) -> None: + response = await async_client.entity_onboarding_sessions.with_raw_response.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_streaming_response_retrieve(self, async_client: AsyncIncrease) -> None: + async with async_client.entity_onboarding_sessions.with_streaming_response.retrieve( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_retrieve(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + await async_client.entity_onboarding_sessions.with_raw_response.retrieve( + "", + ) + + @parametrize + async def test_method_list(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.entity_onboarding_sessions.list() + assert_matches_type(AsyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + async def test_method_list_with_all_params(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.entity_onboarding_sessions.list( + cursor="cursor", + idempotency_key="x", + limit=1, + status={"in": ["active"]}, + ) + assert_matches_type(AsyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + async def test_raw_response_list(self, async_client: AsyncIncrease) -> None: + response = await async_client.entity_onboarding_sessions.with_raw_response.list() + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = await response.parse() + assert_matches_type(AsyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + @parametrize + async def test_streaming_response_list(self, async_client: AsyncIncrease) -> None: + async with async_client.entity_onboarding_sessions.with_streaming_response.list() as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = await response.parse() + assert_matches_type(AsyncPage[EntityOnboardingSession], entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_method_expire(self, async_client: AsyncIncrease) -> None: + entity_onboarding_session = await async_client.entity_onboarding_sessions.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_raw_response_expire(self, async_client: AsyncIncrease) -> None: + response = await async_client.entity_onboarding_sessions.with_raw_response.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) + + assert response.is_closed is True + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + @parametrize + async def test_streaming_response_expire(self, async_client: AsyncIncrease) -> None: + async with async_client.entity_onboarding_sessions.with_streaming_response.expire( + "entity_onboarding_session_wid2ug11fsmvh3k9hymd", + ) as response: + assert not response.is_closed + assert response.http_request.headers.get("X-Stainless-Lang") == "python" + + entity_onboarding_session = await response.parse() + assert_matches_type(EntityOnboardingSession, entity_onboarding_session, path=["response"]) + + assert cast(Any, response.is_closed) is True + + @parametrize + async def test_path_params_expire(self, async_client: AsyncIncrease) -> None: + with pytest.raises( + ValueError, match=r"Expected a non-empty value for `entity_onboarding_session_id` but received ''" + ): + await async_client.entity_onboarding_sessions.with_raw_response.expire( + "", + ) From 75b60c7454317bccbb8876c881a0d7af31dfc20d Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 20:55:23 +0000 Subject: [PATCH 1315/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 3f3a2fc48..45f593991 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.473.1" + ".": "0.474.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 08327a2aa..2597ee172 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.473.1" +version = "0.474.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 8ccdb40fa..23dddbf3a 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.473.1" # x-release-please-version +__version__ = "0.474.0" # x-release-please-version From f92c30398f62133a33cd6c0c7541a9ab62f81315 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:28:37 +0000 Subject: [PATCH 1316/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/resources/exports.py | 22 ++++++++++++++++++ src/increase/types/export.py | 27 ++++++++++++++++++++++ src/increase/types/export_create_params.py | 26 +++++++++++++++++++++ src/increase/types/export_list_params.py | 3 +++ tests/api_resources/test_exports.py | 10 ++++++++ 6 files changed, 90 insertions(+), 2 deletions(-) diff --git a/.stats.yml b/.stats.yml index cc2badb61..cbaea0f5d 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 241 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-8bbf0093efa65975131da3735f2adc0ec05432cde8c05e9c9796bc7d553103ae.yml -openapi_spec_hash: 5080ba849a5b100ace3bec9da24d4dc7 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4f26466e66f9f8c45d2291dac32c1de360e4bb73cac74c5ea5125359dc75fa5.yml +openapi_spec_hash: 4aa51886cd76bc38a881dcea41020d99 config_hash: d48e9f65bcf642f92610034d6c43f07a diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index 9c2fc2acd..dee6557a4 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -58,12 +58,14 @@ def create( "account_verification_letter", "funding_instructions", "voided_check", + "daily_account_balance_csv", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, + daily_account_balance_csv: export_create_params.DailyAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, @@ -98,6 +100,8 @@ def create( - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -114,6 +118,9 @@ def create( bookkeeping_account_balance_csv: Options for the created export. Required if `category` is equal to `bookkeeping_account_balance_csv`. + daily_account_balance_csv: Options for the created export. Required if `category` is equal to + `daily_account_balance_csv`. + entity_csv: Options for the created export. Required if `category` is equal to `entity_csv`. funding_instructions: Options for the created export. Required if `category` is equal to @@ -147,6 +154,7 @@ def create( "account_verification_letter": account_verification_letter, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, + "daily_account_balance_csv": daily_account_balance_csv, "entity_csv": entity_csv, "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, @@ -218,6 +226,7 @@ def list( "form_1099_misc", "fee_csv", "voided_check", + "daily_account_balance_csv", ] | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, @@ -261,6 +270,8 @@ def list( - `fee_csv` - Export a CSV of fees. The time range must not include any fees that are part of an open fee statement. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. cursor: Return the page of entries after this one. @@ -340,12 +351,14 @@ async def create( "account_verification_letter", "funding_instructions", "voided_check", + "daily_account_balance_csv", ], account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, + daily_account_balance_csv: export_create_params.DailyAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, funding_instructions: export_create_params.FundingInstructions | Omit = omit, transaction_csv: export_create_params.TransactionCsv | Omit = omit, @@ -380,6 +393,8 @@ async def create( - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. account_statement_bai2: Options for the created export. Required if `category` is equal to `account_statement_bai2`. @@ -396,6 +411,9 @@ async def create( bookkeeping_account_balance_csv: Options for the created export. Required if `category` is equal to `bookkeeping_account_balance_csv`. + daily_account_balance_csv: Options for the created export. Required if `category` is equal to + `daily_account_balance_csv`. + entity_csv: Options for the created export. Required if `category` is equal to `entity_csv`. funding_instructions: Options for the created export. Required if `category` is equal to @@ -429,6 +447,7 @@ async def create( "account_verification_letter": account_verification_letter, "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, + "daily_account_balance_csv": daily_account_balance_csv, "entity_csv": entity_csv, "funding_instructions": funding_instructions, "transaction_csv": transaction_csv, @@ -500,6 +519,7 @@ def list( "form_1099_misc", "fee_csv", "voided_check", + "daily_account_balance_csv", ] | Omit = omit, created_at: export_list_params.CreatedAt | Omit = omit, @@ -543,6 +563,8 @@ def list( - `fee_csv` - Export a CSV of fees. The time range must not include any fees that are part of an open fee statement. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. cursor: Return the page of entries after this one. diff --git a/src/increase/types/export.py b/src/increase/types/export.py index 9245bab31..c4d3bcfc7 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -18,6 +18,7 @@ "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", "BookkeepingAccountBalanceCsvCreatedAt", + "DailyAccountBalanceCsv", "DashboardTableCsv", "EntityCsv", "FeeCsv", @@ -132,6 +133,22 @@ class BookkeepingAccountBalanceCsv(BaseModel): """Filter balances by their created date.""" +class DailyAccountBalanceCsv(BaseModel): + """Details of the daily account balance CSV export. + + This field will be present when the `category` is equal to `daily_account_balance_csv`. + """ + + account_id: Optional[str] = None + """Filter results by Account.""" + + on_or_after_date: Optional[date] = None + """Filter balances on or after this date.""" + + on_or_before_date: Optional[date] = None + """Filter balances on or before this date.""" + + class DashboardTableCsv(BaseModel): """Details of the dashboard table CSV export. @@ -339,6 +356,7 @@ class Export(BaseModel): "form_1099_misc", "fee_csv", "voided_check", + "daily_account_balance_csv", ] """The category of the Export. @@ -366,11 +384,20 @@ class Export(BaseModel): - `fee_csv` - Export a CSV of fees. The time range must not include any fees that are part of an open fee statement. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. """ created_at: datetime """The time the Export was created.""" + daily_account_balance_csv: Optional[DailyAccountBalanceCsv] = None + """Details of the daily account balance CSV export. + + This field will be present when the `category` is equal to + `daily_account_balance_csv`. + """ + dashboard_table_csv: Optional[DashboardTableCsv] = None """Details of the dashboard table CSV export. diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index e031a09a4..8de18358d 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -18,6 +18,7 @@ "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", "BookkeepingAccountBalanceCsvCreatedAt", + "DailyAccountBalanceCsv", "EntityCsv", "FundingInstructions", "TransactionCsv", @@ -41,6 +42,7 @@ class ExportCreateParams(TypedDict, total=False): "account_verification_letter", "funding_instructions", "voided_check", + "daily_account_balance_csv", ] ] """The type of Export to create. @@ -60,6 +62,8 @@ class ExportCreateParams(TypedDict, total=False): - `account_verification_letter` - A PDF of an account verification letter. - `funding_instructions` - A PDF of funding instructions. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. """ account_statement_bai2: AccountStatementBai2 @@ -92,6 +96,12 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `bookkeeping_account_balance_csv`. """ + daily_account_balance_csv: DailyAccountBalanceCsv + """Options for the created export. + + Required if `category` is equal to `daily_account_balance_csv`. + """ + entity_csv: EntityCsv """Options for the created export. @@ -289,6 +299,22 @@ class BookkeepingAccountBalanceCsv(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" +class DailyAccountBalanceCsv(TypedDict, total=False): + """Options for the created export. + + Required if `category` is equal to `daily_account_balance_csv`. + """ + + account_id: str + """Filter exported Balances to the specified Account.""" + + on_or_after_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Filter exported Balances to those on or after this date.""" + + on_or_before_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Filter exported Balances to those on or before this date.""" + + class EntityCsv(TypedDict, total=False): """Options for the created export. diff --git a/src/increase/types/export_list_params.py b/src/increase/types/export_list_params.py index fa126d6a8..7bfff6993 100644 --- a/src/increase/types/export_list_params.py +++ b/src/increase/types/export_list_params.py @@ -27,6 +27,7 @@ class ExportListParams(TypedDict, total=False): "form_1099_misc", "fee_csv", "voided_check", + "daily_account_balance_csv", ] """Filter Exports for those with the specified category. @@ -51,6 +52,8 @@ class ExportListParams(TypedDict, total=False): - `fee_csv` - Export a CSV of fees. The time range must not include any fees that are part of an open fee statement. - `voided_check` - A PDF of a voided check. + - `daily_account_balance_csv` - Export a CSV of daily account balances with + starting and ending balances for a given date range. """ created_at: CreatedAt diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 8325f22de..29dac3000 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -66,6 +66,11 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + daily_account_balance_csv={ + "account_id": "account_id", + "on_or_after_date": parse_date("2019-12-27"), + "on_or_before_date": parse_date("2019-12-27"), + }, entity_csv={}, funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ @@ -244,6 +249,11 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, + daily_account_balance_csv={ + "account_id": "account_id", + "on_or_after_date": parse_date("2019-12-27"), + "on_or_before_date": parse_date("2019-12-27"), + }, entity_csv={}, funding_instructions={"account_number_id": "account_number_id"}, transaction_csv={ From b58cbac8401b5f0f0df93e5e8e87e83da8642211 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Thu, 9 Apr 2026 23:31:44 +0000 Subject: [PATCH 1317/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 45f593991..c3829d835 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.474.0" + ".": "0.475.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 2597ee172..1bce21095 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.474.0" +version = "0.475.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 23dddbf3a..f083bb2e2 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.474.0" # x-release-please-version +__version__ = "0.475.0" # x-release-please-version From eba98600fb1b1a4ae724ac0a2ab6cc989c7a10a5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:00:07 +0000 Subject: [PATCH 1318/1325] fix: ensure file data are only sent as 1 parameter --- src/increase/_utils/_utils.py | 5 +++-- tests/test_extract_files.py | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/increase/_utils/_utils.py b/src/increase/_utils/_utils.py index eec7f4a1f..63b8cd602 100644 --- a/src/increase/_utils/_utils.py +++ b/src/increase/_utils/_utils.py @@ -86,8 +86,9 @@ def _extract_items( index += 1 if is_dict(obj): try: - # We are at the last entry in the path so we must remove the field - if (len(path)) == index: + # Remove the field if there are no more dict keys in the path, + # only "" traversal markers or end. + if all(p == "" for p in path[index:]): item = obj.pop(key) else: item = obj[key] diff --git a/tests/test_extract_files.py b/tests/test_extract_files.py index 6f7d0b073..46d64967e 100644 --- a/tests/test_extract_files.py +++ b/tests/test_extract_files.py @@ -35,6 +35,15 @@ def test_multiple_files() -> None: assert query == {"documents": [{}, {}]} +def test_top_level_file_array() -> None: + query = {"files": [b"file one", b"file two"], "title": "hello"} + assert extract_files(query, paths=[["files", ""]]) == [ + ("files[]", b"file one"), + ("files[]", b"file two"), + ] + assert query == {"title": "hello"} + + @pytest.mark.parametrize( "query,paths,expected", [ From b7734beb5a8da1e9dfa31d502ba9995b1fe9806a Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 15:02:47 +0000 Subject: [PATCH 1319/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index c3829d835..b57b68f88 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.475.0" + ".": "0.475.1" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 1bce21095..20bdf8a88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.475.0" +version = "0.475.1" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index f083bb2e2..a441cc9a6 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.475.0" # x-release-please-version +__version__ = "0.475.1" # x-release-please-version From 0d162244a2790946d83264a21b4e64a701e693d5 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 22:59:46 +0000 Subject: [PATCH 1320/1325] feat(api): api update --- .stats.yml | 4 ++-- src/increase/types/export.py | 6 ++--- src/increase/types/export_create_params.py | 28 ++++------------------ tests/api_resources/test_exports.py | 4 ---- 4 files changed, 10 insertions(+), 32 deletions(-) diff --git a/.stats.yml b/.stats.yml index cbaea0f5d..238fb5aa2 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 241 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-f4f26466e66f9f8c45d2291dac32c1de360e4bb73cac74c5ea5125359dc75fa5.yml -openapi_spec_hash: 4aa51886cd76bc38a881dcea41020d99 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-16584f71f31837a98f04250e08aec539fd7eb0bf69178b0e6b24254642f6755f.yml +openapi_spec_hash: a67f1f1147858e6b2143b5215fc80e04 config_hash: d48e9f65bcf642f92610034d6c43f07a diff --git a/src/increase/types/export.py b/src/increase/types/export.py index c4d3bcfc7..c2d66dda7 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -54,12 +54,12 @@ class AccountStatementBai2(BaseModel): class AccountStatementOfxCreatedAt(BaseModel): """Filter transactions by their created date.""" - after: Optional[datetime] = None - """Filter results to transactions created after this time.""" - before: Optional[datetime] = None """Filter results to transactions created before this time.""" + on_or_after: Optional[datetime] = None + """Filter results to transactions created on or after this time.""" + class AccountStatementOfx(BaseModel): """Details of the account statement OFX export. diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 8de18358d..65670a4f7 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -160,32 +160,14 @@ class AccountStatementBai2(TypedDict, total=False): """ -class AccountStatementOfxCreatedAt(TypedDict, total=False): - """Filter results by time range on the `created_at` attribute.""" - - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ +class AccountStatementOfxCreatedAt(TypedDict, total=False, extra_items=object): # type: ignore[call-arg] + """Filter transactions by their created date.""" before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ + """Filter results to transactions created before this time.""" on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ + """Filter results to transactions created on or after this time.""" class AccountStatementOfx(TypedDict, total=False): @@ -198,7 +180,7 @@ class AccountStatementOfx(TypedDict, total=False): """The Account to create a statement for.""" created_at: AccountStatementOfxCreatedAt - """Filter results by time range on the `created_at` attribute.""" + """Filter transactions by their created date.""" class AccountVerificationLetter(TypedDict, total=False): diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 29dac3000..6be8af620 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -38,10 +38,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: account_statement_ofx={ "account_id": "account_id", "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, account_verification_letter={ @@ -221,10 +219,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) account_statement_ofx={ "account_id": "account_id", "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), "before": parse_datetime("2019-12-27T18:11:19.117Z"), "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), }, }, account_verification_letter={ From c6dcd43a97aaf5e58898369584df124a7bacd732 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:02:12 +0000 Subject: [PATCH 1321/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index b57b68f88..808fe5244 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.475.1" + ".": "0.476.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 20bdf8a88..8afe5c9ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.475.1" +version = "0.476.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index a441cc9a6..3a46a878d 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.475.1" # x-release-please-version +__version__ = "0.476.0" # x-release-please-version From d24f39c1d15c2211c8bf52fff4f6af94956ad5b9 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:28:28 +0000 Subject: [PATCH 1322/1325] feat(api): api update --- .stats.yml | 4 +-- src/increase/types/export.py | 18 +++-------- src/increase/types/export_create_params.py | 36 +++------------------- tests/api_resources/test_exports.py | 16 +++------- 4 files changed, 16 insertions(+), 58 deletions(-) diff --git a/.stats.yml b/.stats.yml index 238fb5aa2..3a06ad510 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 241 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-16584f71f31837a98f04250e08aec539fd7eb0bf69178b0e6b24254642f6755f.yml -openapi_spec_hash: a67f1f1147858e6b2143b5215fc80e04 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9cc37a5650ead65f77fe88834795d2e80f5f0f79e474d15030145f8303835a4f.yml +openapi_spec_hash: 68ec4be9e1dd4153a3175ad41a36352f config_hash: d48e9f65bcf642f92610034d6c43f07a diff --git a/src/increase/types/export.py b/src/increase/types/export.py index c2d66dda7..c127d385f 100644 --- a/src/increase/types/export.py +++ b/src/increase/types/export.py @@ -17,7 +17,6 @@ "BalanceCsv", "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", - "BookkeepingAccountBalanceCsvCreatedAt", "DailyAccountBalanceCsv", "DashboardTableCsv", "EntityCsv", @@ -110,16 +109,6 @@ class BalanceCsv(BaseModel): """Filter balances by their created date.""" -class BookkeepingAccountBalanceCsvCreatedAt(BaseModel): - """Filter balances by their created date.""" - - after: Optional[datetime] = None - """Filter balances created after this time.""" - - before: Optional[datetime] = None - """Filter balances created before this time.""" - - class BookkeepingAccountBalanceCsv(BaseModel): """Details of the bookkeeping account balance CSV export. @@ -129,8 +118,11 @@ class BookkeepingAccountBalanceCsv(BaseModel): bookkeeping_account_id: Optional[str] = None """Filter results by Bookkeeping Account.""" - created_at: Optional[BookkeepingAccountBalanceCsvCreatedAt] = None - """Filter balances by their created date.""" + on_or_after_date: Optional[date] = None + """Filter balances to those on or after this date.""" + + on_or_before_date: Optional[date] = None + """Filter balances to those on or before this date.""" class DailyAccountBalanceCsv(BaseModel): diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 65670a4f7..0f5ad0cd2 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -17,7 +17,6 @@ "BalanceCsv", "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", - "BookkeepingAccountBalanceCsvCreatedAt", "DailyAccountBalanceCsv", "EntityCsv", "FundingInstructions", @@ -237,34 +236,6 @@ class BalanceCsv(TypedDict, total=False): """Filter results by time range on the `created_at` attribute.""" -class BookkeepingAccountBalanceCsvCreatedAt(TypedDict, total=False): - """Filter results by time range on the `created_at` attribute.""" - - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - class BookkeepingAccountBalanceCsv(TypedDict, total=False): """Options for the created export. @@ -277,8 +248,11 @@ class BookkeepingAccountBalanceCsv(TypedDict, total=False): Account. """ - created_at: BookkeepingAccountBalanceCsvCreatedAt - """Filter results by time range on the `created_at` attribute.""" + on_or_after_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Filter exported Balances to those on or after this date.""" + + on_or_before_date: Annotated[Union[str, date], PropertyInfo(format="iso8601")] + """Filter exported Balances to those on or before this date.""" class DailyAccountBalanceCsv(TypedDict, total=False): diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 6be8af620..0bdf34469 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -57,12 +57,8 @@ def test_method_create_with_all_params(self, client: Increase) -> None: }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", - "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, + "on_or_after_date": parse_date("2019-12-27"), + "on_or_before_date": parse_date("2019-12-27"), }, daily_account_balance_csv={ "account_id": "account_id", @@ -238,12 +234,8 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", - "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, + "on_or_after_date": parse_date("2019-12-27"), + "on_or_before_date": parse_date("2019-12-27"), }, daily_account_balance_csv={ "account_id": "account_id", From da764a6eb976388fca19aeab98dc2d8d68c44a56 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Fri, 10 Apr 2026 23:30:53 +0000 Subject: [PATCH 1323/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index 808fe5244..ca3555a72 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.476.0" + ".": "0.477.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index 8afe5c9ce..f003c91ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.476.0" +version = "0.477.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 3a46a878d..80bc1ebbd 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.476.0" # x-release-please-version +__version__ = "0.477.0" # x-release-please-version From 45cbc040c8c59357655ce6050daf607c80588f65 Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:04:30 +0000 Subject: [PATCH 1324/1325] feat(api): api update --- .stats.yml | 4 +- src/increase/resources/exports.py | 10 ----- src/increase/types/export_create_params.py | 49 ---------------------- tests/api_resources/test_exports.py | 18 -------- 4 files changed, 2 insertions(+), 79 deletions(-) diff --git a/.stats.yml b/.stats.yml index 3a06ad510..0be591b72 100644 --- a/.stats.yml +++ b/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 241 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-9cc37a5650ead65f77fe88834795d2e80f5f0f79e474d15030145f8303835a4f.yml -openapi_spec_hash: 68ec4be9e1dd4153a3175ad41a36352f +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/increase%2Fincrease-76519f799070d5e184aa17c924a502d5767ba63eed88e48255145e1c36a19b7f.yml +openapi_spec_hash: 4bac99d90df83788bc79092b880d9ac6 config_hash: d48e9f65bcf642f92610034d6c43f07a diff --git a/src/increase/resources/exports.py b/src/increase/resources/exports.py index dee6557a4..cefd40827 100644 --- a/src/increase/resources/exports.py +++ b/src/increase/resources/exports.py @@ -63,7 +63,6 @@ def create( account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, - balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, daily_account_balance_csv: export_create_params.DailyAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, @@ -112,9 +111,6 @@ def create( account_verification_letter: Options for the created export. Required if `category` is equal to `account_verification_letter`. - balance_csv: Options for the created export. Required if `category` is equal to - `balance_csv`. - bookkeeping_account_balance_csv: Options for the created export. Required if `category` is equal to `bookkeeping_account_balance_csv`. @@ -152,7 +148,6 @@ def create( "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, "account_verification_letter": account_verification_letter, - "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "daily_account_balance_csv": daily_account_balance_csv, "entity_csv": entity_csv, @@ -356,7 +351,6 @@ async def create( account_statement_bai2: export_create_params.AccountStatementBai2 | Omit = omit, account_statement_ofx: export_create_params.AccountStatementOfx | Omit = omit, account_verification_letter: export_create_params.AccountVerificationLetter | Omit = omit, - balance_csv: export_create_params.BalanceCsv | Omit = omit, bookkeeping_account_balance_csv: export_create_params.BookkeepingAccountBalanceCsv | Omit = omit, daily_account_balance_csv: export_create_params.DailyAccountBalanceCsv | Omit = omit, entity_csv: export_create_params.EntityCsv | Omit = omit, @@ -405,9 +399,6 @@ async def create( account_verification_letter: Options for the created export. Required if `category` is equal to `account_verification_letter`. - balance_csv: Options for the created export. Required if `category` is equal to - `balance_csv`. - bookkeeping_account_balance_csv: Options for the created export. Required if `category` is equal to `bookkeeping_account_balance_csv`. @@ -445,7 +436,6 @@ async def create( "account_statement_bai2": account_statement_bai2, "account_statement_ofx": account_statement_ofx, "account_verification_letter": account_verification_letter, - "balance_csv": balance_csv, "bookkeeping_account_balance_csv": bookkeeping_account_balance_csv, "daily_account_balance_csv": daily_account_balance_csv, "entity_csv": entity_csv, diff --git a/src/increase/types/export_create_params.py b/src/increase/types/export_create_params.py index 0f5ad0cd2..9d883de35 100644 --- a/src/increase/types/export_create_params.py +++ b/src/increase/types/export_create_params.py @@ -14,8 +14,6 @@ "AccountStatementOfx", "AccountStatementOfxCreatedAt", "AccountVerificationLetter", - "BalanceCsv", - "BalanceCsvCreatedAt", "BookkeepingAccountBalanceCsv", "DailyAccountBalanceCsv", "EntityCsv", @@ -83,12 +81,6 @@ class ExportCreateParams(TypedDict, total=False): Required if `category` is equal to `account_verification_letter`. """ - balance_csv: BalanceCsv - """Options for the created export. - - Required if `category` is equal to `balance_csv`. - """ - bookkeeping_account_balance_csv: BookkeepingAccountBalanceCsv """Options for the created export. @@ -195,47 +187,6 @@ class AccountVerificationLetter(TypedDict, total=False): """The date of the balance to include in the letter. Defaults to the current date.""" -class BalanceCsvCreatedAt(TypedDict, total=False): - """Filter results by time range on the `created_at` attribute.""" - - after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results after this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results before this [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) - timestamp. - """ - - on_or_after: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or after this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - on_or_before: Annotated[Union[str, datetime], PropertyInfo(format="iso8601")] - """ - Return results on or before this - [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601) timestamp. - """ - - -class BalanceCsv(TypedDict, total=False): - """Options for the created export. - - Required if `category` is equal to `balance_csv`. - """ - - account_id: str - """Filter exported Balances to the specified Account.""" - - created_at: BalanceCsvCreatedAt - """Filter results by time range on the `created_at` attribute.""" - - class BookkeepingAccountBalanceCsv(TypedDict, total=False): """Options for the created export. diff --git a/tests/api_resources/test_exports.py b/tests/api_resources/test_exports.py index 0bdf34469..ab05c991c 100644 --- a/tests/api_resources/test_exports.py +++ b/tests/api_resources/test_exports.py @@ -46,15 +46,6 @@ def test_method_create_with_all_params(self, client: Increase) -> None: "account_number_id": "account_number_id", "balance_date": parse_date("2019-12-27"), }, - balance_csv={ - "account_id": "account_id", - "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", "on_or_after_date": parse_date("2019-12-27"), @@ -223,15 +214,6 @@ async def test_method_create_with_all_params(self, async_client: AsyncIncrease) "account_number_id": "account_number_id", "balance_date": parse_date("2019-12-27"), }, - balance_csv={ - "account_id": "account_id", - "created_at": { - "after": parse_datetime("2019-12-27T18:11:19.117Z"), - "before": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_after": parse_datetime("2019-12-27T18:11:19.117Z"), - "on_or_before": parse_datetime("2019-12-27T18:11:19.117Z"), - }, - }, bookkeeping_account_balance_csv={ "bookkeeping_account_id": "bookkeeping_account_id", "on_or_after_date": parse_date("2019-12-27"), From a1556bb8289b5b4831010ec251b1375d85f59e8c Mon Sep 17 00:00:00 2001 From: "stainless-app[bot]" <142633134+stainless-app[bot]@users.noreply.github.com> Date: Sat, 11 Apr 2026 00:06:48 +0000 Subject: [PATCH 1325/1325] chore(internal): version bump --- .release-please-manifest.json | 2 +- pyproject.toml | 2 +- src/increase/_version.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ca3555a72..26817e153 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.477.0" + ".": "0.478.0" } \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index f003c91ce..2e5c195ca 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "increase" -version = "0.477.0" +version = "0.478.0" description = "The official Python library for the increase API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/increase/_version.py b/src/increase/_version.py index 80bc1ebbd..9e0a85095 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.477.0" # x-release-please-version +__version__ = "0.478.0" # x-release-please-version